e49c81865560f698e8dda08443ff7d6a80932887
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
2
3 * Makefile.in (SFILES): Remove linux-bfin-low.c.
4 * configure.srv: Remove bfin case.
5 * linux-bfin-low.cc: Remove.
6 * linux-low.cc: Remove BFIN-conditional code.
7
8 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
9
10 * configure: Re-generate.
11 * configure.ac: Remove srv_qnx test.
12 * configure.srv: Remove nto case.
13 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
14 * remote-utils.c: Remove __QNX__-guarded code.
15
16 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
17
18 * configure: Re-generate.
19 * configure.ac: Remove srv_lynxos test.
20 * configure.srv: Remove lynxos cases.
21 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
22 Remove.
23
24 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
25
26 * README: Fix a few outdated or incoherent things.
27
28 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
29
30 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
31 (win32_clear_inferiors): Use open_process_used.
32 (get_child_debug_event): Likewise.
33
34 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
35
36 PR gdbserver/25893
37 * linux-low.cc (linux_process_target::create_inferior),
38 lynx-low.cc (lynx_process_target::create_inferior),
39 win32-low.cc (win32_process_target::create_inferior): Use
40 construct_inferior_arguments instead of stringify_argv
41 to get string representation which properly escapes
42 special characters.
43 * server.cc (handle_v_run): Just pass empty program arg
44 as such, since any further processing is now handled via
45 construct_inferior_arguments.
46
47 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
48
49 * nto-low.cc (nto_process_target::create_inferior): Pass
50 argv to spawnp function as char **.
51
52 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
53
54 * server.cc (captured_main), (handle_v_run): No longer
55 insert extra NULL element to args vector.
56
57 2020-05-23 Pedro Alves <palves@redhat.com>
58
59 * gdb-safe-ctype.h: New.
60
61 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
62
63 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
64 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
65 (ia64_target::low_breakpoint_at): Ditto.
66
67 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
68
69 * win32-i386-low.cc (i386_supports_z_point_type): Handle
70 Z_PACKET_HW_BP z_type.
71 (i386_insert_point): Handle raw_bkpt_type type.
72 (i386_remove_point): Likewise.
73
74 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
75
76 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
77 Add arch/i386.o.
78 * win32-arm-low.cc (arm_num_regs): New function.
79 (struct win32_target_ops): Use arm_num_regs.
80 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
81 processes.
82 (i386_get_thread_context): Likewise.
83 (i386_prepare_to_resume): Likewise.
84 (i386_thread_added): Likewise.
85 (i386_single_step): Likewise.
86 (i386_fetch_inferior_register): Likewise.
87 (i386_store_inferior_register): Likewise.
88 (i386_arch_setup): Likewise.
89 (i386_win32_num_regs): New function.
90 (struct win32_target_ops): Use i386_win32_num_regs.
91 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
92 processes.
93 (win32_require_context): Likewise.
94 (child_add_thread): Likewise.
95 (do_initial_child_stuff): Likewise.
96 (continue_one_thread): Likewise.
97 (win32_process_target::resume): Likewise.
98 (load_psapi): Likewise.
99 (win32_add_all_dlls): Likewise.
100 (maybe_adjust_pc): Likewise.
101 (win32_process_target::qxfer_siginfo): Likewise.
102 (initialize_low): Likewise.
103 * win32-low.h (struct win32_target_ops): Change num_regs to
104 callback function.
105
106 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
107
108 * configure.ac: Remove check for fs_base/gs_base in
109 user_regs_struct.
110 * configure: Re-generate.
111 * config.in: Re-generate.
112 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
113 x86_store_gregset): Adjust.
114
115 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
116
117 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
118 comparison.
119
120 2020-04-16 Tom Tromey <tromey@adacore.com>
121
122 * win32-low.cc (windows_nat::handle_access_violation): New
123 function.
124
125 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
126
127 * win32-low.cc (get_child_debug_event): Fix format string warning.
128
129 2020-04-13 Tom Tromey <tom@tromey.com>
130
131 * server.h (gdb_fildes_t): Remove typedef.
132 * remote-utils.c (remote_desc, list_desc): Now int.
133 (INVALID_DESCRIPTOR): Remove.
134 (gdb_connected, remote_close)
135 (check_remote_input_interrupt_request): Update.
136 * utils.h (pfildes): Don't declare.
137 * utils.c (pfildes): Remove.
138
139 2020-04-13 Tom Tromey <tom@tromey.com>
140
141 * server.h (handle_serial_event, handle_target_event): Update.
142 * server.c: Don't call initialize_event_loop.
143 (keep_processing_events): New global.
144 (handle_serial_event): Return void. Set keep_processing_events.
145 (handle_target_event): Return void.
146 (start_event_loop): Move from event-loop.c. Rewrite.
147 * remote-utils.c (handle_accept_event): Return void.
148 (reset_readchar): Use delete_timer.
149 (process_remaining): Return void.
150 (reschedule): Use create_timer.
151 * event-loop.h: Remove.
152 * event-loop.cc: Remove.
153 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
154
155 2020-04-13 Tom Tromey <tom@tromey.com>
156
157 * server.c (invoke_async_signal_handlers)
158 (check_async_event_handlers, flush_streams, gdb_select): New
159 functions.
160
161 2020-04-13 Tom Tromey <tom@tromey.com>
162
163 * configure: Rebuild.
164 * config.in: Rebuild.
165
166 2020-04-08 Tom Tromey <tromey@adacore.com>
167
168 PR gdb/22992
169 * win32-low.c (child_continue): Call matching_pending_stop.
170 (get_child_debug_event): Call fetch_pending_stop. Push pending
171 stop when needed.
172
173 2020-04-08 Tom Tromey <tromey@adacore.com>
174
175 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
176 (win32_process_target::supports_stopped_by_sw_breakpoint):
177 Declare.
178 * win32-low.c (win32_supports_z_point_type): Always handle
179 Z_PACKET_SW_BP.
180 (win32_insert_point): Call insert_memory_breakpoint when needed.
181 (win32_remove_point): Call remove_memory_breakpoint when needed.
182 (win32_process_target::stopped_by_sw_breakpoint)
183 (win32_process_target::supports_stopped_by_sw_breakpoint): New
184 methods.
185 (win32_target_ops): Update.
186 (maybe_adjust_pc): New function.
187 (win32_wait): Call maybe_adjust_pc.
188
189 2020-04-08 Tom Tromey <tromey@adacore.com>
190
191 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
192 field.
193 * win32-i386-low.c (the_low_target): Update.
194 * win32-arm-low.c (the_low_target): Update.
195
196 2020-04-08 Tom Tromey <tromey@adacore.com>
197
198 * win32-low.h (win32_process_target::read_pc)
199 (win32_process_target::write_pc): Declare.
200 * win32-low.c (win32_process_target::read_pc)
201 (win32_process_target::write_pc): New methods.
202 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
203 functions.
204 (the_low_target): Update.
205 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
206 functions.
207 (the_low_target): Update.
208
209 2020-04-08 Tom Tromey <tromey@adacore.com>
210
211 * win32-low.c (win32_kill, get_child_debug_event): Use
212 wait_for_debug_event.
213
214 2020-04-08 Tom Tromey <tromey@adacore.com>
215
216 * win32-low.c (child_continue): Call continue_last_debug_event.
217
218 2020-04-08 Tom Tromey <tromey@adacore.com>
219
220 * win32-low.c (handle_exception): Remove.
221 (windows_nat::handle_ms_vc_exception): New function.
222 (get_child_debug_event): Add "continue_status" parameter.
223 Update.
224 (win32_wait): Update.
225
226 2020-04-08 Tom Tromey <tromey@adacore.com>
227
228 * win32-low.c (windows_nat::handle_load_dll): Rename from
229 handle_load_dll. No longer static.
230 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
231 No longer static.
232
233 2020-04-08 Tom Tromey <tromey@adacore.com>
234
235 * win32-low.c (handle_output_debug_string): Add parameter. Change
236 return type.
237 (win32_kill, get_child_debug_event): Update.
238
239 2020-04-08 Tom Tromey <tromey@adacore.com>
240
241 * win32-low.c (current_process_handle, current_process_id)
242 (main_thread_id, last_sig, current_event, siginfo_er): Move to
243 nat/windows-nat.c.
244
245 2020-04-08 Tom Tromey <tromey@adacore.com>
246
247 * win32-low.c (get_image_name): Remove.
248 (handle_load_dll): Update.
249
250 2020-04-08 Tom Tromey <tromey@adacore.com>
251
252 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
253 No longer static. Change parameters.
254 (child_add_thread, child_fetch_inferior_registers)
255 (child_store_inferior_registers, win32_resume)
256 (win32_get_tib_address): Update.
257
258 2020-04-08 Tom Tromey <tromey@adacore.com>
259
260 * win32-low.h (struct win32_target_ops): Use qualified names where
261 needed.
262 * win32-i386-low.c: Add "using namespace".
263 * win32-low.c: Add "using namespace".
264 * win32-arm-low.c: Add "using namespace".
265
266 2020-04-08 Tom Tromey <tromey@adacore.com>
267
268 * win32-low.c (delete_thread_info): Don't call CloseHandle.
269
270 2020-04-08 Tom Tromey <tromey@adacore.com>
271
272 * win32-low.c (win32_require_context, suspend_one_thread): Use
273 windows_thread_info::suspend.
274 (continue_one_thread): Use windows_thread_info::resume.
275 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
276
277 2020-04-08 Tom Tromey <tromey@adacore.com>
278
279 * win32-i386-low.c (update_debug_registers)
280 (i386_prepare_to_resume, i386_thread_added): Update.
281
282 2020-04-08 Tom Tromey <tromey@adacore.com>
283
284 * win32-low.c (child_add_thread): Use new.
285 (delete_thread_info): Use delete.
286
287 2020-04-08 Tom Tromey <tromey@adacore.com>
288
289 * win32-low.h (struct windows_thread_info): Remove.
290
291 2020-04-08 Tom Tromey <tromey@adacore.com>
292
293 * win32-low.h (struct windows_thread_info): Rename from
294 win32_thread_info. Remove typedef.
295 (struct win32_target_ops, win32_require_context): Update.
296 * win32-low.c (win32_get_thread_context)
297 (win32_set_thread_context, win32_prepare_to_resume)
298 (win32_require_context, thread_rec, child_add_thread)
299 (delete_thread_info, continue_one_thread)
300 (child_fetch_inferior_registers, child_store_inferior_registers)
301 (win32_resume, suspend_one_thread, win32_get_tib_address):
302 Update.
303 * win32-i386-low.c (update_debug_registers)
304 (win32_get_current_dr, i386_get_thread_context)
305 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
306 (i386_fetch_inferior_register, i386_store_inferior_register):
307 Update.
308 * win32-arm-low.c (arm_get_thread_context)
309 (arm_fetch_inferior_register, arm_store_inferior_register):
310 Update.
311
312 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
313
314 * linux-low.h (struct linux_target_ops): Remove.
315 (the_low_target): Remove.
316 * linux-x86-low.cc (the_low_target): Remove.
317 * linux-aarch64-low.cc (the_low_target): Ditto.
318 * linux-arm-low.cc (the_low_target): Ditto.
319 * linux-bfin-low.cc (the_low_target): Ditto.
320 * linux-cris-low.cc (the_low_target): Ditto.
321 * linux-crisv32-low.cc (the_low_target): Ditto.
322 * linux-ia64-low.cc (the_low_target): Ditto.
323 * linux-m32r-low.cc (the_low_target): Ditto.
324 * linux-m68k-low.cc (the_low_target): Ditto.
325 * linux-mips-low.cc (the_low_target): Ditto.
326 * linux-nios2-low.cc (the_low_target): Ditto.
327 * linux-ppc-low.cc (the_low_target): Ditto.
328 * linux-riscv-low.cc (the_low_target): Ditto.
329 * linux-s390-low.cc (the_low_target): Ditto.
330 * linux-sh-low.cc (the_low_target): Ditto.
331 * linux-sparc-low.cc (the_low_target): Ditto.
332 * linux-tic6x-low.cc (the_low_target): Ditto.
333 * linux-tile-low.cc (the_low_target): Ditto.
334 * linux-xtensa-low.cc (the_low_target): Ditto.
335
336 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
337
338 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
339 linux target define the op by overriding the declaration in
340 process_stratum_target.
341
342 * linux-low.h (struct linux_target_ops): Remove the op.
343 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
344 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
345 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
346 (x86_get_ipa_tdesc_idx): Turn into...
347 (x86_target::get_ipa_tdesc_idx): ...this.
348 (the_low_target): Remove the op field.
349 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
350 (ppc_get_ipa_tdesc_idx): Turn into...
351 (ppc_target::get_ipa_tdesc_idx): ...this.
352 (the_low_target): Remove the op field.
353 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
354 (s390_get_ipa_tdesc_idx): Turn into...
355 (s390_target::get_ipa_tdesc_idx): ...this.
356 (the_low_target): Remove the op field.
357
358 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
359
360 Turn the 'get_syscall_trapinfo' linux target op into a method
361 of process_stratum_target.
362
363 * linux-low.h (struct linux_target_ops): Remove the op.
364 (class linux_process_target) <get_syscall_trapinfo>
365 <gdb_catch_this_syscall>
366 <low_supports_catch_syscall>
367 <low_get_syscall_trapinfo>: Declare.
368 * linux-low.cc (get_syscall_trapinfo): Turn into...
369 (linux_process_target::get_syscall_trapinfo): ...this.
370 (linux_process_target::low_get_syscall_trapinfo): Define.
371 (gdb_catch_this_syscall_p): Turn into...
372 (linux_process_target::gdb_catch_this_syscall): ...this.
373 (linux_process_target::low_supports_catch_syscall): Define.
374
375 Update the callers below.
376
377 (linux_process_target::wait_1)
378 (linux_process_target::supports_catch_syscall)
379
380 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
381 <low_get_syscall_trapinfo>: Declare.
382 (x86_target::low_supports_catch_syscall): Define.
383 (x86_get_syscall_trapinfo): Turn into...
384 (x86_target::low_get_syscall_trapinfo): ...this.
385 (the_low_target): Remove the op field.
386 * linux-aarch64-low.cc (class aarch64_target)
387 <low_supports_catch_syscall>
388 <low_get_syscall_trapinfo>: Declare.
389 (aarch64_target::low_supports_catch_syscall): Define.
390 (aarch64_get_syscall_trapinfo): Turn into...
391 (aarch64_target::low_get_syscall_trapinfo): ...this.
392 (the_low_target): Remove the op field.
393 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
394 <low_get_syscall_trapinfo>: Declare.
395 (arm_target::low_supports_catch_syscall): Define.
396 (arm_get_syscall_trapinfo): Turn into...
397 (arm_target::low_get_syscall_trapinfo): ...this.
398 (the_low_target): Remove the op field.
399 * linux-ppc-low.cc (the_low_target): Remove the op field.
400 * linux-s390-low.cc (the_low_target): Remove the op field.
401
402 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
403
404 Remove the 'supports_hardware_single_step' linux target op and
405 override the process_stratum_target's op definition in
406 linux_process_target to return true.
407
408 * linux-low.h (struct linux_target_ops): Remove the op.
409 (class linux_process_target) <finish_step_over>
410 <maybe_hw_step>: Declare.
411 * linux-low.cc (can_hardware_single_step): Remove.
412 (maybe_hw_step): Turn into...
413 (linux_process_target::maybe_hw_step): ...this.
414 (finish_step_over): Turn into...
415 (linux_process_target::finish_step_over): ...this.
416 (linux_process_target::supports_hardware_single_step): Update
417 to return true.
418
419 Update the callers below.
420
421 (linux_process_target::single_step)
422 (linux_process_target::resume_one_lwp_throw)
423
424 * linux-arm-low.cc (class arm_target)
425 <supports_hardware_single_step>: Declare.
426 (arm_supports_hardware_single_step): Turn into...
427 (arm_target::supports_hardware_single_step): ...this.
428 (the_low_target): Remove the op field.
429 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
430 (the_low_target): Remove the op field.
431 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
432 Remove.
433 (the_low_target): Remove the op field.
434 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
435 (the_low_target): Remove the op field.
436 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
437 (the_low_target): Remove the op field.
438 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
439 (the_low_target): Remove the op field.
440 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
441 (the_low_target): Remove the op field.
442 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
443 (the_low_target): Remove the op field.
444 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
445 (the_low_target): Remove the op field.
446 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
447 (the_low_target): Remove the op field.
448 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
449 (the_low_target): Remove the op field.
450 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
451 (the_low_target): Remove the op field.
452 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
453 Remove.
454 (the_low_target): Remove the op field.
455
456 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
457
458 Turn the 'supports_range_stepping' linux target op into a method
459 of linux_process_target.
460
461 * linux-low.h (struct linux_target_ops): Remove the op.
462 (class linux_process_target) <low_supports_range_stepping>: Declare.
463 * linux-low.cc (linux_process_target::low_supports_range_stepping):
464 Define.
465 (linux_process_target::supports_range_stepping): Update the call
466 site.
467 * linux-x86-low.cc (class x86_target)
468 <low_supports_range_stepping>: Declare.
469 (x86_supports_range_stepping): Turn into...
470 (x86_target::low_supports_range_stepping): ...this.
471 (the_low_target): Remove the op field.
472 * linux-aarch64-low.cc (class aarch64_target)
473 <low_supports_range_stepping>: Declare.
474 (aarch64_supports_range_stepping): Turn into...
475 (aarch64_target::low_supports_range_stepping): ...this.
476 (the_low_target): Remove the op field.
477 * linux-arm-low.cc (the_low_target): Remove the op field.
478 * linux-bfin-low.cc (the_low_target): Ditto.
479 * linux-crisv32-low.cc (the_low_target): Ditto.
480 * linux-m32r-low.cc (the_low_target): Ditto.
481 * linux-m68k-low.cc (the_low_target): Ditto.
482 * linux-ppc-low.cc (the_low_target): Ditto.
483 * linux-s390-low.cc (the_low_target): Ditto.
484 * linux-sh-low.cc (the_low_target): Ditto.
485 * linux-tic6x-low.cc (the_low_target): Ditto.
486 * linux-tile-low.cc (the_low_target): Ditto.
487 * linux-xtensa-low.cc (the_low_target): Ditto.
488
489 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
490
491 Remove the 'emit_ops' linux target ops and let the concrete
492 linux target define the op by overriding the declaration of
493 process_stratum_target.
494
495 * linux-low.h (struct linux_target_ops): Remove the op.
496 (class linux_process_target) <emit_ops>: Remove.
497 * linux-low.cc (linux_process_target::emit_ops): Remove.
498 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
499 (x86_emit_ops): Turn into...
500 (x86_target::emit_ops): ...this.
501 (the_low_target): Remove the op field.
502 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
503 (aarch64_emit_ops): Turn into...
504 (aarch64_target::emit_ops): ...this.
505 (the_low_target): Remove the op field.
506 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
507 (ppc_emit_ops): Turn into...
508 (ppc_target::emit_ops): ...this.
509 (the_low_target): Remove the op field.
510 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
511 (s390_emit_ops): Turn into...
512 (s390_target::emit_ops): ...this.
513 (the_low_target): Remove the op field.
514 * linux-arm-low.cc (the_low_target): Remove the op field.
515 * linux-bfin-low.cc (the_low_target): Ditto.
516 * linux-crisv32-low.cc (the_low_target): Ditto.
517 * linux-m32r-low.cc (the_low_target): Ditto.
518 * linux-m68k-low.cc (the_low_target): Ditto.
519 * linux-sh-low.cc (the_low_target): Ditto.
520 * linux-tic6x-low.cc (the_low_target): Ditto.
521 * linux-tile-low.cc (the_low_target): Ditto.
522 * linux-xtensa-low.cc (the_low_target): Ditto.
523
524 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
525
526 Remove the 'install_fast_tracepoint_jump_pad' and
527 'get_min_fast_tracepoint_insn_len' linux target ops to let the
528 concrete linux target define the ops by overriding the declarations
529 of process_stratum_target.
530
531 * linux-low.h (struct linux_target_ops): Remove the ops.
532 (class linux_process_target) <supports_fast_tracepoints>
533 <install_fast_tracepoint_jump_pad>
534 <get_min_fast_tracepoint_insn_len>: Remove.
535 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
536 (linux_process_target::install_fast_tracepoint_jump_pad)
537 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
538 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
539 <install_fast_tracepoint_jump_pad>
540 <get_min_fast_tracepoint_insn_len>: Declare.
541 (x86_target::supports_fast_tracepoints): Define.
542 (x86_install_fast_tracepoint_jump_pad): Turn into...
543 (x86_target::install_fast_tracepoint_jump_pad): ...this.
544 (x86_get_min_fast_tracepoint_insn_len): Turn into...
545 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
546 (the_low_target): Remove the op fields.
547 * linux-aarch64-low.cc (class aarch64_target)
548 <supports_fast_tracepoints>
549 <install_fast_tracepoint_jump_pad>
550 <get_min_fast_tracepoint_insn_len>: Declare.
551 (aarch64_target::supports_fast_tracepoints): Define.
552 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
553 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
554 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
555 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
556 (the_low_target): Remove the op fields.
557 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
558 <install_fast_tracepoint_jump_pad>
559 <get_min_fast_tracepoint_insn_len>: Declare.
560 (ppc_target::supports_fast_tracepoints): Define.
561 (ppc_install_fast_tracepoint_jump_pad): Turn into...
562 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
563 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
564 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
565 (the_low_target): Remove the op fields.
566 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
567 <install_fast_tracepoint_jump_pad>
568 <get_min_fast_tracepoint_insn_len>: Declare.
569 (s390_target::supports_fast_tracepoints): Define.
570 (s390_install_fast_tracepoint_jump_pad): Turn into...
571 (s390_target::install_fast_tracepoint_jump_pad): ...this.
572 (s390_get_min_fast_tracepoint_insn_len): Turn into...
573 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
574 (the_low_target): Remove the op fields.
575 * linux-arm-low.cc (the_low_target): Remove the op fields.
576 * linux-bfin-low.cc (the_low_target): Ditto.
577 * linux-crisv32-low.cc (the_low_target): Ditto.
578 * linux-m32r-low.cc (the_low_target): Ditto.
579 * linux-m68k-low.cc (the_low_target): Ditto.
580 * linux-sh-low.cc (the_low_target): Ditto.
581 * linux-tic6x-low.cc (the_low_target): Ditto.
582 * linux-tile-low.cc (the_low_target): Ditto.
583 * linux-xtensa-low.cc (the_low_target): Ditto.
584
585 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
586
587 Turn the 'get_thread_area' linux target op into a method of
588 process_stratum_target.
589
590 * linux-low.h (struct linux_target_ops): Remove the op.
591 (class linux_process_target) <stuck_in_jump_pad>
592 <linux_fast_tracepoint_collecting>
593 <low_get_thread_area>: Declare.
594 * linux-low.cc (supports_fast_tracepoints): Remove.
595 (linux_fast_tracepoint_collecting): Turn into...
596 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
597 (linux_process_target::low_get_thread_area): Define.
598 (stuck_in_jump_pad_callback): Turn into...
599 (linux_process_target::stuck_in_jump_pad): ...this.
600
601 Update the caller below.
602
603 (linux_process_target::stabilize_threads)
604
605 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
606 Declare.
607 (x86_get_thread_area): Turn into...
608 (x86_target::low_get_thread_area): ...this.
609 (the_low_target): Remove the op field.
610 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
611 Declare.
612 (aarch64_get_thread_area): Turn into...
613 (aarch64_target::low_get_thread_area): ...this.
614 (the_low_target): Remove the op field.
615 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
616 Declare.
617 (ppc_get_thread_area): Turn into...
618 (ppc_target::low_get_thread_area): ...this.
619 (the_low_target): Remove the op field.
620 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
621 Declare.
622 (s390_get_thread_area): Turn into...
623 (s390_target::low_get_thread_area): ...this.
624 (the_low_target): Remove the op field.
625 * linux-arm-low.cc (the_low_target): Remove the op field.
626 * linux-bfin-low.cc (the_low_target): Ditto.
627 * linux-crisv32-low.cc (the_low_target): Ditto.
628 * linux-m32r-low.cc (the_low_target): Ditto.
629 * linux-m68k-low.cc (the_low_target): Ditto.
630 * linux-sh-low.cc (the_low_target): Ditto.
631 * linux-tic6x-low.cc (the_low_target): Ditto.
632 * linux-tile-low.cc (the_low_target): Ditto.
633 * linux-xtensa-low.cc (the_low_target): Ditto.
634
635 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
636
637 Remote the 'supports_tracepoints' linux target op and let the
638 concrete linux target define it by overriding the op declared in
639 process_stratum_target.
640
641 * linux-low.h (struct linux_target_ops): Remove the op.
642 (class linux_process_target) <supports_tracepoints>: Remove.
643 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
644 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
645 Declare.
646 (x86_supports_tracepoints): Turn into...
647 (x86_target::supports_tracepoints): ...this.
648 (the_low_target): Remove the op field.
649 * linux-aarch64-low.cc (class aarch64_target)
650 <supports_tracepoints>: Declare.
651 (aarch64_supports_tracepoints): Turn into...
652 (aarch64_target::supports_tracepoints): ...this.
653 (the_low_target): Remove the op field.
654 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
655 Declare.
656 (ppc_supports_tracepoints): Turn into...
657 (ppc_target::supports_tracepoints): ...this.
658 (the_low_target): Remove the op field.
659 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
660 Declare.
661 (s390_supports_tracepoints): Turn into...
662 (s390_target::supports_tracepoints): ...this.
663 (the_low_target): Remove the op field.
664 * linux-arm-low.cc (the_low_target): Remove the op field.
665 * linux-bfin-low.cc (the_low_target): Ditto.
666 * linux-crisv32-low.cc (the_low_target): Ditto.
667 * linux-m32r-low.cc (the_low_target): Ditto.
668 * linux-m68k-low.cc (the_low_target): Ditto.
669 * linux-sh-low.cc (the_low_target): Ditto.
670 * linux-tic6x-low.cc (the_low_target): Ditto.
671 * linux-tile-low.cc (the_low_target): Ditto.
672 * linux-xtensa-low.cc (the_low_target): Ditto.
673
674 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
675
676 Remove the 'process_qsupported' linux target op and let a concrete
677 linux target define the op by overriding the op declaration in
678 process_stratum_target.
679
680 * linux-low.h (struct linux_target_ops): Remove the op.
681 (class linux_process_target) <process_qsupported>: Remove.
682 * linux-low.cc (linux_process_target::process_qsupported): Remove.
683 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
684 (x86_linux_process_qsupported): Turn into...
685 (x86_target::process_qsupported): ...this.
686 (the_low_target): Remove the op field.
687 * linux-aarch64-low.cc (the_low_target): Remove the op
688 field.
689 * linux-arm-low.cc (the_low_target): Ditto.
690 * linux-bfin-low.cc (the_low_target): Ditto.
691 * linux-crisv32-low.cc (the_low_target): Ditto.
692 * linux-m32r-low.cc (the_low_target): Ditto.
693 * linux-m68k-low.cc (the_low_target): Ditto.
694 * linux-ppc-low.cc (the_low_target): Ditto.
695 * linux-s390-low.cc (the_low_target): Ditto.
696 * linux-sh-low.cc (the_low_target): Ditto.
697 * linux-tic6x-low.cc (the_low_target): Ditto.
698 * linux-tile-low.cc (the_low_target): Ditto.
699 * linux-xtensa-low.cc (the_low_target): Ditto.
700
701 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
702
703 Turn the 'prepare_to_resume' linux target op into a method of
704 linux_process_target.
705
706 * linux-low.h (struct linux_target_ops): Remove the op.
707 (class linux_process_target) <low_prepare_to_resume>: Declare.
708 * linux-low.cc (linux_process_target::low_prepare_to_resume):
709 Define.
710
711 Update the callers below:
712
713 (linux_process_target::resume_one_lwp_throw)
714 (linux_process_target::low_prepare_to_resume)
715
716 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
717 Declare.
718 (x86_target::low_prepare_to_resume): Define.
719 (the_low_target): Remove the op field.
720 * linux-aarch64-low.cc (class aarch64_target)
721 <low_prepare_to_resume>: Declare.
722 (aarch64_target::low_prepare_to_resume): Define.
723 (the_low_target): Remove the op field.
724 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
725 Declare.
726 (arm_prepare_to_resume): Turn into...
727 (arm_target::low_prepare_to_resume): ...this.
728 (the_low_target): Remove the op field.
729 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
730 Declare.
731 (mips_linux_prepare_to_resume): Turn into...
732 (mips_target::low_prepare_to_resume): ...this.
733 (the_low_target): Remove the op field.
734 * linux-bfin-low.cc (the_low_target): Remove the op field.
735 * linux-crisv32-low.cc (the_low_target): Ditto.
736 * linux-m32r-low.cc (the_low_target): Ditto.
737 * linux-m68k-low.cc (the_low_target): Ditto.
738 * linux-ppc-low.cc (the_low_target): Ditto.
739 * linux-s390-low.cc (the_low_target): Ditto.
740 * linux-sh-low.cc (the_low_target): Ditto.
741 * linux-tic6x-low.cc (the_low_target): Ditto.
742 * linux-tile-low.cc (the_low_target): Ditto.
743 * linux-xtensa-low.cc (the_low_target): Ditto.
744
745 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
746
747 Turn the 'new_process', 'delete_process', 'new_thread',
748 'delete_thread', and 'new_fork' linux target ops into methods
749 of linux_process_target.
750
751 * linux-low.h (struct linux_target_ops): Remove the ops.
752 (class linux_process_target) <add_linux_process>
753 <add_lwp>
754 <delete_lwp>
755 <attach_lwp>
756 <detach_one_lwp>
757 <check_zombie_leaders>
758 <filter_exit_event>
759 <low_new_process>
760 <low_delete_process>
761 <low_new_thread>
762 <low_delete_thread>
763 <low_new_fork>: Declare.
764 * linux-low.cc (delete_lwp): Turn into...
765 (linux_process_target::delete_lwp): ...this.
766 (linux_process_target::low_delete_thread): Define.
767 (linux_add_process): Turn into...
768 (linux_process_target::add_linux_process): ...this.
769 (linux_process_target::low_new_process): Define.
770 (linux_process_target::low_delete_process): Define.
771 (linux_process_target::low_new_fork): Define.
772 (add_lwp): Turn into...
773 (linux_process_target::add_lwp): ...this.
774 (linux_process_target::low_new_thread): Define.
775 (linux_attach_lwp): Turn into...
776 (linux_process_target::attach_lwp): ...this.
777 (linux_detach_one_lwp): Turn into...
778 (linux_process_target::detach_one_lwp): ...this.
779 (linux_detach_lwp_callback): Remove and inline...
780 (linux_process_target::detach): ...here.
781 (check_zombie_leaders): Turn into...
782 (linux_process_target::check_zombie_leaders): ...this.
783 (filter_exit_event): Turn into...
784 (linux_process_target::filter_exit_event): ...this.
785
786 Update the callers below.
787
788 (linux_process_target::handle_extended_wait)
789 (linux_process_target::create_inferior)
790 (attach_proc_task_lwp_callback)
791 (linux_process_target::attach)
792 (linux_process_target::detach)
793 (linux_process_target::mourn)
794 * thread-db.cc (attach_thread)
795
796 * linux-x86-low.cc (class x86_target) <low_new_process>
797 <low_delete_process>
798 <low_new_thread>
799 <low_delete_thread>
800 <low_new_fork>: Declare.
801 (x86_linux_new_process): Turn into...
802 (x86_target::low_new_process): ...this.
803 (x86_linux_delete_process): Turn into...
804 (x86_target::low_delete_process): ...this.
805 (x86_target::low_new_thread): Define.
806 (x86_target::low_delete_thread): Define.
807 (x86_linux_new_fork): Turn into...
808 (x86_target::low_new_fork): ...this.
809 (the_low_target): Remove the op fields.
810 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
811 <low_delete_process>
812 <low_new_thread>
813 <low_delete_thread>
814 <low_new_fork>: Declare.
815 (aarch64_linux_new_process): Turn into...
816 (aarch64_target::low_new_process): ...this.
817 (aarch64_linux_delete_process): Turn into...
818 (aarch64_target::low_delete_process): ...this.
819 (aarch64_target::low_new_thread): Define.
820 (aarch64_target::low_delete_thread): Define.
821 (aarch64_linux_new_fork): Turn into...
822 (aarch64_target::low_new_fork): ...this.
823 (the_low_target): Remove the op fields.
824 * linux-arm-low.cc (class arm_target) <low_new_process>
825 <low_delete_process>
826 <low_new_thread>
827 <low_delete_thread>
828 <low_new_fork>: Declare.
829 (arm_new_process): Turn into...
830 (arm_target::low_new_process): ...this.
831 (arm_delete_process): Turn into...
832 (arm_target::low_delete_process): ...this.
833 (arm_new_thread): Turn into...
834 (arm_target::low_new_thread): ...this.
835 (arm_delete_thread): Turn into...
836 (arm_target::low_delete_thread): ...this.
837 (arm_new_fork): Turn into...
838 (arm_target::low_new_fork): ...this.
839 (the_low_target): Remove the op fields.
840 * linux-mips-low.cc (class mips_target) <low_new_process>
841 <low_delete_process>
842 <low_new_thread>
843 <low_delete_thread>
844 <low_new_fork>: Declare.
845 (mips_linux_new_process): Turn into...
846 (mips_target::low_new_process): ...this.
847 (mips_linux_delete_process): Turn into...
848 (mips_target::low_delete_process): ...this.
849 (mips_linux_new_thread): Turn into...
850 (mips_target::low_new_thread): ...this.
851 (mips_linux_delete_thread): Turn into...
852 (mips_target::low_delete_thread): ...this.
853 (mips_linux_new_fork): Turn into...
854 (mips_target::low_new_fork): ...this.
855 (the_low_target): Remove the op fields.
856 * linux-bfin-low.cc (the_low_target): Remove the op fields.
857 * linux-crisv32-low.cc (the_low_target): Ditto.
858 * linux-m32r-low.cc (the_low_target): Ditto.
859 * linux-m68k-low.cc (the_low_target): Ditto.
860 * linux-ppc-low.cc (the_low_target): Ditto.
861 * linux-s390-low.cc (the_low_target): Ditto.
862 * linux-sh-low.cc (the_low_target): Ditto.
863 * linux-tic6x-low.cc (the_low_target): Ditto.
864 * linux-tile-low.cc (the_low_target): Ditto.
865 * linux-xtensa-low.cc (the_low_target): Ditto.
866
867 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
868
869 Turn the 'siginfo_fixup' linux target op into a method of
870 linux_process_target.
871
872 * linux-low.h (struct linux_target_ops): Remove the op.
873 (class linux_process_target) <siginfo_fixup>
874 <low_siginfo_fixup>: Declare.
875 * linux-low.cc (siginfo_fixup): Turn into...
876 (linux_process_target::siginfo_fixup): ...this.
877 (linux_process_target::low_siginfo_fixup): Define.
878 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
879 (x86_siginfo_fixup): Turn into...
880 (x86_target::low_siginfo_fixup): ...this.
881 (the_low_target): Remove the op field.
882 * linux-aarch64-low.cc (class aarch64_target):
883 <low_siginfo_fixup>: Declare.
884 (aarch64_linux_siginfo_fixup): Turn into...
885 (aarch64_target::low_siginfo_fixup): ...this.
886 (the_low_target): Remove the op field.
887 * linux-arm-low.cc (the_low_target): Remove the op field.
888 * linux-bfin-low.cc (the_low_target): Ditto.
889 * linux-crisv32-low.cc (the_low_target): Ditto.
890 * linux-m32r-low.cc (the_low_target): Ditto.
891 * linux-m68k-low.cc (the_low_target): Ditto.
892 * linux-mips-low.cc (the_low_target): Ditto.
893 * linux-ppc-low.cc (the_low_target): Ditto.
894 * linux-s390-low.cc (the_low_target): Ditto.
895 * linux-sh-low.cc (the_low_target): Ditto.
896 * linux-tic6x-low.cc (the_low_target): Ditto.
897 * linux-tile-low.cc (the_low_target): Ditto.
898 * linux-xtensa-low.cc (the_low_target): Ditto.
899
900 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
901
902 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
903 linux target ops into methods of linux_process_target.
904
905 * linux-low.h (struct linux_target_ops): Remove the ops.
906 (class linux_process_target) <low_collect_ptrace_register>
907 <low_store_ptrace_register>: Declare.
908 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
909 (linux_process_target::low_supply_ptrace_register): Define.
910
911 Update the callers below.
912
913 (linux_process_target::fetch_register)
914 (linux_process_target::store_register)
915
916 * linux-x86-low.cc (the_low_target): Remove the op fields.
917 * linux-aarch64-low.cc (the_low_target): Ditto.
918 * linux-arm-low.cc (the_low_target): Ditto.
919 * linux-bfin-low.cc (the_low_target): Ditto.
920 * linux-crisv32-low.cc (the_low_target): Ditto.
921 * linux-m32r-low.cc (the_low_target): Ditto.
922 * linux-m68k-low.cc (the_low_target): Ditto.
923 * linux-sh-low.cc (the_low_target): Ditto.
924 * linux-sparc-low.cc (the_low_target): Ditto.
925 * linux-tic6x-low.cc (the_low_target): Ditto.
926 * linux-tile-low.cc (the_low_target): Ditto.
927 * linux-xtensa-low.cc (the_low_target): Ditto.
928 * linux-mips-low.cc (class mips_target)
929 <low_collect_ptrace_register>
930 <low_supply_ptrace_register>: Declare.
931 (mips_collect_ptrace_register): Turn into ...
932 (mips_target::low_collect_ptrace_register): ...this.
933 (mips_supply_ptrace_register): Turn into...
934 (mips_target::low_supply_ptrace_register): ...this.
935 (the_low_target): Remove the op fields.
936 * linux-ppc-low.cc (class ppc_target)
937 <low_collect_ptrace_register>
938 <low_supply_ptrace_register>: Declare.
939 (ppc_collect_ptrace_register): Turn into ...
940 (ppc_target::low_collect_ptrace_register): ...this.
941 (ppc_supply_ptrace_register): Turn into ...
942 (ppc_target::low_supply_ptrace_register): ...this.
943 (ppc_fill_gregset): Update for the calls to
944 low_collect_ptrace_register.
945 (the_low_target): Remove the op fields.
946 * linux-s390-low.cc (class s390_target)
947 <low_collect_ptrace_register>
948 <low_supply_ptrace_register>: Declare.
949 (s390_collect_ptrace_register): Turn into ...
950 (s390_target::low_collect_ptrace_register): ...this.
951 (s390_supply_ptrace_register): Turn into ...
952 (s390_target::low_supply_ptrace_register): ...this.
953 (s390_fill_gregset): Update for the calls to
954 low_collect_ptrace_register.
955 (the_low_target): Remove the op fields.
956
957 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
958
959 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
960 target ops into methods of linux_process_target.
961
962 * linux-low.h (struct linux_target_ops): Remove the ops.
963 (class linux_process_target) <check_stopped_by_watchpoint>
964 <low_stopped_by_watchpoint>
965 <low_stopped_data_address>: Declare.
966 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
967 (linux_process_target::check_stopped_by_watchpoint): ...this.
968 (linux_process_target::low_stopped_by_watchpoint): Define.
969 (linux_process_target::low_stopped_data_address): Define.
970 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
971 <low_stopped_data_address>: Declare.
972 (x86_stopped_by_watchpoint): Turn into...
973 (x86_target::low_stopped_by_watchpoint): ...this.
974 (x86_stopped_data_address): Turn into...
975 (x86_target::low_stopped_data_address): ...this.
976 (the_low_target): Remove the op fields.
977 * linux-aarch64-low.cc (class aarch64_target)
978 <low_stopped_by_watchpoint>
979 <low_stopped_data_address>: Declare.
980 (aarch64_stopped_by_watchpoint): Turn into...
981 (aarch64_target::low_stopped_by_watchpoint): ...this.
982 (aarch64_stopped_data_address): Turn into...
983 (aarch64_target::low_stopped_data_address): ...this.
984 (the_low_target): Remove the op fields.
985 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
986 <low_stopped_data_address>: Declare.
987 (arm_stopped_by_watchpoint): Turn into...
988 (arm_target::low_stopped_by_watchpoint): ...this.
989 (arm_stopped_data_address): Turn into...
990 (arm_target::low_stopped_data_address): ...this.
991 (the_low_target): Remove the op fields.
992 * linux-crisv32-low.cc (class crisv32_target)
993 <low_stopped_by_watchpoint>
994 <low_stopped_data_address>: Declare.
995 (cris_stopped_by_watchpoint): Turn into...
996 (crisv32_target::low_stopped_by_watchpoint): ...this.
997 (cris_stopped_data_address): Turn into...
998 (crisv32_target::low_stopped_data_address): ...this.
999 (the_low_target): Remove the op fields.
1000 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1001 <low_stopped_data_address>: Declare.
1002 (mips_stopped_by_watchpoint): Turn into...
1003 (mips_target::low_stopped_by_watchpoint): ...this.
1004 (mips_stopped_data_address): Turn into...
1005 (mips_target::low_stopped_data_address): ...this.
1006 (the_low_target): Remove the op fields.
1007 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1008 * linux-m32r-low.cc (the_low_target): Ditto.
1009 * linux-m68k-low.cc (the_low_target): Ditto.
1010 * linux-ppc-low.cc (the_low_target): Ditto.
1011 * linux-s390-low.cc (the_low_target): Ditto.
1012 * linux-sh-low.cc (the_low_target): Ditto.
1013 * linux-sparc-low.cc (the_low_target): Ditto.
1014 * linux-tic6x-low.cc (the_low_target): Ditto.
1015 * linux-tile-low.cc (the_low_target): Ditto.
1016 * linux-xtensa-low.cc (the_low_target): Ditto.
1017
1018 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1019
1020 Turn the 'insert_point' and 'remove_point' linux target ops into
1021 methods of linux_process_target.
1022
1023 * linux-low.h (struct linux_target_ops): Remove the ops.
1024 (class linux_process_target) <low_insert_point>
1025 <low_remove_point>: Declare.
1026 * linux-low.cc (linux_process_target::low_insert_point)
1027 (linux_process_target::low_remove_point): Define.
1028 (linux_process_target::insert_point)
1029 (linux_process_target::remove_point): Update for calls to
1030 low_insert_point and low_remove_point.
1031 * linux-x86-low.cc (class x86_target) <low_insert_point>
1032 <low_remove_point>: Declare.
1033 (x86_insert_point): Turn into...
1034 (x86_target::low_insert_point): ...this.
1035 (x86_remove_point): Turn into...
1036 (x86_target::low_remove_point): ...this.
1037 (the_low_target): Remove the op fields.
1038 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1039 <low_remove_point>: Declare.
1040 (aarch64_insert_point): Turn into...
1041 (aarch64_target::low_insert_point): ...this.
1042 (aarch64_remove_point): Turn into...
1043 (aarch64_target::low_remove_point): ...this.
1044 (the_low_target): Remove the op fields.
1045 * linux-arm-low.cc (class arm_target) <low_insert_point>
1046 <low_remove_point>: Declare.
1047 (arm_insert_point): Turn into...
1048 (arm_target::low_insert_point): ...this.
1049 (arm_remove_point): Turn into...
1050 (arm_target::low_remove_point): ...this.
1051 (the_low_target): Remove the op fields.
1052 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1053 <low_remove_point>: Declare.
1054 (crisv32_insert_point): Turn into...
1055 (crisv32_target::low_insert_point): ...this.
1056 (crisv32_remove_point): Turn into...
1057 (crisv32_target::low_remove_point): ...this.
1058 (the_low_target): Remove the op fields.
1059 * linux-mips-low.cc (class mips_target) <low_insert_point>
1060 <low_remove_point>: Declare.
1061 (mips_insert_point): Turn into...
1062 (mips_target::low_insert_point): ...this.
1063 (mips_remove_point): Turn into...
1064 (mips_target::low_remove_point): ...this.
1065 (the_low_target): Remove the op fields.
1066 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1067 <low_remove_point>: Declare.
1068 (ppc_insert_point): Turn into...
1069 (ppc_target::low_insert_point): ...this.
1070 (ppc_remove_point): Turn into...
1071 (ppc_target::low_remove_point): ...this.
1072 (the_low_target): Remove the op fields.
1073 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1074 * linux-m32r-low.cc (the_low_target): Ditto.
1075 * linux-m68k-low.cc (the_low_target): Ditto.
1076 * linux-s390-low.cc (the_low_target): Ditto.
1077 * linux-sh-low.cc (the_low_target): Ditto.
1078 * linux-sparc-low.cc (the_low_target): Ditto.
1079 * linux-tic6x-low.cc (the_low_target): Ditto.
1080 * linux-tile-low.cc (the_low_target): Ditto.
1081 * linux-xtensa-low.cc (the_low_target): Ditto.
1082
1083 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1084
1085 Remove the 'supports_z_point_type' linux target op and let the
1086 concrete linux target define it by overriding the op declared in
1087 process_stratum_target.
1088
1089 * linux-low.cc (linux_process_target::supports_z_point_type):
1090 Remove.
1091 * linux-low.h (struct linux_target_ops): Remove the op.
1092 (class linux_process_target) <supports_z_point_type>: Remove.
1093 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1094 Declare.
1095 (x86_supports_z_point_type): Turn into...
1096 (x86_target::supports_z_point_type): ...this.
1097 (the_low_target): Remove the op field.
1098 * linux-aarch64-low.cc (class aarch64_target)
1099 <supports_z_point_type>: Declare.
1100 (aarch64_supports_z_point_type): Turn into...
1101 (aarch64_target::supports_z_point_type): ...this.
1102 (the_low_target): Remove the op field.
1103 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1104 Declare.
1105 (arm_supports_z_point_type): Turn into...
1106 (arm_target::supports_z_point_type): ...this.
1107 (the_low_target): Remove the op field.
1108 * linux-crisv32-low.cc (class crisv32_target)
1109 <supports_z_point_type>: Declare.
1110 (cris_supports_z_point_type): Turn into...
1111 (crisv32_target::supports_z_point_type): ...this.
1112 (the_low_target): Remove the op field.
1113 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1114 Declare.
1115 (mips_supports_z_point_type): Turn into...
1116 (mips_target::supports_z_point_type): ...this.
1117 (the_low_target): Remove the op field.
1118 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1119 Declare.
1120 (ppc_supports_z_point_type): Turn into...
1121 (ppc_target::supports_z_point_type): ...this.
1122 (the_low_target): Remove the op field.
1123 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1124 Declare.
1125 (s390_supports_z_point_type): Turn into...
1126 (s390_target::supports_z_point_type): ...this.
1127 (the_low_target): Remove the op field.
1128 * linux-bfin-low.cc (the_low_target): Remove the op field.
1129 * linux-m32r-low.cc (the_low_target): Ditto.
1130 * linux-m68k-low.cc (the_low_target): Ditto.
1131 * linux-sh-low.cc (the_low_target): Ditto.
1132 * linux-sparc-low.cc (the_low_target): Ditto.
1133 * linux-tic6x-low.cc (the_low_target): Ditto.
1134 * linux-tile-low.cc (the_low_target): Ditto.
1135 * linux-xtensa-low.cc (the_low_target): Ditto.
1136
1137 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1138
1139 Turn the 'breakpoint_at' linux target op into a method of
1140 linux_process_target.
1141
1142 * linux-low.h (struct linux_target_ops): Remove the op.
1143 (class linux_process_target) <low_breakpoint_at>: Declare.
1144
1145 Update the callers below:
1146
1147 * linux-low.cc (linux_process_target::save_stop_reason)
1148 (linux_process_target::thread_still_has_status_pending)
1149 (linux_process_target::wait_1)
1150
1151 * linux-x86-low.cc (class x86_target)
1152 <low_breakpoint_at>: Declare.
1153 (x86_breakpoint_at): Turn into...
1154 (x86_target::low_breakpoint_at): ...this.
1155 (the_low_target): Remove the op field.
1156 * linux-aarch64-low.cc (class aarch64_target)
1157 <low_breakpoint_at>: Declare.
1158 (aarch64_breakpoint_at): Turn into...
1159 (aarch64_target::low_breakpoint_at): ...this.
1160 (the_low_target): Remove the op field.
1161 * linux-arm-low.cc (class arm_target)
1162 <low_breakpoint_at>: Declare.
1163 (arm_target::low_breakpoint_at): Define.
1164 (the_low_target): Remove the op field.
1165 * linux-bfin-low.cc (class bfin_target)
1166 <low_breakpoint_at>: Declare.
1167 (bfin_breakpoint_at): Turn into...
1168 (bfin_target::low_breakpoint_at): ...this.
1169 (the_low_target): Remove the op field.
1170 * linux-cris-low.cc (class cris_target)
1171 <low_breakpoint_at>: Declare.
1172 (cris_breakpoint_at): Turn into...
1173 (cris_target::low_breakpoint_at): ...this.
1174 (the_low_target): Remove the op field.
1175 * linux-crisv32-low.cc (class crisv32_target)
1176 <low_breakpoint_at>: Declare.
1177 (crisv32_breakpoint_at): Turn into...
1178 (crisv32_target::low_breakpoint_at): ...this.
1179 (the_low_target): Remove the op field.
1180 * linux-ia64-low.cc (class ia64_target)
1181 <low_breakpoint_at>: Declare.
1182 (ia64_target::low_breakpoint_at): Define.
1183 * linux-m32r-low.cc (class m32r_target)
1184 <low_breakpoint_at>: Declare.
1185 (m32r_breakpoint_at): Turn into...
1186 (m32r_target::low_breakpoint_at): ...this.
1187 (the_low_target): Remove the op field.
1188 * linux-m68k-low.cc (class m68k_target)
1189 <low_breakpoint_at>: Declare.
1190 (m68k_breakpoint_at): Turn into...
1191 (m68k_target::low_breakpoint_at): ...this.
1192 (the_low_target): Remove the op field.
1193 * linux-mips-low.cc (class mips_target)
1194 <low_breakpoint_at>: Declare.
1195 (mips_breakpoint_at): Turn into...
1196 (mips_target::low_breakpoint_at): ...this.
1197 (the_low_target): Remove the op field.
1198 * linux-nios2-low.cc (class nios2_target)
1199 <low_breakpoint_at>: Declare.
1200 (nios2_breakpoint_at): Turn into...
1201 (nios2_target::low_breakpoint_at): ...this.
1202 (the_low_target): Remove the op field.
1203 * linux-ppc-low.cc (class ppc_target)
1204 <low_breakpoint_at>: Declare.
1205 (ppc_breakpoint_at): Turn into...
1206 (ppc_target::low_breakpoint_at): ...this.
1207 (the_low_target): Remove the op field.
1208 * linux-riscv-low.cc (class riscv_target)
1209 <low_breakpoint_at>: Declare.
1210 (riscv_breakpoint_at): Turn into...
1211 (riscv_target::low_breakpoint_at): ...this.
1212 (the_low_target): Remove the op field.
1213 * linux-s390-low.cc (class s390_target)
1214 <low_breakpoint_at>: Declare.
1215 (s390_breakpoint_at): Turn into...
1216 (s390_target::low_breakpoint_at): ...this.
1217 (the_low_target): Remove the op field.
1218 * linux-sh-low.cc (class sh_target)
1219 <low_breakpoint_at>: Declare.
1220 (sh_breakpoint_at): Turn into...
1221 (sh_target::low_breakpoint_at): ...this.
1222 (the_low_target): Remove the op field.
1223 * linux-sparc-low.cc (class sparc_target)
1224 <low_breakpoint_at>: Declare.
1225 (sparc_breakpoint_at): Turn into...
1226 (sparc_target::low_breakpoint_at): ...this.
1227 (the_low_target): Remove the op field.
1228 * linux-tic6x-low.cc (class tic6x_target)
1229 <low_breakpoint_at>: Declare.
1230 (tic6x_breakpoint_at): Turn into...
1231 (tic6x_target::low_breakpoint_at): ...this.
1232 (the_low_target): Remove the op field.
1233 * linux-tile-low.cc (class tile_target)
1234 <low_breakpoint_at>: Declare.
1235 (tile_breakpoint_at): Turn into...
1236 (tile_target::low_breakpoint_at): ...this.
1237 (the_low_target): Remove the op field.
1238 * linux-xtensa-low.cc (class xtensa_target)
1239 <low_breakpoint_at>: Declare.
1240 (xtensa_breakpoint_at): Turn into...
1241 (xtensa_target::low_breakpoint_at): ...this.
1242 (the_low_target): Remove the op field.
1243
1244 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1245
1246 Turn the 'decr_pc_after_break' linux_target_ops field into
1247 a method of linux_process_target.
1248
1249 * linux-low.h (struct linux_target_ops)
1250 <decr_pc_after_break>: Remove.
1251 (class linux_process_target) <low_decr_pc_after_break>: New method
1252 declaration.
1253 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1254 New method implementation.
1255
1256 Update the users below.
1257
1258 (linux_process_target::save_stop_reason)
1259 (linux_process_target::wait_1)
1260 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1261 New declaration.
1262 (x86_target::low_decr_pc_after_break): New method implementation.
1263 (the_low_target): Remove the field.
1264 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1265 New declaration.
1266 (bfin_target::low_decr_pc_after_break): New method implementation.
1267 (the_low_target): Remove the field.
1268 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1269 New declaration.
1270 (m68k_target::low_decr_pc_after_break): New method implementation.
1271 (the_low_target): Remove the field.
1272 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1273 New declaration.
1274 (s390_target::low_decr_pc_after_break): New method implementation.
1275 (the_low_target): Remove the field.
1276 * linux-aarch64-low.cc (the_low_target): Remove the field.
1277 * linux-arm-low.cc (the_low_target): Remove the field.
1278 * linux-cris-low.cc (the_low_target): Remove the field.
1279 * linux-crisv32-low.cc (the_low_target): Remove the field.
1280 * linux-m32r-low.cc (the_low_target): Remove the field.
1281 * linux-mips-low.cc (the_low_target): Remove the field.
1282 * linux-nios2-low.cc (the_low_target): Remove the field.
1283 * linux-ppc-low.cc (the_low_target): Remove the field.
1284 * linux-riscv-low.cc (the_low_target): Remove the field.
1285 * linux-sh-low.cc (the_low_target): Remove the field.
1286 * linux-sparc-low.cc (the_low_target): Remove the field.
1287 * linux-tic6x-low.cc (the_low_target): Remove the field.
1288 * linux-tile-low.cc (the_low_target): Remove the field.
1289 * linux-xtensa-low.cc (the_low_target): Remove the field.
1290
1291 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1292
1293 Remove the 'supports_software_single_step' linux target op and let
1294 the concrete linux target define it by overriding the op in
1295 process_stratum_target.
1296 Turn the 'get_next_pcs' linux target op into a method of
1297 linux_process_target.
1298
1299 * linux-low.h (struct linux_target_ops): Remove the ops.
1300 (class linux_process_target) <supports_software_single_step>:
1301 Remove.
1302 <low_get_next_pcs>: Declare.
1303 * linux-low.cc (can_software_single_step): Remove.
1304 (linux_process_target::low_get_next_pcs): Define.
1305 (linux_process_target::supports_software_single_step): Remove.
1306
1307 Update the callers below.
1308
1309 (linux_process_target::handle_extended_wait)
1310 (linux_process_target::wait_1)
1311 (linux_process_target::install_software_single_step_breakpoints)
1312 (linux_process_target::single_step)
1313 (linux_process_target::thread_needs_step_over)
1314 (linux_process_target::proceed_one_lwp)
1315 (linux_process_target::supports_range_stepping)
1316
1317 * linux-x86-low.cc (the_low_target): Remove the op field.
1318 * linux-aarch64-low.cc (the_low_target): Ditto.
1319 * linux-bfin-low.cc (the_low_target): Ditto.
1320 * linux-cris-low.cc (the_low_target): Ditto.
1321 * linux-crisv32-low.cc (the_low_target): Ditto.
1322 * linux-m32r-low.cc (the_low_target): Ditto.
1323 * linux-m68k-low.cc (the_low_target): Ditto.
1324 * linux-mips-low.cc (the_low_target): Ditto.
1325 * linux-nios2-low.cc (the_low_target): Ditto.
1326 * linux-ppc-low.cc (the_low_target): Ditto.
1327 * linux-riscv-low.cc (the_low_target): Ditto.
1328 * linux-s390-low.cc (the_low_target): Ditto.
1329 * linux-sh-low.cc (the_low_target): Ditto.
1330 * linux-sparc-low.cc (the_low_target): Ditto.
1331 * linux-tic6x-low.cc (the_low_target): Ditto.
1332 * linux-tile-low.cc (the_low_target): Ditto.
1333 * linux-xtensa-low.cc (the_low_target): Ditto.
1334 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1335 <supports_software_single_step>: Declare.
1336 (arm_target::supports_software_single_step): Define.
1337 (arm_gdbserver_get_next_pcs): Turn into...
1338 (arm_target::low_get_next_pcs): ...this.
1339 (the_low_target): Remove the op field.
1340
1341 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1342
1343 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1344 the concrete linux target define it by overriding the op
1345 in process_stratum_target.
1346
1347 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1348 Remove.
1349 * linux-low.h (struct linux_target_ops): Remove the op.
1350 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1351 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1352 Declare.
1353 (x86_sw_breakpoint_from_kind): Turn into...
1354 (x86_target::sw_breakpoint_from_kind): ...this.
1355 (the_low_target): Remove the op field.
1356 * linux-aarch64-low.cc (class aarch64_target)
1357 <sw_breakpoint_from_kind>: Declare.
1358 (aarch64_sw_breakpoint_from_kind): Turn into...
1359 (aarch64_target::sw_breakpoint_from_kind): ...this.
1360 (the_low_target): Remove the op field.
1361 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1362 Declare.
1363 (arm_target::sw_breakpoint_from_kind): Define.
1364 (the_low_target): Remove the op field.
1365 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1366 Declare.
1367 (bfin_sw_breakpoint_from_kind): Turn into...
1368 (bfin_target::sw_breakpoint_from_kind): ...this.
1369 (the_low_target): Remove the op field.
1370 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1371 Declare.
1372 (cris_sw_breakpoint_from_kind): Turn into...
1373 (cris_target::sw_breakpoint_from_kind): ...this.
1374 (the_low_target): Remove the op field.
1375 * linux-crisv32-low.cc (class crisv32_target)
1376 <sw_breakpoint_from_kind>: Declare.
1377 (cris_sw_breakpoint_from_kind): Turn into...
1378 (crisv32_target::sw_breakpoint_from_kind): ...this.
1379 (the_low_target): Remove the op field.
1380 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1381 Declare.
1382 (ia64_target::sw_breakpoint_from_kind): Define.
1383 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1384 Declare.
1385 (m32r_sw_breakpoint_from_kind): Turn into...
1386 (m32r_target::sw_breakpoint_from_kind): ...this.
1387 (the_low_target): Remove the op field.
1388 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1389 Declare.
1390 (m68k_sw_breakpoint_from_kind): Turn into...
1391 (m68k_target::sw_breakpoint_from_kind): ...this.
1392 (the_low_target): Remove the op field.
1393 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1394 Declare.
1395 (mips_sw_breakpoint_from_kind): Turn into...
1396 (mips_target::sw_breakpoint_from_kind): ...this.
1397 (the_low_target): Remove the op field.
1398 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1399 Declare.
1400 (nios2_sw_breakpoint_from_kind): Turn into...
1401 (nios2_target::sw_breakpoint_from_kind): ...this.
1402 (the_low_target): Remove the op field.
1403 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1404 Declare.
1405 (ppc_sw_breakpoint_from_kind): Turn into...
1406 (ppc_target::sw_breakpoint_from_kind): ...this.
1407 (the_low_target): Remove the op field.
1408 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1409 Declare.
1410 (riscv_sw_breakpoint_from_kind): Turn into...
1411 (riscv_target::sw_breakpoint_from_kind): ...this.
1412 (the_low_target): Remove the op field.
1413 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1414 Declare.
1415 (s390_sw_breakpoint_from_kind): Turn into...
1416 (s390_target::sw_breakpoint_from_kind): ...this.
1417 (the_low_target): Remove the op field.
1418 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1419 Declare.
1420 (sh_sw_breakpoint_from_kind): Turn into...
1421 (sh_target::sw_breakpoint_from_kind): ...this.
1422 (the_low_target): Remove the op field.
1423 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1424 Declare.
1425 (sparc_sw_breakpoint_from_kind): Turn into...
1426 (sparc_target::sw_breakpoint_from_kind): ...this.
1427 (the_low_target): Remove the op field.
1428 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1429 Declare.
1430 (tic6x_sw_breakpoint_from_kind): Turn into...
1431 (tic6x_target::sw_breakpoint_from_kind): ...this.
1432 (the_low_target): Remove the op field.
1433 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1434 Declare.
1435 (tile_sw_breakpoint_from_kind): Turn into...
1436 (tile_target::sw_breakpoint_from_kind): ...this.
1437 (the_low_target): Remove the op field.
1438 * linux-xtensa-low.cc (class xtensa_target)
1439 <sw_breakpoint_from_kind>: Declare.
1440 (xtensa_sw_breakpoint_from_kind): Turn into...
1441 (xtensa_target::sw_breakpoint_from_kind): ...this.
1442 (the_low_target): Remove the op field.
1443
1444 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1445
1446 Remove the 'breakpoint_kind_from_pc' and
1447 'breakpoint_kind_from_current_state' linux target ops, and let the
1448 concrete linux target define them by overriding the ops of
1449 process_stratum_target.
1450
1451 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1452 Remove.
1453 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1454 * linux-low.h (struct linux_target_ops): Remove ops.
1455 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1456 <breakpoint_kind_from_current_state>: Remove.
1457 * linux-x86-low.cc (the_low_target): Remove the op fields.
1458 * linux-bfin-low.cc (the_low_target): Ditto.
1459 * linux-cris-low.cc (the_low_target): Ditto.
1460 * linux-crisv32-low.cc (the_low_target): Ditto.
1461 * linux-m32r-low.cc (the_low_target): Ditto.
1462 * linux-m68k-low.cc (the_low_target): Ditto.
1463 * linux-mips-low.cc (the_low_target): Ditto.
1464 * linux-nios2-low.cc (the_low_target): Ditto.
1465 * linux-ppc-low.cc (the_low_target): Ditto.
1466 * linux-s390-low.cc (the_low_target): Ditto.
1467 * linux-sh-low.cc (the_low_target): Ditto.
1468 * linux-sparc-low.cc (the_low_target): Ditto.
1469 * linux-tic6x-low.cc (the_low_target): Ditto.
1470 * linux-tile-low.cc (the_low_target): Ditto.
1471 * linux-xtensa-low.cc (the_low_target): Ditto.
1472 * linux-aarch64-low.cc (class aarch64_target)
1473 <breakpoint_kind_from_pc>
1474 <breakpoint_kind_from_current_state>: Declare.
1475 (aarch64_breakpoint_kind_from_pc): Turn into...
1476 (aarch64_target::breakpoint_kind_from_pc): ...this.
1477 (aarch64_breakpoint_kind_from_current_state): Turn into...
1478 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1479 (the_low_target): Remove the op fields.
1480 * linux-arm-low.cc (class arm_target):
1481 <breakpoint_kind_from_pc>
1482 <breakpoint_kind_from_current_state>: Declare.
1483 (arm_target::breakpoint_kind_from_pc): Define.
1484 (arm_target::breakpoint_kind_from_current_state): Define.
1485 (the_low_target): Remove the op fields.
1486 * linux-riscv-low.cc (class riscv_target):
1487 <breakpoint_kind_from_pc>: Declare.
1488 (riscv_breakpoint_kind_from_pc): Turn into...
1489 (riscv_target::breakpoint_kind_from_pc): ...this.
1490 (the_low_target): Remove the op fields.
1491
1492 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1493
1494 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1495 of linux_process_target.
1496
1497 * linux-low.h (struct linux_target_ops): Remove the ops.
1498 (class linux_process_target) <low_supports_breakpoints>
1499 <low_get_pc>
1500 <low_set_pc>: Declare.
1501 * linux-low.cc (supports_breakpoints): Turn into...
1502 (linux_process_target::low_supports_breakpoints): ...this.
1503 (linux_process_target::low_get_pc): Define.
1504 (linux_process_target::low_set_pc): Define.
1505
1506 Update the callers below.
1507
1508 (linux_process_target::get_pc)
1509 (linux_process_target::save_stop_reason)
1510 (linux_process_target::maybe_move_out_of_jump_pad)
1511 (linux_process_target::wait_1)
1512 (linux_process_target::resume_one_lwp_throw)
1513 (linux_process_target::resume)
1514 (linux_process_target::proceed_all_lwps)
1515 (linux_process_target::read_pc)
1516 (linux_process_target::write_pc)
1517
1518 * linux-x86-low.cc (class linux_process_target)
1519 <low_supports_breakpoints>
1520 <low_get_pc>
1521 <low_set_pc>: Declare.
1522 (x86_target::low_supports_breakpoints): Define.
1523 (x86_get_pc): Turn into...
1524 (x86_target::low_get_pc): ...this.
1525 (x86_set_pc): Turn into...
1526 (x86_target::low_set_pc): ...this.
1527 (the_low_target): Remove the op fields.
1528 * linux-arm-low.cc (class arm_target)
1529 <low_supports_breakpoints>
1530 <low_get_pc>
1531 <low_set_pc>: Declare.
1532 (arm_target::low_supports_breakpoints)
1533 (arm_target::low_get_pc)
1534 (arm_target::low_set_pc): Define.
1535 (the_low_target): Remove the op fields.
1536 * linux-bfin-low.cc (class bfin_target)
1537 <low_supports_breakpoints>
1538 <low_get_pc>
1539 <low_set_pc>: Declare.
1540 (bfin_target::low_supports_breakpoints)
1541 (bfin_target::low_get_pc)
1542 (bfin_target::low_set_pc): Define.
1543 (the_low_target): Remove the op fields.
1544 * linux-cris-low.cc (class cris_target)
1545 <low_supports_breakpoints>
1546 <low_get_pc>
1547 <low_set_pc>: Declare.
1548 (cris_target::low_supports_breakpoints)
1549 (cris_target::low_get_pc)
1550 (cris_target::low_set_pc): Define.
1551 (the_low_target): Remove the op fields.
1552 * linux-crisv32-low.cc (class crisv32_target)
1553 <low_supports_breakpoints>
1554 <low_get_pc>
1555 <low_set_pc>: Declare.
1556 (crisv32_target::low_supports_breakpoints)
1557 (crisv32_target::low_get_pc)
1558 (crisv32_target::low_set_pc): Define.
1559 (the_low_target): Remove the op fields.
1560 * linux-m32r-low.cc (class m32r_target)
1561 <low_supports_breakpoints>
1562 <low_get_pc>
1563 <low_set_pc>: Declare.
1564 (m32r_target::low_supports_breakpoints)
1565 (m32r_target::low_get_pc)
1566 (m32r_target::low_set_pc): Define.
1567 (the_low_target): Remove the op fields.
1568 * linux-m68k-low.cc (class m68k_target)
1569 <low_supports_breakpoints>
1570 <low_get_pc>
1571 <low_set_pc>: Declare.
1572 (m68k_target::low_supports_breakpoints)
1573 (m68k_target::low_get_pc)
1574 (m68k_target::low_set_pc): Define.
1575 (the_low_target): Remove the op fields.
1576 * linux-nios2-low.cc (class nios2_target)
1577 <low_supports_breakpoints>
1578 <low_get_pc>
1579 <low_set_pc>: Declare.
1580 (nios2_target::low_supports_breakpoints)
1581 (nios2_target::low_get_pc)
1582 (nios2_target::low_set_pc): Define.
1583 (the_low_target): Remove the op fields.
1584 * linux-sh-low.cc (class sh_target)
1585 <low_supports_breakpoints>
1586 <low_get_pc>
1587 <low_set_pc>: Declare.
1588 (sh_target::low_supports_breakpoints)
1589 (sh_target::low_get_pc)
1590 (sh_target::low_set_pc): Define.
1591 (the_low_target): Remove the op fields.
1592 * linux-xtensa-low.cc (class xtensa_target)
1593 <low_supports_breakpoints>
1594 <low_get_pc>
1595 <low_set_pc>: Declare.
1596 (xtensa_target::low_supports_breakpoints)
1597 (xtensa_target::low_get_pc)
1598 (xtensa_target::low_set_pc): Define.
1599 (the_low_target): Remove the op fields.
1600 * linux-sparc-low.cc (class sparc_target)
1601 <low_supports_breakpoints>
1602 <low_get_pc>: Declare.
1603 (sparc_target::low_supports_breakpoints)
1604 (sparc_target::low_get_pc): Define.
1605 (the_low_target): Remove the op fields.
1606 * linux-tile-low.cc (class tile_target)
1607 <low_supports_breakpoints>
1608 <low_get_pc>
1609 <low_set_pc>: Declare.
1610 (tile_target::low_supports_breakpoints)
1611 (tile_target::low_get_pc)
1612 (tile_target::low_set_pc): Define.
1613 (the_low_target): Remove the op fields.
1614 * linux-aarch64-low.cc (class aarch64_target)
1615 <low_supports_breakpoints>
1616 <low_get_pc>
1617 <low_set_pc>: Declare.
1618 (aarch64_target::low_supports_breakpoints): Define.
1619 (aarch64_get_pc): Turn into...
1620 (aarch64_target::low_get_pc): ...this.
1621 (aarch64_set_pc): Turn into...
1622 (aarch64_target::low_set_pc): ...this.
1623 (the_low_target): Remove the op fields.
1624 * linux-mips-low.cc (class mips_target)
1625 <low_supports_breakpoints>
1626 <low_get_pc>
1627 <low_set_pc>: Declare.
1628 (mips_target::low_supports_breakpoints): Define.
1629 (mips_get_pc): Turn into...
1630 (mips_target::low_get_pc): ...this.
1631 (mips_set_pc): Turn into...
1632 (mips_target::low_set_pc): ...this.
1633 (the_low_target): Remove the op fields.
1634 * linux-ppc-low.cc (class ppc_target)
1635 <low_supports_breakpoints>
1636 <low_get_pc>
1637 <low_set_pc>: Declare.
1638 (ppc_target::low_supports_breakpoints): Define.
1639 (ppc_get_pc): Turn into...
1640 (ppc_target::low_get_pc): ...this.
1641 (ppc_set_pc): Turn into...
1642 (ppc_target::low_set_pc): ...this.
1643 (the_low_target): Remove the op fields.
1644 * linux-riscv-low.cc (class riscv_target)
1645 <low_supports_breakpoints>
1646 <low_get_pc>
1647 <low_set_pc>: Declare.
1648 (riscv_target::low_supports_breakpoints): Define.
1649 (riscv_get_pc): Turn into...
1650 (riscv_target::low_get_pc): ...this.
1651 (riscv_set_pc): Turn into...
1652 (riscv_target::low_set_pc): ...this.
1653 (the_low_target): Remove the op fields.
1654 * linux-s390-low.cc (class s390_target)
1655 <low_supports_breakpoints>
1656 <low_get_pc>
1657 <low_set_pc>: Declare.
1658 (s390_target::low_supports_breakpoints): Define.
1659 (s390_get_pc): Turn into...
1660 (s390_target::low_get_pc): ...this.
1661 (s390_set_pc): Turn into...
1662 (s390_target::low_set_pc): ...this.
1663 (the_low_target): Remove the op fields.
1664 * linux-tic6x-low.cc (class tic6x_target)
1665 <low_supports_breakpoints>
1666 <low_get_pc>
1667 <low_set_pc>: Declare.
1668 (tic6x_target::low_supports_breakpoints): Define.
1669 (tic6x_get_pc): Turn into...
1670 (tic6x_target::low_get_pc): ...this.
1671 (tic6x_set_pc): Turn into...
1672 (tic6x_target::low_set_pc): ...this.
1673 (the_low_target): Remove the op fields.
1674
1675 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1676
1677 Turn some more static methods in linux-low into private methods
1678 of linux_process_target.
1679
1680 * linux-low.cc (get_pc): Turn into...
1681 (linux_process_target::get_pc): ...this.
1682 (save_stop_reason): Turn into...
1683 (linux_process_target::save_stop_reason): ...this.
1684 (thread_still_has_status_pending_p): Turn into...
1685 (linux_process_target::thread_still_has_status_pending): ...this.
1686 (status_pending_p_callback): Turn into...
1687 (linux_process_target::status_pending_p_callback): ...this.
1688 (resume_stopped_resumed_lwps): Turn into...
1689 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1690 (install_software_single_step_breakpoints): Turn into...
1691 (linux_process_target::install_software_single_step_breakpoints):
1692 ...this.
1693 (single_step): Turn into...
1694 (linux_process_target::single_step): ...this.
1695 (linux_resume_one_lwp_throw): Turn into...
1696 (linux_process_target::resume_one_lwp_throw): ...this.
1697 (linux_resume_one_lwp): Turn into...
1698 (linux_process_target::resume_one_lwp): ...this.
1699 (resume_status_pending_p): Turn into...
1700 (linux_process_target::resume_status_pending): ...this.
1701 (need_step_over_p): Turn into...
1702 (linux_process_target::thread_needs_step_over): ...this.
1703 (linux_resume_one_thread): Turn into...
1704 (linux_process_target::resume_one_thread): ...this.
1705 (proceed_one_lwp): Turn into...
1706 (linux_process_target::proceed_one_lwp): ...this.
1707 (unsuspend_and_proceed_one_lwp): Turn into...
1708 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1709
1710 Update the calls/references to the above functions below.
1711
1712 (linux_process_target::handle_extended_wait)
1713 (linux_process_target::filter_event)
1714 (linux_process_target::wait_for_event_filtered)
1715 (linux_process_target::wait_1)
1716 (linux_process_target::move_out_of_jump_pad)
1717 (linux_process_target::start_step_over)
1718 (linux_process_target::resume)
1719 (linux_process_target::proceed_all_lwps)
1720 (regsets_store_inferior_registers)
1721 (linux_process_target::store_register)
1722
1723 * linux-low.h (class linux_process_target)
1724 <get_pc>
1725 <save_stop_reason>
1726 <thread_still_has_status_pending>
1727 <status_pending_p_callback>
1728 <resume_stopped_resumed_lwps>
1729 <install_software_single_step_breakpoints>
1730 <single_step>
1731 <resume_one_lwp_throw>
1732 <resume_one_lwp>
1733 <resume_status_pending>
1734 <thread_needs_step_over>
1735 <resume_one_thread>
1736 <proceed_one_lwp>
1737 <unsuspend_and_proceed_one_lwp>: Declare.
1738
1739 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1740
1741 Turn the 'fetch_register' linux target op into a method of
1742 linux_process_target.
1743
1744 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1745 (class linux_process_target) <low_fetch_register>: Declare.
1746 * linux-x86-low.cc (the_low_target)
1747 * linux-aarch64-low.cc (the_low_target)
1748 * linux-arm-low.cc (the_low_target)
1749 * linux-bfin-low.cc (the_low_target)
1750 * linux-cris-low.cc (the_low_target)
1751 * linux-crisv32-low.cc (the_low_target)
1752 * linux-m32r-low.cc (the_low_target)
1753 * linux-m68k-low.cc (the_low_target)
1754 * linux-nios2-low.cc (the_low_target)
1755 * linux-ppc-low.cc (the_low_target)
1756 * linux-s390-low.cc (the_low_target)
1757 * linux-sh-low.cc (the_low_target)
1758 * linux-sparc-low.cc (the_low_target)
1759 * linux-tic6x-low.cc (the_low_target)
1760 * linux-tile-low.cc (the_low_target)
1761 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1762 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1763 Declare.
1764 (ia64_fetch_register): Turn into...
1765 (ia64_target::low_fetch_register): ...this.
1766 (the_low_target): Remove the op field.
1767 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1768 Declare.
1769 (mips_fetch_register): Turn into...
1770 (mips_target::low_fetch_register): ...this.
1771 (the_low_target): Remove the op field.
1772 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1773 Declare.
1774 (riscv_fetch_register): Turn into...
1775 (riscv_target::low_fetch_register): ...this.
1776 (the_low_target): Remove the op field.
1777
1778 Update the callers below.
1779
1780 * linux-low.cc (linux_process_target::fetch_registers)
1781 (linux_process_target::low_fetch_register)
1782
1783 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1784
1785 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1786 linux target ops into methods of linux_process_target.
1787
1788 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1789 (class linux_process_target) <fetch_register>
1790 <store_register>
1791 <usr_fetch_inferior_registers>
1792 <usr_store_inferior_registers>
1793 <low_cannot_fetch_register>
1794 <low_cannot_fetch_register> Declare.
1795 * linux-low.cc (fetch_register): Turn into...
1796 (linux_process_target::fetch_register): ...this.
1797 (store_register): Turn into ...
1798 (linux_process_target::store_register): ...this.
1799 (usr_fetch_inferior_registers): Turn into...
1800 (linux_process_target::usr_fetch_inferior_registers): ...this.
1801 (usr_store_inferior_registers): Turn into...
1802 (linux_process_target::usr_store_inferior_registers): ...this.
1803 * linux-x86-low.cc (class x86_target)
1804 <low_cannot_fetch_register>
1805 <low_cannot_store_register>: Declare.
1806 (x86_cannot_store_register): Turn into...
1807 (x86_target::low_cannot_store_register): ...this.
1808 (x86_cannot_fetch_register): Turn into...
1809 (x86_target::low_cannot_fetch_register): ...this.
1810 (the_low_target): Remove the target op fields.
1811 * linux-aarch64-low.cc (class aarch64_target)
1812 <low_cannot_fetch_register>
1813 <low_cannot_store_register>: Declare.
1814 (aarch64_target::low_cannot_fetch_register)
1815 (aarch64_target::low_cannot_store_register): Define.
1816 (the_low_target): Remove the op fields.
1817 * linux-arm-low.cc (class arm_target)
1818 <low_cannot_fetch_register>
1819 <low_cannot_store_register>: Declare.
1820 (arm_cannot_fetch_register): Turn into...
1821 (arm_target::low_cannot_fetch_register): ...this.
1822 (arm_cannot_store_register): Turn into...
1823 (arm_target::low_cannot_store_register): ...this.
1824 (the_low_target): Remove the op fields.
1825 * linux-bfin-low.cc (class bfin_target)
1826 <low_cannot_fetch_register>
1827 <low_cannot_store_register>: Declare.
1828 (bfin_cannot_fetch_register): Turn into...
1829 (bfin_target::low_cannot_fetch_register): ...this.
1830 (bfin_cannot_store_register): Turn into...
1831 (bfin_target::low_cannot_store_register): ...this.
1832 (the_low_target): Remove the op fields.
1833 * linux-cris-low.cc (class cris_target)
1834 <low_cannot_fetch_register>
1835 <low_cannot_store_register>: Declare.
1836 (cris_cannot_fetch_register): Turn into...
1837 (cris_target::low_cannot_fetch_register): ...this.
1838 (cris_cannot_store_register): Turn into...
1839 (cris_target::low_cannot_store_register): ...this.
1840 (the_low_target): Remove the op fields.
1841 * linux-crisv32-low.cc (class crisv32_target)
1842 <low_cannot_fetch_register>
1843 <low_cannot_store_register>: Declare.
1844 (crisv32_target::low_cannot_fetch_register)
1845 (crisv32_target::low_cannot_store_register): Define.
1846 (the_low_target): Remove the op fields.
1847 * linux-ia64-low.cc (class ia64_target)
1848 <low_cannot_fetch_register>
1849 <low_cannot_store_register>: Declare.
1850 (ia64_cannot_fetch_register): Turn into...
1851 (ia64_target::low_cannot_fetch_register): ...this.
1852 (ia64_cannot_store_register): Turn into...
1853 (ia64_target::low_cannot_store_register): ...this.
1854 (the_low_target): Remove the op fields.
1855 * linux-m32r-low.cc (class m32r_target)
1856 <low_cannot_fetch_register>
1857 <low_cannot_store_register>: Declare.
1858 (m32r_cannot_fetch_register): Turn into...
1859 (m32r_target::low_cannot_fetch_register): ...this.
1860 (m32r_cannot_store_register): Turn into...
1861 (m32r_target::low_cannot_store_register): ...this.
1862 (the_low_target): Remove the op fields.
1863 * linux-m68k-low.cc (class m68k_target)
1864 <low_cannot_fetch_register>
1865 <low_cannot_store_register>: Declare.
1866 (m68k_cannot_fetch_register): Turn into...
1867 (m68k_target::low_cannot_fetch_register): ...this.
1868 (m68k_cannot_store_register): Turn into...
1869 (m68k_target::low_cannot_store_register): ...this.
1870 (the_low_target): Remove the op fields.
1871 * linux-mips-low.cc (class mips_target)
1872 <low_cannot_fetch_register>
1873 <low_cannot_store_register>: Declare.
1874 (mips_cannot_fetch_register): Turn into...
1875 (mips_target::low_cannot_fetch_register): ...this.
1876 (mips_cannot_store_register): Turn into...
1877 (mips_target::low_cannot_store_register): ...this.
1878 (get_usrregs_info): Inline at the call sites in
1879 low_cannot_fetch_register and low_cannot_store_register,
1880 and remove.
1881 (the_low_target): Remove the op fields.
1882 * linux-nios2-low.cc (class nios2_target)
1883 <low_cannot_fetch_register>
1884 <low_cannot_store_register>: Declare.
1885 (nios2_cannot_fetch_register): Turn into...
1886 (nios2_target::low_cannot_fetch_register): ...this.
1887 (nios2_cannot_store_register): Turn into...
1888 (nios2_target::low_cannot_store_register): ...this.
1889 (the_low_target): Remove the op fields.
1890 * linux-ppc-low.cc (class ppc_target)
1891 <low_cannot_fetch_register>
1892 <low_cannot_store_register>: Declare.
1893 (ppc_cannot_fetch_register): Turn into...
1894 (ppc_target::low_cannot_fetch_register): ...this.
1895 (ppc_cannot_store_register): Turn into...
1896 (ppc_target::low_cannot_store_register): ...this.
1897 (the_low_target): Remove the op fields.
1898 * linux-riscv-low.cc (class riscv_target)
1899 <low_cannot_fetch_register>
1900 <low_cannot_store_register>: Declare.
1901 (riscv_target::low_cannot_fetch_register)
1902 (riscv_target::low_cannot_store_register): Define.
1903 (the_low_target): Remove the op fields.
1904 * linux-s390-low.cc (class s390_target)
1905 <low_cannot_fetch_register>
1906 <low_cannot_store_register>: Declare.
1907 (s390_cannot_fetch_register): Turn into...
1908 (s390_target::low_cannot_fetch_register): ...this.
1909 (s390_cannot_store_register): Turn into...
1910 (s390_target::low_cannot_store_register): ...this.
1911 (the_low_target): Remove the op fields.
1912 * linux-sh-low.cc (class sh_target)
1913 <low_cannot_fetch_register>
1914 <low_cannot_store_register>: Declare.
1915 (sh_cannot_fetch_register): Turn into...
1916 (sh_target::low_cannot_fetch_register): ...this.
1917 (sh_cannot_store_register): Turn into...
1918 (sh_target::low_cannot_store_register): ...this.
1919 (the_low_target): Remove the op fields.
1920 * linux-sparc-low.cc (class sparc_target)
1921 <low_cannot_fetch_register>
1922 <low_cannot_store_register>: Declare.
1923 (sparc_cannot_fetch_register): Turn into...
1924 (sparc_target::low_cannot_fetch_register): ...this.
1925 (sparc_cannot_store_register): Turn into...
1926 (sparc_target::low_cannot_store_register): ...this.
1927 (the_low_target): Remove the op fields.
1928 * linux-tic6x-low.cc (class tic6x_target)
1929 <low_cannot_fetch_register>
1930 <low_cannot_store_register>: Declare.
1931 (tic6x_cannot_fetch_register): Turn into...
1932 (tic6x_target::low_cannot_fetch_register): ...this.
1933 (tic6x_cannot_store_register): Turn into...
1934 (tic6x_target::low_cannot_store_register): ...this.
1935 (the_low_target): Remove the op fields.
1936 * linux-tile-low.cc (class tile_target)
1937 <low_cannot_fetch_register>
1938 <low_cannot_store_register>: Declare.
1939 (tile_cannot_fetch_register): Turn into...
1940 (tile_target::low_cannot_fetch_register): ...this.
1941 (tile_cannot_store_register): Turn into...
1942 (tile_target::low_cannot_store_register): ...this.
1943 (the_low_target): Remove the op fields.
1944 * linux-xtensa-low.cc (class xtensa_target)
1945 <low_cannot_fetch_register>
1946 <low_cannot_store_register>: Declare.
1947 (xtensa_target::low_cannot_fetch_register)
1948 (xtensa_target::low_cannot_store_register): Define.
1949 (the_low_target): Remove the op fields.
1950
1951 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1952
1953 Turn the 'regs_info' linux target op into a method of
1954 linux_process_target.
1955
1956 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1957 (class linux_process_target) <get_regs_info>: Define.
1958
1959 Update the callers below.
1960
1961 * linux-low.cc (linux_process_target::fetch_registers)
1962 (linux_process_target::store_registers)
1963 * proc-service.cc (gregset_info)
1964
1965 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1966 (x86_linux_regs_info): Turn into ...
1967 (x86_target::get_regs_info): ...this.
1968 (the_low_target): Remove the op field.
1969 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1970 Declare.
1971 (aarch64_regs_info): Turn into ...
1972 (aarch64_target::get_regs_info): ...this.
1973 (the_low_target): Remove the op field.
1974 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1975 (arm_regs_info): Turn into ...
1976 (arm_target::get_regs_info): ...this.
1977 (the_low_target): Remove the op field.
1978 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1979 (bfin_regs_info): Turn into ...
1980 (bfin_target::get_regs_info): ...this.
1981 (the_low_target): Remove the op field.
1982 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1983 (cris_regs_info): Turn into ...
1984 (cris_target::get_regs_info): ...this.
1985 (the_low_target): Remove the op field.
1986 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1987 Declare.
1988 (crisv32_regs_info): Turn into ...
1989 (crisv32_target::get_regs_info): ...this.
1990 (the_low_target): Remove the op field.
1991 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1992 (ia64_regs_info): Turn into ...
1993 (ia64_target::get_regs_info): ...this.
1994 (the_low_target): Remove the op field.
1995 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1996 (m32r_regs_info): Turn into ...
1997 (m32r_target::get_regs_info): ...this.
1998 (the_low_target): Remove the op field.
1999 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2000 (m68k_regs_info): Turn into ...
2001 (m68k_target::get_regs_info): ...this.
2002 (the_low_target): Remove the op field.
2003 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2004 (mips_regs_info): Turn into ...
2005 (mips_target::get_regs_info): ...this.
2006 (the_low_target): Remove the op field.
2007 (get_usrregs_info): Update the call to the op.
2008 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2009 (nios2_regs_info): Turn into ...
2010 (nios2_target::get_regs_info): ...this.
2011 (the_low_target): Remove the op field.
2012 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2013 (ppc_regs_info): Turn into ...
2014 (ppc_target::get_regs_info): ...this.
2015 (the_low_target): Remove the op field.
2016 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2017 (riscv_regs_info): Turn into ...
2018 (riscv_target::get_regs_info): ...this.
2019 (the_low_target): Remove the op field.
2020 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2021 (s390_regs_info): Turn into ...
2022 (s390_target::get_regs_info): ...this.
2023 (the_low_target): Remove the op field.
2024 (s390_collect_ptrace_register)
2025 (s390_supply_ptrace_register)
2026 (s390_fill_gregset): Update the call to the op.
2027 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2028 (sh_regs_info): Turn into ...
2029 (sh_target::get_regs_info): ...this.
2030 (the_low_target): Remove the op field.
2031 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2032 (sparc_regs_info): Turn into ...
2033 (sparc_target::get_regs_info): ...this.
2034 (the_low_target): Remove the op field.
2035 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2036 (tic6x_regs_info): Turn into ...
2037 (tic6x_target::get_regs_info): ...this.
2038 (the_low_target): Remove the op field.
2039 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2040 (tile_regs_info): Turn into ...
2041 (tile_target::get_regs_info): ...this.
2042 (the_low_target): Remove the op field.
2043 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2044 Declare.
2045 (xtensa_regs_info): Turn into ...
2046 (xtensa_target::get_regs_info): ...this.
2047 (the_low_target): Remove the op field.
2048
2049 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2050
2051 Turn the 'arch_setup' linux target op into a method of
2052 linux_process_target.
2053
2054 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2055 (class linux_process_target) <arch_setup_thread>
2056 <low_arch_setup>: New declarations.
2057 * linux-low.cc (linux_arch_setup): Delete.
2058 (linux_arch_setup_thread): Turn into...
2059 (linux_process_target::arch_setup_thread): ... this.
2060
2061 Update the callers below.
2062
2063 (linux_process_target::handle_extended_wait)
2064 (linux_process_target::post_create_inferior)
2065 (linux_process_target::filter_event)
2066
2067 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2068 declaration.
2069 (x86_linux_update_xmltarget): Turn into...
2070 (x86_target::update_xmltarget): ...this.
2071 (x86_linux_process_qsupported): Update the call to
2072 x86_linux_update_xmltarget.
2073 (x86_arch_setup): Turn into ...
2074 (x86_target::low_arch_setup): ...this.
2075 (the_low_target): Remove the op field.
2076 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2077 declaration.
2078 (aarch64_arch_setup): Turn into ...
2079 (aarch64_target::low_arch_setup): ...this.
2080 (the_low_target): Remove the op field.
2081 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2082 declaration.
2083 (arm_arch_setup): Turn into ...
2084 (arm_target::low_arch_setup): ...this.
2085 (the_low_target): Remove the op field.
2086 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2087 declaration.
2088 (bfin_arch_setup): Turn into ...
2089 (bfin_target::low_arch_setup): ...this.
2090 (the_low_target): Remove the op field.
2091 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2092 declaration.
2093 (cris_arch_setup): Turn into ...
2094 (cris_target::low_arch_setup): ...this.
2095 (the_low_target): Remove the op field.
2096 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2097 declaration.
2098 (crisv32_arch_setup): Turn into ...
2099 (crisv32_target::low_arch_setup): ...this.
2100 (the_low_target): Remove the op field.
2101 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2102 declaration.
2103 (ia64_arch_setup): Turn into ...
2104 (ia64_target::low_arch_setup): ...this.
2105 (the_low_target): Remove the op field.
2106 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2107 declaration.
2108 (m32r_arch_setup): Turn into ...
2109 (m32r_target::low_arch_setup): ...this.
2110 (the_low_target): Remove the op field.
2111 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2112 declaration.
2113 (m68k_arch_setup): Turn into ...
2114 (m68k_target::low_arch_setup): ...this.
2115 (the_low_target): Remove the op field.
2116 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2117 declaration.
2118 (mips_arch_setup): Turn into ...
2119 (mips_target::low_arch_setup): ...this.
2120 (the_low_target): Remove the op field.
2121 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2122 declaration.
2123 (nios2_arch_setup): Turn into ...
2124 (nios2_target::low_arch_setup): ...this.
2125 (the_low_target): Remove the op field.
2126 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2127 declaration.
2128 (ppc_arch_setup): Turn into ...
2129 (ppc_target::low_arch_setup): ...this.
2130 (the_low_target): Remove the op field.
2131 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2132 declaration.
2133 (riscv_arch_setup): Turn into ...
2134 (riscv_target::low_arch_setup): ...this.
2135 (the_low_target): Remove the op field.
2136 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2137 declaration.
2138 (s390_arch_setup): Turn into ...
2139 (s390_target::low_arch_setup): ...this.
2140 (the_low_target): Remove the op field.
2141 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2142 declaration.
2143 (sh_arch_setup): Turn into ...
2144 (sh_target::low_arch_setup): ...this.
2145 (the_low_target): Remove the op field.
2146 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2147 declaration.
2148 (sparc_arch_setup): Turn into ...
2149 (sparc_target::low_arch_setup): ...this.
2150 (the_low_target): Remove the op field.
2151 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2152 declaration.
2153 (tic6x_arch_setup): Turn into ...
2154 (tic6x_target::low_arch_setup): ...this.
2155 (the_low_target): Remove the op field.
2156 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2157 declaration.
2158 (tile_arch_setup): Turn into ...
2159 (tile_target::low_arch_setup): ...this.
2160 (the_low_target): Remove the op field.
2161 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2162 declaration.
2163 (xtensa_arch_setup): Turn into ...
2164 (xtensa_target::low_arch_setup): ...this.
2165 (the_low_target): Remove the op field.
2166
2167 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2168
2169 * linux-low.h (the_linux_target): New extern declaration.
2170 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2171 'the_target'.
2172 (the_linux_target): Remove.
2173 * linux-x86-low.cc (class x86_target): New class.
2174 (the_x86_target): New static object.
2175 (the_linux_target): Define as pointer to the_x86_target.
2176 * linux-aarch64-low.cc (class aarch64_target): New class.
2177 (the_aarch64_target): New static object.
2178 (the_linux_target): Define as pointer to the_aarch64_target.
2179 * linux-arm-low.cc (class arm_target): New class.
2180 (the_arm_target): New static object.
2181 (the_linux_target): Define as pointer to the_arm_target.
2182 * linux-bfin-low.cc (class bfin_target): New class.
2183 (the_bfin_target): New static object.
2184 (the_linux_target): Define as pointer to the_bfin_target.
2185 * linux-cris-low.cc (class cris_target): New class.
2186 (the_cris_target): New static object.
2187 (the_linux_target): Define as pointer to the_cris_target.
2188 * linux-crisv32-low.cc (class crisv32_target): New class.
2189 (the_crisv32_target): New static object.
2190 (the_linux_target): Define as pointer to the_crisv32_target.
2191 * linux-ia64-low.cc (class ia64_target): New class.
2192 (the_ia64_target): New static object.
2193 (the_linux_target): Define as pointer to the_ia64_target.
2194 * linux-m32r-low.cc (class m32r_target): New class.
2195 (the_m32r_target): New static object.
2196 (the_linux_target): Define as pointer to the_m32r_target.
2197 * linux-m68k-low.cc (class m68k_target): New class.
2198 (the_m68k_target): New static object.
2199 (the_linux_target): Define as pointer to the_m68k_target.
2200 * linux-mips-low.cc (class mips_target): New class.
2201 (the_mips_target): New static object.
2202 (the_linux_target): Define as pointer to the_mips_target.
2203 * linux-nios2-low.cc (class nios2_target): New class.
2204 (the_nios2_target): New static object.
2205 (the_linux_target): Define as pointer to the_nios2_target.
2206 * linux-ppc-low.cc (class ppc_target): New class.
2207 (the_ppc_target): New static object.
2208 (the_linux_target): Define as pointer to the_ppc_target.
2209 * linux-riscv-low.cc (class riscv_target): New class.
2210 (the_riscv_target): New static object.
2211 (the_linux_target): Define as pointer to the_riscv_target.
2212 * linux-s390-low.cc (class s390_target): New class.
2213 (the_s390_target): New static object.
2214 (the_linux_target): Define as pointer to the_s390_target.
2215 * linux-sh-low.cc (class sh_target): New class.
2216 (the_sh_target): New static object.
2217 (the_linux_target): Define as pointer to the_sh_target.
2218 * linux-sparc-low.cc (class sparc_target): New class.
2219 (the_sparc_target): New static object.
2220 (the_linux_target): Define as pointer to the_sparc_target.
2221 * linux-tic6x-low.cc (class tic6x_target): New class.
2222 (the_tic6x_target): New static object.
2223 (the_linux_target): Define as pointer to the_tic6x_target.
2224 * linux-tile-low.cc (class tile_target): New class.
2225 (the_tile_target): New static object.
2226 (the_linux_target): Define as pointer to the_tile_target.
2227 * linux-xtensa-low.cc (class xtensa_target): New class.
2228 (the_xtensa_target): New static object.
2229 (the_linux_target): Define as pointer to the_xtensa_target.
2230
2231 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2232
2233 Turn some static functions in linux-low.cc into private methods of
2234 linux_process_target.
2235
2236 * linux-low.cc (handle_extended_wait): Turn into ...
2237 (linux_process_target::handle_extended_wait): ...this. Call
2238 'mourn' on 'this' object instead of 'the_target'.
2239 (maybe_move_out_of_jump_pad): Turn into...
2240 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2241 (linux_low_filter_event): Turn into...
2242 (linux_process_target::filter_event): ...this.
2243 (linux_wait_for_event_filtered): Turn into...
2244 (linux_process_target::wait_for_event_filtered): ...this.
2245 (linux_wait_for_event): Turn into...
2246 (linux_process_target::wait_for_event): ...this.
2247 (linux_wait_1): Turn into...
2248 (linux_process_target::wait_1): ...this.
2249 (wait_for_sigstop): Turn into...
2250 (linux_process_target::wait_for_sigstop): ...this.
2251 (move_out_of_jump_pad_callback): Turn into...
2252 (linux_process_target::move_out_of_jump_pad): ...this.
2253 (stop_all_lwps): Turn into...
2254 (linux_process_target::stop_all_lwps): ...this.
2255 (start_step_over): Turn into...
2256 (linux_process_target::start_step_over): ...this.
2257 (complete_ongoing_step_over): Turn into...
2258 (linux_process_target::complete_ongoing_step_over): ...this.
2259 (proceed_all_lwps): Turn into...
2260 (linux_process_target::proceed_all_lwps): ...this.
2261 (unstop_all_lwps): Turn into...
2262 (linux_process_target::unstop_all_lwps): ...this.
2263
2264 * linux-low.h (class linux_process_target)
2265 <handle_extended_wait>
2266 <maybe_move_out_of_jump_pad>
2267 filter_event>
2268 <wait_for_event_filtered>
2269 <wait_for_event>
2270 <wait_1>
2271 <wait_for_sigstop>
2272 <move_out_of_jump_pad>
2273 <stop_all_lwps>
2274 <start_step_over>
2275 <complete_ongoing_step_over>
2276 <proceed_all_lwps>
2277 <unstop_all_lwps>: Declare.
2278
2279 Update the callers below.
2280
2281 * linux-low.cc (linux_process_target::attach): Update.
2282 (linux_process_target::stabilize_threads): Ditto.
2283 (linux_process_target::wait): Ditto.
2284
2285 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2286
2287 * linux-low.h (struct linux_target_ops): Update the comment for
2288 'cannot_store_register' to return 0 or 1.
2289 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2290 of 2.
2291
2292 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2293
2294 * config.in: Re-generate.
2295 * configure: Re-generate.
2296
2297 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2298
2299 * regcache.cc (find_register_by_number): Update.
2300 * tdesc.cc (init_target_desc): Likewise.
2301 * tdesc.h (target_desc::reg_defs): Likewise.
2302
2303 2020-03-12 Tom Tromey <tom@tromey.com>
2304
2305 * configure: Rebuild.
2306 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2307 (WIN32APILIBS): New subst.
2308 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2309 gdbsupport files.
2310 (gdbsupport/%.o): Remove target.
2311 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2312 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2313 (WIN32APILIBS): New variable.
2314 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2315 (gdbreplay$(EXEEXT)): Likewise.
2316
2317 2020-03-12 Tom Tromey <tom@tromey.com>
2318
2319 * config.in, configure: Rebuild.
2320 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2321 * acinclude.m4: Include gettext-sister.m4.
2322 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2323 variables.
2324 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2325 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2326
2327 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2328
2329 * acinclude.m4: Update path to selftest.m4.
2330
2331 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2332
2333 * configure.ac: Don't source bfd/development.sh, move
2334 GDB_AC_COMMON higher.
2335 * configure: Re-generate.
2336
2337 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2338
2339 * configure: Re-generate.
2340
2341 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2342
2343 * configure: Re-generate.
2344
2345 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2346
2347 * .dir-locals.el: New file.
2348
2349 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2350
2351 * .gitattributes: New file.
2352
2353 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2354
2355 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2356 reply into an S reply.
2357 * server.cc (disable_packet_T): New global.
2358 (captured_main): Set new global when appropriate.
2359 * server.h (disable_packet_T): Declare.
2360
2361 2020-02-21 Tom Tromey <tom@tromey.com>
2362
2363 * Makefile.in (mostlyclean): New target.
2364
2365 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2366
2367 * target.h (struct process_stratum_target): Remove.
2368 (class process_target): Rename to ...
2369 (class process_stratum_target): ... this.
2370 * linux-low.h (class linux_process_target): Derive from
2371 'process_stratum_target'.
2372 * linux-low.cc (linux_target_ops): Remove.
2373 (initialize_low): Set the_target to the singleton instance of
2374 linux_process_target.
2375 * lynx-low.h (class lynx_process_target): Derive from
2376 'process_stratum_target'.
2377 * lynx-low.cc (lynx_target_ops): Remove.
2378 (initialize_low): Set the_target to the singleton instance of
2379 lynx_process_target.
2380 * nto-low.h (class nto_process_target): Derive from
2381 'process_stratum_target'.
2382 * nto-low.cc (nto_target_ops): Remove.
2383 (initialize_low): Set the_target to the singleton instance of
2384 nto_process_target.
2385 * win32-low.h (class win32_process_target): Derive from
2386 'process_stratum_target'.
2387 * win32-low.cc (win32_target_ops): Remove.
2388 (initialize_low): Set the_target to the singleton instance of
2389 win32_process_target.
2390
2391 Replace 'the_target->pt' with 'the_target' in the uses below.
2392
2393 * hostio.cc (hostio_error)
2394 (handle_setfs)
2395 (handle_open)
2396 (handle_unlink)
2397 (handle_readlink)
2398 * linux-aarch32-low.cc (arm_breakpoint_at)
2399 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2400 * linux-arm-low.cc (arm_sigreturn_next_pc)
2401 (arm_get_hwcap)
2402 (arm_get_syscall_trapinfo)
2403 * linux-cris-low.cc (cris_breakpoint_at)
2404 * linux-crisv32-low.cc (cris_breakpoint_at)
2405 * linux-low.cc (handle_extended_wait)
2406 (linux_wait_1)
2407 (linux_read_memory)
2408 (linux_process_target::breakpoint_kind_from_pc)
2409 (linux_get_auxv)
2410 * linux-m32r-low.cc (m32r_breakpoint_at)
2411 * linux-mips-low.cc (mips_breakpoint_at)
2412 * linux-nios2-low.cc (nios2_breakpoint_at)
2413 * linux-ppc-low.cc (ppc_breakpoint_at)
2414 * linux-s390-low.cc (s390_get_hwcap)
2415 * linux-sh-low.cc (sh_breakpoint_at)
2416 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2417 (sparc_store_gregset_from_stack)
2418 (sparc_breakpoint_at)
2419 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2420 * linux-tile-low.cc (tile_breakpoint_at)
2421 * linux-x86-low.cc (x86_breakpoint_at)
2422 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2423 * mem-break.cc (bp_size)
2424 (bp_opcode)
2425 (insert_memory_breakpoint)
2426 (set_raw_breakpoint_at)
2427 (delete_raw_breakpoint)
2428 (z_type_supported)
2429 (uninsert_raw_breakpoint)
2430 (reinsert_raw_breakpoint)
2431 (validate_inserted_breakpoint)
2432 * regcache.cc (regcache_read_pc)
2433 (regcache_write_pc)
2434 * remote-utils.cc (putpkt_binary_1)
2435 (input_interrupt)
2436 (getpkt)
2437 (prepare_resume_reply)
2438 * server.cc (handle_general_set)
2439 (handle_detach)
2440 (handle_qxfer_auxv)
2441 (handle_qxfer_exec_file)
2442 (handle_qxfer_libraries_svr4)
2443 (handle_qxfer_osdata)
2444 (handle_qxfer_siginfo)
2445 (handle_qxfer_fdpic)
2446 (handle_query)
2447 (resume)
2448 (handle_v_requests)
2449 (queue_stop_reply_callback)
2450 (captured_main)
2451 * target.cc (prepare_to_access_memory)
2452 (done_accessing_memory)
2453 (read_inferior_memory)
2454 (target_write_memory)
2455 (target_stop_and_wait)
2456 (target_wait)
2457 (target_mourn_inferior)
2458 (target_continue_no_signal)
2459 (target_continue)
2460 (target_supports_multi_process)
2461 (kill_inferior)
2462 * target.h
2463 (target_create_inferior)
2464 (target_post_create_inferior)
2465 (myattach)
2466 (target_supports_fork_events)
2467 (target_supports_vfork_events)
2468 (target_supports_exec_events)
2469 (target_handle_new_gdb_connection)
2470 (detach_inferior)
2471 (mythread_alive)
2472 (fetch_inferior_registers)
2473 (store_inferior_registers)
2474 (join_inferior)
2475 (target_supports_non_stop)
2476 (target_async)
2477 (target_process_qsupported)
2478 (target_supports_catch_syscall)
2479 (target_get_ipa_tdesc_idx)
2480 (target_supports_tracepoints)
2481 (target_supports_fast_tracepoints)
2482 (target_get_min_fast_tracepoint_insn_len)
2483 (target_thread_stopped)
2484 (target_pause_all)
2485 (target_unpause_all)
2486 (target_stabilize_threads)
2487 (target_install_fast_tracepoint_jump_pad)
2488 (target_emit_ops)
2489 (target_supports_disable_randomization)
2490 (target_supports_agent)
2491 (target_enable_btrace)
2492 (target_disable_btrace)
2493 (target_read_btrace)
2494 (target_read_btrace_conf)
2495 (target_supports_range_stepping)
2496 (target_supports_stopped_by_sw_breakpoint)
2497 (target_stopped_by_sw_breakpoint)
2498 (target_supports_stopped_by_hw_breakpoint)
2499 (target_supports_hardware_single_step)
2500 (target_stopped_by_hw_breakpoint)
2501 (target_breakpoint_kind_from_pc)
2502 (target_breakpoint_kind_from_current_state)
2503 (target_supports_software_single_step)
2504 (target_core_of_thread)
2505 (target_thread_name)
2506 (target_thread_handle)
2507 * win32-low.cc (do_initial_child_stuff)
2508
2509 Rename target op default definitions listed below.
2510
2511 * target.cc (process_target::post_create_inferior): Rename as ...
2512 (process_stratum_target::post_create_inferior): ... this.
2513 (process_target::prepare_to_access_memory): Rename as ...
2514 (process_stratum_target::prepare_to_access_memory): ... this.
2515 (process_target::done_accessing_memory): Rename as ...
2516 (process_stratum_target::done_accessing_memory): ... this.
2517 (process_target::look_up_symbols): Rename as ...
2518 (process_stratum_target::look_up_symbols): ... this.
2519 (process_target::supports_read_auxv): Rename as ...
2520 (process_stratum_target::supports_read_auxv): ... this.
2521 (process_target::read_auxv): Rename as ...
2522 (process_stratum_target::read_auxv): ... this.
2523 (process_target::supports_z_point_type): Rename as ...
2524 (process_stratum_target::supports_z_point_type): ... this.
2525 (process_target::insert_point): Rename as ...
2526 (process_stratum_target::insert_point): ... this.
2527 (process_target::remove_point): Rename as ...
2528 (process_stratum_target::remove_point): ... this.
2529 (process_target::stopped_by_sw_breakpoint): Rename as ...
2530 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2531 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2532 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2533 (process_target::stopped_by_hw_breakpoint): Rename as ...
2534 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2535 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2536 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2537 (process_target::supports_hardware_single_step): Rename as ...
2538 (process_stratum_target::supports_hardware_single_step): ... this.
2539 (process_target::stopped_by_watchpoint): Rename as ...
2540 (process_stratum_target::stopped_by_watchpoint): ... this.
2541 (process_target::stopped_data_address): Rename as ...
2542 (process_stratum_target::stopped_data_address): ... this.
2543 (process_target::supports_read_offsets): Rename as ...
2544 (process_stratum_target::supports_read_offsets): ... this.
2545 (process_target::read_offsets): Rename as ...
2546 (process_stratum_target::read_offsets): ... this.
2547 (process_target::supports_get_tls_address): Rename as ...
2548 (process_stratum_target::supports_get_tls_address): ... this.
2549 (process_target::get_tls_address): Rename as ...
2550 (process_stratum_target::get_tls_address): ... this.
2551 (process_target::hostio_last_error): Rename as ...
2552 (process_stratum_target::hostio_last_error): ... this.
2553 (process_target::supports_qxfer_osdata): Rename as ...
2554 (process_stratum_target::supports_qxfer_osdata): ... this.
2555 (process_target::qxfer_osdata): Rename as ...
2556 (process_stratum_target::qxfer_osdata): ... this.
2557 (process_target::supports_qxfer_siginfo): Rename as ...
2558 (process_stratum_target::supports_qxfer_siginfo): ... this.
2559 (process_target::qxfer_siginfo): Rename as ...
2560 (process_stratum_target::qxfer_siginfo): ... this.
2561 (process_target::supports_non_stop): Rename as ...
2562 (process_stratum_target::supports_non_stop): ... this.
2563 (process_target::async): Rename as ...
2564 (process_stratum_target::async): ... this.
2565 (process_target::start_non_stop): Rename as ...
2566 (process_stratum_target::start_non_stop): ... this.
2567 (process_target::supports_multi_process): Rename as ...
2568 (process_stratum_target::supports_multi_process): ... this.
2569 (process_target::supports_fork_events): Rename as ...
2570 (process_stratum_target::supports_fork_events): ... this.
2571 (process_target::supports_vfork_events): Rename as ...
2572 (process_stratum_target::supports_vfork_events): ... this.
2573 (process_target::supports_exec_events): Rename as ...
2574 (process_stratum_target::supports_exec_events): ... this.
2575 (process_target::handle_new_gdb_connection): Rename as ...
2576 (process_stratum_target::handle_new_gdb_connection): ... this.
2577 (process_target::handle_monitor_command): Rename as ...
2578 (process_stratum_target::handle_monitor_command): ... this.
2579 (process_target::core_of_thread): Rename as ...
2580 (process_stratum_target::core_of_thread): ... this.
2581 (process_target::supports_read_loadmap): Rename as ...
2582 (process_stratum_target::supports_read_loadmap): ... this.
2583 (process_target::read_loadmap): Rename as ...
2584 (process_stratum_target::read_loadmap): ... this.
2585 (process_target::process_qsupported): Rename as ...
2586 (process_stratum_target::process_qsupported): ... this.
2587 (process_target::supports_tracepoints): Rename as ...
2588 (process_stratum_target::supports_tracepoints): ... this.
2589 (process_target::read_pc): Rename as ...
2590 (process_stratum_target::read_pc): ... this.
2591 (process_target::write_pc): Rename as ...
2592 (process_stratum_target::write_pc): ... this.
2593 (process_target::supports_thread_stopped): Rename as ...
2594 (process_stratum_target::supports_thread_stopped): ... this.
2595 (process_target::thread_stopped): Rename as ...
2596 (process_stratum_target::thread_stopped): ... this.
2597 (process_target::supports_get_tib_address): Rename as ...
2598 (process_stratum_target::supports_get_tib_address): ... this.
2599 (process_target::get_tib_address): Rename as ...
2600 (process_stratum_target::get_tib_address): ... this.
2601 (process_target::pause_all): Rename as ...
2602 (process_stratum_target::pause_all): ... this.
2603 (process_target::unpause_all): Rename as ...
2604 (process_stratum_target::unpause_all): ... this.
2605 (process_target::stabilize_threads): Rename as ...
2606 (process_stratum_target::stabilize_threads): ... this.
2607 (process_target::supports_fast_tracepoints): Rename as ...
2608 (process_stratum_target::supports_fast_tracepoints): ... this.
2609 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2610 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2611 (process_target::emit_ops): Rename as ...
2612 (process_stratum_target::emit_ops): ... this.
2613 (process_target::supports_disable_randomization): Rename as ...
2614 (process_stratum_target::supports_disable_randomization): ... this.
2615 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2616 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2617 (process_target::qxfer_libraries_svr4): Rename as ...
2618 (process_stratum_target::qxfer_libraries_svr4): ... this.
2619 (process_target::supports_agent): Rename as ...
2620 (process_stratum_target::supports_agent): ... this.
2621 (process_target::enable_btrace): Rename as ...
2622 (process_stratum_target::enable_btrace): ... this.
2623 (process_target::disable_btrace): Rename as ...
2624 (process_stratum_target::disable_btrace): ... this.
2625 (process_target::read_btrace): Rename as ...
2626 (process_stratum_target::read_btrace): ... this.
2627 (process_target::read_btrace_conf): Rename as ...
2628 (process_stratum_target::read_btrace_conf): ... this.
2629 (process_target::supports_range_stepping): Rename as ...
2630 (process_stratum_target::supports_range_stepping): ... this.
2631 (process_target::supports_pid_to_exec_file): Rename as ...
2632 (process_stratum_target::supports_pid_to_exec_file): ... this.
2633 (process_target::pid_to_exec_file): Rename as ...
2634 (process_stratum_target::pid_to_exec_file): ... this.
2635 (process_target::supports_multifs): Rename as ...
2636 (process_stratum_target::supports_multifs): ... this.
2637 (process_target::multifs_open): Rename as ...
2638 (process_stratum_target::multifs_open): ... this.
2639 (process_target::multifs_unlink): Rename as ...
2640 (process_stratum_target::multifs_unlink): ... this.
2641 (process_target::multifs_readlink): Rename as ...
2642 (process_stratum_target::multifs_readlink): ... this.
2643 (process_target::breakpoint_kind_from_pc): Rename as ...
2644 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2645 (process_target::breakpoint_kind_from_current_state): Rename as ...
2646 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2647 (process_target::thread_name): Rename as ...
2648 (process_stratum_target::thread_name): ... this.
2649 (process_target::thread_handle): Rename as ...
2650 (process_stratum_target::thread_handle): ... this.
2651 (process_target::supports_software_single_step): Rename as ...
2652 (process_stratum_target::supports_software_single_step): ... this.
2653 (process_target::supports_catch_syscall): Rename as ...
2654 (process_stratum_target::supports_catch_syscall): ... this.
2655 (process_target::get_ipa_tdesc_idx): Rename as ...
2656 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2657
2658 2020-02-20 Pedro Alves <palves@redhat.com>
2659
2660 * target.cc (set_target_ops): Simply copy the given target pointer
2661 instead of creating a copy of the pointed object.
2662
2663 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2664
2665 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2666 of process_target.
2667
2668 * target.h (struct process_stratum_target): Remove the target op.
2669 (class process_target): Add the target op.
2670 (target_get_ipa_tdesc_idx): Update the macro.
2671 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2672
2673 Update the derived classes and callers below.
2674
2675 * linux-low.cc (linux_target_ops): Update.
2676 (linux_get_ipa_tdesc_idx): Turn into ...
2677 (linux_process_target::get_ipa_tdesc_idx): ... this.
2678 * linux-low.h (class linux_process_target): Update.
2679 * lynx-low.cc (lynx_target_ops): Update.
2680 * nto-low.cc (nto_target_ops): Update.
2681 * win32-low.cc (win32_target_ops): Update.
2682
2683 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2684
2685 Turn process_stratum_target's supports_catch_syscall op into a
2686 method of process_target.
2687
2688 * target.h (struct process_stratum_target): Remove the target op.
2689 (class process_target): Add the target op.
2690 (target_supports_catch_syscall): Update the macro.
2691 * target.cc (process_target::supports_catch_syscall): Define.
2692
2693 Update the derived classes and callers below.
2694
2695 * linux-low.cc (linux_target_ops): Update.
2696 (linux_supports_catch_syscall): Turn into ...
2697 (linux_process_target::supports_catch_syscall): ... this.
2698 * linux-low.h (class linux_process_target): Update.
2699 * lynx-low.cc (lynx_target_ops): Update.
2700 * nto-low.cc (nto_target_ops): Update.
2701 * win32-low.cc (win32_target_ops): Update.
2702
2703 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2704
2705 Turn process_stratum_target's supports_software_single_step op
2706 into a method of process_target.
2707
2708 * target.h (struct process_stratum_target): Remove the target op.
2709 (class process_target): Add the target op.
2710 (target_supports_software_single_step): Update the macro.
2711 * target.cc (process_target::supports_software_single_step): Define.
2712
2713 Update the derived classes and callers below.
2714
2715 * linux-low.cc (linux_target_ops): Update.
2716 (linux_supports_software_single_step): Turn into ...
2717 (linux_process_target::supports_software_single_step): ... this.
2718 * linux-low.h (class linux_process_target): Update.
2719 * lynx-low.cc (lynx_target_ops): Update.
2720 * nto-low.cc (nto_target_ops): Update.
2721 * win32-low.cc (win32_target_ops): Update.
2722
2723 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2724
2725 Turn process_stratum_target's thread_name and thread_handle ops
2726 into methods of process_target.
2727
2728 * target.h (struct process_stratum_target): Remove the target ops.
2729 (class process_target): Add the target ops.
2730 (target_thread_name): Update the macro.
2731 (target_thread_handle): Update the macro.
2732 * target.cc (process_target::thread_name): Define.
2733 (process_target::thread_handle): Define.
2734
2735 Update the derived classes and callers below.
2736
2737 * linux-low.cc (linux_target_ops): Update.
2738 (linux_process_target::thread_name): Define.
2739 (linux_process_target::thread_handle): Define.
2740 * linux-low.h (class linux_process_target): Update.
2741 * lynx-low.cc (lynx_target_ops): Update.
2742 * nto-low.cc (nto_target_ops): Update.
2743 * win32-low.cc (win32_target_ops): Update.
2744
2745 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2746
2747 Turn process_stratum_target's breakpoint_kind_from_pc,
2748 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2749 ops into methods of process_target.
2750
2751 * target.h (struct process_stratum_target): Remove the target op.
2752 (class process_target): Add the target op.
2753 (target_breakpoint_kind_from_pc): Update the macro.
2754 (target_breakpoint_kind_from_current_state): Update the macro.
2755 (default_breakpoint_kind_from_pc): Remove declaration.
2756 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2757 (process_target::breakpoint_kind_from_pc): ... this.
2758 (process_target::breakpoint_kind_from_current_state): Define.
2759
2760 Update the derived classes and callers below.
2761
2762 * mem-break.cc (bp_size): Update.
2763 (bp_opcode): Update.
2764 * linux-low.cc (linux_target_ops): Update.
2765 (linux_wait_1): Update.
2766 (linux_breakpoint_kind_from_pc): Turn into ...
2767 (linux_process_target::breakpoint_kind_from_pc): ... this.
2768 (linux_sw_breakpoint_from_kind): Turn into ...
2769 (linux_process_target::sw_breakpoint_from_kind): ... this.
2770 (linux_breakpoint_kind_from_current_state): Turn into ...
2771 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2772 * linux-low.h (class linux_process_target): Update.
2773 * lynx-low.cc (lynx_target_ops): Update.
2774 (lynx_process_target::sw_breakpoint_from_kind): Define.
2775 * lynx-low.h (class lynx_process_target): Update.
2776 * nto-low.cc (nto_target_ops): Update.
2777 (nto_sw_breakpoint_from_kind): Turn into ...
2778 (nto_process_target::sw_breakpoint_from_kind): ... this.
2779 * nto-low.h (class nto_process_target): Update.
2780 * win32-low.cc (win32_target_ops): Update.
2781 (win32_sw_breakpoint_from_kind): Turn into ...
2782 (win32_process_target::sw_breakpoint_from_kind): ... this.
2783 * win32-low.h (class win32_process_target): Update.
2784
2785 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2786
2787 Turn process_stratum_target's multifs_open, multifs_readlink,
2788 multifs_unlink ops into methods of process_target.
2789
2790 * target.h (struct process_stratum_target): Remove the target ops.
2791 (class process_target): Add the target ops. Also add
2792 'supports_multifs'.
2793 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2794 "sys/stat.h".
2795 (process_target::supports_multifs): Define.
2796 (process_target::multifs_open): Define.
2797 (process_target::multifs_readlink): Define.
2798 (process_target::multifs_unlink): Define.
2799
2800 Update the derived classes and callers below.
2801
2802 * hostio.cc (handle_setfs): Update.
2803 (handle_open): Update.
2804 (handle_unlink): Update.
2805 (handle_readlink): Update.
2806 * linux-low.cc (linux_target_ops): Update.
2807 (linux_process_target::supports_multifs): Define.
2808 (linux_process_target::multifs_open): Define.
2809 (linux_process_target::multifs_readlink): Define.
2810 (linux_process_target::multifs_unlink): Define.
2811 * linux-low.h (class linux_process_target): Update.
2812 * lynx-low.cc (lynx_target_ops): Update.
2813 * nto-low.cc (nto_target_ops): Update.
2814 * win32-low.cc (win32_target_ops): Update.
2815
2816 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2817
2818 Turn process_stratum_target's pid_to_exec_file op into a method
2819 of process_target.
2820
2821 * target.h (struct process_stratum_target): Remove the target op.
2822 (class process_target): Add the target op. Also add
2823 'supports_pid_to_exec_file'.
2824 * target.cc (process_target::pid_to_exec_file): Define.
2825 (process_target::supports_pid_to_exec_file): Define.
2826
2827 Update the derived classes and callers below.
2828
2829 * server.cc (handle_qxfer_exec_file): Update.
2830 (handle_query): Update.
2831 * linux-low.cc (linux_target_ops): Update.
2832 (linux_process_target::supports_pid_to_exec_file): Define.
2833 (linux_process_target::pid_to_exec_file): Define.
2834 * linux-low.h (class linux_process_target): Update.
2835 * lynx-low.cc (lynx_target_ops): Update.
2836 * nto-low.cc (nto_target_ops): Update.
2837 * win32-low.cc (win32_target_ops): Update.
2838
2839 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2840
2841 Turn process_stratum_target's supports_range_stepping op into a
2842 method of process_target.
2843
2844 * target.h (struct process_stratum_target): Remove the target op.
2845 (class process_target): Add the target op.
2846 (target_supports_range_stepping): Update the macro.
2847 * target.cc (process_target::supports_range_stepping): Define.
2848
2849 Update the derived classes and callers below.
2850
2851 * linux-low.cc (linux_target_ops): Update.
2852 (linux_supports_range_stepping): Turn into ...
2853 (linux_process_target::supports_range_stepping): ... this.
2854 * linux-low.h (class linux_process_target): Update.
2855 * lynx-low.cc (lynx_target_ops): Update.
2856 * nto-low.cc (nto_target_ops): Update.
2857 * win32-low.cc (win32_target_ops): Update.
2858
2859 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2860
2861 Turn process_stratum_target's btrace-related ops (enable_btrace,
2862 disable_btrace, read_btrace, read_btrace_conf) into methods of
2863 process_target.
2864
2865 * target.h (struct process_stratum_target): Remove the target ops.
2866 (class process_target): Add the target ops.
2867 (target_enable_btrace): Update.
2868 (target_disable_btrace): Update.
2869 (target_read_btrace): Update.
2870 (target_read_btrace_conf): Update.
2871 * target.cc (process_target::enable_btrace): Define.
2872 (process_target::disable_btrace): Define.
2873 (process_target::read_btrace): Define.
2874 (process_target::read_btrace_conf): Define.
2875
2876 Update the derived classes and callers below.
2877
2878 * linux-low.cc (linux_target_ops): Update.
2879 (linux_process_target:enable_btrace): Define as a wrapper around
2880 linux_enable_btrace.
2881 (linux_low_disable_btrace): Turn into ...
2882 (linux_process_target::disable_btrace): ... this.
2883 (linux_low_read_btrace): Turn into ...
2884 (linux_process_target::read_btrace): ... this.
2885 (linux_low_btrace_conf): Turn into ...
2886 (linux_process_target::read_btrace_conf): ... this.
2887 * linux-low.h (class linux_process_target): Update.
2888 * lynx-low.cc (lynx_target_ops): Update.
2889 * nto-low.cc (nto_target_ops): Update.
2890 * win32-low.cc (win32_target_ops): Update.
2891
2892 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2893
2894 Turn process_stratum_target's supports_agent op into a method of
2895 process_target.
2896
2897 * target.h (struct process_stratum_target): Remove the target op.
2898 (class process_target): Add the target op.
2899 (target_supports_agent): Update the macro.
2900 * target.cc (process_target::supports_agent): Define.
2901
2902 Update the derived classes and callers below.
2903
2904 * linux-low.cc (linux_target_ops): Update.
2905 (linux_supports_agent): Turn into ...
2906 (linux_process_target::supports_agent): ... this.
2907 * linux-low.h (class linux_process_target): Update.
2908 * lynx-low.cc (lynx_target_ops): Update.
2909 * nto-low.cc (nto_target_ops): Update.
2910 * win32-low.cc (win32_target_ops): Update.
2911
2912 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2913
2914 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2915 method of process_target.
2916
2917 * target.h (struct process_stratum_target): Remove the target op.
2918 (class process_target): Add the target op. Also add
2919 'supports_qxfer_libraries_svr4'.
2920 * target.cc (process_target::qxfer_libraries_svr4): Define.
2921 (process_target::supports_qxfer_libraries_svr4): Define.
2922
2923 Update the derived classes and callers below.
2924
2925 * server.cc (handle_qxfer_libraries_svr4): Update.
2926 (handle_query): Update.
2927 * linux-low.cc (linux_target_ops): Update.
2928 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2929 (linux_qxfer_libraries_svr4): Turn into ...
2930 (linux_process_target::qxfer_libraries_svr4): ... this.
2931 * linux-low.h (class linux_process_target): Update.
2932 * lynx-low.cc (lynx_target_ops): Update.
2933 * nto-low.cc (nto_target_ops): Update.
2934 * win32-low.cc (win32_target_ops): Update.
2935
2936 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2937
2938 Turn process_stratum_target's supports_disable_randomization op
2939 into a method of process_target.
2940
2941 * target.h (struct process_stratum_target): Remove the target op.
2942 (class process_target): Add the target op.
2943 (target_supports_disable_randomization): Update the macro.
2944 * target.cc (process_target::supports_disable_randomization): Define.
2945
2946 Update the derived classes and callers below.
2947
2948 * linux-low.cc (linux_target_ops): Update.
2949 (linux_supports_disable_randomization): Turn into ...
2950 (linux_process_target::supports_disable_randomization): ... this.
2951 * linux-low.h (class linux_process_target): Update.
2952 * lynx-low.cc (lynx_target_ops): Update.
2953 * nto-low.cc (nto_target_ops): Update.
2954 * win32-low.cc (win32_target_ops): Update.
2955
2956 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2957
2958 Turn process_stratum_target's emit_ops op into a method of
2959 process_target.
2960
2961 * target.h (struct process_stratum_target): Remove the target op.
2962 (class process_target): Add the target op.
2963 (target_emit_ops): Update the macro.
2964 * target.cc (process_target::emit_ops): Define.
2965
2966 Update the derived classes and callers below.
2967
2968 * linux-low.cc (linux_target_ops): Update.
2969 (linux_emit_ops): Turn into ...
2970 (linux_process_target::emit_ops): ... this.
2971 * linux-low.h (class linux_process_target): Update.
2972 * lynx-low.cc (lynx_target_ops): Update.
2973 * nto-low.cc (nto_target_ops): Update.
2974 * win32-low.cc (win32_target_ops): Update.
2975
2976 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2977
2978 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2979 and get_min_fast_tracepoint_insn_len ops into methods of
2980 process_target.
2981
2982 * target.h (struct process_stratum_target): Remove the target ops.
2983 (class process_target): Add the target ops. Also add
2984 'supports_fast_tracepoints'.
2985 (target_supports_fast_tracepoints): Update the macro.
2986 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2987 (install_fast_tracepoint_jump_pad): Update and rename the macro
2988 to ...
2989 (target_install_fast_tracepoint_jump_pad): ... this.
2990 * target.cc (process_target::supports_fast_tracepoints): Define.
2991 (process_target::install_fast_tracepoint_jump_pad): Define.
2992 (process_target::get_min_fast_tracepoint_insn_len): Define.
2993
2994 Update the derived classes and callers below.
2995
2996 * tracepoint.cc (install_fast_tracepoint): Update.
2997 * linux-low.cc (linux_target_ops): Update.
2998 (linux_process_target::supports_fast_tracepoints): Define.
2999 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3000 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3001 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3002 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3003 * linux-low.h (class linux_process_target): Update.
3004 * lynx-low.cc (lynx_target_ops): Update.
3005 * nto-low.cc (nto_target_ops): Update.
3006 * win32-low.cc (win32_target_ops): Update.
3007
3008 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3009
3010 Turn process_stratum_target's stabilize_threads op into a
3011 method of process_target.
3012
3013 * target.h (struct process_stratum_target): Remove the target op.
3014 (class process_target): Add the target op.
3015 (target_stabilize_threads): Update the macro.
3016 * target.cc (process_target::stabilize_threads): Define.
3017
3018 Update the derived classes and callers below.
3019
3020 * server.cc (handle_status): Update.
3021 * tracepoint.cc (cmd_qtdp): Update.
3022 (cmd_qtstart): Update.
3023 * linux-low.cc (linux_target_ops): Update.
3024 (linux_stabilize_threads): Turn into ...
3025 (linux_process_target::stabilize_threads): ... this.
3026 (linux_wait_1): Update.
3027 * linux-low.h (class linux_process_target): Update.
3028 * lynx-low.cc (lynx_target_ops): Update.
3029 * nto-low.cc (nto_target_ops): Update.
3030 * win32-low.cc (win32_target_ops): Update.
3031
3032 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3033
3034 Turn process_stratum_target's pause_all and unpause_all ops
3035 into methods of process_target.
3036
3037 * target.h (struct process_stratum_target): Remove the target ops.
3038 (class process_target): Add the target ops.
3039 (pause_all): Update the macro and rename to...
3040 (target_pause_all): ... this.
3041 (unpause_all): Update the macro and rename to...
3042 (target_unpause_all): ... this.
3043 * target.cc (process_target::pause_all): Define.
3044 (process_target::unpause_all): Define.
3045
3046 Update the derived classes and callers below.
3047
3048 * server.cc (handle_status): Update.
3049 * tracepoint.cc (clear_installed_tracepoints): Update.
3050 (cmd_qtdp): Update.
3051 (cmd_qtstart): Update.
3052 (stop_tracing): Update.
3053 (cmd_qtstatus): Update.
3054 (upload_fast_traceframes): Update.
3055 (run_inferior_command): Update.
3056 * linux-low.cc (linux_target_ops): Update.
3057 (linux_pause_all): Turn into ...
3058 (linux_process_target::pause_all): ... this.
3059 (linux_unpause_all): Turn into ...
3060 (linux_process_target::unpause_all): ... this.
3061 (linux_process_target::prepare_to_access_memory): Update.
3062 (linux_process_target::done_accessing_memory): Update.
3063 * linux-low.h (class linux_process_target): Update.
3064 * lynx-low.cc (lynx_target_ops): Update.
3065 * nto-low.cc (nto_target_ops): Update.
3066 * win32-low.cc (win32_target_ops): Update.
3067
3068 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3069
3070 Turn process_stratum_target's get_tib_address op into a method of
3071 process_target.
3072
3073 * target.h (struct process_stratum_target): Remove the target op.
3074 (class process_target): Add the target op. Also add
3075 'supports_get_tib_address'.
3076 * target.cc (process_target::get_tib_address): Define.
3077 (process_target::supports_get_tib_address): Define.
3078
3079 Update the derived classes and callers below.
3080
3081 * server.cc (handle_query): Update.
3082 * linux-low.cc (win32_target_ops): Update.
3083 * lynx-low.cc (lynx_target_ops): Update.
3084 * nto-low.cc (nto_target_ops): Update.
3085 * win32-low.cc (win32_target_ops): Update.
3086 (win32_process_target::supports_get_tib_address): Define.
3087 (win32_get_tib_address): Turn into ...
3088 (win32_process_target::get_tib_address): ... this.
3089 * win32-low.h (class win32_process_target): Update.
3090
3091 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3092
3093 Turn process_stratum_target's thread_stopped op into a method of
3094 process_target.
3095
3096 * target.h (struct process_stratum_target): Remove the target op.
3097 (class process_target): Add the target op. Also add
3098 'supports_thread_stopped'.
3099 (target_thread_stopped): Update the macro.
3100 * target.cc (process_target::thread_stopped): Define.
3101 (process_target::supports_thread_stopped): Define.
3102 (prepare_to_access_memory): Update.
3103
3104 Update the derived classes and callers below.
3105
3106 * server.cc (queue_stop_reply_callback): Update.
3107 * linux-low.cc (linux_target_ops): Update.
3108 (linux_process_target::supports_thread_stopped): Define.
3109 (linux_thread_stopped): Turn into ...
3110 (linux_process_target::thread_stopped): ... this.
3111 * linux-low.h (class linux_process_target): Update.
3112 * lynx-low.cc (lynx_target_ops): Update.
3113 * nto-low.cc (nto_target_ops): Update.
3114 * win32-low.cc (win32_target_ops): Update.
3115
3116 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3117
3118 Turn process_stratum_target's read_pc and write_pc ops into
3119 methods of process_target.
3120
3121 * target.h (struct process_stratum_target): Remove the target ops.
3122 (class process_target): Add the target ops.
3123 * target.cc (process_target::read_pc): Define.
3124 (process_target::write_pc): Define.
3125
3126 Update the derived classes and callers below.
3127
3128 * regcache.cc (regcache_read_pc): Update.
3129 (regcache_write_pc): Update.
3130 * linux-low.cc (linux_target_ops): Update.
3131 (linux_read_pc): Turn into ...
3132 (linux_process_target::read_pc): ... this.
3133 (linux_write_pc): Turn into ...
3134 (linux_process_target::write_pc): ... this.
3135 * linux-low.h (class linux_process_target): Update.
3136 * lynx-low.cc (lynx_target_ops): Update.
3137 * nto-low.cc (nto_target_ops): Update.
3138 * win32-low.cc (win32_target_ops): Update.
3139
3140 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3141
3142 Turn process_stratum_target's supports_tracepoints op into a
3143 method of process_target.
3144
3145 * target.h (struct process_stratum_target): Remove the target op.
3146 (class process_target): Add the target op.
3147 (target_supports_tracepoints): Update the macro.
3148 * target.cc (process_target::supports_tracepoints): Define.
3149
3150 Update the derived classes and callers below.
3151
3152 * linux-low.cc (linux_target_ops): Update.
3153 (linux_supports_tracepoints): Turn into ...
3154 (linux_process_target::supports_tracepoints): ... this.
3155 * linux-low.h (class linux_process_target): Update.
3156 * lynx-low.cc (lynx_target_ops): Update.
3157 * nto-low.cc (nto_target_ops): Update.
3158 * win32-low.cc (win32_target_ops): Update.
3159
3160 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3161
3162 Turn process_stratum_target's process_qsupported op into a method
3163 of process_target.
3164
3165 * target.h (struct process_stratum_target): Remove the target op.
3166 (class process_target): Add the target op.
3167 (target_process_qsupported): Update the macro.
3168 * target.cc (process_target::process_qsupported): Define.
3169
3170 Update the derived classes and callers below.
3171
3172 * linux-low.cc (linux_target_ops): Update.
3173 (linux_process_qsupported): Turn into ...
3174 (linux_process_target::process_qsupported): ... this.
3175 * linux-low.h (class linux_process_target): Update.
3176 * lynx-low.cc (lynx_target_ops): Update.
3177 * nto-low.cc (nto_target_ops): Update.
3178 * win32-low.cc (win32_target_ops): Update.
3179
3180 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3181
3182 Turn process_stratum_target's read_loadmap op into a method of
3183 process_target.
3184
3185 * target.h (struct process_stratum_target): Remove the target op.
3186 (class process_target): Add the target op. Also add
3187 'supports_read_loadmap'.
3188 * target.cc (process_target::read_loadmap): Define.
3189 (process_target::supports_read_loadmap): Define.
3190
3191 Update the derived classes and callers below.
3192
3193 * server.cc (handle_qxfer_fdpic): Update.
3194 (handle_query): Update.
3195 * linux-low.cc (linux_target_ops): Update.
3196 (linux_process_target::supports_read_loadmap): Define.
3197 (linux_read_loadmap): Turn into ...
3198 (linux_process_target::read_loadmap): ... this.
3199 * linux-low.h (class linux_process_target): Update.
3200 * lynx-low.cc (lynx_target_ops): Update.
3201 * nto-low.cc (nto_target_ops): Update.
3202 * win32-low.cc (win32_target_ops): Update.
3203
3204 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3205
3206 Turn process_stratum_target's core_of_thread op into a method of
3207 process_target.
3208
3209 * target.h (struct process_stratum_target): Remove the target op.
3210 (class process_target): Add the target op.
3211 (target_core_of_thread): Update the macro.
3212 * target.cc (process_target::core_of_thread): Define.
3213
3214 Update the derived classes and callers below.
3215
3216 * linux-low.cc (linux_target_ops): Update.
3217 (linux_process_target::core_of_thread): Define.
3218 * linux-low.h (class linux_process_target): Update.
3219 * lynx-low.cc (lynx_target_ops): Update.
3220 * nto-low.cc (nto_target_ops): Update.
3221 * win32-low.cc (win32_target_ops): Update.
3222
3223 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3224
3225 Turn process_stratum_target's handle_monitor_command op into a
3226 method of process_target.
3227
3228 * target.h (struct process_stratum_target): Remove the target op.
3229 (class process_target): Add the target op.
3230 (target_handle_monitor_command): Update the macro.
3231 * target.cc (process_target::handle_monitor_command): Define.
3232
3233 Update the derived classes and callers below.
3234
3235 * server.cc (handle_query): Update.
3236 * linux-low.cc (linux_target_ops): Update.
3237 (linux_process_target::handle_monitor_command): Define.
3238 * linux-low.h (class linux_process_target): Update.
3239 * lynx-low.cc (lynx_target_ops): Update.
3240 * nto-low.cc (nto_target_ops): Update.
3241 * win32-low.cc (win32_target_ops): Update.
3242
3243 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3244
3245 Turn process_stratum_target's handle_new_gdb_connection op into a
3246 method of process_target.
3247
3248 * target.h (struct process_stratum_target): Remove the target op.
3249 (class process_target): Add the target op.
3250 (target_handle_new_gdb_connection): Update the macro.
3251 * target.cc (process_target::handle_new_gdb_connection): Define.
3252
3253 Update the derived classes and callers below.
3254
3255 * linux-low.cc (linux_target_ops): Update.
3256 (linux_handle_new_gdb_connection): Turn into ...
3257 (linux_process_target::handle_new_gdb_connection): ... this.
3258 * linux-low.h (class linux_process_target): Update.
3259 * lynx-low.cc (lynx_target_ops): Update.
3260 * nto-low.cc (nto_target_ops): Update.
3261 * win32-low.cc (win32_target_ops): Update.
3262
3263 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3264
3265 Turn process_stratum_target's supports_fork_events,
3266 supports_vfork_events, and supports_exec_events ops into methods
3267 of process_target.
3268
3269 * target.h (struct process_stratum_target): Remove the target ops.
3270 (class process_target): Add the target ops.
3271 (target_supports_fork_events): Update the macro.
3272 (target_supports_vfork_events): Update the macro.
3273 (target_supports_exec_events): Update the macro.
3274 * target.cc (process_target::supports_fork_events): Define.
3275 (process_target::supports_vfork_events): Define.
3276 (process_target::supports_exec_events): Define.
3277
3278 Update the derived classes and callers below.
3279
3280 * linux-low.cc (linux_target_ops): Update.
3281 (linux_supports_fork_events): Turn into ...
3282 (linux_process_target::supports_fork_events): ... this.
3283 (linux_supports_vfork_events): Turn into ...
3284 (linux_process_target::supports_vfork_events): ... this.
3285 (linux_supports_exec_events): Turn into ...
3286 (linux_process_target::supports_exec_events): ... this.
3287 * linux-low.h (class linux_process_target): Update.
3288 * lynx-low.cc (lynx_target_ops): Update.
3289 * nto-low.cc (nto_target_ops): Update.
3290 * win32-low.cc (win32_target_ops): Update.
3291
3292 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3293
3294 Turn process_stratum_target's supports_multi_process op into a
3295 method of process_target.
3296
3297 * target.h (struct process_stratum_target): Remove the target op.
3298 (class process_target): Add the target op.
3299 * target.cc (process_target::supports_multi_process): Define.
3300 (target_supports_multi_process): Update.
3301
3302 Update the derived classes and callers below.
3303
3304 * linux-low.cc (linux_target_ops): Update.
3305 (linux_supports_multi_process): Turn into ...
3306 (linux_process_target::supports_multi_process): ... this.
3307 * linux-low.h (class linux_process_target): Update.
3308 * lynx-low.cc (lynx_target_ops): Update.
3309 * nto-low.cc (nto_target_ops): Update.
3310 * win32-low.cc (win32_target_ops): Update.
3311
3312 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3313
3314 Turn process_stratum_target's supports_non_stop, async, and
3315 start_non_stop ops into methods of process_target.
3316
3317 * target.h (struct process_stratum_target): Remove the target ops.
3318 (class process_target): Add the target ops.
3319 (target_supports_non_stop): Update the macro.
3320 (target_async): Update the macro.
3321 (start_non_stop): Remove declaration.
3322 * target.cc (process_target::supports_non_stop): Define.
3323 (process_target::async): Define.
3324 (process_target::start_non_stop): Define.
3325 (start_non_stop): Remove.
3326
3327 Update the derived classes and callers below.
3328
3329 * server.cc (handle_qxfer_siginfo): Update.
3330 (handle_query): Update.
3331 * linux-low.cc (linux_target_ops): Update.
3332 (linux_supports_non_stop): Turn into ...
3333 (linux_process_target::supports_non_stop): ... this.
3334 (linux_async): Turn into ...
3335 (linux_process_target::async): ... this.
3336 (linux_start_non_stop): Turn into ...
3337 (linux_process_target::start_non_stop): ... 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 (nto_supports_non_stop): Remove; rely on the default behavior
3342 instead.
3343 * win32-low.cc (win32_target_ops): Update.
3344
3345 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3346
3347 Turn process_stratum_target's qxfer_siginfo op into a method of
3348 process_target.
3349
3350 * target.h (struct process_stratum_target): Remove the target op.
3351 (class process_target): Add the target op. Also add
3352 'supports_qxfer_siginfo'.
3353 * target.cc (process_target::qxfer_siginfo): Define.
3354 (process_target::supports_qxfer_siginfo): Define.
3355
3356 Update the derived classes and callers below.
3357
3358 * server.cc (handle_qxfer_siginfo): Update.
3359 (handle_query): Update.
3360 * linux-low.cc (linux_target_ops): Update.
3361 (linux_process_target::supports_qxfer_siginfo): Define.
3362 (linux_xfer_siginfo): Turn into ...
3363 (linux_process_target::qxfer_siginfo): ... this.
3364 * linux-low.h (class linux_process_target): Update.
3365 * lynx-low.cc (lynx_target_ops): Update.
3366 * nto-low.cc (nto_target_ops): Update.
3367 * win32-low.cc (win32_target_ops): Update.
3368
3369 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3370
3371 Turn process_stratum_target's qxfer_osdata op into a method of
3372 process_target.
3373
3374 * target.h (struct process_stratum_target): Remove the target op.
3375 (class process_target): Add the target op. Also add
3376 'supports_qxfer_osdata'.
3377 * target.cc (process_target::qxfer_osdata): Define.
3378 (process_target::supports_qxfer_osdata): Define.
3379
3380 Update the derived classes and callers below.
3381
3382 * server.cc (handle_qxfer_osdata): Update.
3383 (handle_query): Update.
3384 * linux-low.cc (linux_target_ops): Update.
3385 (linux_process_target::supports_qxfer_osdata): Define.
3386 (linux_qxfer_osdata): Turn into ...
3387 (linux_process_target::qxfer_osdata): ... this.
3388 * linux-low.h (class linux_process_target): Update.
3389 * lynx-low.cc (lynx_target_ops): Update.
3390 * nto-low.cc (nto_target_ops): Update.
3391 * win32-low.cc (win32_target_ops): Update.
3392
3393 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3394
3395 Turn process_stratum_target's hostio_last_error op into a
3396 method of process_target.
3397
3398 * target.h (struct process_stratum_target): Remove the target op.
3399 (class process_target): Add the target op.
3400 * target.cc: Add "hostio.h" to includes.
3401 (process_target::hostio_last_error): Define.
3402
3403 Update the derived classes and callers below.
3404
3405 * hostio.cc (hostio_error): Update.
3406 * linux-low.cc: Remove "hostio.h" from includes.
3407 (linux_target_ops): Update.
3408 * lynx-low.cc (lynx_target_ops): Update.
3409 * nto-low.cc (nto_target_ops): Update.
3410 * win32-low.h (class win32_process_target): Update.
3411 * win32-low.cc (win32_target_ops): Update.
3412 (wince_hostio_last_error): Turn into ...
3413 (win32_process_target::hostio_last_error): ... this.
3414
3415 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3416
3417 Turn process_stratum_target's get_tls_address op into a method of
3418 process_target.
3419
3420 * target.h (struct process_stratum_target): Remove the target op.
3421 (class process_target): Add the target op. Also add
3422 'supports_get_tls_address'.
3423 * target.cc (process_target::get_tls_address): Define.
3424 (process_target::supports_get_tls_address): Define.
3425
3426 Update the derived classes and callers below.
3427
3428 * server.cc (handle_query): Update.
3429 * linux-low.cc (linux_target_ops): Update.
3430 (linux_process_target::supports_get_tls_address): Define.
3431 (linux_process_target::get_tls_address): Define.
3432 * linux-low.h (class linux_process_target): Update.
3433 * lynx-low.cc (lynx_target_ops): Update.
3434 * nto-low.cc (nto_target_ops): Update.
3435 * win32-low.cc (win32_target_ops): Update.
3436
3437 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3438
3439 Turn process_stratum_target's read_offsets op into a method of
3440 process_target.
3441
3442 * target.h (struct process_stratum_target): Remove the target op.
3443 (class process_target): Add the target op. Also add
3444 'supports_read_offsets'.
3445 * target.cc (process_target::read_offsets): Define.
3446 (process_target::supports_read_offsets): Define.
3447
3448 Update the derived classes and callers below.
3449
3450 * server.cc (handle_query): Update.
3451 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3452 (linux_target_ops): Update.
3453 (linux_process_target::supports_read_offsets): Define.
3454 (linux_read_offsets): Turn into ...
3455 (linux_process_target::read_offsets): ... this.
3456 * linux-low.h (class linux_process_target): Update.
3457 * lynx-low.cc (lynx_target_ops): Update.
3458 * nto-low.cc (nto_target_ops): Update.
3459 * win32-low.cc (win32_target_ops): Update.
3460
3461 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3462
3463 Turn process_stratum_target's stopped_by_watchpoint and
3464 stopped_data_address ops into methods of process_target.
3465
3466 * target.h (struct process_stratum_target): Remove the target ops.
3467 (class process_target): Add the target ops.
3468 * target.cc (process_target::stopped_by_watchpoint): Define.
3469 (process_target::stopped_data_address): Define.
3470
3471 Update the derived classes and callers below.
3472
3473 * remote-utils.cc (prepare_resume_reply): Update.
3474 * linux-low.cc (linux_target_ops): Update.
3475 (linux_stopped_by_watchpoint): Turn into ...
3476 (linux_process_target::stopped_by_watchpoint): ... this.
3477 (linux_stopped_data_address): Turn into ...
3478 (linux_process_target::stopped_data_address): ... this.
3479 * linux-low.h (class linux_process_target): Update.
3480 * lynx-low.cc (lynx_target_ops): Update.
3481 * nto-low.cc (nto_target_ops): Update.
3482 (nto_stopped_by_watchpoint): Turn into ...
3483 (nto_process_target::stopped_by_watchpoint): ... this.
3484 (nto_stopped_data_address): Turn into ...
3485 (nto_process_target::stopped_data_address): ... this.
3486 * nto-low.h (class nto_process_target): Update.
3487 * win32-low.cc (win32_target_ops): Update.
3488 (win32_stopped_by_watchpoint): Turn into ...
3489 (win32_process_target::stopped_by_watchpoint): ... this.
3490 (win32_stopped_data_address): Turn into ...
3491 (win32_process_target::stopped_data_address): ... this.
3492 * win32-low.h (class win32_process_target): Update.
3493
3494 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3495
3496 Turn process_stratum_target's supports_hardware_single_step op into
3497 a method of process_target.
3498
3499 * target.h (struct process_stratum_target): Remove the target op.
3500 (class process_target): Add the target op.
3501 (target_supports_hardware_single_step): Update the macro.
3502 (target_can_do_hardware_single_step): Remove declaration.
3503 * target.cc (process_target::supports_hardware_single_step): Define.
3504 (target_can_do_hardware_single_step): Remove.
3505
3506 Update the derived classes and callers below.
3507
3508 * linux-low.h (class linux_process_target): Update.
3509 * linux-low.cc (linux_target_ops): Update.
3510 (linux_supports_hardware_single_step): Turn into ...
3511 (linux_process_target::supports_hardware_single_step): ... this.
3512 * lynx-low.h (class lynx_process_target): Update.
3513 * lynx-low.cc (lynx_target_ops): Update.
3514 (lynx_process_target::supports_hardware_single_step): Define.
3515 * nto-low.h (class nto_process_target): Update.
3516 * nto-low.cc (nto_target_ops): Update.
3517 (nto_process_target::supports_hardware_single_step): Define.
3518 * win32-low.h (class win32_process_target): Update.
3519 * win32-low.cc (win32_target_ops): Update.
3520 (win32_process_target::supports_hardware_single_step): Define.
3521
3522 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3523
3524 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3525 ops into methods of process_target.
3526
3527 * target.h (struct process_stratum_target): Remove the target ops.
3528 (class process_target): Add the target ops.
3529 (target_stopped_by_hw_breakpoint): Update the macro.
3530 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3531 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3532 (process_target::supports_stopped_by_hw_breakpoint): Define.
3533
3534 Update the derived classes and callers below.
3535
3536 * linux-low.cc (linux_target_ops): Update.
3537 (linux_stopped_by_hw_breakpoint): Turn into ...
3538 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3539 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3540 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3541 * linux-low.h (class linux_process_target): Update.
3542 * lynx-low.cc (lynx_target_ops): Update.
3543 * nto-low.cc (nto_target_ops): Update.
3544 * win32-low.cc (win32_target_ops): Update.
3545
3546 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3547
3548 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3549 ops into methods of process_target.
3550
3551 * target.h (struct process_stratum_target): Remove the target ops.
3552 (class process_target): Add the target ops.
3553 (target_stopped_by_sw_breakpoint): Update the macro.
3554 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3555 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3556 (process_target::supports_stopped_by_sw_breakpoint): Define.
3557
3558 Update the derived classes and callers below.
3559
3560 * linux-low.cc (linux_target_ops): Update.
3561 (linux_stopped_by_sw_breakpoint): Turn into ...
3562 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3563 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3564 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3565 * linux-low.h (class linux_process_target): Update.
3566 * lynx-low.cc (lynx_target_ops): Update.
3567 * nto-low.cc (nto_target_ops): Update.
3568 * win32-low.cc (win32_target_ops): Update.
3569
3570 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3571
3572 Turn process_stratum_target's insert_point and remove_point ops
3573 into methods of process_target.
3574
3575 * target.h (struct process_stratum_target): Remove the target ops.
3576 (class process_target): Add the target ops.
3577 * target.cc (process_target::insert_point): Define.
3578 (process_target::remove_point): Define.
3579
3580 Update the derived classes and callers below.
3581
3582 * mem-break.cc (set_raw_breakpoint_at): Update.
3583 (delete_raw_breakpoint): Update.
3584 (uninsert_raw_breakpoint): Update.
3585 (reinsert_raw_breakpoint): Update.
3586 * linux-low.cc (linux_target_ops): Update.
3587 (linux_insert_point): Turn into ...
3588 (linux_process_target::insert_point): ... this.
3589 (linux_remove_point): Turn into ...
3590 (linux_process_target::remove_point): ... this.
3591 * linux-low.h (class linux_process_target): Update.
3592 * lynx-low.cc (lynx_target_ops): Update.
3593 * nto-low.cc (nto_target_ops): Update.
3594 (nto_insert_point): Turn into ...
3595 (nto_process_target::insert_point): ... this.
3596 (nto_remove_point): Turn into ...
3597 (nto_process_target::remove_point): ... this.
3598 * nto-low.h (class nto_process_target): Update.
3599 * win32-low.cc (win32_target_ops): Update.
3600 (win32_insert_point): Turn into ...
3601 (win32_process_target::insert_point): ... this.
3602 (win32_remove_point): Turn into ...
3603 (win32_process_target::remove_point): ... this.
3604 * win32-low.h (class win32_process_target): Update.
3605
3606 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3607
3608 Turn process_stratum_target's supports_z_point_type op into a
3609 method of process_target.
3610
3611 * target.h (struct process_stratum_target): Remove the target op.
3612 (class process_target): Add the target op.
3613 * target.cc (process_target::supports_z_point_type): Define.
3614
3615 Update the derived classes and callers below.
3616
3617 * mem-break.cc (z_type_supported): Update.
3618 * linux-low.cc (linux_target_ops): Update.
3619 (linux_supports_z_point_type): Turn into ...
3620 (linux_process_target::supports_z_point_type): ... 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 (nto_supports_z_point_type): Turn into ...
3625 (nto_process_target::supports_z_point_type): ... this.
3626 * nto-low.h (class nto_process_target): Update.
3627 * win32-low.cc (win32_target_ops): Update.
3628 (win32_supports_z_point_type): Turn into ...
3629 (win32_process_target::supports_z_point_type): ... this.
3630 * win32-low.h (class win32_process_target): Update.
3631
3632 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3633
3634 Turn process_stratum_target's read_auxv op into a method of
3635 process_target.
3636
3637 * target.h (class process_stratum_target): Remove the target op.
3638 (struct process_target): Add the target op. Also add
3639 'supports_read_auxv'.
3640 * target.cc (process_target::read_auxv): Define.
3641 (process_target::supports_read_auxv): Define.
3642
3643 Update the derived classes and callers below.
3644
3645 * server.cc (handle_qxfer_auxv): Update.
3646 (handle_query): Update.
3647 * linux-low.cc (linux_target_ops): Update.
3648 (linux_process_target::supports_read_auxv): Define.
3649 (linux_read_auxv): Turn into ...
3650 (linux_process_target::read_auxv): ... this.
3651 * linux-low.h (class linux_process_target): Update.
3652 * lynx-low.cc (lynx_target_ops): Update.
3653 * nto-low.cc (nto_target_ops): Update.
3654 (nto_process_target::supports_read_auxv): Define.
3655 (nto_read_auxv): Turn into ...
3656 (nto_process_target::read_auxv): ... this.
3657 * nto-low.h (class nto_process_target): Update.
3658 * win32-low.cc (win32_target_ops): Update.
3659
3660 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3661
3662 Turn process_stratum_target's request_interrupt op into a method of
3663 process_target.
3664
3665 * target.h (struct process_stratum_target): Remove the target op.
3666 (class process_target): Add the target op.
3667
3668 Update the derived classes and callers below.
3669
3670 * remote-utils.cc (putpkt_binary_1): Update.
3671 (input_interrupt): Update.
3672 (getpkt): Update.
3673 * server.cc (handle_v_requests): Update.
3674 * linux-low.cc (linux_target_ops): Update.
3675 (linux_request_interrupt): Turn into ...
3676 (linux_process_target::request_interrupt): ... this.
3677 * linux-low.h (class linux_process_target): Update.
3678 * lynx-low.cc (lynx_target_ops): Update.
3679 (lynx_request_interrupt): Turn into ...
3680 (lynx_process_target::request_interrupt): ... this.
3681 * lynx-low.h (class lynx_process_target): Update.
3682 * nto-low.cc (nto_target_ops): Update.
3683 (nto_request_interrupt): Turn into ...
3684 (nto_process_target::request_interrupt): ... this.
3685 * nto-low.h (class nto_process_target): Update.
3686 * win32-low.cc (win32_target_ops): Update.
3687 (win32_request_interrupt): Turn into ...
3688 (win32_process_target::request_interrupt): ... this.
3689 * win32-low.h (class win32_process_target): Update.
3690
3691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3692
3693 Turn process_stratum_target's look_up_symbols op into a method of
3694 process_target.
3695
3696 * target.h (struct process_stratum_target): Remove the target op.
3697 (class process_target): Add the target op.
3698 * target.cc (process_target::look_up_symbols): Define.
3699
3700 Update the derived classes and callers below.
3701
3702 * server.cc (handle_query): Update.
3703 * linux-low.cc (linux_target_ops): Update.
3704 (linux_look_up_symbols): Turn into ...
3705 (linux_process_target::look_up_symbols): ... this.
3706 * linux-low.h (class linux_process_target): Update.
3707 * lynx-low.cc (lynx_target_ops): Update.
3708 * nto-low.cc (nto_target_ops): Update.
3709 * win32-low.cc (win32_target_ops): Update.
3710
3711 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3712
3713 Turn process_stratum_target's read_memory and write_memory
3714 ops into methods of process_target.
3715
3716 * target.h (struct process_stratum_target): Remove the target ops.
3717 (class process_target): Add the target ops.
3718
3719 Update the derived classes and callers below.
3720
3721 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3722 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3723 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3724 (arm_get_syscall_trapinfo): Update.
3725 * linux-cris-low.cc (cris_breakpoint_at): Update.
3726 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3727 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3728 * linux-mips-low.cc (mips_breakpoint_at): Update.
3729 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3730 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3731 * linux-sh-low.cc (sh_breakpoint_at): Update.
3732 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3733 (sparc_store_gregset_from_stack): Update.
3734 (sparc_breakpoint_at): Update.
3735 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3736 * linux-tile-low.cc (tile_breakpoint_at): Update.
3737 * linux-x86-low.cc (x86_breakpoint_at): Update.
3738 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3739 * mem-brea.cc (insert_memory_breakpoint): Update.
3740 (validate_inserted_breakpoint): Update.
3741 * target.cc (read_inferior_memory): Update.
3742 (target_write_memory): Update.
3743 * linux-low.cc (linux_target_ops): Update.
3744 (linux_read_memory): Make a wrapper around the read_memory target
3745 op call.
3746 (linux_process_target::read_memory): Rename from linux_read_memory.
3747 (linux_write_memory): Turn into ...
3748 (linux_process_target::write_memory): ... this.
3749 * linux-low.h (class linux_process_target): Update.
3750 * lynx-low.cc (lynx_target_ops): Update.
3751 (lynx_read_memory): Turn into ...
3752 (lynx_process_target::read_memory): ... this.
3753 (lynx_write_memory): Turn into ...
3754 (lynx_process_target::write_memory): ... this.
3755 * lynx-low.h (class lynx_process_target): Update.
3756 * nto-low.cc (nto_target_ops): Update.
3757 (nto_read_memory): Turn into ...
3758 (nto_process_target::read_memory): ... this.
3759 (nto_write_memory): Turn into ...
3760 (nto_process_target::write_memory): ... this.
3761 * nto-low.h (class nto_process_target): Update.
3762 * win32-low.cc (win32_target_ops): Update.
3763 (win32_read_inferior_memory): Turn into ...
3764 (win32_process_target::read_memory): ... this.
3765 (win32_write_inferior_memory): Turn into ...
3766 (win32_process_target::write_memory): ... this.
3767 * win32-low.h (class win32_process_target): Update.
3768
3769 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3770
3771 Turn process_stratum_target's prepare_to_access_memory and
3772 done_accessing_memory ops into methods of process_target.
3773
3774 * target.h (struct process_stratum_target): Remove the target ops.
3775 (class process_target): Add the target ops.
3776 * target.cc (process_target::prepare_to_access_memory): Define.
3777 (process_target::done_accessing_memory): Define.
3778 (prepare_to_access_memory): Update.
3779 (done_accessing_memory): Update.
3780
3781 Update the derived classes and callers below.
3782
3783 * linux-low.cc (linux_target_ops): Update.
3784 (linux_prepare_to_access_memory): Turn into ...
3785 (linux_process_target::prepare_to_access_memory): ... this.
3786 (linux_done_accessing_memory): Turn into ...
3787 (linux_process_target::done_accessing_memory): ... this.
3788 * linux-low.h (class linux_process_target): Update.
3789 * lynx-low.cc (lynx_target_ops): Update.
3790 * nto-low.cc (nto_target_ops): Update.
3791 * win32-low.cc (win32_target_ops): Update.
3792
3793 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3794
3795 Turn process_stratum_target's fetch_registers and store_registers
3796 ops into methods of process_target.
3797
3798 * target.h (struct process_stratum_target): Remove the target ops.
3799 (class process_target): Add the target ops.
3800 (fetch_inferior_registers): Update the macro.
3801 (store_inferior_registers): Update the macro.
3802
3803 Update the derived classes and callers below.
3804
3805 * linux-low.cc (linux_target_ops): Update.
3806 (linux_fetch_registers): Turn into ...
3807 (linux_process_target::fetch_registers): ... this.
3808 (linux_store_registers): Turn into ...
3809 (linux_process_target::store_registers): ... this.
3810 * linux-low.h (class linux_process_target): Update.
3811 * lynx-low.cc (lynx_target_ops): Update.
3812 (lynx_fetch_registers): Turn into ...
3813 (lynx_process_target::fetch_registers): ... this.
3814 (lynx_store_registers): Turn into ...
3815 (lynx_process_target::store_registers): ... this.
3816 * lynx-low.h (class lynx_process_target): Update.
3817 * nto-low.cc (nto_target_ops): Update.
3818 (nto_fetch_registers): Turn into ...
3819 (nto_process_target::fetch_registers): ... this.
3820 (nto_store_registers): Turn into ...
3821 (nto_process_target::store_registers): ... this.
3822 * nto-low.h (class nto_process_target): Update.
3823 * win32-low.cc (win32_target_ops): Update.
3824 (win32_fetch_inferior_registers): Turn into ...
3825 (win32_process_target::fetch_registers): ... this.
3826 (win32_store_inferior_registers): Turn into ...
3827 (win32_process_target::store_registers): ... this.
3828 * win32-low.h (class win32_process_target): Update.
3829
3830 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3831
3832 Turn process_stratum_target's wait op into a method of
3833 process_target.
3834
3835 * target.h (struct process_stratum_target): Remove the target op.
3836 (class process_target): Add the target op.
3837
3838 Update the derived classes and callers below.
3839
3840 * target.cc (target_wait): Update.
3841 * linux-low.cc (linux_target_ops): Update.
3842 (linux_wait): Turn into ...
3843 (linux_process_target::wait): ... this.
3844 * linux-low.h (class linux_process_target): Update.
3845 * lynx-low.cc (lynx_target_ops): Update.
3846 (lynx_wait): Turn into ...
3847 (lynx_process_target::wait): ... this.
3848 * lynx-low.h (class lynx_process_target): Update.
3849 * nto-low.cc (nto_target_ops): Update.
3850 (nto_wait): Turn into ...
3851 (nto_process_target::wait): ... this.
3852 * nto-low.h (class nto_process_target): Update.
3853 * win32-low.cc (win32_target_ops): Update.
3854 (win32_wait): Turn into ...
3855 (win32_process_target::wait): ... this.
3856 (do_initial_child_stuff): Update.
3857 * win32-low.h (class win32_process_target): Update.
3858
3859 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3860
3861 Turn process_stratum_target's resume op into a method of
3862 process_target.
3863
3864 * target.h (struct process_stratum_target): Remove the target op.
3865 (class process_target): Add the target op.
3866
3867 Update the derived classes and callers below.
3868
3869 * server.cc (resume): Update.
3870 * target.cc (target_stop_and_wait): Update.
3871 (target_continue_no_signal): Update.
3872 (target_continue): Update.
3873 * linux-low.cc (linux_target_ops): Update.
3874 (linux_resume): Turn into ...
3875 (linux_process_target::resume): ... this.
3876 * linux-low.h (class linux_process_target): Update.
3877 * lynx-low.cc (lynx_target_ops): Update.
3878 (lynx_resume): Turn into ...
3879 (lynx_process_target::resume): ... this.
3880 * lynx-low.h (class lynx_process_target): Update.
3881 * nto-low.cc (nto_target_ops): Update.
3882 (nto_resume): Turn into ...
3883 (nto_process_target::resume): ... this.
3884 * nto-low.h (class nto_process_target): Update.
3885 * win32-low.cc (win32_target_ops): Update.
3886 (win32_resume): Turn into ...
3887 (win32_process_target::resume): ... this.
3888 (win32_process_target::detach): Update.
3889 (do_initial_child_stuff): Update.
3890 * win32-low.h (class win32_process_target): Update.
3891
3892 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3893
3894 Turn process_stratum_target's thread_alive op into a method of
3895 process_target.
3896
3897 * target.h (struct process_stratum_target): Remove the target op.
3898 (class process_target): Add the target op.
3899 (mythread_alive): Update the macro.
3900
3901 Update the derived classes and callers below.
3902
3903 * linux-low.cc (linux_target_ops): Update.
3904 (linux_thread_alive): Turn into ...
3905 (linux_process_target::thread_alive): ... this.
3906 (wait_for_sigstop): Update.
3907 * linux-low.h (class linux_process_target): Update.
3908 * lynx-low.cc (lynx_target_ops): Update.
3909 (lynx_thread_alive): Turn into ...
3910 (lynx_process_target::thread_alive): ... this.
3911 * lynx-low.h (class lynx_process_target): Update.
3912 * nto-low.cc (nto_target_ops): Update.
3913 (nto_thread_alive): Turn into ...
3914 (nto_process_target::thread_alive): ... this.
3915 * nto-low.h (class nto_process_target): Update.
3916 * win32-low.cc (win32_target_ops): Update.
3917 (win32_thread_alive): Turn into ...
3918 (win32_process_target::thread_alive): ... this.
3919 * win32-low.h (class win32_process_target): Update.
3920
3921 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3922
3923 Turn process_stratum_target's join op into a method of
3924 process_target.
3925
3926 * target.h (struct process_stratum_target): Remove the target op.
3927 (class process_target): Add the target op.
3928 (join_inferior): Update the macro.
3929
3930 Update the derived classes and callers below.
3931
3932 * linux-low.cc (linux_target_ops): Update.
3933 (linux_join): Turn into ...
3934 (linux_process_target::join): ... this.
3935 * linux-low.h (class linux_process_target): Update.
3936 * lynx-low.cc (lynx_target_ops): Update.
3937 (lynx_join): Turn into ...
3938 (lynx_process_target::join): ... this.
3939 * lynx-low.h (class lynx_process_target): Update.
3940 * nto-low.cc (nto_target_ops): Update.
3941 (nto_process_target::join): Define.
3942 * nto-low.h (class nto_process_target): Update.
3943 * win32-low.cc (win32_target_ops): Update.
3944 (win32_join): Turn into ...
3945 (win32_process_target::join): ... this.
3946 * win32-low.h (class win32_process_target): Update.
3947
3948 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3949
3950 Turn process_stratum_target's mourn op into a method of
3951 process_target.
3952
3953 * target.h (struct process_stratum_target): Remove the target op.
3954 (class process_target): Add the target op.
3955
3956 Update the derived classes and callers below.
3957
3958 * target.cc (target_mourn_inferior): Update.
3959 * linux-low.cc (linux_target_ops): Update.
3960 (linux_mourn): Turn into ...
3961 (linux_process_target::mourn): ... this.
3962 (handle_extended_wait): Update.
3963 (linux_process_target::kill): Update.
3964 (linux_process_target::detach): Update.
3965 * linux-low.h (class linux_process_target): Update.
3966 * lynx-low.cc (lynx_target_ops): Update.
3967 (lynx_mourn): Turn into ...
3968 (lynx_process_target::mourn): ... this.
3969 * lynx-low.h (class lynx_process_target): Update.
3970 * nto-low.cc (nto_target_ops): Update.
3971 (nto_mourn): Turn into ...
3972 (nto_process_target::mourn): ... this.
3973 * nto-low.h (class nto_process_target): Update.
3974 * win32-low.cc (win32_target_ops): Update.
3975 (win32_mourn): Turn into ...
3976 (win32_process_target::mourn): ... this.
3977 * win32-low.h (class win32_process_target): Update.
3978
3979 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3980
3981 Turn process_stratum_target's detach op into a method of
3982 process_target.
3983
3984 * target.h (struct process_stratum_target): Remove the target op.
3985 (class process_target): Add the target op.
3986 (detach_inferior): Update the macro.
3987
3988 Update the derived classes and callers below.
3989
3990 * linux-low.cc (linux_target_ops): Update.
3991 (linux_detach): Turn into ...
3992 (linux_process_target::detach): ... this.
3993 * linux-low.h (class linux_process_target): Update.
3994 * lynx-low.cc (lynx_target_ops): Update.
3995 (lynx_detach): Turn into ...
3996 (lynx_process_target::detach): ... this.
3997 * lynx-low.h (class lynx_process_target): Update.
3998 * nto-low.cc (nto_target_ops): Update.
3999 (nto_detach): Turn into ...
4000 (nto_process_target::detach): ... this.
4001 * nto-low.h (class nto_process_target): Update.
4002 * win32-low.cc (win32_target_ops): Update.
4003 (win32_detach): Turn into ...
4004 (win32_process_target::detach): ... this.
4005 * win32-low.h (class win32_process_target): Update.
4006
4007 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4008
4009 Turn process_stratum_target's kill op into a method of
4010 process_target.
4011
4012 * target.h (struct process_stratum_target): Remove the target op.
4013 (class process_target): Add the target op.
4014
4015 Update the derived classes and callers below.
4016
4017 * target.cc (kill_inferior): Update.
4018 * linux-low.cc (linux_target_ops): Update.
4019 (linux_kill): Turn into ...
4020 (linux_process_target::kill): ... this.
4021 * linux-low.h (class linux_process_target): Update.
4022 * lynx-low.cc (lynx_target_ops): Update.
4023 (lynx_kill): Turn into ...
4024 (lynx_process_target::kill): ... this.
4025 * lynx-low.h (class lynx_process_target): Update.
4026 * nto-low.cc (nto_target_ops): Update.
4027 (nto_kill): Turn into ...
4028 (nto_process_target::kill): ... this.
4029 * nto-low.h (class nto_process_target): Update.
4030 * win32-low.cc (win32_target_ops): Update.
4031 (win32_kill): Turn into ...
4032 (win32_process_target::kill): ... this.
4033 * win32-low.h (class win32_process_target): Update.
4034
4035 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4036
4037 Turn process_stratum_target's attach op into a method of
4038 process_target.
4039
4040 * target.h (struct process_stratum_target): Remove the target op.
4041 (class process_target): Add the target op.
4042 (myattach): Update the macro.
4043
4044 Update the derived classes and callers below.
4045
4046 * linux-low.cc (linux_target_ops): Update.
4047 (linux_attach): Turn into ...
4048 (linux_process_target::attach): ... this.
4049 * linux-low.h (class linux_process_target): Update.
4050 * lynx-low.cc (lynx_target_ops): Update.
4051 (lynx_attach): Turn into ...
4052 (lynx_process_target::attach): ... this.
4053 * lynx-low.h (class lynx_process_target): Update.
4054 * nto-low.cc (nto_target_ops): Update.
4055 (nto_attach): Turn into ...
4056 (nto_process_target::attach): ... this.
4057 * nto-low.h (class nto_process_target): Update.
4058 * win32-low.cc (win32_target_ops): Update.
4059 (win32_attach): Turn into ...
4060 (win32_process_target::attach): ... this.
4061 * win32-low.h (class win32_process_target): Update.
4062
4063 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4064
4065 Turn process_stratum_target's post_create_inferior op into a method
4066 of process_target.
4067
4068 * target.h (struct process_stratum_target): Remove the target op.
4069 (class process_target): Add the target op.
4070 (target_post_create_inferior): Update the macro.
4071 * target.cc (process_target::post_create_inferior): Define.
4072
4073 Update the derived classes and callers below.
4074
4075 * linux-low.cc (linux_target_ops): Update.
4076 (linux_post_create_inferior): Turn into ...
4077 (linux_process_target::post_create_inferior): ... this.
4078 * linux-low.h (class linux_process_target): Update.
4079 * lynx-low.cc (lynx_target_ops): Update.
4080 * nto-low.cc (nto_target_ops): Update.
4081 * win32-low.cc (win32_target_ops): Update.
4082
4083 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4084
4085 Turn process_stratum_target's create_inferior op into a method of
4086 process_target.
4087
4088 * target.h (struct process_stratum_target): Remove the target op.
4089 (class process_target): Add the target op.
4090 (create_inferior): Rename the macro to ...
4091 (target_create_inferior): ... this.
4092
4093 Update the derived classes and callers below.
4094
4095 * server.cc (handle_v_run): Update.
4096 (captured_main): Update.
4097 (process_serial_event): Update.
4098 * linux-low.cc (linux_target_ops): Update.
4099 (linux_create_inferior): Turn into ...
4100 (linux_process_target::create_inferior): ... this.
4101 * linux-low.h (class linux_process_target): Update.
4102 * lynx-low.cc (lynx_target_ops): Update.
4103 (lynx_create_inferior): Turn into ...
4104 (lynx_process_target::create_inferior): ... this.
4105 * lynx-low.h (class lynx_process_target): Update.
4106 * nto-low.cc (nto_target_ops): Update.
4107 (nto_create_inferior): Turn into ...
4108 (nto_process_target::create_inferior): ... this.
4109 * nto-low.h (class nto_process_target): Update.
4110 * win32-low.cc (win32_target_ops): Update.
4111 (win32_create_inferior): Turn into ...
4112 (win32_process_target::create_inferior): ... 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 * target.h (class process_target): New class definition.
4118 (struct process_stratum_target) <pt>: New field with type
4119 'process_target*'.
4120 * linux-low.h (class linux_process_target): Define as a derived
4121 class of 'process_target'.
4122 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4123 as the 'pt' field.
4124 * lynx-low.h (class lynx_process_target): Define as a derived
4125 class of 'process_target'.
4126 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4127 as the 'pt' field.
4128 * nto-low.h (class nto_process_target): Define as a derived
4129 class of 'process_target'.
4130 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4131 as the 'pt' field.
4132 * win32-low.h (class win32_process_target): Define as a derived
4133 class of 'process_target'.
4134 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4135 as the 'pt' field.
4136
4137 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4138
4139 * configure: Regenerate.
4140
4141 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4142 Andrew Burgess <andrew.burgess@embecosm.com>
4143
4144 * linux-riscv-low.cc: New file.
4145 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4146 and nat/riscv-linux-tdesc.c.
4147 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4148 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4149 Define.
4150
4151 2020-02-14 Tom Tromey <tom@tromey.com>
4152
4153 * acinclude.m4: Don't include acx_configure_dir.m4.
4154 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4155 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4156 (all, install-only, uninstall, clean-info, clean)
4157 (maintainer-clean): Don't recurse.
4158 (subdir_do, all-lib): Remove.
4159 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4160 (GNULIB_H): Remove.
4161 (generated_files): Update.
4162 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4163 * configure: Rebuild.
4164 * configure.ac: Don't configure gnulib or libiberty.
4165 (GNULIB): Update.
4166
4167 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4168
4169 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4170 preparing the command line for CreateProcess.
4171 (win32_create_inferior): Reflect the program name in debugging
4172 output that shows the process and its command line.
4173
4174 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4175
4176 * Makefile.in: Rename source files from .c to .cc.
4177 * %.c: Rename to %.cc.
4178 * configure.ac: Rename server.c to server.cc.
4179 * configure: Re-generate.
4180
4181 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4182
4183 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4184
4185 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4186
4187 * win32-low.c (win32_create_inferior): Set signal_pid.
4188
4189 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4190 Pedro Alves <palves@redhat.com>
4191
4192 Skip building gdbserver in a cross-configuration.
4193 * configure.srv: Set $gdbserver_host depending on whether $target
4194 is $host. Use $gdbserver_host instead of $host.
4195
4196 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4197
4198 * configure: Re-generate.
4199
4200 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4201
4202 * configure: Re-generate.
4203
4204 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4205
4206 * acinclude.m4: Update warning.m4 path.
4207
4208 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4209
4210 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4211 (handle_exception): Set siginfo_er.
4212 (win32_xfer_siginfo): New function.
4213
4214 2020-02-07 Tom Tromey <tom@tromey.com>
4215 Pedro Alves <palves@redhat.com>
4216
4217 * README: Update build documentation.
4218 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4219 host, not target.
4220 * configure.ac: Update paths.
4221 * configure: Rebuild.
4222 * acinclude.m4: Update paths.
4223 * Makefile.in: Update include paths.
4224 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4225 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4226 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4227 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4228 (%-generated.c): Update paths.
4229 * Move entire directory from ../gdb/gdbserver.
4230
4231 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4232
4233 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4234
4235 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4236
4237 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4238 assignment instead of srv_linux_obj.
4239
4240 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4241
4242 * server.c (handle_qxfer_libraries): Write segment-address with
4243 paddress.
4244
4245 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4246
4247 * Makefile.in (install-strip): New target.
4248 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4249 * aclocal.m4: Regenerate.
4250 * configure: Regenerate.
4251 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4252
4253 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4254
4255 * Makefile.in (SFILES): Adjust paths to point to real files.
4256 (OBS): Move waitstatus.o to target/waitstatus.o.
4257 (TAGS): Transform paths appropriately.
4258 (%.o): Rename to...
4259 (nat/%.o): ... this pattern rule.
4260 (%.o): Rename to...
4261 (target/%.o): ... this pattern rule.
4262 * configure.srv: Adjust paths throughout to include nat/ prefix
4263 with the revant files.
4264 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4265 * configure: Regenerate.
4266
4267 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4268
4269 * Makefile.in (TAGS): Remove config files from the recipe.
4270
4271 2020-01-14 Tom Tromey <tom@tromey.com>
4272
4273 * configure: Rebuild.
4274 * configure.ac: Remove any checks that were added to common.m4.
4275 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4276 lib-link.m4.
4277
4278 2020-01-14 Tom Tromey <tom@tromey.com>
4279
4280 * server.h: Include config.h.
4281 * gdbreplay.c: Include config.h.
4282 * configure: Rebuild.
4283 * configure.ac: Don't source common.host.
4284 * acinclude.m4: Update path.
4285 * Makefile.in (INCSUPPORT): New variable.
4286 (INCLUDE_CFLAGS): Add INCSUPPORT.
4287 (SFILES): Update paths.
4288 (version-generated.c): Update path to create-version.sh.
4289 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4290
4291 2020-01-14 Tom Tromey <tom@tromey.com>
4292
4293 * configure.ac (LIBS): Use WIN32APILIBS.
4294 (USE_WIN32API): Don't define.
4295 * configure: Rebuild.
4296
4297 2020-01-14 Tom Tromey <tom@tromey.com>
4298
4299 * configure: Rebuild.
4300
4301 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4302
4303 * Makefile.in (%-generated.c): Remove rule for files from
4304 regformats/i386.
4305
4306 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4307
4308 * configure: Re-generate.
4309
4310 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4311
4312 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4313 Define to static.
4314 * tracepoint.c (stop_tracing, flush_trace_buffer,
4315 about_to_request_buffer_space, get_trace_state_variable_value,
4316 set_trace_state_variable_value, gdb_collect): Add declaration.
4317
4318 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4319
4320 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4321 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4322 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4323 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4324 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4325 static.
4326
4327 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4328
4329 * inferiors.c: Include gdbsupport/common-inferior.h.
4330
4331 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4332
4333 * hostio-errno.c: Include hostio.h.
4334
4335 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4336
4337 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4338 prerequisite.
4339
4340 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4341
4342 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4343 * linux-arm-tdesc.h: Include arch/arm.h.
4344
4345 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4346
4347 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4348
4349 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4350
4351 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4352 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4353
4354 2020-01-10 Pedro Alves <palves@redhat.com>
4355
4356 * fork-child.c (post_fork_inferior): Pass target down to
4357 startup_inferior.
4358 * inferiors.c (switch_to_thread): Add process_stratum_target
4359 parameter.
4360 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4361 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4362 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4363 * remote-utils.c (prepare_resume_reply): Pass the target to
4364 switch_to_thread.
4365 * target.c (the_target): Now a process_stratum_target.
4366 (done_accessing_memory): Pass the target to switch_to_thread.
4367 (set_target_ops): Ajust to use process_stratum_target.
4368 * target.h (struct target_ops): Rename to ...
4369 (struct process_stratum_target): ... this.
4370 (the_target, set_target_ops): Adjust.
4371 (prepare_to_access_memory): Adjust comment.
4372 * win32-low.c (child_xfer_memory): Adjust to use
4373 process_stratum_target.
4374 (win32_target_ops): Now a process_stratum_target.
4375
4376 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4377 Pedro Alves <palves@redhat.com>
4378
4379 * win32-low.c (get_child_debug_event): Extract the fatal exception
4380 from the exit status and convert to the equivalent Posix signal
4381 number.
4382 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4383 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4384
4385 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4386
4387 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4388
4389 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4390
4391 * server.c (gdbserver_version): Change copyright year to 2020.
4392 * gdbreplay.c (gdbreplay_version): Likewise.
4393
4394 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4395
4396 * configure: Regenerate.
4397 * configure.ac: Quote variable arguments of test.
4398
4399 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4400
4401 * Makefile.in: Fix build with GNU Make 3.81
4402
4403 2019-12-16 Tom Tromey <tromey@adacore.com>
4404
4405 * server.c (get_exec_file): Constify result.
4406
4407 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4408
4409 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4410 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4411 * config.in: Regenerate.
4412 * configure: Regenerate.
4413 * configure.ac: Don't check for strerror.
4414 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4415 Call safe_strerror instead of strerror.
4416 * server.h (strerror): Remove this now-unnecessary declaration.
4417 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4418 strerror.
4419 (gdb_agent_helper_thread): Likewise.
4420 * utils.c (perror_with_name): Likewise.
4421
4422 2019-11-26 Tom Tromey <tom@tromey.com>
4423
4424 * configure, config.in: Rebuild.
4425
4426 2019-11-26 Tom Tromey <tom@tromey.com>
4427
4428 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4429 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4430 gdb_sigmask.
4431 * configure, config.in: Rebuild.
4432
4433 2019-11-26 Tom Tromey <tom@tromey.com>
4434
4435 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4436 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4437 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4438 * acinclude.m4: Include ax_pthread.m4.
4439 * config.in, configure: Rebuild.
4440
4441 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4442
4443 * debug.c (debug_set_output): Call safe_strerror instead of
4444 strerror.
4445 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4446 (linux_kill_one_lwp): Likewise.
4447 (linux_detach_one_lwp): Likewise.
4448 (linux_wait_for_event_filtered): Likewise.
4449 (store_register): Likewise.
4450 * lynx-low.c (lynx_attach): Likewise.
4451 * mem-break.c (insert_memory_breakpoint): Likewise.
4452 (remove_memory_breakpoint): Likewise.
4453 (delete_fast_tracepoint_jump): Likewise.
4454 (set_fast_tracepoint_jump): Likewise.
4455 (uninsert_fast_tracepoint_jumps_at): Likewise.
4456 (reinsert_fast_tracepoint_jumps_at): Likewise.
4457 * nto-low.c (nto_xfer_memory): Likewise.
4458 (nto_resume): Likewise.
4459
4460 2019-11-20 Luis Machado <luis.machado@linaro.org>
4461
4462 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4463 instead of register count.
4464 * tdesc.c (tdesc_contains_feature): New function.
4465 * tdesc.h (tdesc_contains_feature): New prototype.
4466
4467 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4468
4469 * Makefile.in: Add safe-strerror.c.
4470 * configure: Regenerate.
4471 * configure.ac: Don't source common.host.
4472
4473 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4474
4475 * config.in: Regenerate.
4476 * configure: Regenerate.
4477
4478 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4479
4480 * ax.c (ax_printf): Handle size_t_arg.
4481
4482 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4483
4484 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4485 * mi/mi-main.c (output_cores): Likewise.
4486 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4487 (linux_xfer_osdata_modules): Likewise.
4488 * remote.c (register_remote_support_xml): Likewise.
4489 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4490 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4491
4492 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4493
4494 * configure: Regenerate.
4495 * configure.ac: Remove check for strerror_r.
4496
4497 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4498
4499 * config.in: Regenerate.
4500 * configure: Regenerate.
4501 * configure.ac: Also check for strerror_r.
4502
4503 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4504
4505 * ax.h (debug_agent): Remove duplicate declaration.
4506
4507 2019-10-26 Tom de Vries <tdevries@suse.de>
4508
4509 * linux-aarch64-low.c: Fix typos in comments.
4510 * linux-arm-low.c: Same.
4511 * linux-low.c: Same.
4512 * linux-ppc-low.c: Same.
4513 * proc-service.c: Same.
4514 * regcache.h: Same.
4515 * server.c: Same.
4516 * tracepoint.c: Same.
4517 * win32-low.c: Same.
4518
4519 2019-10-25 Tom Tromey <tromey@adacore.com>
4520
4521 * utils.c (xstrdup): Remove.
4522
4523 2019-10-23 Tom Tromey <tom@tromey.com>
4524
4525 * configure, config.in: Rebuild.
4526
4527 2019-10-23 Tom Tromey <tom@tromey.com>
4528
4529 * configure: Rebuild.
4530 * acinclude.m4: Use m4_include, not sinclude.
4531
4532 2019-10-17 Tom Tromey <tromey@adacore.com>
4533
4534 * configure: Rebuild.
4535 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4536 in AC_CONFIG_FILES invocation.
4537 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4538 invocation.
4539
4540 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4541
4542 * server.c: Include xml-builtin.h.
4543 (get_xml_features): Don't declare xml_builtins here.
4544
4545 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4546
4547 * Makefile.in: Remove references to vec-ipa.o.
4548
4549 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4550
4551 * Makefile.in: Remove references to vec.c.
4552
4553 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4554
4555 * server.c (server_waiting): Change to bool.
4556 (extended_protocol): Likewise.
4557 (response_needed): Likewise.
4558 (exit_requested): Likewise.
4559 (run_once): Likewise.
4560 (report_no_resumed): Likewise.
4561 (non_stop): Likewise.
4562 (disable_packet_vCont): Likewise.
4563 (disable_packet_Tthread): Likewise.
4564 (disable_packet_qC): Likewise.
4565 (disable_packet_qfThreadInfo): Likewise.
4566 (handle_general_set): Update.
4567 (handle_detach): Update.
4568 (handle_monitor_command): Update.
4569 (handle_query): Update.
4570 (captured_main): Update.
4571 (process_serial_event): Update.
4572 * server.h (server_waiting): Change to bool.
4573 (disable_packet_vCont): Likewise.
4574 (disable_packet_Tthread): Likewise.
4575 (disable_packet_qC): Likewise.
4576 (disable_packet_qfThreadInfo): Likewise.
4577 (run_once): Likewise.
4578 (non_stop): Likewise.
4579 * target.c (target_stop_and_wait): Update.
4580
4581 2019-10-02 Tom Tromey <tromey@adacore.com>
4582
4583 * Makefile.in (SFILES): Add common-inferior.c.
4584 (OBS): Add common-inferior.o.
4585 * server.c (startup_with_shell): Don't define.
4586
4587 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4588
4589 * linux-low.c (linux_low_read_btrace): Update for change to
4590 std::vector.
4591
4592 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4593
4594 * debug.c (debug_threads): Remove comment in favor of the header.
4595 * debug.h (using_threads): Add declaration.
4596 (debug_threads): Add comment.
4597 * linux-aarch64-low.c: Include debug.h and remove declaration of
4598 debug_threads.
4599 * nto-low.c: Likewise.
4600 * remote-utils.c: Likewise.
4601 * thread-db.c: Likewise.
4602
4603 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4604
4605 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4606 and powerpc-cell64l-ipa.o.
4607 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4608 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4609 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4610 (spu*-*-*): Remove.
4611
4612 * spu-low.c: Remove file.
4613
4614 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4615 (parse_spufs_run): Remove.
4616 (ppc_get_pc): Remove Cell/B.E. support.
4617 (ppc_set_pc): Likewise.
4618 (ppc_breakpoint_at): Likewise.
4619 (ppc_arch_setup): Likewise.
4620 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4621 tdesc_powerpc_cell32l.
4622 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4623 or init_registers_powerpc_cell32l.
4624 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4625 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4626 or init_registers_powerpc_cell32l.
4627 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4628 (init_registers_powerpc_cell32l): Remove prototype.
4629 (init_registers_powerpc_cell64l): Likewise.
4630
4631 * target.h (struct target_ops): Remove qxfer_spu member.
4632 * server.c (handle_qxfer_spu): Remove.
4633 (qxfer_packets): Remove entry for "spu".
4634 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4635 * linux-low.c (SPUFS_MAGIC): Remove.
4636 (spu_enumerate_spu_ids): Remove.
4637 (linux_qxfer_spu): Remove.
4638 (linux_target_ops): Remove qxfer_spu member.
4639 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4640 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4641 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4642
4643 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4644
4645 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4646 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4647 * config.in: Regenerate.
4648 * configure: Regenerate.
4649
4650 2019-08-15 Tom Tromey <tromey@adacore.com>
4651
4652 * target.c (target_write_memory): Use gdb::byte_vector.
4653
4654 2019-08-15 Tom Tromey <tromey@adacore.com>
4655
4656 * tracepoint.c (write_inferior_data_pointer)
4657 (write_inferior_integer, write_inferior_int8)
4658 (write_inferior_uinteger, m_tracepoint_action_download)
4659 (r_tracepoint_action_download, x_tracepoint_action_download)
4660 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4661 (download_agent_expr, download_tracepoint_1)
4662 (download_trace_state_variables, upload_fast_traceframes): Update.
4663 * server.c (gdb_write_memory): Update.
4664 * remote-utils.c (relocate_instruction): Update.
4665 * proc-service.c (ps_pdwrite): Update.
4666 * mem-break.c (remove_memory_breakpoint)
4667 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4668 (uninsert_fast_tracepoint_jumps_at)
4669 (reinsert_fast_tracepoint_jumps_at): Update.
4670 * linux-x86-low.c (append_insns)
4671 (i386_install_fast_tracepoint_jump_pad)
4672 (amd64_write_goto_address, i386_write_goto_address): Update.
4673 * linux-s390-low.c (append_insns, s390_write_goto_address):
4674 Update.
4675 * linux-ppc-low.c (ppc_relocate_instruction)
4676 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4677 (ppc_write_goto_address): Update.
4678 * linux-aarch64-low.c (append_insns): Update.
4679 * target.h (struct target_ops): Update.
4680 (write_inferior_memory): Don't declare.
4681 * target.c (target_write_memory): Rename from
4682 write_inferior_memory. Remove old target_write_memory.
4683
4684 2019-08-15 Tom Tromey <tromey@adacore.com>
4685
4686 * target.c (write_inferior_memory): Use std::vector.
4687
4688 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4689
4690 PR build/24886
4691 * configure.ac: Drop enable-libmcheck support.
4692 * configure, config.in: Rebuild.
4693 * acinclude.m4: Don't include it.
4694
4695 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4696
4697 * configure.srv: Remove Arm xml files.
4698
4699 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4700
4701 * configure.srv: Add new files. Remove xml generated files.
4702 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4703 registers.
4704 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4705 * linux-aarch32-tdesc.c: New file.
4706 * linux-aarch32-tdesc.h: New file.
4707 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4708 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4709 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4710 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4711 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4712 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4713 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4714 (arm_read_description): Call arm_linux_read_description.
4715 (initialize_low_arch): Don't init registers.
4716 * linux-arm-tdesc.c: New file.
4717 * linux-arm-tdesc.h: New file.
4718
4719 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4720
4721 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4722 Move counter inside for.
4723 (arm_read_description): Check ptrace earlier.
4724 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4725
4726 2019-07-09 Tom Tromey <tom@tromey.com>
4727
4728 * configure: Rebuild.
4729 * configure.ac: Change common to gdbsupport.
4730 * acinclude.m4: Change common to gdbsupport.
4731 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4732 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4733 common to gdbsupport.
4734 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4735 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4736 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4737 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4738 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4739 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4740 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4741 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4742 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4743 common to gdbsupport.
4744
4745 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4746
4747 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4748 defines.
4749 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4750
4751 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4752
4753 * configure.srv: Remove legacy xml.
4754 * linux-aarch64-low.c (initialize_low_arch): Remove
4755 initialize_low_tdesc call.
4756 * linux-aarch64-tdesc-selftest.c: Remove file.
4757 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4758 * linux-x86-low.c (initialize_low_arch): Remove
4759 initialize_low_tdesc call.
4760 * linux-x86-tdesc-selftest.c: Remove file.
4761 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4762
4763 2019-06-20 Tom de Vries <tdevries@suse.de>
4764
4765 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4766 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4767
4768 2019-06-19 Tom de Vries <tdevries@suse.de>
4769
4770 * debug.h (debug_write): Change return type to ssize_t.
4771 * debug.c (debug_write): Same.
4772
4773 2019-06-14 Tom Tromey <tom@tromey.com>
4774
4775 * configure.ac: Use new path to gnulib.
4776 * configure: Rebuild.
4777 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4778 to gnulib.
4779
4780 2019-06-11 Tom Tromey <tom@tromey.com>
4781
4782 * Makefile.in (SFILES): Add alloc.c.
4783 (OBS): Add alloc.o.
4784 (IPA_OBJS): Add alloc-ipa.o.
4785 (alloc-ipa.o): New target.
4786 (%.o: ../%.c): New pattern rule.
4787
4788 2019-06-10 Tom Tromey <tromey@adacore.com>
4789
4790 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4791 end warning with a newline.
4792 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4793 newline.
4794 * thread-db.c (attach_thread): Don't end warning with a newline.
4795 (thread_db_notice_clone): Likewise.
4796 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4797 newline.
4798 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4799 end warning with a newline.
4800
4801 2019-06-04 Pedro Alves <palves@redhat.com>
4802
4803 * server.c (captured_main): Use make_unique_xstrdup.
4804
4805 2019-06-02 Tom Tromey <tom@tromey.com>
4806
4807 * gdbreplay.c (fromhex): Remove.
4808 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4809
4810 2019-05-29 Tom Tromey <tromey@adacore.com>
4811
4812 * configure: Rebuild.
4813
4814 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4815
4816 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4817 sign extension code on 32-bit builds.
4818
4819 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4820
4821 * remote-utils.c:
4822 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4823
4824 2019-04-19 Tom Tromey <tom@tromey.com>
4825
4826 * server.c (struct vstop_notif): Derive from notif_event.
4827 <base>: Remove.
4828 (queue_stop_reply): Update.
4829 (remove_all_on_match_ptid): Change type. Rewrite.
4830 (discard_queued_stop_replies): Rewrite.
4831 (in_queued_stop_replies_ptid): Change type.
4832 (in_queued_stop_replies): Rewrite.
4833 (notif_stop): Update.
4834 (queue_stop_reply_callback): Update.
4835 (captured_main): Don't call initialize_notif.
4836 (push_stop_notification): Update.
4837 * notif.c (notif_write_event, handle_notif_ack)
4838 (notif_event_enque, notif_push): Update.
4839 (notif_event_xfree, initialize_notif): Remove.
4840 * notif.h (struct notif_event): Include <list>, not
4841 "common/queue.h".
4842 (struct notif_server) <queue>: Now a std::list.
4843 (notif_event_p): Remove typedef.
4844 (initialize_notif): Don't declare.
4845 (struct notif_event): Add virtual destructor.
4846
4847 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4848
4849 * ax.c (ax_vdebug): Call debug_printf.
4850 * debug.c (debug_write): New function.
4851 * debug.h (debug_write): New declaration.
4852 * linux-low.c (sigchld_handler): Call debug_write.
4853
4854 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4855
4856 * debug.c (debug_set_output): New function.
4857 (debug_vprintf): Send output to debug_file.
4858 (debug_flush): Likewise.
4859 * debug.h (debug_set_output): New declaration.
4860 * server.c (handle_monitor_command): Add debug-file option.
4861 (captured_main): Likewise.
4862
4863 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4864
4865 * debug.c (remote_debug): Add definition.
4866 * debug.h (remote_debug): Add declaration.
4867 * hostio.c (remote_debug): Remove declaration.
4868 * remote-utils.c (struct ui_file): Likewise.
4869 (remote_debug): Likewise.
4870 * remote-utils.h (remote_debug): Likewise,
4871 * server.c (remote_debug): Remove definition.
4872
4873 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4874
4875 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4876 when using a 64-bit gdbserver.
4877
4878 2019-04-09 Tom Tromey <tromey@adacore.com>
4879
4880 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4881
4882 2019-04-08 Tom Tromey <tom@tromey.com>
4883
4884 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4885 throw.
4886 (linux_resume_one_lwp): Likewise.
4887
4888 2019-04-08 Tom Tromey <tom@tromey.com>
4889
4890 * gdbreplay.c: Update.
4891 * linux-low.c: Update.
4892 * server.c: Update.
4893
4894 2019-04-08 Tom Tromey <tom@tromey.com>
4895
4896 * server.c: Use C++ exception handling.
4897 * linux-low.c: Use C++ exception handling.
4898 * gdbreplay.c: Use C++ exception handling.
4899
4900 2019-04-08 Tom Tromey <tom@tromey.com>
4901
4902 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4903 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4904 (captured_main, main): Update.
4905 * gdbreplay.c (main): Update.
4906
4907 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4908
4909 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4910 value in argument pointer, return 1 if the entry is found and 0
4911 otherwise. Move comment.
4912 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4913 * linux-low.h (linux_get_auxv): Declare.
4914 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4915
4916 2019-04-05 Tom Tromey <tromey@adacore.com>
4917
4918 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4919 variables.
4920
4921 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4922
4923 * linux-low.c (AT_HWCAP2): Add define if not already included.
4924
4925 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4926
4927 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4928 (aarch64_arch_setup): Call linux_get_hwcap.
4929 * linux-arm-low.c (arm_get_hwcap): Remove function.
4930 (arm_read_description): Call linux_get_hwcap.
4931 * linux-low.c (linux_get_auxv): New function.
4932 (linux_get_hwcap): Likewise.
4933 (linux_get_hwcap2): Likewise.
4934 * linux-low.h (linux_get_hwcap): New declaration.
4935 (linux_get_hwcap2): Likewise.
4936 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4937 (ppc_arch_setup): Call linux_get_hwcap.
4938 * linux-s390-low.c (s390_get_hwcap): Remove function.
4939 (s390_arch_setup): Call linux_get_hwcap.
4940
4941 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4942 Jiong Wang <jiong.wang@arm.com>
4943
4944 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4945 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4946 to fail.
4947 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4948
4949 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4950 Jiong Wang <jiong.wang@arm.com>
4951
4952 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4953 (aarch64_get_hwcap): New function.
4954 (aarch64_arch_setup): Read APIA hwcap.
4955
4956 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4957 Jiong Wang <jiong.wang@arm.com>
4958
4959 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4960 (initialize_low_tracepoint): Likewise.
4961 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4962 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4963 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4964 (aarch64_linux_read_description): Likewise.
4965 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4966
4967 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4968
4969 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4970 i386_create_target_description for 'segments' parameter.
4971 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4972 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4973 * win32-i386-low.c (i386_arch_setup): Likewise.
4974
4975 2019-03-12 Tom Tromey <tromey@adacore.com>
4976
4977 * linux-low.c (iterate_over_lwps): Update.
4978
4979 2019-03-06 Tom Tromey <tom@tromey.com>
4980
4981 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4982 (captured_main): Use SCOPE_EXIT.
4983
4984 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4985
4986 * configure.srv: Use '$enable_unittest' instead of '$development'
4987 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4988 case.
4989
4990 2019-02-27 Tom Tromey <tromey@adacore.com>
4991
4992 * gdbreplay.c (logchar): Handle \r\n.
4993
4994 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4995
4996 * linux-low.c (linux_attach): Add process before lwp.
4997 * server.c (attach_inferior): Check if already attached.
4998
4999 2019-02-07 Tom Tromey <tom@tromey.com>
5000
5001 * x86-tdesc.h: Rename include guard.
5002 * x86-low.h: Add include guard.
5003 * wincecompat.h: Rename include guard.
5004 * win32-low.h: Add include guard.
5005 * utils.h: Rename include guard.
5006 * tracepoint.h: Rename include guard.
5007 * tdesc.h: Rename include guard.
5008 * target.h: Rename include guard.
5009 * server.h: Rename include guard.
5010 * remote-utils.h: Rename include guard.
5011 * regcache.h: Rename include guard.
5012 * nto-low.h: Rename include guard.
5013 * notif.h: Add include guard.
5014 * mem-break.h: Rename include guard.
5015 * lynx-low.h: Add include guard.
5016 * linux-x86-tdesc.h: Add include guard.
5017 * linux-s390-tdesc.h: Add include guard.
5018 * linux-ppc-tdesc-init.h: Add include guard.
5019 * linux-low.h: Add include guard.
5020 * linux-aarch64-tdesc.h: Add include guard.
5021 * linux-aarch32-low.h: Add include guard.
5022 * inferiors.h: Rename include guard.
5023 * i387-fp.h: Rename include guard.
5024 * hostio.h: Rename include guard.
5025 * gdbthread.h: Rename include guard.
5026 * gdb_proc_service.h: Rename include guard.
5027 * event-loop.h: Rename include guard.
5028 * dll.h: Rename include guard.
5029 * debug.h: Rename include guard.
5030 * ax.h: Rename include guard.
5031
5032 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5033
5034 PR gdb/23985
5035 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5036 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5037
5038 2019-01-25 Tom Tromey <tom@tromey.com>
5039
5040 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5041
5042 2019-01-25 Tom Tromey <tom@tromey.com>
5043
5044 * win32-low.c: Fix common/ includes.
5045 * win32-i386-low.c: Fix common/ includes.
5046 * tracepoint.c: Fix common/ includes.
5047 * thread-db.c: Fix common/ includes.
5048 * target.h: Fix common/ includes.
5049 * symbol.c: Fix common/ includes.
5050 * spu-low.c: Fix common/ includes.
5051 * server.h: Fix common/ includes.
5052 * server.c: Fix common/ includes.
5053 * remote-utils.c: Fix common/ includes.
5054 * regcache.h: Fix common/ includes.
5055 * regcache.c: Fix common/ includes.
5056 * nto-x86-low.c: Fix common/ includes.
5057 * notif.h: Fix common/ includes.
5058 * mem-break.h: Fix common/ includes.
5059 * lynx-low.c: Fix common/ includes.
5060 * lynx-i386-low.c: Fix common/ includes.
5061 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5062 * linux-x86-low.c: Fix common/ includes.
5063 * linux-low.c: Fix common/ includes.
5064 * inferiors.h: Fix common/ includes.
5065 * i387-fp.c: Fix common/ includes.
5066 * hostio.c: Fix common/ includes.
5067 * hostio-errno.c: Fix common/ includes.
5068 * gdbthread.h: Fix common/ includes.
5069 * gdbreplay.c: Fix common/ includes.
5070 * fork-child.c: Fix common/ includes.
5071 * event-loop.c: Fix common/ includes.
5072 * ax.c:
5073 (enum gdb_agent_op): Fix common/ includes.
5074
5075 2019-01-21 Tom Tromey <tom@tromey.com>
5076
5077 * tracepoint.c: Fix includes.
5078 * remote-utils.c: Fix includes.
5079 * linux-x86-low.c: Fix includes.
5080
5081 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5082
5083 * gdbreplay.c (gdbreplay_version): Update copyright year in
5084 version message.
5085 * server.c (gdbserver_version): Likewise.
5086
5087 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5088
5089 * linux-low.c (add_lwp): Switch ordering.
5090
5091 2018-11-29 Tom Tromey <tom@tromey.com>
5092
5093 * win32-low.c (win32_join): Take pid, not process.
5094 * target.h (struct target_ops) <join>: Change argument type.
5095 (join_inferior): Change argument name.
5096 * spu-low.c (spu_join): Take pid, not process.
5097 * server.c (handle_detach): Preserve pid before destroying
5098 process.
5099 * lynx-low.c (lynx_join): Take pid, not process.
5100 * linux-low.c (linux_join): Take pid, not process.
5101
5102 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5103
5104 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5105 (aarch64_cannot_fetch_register): Likewise.
5106 (struct linux_target_ops): Update references.
5107
5108 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5109
5110 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5111
5112 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5113
5114 * configure.srv (ipa_ppc_linux_regobj): Add
5115 powerpc-isa207-htm-vsx32l-ipa.o and
5116 powerpc-isa207-htm-vsx64l-ipa.o.
5117 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5118 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5119 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5120 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5121 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5122 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5123 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5124 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5125 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5126 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5127 (init_registers_powerpc_isa207_htm_vsx32l)
5128 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5129 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5130 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5131 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5132 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5133 (ppc_store_tm_ctarregset): New functions.
5134 (ppc_regsets): Add entries for HTM regsets.
5135 (ppc_arch_setup): Set htm in features struct when needed. Set
5136 sizes for the HTM regsets.
5137 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5138 (initialize_low_arch): Call
5139 init_registers_powerpc_isa207_htm_vsx32l and
5140 init_registers_powerpc_isa207_htm_vsx64l.
5141 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5142 PPC_TDESC_ISA207_HTM_VSX.
5143 (initialize_low_tracepoint): Call
5144 init_registers_powerpc_isa207_htm_vsx32l and
5145 init_registers_powerpc_isa207_htm_vsx64l.
5146
5147 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5148
5149 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5150 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5151 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5152 (ppc_store_pmuregset): New functions.
5153 (ppc_regsets): Add entries for ebb and pmu regsets.
5154 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5155 pmu regsets are available. Set sizes for these regsets.
5156
5157 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5158
5159 * configure.srv (ipa_ppc_linux_regobj): Add
5160 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5161 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5162 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5163 rs6000/powerpc-isa207-vsx32l.xml, and
5164 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5165 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5166 <PPC_TDESC_ISA207_VSX>: New enum value.
5167 (init_registers_powerpc_isa207_vsx32l): Declare.
5168 (init_registers_powerpc_isa207_vsx64l): Declare.
5169 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5170 (ppc_store_tarregset): New function.
5171 (ppc_regsets): Add entry for the TAR regset.
5172 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5173 size for the TAR regsets.
5174 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5175 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5176 and init_registers_powerpc_isa207_vsx64l.
5177 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5178 (initialize_low_tracepoint): Call
5179 init_registers_powerpc_isa207_vsx32l and
5180 init_registers_powerpc_isa207_vsx64l.
5181
5182 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5183 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5184
5185 * configure.srv (ipa_ppc_linux_regobj): Add
5186 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5187 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5188 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5189 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5190 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5191 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5192 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5193 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5194 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5195 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5196 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5197 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5198 (ppc_hwcap): Add comment.
5199 (ppc_hwcap2): New global.
5200 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5201 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5202 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5203 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5204 when needed. Set sizes for the the DSCR and PPR regsets.
5205 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5206 (initialize_low_arch): Call
5207 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5208 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5209 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5210 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5211 (initialize_low_tracepoint): Call
5212 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5213 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5214
5215 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5216
5217 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5218
5219 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5220 Simon Marchi <simark@simark.ca>
5221
5222 * acinclude.m4: Include "../selftest.m4".
5223 * configure: Regenerate.
5224 * configure.ac: Use "GDB_AC_SELFTEST".
5225 * configure.srv: Use "$enable_unittests" instead of
5226 "$development" when checking whether unit tests have been
5227 enabled.
5228 * server.c (captured_main): Update message informing that
5229 selftests have been disabled.
5230
5231 2018-10-04 Tom Tromey <tom@tromey.com>
5232
5233 * configure: Rebuild.
5234
5235 2018-10-04 Tom Tromey <tom@tromey.com>
5236
5237 * server.c (handle_status): Rename inner "thread".
5238 (process_serial_event): Declare "res" in 'm' case.
5239 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5240 (iterate_over_lwps): Rename inner "thread".
5241 (linux_qxfer_libraries_svr4): Rename inner "len".
5242 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5243
5244 2018-10-01 Gary Benson <gbenson@redhat.com>
5245
5246 * gdb_proc_service.h: Moved common code to
5247 common/gdb_proc_service.h.
5248
5249 2018-10-01 Gary Benson <gbenson@redhat.com>
5250
5251 * gdb_proc_service.h: Synchronize comments and whitespace with
5252 GDB's version of this file.
5253
5254 2018-09-25 Tom Tromey <tom@tromey.com>
5255
5256 * configure: Rebuild.
5257 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5258
5259 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5260
5261 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5262 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5263 ($(IPA_LIB)): Sort IPA_OBJS.
5264
5265 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5266
5267 * Makefile.in: Remove references to $(ADD_DEPS).
5268
5269 2018-09-16 Tom Tromey <tom@tromey.com>
5270
5271 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5272 variables.
5273 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5274 variables.
5275
5276 2018-09-05 Tom Tromey <tom@tromey.com>
5277
5278 * configure: Rebuild.
5279
5280 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5281
5282 PR build/23399
5283 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5284
5285 2018-08-27 Tom Tromey <tom@tromey.com>
5286
5287 PR build/23087:
5288 * configure: Rebuild.
5289
5290 2018-08-27 Tom Tromey <tom@tromey.com>
5291
5292 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5293 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5294 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5295 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5296 (s390x_emit_stack_adjust): Add casts to unsigned char.
5297
5298 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5299
5300 PR gdb/23374
5301 PR gdb/23375
5302 * server.h (struct client_state) <disable_randomization>:
5303 Initialize to 1.
5304
5305 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5306
5307 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5308 variable.
5309 (mips_supply_ptrace_register): Likewise.
5310
5311 2018-07-22 Tom Tromey <tom@tromey.com>
5312
5313 * configure: Rebuild.
5314
5315 2018-07-22 Tom Tromey <tom@tromey.com>
5316
5317 * win32-low.c (win32_create_inferior): Remove unused variables.
5318 * gdbreplay.c (remote_open): Remove unused variable.
5319 * remote-utils.c (remote_prepare): Remove unused variable.
5320 * x86-tdesc.h (X86_TDESC_H): Define.
5321 (amd64_expedite_regs): Define conditionally.
5322 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5323 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5324 * remote-utils.c (readchar): Remove unused variable.
5325
5326 2018-07-13 Pedro Alves <palves@redhat.com>
5327
5328 * linux-low.c (linux_kill): Change parameter to process_info
5329 pointer instead of pid. Adjust.
5330 * lynx-low.c (lynx_kill): Likewise.
5331 * nto-low.c (nto_kill): Likewise.
5332 * spu-low.c (spu_kill): Likewise.
5333 * win32-low.c (win32_kill): Likewise.
5334 * server.c (handle_v_kill, kill_inferior_callback)
5335 (detach_or_kill_for_exit): Adjust.
5336 * target.c (kill_inferior): Change parameter to process_info
5337 pointer instead of pid. Adjust.
5338 * target.h (struct target_ops) <kill>: Change parameter to
5339 process_info pointer instead of pid. Adjust all implementations
5340 and callers.
5341 (kill_inferior): Likewise.
5342
5343 2018-07-13 Pedro Alves <palves@redhat.com>
5344
5345 * linux-low.c (linux_detach, linux_join): Change parameter to
5346 process_info pointer instead of pid. Adjust.
5347 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5348 * nto-low.c (nto_detach): Likewise.
5349 * spu-low.c (spu_detach, spu_join): Likewise.
5350 * win32-low.c (win32_detach, win32_join): Likewise.
5351 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5352 * target.h (struct target_ops) <detach, join>: Change parameter to
5353 process_info pointer instead of pid. Adjust all implementations
5354 and callers.
5355 (detach_inferior, join_inferior): Rename 'pid' parameter to
5356 'proc'.
5357
5358 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5359 Jan Kratochvil <jan.kratochvil@redhat.com>
5360 Paul Fertser <fercerpav@gmail.com>
5361 Tsutomu Seki <sekiriki@gmail.com>
5362
5363 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5364 (OBS): Add 'common/netstuff.o'.
5365 (GDBREPLAY_OBS): Likewise.
5366 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5367 (remote_open): Implement support for IPv6
5368 connections.
5369 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5370 and 'wspiapi.h'.
5371 (handle_accept_event): Accept connections from IPv6 sources.
5372 (remote_prepare): Handle IPv6-style hostnames; implement
5373 support for IPv6 connections.
5374 (remote_open): Implement support for printing connections from
5375 IPv6 sources.
5376
5377 2018-07-11 Pedro Alves <palves@redhat.com>
5378
5379 PR gdb/23377
5380 * mem-break.c (any_persistent_commands): Add process_info
5381 parameter and use it instead of relying on the current process.
5382 Change return type to bool.
5383 * mem-break.h (any_persistent_commands): Add process_info
5384 parameter and change return type to bool.
5385 * server.c (handle_detach): Remove require_running_or_return call.
5386 Look up the process_info for the process we're about to detach.
5387 If not found, return back error to GDB. Adjust
5388 any_persistent_commands call to pass down a process pointer.
5389
5390 2018-07-11 Pedro Alves <palves@redhat.com>
5391
5392 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5393 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5394 instead of collect_register_by_name.
5395 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5396 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5397
5398 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5399 Pedro Alves <palves@redhat.com>
5400
5401 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5402
5403 2018-07-03 Tom Tromey <tom@tromey.com>
5404
5405 * linux-low.c: Update.
5406 * lynx-low.c: Update.
5407 * mem-break.c: Update.
5408 * nto-low.c: Update.
5409 * remote-utils.c: Update.
5410 * server.c: Update.
5411 * spu-low.c: Update.
5412 * target.c: Update.
5413 * win32-low.c: Update.
5414
5415 2018-07-03 Tom Tromey <tom@tromey.com>
5416
5417 * server.c: Update.
5418
5419 2018-07-03 Tom Tromey <tom@tromey.com>
5420
5421 * linux-low.c: Update.
5422
5423 2018-07-03 Tom Tromey <tom@tromey.com>
5424
5425 * target.c: Update.
5426
5427 2018-07-03 Tom Tromey <tom@tromey.com>
5428
5429 * linux-low.c: Update.
5430 * linux-mips-low.c: Update.
5431 * lynx-low.c: Update.
5432 * nto-low.c: Update.
5433 * remote-utils.c: Update.
5434 * server.c: Update.
5435 * spu-low.c: Update.
5436 * target.c: Update.
5437 * thread-db.c: Update.
5438
5439 2018-07-03 Tom Tromey <tom@tromey.com>
5440
5441 * linux-low.c: Update.
5442 * linux-mips-low.c: Update.
5443 * lynx-low.c: Update.
5444 * mem-break.c: Update.
5445 * nto-low.c: Update.
5446 * remote-utils.c: Update.
5447 * server.c: Update.
5448 * spu-low.c: Update.
5449 * target.c: Update.
5450 * tracepoint.c: Update.
5451
5452 2018-07-03 Tom Tromey <tom@tromey.com>
5453
5454 * linux-low.c: Update.
5455 * linux-ppc-low.c: Update.
5456 * linux-x86-low.c: Update.
5457 * proc-service.c: Update.
5458 * server.c: Update.
5459 * spu-low.c: Update.
5460 * thread-db.c: Update.
5461 * win32-low.c: Update.
5462
5463 2018-07-03 Tom Tromey <tom@tromey.com>
5464
5465 * linux-low.c: Update.
5466 * lynx-low.c: Update.
5467 * nto-low.c: Update.
5468 * remote-utils.c: Update.
5469 * spu-low.c: Update.
5470 * thread-db.c: Update.
5471 * win32-low.c: Update.
5472
5473 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5474
5475 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5476 parameter in call to 'amd64_create_target_description'.
5477
5478 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5479
5480 * x86-tdesc.h: Remove executable permission flag.
5481
5482 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5483
5484 * configure.ac: Remove AC_PREREQ, add missing quoting.
5485 * configure: Re-generate.
5486 * config.in: Re-generate.
5487 * aclocal.m4: Re-generate.
5488
5489 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5490
5491 * tracepoint.h (current_traceframe): Remove declaration.
5492
5493 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5494
5495 * linux-aarch64-low.c (is_sve_tdesc): New function.
5496 (aarch64_sve_regs_copy_to_regcache): Likewise.
5497 (aarch64_sve_regs_copy_from_regcache): Likewise.
5498 (aarch64_regs_info): Add SVE checks.
5499 (initialize_low_arch): Initialize SVE.
5500
5501 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5502
5503 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5504
5505 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5506
5507 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5508 (initialize_low_tracepoint): Likewise
5509 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5510 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5511 param.
5512 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5513 checks.
5514 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5515
5516 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5517
5518 * server.h (PBUFSIZ): Increase size
5519
5520 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5521
5522 * regcache.c (regcache::raw_compare): New function.
5523 * regcache.h (regcache::raw_compare): New declaration.
5524
5525 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5526
5527 * regcache.c (new_register_cache): Use new.
5528 (free_register_cache): Use delete.
5529 (register_data): Use const.
5530 (supply_register): Move body inside regcache.
5531 (regcache::raw_supply): New override function.
5532 (collect_register): Move body inside regcache.
5533 (regcache::raw_collect): New override function.
5534 (regcache::get_register_status): New override function.
5535 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5536
5537 2018-06-09 Tom Tromey <tom@tromey.com>
5538
5539 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5540 declare queue.
5541 (event_queue): Use std::queue.
5542 (gdb_event_xfree): Remove.
5543 (initialize_event_loop, process_event, wait_for_event): Update.
5544
5545 2018-06-08 Stan Cox <scox@redhat.com>
5546
5547 * win32-low.c (win32_create_inferior): last_ptid and last_status
5548 moved to client_state.
5549
5550 2018-06-08 Pedro Alves <palves@redhat.com>
5551
5552 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5553 common/common-exceptions.o, common/common-utils.o,
5554 common/errors.o, common/print-utils.o and utils.o.
5555 * gdbreplay.c: Include "common-defs.h" instead of the two
5556 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5557 string.h or alloca.h.
5558 (perror_with_name): Delete.
5559 (remote_open): Use xstrdup instead of strdup.
5560 (main): Rename to ...
5561 (captured_main): ... this.
5562 (main): New.
5563
5564 2018-06-08 Tom Tromey <tom@tromey.com>
5565
5566 * linux-low.c (linux_low_read_btrace): Update.
5567
5568 2018-06-04 Stan Cox <scox@redhat.com>
5569
5570 * server.h (struct client_state): New.
5571 * server.c (cont_thread, general_thread, multi_process)
5572 (report_fork_events, report_vfork_events, report_exec_events)
5573 (report_thread_events, swbreak_feature, hwbreak_feature)
5574 (vCont_supported, disable_randomization, pass_signals)
5575 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5576 Moved to client_state.
5577 * remote-utils.c (remote_debug, noack_mode)
5578 (transport_is_reliable): Moved to client_state.
5579 * tracepoint.c (current_traceframe): Moved to client_state.
5580
5581 Update all callers.
5582 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5583 linux-low.c, remote-utils.h, target.c: Use client_state.
5584
5585 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5586
5587 * configure.srv: Add new c/h file.
5588
5589 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5590
5591 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5592 null VQ.
5593
5594 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5595
5596 * gdb.arch/mips-fpregset-core.exp: New test.
5597 * gdb.arch/mips-fpregset-core.c: New test source.
5598
5599 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5600
5601 PR server/23198
5602 * hostio.c (require_int): Do not report overflow for integers
5603 between 0xfffffff and 0x7fffffff.
5604
5605 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5606
5607 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5608 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5609 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5610 functions.
5611 (the_low_target): Wire them.
5612
5613 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5614
5615 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5616 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5617 mode. Call collect_register_by_name with vscr using
5618 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5619 (ppc_store_vrregset): Add and set vscr_offset variable as in
5620 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5621 vscr_offset.
5622
5623 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5624
5625 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5626 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5627 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5628
5629 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5630
5631 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5632 (ppc_store_vsxregset): Likewise.
5633 (ppc_fill_vrregset): Likewise.
5634 (ppc_store_vrregset): Likewise.
5635 (ppc_fill_evrregset): Likewise.
5636 (ppc_store_evrregset): Likewise.
5637 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5638 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5639 needed.
5640
5641 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5642
5643 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5644 wordsize of the inferior. Call ppc_linux_target_wordsize.
5645
5646 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5647
5648 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5649 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5650 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5651 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5652 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5653 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5654 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5655 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5656 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5657 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5658 (tdesc_powerpc_e500l): Remove.
5659 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5660 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5661 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5662 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5663 linux-ppc-tdesc.h.
5664 (ppc_arch_setup): Remove target description matching code. Fill a
5665 ppc_linux_features struct and call ppc_linux_match_description
5666 with it.
5667
5668 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5669
5670 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5671 width of the requested register exceeds the width of the
5672 `ptrace' data type.
5673 (mips_cannot_store_register): Likewise.
5674
5675 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5676
5677 * linux-mips-low.c (mips_fetch_register): New function. Update
5678 preceding comment.
5679 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5680 (the_low_target): Wire `mips_fetch_register'.
5681
5682 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5683
5684 * lynx-i386-low.c (LYNXOS_178): New macro.
5685 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5686 the layout on LynxOS-178.
5687 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5688 handle floating point registers that are not supported by
5689 LynxOS-178.
5690
5691 2018-05-10 Tom Tromey <tom@tromey.com>
5692
5693 * configure: Rebuild.
5694
5695 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5696
5697 PR server/23158:
5698 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5699 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5700 Use it to set the expedite_regs field in the given tdesc.
5701 * x86-tdesc.h: New file.
5702 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5703 Adjust following the addition of the new expedite_regs parameter
5704 to init_target_desc.
5705 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5706 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5707 (i386_linux_read_description, amd64_linux_read_description):
5708 Adjust following the addition of the new expedite_regs parameter
5709 to init_target_desc.
5710 * lynx-i386-low.c: #include "x86-tdesc.h".
5711 (lynx_i386_arch_setup): Adjust following the addition of the new
5712 expedite_regs parameter to init_target_desc.
5713 * nto-x86-low.c: #include "x86-tdesc.h".
5714 (nto_x86_arch_setup): Adjust following the addition of the new
5715 expedite_regs parameter to init_target_desc.
5716 * win32-i386-low.c: #include "x86-tdesc.h".
5717 (i386_arch_setup): Adjust following the addition of the new
5718 expedite_regs parameter to init_target_desc.
5719
5720 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5721
5722 PR server/23158:
5723 * win32-low.c (win32_create_inferior): Add call to my_wait
5724 setting last_status global.
5725
5726 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5727
5728 PR server/23158:
5729 * win32-low.c (create_process): Only call gdb_tilde_expand if
5730 inferior_cwd is not NULL.
5731
5732 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5733
5734 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5735 registers to the cache if their values have changed.
5736 (i387_xsave_to_cache): Provide default values for x87 control
5737 registers when these features are available, but disabled.
5738 * regcache.c (supply_register_by_name_zeroed): New function.
5739 * regcache.h (supply_register_by_name_zeroed): Declare new
5740 function.
5741
5742 2018-05-07 Tom Tromey <tom@tromey.com>
5743
5744 * configure: Rebuild.
5745
5746 2018-05-04 Tom Tromey <tom@tromey.com>
5747
5748 * configure: Rebuild.
5749
5750 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5751 Pedro Alves <palves@redhat.com>
5752
5753 * linux-aarch64-low.c (aarch64_stopped_data_address):
5754 Likewise.
5755
5756 2018-04-27 Tom Tromey <tom@tromey.com>
5757
5758 * configure: Rebuild.
5759
5760 2018-04-23 Tom Tromey <tom@tromey.com>
5761
5762 * configure: Rebuild.
5763
5764 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5765
5766 * Makefile.in (depcomp): Add "..".
5767 (all_deps_files): New and use it.
5768
5769 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5770
5771 * configure.srv (aarch64*-*-linux*): Don't include xml.
5772 (i[34567]86-*-cygwin*): Likewise.
5773 (i[34567]86-*-linux*): Likewise.
5774 (i[34567]86-*-lynxos*): Likewise.
5775 (i[34567]86-*-mingw32ce*): Likewise.
5776 (i[34567]86-*-mingw*): Likewise.
5777 (i[34567]86-*-nto*): Likewise.
5778 (tic6x-*-uclinux): Likewise.
5779 (x86_64-*-linux*): Likewise.
5780 (x86_64-*-mingw*): Likewise.
5781 (x86_64-*-cygwin*): Likewise.
5782
5783 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5784
5785 * tdesc.c: Remove xml parameter.
5786
5787 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5788
5789 * server.c (get_features_xml): Remove cast.
5790 * tdesc.c (void target_desc::accept): Fill in function.
5791 (tdesc_get_features_xml): Remove old xml creation.
5792 (print_xml_feature::visit_pre): Add xml vistor.
5793 * tdesc.h (struct target_desc): Make xmltarget mutable.
5794 (tdesc_get_features_xml): Remove declaration.
5795
5796 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5797
5798 * tdesc.c (tdesc_architecture_name): Add new function.
5799 (tdesc_osabi_name): Likewise.
5800 (tdesc_get_features_xml): Use new functions.
5801
5802 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5803
5804 * tdesc.c (tdesc_create_flags): Remove.
5805 (tdesc_add_flag): Likewise.
5806 (tdesc_named_type): Likewise.
5807 (tdesc_create_union): Likewise.
5808 (tdesc_create_struct): Likewise.
5809 (tdesc_create_vector): Likewise.
5810 (tdesc_add_bitfield): Likewise.
5811 (tdesc_add_field): Likewise.
5812 (tdesc_set_struct_size): Likewise.
5813
5814 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5815
5816 * tdesc.c (~target_desc): Remove implictly deleted items.
5817 (init_target_desc): Iterate all features.
5818 (tdesc_get_features_xml): Use vector.
5819 (tdesc_create_feature): Create feature.
5820 * tdesc.h (tdesc_feature) Remove
5821 (target_desc): Add features.
5822
5823 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5824
5825 * Makefile.in: Add common/tdesc.c
5826 * tdesc.c (init_target_desc): init all reg_defs from register
5827 vector.
5828 (tdesc_create_reg): Create tdesc_reg.
5829 * tdesc.h (tdesc_feature): Add register vector.
5830
5831 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5832
5833 * tdesc.h (struct target_desc) <features>: Change type to
5834 std::vector<std::string>.
5835 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5836 changes.
5837 (tdesc_get_features_xml): Likewise.
5838 (tdesc_create_feature): Likewise.
5839
5840 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5841
5842 * regcache.c (find_register_by_number): Return a ref.
5843 (find_regno): Use references.
5844 (register_size): Likewise.
5845 (register_data): Likewise.
5846 * tdesc.c (target_desc::~target_desc): Remove free calls.
5847 (target_desc::operator==): Use std::vector compare.
5848 (init_target_desc): Use reference.
5849 (tdesc_create_reg): Use reg constructors.
5850 * tdesc.h (struct target_desc): Replace pointer with object.
5851
5852 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5853
5854 * regcache.c (find_register_by_number): Make static.
5855 (find_regno): Use find_register_by_number
5856 * regcache.h (struct reg): Remove declaration.
5857
5858 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5859
5860 * tdesc.c (target_desc::~target_desc): Move to here.
5861 (target_desc::operator==): Likewise.
5862 * tdesc.h (target_desc::~target_desc): Move from here.
5863 (target_desc::operator==): Likewise.
5864
5865 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5866
5867 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5868
5869 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5870
5871 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5872 S390_TDESC_GS.
5873 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5874 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5875 and init_registers_s390_gs_linux64.
5876
5877 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5878
5879 * linux-s390-low.c (s390_fill_gs): Remove function.
5880 (s390_fill_gsbc): Remove function.
5881 (s390_regsets): Set fill functions for the guarded storage regsets
5882 to NULL.
5883
5884 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5885
5886 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5887 the word size. Add comment.
5888 (s390_get_wordsize): New function.
5889 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5890 pswm with it. Instead, use s390_get_wordsize to determine the
5891 word size first and derive the correct tdesc from that directly.
5892
5893 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5894
5895 * Makefile.in: Include silent-rules.mk.
5896 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5897 (COMPILE): Add ECHO_CXX.
5898 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5899 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5900 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5901 (version-generated.c): Add ECHO_GEN.
5902 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5903 (IPAGENT_COMPILE): Add ECHO_CXX.
5904 (%-generated.c): Add ECHO_REGDAT.
5905
5906 2018-03-14 Tom Tromey <tom@tromey.com>
5907
5908 PR cli/14977:
5909 * ax.c (ax_printf): Special case for NULL.
5910
5911 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5912
5913 * linux-low.c (linux_qxfer_libraries_svr4): Use
5914 xml_escape_text_append.
5915
5916 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5917
5918 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5919
5920 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5921
5922 * server.c (handle_general_set): Remove unnecessary xstrdup.
5923
5924 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5925
5926 * server.c (parse_debug_format_options): Adjust to
5927 delim_string_to_char_ptr_vec changes.
5928 * thread-db.c (thread_db_load_search): Adjust to
5929 dirnames_to_char_ptr_vec changes.
5930
5931 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5932
5933 * target.h (target_enable_btrace, target_disable_btrace)
5934 (target_read_btrace, target_read_btrace_conf): Turn macro into
5935 inline function. Throw error if target method is not defined.
5936 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5937 check for btrace target method. Be prepared to handle exceptions
5938 from btrace target methods.
5939
5940 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5941
5942 * server.c (captured_main): Change order of error message printed
5943 when the current working directory cannot be found.
5944
5945 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5946
5947 * server.c: Include "filenames.h" and "pathstuff.h".
5948 (program_name): Delete variable.
5949 (program_path): New anonymous class.
5950 (get_exec_wrapper): Use "program_path" instead of
5951 "program_name".
5952 (handle_v_run): Likewise.
5953 (captured_main): Likewise.
5954 (process_serial_event): Likewise.
5955
5956 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5957
5958 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5959 (OBJS): Add "pathstuff.o".
5960 * server.c (current_directory): New global variable.
5961 (captured_main): Initialize "current_directory".
5962
5963 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5964
5965 * tdesc.c: Use common/tdesc.h.
5966 * tdesc.h: Likewise.
5967
5968 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5969 Simon Marchi <simon.marchi@ericsson.com>
5970
5971 * Makefile.in: Switch order of make rules.
5972
5973 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5974
5975 * Makefile.in: Add common directory in build.
5976 * configure.ac: Add common reference.
5977 * configure: Regenerate.
5978
5979 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5980
5981 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5982 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5983 * spu-low.c (spu_target_ops): Likewise.
5984 * win32-low.c (win32_target_ops): Likewise.
5985 * server.c (supported_btrace_packets): Report packets unconditionally.
5986 * target.h (target_ops) <supports_btrace>: Remove.
5987 (target_supports_btrace): Remove.
5988
5989 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5990
5991 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5992 (handle_btrace_disable): Change return type to void. Use exceptions
5993 to report errors.
5994 (handle_btrace_general_set): Catch exception and copy message to
5995 return message.
5996
5997 2018-02-08 Tom Tromey <tom@tromey.com>
5998
5999 * linux-low.c (install_software_single_step_breakpoints): Use
6000 make_scoped_restore.
6001 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6002 (do_restore_current_thread_cleanup): Remove.
6003 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6004 declare.
6005
6006 2018-02-08 Tom Tromey <tom@tromey.com>
6007
6008 * mem-break.c (set_raw_breakpoint_at): Use
6009 gdb::unique_xmalloc_ptr.
6010
6011 2018-01-30 Pedro Alves <palves@redhat.com>
6012
6013 PR gdb/13211
6014 * target.c (target_terminal::terminal_state): Rename to ...
6015 (target_terminal::m_terminal_state): ... this.
6016
6017 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6018
6019 * linux-low.c (handle_extended_wait): Surround call to
6020 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6021
6022 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6023
6024 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6025 linux_ptrace_attach_fail_reason_string now returning an
6026 std::string.
6027 (linux_attach): Likewise.
6028 * thread-db.c (attach_thread): Likewise.
6029
6030 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6031
6032 PR gdb/21559
6033 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6034 checking for fs_base/gs_base fields in struct user_regs_struct.
6035 * configure: Regenerate.
6036
6037 2018-01-16 Yao Qi <yao.qi@linaro.org>
6038
6039 PR gdb/18749
6040 * linux-low.c (fetch_register): Call supply_register instead of
6041 error.
6042
6043 2018-01-08 Yao Qi <yao.qi@linaro.org>
6044 Simon Marchi <simon.marchi@ericsson.com>
6045
6046 * Makefile.in (OBS): Remove selftest.o.
6047 * configure.ac: Set srv_selftest_objs if $development is true.
6048 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6049 * configure: Re-generated.
6050 * server.c (captured_main): Wrap variable selftest_filter with
6051 GDB_SELF_TEST.
6052
6053 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6054
6055 * server.c (parse_debug_format_options): Return std::string.
6056 (handle_monitor_command, captured_main): Adjust.
6057
6058 2018-01-05 Pedro Alves <palves@redhat.com>
6059
6060 PR gdb/18653
6061 * server.c (captured_main): Pass quiet=false to
6062 save_original_signals_state.
6063
6064 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6065
6066 * gdbreplay.c (gdbreplay_version): Update copyright year in
6067 version message.
6068 * server.c (gdbserver_version): Likewise.
6069
6070 2017-12-08 Tom Tromey <tom@tromey.com>
6071
6072 * ax.c (ax_printf): Update.
6073
6074 2017-12-07 Yao Qi <yao.qi@linaro.org>
6075
6076 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6077 aarch64_linux_read_description.
6078 * linux-amd64-ipa.c (idx2mask): New array.
6079 (get_ipa_tdesc): Move idx2mask out.
6080 (initialize_low_tracepoint): Initialize target descriptions.
6081 * linux-i386-ipa.c (idx2mask): New array.
6082 (get_ipa_tdesc): Move idx2mask out.
6083 (initialize_low_tracepoint): Initialize target descriptions.
6084
6085 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6086
6087 * tdesc.c (struct tdesc_type): Change return type.
6088 (tdesc_add_flag): Change parameter type.
6089 (tdesc_add_bitfield): Likewise.
6090 (tdesc_add_field): Likewise.
6091 (tdesc_set_struct_size): Likewise.
6092
6093 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6094
6095 * regcache.c (registers_to_string): Remove unused variable.
6096
6097 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6098
6099 * inferiors.c (for_each_inferior_with_data): Remove.
6100 * inferiors.h (for_each_inferior_with_data): Remove.
6101 * server.c (handle_qxfer_threads_worker): Change parameter type.
6102 (handle_qxfer_threads_proper): Use for_each_thread.
6103
6104 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6105
6106 * inferiors.c (for_each_inferior): Remove.
6107 (clear_inferiors): Use for_each_thread.
6108 * inferiors.h (for_each_inferior): Remove.
6109 * linux-low.c (linux_wait_for_event_filtered): Use
6110 for_each_thread.
6111 (linux_stabilize_threads): Likewise.
6112 * regcache.c (regcache_release): Likewise.
6113 * server.c (gdb_wants_all_threads_stopped): Likewise.
6114 (clear_pending_status_callback): Remove.
6115 (handle_status): Use for_each_thread.
6116 (captured_main): Likewise.
6117 * win32-low.c (child_init_thread_list): Likewise.
6118 (win32_clear_inferiors): Likewise.
6119 (fake_breakpoint_event): Likewise.
6120
6121 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6122
6123 * inferiors.h (find_inferior): Remove.
6124 * inferiors.c (find_inferior): Remove.
6125
6126 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6127
6128 * linux-low.c (resume_status_pending_p): Update comment.
6129 (need_step_over_p): Update comment.
6130
6131 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6132
6133 * linux-low.c (proceed_one_lwp): Return void, change parameter
6134 type.
6135 (unsuspend_and_proceed_one_lwp): Likewise.
6136 (proceed_all_lwps): Use for_each_thread.
6137 (unstop_all_lwps): Likewise.
6138
6139 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6140
6141 * linux-low.c (linux_resume_one_thread): Return void, take
6142 parameter directly.
6143 (linux_resume): Use for_each_thread.
6144
6145 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6146
6147 * linux-low.c (send_sigstop_callback): Return void, change
6148 parameter type. Rename to...
6149 (send_sigstop): ... this.
6150 (suspend_and_send_sigstop_callback): Return void, change parameter
6151 type. Rename to...
6152 (suspend_and_send_sigstop): ... this.
6153 (stop_all_lwps): Use for_each_thread.
6154
6155 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6156
6157 * linux-low.c (lwp_running): Return bool, remove unused
6158 argument.
6159 (linux_stabilize_threads): Use find_thread.
6160
6161 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6162
6163 * linux-low.c (select_singlestep_lwp_callback): Remove.
6164 (count_events_callback): Remove.
6165 (select_event_lwp_callback): Remove.
6166 (select_event_lwp): Use find_thread/for_each_thread.
6167
6168 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6169
6170 * linux-low.c (not_stopped_callback): Return bool, take filter
6171 argument directly.
6172 (linux_wait_for_event_filtered): Use find_thread.
6173 (linux_wait_1): Likewise.
6174
6175 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6176
6177 * linux-low.c (same_lwp): Remove.
6178 (find_lwp_pid): Use find_thread.
6179
6180 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6181
6182 * linux-low.c (delete_lwp_callback): Remove.
6183 (linux_mourn): Use for_each_thread.
6184
6185 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6186
6187 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6188 args parameter, don't check for pid.
6189 (linux_detach): Use for_each_thread.
6190
6191 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6192
6193 * linux-low.c (struct counter): Remove.
6194 (second_thread_of_pid_p): Remove.
6195 (last_thread_of_process_p): Use find_thread.
6196
6197 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6198
6199 * inferiors.c (find_inferior_in_random): Remove.
6200 * inferiors.h (find_inferior_in_random): Remove.
6201 * linux-low.c (status_pending_p_callback): Return bool, accept
6202 parameter ptid directly.
6203 (linux_wait_for_event_filtered): Use find_thread_in_random.
6204 (linux_wait_1): Likewise.
6205
6206 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6207
6208 * inferiors.c (find_inferior_id): Remove.
6209 (find_thread_ptid): Move implemention from find_inferior_id to
6210 here.
6211 * inferiors.h (find_inferior_id): Remove.
6212 * server.c (handle_status): Use find_thread_ptid.
6213 (process_serial_event): Likewise.
6214 * thread-db.c (find_one_thread): Likewise.
6215 (thread_db_thread_handle): Likewise.
6216 * win32-low.c (thread_rec): Likewise.
6217 (child_delete_thread): Likewise.
6218 (win32_thread_alive): Likewise.
6219 (get_child_debug_event): Likewise.
6220
6221 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6222
6223 * linux-mips-low.c (update_watch_registers_callback): Return
6224 void, remove pid_p parameter, don't check for pid.
6225 (mips_insert_point, mips_remove_point): Use for_each_thread.
6226
6227 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6228
6229 * lynx.low (lynx_delete_thread_callback): Remove.
6230 (lynx_mourn): Use for_each_thread.
6231
6232 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6233
6234 * regcache.c (regcache_invalidate_one): Remove.
6235 (regcache_invalidate_pid): use for_each_thread.
6236
6237 2017-11-26 Tom Tromey <tom@tromey.com>
6238
6239 * linux-low.c (linux_create_inferior): Update.
6240
6241 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6242
6243 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6244
6245 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6246
6247 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6248 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6249 * linux-aarch64-tdesc-selftest.c: New file.
6250 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6251
6252 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6253
6254 * configure.srv: Add new file.
6255 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6256 * linux-aarch64-tdesc-selftest.c: New file.
6257 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6258
6259 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6260
6261 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6262 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6263 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6264
6265 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6266
6267 * configure.srv: Add new files.
6268 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6269 aarch64_linux_read_description.
6270 * linux-aarch64-low.c (aarch64_linux_read_description):
6271 Merge with aarch64_arch_setup.
6272 (aarch64_arch_setup): Call aarch64_linux_read_description.
6273 * linux-aarch64-tdesc.c: New file.
6274 * linux-aarch64-tdesc.h: New file.
6275
6276 2017-11-24 Yao Qi <yao.qi@linaro.org>
6277
6278 * configure.srv: Set $srv_regobj for tic6x-linux.
6279 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6280 (tic6x_read_description): Move some code to tic6x_arch_setup.
6281 (tic6x_tdesc_test): New function.
6282 (initialize_low_arch): Call selftests::register_test.
6283
6284 2017-11-22 Yao Qi <yao.qi@linaro.org>
6285
6286 * remote-utils.c (prepare_resume_reply): Use memcpy.
6287
6288 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6289
6290 * linux-low.c (kill_one_lwp_callback): Return void, take
6291 argument directly, don't filter on pid.
6292 (linux_kill): Use for_each_thread.
6293
6294 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6295
6296 * linux-low.c (need_step_over_p): Return bool, remove dummy
6297 argument.
6298 (linux_resume, proceed_all_lwps): Use find_thread.
6299
6300 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6301
6302 * linux-low.c (resume_status_pending_p): Return bool, remove
6303 flag_p argument.
6304 (linux_resume): Use find_thread.
6305
6306 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6307
6308 * linux-low.c (struct thread_resume_array): Remove.
6309 (linux_set_resume_request): Return void, take arguments
6310 directly.
6311 (linux_resume): Use for_each_thread.
6312
6313 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6314
6315 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6316 return bool, remove data argument.
6317 (linux_stabilize_threads): Use find_thread.
6318
6319 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6320
6321 * linux-low.c (unsuspend_one_lwp): Remove.
6322 (unsuspend_all_lwps): Use for_each_thread, inline code from
6323 unsuspend_one_lwp.
6324
6325 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6326
6327 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6328 * linux-low.c (struct iterate_over_lwps_args): Remove.
6329 (iterate_over_lwps_filter): Remove.
6330 (iterate_over_lwps): Use find_thread.
6331
6332 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6333
6334 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6335 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6336 code from reset_lwp_ptrace_options_callback.
6337
6338 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6339
6340 * linux-arm-low.c (struct update_registers_data): Remove.
6341 (update_registers_callback): Return void, take arguments
6342 directly, don't check thread's pid.
6343 (arm_insert_point, arm_remove_point): Use for_each_thread.
6344
6345 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6346
6347 * win32-low.c (continue_one_thread): Return void, take argument
6348 directly.
6349 (child_continue): Use for_each_thread.
6350
6351 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6352
6353 * win32-i386-low.c (update_debug_registers_callback): Rename
6354 to ...
6355 (update_debug_registers): ... this, return void, remove pid_p arg.
6356 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6357
6358 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6359
6360 * inferiors.h (struct process_info): Add constructor, initialize
6361 fields..
6362 <syscalls_to_catch>: Change type to std::vector<int>.
6363 * inferiors.c (add_process): Allocate process_info with new.
6364 (remove_process): Free process_info with delete.
6365 * linux-low.c (handle_extended_wait): Adjust.
6366 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6367 * server.c (handle_general_set): Adjust.
6368
6369 2017-11-16 Pedro Alves <palves@redhat.com>
6370
6371 * remote-utils.c (remote_close): Block SIGIO signals instead of
6372 uninstalling the SIGIO handler.
6373
6374 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6375
6376 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6377
6378 2017-11-16 Yao Qi <yao.qi@linaro.org>
6379
6380 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6381 (tic6x_store_gregset): Likewise.
6382 (tic6x_usrregs_info): Move it up.
6383
6384 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6385
6386 * Makefile.in: Update arch rules.
6387 * configure.srv: Explicitly mark arch/ files.
6388
6389 2017-11-13 Andreas Schwab <schwab@suse.de>
6390
6391 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6392 function.
6393 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6394
6395 2017-11-06 Pedro Alves <palves@redhat.com>
6396
6397 * config.in, configure: Regenerate.
6398
6399 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6400
6401 * target.c (struct thread_search): Remove.
6402 (thread_search_callback): Remove.
6403 (prepare_to_access_memory): Use for_each_thread instead of
6404 find_inferior. Inline code from thread_search_callback.
6405
6406 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6407
6408 * server.c (struct visit_actioned_threads_data): Remove.
6409 (visit_actioned_threads): Change prototype to take arguments
6410 directly.
6411 (resume): Use find_thread instead of find_inferior.
6412
6413 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6414
6415 * server.c (queue_stop_reply_callback): Change prototype, return
6416 void.
6417 (find_status_pending_thread_callback): Remove.
6418 (handle_status): Replace find_inferior with find_thread and
6419 for_each_thread.
6420
6421 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6422
6423 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6424 with REGNO.
6425 (aarch64_store_gregset): Likewise.
6426 (aarch64_fill_fpregset): Likewise.
6427 (aarch64_store_fpregset): Likewise.
6428
6429 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6430
6431 * gdbthread.h (find_thread, for_each_thread): New functions.
6432 * inferiors.c (thread_of_pid): Remove.
6433 (find_any_thread_of_pid): Use find_thread.
6434 * linux-low.c (num_lwps): Use for_each_thread.
6435
6436 2017-10-17 Yao Qi <yao.qi@linaro.org>
6437
6438 * Makefile.in: Remove one rule.
6439 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6440
6441 2017-10-17 Yao Qi <yao.qi@linaro.org>
6442
6443 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6444 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6445
6446 2017-10-17 Yao Qi <yao.qi@linaro.org>
6447
6448 * configure.srv: Rename arm.o with arch/arm.o.
6449
6450 2017-10-17 Yao Qi <yao.qi@linaro.org>
6451
6452 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6453 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6454 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6455 (arch-i386.o, arch-amd64.o): Remove rules.
6456 (arch/%.o): New rule.
6457 Update POSTCOMPILE and COMPILE.pre.
6458 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6459 * configure: Re-generated.
6460 * configure.srv: Replace arch-i386.o with arch/i386.o.
6461 Replace arch-amd64.o with arch/amd64.o.
6462
6463 2017-10-16 Yao Qi <yao.qi@linaro.org>
6464
6465 * configure: Regenerated.
6466
6467 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6468
6469 * inferiors.h: (struct inferior_list): Remove.
6470 (struct inferior_list_entry); Remove.
6471 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6472 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6473 get_first_inferior): Remove.
6474 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6475 find_inferior_id, find_inferior_in_random): Change signature.
6476 * inferiors.c (all_threads): Change type to
6477 std::list<thread_info *>.
6478 (get_thread): Remove macro.
6479 (find_inferior, find_inferior_id): Change signature, implement
6480 using find_thread.
6481 (find_inferior_in_random): Change signature, implement using
6482 find_thread_in_random.
6483 (for_each_inferior, for_each_inferior_with_data): Change
6484 signature, implement using for_each_thread.
6485 (add_inferior_to_list, remove_inferior): Remove.
6486 (add_thread, get_first_thread, thread_of_pid,
6487 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6488 (get_first_inferior, one_inferior_p, clear_inferior_list):
6489 Remove.
6490 (clear_inferiors, get_thread_process): Update.
6491 * gdbthread.h: Include <list>.
6492 (struct thread_info) <entry>: Remove field.
6493 <id>: New field.
6494 (all_threads): Change type to std::list<thread_info *>.
6495 (get_first_inferior): Add doc.
6496 (find_thread, for_each_thread, find_thread_in_random): New
6497 functions.
6498 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6499 * linux-arm-low.c (update_registers_callback): Update.
6500 * linux-low.c (second_thread_of_pid_p): Update.
6501 (kill_one_lwp_callback, linux_detach_lwp_callback,
6502 delete_lwp_callback, status_pending_p_callback, same_lwp,
6503 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6504 iterate_over_lwps, not_stopped_callback,
6505 resume_stopped_resumed_lwps, count_events_callback,
6506 select_singlestep_lwp_callback, select_event_lwp_callback,
6507 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6508 suspend_and_send_sigstop_callback, wait_for_sigstop,
6509 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6510 lwp_running, linux_set_resume_request, resume_status_pending_p,
6511 need_step_over_p, start_step_over, linux_resume_one_thread,
6512 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6513 reset_lwp_ptrace_options_callback): Update.
6514 * linux-mips-low.c (update_watch_registers_callback): Update.
6515 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6516 Update.
6517 (free_register_cache_thread_one): Remove.
6518 (regcache_release): Update.
6519 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6520 handle_qxfer_threads_worker): Update.
6521 (handle_query): Update, use list iterator.
6522 (visit_actioned_threads, handle_pending_status,
6523 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6524 clear_pending_status_callback, set_pending_status_callback,
6525 find_status_pending_thread_callback, handle_status,
6526 process_serial_event): Update.
6527 * target.c (thread_search_callback): Update.
6528 * thread-db.c (thread_db_get_tls_address): Update.
6529 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6530 Update.
6531 * win32-i386-low.c (update_debug_registers_callback): Update.
6532 * win32-low.c (delete_thread_info, child_delete_thread,
6533 continue_one_thread, suspend_one_thread,
6534 get_child_debug_event): Adjust.
6535
6536 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6537
6538 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6539 * inferiors.h: Include <list>.
6540 (struct process_info) <entry>: Remove field.
6541 <pid>: New field.
6542 (pid_of): Change macro to function.
6543 (ptid_of, lwpid_of): Remove macro.
6544 (all_processes): Change type to std::list<process_info *>.
6545 (ALL_PROCESSES): Remove macro.
6546 (for_each_process, find_process): New function.
6547 * inferiors.c (all_processes): Change type to
6548 std::list<process_info *>.
6549 (find_thread_process): Adjust.
6550 (add_process): Likewise.
6551 (remove_process): Likewise.
6552 (find_process_pid): Likewise.
6553 (get_first_process): Likewise.
6554 (started_inferior_callback): Remove.
6555 (have_started_inferiors_p): Adjust.
6556 (attached_inferior_callback): Remove.
6557 (have_attached_inferiors_p): Adjust.
6558 * linux-low.c (check_zombie_leaders): Likewise.
6559 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6560 (x86_linux_update_xmltarget): Adjust.
6561 * server.c (handle_query): Likewise.
6562 (gdb_reattached_process): Remove.
6563 (handle_status): Adjust.
6564 (kill_inferior_callback): Likewise.
6565 (detach_or_kill_inferior): Remove.
6566 (print_started_pid): Likewise.
6567 (print_attached_pid): Likewise.
6568 (detach_or_kill_for_exit): Update.
6569 (process_serial_event): Likewise.
6570 * linux-arm-low.c (arm_new_fork): Likewise.
6571
6572 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6573
6574 * dll.h: Include <list>.
6575 (struct dll_info): Add constructor.
6576 <entry>: Remove field.
6577 (all_dlls): Change type to std::list<dll_info>.
6578 * dll.c: Include <algorithm>.
6579 (get_dll): Remove macro.
6580 (all_dlls): Change type to std::list<dll_info *>.
6581 (free_one_dll): Remove.
6582 (match_dll): Likewise.
6583 (loaded_dll): Adjust.
6584 (unloaded_dll): Adjust to all_dlls type change, use
6585 std::find_if. Inline code from match_dll.
6586 (clear_dlls): Adjust to all_dlls type change.
6587 * server.c (emit_dll_description): Remove.
6588 (handle_qxfer_libraries): Adjust to all_dlls type change,
6589 integrate emit_dll_description's functionality.
6590
6591 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6592
6593 * linux-low.h (struct linux_target_ops) <delete_process>: New
6594 field.
6595 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6596 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6597 (struct linux_target_ops): Add delete_process callback.
6598 * linux-arm-low.c (arm_delete_process): New.
6599 (struct linux_target_ops): Add delete_process callback.
6600 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6601 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6602 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6603 * linux-mips-low.c (mips_linux_delete_process): New.
6604 (struct linux_target_ops): Add delete_process callback.
6605 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6606 * linux-s390-low.c (struct linux_target_ops): Likewise.
6607 * linux-sh-low.c (struct linux_target_ops): Likewise.
6608 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6609 * linux-tile-low.c (struct linux_target_ops): Likewise.
6610 * linux-x86-low.c (x86_linux_delete_process): New.
6611 (struct linux_target_ops): Add delete_process callback.
6612 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6613
6614 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6615
6616 * linux-aarch64-low.c (the_low_target): Add thread delete
6617 callback.
6618 * linux-arm-low.c (arm_delete_thread): New function.
6619 (the_low_target): Add thread delete callback.
6620 * linux-bfin-low.c (the_low_target): Likewise.
6621 * linux-crisv32-low.c (the_low_target): Likewise.
6622 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6623 set.
6624 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6625 field.
6626 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6627 * linux-mips-low.c (mips_linux_delete_thread): New function.
6628 (the_low_target): Add thread delete callback.
6629 * linux-ppc-low.c (the_low_target): Likewise.
6630 * linux-s390-low.c (the_low_target): Likewise.
6631 * linux-sh-low.c (the_low_target): Likewise.
6632 * linux-tic6x-low.c (the_low_target): Likewise.
6633 * linux-tile-low.c (the_low_target): Likewise.
6634 * linux-x86-low.c (the_low_target): Likewise.
6635 * linux-xtensa-low.c (the_low_target): Likewise.
6636
6637 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6638
6639 * win32-low.c: Include "common-inferior.h".
6640
6641 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6642
6643 * inferiors.c (set_inferior_cwd): New function.
6644 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6645 (handle_query): Inform that QSetWorkingDir is supported.
6646 * win32-low.c (create_process): Pass the inferior's cwd to
6647 CreateProcess.
6648
6649 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6650
6651 * inferiors.c (current_inferior_cwd): New global variable.
6652 (get_inferior_cwd): New function.
6653 * inferiors.h (struct process_info) <cwd>: New field.
6654
6655 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6656
6657 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6658 (OBS): Add gdb_tilde_expand.o.
6659
6660 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6661
6662 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6663 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6664
6665 2017-09-29 Pedro Alves <palves@redhat.com>
6666
6667 * ax.c (gdb_parse_agent_expr): Constify.
6668 * ax.h (gdb_parse_agent_expr): Constify.
6669 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6670 Constify.
6671 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6672 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6673 * remote-utils.h (read_ptid): Constify.
6674 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6675 (process_point_options, process_serial_event): Constify.
6676 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6677 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6678 (cmd_qtbuffer): Constify.
6679
6680 2017-09-29 Pedro Alves <palves@redhat.com>
6681
6682 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6683 fails.
6684
6685 2017-09-29 Pedro Alves <palves@redhat.com>
6686
6687 * linux-low.c (handle_extended_wait): Pass parent thread instead
6688 of process to thread_db_notice_clone.
6689 * linux-low.h (thread_db_notice_clone): Replace parent process
6690 parameter with parent thread parameter.
6691 * thread-db.c (find_one_thread): Add comment.
6692 (thread_db_notice_clone): Replace parent process parameter with
6693 parent thread parameter. Temporarily switch to the parent thread.
6694
6695 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6696
6697 * gdbthread.h: Include "common-gdbthread.h".
6698 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6699 "if" when validating the ptid.
6700 * remote-utils.c: Include "gdbthread.h".
6701 (prepare_resume_reply): Use "switch_to_thread".
6702 * target.c (done_accessing_memory): Likewise.
6703
6704 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6705
6706 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6707 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6708 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6709 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6710 s390x-gs-linux64-ipa.o to ipa_obj.
6711 * linux-s390-low.c (HWCAP_S390_GS): New define.
6712 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6713 New functions.
6714 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6715 (s390_arch_setup): Check for guarded-storage support and choose
6716 appropriate tdesc.
6717 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6718 init_registers_s390x_gs_linux64.
6719 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6720 enum value.
6721 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6722 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6723
6724 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6725
6726 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6727
6728 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6729
6730 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6731 (thread_db_thread_handle): Declare.
6732 * linux-low.c (linux_target_ops): Initialize thread_handle.
6733 * server.c (handle_qxfer_threads_worker): Add support for
6734 "handle" attribute.
6735 * target.h (struct target_ops): Add new function pointer,
6736 thread_handle.
6737 (target_thread_handle): Define.
6738 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6739 field in lwp.
6740 (thread_db_thread_handle): New function.
6741
6742 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6743
6744 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6745 * linux-low.h (thread_db_notice_clone): Declare.
6746 * thread-db.c (thread_db_notice_clone): New function.
6747
6748 2017-09-21 Pedro Alves <palves@redhat.com>
6749
6750 * server.c (gdb_read_memory, handle_status, process_serial_event)
6751 (handle_serial_event, handle_target_event): Adjust to
6752 set_desired_thread prototype change.
6753 * target.c (set_desired_thread): Remove 'use_general' parameter
6754 and adjust.
6755 * target.h (set_desired_thread): Remove 'use_general' parameter.
6756
6757 2017-09-20 Tom Tromey <tom@tromey.com>
6758
6759 * target.c (target_terminal::terminal_state): Define.
6760 (target_terminal::init): Rename from target_terminal_init.
6761 (target_terminal::inferior): Rename from
6762 target_terminal_inferior.
6763 (target_terminal::ours): Rename from target_terminal_ours.
6764 (target_terminal::ours_for_output, target_terminal::info): New.
6765
6766 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6767
6768 * server.c (accumulate_file_name_length): Remove.
6769 (emit_dll_description): Adjust to std::string change.
6770 (handle_qxfer_libraries): Use std::string to hold document.
6771
6772 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6773
6774 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6775 return type of xml_escape_text.
6776 * server.c (emit_dll_description): Likewise.
6777
6778 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6779
6780 * server.c (captured_main): Accept argument for --selftest.
6781 Update run_tests call.
6782 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6783 when registering selftests.
6784
6785 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6786
6787 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6788 instead of "VEC" for "target_desc.reg_defs".
6789 (regcache_cpy): Likewise.
6790 (registers_to_string): Likewise.
6791 (registers_from_string): Likewise.
6792 (find_regno): Likewise.
6793 (supply_regblock): Likewise.
6794 (regcache_raw_read_unsigned): Likewise.
6795 * tdesc.c (init_target_desc): Likewise.
6796 (tdesc_create_reg): Likewise.
6797 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6798 (struct target_desc) <reg_defs>: Convert to "std::vector".
6799 (target_desc): Do not initialize "reg_defs".
6800 (~target_desc): Update code to use "std::vector" instead of "VEC"
6801 for "target_desc.reg_defs".
6802 (operator==): Likewise.
6803
6804 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6805
6806 * inferiors.h (thread_to_gdb_id): Remove.
6807 * inferiors.c (thread_to_gdb_id): Remove.
6808 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6809 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6810 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6811 Likewise.
6812 * nto-low.c (nto_fetch_registers, nto_store_registers,
6813 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6814
6815 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6816
6817 * inferiors.h (gdb_id_to_thread_id): Remove.
6818 * inferiors.c (gdb_id_to_thread_id): Remove.
6819 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6820 removal. Move pid declaration closer to where it's used.
6821
6822 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6823
6824 * server.c (handle_detach): New function.
6825 (process_serial_event): Move code out, call handle_detach.
6826
6827 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6828
6829 * server.c (require_running): Rename to ...
6830 (require_running_or_return): ... this ...
6831 (require_running_or_break): ... and this.
6832 (handle_query, process_serial_event): Adjust.
6833
6834 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6835
6836 * linux-low.c (linux_set_resume_request): Remove unused
6837 variables.
6838
6839 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6840
6841 * server.c (first_thread_of): Remove.
6842 (process_serial_event): Replace usage of first_thread_of with
6843 find_any_thread_of_pid.
6844 * tracepoint.c (same_process_p): Remove.
6845 (gdb_agent_about_to_close): Replace usage of same_process_p with
6846 find_any_thread_of_pid.
6847 * linux-x86-low.c (same_process_callback): Remove.
6848 (x86_arch_setup_process_callback): Replace usage of
6849 same_process_callback with find_any_thread_of_pid.
6850 * thread-db.c (any_thread_of): Remove.
6851 (switch_to_process): Replace usage of any_thread_of with
6852 find_any_thread_of_pid.
6853 * inferiors.c (thread_pid_matches_callback): Remove.
6854 (find_thread_process): Adjust to use find_any_thread_of_pid.
6855
6856 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6857
6858 * regcache.c (get_thread_regcache): Guard calls to "memset"
6859 with "!VEC_empty".
6860
6861 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6862
6863 * linux-low.c (handle_extended_wait): Use
6864 "allocate_target_description" instead of "XNEW".
6865 * linux-x86-low.c (initialize_low_arch): Likewise.
6866
6867 2017-09-05 Yao Qi <yao.qi@linaro.org>
6868
6869 * configure.srv (srv_i386_regobj): Remove.
6870 (srv_amd64_regobj): Remove.
6871 (srv_regobj): Set it to "" for x86 non-linux targets.
6872 * linux-x86-tdesc.c (i386_linux_read_description):
6873 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6874 (init_registers_i386): Remove the declaration.
6875 (tdesc_i386): Remove the declaration.
6876 (lynx_i386_arch_setup): Call i386_create_target_description.
6877 * nto-x86-low.c: Likewise.
6878 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6879 [!__x86_64__]: include arch/i386.h.
6880 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6881
6882 2017-09-05 Yao Qi <yao.qi@linaro.org>
6883
6884 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6885 i386/amd64-XXX-linux from it.
6886
6887 2017-09-05 Yao Qi <yao.qi@linaro.org>
6888
6889 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6890 false.
6891 (ipa_amd64_linux_regobj): Remove.
6892 (ipa_x32_linux_regobj): Remove.
6893
6894 2017-09-05 Yao Qi <yao.qi@linaro.org>
6895
6896 * Makefile.in (arch-amd64.o): New rule.
6897 * configure.srv: Append arch-amd64.o.
6898 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6899 (get_ipa_tdesc): Call amd64_linux_read_description.
6900 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6901 and init_registers_amd64_XXX.
6902 * linux-x86-low.c (x86_linux_read_description): Call
6903 amd64_linux_read_description.
6904 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6905 (initialize_low_arch): Don't call init_registers_x32_XXX and
6906 init_registers_amd64_XXX.
6907 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6908 and tdesc_amd64_XXX.
6909 [__x86_64__] (amd64_tdesc_test): New function.
6910 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6911 and init_registers_amd64_XXX.
6912 * linux-x86-tdesc.c: Include arch/amd64.h.
6913 (xcr0_to_tdesc_idx): New function.
6914 (i386_linux_read_description): New function.
6915 (amd64_get_ipa_tdesc_idx): New function.
6916 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6917 (amd64_get_ipa_tdesc): Declare.
6918
6919 2017-09-05 Yao Qi <yao.qi@linaro.org>
6920
6921 * configure.srv (srv_i386_linux_xmlfiles): Remove
6922 i386/i386-XXX-linux.xml from it.
6923
6924 2017-09-05 Yao Qi <yao.qi@linaro.org>
6925
6926 * configure.srv: Set srv_i386_linux_regobj empty if $development
6927 is false.
6928 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6929 initialize_low_tdesc.
6930 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6931 with #if initialize_low_tdesc.
6932 * linux-x86-tdesc-selftest.c: New file.
6933 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6934
6935 2017-09-05 Yao Qi <yao.qi@linaro.org>
6936
6937 * Makefile.in (arch-i386.o): New rule.
6938 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6939 (x86_64-*-linux*): Likewise.
6940 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6941 include arch/i386.h.
6942 (i386_linux_read_description): Remove code and call
6943 i386_create_target_description.
6944 * tdesc.c (allocate_target_description): New function.
6945 * tdesc.h (set_tdesc_architecture): Remove declaration.
6946 (set_tdesc_osabi): Likewise.
6947
6948 2017-09-05 Yao Qi <yao.qi@linaro.org>
6949
6950 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6951 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6952 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6953 .xmltarget.
6954 * server.c (get_features_xml): Call tdesc_get_features_xml.
6955 * tdesc.c (set_tdesc_architecture): New function.
6956 (set_tdesc_osabi): New function.
6957 (tdesc_get_features_xml): New function.
6958 (tdesc_create_feature): Add an argument.
6959 * tdesc.h (struct target_desc) <features>: New field.
6960 <arch, osabi>: New field.
6961 (~target_desc): xfree features, arch, and osabi.
6962 (target_desc::oerator==): Don't compare .xmltarget.
6963 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6964 (set_tdesc_osabi): Likewise.
6965 (tdesc_get_features_xml): Likewise.
6966
6967 2017-09-05 Yao Qi <yao.qi@linaro.org>
6968
6969 * linux-x86-tdesc.c: Include selftest.h.
6970 (i386_tdesc_test): New function.
6971 (initialize_low_tdesc): Call selftests::register_test.
6972 * tdesc.h: Include regdef.h.
6973 (target_desc): Override operator == and !=.
6974
6975 2017-09-05 Yao Qi <yao.qi@linaro.org>
6976
6977 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6978 (ipa_obj): Likewise.
6979 * linux-i386-ipa.c: Include common/x86-xstate.h
6980 (get_ipa_tdesc): Call i386_linux_read_description.
6981 (initialize_low_tracepoint): Don't call init_registers_XXX
6982 functions, call initialize_low_tdesc instead.
6983 * linux-x86-low.c (x86_linux_read_description): Call
6984 i386_linux_read_description.
6985 (initialize_low_arch): Don't call init_registers_i386_XXX
6986 functions, call initialize_low_tdesc.
6987 * linux-x86-tdesc.c: New file.
6988 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6989 (i386_get_ipa_tdesc_idx): Declare.
6990 (i386_get_ipa_tdesc): Declare.
6991 (initialize_low_tdesc): Declare.
6992
6993 2017-09-05 Yao Qi <yao.qi@linaro.org>
6994
6995 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6996 instead of 0.
6997
6998 2017-09-05 Yao Qi <yao.qi@linaro.org>
6999
7000 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7001 * regcache.c (get_thread_regcache): Use VEC_length.
7002 (init_register_cache): Likewise.
7003 (regcache_cpy): Likewise.
7004 (registers_to_string): Iterate reg_defs via VEC_iterate.
7005 (find_regno): Likewise.
7006 (find_register_by_number): Use VEC_index.
7007 (register_size): Call find_register_by_number.
7008 (register_data): Call find_register_by_number.
7009 (supply_regblock): Use VEC_length.
7010 (regcache_raw_read_unsigned): Likewise.
7011 * tdesc.c (init_target_desc): Iterate reg_defs via
7012 VEC_iterate.
7013 (default_description): Update initializer.
7014 (copy_target_description): Don't update field num_registers.
7015 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7016 <num_registers>: Remove.
7017
7018 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7019
7020 * Makefile.in (.SECONDARY): Define target.
7021
7022 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7023
7024 * linux-low.c (linux_wait_1): Adjust.
7025 * server.c (queue_stop_reply_callback): Adjust.
7026
7027 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7028
7029 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7030 QEnvironmentUnset and QEnvironmentReset packets.
7031 (handle_query): Inform remote that QEnvironmentHexEncoded,
7032 QEnvironmentUnset and QEnvironmentReset are supported.
7033
7034 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7035
7036 * inferiors.h (inferior_target_data): Rename to ...
7037 (thread_target_data): ... this.
7038 (inferior_regcache_data): Rename to ...
7039 (thread_regcache_data): ... this.
7040 (set_inferior_regcache_data): Rename to ...
7041 (set_thread_regcache_data): ... this.
7042 * inferiors.c (inferior_target_data): Rename to ...
7043 (thread_target_data): ... this.
7044 (inferior_regcache_data): Rename to ...
7045 (thread_regcache_data): ... this.
7046 (set_inferior_regcache_data): Rename to ...
7047 (set_thread_regcache_data): ... this.
7048 (free_one_thread): Update.
7049 * linux-low.h (get_thread_lwp): Update.
7050 * regcache.c (get_thread_regcache): Update.
7051 (regcache_invalidate_thread): Update.
7052 (free_register_cache_thread): Update.
7053 * win32-i386-low.c (update_debug_registers_callback): Update.
7054 (win32_get_current_dr): Update.
7055 * win32-low.c (thread_rec): Update.
7056 (delete_thread_info): Update.
7057 (continue_one_thread): Update.
7058 (suspend_one_thread): Update.
7059
7060 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7061
7062 * inferiors.c (set_inferior_target_data): Remove.
7063 * inferiors.h (set_inferior_target_data): Remove.
7064
7065 2017-08-18 Yao Qi <yao.qi@linaro.org>
7066
7067 * Makefile.in (OBS): Add selftest.o.
7068 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7069 * configure, config.in: Re-generated.
7070 * server.c: Include common/sefltest.h.
7071 (captured_main): Handle option --selftest.
7072
7073 2017-08-09 Yao Qi <yao.qi@linaro.org>
7074
7075 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7076 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7077 i386-avx-mpx.o and i386-mmx.o.
7078 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7079 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7080 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7081 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7082 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7083 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7084 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7085 i386/amd64-avx-mpx.xml.
7086
7087 2017-08-09 Yao Qi <yao.qi@linaro.org>
7088
7089 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7090 and x32-avx-avx512.o.
7091 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7092 i386/x32-avx-avx512.xml.
7093
7094 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7095
7096 * tracepoint.h (enum class fast_tpoint_collect_result): New
7097 enumeration.
7098 (fast_tracepoint_collecting): Change return type to
7099 fast_tpoint_collect_result.
7100 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7101 * linux-low.h: Include tracepoint.h.
7102 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7103 fast_tpoint_collect_result.
7104 * linux-low.c (handle_tracepoints): Adjust.
7105 (linux_fast_tracepoint_collecting): Change return type to
7106 fast_tpoint_collect_result.
7107 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7108 linux_wait_1, stuck_in_jump_pad_callback,
7109 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7110 proceed_one_lwp): Adjust to type change.
7111
7112 2017-07-10 Yao Qi <yao.qi@linaro.org>
7113
7114 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7115
7116 2017-06-29 Yao Qi <yao.qi@linaro.org>
7117
7118 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7119 Remove.
7120 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7121
7122 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7123
7124 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7125
7126 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7127
7128 * linux-low.c (linux_create_inferior): Adjust code to access the
7129 environment information via 'gdb_environ' class.
7130 * lynx-low.c (lynx_create_inferior): Likewise.
7131 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7132 (get_environ): Return a pointer to 'our_environ'.
7133 (captured_main): Initialize 'our_environ'.
7134 * server.h (get_environ): Adjust prototype.
7135 * spu-low.c (spu_create_inferior): Adjust code to access the
7136 environment information via 'gdb_environ' class.
7137
7138 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7139
7140 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7141 usage of "register" keyword.
7142
7143 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7144
7145 * configure: Re-generate.
7146
7147 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7148
7149 * configure: Re-generate.
7150
7151 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7152
7153 * Makefile.in (COMPILE.pre): Add "-x c++".
7154
7155 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7156
7157 * fork-child.c: Conditionally include <signal.h>.
7158
7159 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7160
7161 * server.c (handle_general_set): Handle new packet
7162 "QStartupWithShell".
7163 (handle_query): Add "QStartupWithShell" to the list of supported
7164 packets.
7165 (gdbserver_usage): Add help text explaining the
7166 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7167 options.
7168 (captured_main): Recognize and act upon the presence of the new
7169 CLI options.
7170
7171 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7172 Pedro Alves <palves@redhat.com>
7173
7174 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7175 * configure: Regenerate.
7176 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7177 "fork-inferior.o".
7178 (i[34567]86-*-lynxos*): Likewise.
7179 (spu*-*-*): Likewise.
7180 * fork-child.c: New file.
7181 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7182 and "environ.h".
7183 (linux_ptrace_fun): New function.
7184 (linux_create_inferior): Adjust function prototype to reflect
7185 change on "target.h". Adjust function code to use
7186 "fork_inferior".
7187 (linux_request_interrupt): Delete "signal_pid".
7188 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7189 (lynx_ptrace_fun): New function.
7190 (lynx_create_inferior): Adjust function prototype to reflect
7191 change on "target.h". Adjust function code to use
7192 "fork_inferior".
7193 * nto-low.c (nto_create_inferior): Adjust function prototype and
7194 code to reflect change on "target.h". Update comments.
7195 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7196 "common-terminal.h" and "environ.h".
7197 (terminal_fd): Moved to fork-child.c.
7198 (old_foreground_pgrp): Likewise.
7199 (restore_old_foreground_pgrp): Likewise.
7200 (last_status): Make it global.
7201 (last_ptid): Likewise.
7202 (our_environ): New variable.
7203 (startup_with_shell): Likewise.
7204 (program_name): Likewise.
7205 (program_argv): Rename to...
7206 (program_args): ...this.
7207 (wrapper_argv): New variable.
7208 (start_inferior): Delete function.
7209 (get_exec_wrapper): New function.
7210 (get_exec_file): Likewise.
7211 (get_environ): Likewise.
7212 (prefork_hook): Likewise.
7213 (post_fork_inferior): Likewise.
7214 (postfork_hook): Likewise.
7215 (postfork_child_hook): Likewise.
7216 (handle_v_run): Update code to deal with arguments coming from the
7217 remote host. Update calls from "start_inferior" to
7218 "create_inferior".
7219 (captured_main): Likewise. Initialize environment variable. Call
7220 "have_job_control".
7221 * server.h (post_fork_inferior): New prototype.
7222 (get_environ): Likewise.
7223 (last_status): Declare.
7224 (last_ptid): Likewise.
7225 (signal_pid): Likewise.
7226 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7227 (spu_ptrace_fun): New function.
7228 (spu_create_inferior): Adjust function prototype to reflect change
7229 on "target.h". Adjust function code to use "fork_inferior".
7230 * target.c (target_terminal_init): New function.
7231 (target_terminal_inferior): Likewise.
7232 (target_terminal_ours): Likewise.
7233 * target.h: Include <vector>.
7234 (struct target_ops) <create_inferior>: Update prototype.
7235 (create_inferior): Update macro.
7236 * utils.c (gdb_flush_out_err): New function.
7237 * win32-low.c (win32_create_inferior): Adjust function prototype
7238 and code to reflect change on "target.h".
7239
7240 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7241
7242 * inferiors.c (switch_to_thread): New function.
7243
7244 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7245
7246 * Makefile.in (SFILE): Add "common/job-control.c".
7247 (OBS): Add "job-control.o".
7248
7249 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7250
7251 * Makefile: Remove "@host_makefile_frag@".
7252
7253 2017-05-05 Pedro Alves <palves@redhat.com>
7254
7255 * configure: Regenerate.
7256
7257 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7258
7259 * configure: Regenerate.
7260
7261 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7262
7263 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7264 software_single_step change of return type to
7265 std::vector<CORE_ADDR>.
7266 * linux-low.c (install_software_single_step_breakpoints):
7267 Likewise.
7268 * linux-low.h (install_software_single_step_breakpoints):
7269 Likewise.
7270
7271 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7272
7273 * remote-utils.c: Include "gdb_termios.h" instead of
7274 "terminal.h".
7275 * terminal.h: Delete file.
7276
7277 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7278
7279 * server.c: Include <vector>.
7280 <program_argv, wrapper_argv>: Convert to std::vector.
7281 (start_inferior): Rewrite function to use C++.
7282 (handle_v_run): Likewise. Update code that calculates the argv
7283 based on the vRun packet; use C++.
7284 (captured_main): Likewise.
7285
7286 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7287
7288 * server.c (handle_v_cont): Initialize thread_resume::thread
7289 with null_ptid.
7290
7291 2017-04-05 Pedro Alves <palves@redhat.com>
7292
7293 * configure: Regenerate.
7294
7295 2017-04-05 Pedro Alves <palves@redhat.com>
7296
7297 * gdbreplay.c (sync_error): Constify.
7298 * linux-x86-low.c (push_opcode): Constify.
7299
7300 2017-04-05 Pedro Alves <palves@redhat.com>
7301
7302 * win32-low.c (get_child_debug_event)
7303 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7304 Report TARGET_WAITKIND_SPURIOUS instead.
7305
7306 2017-04-05 Pedro Alves <palves@redhat.com>
7307
7308 * remote-utils.c (remote_prepare, remote_open): Constify.
7309 * remote-utils.h (remote_prepare, remote_open): Constify.
7310 * server.c (captured_main): Constify 'port' handling.
7311
7312 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7313
7314 * Makefile.in (clean): Clear .deps.
7315
7316 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7317
7318 * .gitignore: Remove generated files, replace with wildcard.
7319 * (clean): Replace removal of generated files with wildcard.
7320 (version.c): Replace with...
7321 (version-generated.c): ...this.
7322 (xml-builtin.c): Replace with...
7323 (xml-builtin-generated.c): ...this.
7324 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7325 (%.c: *regformats*): Replace with...
7326 (%-generated.c: *regformats*): ...this.
7327
7328 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7329
7330 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7331 (xtensa_fill_gregset): Call collect_register_by_name for
7332 threadptr register.
7333 (xtensa_store_gregset): Call supply_register_by_name for
7334 threadptr register.
7335
7336 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7337
7338 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7339 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7340 (xtensa_store_gregset): Call supply_register for all registers in
7341 a0_regnum..a0_regnum + C0_NREGS range.
7342
7343 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7344
7345 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7346 (ax-ipa.o: ax.c): Remove.
7347 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7348 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7349 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7350 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7351 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7352
7353 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7354
7355 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7356 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7357 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7358 (errors-ipa.o: ../common/errors.c): Remove.
7359 (format-ipa.o: ../common/format.c): Remove.
7360 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7361
7362 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7363
7364 * Makefile.in (%-ipa.o: %.c): New rule.
7365 (tracepoint-ipa.o: tracepoint.c): Remove.
7366 (utils-ipa.o: utils.c): Remove.
7367 (remote-utils-ipa.o: remote-utils.c): Remove.
7368 (regcache-ipa.o: regcache.c): Remove.
7369 (i386-linux-ipa.o: i386-linux.c): Remove.
7370 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7371 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7372 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7373 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7374 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7375 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7376 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7377 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7378 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7379 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7380 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7381 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7382 (aarch64-ipa.o: aarch64.c): Remove.
7383 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7384 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7385 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7386 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7387 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7388 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7389 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7390 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7391 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7392 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7393 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7394 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7395 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7396 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7397 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7398 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7399 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7400 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7401 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7402 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7403 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7404 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7405 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7406 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7407 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7408 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7409 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7410 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7411 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7412 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7413 (tdesc-ipa.o: tdesc.c): Remove.
7414 (x32-linux-ipa.o: x32-linux.c): Remove.
7415 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7416 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7417
7418 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7419
7420 * Makefile.in (%.o: ../arch/%.c): New rule.
7421 (arm.o: ../arch/arm.c): Remove.
7422 (arm-linux.o: ../arch/arm-linux.c): Remove.
7423 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7424 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7425
7426 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7427
7428 * Makefile.in (%.o: ../nat/%.c): New rule.
7429 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7430 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7431 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7432 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7433 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7434 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7435 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7436 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7437 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7438 (linux-personality.o: ../nat/linux-personality.c): Remove.
7439 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7440 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7441 (x86-linux.o: ../nat/x86-linux.c): Remove.
7442 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7443 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7444
7445 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7446
7447 * Makefile.in (%.o: ../common/%.c): New rule.
7448 (signals.o: ../common/signals.c): Remove.
7449 (print-utils.o: ../common/print-utils.c): Remove.
7450 (rsp-low.o: ../common/rsp-low.c): Remove.
7451 (common-utils.o: ../common/common-utils.c): Remove.
7452 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7453 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7454 (vec.o: ../common/vec.c): Remove.
7455 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7456 (xml-utils.o: ../common/xml-utils.c): Remove.
7457 (ptid.o: ../common/ptid.c): Remove.
7458 (buffer.o: ../common/buffer.c): Remove.
7459 (format.o: ../common/format.c): Remove.
7460 (filestuff.o: ../common/filestuff.c): Remove.
7461 (agent.o: ../common/agent.c): Remove.
7462 (errors.o: ../common/errors.c): Remove.
7463 (environ.o: ../common/environ.c): Remove.
7464 (common-debug.o: ../common/common-debug.c): Remove.
7465 (cleanups.o: ../common/cleanups.c): Remove.
7466 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7467 (fileio.o: ../common/fileio.c): Remove.
7468 (common-regcache.o: ../common/common-regcache.c): Remove.
7469 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7470 (new-op.o: ../common/new-op.c): Remove.
7471 (btrace-common.o: ../common/btrace-common.c): Remove.
7472
7473 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7474
7475 * Makefile.in (%.o: ../target/%.c): New rule.
7476 (waitstatus.o: ../target/waitstatus.c): Remove.
7477
7478 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7479
7480 * Makefile.in
7481 (%.c: ../regformats/%.dat,
7482 (%.c: ../regformats/arm/%.dat,
7483 (%.c: ../regformats/i386/%.dat,
7484 (%.c: ../regformats/rs6000/%.dat): New rules.
7485 (aarch64.c): Remove.
7486 (reg-arm.c): Remove.
7487 (arm-with-iwmmxt.c): Remove.
7488 (arm-with-vfpv2.c): Remove.
7489 (arm-with-vfpv3.c): Remove.
7490 (arm-with-neon.c): Remove.
7491 (reg-bfin.c): Remove.
7492 (reg-cris.c): Remove.
7493 (reg-crisv32.c): Remove.
7494 (i386.c): Remove.
7495 (i386-linux.c): Remove.
7496 (i386-avx.c): Remove.
7497 (i386-avx-linux.c): Remove.
7498 (i386-avx-avx512.c): Remove.
7499 (i386-avx-avx512-linux.c): Remove.
7500 (i386-mpx.c): Remove.
7501 (i386-mpx-linux.c): Remove.
7502 (i386-avx-mpx-avx512-pku.c): Remove.
7503 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7504 (i386-avx-mpx.c): Remove.
7505 (i386-avx-mpx-linux.c): Remove.
7506 (i386-mmx.c): Remove.
7507 (i386-mmx-linux.c): Remove.
7508 (reg-ia64.c): Remove.
7509 (reg-m32r.c): Remove.
7510 (reg-m68k.c): Remove.
7511 (reg-cf.c): Remove.
7512 (mips-linux.c): Remove.
7513 (mips-dsp-linux.c): Remove.
7514 (mips64-linux.c): Remove.
7515 (mips64-dsp-linux.c): Remove.
7516 (nios2-linux.c): Remove.
7517 (powerpc-32.c): Remove.
7518 (powerpc-32l.c): Remove.
7519 (powerpc-altivec32l.c): Remove.
7520 (powerpc-cell32l.c): Remove.
7521 (powerpc-vsx32l.c): Remove.
7522 (powerpc-isa205-32l.c): Remove.
7523 (powerpc-isa205-altivec32l.c): Remove.
7524 (powerpc-isa205-vsx32l.c): Remove.
7525 (powerpc-e500l.c): Remove.
7526 (powerpc-64l.c): Remove.
7527 (powerpc-altivec64l.c): Remove.
7528 (powerpc-cell64l.c): Remove.
7529 (powerpc-vsx64l.c): Remove.
7530 (powerpc-isa205-64l.c): Remove.
7531 (powerpc-isa205-altivec64l.c): Remove.
7532 (powerpc-isa205-vsx64l.c): Remove.
7533 (s390-linux32.c): Remove.
7534 (s390-linux32v1.c): Remove.
7535 (s390-linux32v2.c): Remove.
7536 (s390-linux64.c): Remove.
7537 (s390-linux64v1.c): Remove.
7538 (s390-linux64v2.c): Remove.
7539 (s390-te-linux64.c): Remove.
7540 (s390-vx-linux64.c): Remove.
7541 (s390-tevx-linux64.c): Remove.
7542 (s390x-linux64.c): Remove.
7543 (s390x-linux64v1.c): Remove.
7544 (s390x-linux64v2.c): Remove.
7545 (s390x-te-linux64.c): Remove.
7546 (s390x-vx-linux64.c): Remove.
7547 (s390x-tevx-linux64.c): Remove.
7548 (tic6x-c64xp-linux.c): Remove.
7549 (tic6x-c64x-linux.c): Remove.
7550 (tic6x-c62x-linux.c): Remove.
7551 (reg-sh.c): Remove.
7552 (reg-sparc64.c): Remove.
7553 (reg-spu.c): Remove.
7554 (amd64.c): Remove.
7555 (amd64-linux.c): Remove.
7556 (amd64-avx.c): Remove.
7557 (amd64-avx-linux.c): Remove.
7558 (amd64-avx-avx512.c): Remove.
7559 (amd64-avx-avx512-linux.c): Remove.
7560 (amd64-mpx.c): Remove.
7561 (amd64-mpx-linux.c): Remove.
7562 (amd64-avx-mpx-avx512-pku.c): Remove.
7563 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7564 (amd64-avx-mpx.c): Remove.
7565 (amd64-avx-mpx-linux.c): Remove.
7566 (x32.c): Remove.
7567 (x32-linux.c): Remove.
7568 (x32-avx.c): Remove.
7569 (x32-avx-linux.c): Remove.
7570 (x32-avx-avx512.c): Remove.
7571 (x32-avx-avx512-linux.c): Remove.
7572 (reg-xtensa.c): Remove.
7573 (reg-tilegx.c): Remove.
7574 (reg-tilegx32.c): Remove.
7575
7576 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7577
7578 * Makefile.in (SFILES): Add "common/environ.c".
7579 (OBJS): Add "common/environ.h".
7580
7581 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7582
7583 * configure.ac: Check if the fs_base and gs_base members of
7584 `struct user_regs_struct' exist.
7585 * config.in: Regenerated.
7586 * configure: Likewise.
7587
7588 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7589
7590 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7591 target_read_memory.
7592 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7593 (get_next_pcs_syscall_next_pc): Likewise.
7594
7595 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7596
7597 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7598 * nto-x86-low.c: Likewise.
7599
7600 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7601
7602 * Makefile.in: Include disable-implicit-rules.mk.
7603
7604 2016-11-23 Pedro Alves <palves@redhat.com>
7605
7606 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7607 (debug_vprintf): Use std::chrono::steady_clock instead of
7608 gettimeofday. Use '.' instead of ':'.
7609 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7610 (get_timestamp): Use std::chrono::steady_clock instead of
7611 gettimeofday.
7612
7613 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7614
7615 * Makefile.in: Fix whitespace formatting.
7616
7617 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7618
7619 * Makefile.in (SFILES, OBS): Flatten list and order
7620 alphabetically.
7621
7622 2016-11-23 Pedro Alves <palves@redhat.com>
7623
7624 * event-loop.c (handle_file_event): Use warning.
7625 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7626 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7627 Use warning.
7628
7629 2016-11-23 Pedro Alves <palves@redhat.com>
7630
7631 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7632 output.
7633 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7634 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7635 debug_printf and debug_flush for debug output.
7636 * server.c (handle_general_set): Likewise.
7637 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7638 output.
7639
7640 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7641
7642 * Makefile.in (.c.o): Replace rule with ...
7643 (%.o: %.c): ... this one.
7644
7645 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7646
7647 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7648 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7649 make.
7650 * configure.ac: Remove checks for the make program.
7651 * configure: Re-generate.
7652
7653 2016-10-28 Pedro Alves <palves@redhat.com>
7654
7655 * Makefile.in (CXX_DIALECT): Get from configure.
7656 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7657 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7658 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7659 * config.in: Regenerate.
7660 * configure: Regenerate.
7661
7662 2016-10-27 Yao Qi <yao.qi@linaro.org>
7663
7664 * linux-low.c (linux_supports_range_stepping): Return true if
7665 can_software_single_step return true.
7666
7667 2016-10-27 Yao Qi <yao.qi@linaro.org>
7668
7669 * inferiors.c (find_inferior_in_random): New function.
7670 * inferiors.h (find_inferior_in_random): Declare.
7671 * linux-low.c (linux_wait_for_event_filtered): Call
7672 find_inferior_in_random instead of find_inferior.
7673
7674 2016-10-27 Yao Qi <yao.qi@linaro.org>
7675
7676 * linux-low.c (linux_wait_1): If single-step breakpoints are
7677 inserted, remove them.
7678
7679 2016-10-26 Pedro Alves <palves@redhat.com>
7680
7681 * linux-low.c (handle_extended_wait): Link parent/child fork
7682 threads.
7683 (linux_wait_1): Unlink them.
7684 (linux_set_resume_request): Ignore resume requests for
7685 already-resumed and unhandled fork child threads.
7686 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7687 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7688 New functions.
7689 (handle_v_requests) <vCont>: Don't call require_running.
7690 * server.h (in_queued_stop_replies): New declaration.
7691
7692 2016-10-24 Yao Qi <yao.qi@linaro.org>
7693
7694 PR server/20733
7695 * linux-aarch64-low.c (append_insns): Cast the return value to
7696 'uint32_t *'.
7697
7698 2016-10-10 Yao Qi <yao.qi@linaro.org>
7699
7700 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7701
7702 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7703
7704 * target.c (target_supports_multi_process): New function, moved
7705 from...
7706 * target.h (target_supports_multi_process): ... here. Remove
7707 macro.
7708
7709 2016-10-05 Tom Tromey <tom@tromey.com>
7710
7711 PR remote/20655:
7712 * tracepoint.c (handle_tracepoint_bkpts): Check
7713 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7714
7715 2016-10-05 Yao Qi <yao.qi@linaro.org>
7716
7717 * configure.srv: Update the path of arm-*.xml files.
7718
7719 2016-10-05 Terry Guo <terry.guo@arm.com>
7720 Yao Qi <yao.qi@linaro.org>
7721
7722 * Makefile.in: Adjust the path of rules.
7723 * configure.srv: Update the path of xml files.
7724 * regformats/arm-with-iwmmxt.dat: Regenerated.
7725 * regformats/arm-with-neon.dat: Likewise.
7726 * regformats/arm-with-vfpv2.dat: Likewise.
7727 * regformats/arm-with-vfpv3.dat Likewise.
7728
7729 2016-09-30 Yao Qi <yao.qi@linaro.org>
7730
7731 PR gdbserver/20627
7732 * target.c (target_stop_and_wait): Don't call
7733 target_continue_no_signal, use resume_stop instead.
7734
7735 2016-09-26 Yao Qi <yao.qi@linaro.org>
7736
7737 * linux-low.c (linux_wait_1): Call debug_exit.
7738
7739 2016-09-23 Pedro Alves <palves@redhat.com>
7740
7741 * Makefile.in (SFILES): Add common/new-op.c.
7742 (OBS): Add common/new-op.o.
7743 (new-op.o): New rule.
7744
7745 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7746
7747 * .gitinore: Ignore more files.
7748
7749 2016-09-21 Yao Qi <yao.qi@linaro.org>
7750
7751 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7752 23.
7753
7754 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7755
7756 * server.c (start_inferior): Call target_mourn_inferior instead of
7757 mourn_inferior; pass ptid_t argument to it.
7758 (resume): Likewise.
7759 (handle_target_event): Likewise.
7760 * target.c (target_mourn_inferior): New function.
7761 * target.h (mourn_inferior): Delete macro.
7762
7763 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7764
7765 * linux-low.c (lwp_is_stepping): New function.
7766
7767 2016-09-06 Carl Love <cel@us.ibm.com>
7768
7769 * server.c (start_inferior): Fixed comment, requested comment change
7770 didn't get updated correctly. Removed reference to ptrace () call as
7771 it is only true on Linux systems.
7772
7773 2016-09-06 Carl Love <cel@us.ibm.com>
7774
7775 * server.c (start_inferior): Do not call
7776 function target_post_create_inferior () if the
7777 inferior process has already exited.
7778
7779 2016-09-05 Pedro Alves <palves@redhat.com>
7780
7781 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7782 (COMPILE.pre, CC_LD): Use CXX directly.
7783 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7784 * acinclude.m4: Don't include build-with-cxx.m4.
7785 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7786 * configure: Regenerate.
7787
7788 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7789
7790 PR gdb/19495
7791 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7792 call writing data to own_buf.
7793
7794 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7795
7796 * target.c (mywait): Call target_wait instead of
7797 the_target->wait.
7798 (target_wait): New function.
7799
7800 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7801
7802 * server.c (start_inferior): New variable 'ptid'. Replace calls
7803 to the_target->resume by target_continue{,_no_signal}, depending
7804 on the case.
7805 * target.c (target_stop_and_wait): Call target_continue_no_signal
7806 instead of the_target->resume.
7807 (target_continue): New function.
7808
7809 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7810
7811 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7812
7813 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7814
7815 PR server/20491
7816 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7817 ps_prochandle.
7818 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7819 * linux-arm-low.c (ps_get_thread_area): Likewise.
7820 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7821 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7822 * linux-mips-low.c (ps_get_thread_area): Likewise.
7823 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7824 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7825 * linux-x86-low.c (ps_get_thread_area): Likewise.
7826 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7827
7828 2016-08-19 Pedro Alves <palves@redhat.com>
7829
7830 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7831
7832 2016-08-19 Pedro Alves <palves@redhat.com>
7833
7834 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7835 comment. Use memcpy instead of casting through unsigned long.
7836
7837 2016-08-19 Pedro Alves <palves@redhat.com>
7838
7839 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7840 allocating around 0x80000000.
7841
7842 2016-08-19 Pedro Alves <palves@redhat.com>
7843
7844 PR gdb/20415
7845 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7846 (x32-avx512-linux-ipa.o): New rules.
7847 * configure.ac (x86_64-*-linux*): New x32 check.
7848 * configure.srv (ipa_x32_linux_regobj): New.
7849 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7850 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7851 descriptions.
7852 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7853 descriptions.
7854 * configure: Regenerate.
7855
7856 2016-08-09 Pedro Alves <palves@redhat.com>
7857
7858 PR gdb/18653
7859 * Makefile.in (OBS): Add signals-state-save-restore.o.
7860 (signals-state-save-restore.o): New rule.
7861 * config.in: Regenerate.
7862 * configure: Regenerate.
7863 * linux-low.c: Include "signals-state-save-restore.h".
7864 (linux_create_inferior): Call
7865 restore_original_signals_state.
7866 * server.c: Include "dispositions-save-restore.h".
7867 (captured_main): Call save_original_signals_state.
7868
7869 2016-08-05 Pedro Alves <palves@redhat.com>
7870
7871 * configure: Regenerate.
7872
7873 2016-08-04 Yao Qi <yao.qi@linaro.org>
7874
7875 * linux-low.c (regsets_fetch_inferior_registers): Check
7876 errno is ESRCH or not.
7877
7878 2016-08-02 Yao Qi <yao.qi@linaro.org>
7879
7880 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7881 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7882 (thread_db_load_search): Update.
7883 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7884 td_ta_set_event and td_ta_event_getmsg.
7885
7886 2016-07-26 Pedro Alves <palves@redhat.com>
7887
7888 PR server/20414
7889 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7890 of unsigned long for 64-bit registers and use uint32_t instead of
7891 unsigned int for 32-bit registers.
7892
7893 2016-07-26 Pedro Alves <palves@redhat.com>
7894
7895 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7896 to 'ptrace'.
7897
7898 2016-07-21 Tom Tromey <tom@tromey.com>
7899
7900 * configure: Rebuild.
7901
7902 2016-07-21 Yao Qi <yao.qi@linaro.org>
7903
7904 * mem-break.c (find_gdb_breakpoint): Cast bp to
7905 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7906
7907 2016-07-21 Yao Qi <yao.qi@linaro.org>
7908
7909 * server.c (handle_v_requests): Support s and S actions
7910 if target_supports_software_single_step return true.
7911
7912 2016-07-21 Yao Qi <yao.qi@linaro.org>
7913
7914 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7915 is resume_step, call maybe_hw_step.
7916 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7917 and unstop them.
7918 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7919 breakpoints or not.
7920 (proceed_one_lwp): If resume request is resume_step, install
7921 reinsert breakpoints and call maybe_hw_step.
7922
7923 2016-07-21 Yao Qi <yao.qi@linaro.org>
7924
7925 * linux-low.c (proceed_one_lwp): Declare.
7926 (linux_resume_one_thread): Remove local variable 'step'.
7927 Lift code enqueue signal. Call proceed_one_lwp instead of
7928 linux_resume_one_lwp.
7929
7930 2016-07-21 Yao Qi <yao.qi@linaro.org>
7931
7932 * linux-low.c (linux_resume_one_thread): Call
7933 enqueue_pending_signal.
7934
7935 2016-07-21 Yao Qi <yao.qi@linaro.org>
7936
7937 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7938 * inferiors.c (do_restore_current_thread_cleanup): New function.
7939 (make_cleanup_restore_current_thread): Likewise.
7940 * linux-low.c (install_software_single_step_breakpoints): Call
7941 make_cleanup_restore_current_thread. Switch current_thread to
7942 thread.
7943
7944 2016-07-21 Yao Qi <yao.qi@linaro.org>
7945
7946 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7947 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7948 (clone_one_breakpoint): Likewise.
7949 (delete_reinsert_breakpoints): Change parameter to thread.
7950 Callers updated.
7951 (has_reinsert_breakpoints): Likewise.
7952 (uninsert_reinsert_breakpoints): Likewise.
7953 (reinsert_reinsert_breakpoints): Likewise.
7954 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7955 (delete_reinsert_breakpoints): Likewise.
7956 (reinsert_reinsert_breakpoints): Likewise.
7957 (uninsert_reinsert_breakpoints): Likewise.
7958 (has_reinsert_breakpoints): Likewise.
7959
7960 2016-07-21 Yao Qi <yao.qi@linaro.org>
7961
7962 * inferiors.c (get_thread_process): Make parameter const.
7963 * inferiors.h (get_thread_process): Update declaration.
7964 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7965 Add new parameters child_thread and parent_thread. Callers
7966 updated.
7967 * mem-break.h (clone_all_breakpoints): Update declaration.
7968
7969 2016-07-21 Yao Qi <yao.qi@linaro.org>
7970
7971 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7972 <command_list, handler>: Remove.
7973 (struct gdb_breakpoint): New.
7974 (struct other_breakpoint): New.
7975 (struct reinsert_breakpoint): New.
7976 (is_gdb_breakpoint): New function.
7977 (any_persistent_commands): Update command_list if
7978 is_gdb_breakpoint returns true.
7979 (set_breakpoint): Create breakpoints according to their types.
7980 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7981 (set_gdb_breakpoint_1): Likewise.
7982 (set_gdb_breakpoint): Likewise.
7983 (clear_breakpoint_conditions): Change parameter type to
7984 'struct gdb_breakpoint *'.
7985 (clear_breakpoint_commands): Likewise.
7986 (clear_breakpoint_conditions_and_commands): Likewise.
7987 (add_condition_to_breakpoint): Likewise.
7988 (add_breakpoint_condition): Likewise.
7989 (add_commands_to_breakpoint): Likewise.
7990 (check_breakpoints): Check other_breakpoint.
7991 (clone_one_breakpoint): Clone breakpopint according to its type.
7992 * mem-break.h (struct gdb_breakpoint): Declare.
7993 (set_gdb_breakpoint): Update declaration.
7994 (clear_breakpoint_conditions_and_commands): Likewise.
7995 (add_breakpoint_condition): Likewise.
7996 (add_breakpoint_commands): Likewise.
7997 * server.c (process_point_options): Change parameter type to
7998 'struct gdb_breakpoint *'.
7999
8000 2016-07-21 Yao Qi <yao.qi@linaro.org>
8001
8002 * mem-break.c (set_breakpoint_at): Rename it to ...
8003 (set_breakpoint_type_at): ... it.
8004 (set_breakpoint_at): Call set_breakpoint_type_at.
8005 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8006 * mem-break.h (set_breakpoint_at): Update comments.
8007
8008 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8009
8010 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8011 to buf parameter.
8012 (nios2_store_gregset): Likewise.
8013
8014 2016-07-01 Pedro Alves <palves@redhat.com>
8015 Antoine Tremblay <antoine.tremblay@ericsson.com>
8016
8017 * linux-low.c: Change interface to take the target lwp_info
8018 pointer directly and return void. Handle detaching from a zombie
8019 thread.
8020 (linux_detach_lwp_callback): New function.
8021 (linux_detach): Detach from the leader thread after detaching from
8022 the clone threads.
8023
8024 2016-06-28 Yao Qi <yao.qi@linaro.org>
8025
8026 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8027 for variable new_offset.
8028 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8029 (aarch64_ftrace_insn_reloc_cb): Likewise.
8030 (aarch64_ftrace_insn_reloc_tb): Likewise.
8031 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8032 PRIx64 instead of PRIx32.
8033
8034 2016-06-28 Yao Qi <yao.qi@linaro.org>
8035
8036 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8037 (the_low_target): Install arm_get_syscall_trapinfo.
8038
8039 2016-06-28 Yao Qi <yao.qi@linaro.org>
8040
8041 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8042 function.
8043 (the_low_target): Install aarch64_get_syscall_trapinfo.
8044
8045 2016-06-28 Yao Qi <yao.qi@linaro.org>
8046
8047 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8048 Callers updated.
8049 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8050 Remove parameter sysno.
8051 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8052 sysret.
8053
8054 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8055
8056 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8057 (s390_emit_ne_goto): Likewise.
8058 (s390_emit_lt_goto): Likewise.
8059 (s390_emit_le_goto): Likewise.
8060 (s390_emit_gt_goto): Likewise.
8061 (s390_emit_ge_goto): Likewise.
8062 (s390x_emit_eq_goto): Likewise.
8063 (s390x_emit_ne_goto): Likewise.
8064 (s390x_emit_lt_goto): Likewise.
8065 (s390x_emit_le_goto): Likewise.
8066 (s390x_emit_gt_goto): Likewise.
8067 (s390x_emit_ge_goto): Likewise.
8068 (s390_emit_ops_impl): Mark variable static.
8069 (s390x_emit_ops): Likewise.
8070
8071 2016-06-17 Yao Qi <yao.qi@linaro.org>
8072
8073 * linux-low.c (handle_extended_wait): Call
8074 uninsert_reinsert_breakpoints for the parent process. Remove
8075 reinsert breakpoints from the child process. Reinsert them to
8076 the parent process when vfork is done.
8077 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8078 (reinsert_reinsert_breakpoints): New function.
8079 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8080 (reinsert_reinsert_breakpoints): Declare.
8081
8082 2016-06-17 Yao Qi <yao.qi@linaro.org>
8083
8084 * linux-low.c (handle_extended_wait): If the parent is doing
8085 step-over, remove the reinsert breakpoints from the forked child.
8086
8087 2016-06-17 Yao Qi <yao.qi@linaro.org>
8088
8089 * linux-low.c (unsuspend_all_lwps): Declare.
8090 (linux_low_filter_event): If thread exited, call finish_step_over.
8091 If step-over is finished, unsuspend other threads.
8092
8093 2016-06-17 Yao Qi <yao.qi@linaro.org>
8094
8095 * linux-low.c (linux_resume_one_lwp_throw): Assert
8096 has_reinsert_breakpoints returns false.
8097 * mem-break.c (delete_disabled_breakpoints): Assert
8098 bp type isn't reinsert_breakpoint.
8099
8100 2016-06-17 Yao Qi <yao.qi@linaro.org>
8101
8102 * linux-low.c (maybe_hw_step): New function.
8103 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8104 (finish_step_over): Switch current_thread to lwp temporarily,
8105 and assert has_reinsert_breakpoints returns true.
8106 (proceed_one_lwp): Call maybe_hw_step.
8107 * mem-break.c (has_reinsert_breakpoints): New function.
8108 * mem-break.h (has_reinsert_breakpoints): Declare.
8109
8110 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8111
8112 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8113
8114 2016-05-17 Yao Qi <yao.qi@linaro.org>
8115
8116 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8117 instead of find_inferior.
8118
8119 2016-05-05 Yao Qi <yao.qi@linaro.org>
8120
8121 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8122 Initialize res to zero.
8123
8124 2016-05-05 Yao Qi <yao.qi@linaro.org>
8125
8126 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8127 to uint32_t.
8128
8129 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8130
8131 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8132 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8133 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8134
8135 2016-04-28 Par Olsson <par.olsson@windriver.com>
8136 Simon Marchi <simon.marchi@ericsson.com>
8137
8138 * tracepoint.c (write_inferior_int8): New function.
8139 (cmd_qtenable_disable): Write enable flag using
8140 write_inferior_int8.
8141
8142 2016-04-25 Yao Qi <yao.qi@linaro.org>
8143
8144 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8145 (need_step_over_p): Return zero if the LWP has pending signals
8146 can be delivered on software single step target.
8147
8148 2016-04-25 Yao Qi <yao.qi@linaro.org>
8149
8150 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8151 return instead of error.
8152
8153 2016-04-22 Yao Qi <yao.qi@linaro.org>
8154
8155 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8156 to 23.
8157
8158 2016-04-22 Yao Qi <yao.qi@linaro.org>
8159
8160 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8161 signal when stepping over breakpoint with software single
8162 step.
8163
8164 2016-04-21 Pedro Alves <palves@redhat.com>
8165
8166 * linux-s390-low.c (s390_collect_ptrace_register)
8167 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8168 add casts.
8169 (s390_check_regset): Use void * instead of gdb_byte *.
8170
8171 2016-04-20 Pedro Alves <palves@redhat.com>
8172
8173 * configure: Renegerate.
8174
8175 2016-04-20 Yao Qi <yao.qi@linaro.org>
8176
8177 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8178 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8179 number 16.
8180 (arm_store_gregset): Likewise.
8181
8182 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8183
8184 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8185 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8186 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8187 (amd64-avx-mpx-linux.c): New rules.
8188 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8189 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8190 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8191 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8192 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8193 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8194 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8195 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8196 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8197 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8198 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8199 * linux-x86-low.c (x86_linux_read_description): Add case for
8200 X86_XSTATE_AVX_MPX_MASK.
8201 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8202 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8203 init_registers_i386_avx_mpx_linux.
8204 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8205 (initialize_low_tracepoint): Call
8206 init_registers_i386_avx_mpx_linux.
8207 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8208 (initialize_low_tracepoint): Call
8209 init_registers_amd64_avx_mpx_linux.
8210 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8211 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8212 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8213 declarations.
8214
8215 2016-04-18 Pedro Alves <palves@redhat.com>
8216
8217 * configure: Regenerate.
8218
8219 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8220
8221 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8222 (aarch64_emit_sub): Likewise.
8223
8224 2016-04-12 Pedro Alves <palves@redhat.com>
8225
8226 * utils.c (prepare_to_throw_exception): Delete.
8227
8228 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8229
8230 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8231
8232 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8233
8234 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8235
8236 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8237
8238 * linux-aarch64-ipa.c: Add <elf.h> include.
8239 * linux-ppc-ipa.c: Add <elf.h> include.
8240 * linux-s390-ipa.c: Add <elf.h> include.
8241
8242 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8243
8244 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8245 (get_raw_reg_ptr): Likewise.
8246 (get_trace_state_variable_value_ptr): Likewise.
8247 (set_trace_state_variable_value_ptr): Likewise.
8248 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8249 char *.
8250
8251 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8252 Marcin Kościelnicki <koriakin@0x04.net>
8253
8254 PR/17221
8255 * linux-ppc-low.c (emit_insns): New function.
8256 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8257 (ppc_emit_prologue): New function.
8258 (ppc_emit_epilogue): New function.
8259 (ppc_emit_add): New function.
8260 (ppc_emit_sub): New function.
8261 (ppc_emit_mul): New function.
8262 (ppc_emit_lsh): New function.
8263 (ppc_emit_rsh_signed): New function.
8264 (ppc_emit_rsh_unsigned): New function.
8265 (ppc_emit_ext): New function.
8266 (ppc_emit_zero_ext): New function.
8267 (ppc_emit_log_not): New function.
8268 (ppc_emit_bit_and): New function.
8269 (ppc_emit_bit_or): New function.
8270 (ppc_emit_bit_xor): New function.
8271 (ppc_emit_bit_not): New function.
8272 (ppc_emit_equal): New function.
8273 (ppc_emit_less_signed): New function.
8274 (ppc_emit_less_unsigned): New function.
8275 (ppc_emit_ref): New function.
8276 (ppc_emit_const): New function.
8277 (ppc_emit_reg): New function.
8278 (ppc_emit_pop): New function.
8279 (ppc_emit_stack_flush): New function.
8280 (ppc_emit_swap): New function.
8281 (ppc_emit_stack_adjust): New function.
8282 (ppc_emit_call): New function.
8283 (ppc_emit_int_call_1): New function.
8284 (ppc_emit_void_call_2): New function.
8285 (ppc_emit_if_goto): New function.
8286 (ppc_emit_goto): New function.
8287 (ppc_emit_eq_goto): New function.
8288 (ppc_emit_ne_goto): New function.
8289 (ppc_emit_lt_goto): New function.
8290 (ppc_emit_le_goto): New function.
8291 (ppc_emit_gt_goto): New function.
8292 (ppc_emit_ge_goto): New function.
8293 (ppc_write_goto_address): New function.
8294 (ppc_emit_ops_impl): New static variable.
8295 (ppc64v1_emit_prologue): New function.
8296 (ppc64v2_emit_prologue): New function.
8297 (ppc64_emit_epilogue): New function.
8298 (ppc64_emit_add): New function.
8299 (ppc64_emit_sub): New function.
8300 (ppc64_emit_mul): New function.
8301 (ppc64_emit_lsh): New function.
8302 (ppc64_emit_rsh_signed): New function.
8303 (ppc64_emit_rsh_unsigned): New function.
8304 (ppc64_emit_ext): New function.
8305 (ppc64_emit_zero_ext): New function.
8306 (ppc64_emit_log_not): New function.
8307 (ppc64_emit_bit_and): New function.
8308 (ppc64_emit_bit_or): New function.
8309 (ppc64_emit_bit_xor): New function.
8310 (ppc64_emit_bit_not): New function.
8311 (ppc64_emit_equal): New function.
8312 (ppc64_emit_less_signed): New function.
8313 (ppc64_emit_less_unsigned): New function.
8314 (ppc64_emit_ref): New function.
8315 (ppc64_emit_const): New function.
8316 (ppc64v1_emit_reg): New function.
8317 (ppc64v2_emit_reg): New function.
8318 (ppc64_emit_pop): New function.
8319 (ppc64_emit_stack_flush): New function.
8320 (ppc64_emit_swap): New function.
8321 (ppc64v1_emit_call): New function.
8322 (ppc64v2_emit_call): New function.
8323 (ppc64v1_emit_int_call_1): New function.
8324 (ppc64v2_emit_int_call_1): New function.
8325 (ppc64v1_emit_void_call_2): New function.
8326 (ppc64v2_emit_void_call_2): New function.
8327 (ppc64_emit_if_goto): New function.
8328 (ppc64_emit_eq_goto): New function.
8329 (ppc64_emit_ne_goto): New function.
8330 (ppc64_emit_lt_goto): New function.
8331 (ppc64_emit_le_goto): New function.
8332 (ppc64_emit_gt_goto): New function.
8333 (ppc64_emit_ge_goto): New function.
8334 (ppc64v1_emit_ops_impl): New static variable.
8335 (ppc64v2_emit_ops_impl): New static variable.
8336 (ppc_emit_ops): New function.
8337 (linux_low_target): Wire in ppc_emit_ops.
8338
8339 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8340 Marcin Kościelnicki <koriakin@0x04.net>
8341
8342 PR/17221
8343 * Makefile.in: Add powerpc-*-ipa.o
8344 * configure.srv: Add ipa_obj for powerpc*-linux.
8345 * linux-ppc-ipa.c: New file.
8346 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8347 includes.
8348 (PPC_FIELD): New macro.
8349 (PPC_SEXT): New macro.
8350 (PPC_OP6): New macro.
8351 (PPC_BO): New macro.
8352 (PPC_LI): New macro.
8353 (PPC_BD): New macro.
8354 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8355 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8356 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8357 (ppc_get_thread_area): New function.
8358 (is_elfv2_inferior): New function.
8359 (gen_ds_form): New function.
8360 (GEN_STD): New macro.
8361 (GEN_STDU): New macro.
8362 (GEN_LD): New macro.
8363 (GEN_LDU): New macro.
8364 (gen_d_form): New function.
8365 (GEN_ADDI): New macro.
8366 (GEN_ADDIS): New macro.
8367 (GEN_LI): New macro.
8368 (GEN_LIS): New macro.
8369 (GEN_ORI): New macro.
8370 (GEN_ORIS): New macro.
8371 (GEN_LWZ): New macro.
8372 (GEN_STW): New macro.
8373 (GEN_STWU): New macro.
8374 (gen_xfx_form): New function.
8375 (GEN_MFSPR): New macro.
8376 (GEN_MTSPR): New macro.
8377 (GEN_MFCR): New macro.
8378 (GEN_MTCR): New macro.
8379 (GEN_SYNC): New macro.
8380 (GEN_LWSYNC): New macro.
8381 (gen_x_form): New function.
8382 (GEN_OR): New macro.
8383 (GEN_MR): New macro.
8384 (GEN_LWARX): New macro.
8385 (GEN_STWCX): New macro.
8386 (GEN_CMPW): New macro.
8387 (gen_md_form): New function.
8388 (GEN_RLDICL): New macro.
8389 (GEN_RLDICR): New macro.
8390 (gen_i_form): New function.
8391 (GEN_B): New macro.
8392 (GEN_BL): New macro.
8393 (gen_b_form): New function.
8394 (GEN_BNE): New macro.
8395 (GEN_LOAD): New macro.
8396 (GEN_STORE): New macro.
8397 (gen_limm): New function.
8398 (gen_atomic_xchg): New function.
8399 (gen_call): New function.
8400 (ppc_relocate_instruction): New function.
8401 (ppc_install_fast_tracepoint_jump_pad): New function.
8402 (ppc_get_min_fast_tracepoint_insn_len): New function.
8403 (ppc_get_ipa_tdesc_idx): New function.
8404 (the_low_target): Wire in the new functions.
8405 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8406 tdescs.
8407 * linux-ppc-tdesc.h: New file.
8408
8409 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8410
8411 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8412 (alloc_jump_pad_buffer): New function.
8413 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8414 (alloc_jump_pad_buffer): New function.
8415 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8416 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8417 (alloc_jump_pad_buffer): New function.
8418 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8419 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8420 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8421 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8422
8423 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8424
8425 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8426 * linux-amd64-ipa.c: Likewise.
8427 * linux-i386-ipa.c: Likewise.
8428 * linux-s390-ipa.c: Likewise.
8429 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8430 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8431 set_trace_state_variable_value_ptr.
8432 (struct ipa_sym_addresses): Likewise.
8433 (symbol_list): Likewise.
8434 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8435 accessing gdb_collect directly.
8436 (gdb_collect_ptr_type): New typedef.
8437 (get_raw_reg_ptr_type): New typedef.
8438 (get_trace_state_variable_value_ptr_type): New typedef.
8439 (set_trace_state_variable_value_ptr_type): New typedef.
8440 (gdb_collect_ptr): New global.
8441 (get_raw_reg_ptr): New global.
8442 (get_trace_state_variable_value_ptr): New global.
8443 (set_trace_state_variable_value_ptr): New global.
8444 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8445 accessing get_raw_reg directly.
8446 (get_get_tsv_func_addr): Likewise for
8447 get_trace_state_variable_value_ptr.
8448 (get_set_tsv_func_addr): Likewise for
8449 set_trace_state_variable_value_ptr.
8450 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8451
8452 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8453
8454 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8455
8456 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8457
8458 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8459 packets.
8460 (relocate_instruction): Remove own_buf.
8461 * server.c (own_buf): Make global.
8462 (handle_v_requests): Make global.
8463 * server.h (own_buf): New declaration.
8464 (handle_v_requests): New prototype.
8465
8466 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8467
8468 PR 18377
8469 * linux-s390-low.c (add_insns): New function.
8470 (s390_emit_prologue): New function.
8471 (s390_emit_epilogue): New function.
8472 (s390_emit_add): New function.
8473 (s390_emit_sub): New function.
8474 (s390_emit_mul): New function.
8475 (s390_emit_lsh): New function.
8476 (s390_emit_rsh_signed): New function.
8477 (s390_emit_rsh_unsigned): New function.
8478 (s390_emit_ext): New function.
8479 (s390_emit_log_not): New function.
8480 (s390_emit_bit_and): New function.
8481 (s390_emit_bit_or): New function.
8482 (s390_emit_bit_xor): New function.
8483 (s390_emit_bit_not): New function.
8484 (s390_emit_equal): New function.
8485 (s390_emit_less_signed): New function.
8486 (s390_emit_less_unsigned): New function.
8487 (s390_emit_ref): New function.
8488 (s390_emit_if_goto): New function.
8489 (s390_emit_goto): New function.
8490 (s390_write_goto_address): New function.
8491 (s390_emit_litpool): New function.
8492 (s390_emit_const): New function.
8493 (s390_emit_call): New function.
8494 (s390_emit_reg): New function.
8495 (s390_emit_pop): New function.
8496 (s390_emit_stack_flush): New function.
8497 (s390_emit_zero_ext): New function.
8498 (s390_emit_swap): New function.
8499 (s390_emit_stack_adjust): New function.
8500 (s390_emit_set_r2): New function.
8501 (s390_emit_int_call_1): New function.
8502 (s390_emit_void_call_2): New function.
8503 (s390_emit_eq_goto): New function.
8504 (s390_emit_ne_goto): New function.
8505 (s390_emit_lt_goto): New function.
8506 (s390_emit_le_goto): New function.
8507 (s390_emit_gt_goto): New function.
8508 (s390_emit_ge_goto): New function.
8509 (s390x_emit_prologue): New function.
8510 (s390x_emit_epilogue): New function.
8511 (s390x_emit_add): New function.
8512 (s390x_emit_sub): New function.
8513 (s390x_emit_mul): New function.
8514 (s390x_emit_lsh): New function.
8515 (s390x_emit_rsh_signed): New function.
8516 (s390x_emit_rsh_unsigned): New function.
8517 (s390x_emit_ext): New function.
8518 (s390x_emit_log_not): New function.
8519 (s390x_emit_bit_and): New function.
8520 (s390x_emit_bit_or): New function.
8521 (s390x_emit_bit_xor): New function.
8522 (s390x_emit_bit_not): New function.
8523 (s390x_emit_equal): New function.
8524 (s390x_emit_less_signed): New function.
8525 (s390x_emit_less_unsigned): New function.
8526 (s390x_emit_ref): New function.
8527 (s390x_emit_if_goto): New function.
8528 (s390x_emit_const): New function.
8529 (s390x_emit_call): New function.
8530 (s390x_emit_reg): New function.
8531 (s390x_emit_pop): New function.
8532 (s390x_emit_stack_flush): New function.
8533 (s390x_emit_zero_ext): New function.
8534 (s390x_emit_swap): New function.
8535 (s390x_emit_stack_adjust): New function.
8536 (s390x_emit_int_call_1): New function.
8537 (s390x_emit_void_call_2): New function.
8538 (s390x_emit_eq_goto): New function.
8539 (s390x_emit_ne_goto): New function.
8540 (s390x_emit_lt_goto): New function.
8541 (s390x_emit_le_goto): New function.
8542 (s390x_emit_gt_goto): New function.
8543 (s390x_emit_ge_goto): New function.
8544 (s390_emit_ops): New function.
8545 (struct linux_target_ops): Fill in emit_ops hook.
8546
8547 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8548
8549 PR 18377
8550 * Makefile.in: Add s390 IPA files.
8551 * configure.srv: Build IPA for s390.
8552 * linux-s390-ipa.c: New file.
8553 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8554 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8555 (tdesc_s390_linux32): Likewise.
8556 (init_registers_s390_linux32v1): Likewise.
8557 (tdesc_s390_linux32v1): Likewise.
8558 (init_registers_s390_linux32v2): Likewise.
8559 (tdesc_s390_linux32v2): Likewise.
8560 (init_registers_s390_linux64): Likewise.
8561 (tdesc_s390_linux64): Likewise.
8562 (init_registers_s390_linux64v1): Likewise.
8563 (tdesc_s390_linux64v1): Likewise.
8564 (init_registers_s390_linux64v2): Likewise.
8565 (tdesc_s390_linux64v2): Likewise.
8566 (init_registers_s390_te_linux64): Likewise.
8567 (tdesc_s390_te_linux64): Likewise.
8568 (init_registers_s390_vx_linux64): Likewise.
8569 (tdesc_s390_vx_linux64): Likewise.
8570 (init_registers_s390_tevx_linux64): Likewise.
8571 (tdesc_s390_tevx_linux64): Likewise.
8572 (init_registers_s390x_linux64): Likewise.
8573 (tdesc_s390x_linux64): Likewise.
8574 (init_registers_s390x_linux64v1): Likewise.
8575 (tdesc_s390x_linux64v1): Likewise.
8576 (init_registers_s390x_linux64v2): Likewise.
8577 (tdesc_s390x_linux64v2): Likewise.
8578 (init_registers_s390x_te_linux64): Likewise.
8579 (tdesc_s390x_te_linux64): Likewise.
8580 (init_registers_s390x_vx_linux64): Likewise.
8581 (tdesc_s390x_vx_linux64): Likewise.
8582 (init_registers_s390x_tevx_linux64): Likewise.
8583 (tdesc_s390x_tevx_linux64): Likewise.
8584 (have_hwcap_s390_vx): New static variable.
8585 (s390_arch_setup): Fill have_hwcap_s390_vx.
8586 (s390_get_thread_area): New function.
8587 (s390_ft_entry_gpr_esa): New const.
8588 (s390_ft_entry_gpr_zarch): New const.
8589 (s390_ft_entry_misc): New const.
8590 (s390_ft_entry_fr): New const.
8591 (s390_ft_entry_vr): New const.
8592 (s390_ft_main_31): New const.
8593 (s390_ft_main_64): New const.
8594 (s390_ft_exit_fr): New const.
8595 (s390_ft_exit_vr): New const.
8596 (s390_ft_exit_misc): New const.
8597 (s390_ft_exit_gpr_esa): New const.
8598 (s390_ft_exit_gpr_zarch): New const.
8599 (append_insns): New function.
8600 (s390_relocate_instruction): New function.
8601 (s390_install_fast_tracepoint_jump_pad): New function.
8602 (s390_get_min_fast_tracepoint_insn_len): New function.
8603 (s390_get_ipa_tdesc_idx): New function.
8604 (struct linux_target_ops): Wire in the above functions.
8605 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8606 * linux-s390-tdesc.h: New file.
8607
8608 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8609
8610 * linux-s390-low.c (s390_supports_tracepoints): New function.
8611 (struct linux_target_ops): Fill supports_tracepoints hook.
8612
8613 2016-03-18 Yao Qi <yao.qi@linaro.org>
8614
8615 * linux-low.c (lwp_signal_can_be_delivered): New function.
8616 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8617
8618 2016-03-18 Yao Qi <yao.qi@linaro.org>
8619
8620 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8621 0 if signal is enqueued. Remove 'signal' from one debugging
8622 message. Move one debugging message to some lines below.
8623 Remove code setting 'signal' to 0.
8624
8625 2016-03-18 Yao Qi <yao.qi@linaro.org>
8626
8627 * linux-low.c (linux_low_filter_event): Remove redundant
8628 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8629
8630 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8631
8632 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8633 (struct linux_target_ops): Wire in the above.
8634
8635 2016-03-03 Yao Qi <yao.qi@linaro.org>
8636
8637 * linux-low.c: Update comments to start_step_over.
8638
8639 2016-03-03 Yao Qi <yao.qi@linaro.org>
8640
8641 PR server/19736
8642 * linux-low.c (handle_extended_wait): Set child suspended
8643 if event_lwp->bp_reinsert isn't zero.
8644
8645 2016-03-02 Yao Qi <yao.qi@linaro.org>
8646
8647 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8648 enqueue_pending_signal.
8649
8650 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8651
8652 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8653 is actually loaded.
8654
8655 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8656
8657 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8658 (s390_regmap_3264) [!__s390x__]: New global.
8659 (s390_collect_ptrace_register): Skip map entries containing -1.
8660 (s390_supply_ptrace_register): Ditto.
8661 (s390_fill_gprs_high): New function.
8662 (s390_store_gprs_high): New function.
8663 (s390_regsets): Add NT_S390_HIGH_GPRS.
8664 (s390_get_hwcap): Enable on 31-bit.
8665 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8666 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8667 Detect NT_S390_HIGH_GPRS.
8668 (s390_usrregs_info_3264): Enable on 31-bit.
8669 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8670 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8671
8672 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8673
8674 PR gdb/13808
8675 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8676 * configure.srv: Ditto.
8677 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8678 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8679 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8680 (init_registers_amd64_linux): Remove prototype.
8681 (tdesc_amd64_linux): Remove declaration.
8682 (get_ipa_tdesc): New function.
8683 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8684 initialize remaining tdescs.
8685 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8686 (init_registers_i386_linux): Remove prototype.
8687 (tdesc_i386_linux): Remove declaration.
8688 (get_ipa_tdesc): New function.
8689 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8690 initialize remaining tdescs.
8691 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8692 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8693 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8694 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8695 (x86_get_ipa_tdesc_idx): New function.
8696 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8697 * linux-x86-tdesc.h: New file.
8698 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8699 (target_get_ipa_tdesc_idx): New macro.
8700 * tracepoint.c (ipa_tdesc_idx): New macro.
8701 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8702 (symbol_list): Add ipa_tdesc_idx.
8703 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8704 (ipa_tdesc): Remove.
8705 (ipa_tdesc_idx): New variable.
8706 (get_context_regcache): Use get_ipa_tdesc.
8707 (gdb_collect): Ditto.
8708 (gdb_probe): Ditto.
8709 * tracepoint.h (get_ipa_tdesc): New prototype.
8710 (ipa_tdesc): Remove.
8711
8712 2016-02-24 Pedro Alves <palves@redhat.com>
8713
8714 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8715 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8716 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8717 Factor out common code between the USE_SIGTRAP_SIGINFO and
8718 !USE_SIGTRAP_SIGINFO blocks.
8719 (linux_low_filter_event): Call save_stop_reason instead of
8720 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8721 Update comments.
8722 (linux_wait_1): Update comments.
8723
8724 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8725
8726 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8727 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8728 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8729 ppc_insert_point, ppc_remove_point.
8730
8731 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8732
8733 * linux-s390-low.c (s390_supports_z_point_type): New function.
8734 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8735
8736 2016-02-16 Yao Qi <yao.qi@linaro.org>
8737
8738 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8739 PC. Get pc from regcache_read_pc.
8740
8741 2016-02-12 Yao Qi <yao.qi@linaro.org>
8742
8743 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8744 or linux_get_pc_32bit.
8745 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8746
8747 2016-02-12 Yao Qi <yao.qi@linaro.org>
8748
8749 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8750 arm_linux_get_next_pcs_fixup.
8751
8752 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8753
8754 * tracepoint.c (x_tracepoint_action_download): Change
8755 write_inferior_data_ptr to write_inferior_data_pointer.
8756 (cmd_qtstart): Likewise.
8757 (write_inferior_data_ptr): Remove.
8758 (download_agent_expr): Change write_inferior_data_ptr to
8759 write_inferior_data_pointer.
8760 (download_tracepoint_1): Likewise.
8761 (download_tracepoint): Likewise.
8762 (download_trace_state_variables): Likewise.
8763
8764 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8765 Marcin Kościelnicki <koriakin@0x04.net>
8766
8767 * tracepoint.c (struct tracepoint_action_ops): Remove.
8768 (struct tracepoint_action): Remove ops.
8769 (m_tracepoint_action_download, r_tracepoint_action_download)
8770 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8771 size and offset accordingly.
8772 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8773 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8774 (tracepoint_action_send, tracepoint_action_download): New functions.
8775 Helpers for trace action handlers.
8776 (add_tracepoint_action): Remove setup actions ops.
8777 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8778
8779 2016-02-10 Yao Qi <yao.qi@linaro.org>
8780
8781 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8782
8783 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8784
8785 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8786 to AC_OUTPUT.
8787 * configure: Regenerate.
8788
8789 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8790
8791 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8792 void * to gdb_byte *.
8793 * linux-low.c (siginfo_fixup): Likewise.
8794 (linux_xfer_siginfo): Likewise.
8795 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8796 Likewise.
8797 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8798
8799 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8800
8801 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8802 to srv_tgtobj.
8803 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8804 to srv_tgtobj.
8805 * linux-x86-low.c [__x86_64__]: Include
8806 "nat/amd64-linux-siginfo.h".
8807 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8808 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8809 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8810 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8811 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8812 (cpt_si_fd, si_timerid, si_overrun): Move from
8813 nat/amd64-linux-siginfo.c.
8814 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8815
8816 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8817
8818 * server.c (skip_to_semicolon): Remove.
8819 (process_point_options): Use strchrnul instead of
8820 skip_to_semicolon.
8821
8822 2016-01-26 Yao Qi <yao.qi@linaro.org>
8823
8824 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8825 * linux-low.c (install_software_single_step_breakpoints): Don't
8826 call regcache_read_pc.
8827 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8828 argument pc.
8829
8830 2016-01-26 Yao Qi <yao.qi@linaro.org>
8831
8832 * linux-low.c (install_software_single_step_breakpoints): Call
8833 regcache_read_pc instead of get_pc.
8834
8835 2016-01-26 Yao Qi <yao.qi@linaro.org>
8836
8837 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8838 (unblock_async_io): Rename to ...
8839 (block_unblock_async_io): ... it. New function.
8840 (enable_async_io): Don't install SIGIO handler. Unblock it
8841 instead.
8842 (disable_async_io): Don't ignore SIGIO. Block it instead.
8843 (initialize_async_io): Install SIGIO handler. Don't call
8844 unblock_async_io.
8845
8846 2016-01-26 Yao Qi <yao.qi@linaro.org>
8847
8848 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8849 first character is '\003', call *the_target->request_interrupt.
8850
8851 2016-01-25 Yao Qi <yao.qi@linaro.org>
8852
8853 * remote-utils.c (new_thread_notify): Remove.
8854 (dead_thread_notify): Likewise.
8855 * remote-utils.h (new_thread_notify): Remove declaration.
8856 (dead_thread_notify): Likewise.
8857
8858 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8859
8860 * gdb.trace/pending.exp: Fix expected message on continue.
8861
8862 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8863
8864 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8865 it works properly on big-endian machines where sizeof (CORE_ADDR)
8866 != sizeof (void *).
8867
8868 2016-01-21 Pedro Alves <palves@redhat.com>
8869
8870 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8871 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8872 * configure: Regenerate.
8873
8874 2016-01-21 Yao Qi <yao.qi@linaro.org>
8875
8876 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8877 is_thumb and set it according to CPSR saved on the stack.
8878 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8879 arm_sigreturn_next_pc.
8880
8881 2016-01-18 Yao Qi <yao.qi@linaro.org>
8882
8883 * linux-low.c (linux_set_pc_64bit): New function.
8884 (linux_get_pc_64bit): New function.
8885 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8886 Declare.
8887 * linux-sparc-low.c (debug_threads): Remove declaration.
8888 (sparc_get_pc): Remove.
8889 (the_low_target): Use linux_get_pc_64bit instead of
8890 sparc_get_pc.
8891 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8892 (the_low_target): Use linux_get_pc_64bit and
8893 linux_set_pc_64bit.
8894
8895 2016-01-18 Yao Qi <yao.qi@linaro.org>
8896
8897 * linux-arm-low.c (debug_threads): Remove declaration.
8898 (arm_get_pc, arm_set_pc): Remove.
8899 (the_low_target): Use linux_get_pc_32bit and
8900 linux_set_pc_32bit.
8901 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8902 (the_low_target): Use linux_get_pc_32bit and
8903 linux_set_pc_32bit.
8904 * linux-cris-low.c (debug_threads): Remove declaration.
8905 (cris_get_pc, cris_set_pc,): Remove.
8906 (the_low_target): Use linux_get_pc_32bit and
8907 linux_set_pc_32bit.
8908 * linux-crisv32-low.c (debug_threads): Remove declaration.
8909 (cris_get_pc, cris_set_pc): Remove.
8910 (the_low_target): Use linux_get_pc_32bit and
8911 linux_set_pc_32bit.
8912 * linux-low.c: Include inttypes.h.
8913 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8914 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8915 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8916 (the_low_target): Use linux_get_pc_32bit and
8917 linux_set_pc_32bit.
8918 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8919 (the_low_target): Use linux_get_pc_32bit and
8920 linux_set_pc_32bit.
8921 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8922 (the_low_target): Use linux_get_pc_32bit and
8923 linux_set_pc_32bit.
8924 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8925 (the_low_target): Use linux_get_pc_32bit and
8926 linux_set_pc_32bit.
8927 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8928 (the_low_target): Use linux_get_pc_32bit and
8929 linux_set_pc_32bit.
8930
8931 2016-01-18 Gary Benson <gbenson@redhat.com>
8932
8933 * configure.ac (AC_FUNC_FORK): New check.
8934 * config.in: Regenerate.
8935 * configure: Likewise.
8936
8937 2016-01-14 Yao Qi <yao.qi@linaro.org>
8938
8939 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8940 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8941 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8942 arm_get_next_pcs_ctor.
8943
8944 2016-01-12 Josh Stone <jistone@redhat.com>
8945 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8946
8947 * inferiors.h: Include "gdb_vecs.h".
8948 (struct process_info): Add syscalls_to_catch.
8949 * inferiors.c (remove_process): Free syscalls_to_catch.
8950 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8951 syscall_return stops.
8952 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8953 * server.c (handle_general_set): Handle QCatchSyscalls.
8954 (handle_query): Report support for QCatchSyscalls.
8955 * target.h (struct target_ops): Add supports_catch_syscall.
8956 (target_supports_catch_syscall): New macro.
8957 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8958 (struct lwp_info): Add syscall_state.
8959 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8960 Maintain syscall_state and syscalls_to_catch across exec.
8961 (get_syscall_trapinfo): New function, proxy to the_low_target.
8962 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8963 (linux_low_filter_event): Toggle syscall_state entry/return for
8964 syscall traps, and set it ignored for all others.
8965 (gdb_catching_syscalls_p): New function.
8966 (gdb_catch_this_syscall_p): New function.
8967 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8968 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8969 (linux_supports_catch_syscall): New function.
8970 (linux_target_ops): Install it.
8971 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8972 (the_low_target): Install it.
8973
8974 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8975
8976 * acinclude.m4: Include new ../warning.m4 file.
8977 * configure: Regenerated.
8978 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8979
8980 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8981
8982 * ax.c (is_goto_target): Mark static.
8983 * linux-low.c (register_addr): Likewise.
8984 (linux_fetch_registers, linux_store_registers): Likewise.
8985 * mem-break.c (any_persistent_commands): Fix old prototype.
8986 (add_commands_to_breakpoint): Mark static.
8987 * regcache.c (find_register_by_name): Delete unused func.
8988 * remote-utils.c (hex_or_minus_one): Mark static.
8989 * server.c (monitor_show_help): Mark static.
8990 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8991 handle_v_requests): Likewise.
8992
8993 2016-01-12 Pedro Alves <palves@redhat.com>
8994
8995 Remove use of the registered trademark symbol throughout.
8996
8997 2016-01-08 Yao Qi <yao.qi@linaro.org>
8998
8999 * remote-utils.c (getpkt): If c is '\003', call target hook
9000 request_interrupt.
9001
9002 2016-01-06 Yao Qi <yao.qi@linaro.org>
9003
9004 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9005 linux-aarch32-low.c.
9006 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9007 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9008 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9009 (thumb2_breakpoint): Declare.
9010 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9011 linux-aarch32-low.h.
9012 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9013 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9014 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9015
9016 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9017
9018 * gdbreplay.c (gdbreplay_version): Change copyright year in
9019 version message.
9020 * server.c (gdbserver_version): Likewise.
9021
9022 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9023
9024 * server.c (crc32_table): Delete.
9025 (crc32): Use libiberty's xcrc32 function.
9026
9027 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9028
9029 * lynx-low.c (lynx_delete_thread_callback): New function.
9030 (lynx_mourn): Properly delete our process and all of its
9031 threads. Remove call to clear_inferiors.
9032
9033 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9034
9035 * target.c (thread_search_callback): Add check that
9036 the thread_stopped target callback is not NULL before
9037 calling it.
9038
9039 2015-12-21 Yao Qi <yao.qi@linaro.org>
9040
9041 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9042 arm breakpoint.
9043
9044 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9045
9046 * server.c (handle_query): Call target_supports_software_single_step.
9047
9048 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9049
9050 * linux-low.c (single_step): New function.
9051 (linux_resume_one_lwp_throw): Call single_step.
9052 (start_step_over): Likewise.
9053
9054 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9055
9056 * Makefile.in (SFILES): Append arch/arm-linux.c,
9057 arch/arm-get-next-pcs.c.
9058 (arm-linux.o): New rule.
9059 (arm-get-next-pcs.o): New rule.
9060 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9061 arm-linux.o.
9062 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9063 to linux-aarch32-low.c.
9064 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9065 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9066 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9067 (thumb2_breakpoint_len): Likewise.
9068 (arm_is_thumb_mode): Make non-static.
9069 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9070 from linux-aarch32-low.c.
9071 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9072 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9073 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9074 (thumb2_breakpoint_len): Likewise.
9075 (arm_is_thumb_mode): New declaration.
9076 * linux-arm-low.c: Include arch/arm-linux.h
9077 aarch/arm-get-next-pcs.h, sys/syscall.h.
9078 (get_next_pcs_ops): New struct.
9079 (get_next_pcs_addr_bits_remove): New function.
9080 (get_next_pcs_is_thumb): New function.
9081 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9082 (arm_sigreturn_next_pc): Likewise.
9083 (get_next_pcs_syscall_next_pc): Likewise.
9084 (arm_gdbserver_get_next_pcs): Likewise.
9085 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9086 Initialize.
9087 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9088 * server.h: Include gdb_vecs.h.
9089
9090 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9091
9092 * Makefile.in (SFILES): Append common/common-regcache.c.
9093 (OBS): Append common-regcache.o.
9094 (common-regcache.o): New rule.
9095 * regcache.c (init_register_cache): Initialize cache to
9096 REG_UNAVAILABLE.
9097 (regcache_raw_read_unsigned): New function.
9098 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9099 register_status enum.
9100
9101 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9102
9103 * linux-aarch64-low.c (the_low_targets): Rename
9104 breakpoint_reinsert_addr to get_next_pcs.
9105 * linux-arm-low.c (the_low_targets): Likewise.
9106 * linux-bfin-low.c (the_low_targets): Likewise.
9107 * linux-cris-low.c (the_low_targets): Likewise.
9108 * linux-crisv32-low.c (the_low_targets): Likewise.
9109 * linux-low.c (can_software_single_step): Likewise.
9110 (install_software_single_step_breakpoints): New function.
9111 (start_step_over): Use install_software_single_step_breakpoints.
9112 * linux-low.h: New CORE_ADDR vector.
9113 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9114 get_next_pcs.
9115 * linux-mips-low.c (the_low_targets): Likewise.
9116 * linux-nios2-low.c (the_low_targets): Likewise.
9117 * linux-sparc-low.c (the_low_targets): Likewise.
9118
9119 2015-12-17 Pedro Alves <palves@redhat.com>
9120
9121 * linux-low.c (linux_kill_one_lwp): Remove references to
9122 LinuxThreads.
9123 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9124 to 'kill'.
9125 (linux_init_signals): Delete.
9126 (initialize_low): Adjust.
9127 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9128
9129 2015-12-16 Pedro Alves <palves@redhat.com>
9130
9131 * configure.ac (compiler warning flags): When testing a
9132 -Wno-foo option, check whether -Wfoo works instead.
9133 * configure: Regenerate.
9134
9135 2015-12-11 Don Breazeal <donb@codesourcery.com>
9136
9137 * server.c (process_serial_event): Don't exit from gdbserver
9138 in remote mode if there are still active inferiors.
9139
9140 2015-12-11 Yao Qi <yao.qi@linaro.org>
9141
9142 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9143 arm_breakpoint_at if the process is 32-bit.
9144
9145 2015-12-11 Yao Qi <yao.qi@linaro.org>
9146
9147 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9148 arm breakpoint.
9149
9150 2015-12-07 Yao Qi <yao.qi@linaro.org>
9151
9152 * configure.srv: Append arm.o to srv_tgtobj for
9153 aarch64*-*-linux* target.
9154 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9155 from linux-arm-low.c.
9156 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9157 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9158 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9159 (thumb2_breakpoint_len): Likewise.
9160 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9161 (arm_breakpoint_kinds): Likewise.
9162 (arm_breakpoint_kind_from_pc): Likewise.
9163 (arm_sw_breakpoint_from_kind): Likewise.
9164 (arm_breakpoint_kind_from_current_state): Likewise.
9165 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9166 (arm_sw_breakpoint_from_kind): Declare.
9167 (arm_breakpoint_kind_from_current_state): Declare.
9168 (arm_breakpoint_at): Declare.
9169 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9170 arm_sw_breakpoint_from_kind if process is 32-bit.
9171 (aarch64_breakpoint_kind_from_pc): New function.
9172 (aarch64_breakpoint_kind_from_current_state): New function.
9173 (the_low_target): Initialize fields breakpoint_kind_from_pc
9174 and breakpoint_kind_from_current_state.
9175 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9176 linux-aarch32-low.c.
9177 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9178 (arm_breakpoint, arm_breakpoint_len): Likewise.
9179 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9180 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9181 (arm_is_thumb_mode): Likewise.
9182 (arm_breakpoint_at): Likewise.
9183 (arm_breakpoint_kind_from_pc): Likewise.
9184 (arm_sw_breakpoint_from_kind): Likewise.
9185 (arm_breakpoint_kind_from_current_state): Likewise.
9186
9187 Revert:
9188 2015-08-04 Yao Qi <yao.qi@linaro.org>
9189
9190 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9191 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9192 * server.c (extended_protocol): Remove "static".
9193 * server.h (extended_protocol): Declare it.
9194
9195 2015-12-04 Josh Stone <jistone@redhat.com>
9196
9197 * target.h (struct target_ops) <arch_setup>: Rename to ...
9198 (struct target_ops) <post_create_inferior>: ... this.
9199 (target_arch_setup): Rename to ...
9200 (target_post_create_inferior): ... this, calling post_create_inferior.
9201 * server.c (start_inferior): Update target_arch_setup calls to
9202 target_post_create_inferior.
9203 * linux-low.c (linux_low_ptrace_options): Forward declare.
9204 (linux_arch_setup): Update its comment for general use.
9205 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9206 (struct linux_target_ops): Use linux_post_create_inferior.
9207 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9208 to post_create_inferior.
9209 * nto-low.c (struct nto_target_ops): Likewise.
9210 * spu-low.c (struct spu_target_ops): Likewise.
9211 * win32-low.c (struct win32_target_ops): Likewise.
9212
9213 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9214
9215 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9216
9217 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9218
9219 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9220 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9221 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9222 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9223 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9224 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9225 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9226 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9227 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9228 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9229 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9230 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9231
9232 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9233
9234 * linux-low.c (linux_look_up_symbols): Don't call
9235 linux_supports_traceclone.
9236 * linux-low.h (thread_db_init): Remove use_events argument.
9237 * thread-db.c (thread_db_use_event): Remove global variable.
9238 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9239 (struct thread_db) <td_create_bp>: Remove field.
9240 (thread_db_create_event): Remove function.
9241 (thread_db_enable_reporting): Likewise.
9242 (find_one_thread): Don't check for thread_db_use_events.
9243 (attach_thread): Likewise.
9244 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9245 (try_thread_db_load_1): Don't check for thread_db_use_events.
9246 (thread_db_init): Remove use_events argument and thread events
9247 handling.
9248 (remove_thread_event_breakpoints): Remove function.
9249 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9250
9251 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9252
9253 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9254 New function.
9255 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9256 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9257 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9258 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9259 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9260 Initialize.
9261 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9262 New function.
9263 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9264 * linux-low.c (can_hardware_single_step): Use
9265 supports_hardware_single_step.
9266 (can_software_single_step): New function.
9267 (start_step_over): Call can_software_single_step.
9268 (linux_supports_hardware_single_step): New function.
9269 (struct target_ops) <supports_software_single_step>: Initialize.
9270 * linux-low.h (struct linux_target_ops)
9271 <supports_hardware_single_step>: Initialize.
9272 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9273 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9274 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9275 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9276 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9277 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9278 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9279 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9280 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9281 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9282 Initialize.
9283 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9284 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9285 Initialize.
9286 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9287 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9288 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9289 New function.
9290 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9291 * target.h (struct target_ops): <supports_software_single_step>:
9292 New field.
9293 (target_supports_software_single_step): New macro.
9294
9295 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9296
9297 * linux-low.c (linux_wait_1): Fix pc advance condition.
9298 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9299 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9300
9301 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9302
9303 * linux-arm-low.c (arm_is_thumb_mode): New function.
9304 (arm_breakpoint_at): Use arm_is_thumb_mode.
9305 (arm_breakpoint_kind_from_current_state): New function.
9306 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9307 Initialize.
9308 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9309 (linux_breakpoint_kind_from_current_state): New function.
9310 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9311 * linux-low.h (struct linux_target_ops)
9312 <breakpoint_kind_from_current_state>: New field.
9313 * target.h (struct target_ops): Likewise.
9314 (target_breakpoint_kind_from_current_state): New macro.
9315
9316 2015-11-30 Pedro Alves <palves@redhat.com>
9317
9318 * linux-low.c (linux_resume): Wake up the event loop before
9319 returning.
9320
9321 2015-11-30 Pedro Alves <palves@redhat.com>
9322
9323 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9324 check.
9325 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9326 to -1.
9327 * target.c (struct thread_search): New structure.
9328 (thread_search_callback): New function.
9329 (prev_general_thread): New global.
9330 (prepare_to_access_memory, done_accessing_memory): New functions.
9331 * target.h (prepare_to_access_memory, done_accessing_memory):
9332 Replace macros with function declarations.
9333
9334 2015-11-30 Pedro Alves <palves@redhat.com>
9335
9336 PR 14618
9337 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9338 report TARGET_WAITKIND_NO_RESUMED.
9339 * remote-utils.c (prepare_resume_reply): Handle
9340 TARGET_WAITKIND_NO_RESUMED.
9341 * server.c (report_no_resumed): New global.
9342 (handle_query) <qSupported>: Handle "no-resumed+". Report
9343 "no-resumed+" support.
9344 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9345 return error if the client doesn't support no-resumed events.
9346 (push_stop_notification): New function.
9347 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9348 events if the client supports them.
9349
9350 2015-11-30 Pedro Alves <palves@redhat.com>
9351
9352 * linux-low.c (thread_still_has_status_pending_p): Don't check
9353 vCont;t here.
9354 (lwp_resumed): New function.
9355 (status_pending_p_callback): Return early if the LWP is not
9356 supposed to be resumed.
9357
9358 2015-11-30 Pedro Alves <palves@redhat.com>
9359
9360 * linux-low.c (handle_extended_wait): Assert that the LWP's
9361 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9362 thread create events, leave the new child's status pending.
9363 (linux_low_filter_event): If GDB wants to hear about thread exit
9364 events, leave the LWP marked dead and don't delete it.
9365 (linux_wait_for_event_filtered): Don't check for thread exit.
9366 (filter_exit_event): New function.
9367 (linux_wait_1): Use it, when returning an exit event.
9368 (linux_resume_one_lwp_throw): Assert that the LWP's
9369 waitstatus is TARGET_WAITKIND_IGNORE.
9370 * remote-utils.c (prepare_resume_reply): Handle
9371 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9372 * server.c (report_thread_events): New global.
9373 (handle_general_set): Handle QThreadEvents.
9374 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9375 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9376 TARGET_WAITKIND_THREAD_EXITED.
9377 * server.h (report_thread_events): Declare.
9378
9379 2015-11-30 Pedro Alves <palves@redhat.com>
9380
9381 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9382 the thread's last_resume_kind was resume_stop.
9383
9384 2015-11-30 Pedro Alves <palves@redhat.com>
9385
9386 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9387 before returning.
9388
9389 2015-11-30 Pedro Alves <palves@redhat.com>
9390
9391 * server.c (handle_v_requests): Handle vCtrlC.
9392
9393 2015-11-30 Pedro Alves <palves@redhat.com>
9394
9395 * gdbthread.h (find_any_thread_of_pid): Declare.
9396 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9397 functions.
9398 * server.c (handle_query): If current_thread is NULL, look for
9399 another thread of the selected process.
9400
9401 2015-11-26 Daniel Colascione <dancol@dancol.org>
9402 Simon Marchi <simon.marchi@ericsson.com>
9403
9404 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9405 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9406 name in reply.
9407 * target.h (struct target_ops) <thread_name>: New field.
9408 (target_thread_name): New macro.
9409
9410 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9411
9412 * regcache.h (regcache_invalidate_pid): Add declaration.
9413 * regcache.c (regcache_invalidate_pid): New function, extracted
9414 from regcache_invalidate.
9415 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9416 Add trivial documentation comment.
9417 * lynx-low.c: Use regcache_invalidate_pid instead of
9418 regcache_invalidate.
9419
9420 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9421
9422 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9423 and Elf64_auxv_t if the target is Android.
9424
9425 2015-11-22 Doug Evans <xdje42@gmail.com>
9426
9427 * target.h: #include <sys/types.h>.
9428
9429 2015-11-19 Pedro Alves <palves@redhat.com>
9430
9431 * linux-low.c (linux_process_qsupported): Change prototype.
9432 Adjust.
9433 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9434 Change prototype.
9435 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9436 and adjust to loop over all features.
9437 * server.c (handle_query) <qSupported>: Adjust to call
9438 target_process_qsupported once, passing it a vector of unprocessed
9439 features.
9440 * target.h (struct target_ops) <process_qsupported>: Change
9441 prototype.
9442 (target_process_qsupported): Adjust.
9443
9444 2015-11-19 Pedro Alves <palves@redhat.com>
9445
9446 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9447 mode.
9448 * configure: Regenerate.
9449
9450 2015-11-19 Pedro Alves <palves@redhat.com>
9451
9452 * configure: Regenerate.
9453
9454 2015-11-19 Yao Qi <yao.qi@linaro.org>
9455
9456 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9457 type to uint32_t.
9458
9459 2015-11-19 Yao Qi <yao.qi@linaro.org>
9460
9461 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9462 (struct aarch64_operand): Move enum out.
9463
9464 2015-11-19 Yao Qi <yao.qi@linaro.org>
9465
9466 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9467 struct user_fpsimd_state *.
9468 (aarch64_store_fpregset): Likewise.
9469
9470 2015-11-19 Yao Qi <yao.qi@linaro.org>
9471
9472 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9473 struct user_pt_regs *.
9474 (aarch64_store_gregset): Likewise.
9475
9476 2015-11-18 Pedro Alves <palves@redhat.com>
9477
9478 * Makefile.in (all_object_files): Add $IPA_OBJS.
9479
9480 2015-11-17 Pedro Alves <palves@redhat.com>
9481
9482 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9483 GDB_SIGNAL_0 and gdb_signal_to_string.
9484
9485 2015-11-17 Pedro Alves <palves@redhat.com>
9486
9487 * win32-low.c (handle_output_debug_string): Remove parameter.
9488 (win32_kill): Remove our_status local and adjust call to
9489 handle_output_debug_string.
9490 (get_child_debug_event): Adjust call to
9491 handle_output_debug_string.
9492
9493 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9494
9495 * linux-mips-low.c (mips_fill_gregset): Add cast.
9496 (mips_store_gregset): Likewise.
9497 (mips_fill_fpregset): Likewise.
9498 (mips_store_fpregset): Likewise.
9499
9500 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9501
9502 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9503 priv.
9504
9505 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9506
9507 * linux-mips-low.c (mips_linux_new_thread): Change type of
9508 watch_type to enum target_hw_bp_type.
9509
9510 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9511
9512 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9513 Change return type to arm_hwbp_type.
9514
9515 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9516
9517 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9518 (arm_store_gregset): Likewise.
9519 * linux-arm-low.c (arm_get_hwcap): Likewise.
9520 (arm_read_description): Likewise.
9521
9522 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9523
9524 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9525
9526 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9527
9528 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9529 (ppc_fill_vsxregset): Likewise.
9530 (ppc_store_vsxregset): Likewise.
9531 (ppc_fill_vrregset): Likewise.
9532 (ppc_store_vrregset): Likewise.
9533 (ppc_fill_evrregset): Likewise.
9534 (ppc_store_evrregset): Likewise.
9535
9536 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9537
9538 * linux-ppc-low.c (ppc_usrregs_info): Remove
9539 forward-declaration.
9540 (ppc_arch_setup): Move lower in file.
9541
9542 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9543
9544 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9545 (ps_pdwrite): Likewise.
9546
9547 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9548
9549 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9550 to after assert checks.
9551
9552 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9553
9554 * proc-service.c (ps_pdread): Add/adjust casts.
9555 (ps_pdwrite): Add/adjust casts.
9556
9557 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9558
9559 * server.c (handle_search_memory_1): Cast return value of
9560 memmem.
9561
9562 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9563
9564 * server.c (write_qxfer_response): Change type of data to
9565 gdb_byte *.
9566
9567 2015-10-29 Pedro Alves <palves@redhat.com>
9568
9569 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9570
9571 2015-10-29 Pedro Alves <palves@redhat.com>
9572
9573 * tracepoint.c (clear_installed_tracepoints): Add casts.
9574
9575 2015-10-29 Pedro Alves <palves@redhat.com>
9576
9577 * server.c (handle_v_cont, process_serial_event): Add enum
9578 gdb_signal casts to signal parsing code.
9579
9580 2015-10-29 Pedro Alves <palves@redhat.com>
9581
9582 * linux-low.h (NULL_REGSET): Define.
9583 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9584 * linux-arm-low.c (arm_regsets): Likewise.
9585 * linux-crisv32-low.c (cris_regsets): Likewise.
9586 * linux-m68k-low.c (m68k_regsets): Likewise.
9587 * linux-mips-low.c (mips_regsets): Likewise.
9588 * linux-nios2-low.c (nios2_regsets): Likewise.
9589 * linux-ppc-low.c (ppc_regsets): Likewise.
9590 * linux-s390-low.c (s390_regsets): Likewise.
9591 * linux-sh-low.c (sh_regsets): Likewise.
9592 * linux-sparc-low.c (sparc_regsets): Likewise.
9593 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9594 * linux-tile-low.c (tile_regsets): Likewise.
9595 * linux-x86-low.c (x86_regsets): Likewise.
9596 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9597
9598 2015-10-29 Pedro Alves <palves@redhat.com>
9599
9600 * linux-low.h (NULL_REGSET): Define.
9601 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9602 * linux-arm-low.c (arm_regsets): Likewise.
9603 * linux-crisv32-low.c (cris_regsets): Likewise.
9604 * linux-m68k-low.c (m68k_regsets): Likewise.
9605 * linux-mips-low.c (mips_regsets): Likewise.
9606 * linux-nios2-low.c (nios2_regsets): Likewise.
9607 * linux-ppc-low.c (ppc_regsets): Likewise.
9608 * linux-s390-low.c (s390_regsets): Likewise.
9609 * linux-sh-low.c (sh_regsets): Likewise.
9610 * linux-sparc-low.c (sparc_regsets): Likewise.
9611 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9612 * linux-tile-low.c (tile_regsets): Likewise.
9613 * linux-x86-low.c (x86_regsets): Likewise.
9614 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9615
9616 2015-10-26 Doug Evans <dje@google.com>
9617
9618 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9619
9620 2015-10-26 Doug Evans <dje@google.com>
9621
9622 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9623
9624 2015-10-26 Doug Evans <dje@google.com>
9625
9626 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9627 for debug_printf.
9628 (attach_thread, find_new_threads_callback): Ditto.
9629
9630 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9631
9632 * mem-break.h (set_breakpoint_data): Remove.
9633
9634 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9635
9636 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9637 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9638 (initialize_low): Remove set_breakpoint_data call.
9639 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9640 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9641 (initialize_low): Remove set_breakpoint_data call.
9642 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9643 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9644 (initialize_low): Remove set_breakpoint_data call.
9645
9646 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9647
9648 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9649 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9650 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9651 * target.h (target_breakpoint_kind_from_pc): New macro.
9652
9653 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9654
9655 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9656 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9657 the default breakpoint kind.
9658
9659 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9660
9661 * linux-arm-low.c (arm_supports_z_point_type): Add software
9662 breakpoint support.
9663
9664 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9665
9666 * linux-arm-low.c: Refactor breakpoint definitions.
9667 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9668 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9669
9670 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9671
9672 * Makefile.in: Add arm.c/o.
9673 * configure.srv: Likewise.
9674 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9675 (arm_breakpoint_kind_from_pc): New function.
9676 (arm_sw_breakpoint_from_kind): Return proper kind.
9677 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9678
9679 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9680
9681 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9682 removal.
9683 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9684 (struct raw_breakpoint) <size>: Remove.
9685 (struct raw_breakpoint) <kind>: Add.
9686 (bp_size): New function.
9687 (bp_opcode): Likewise.
9688 (find_raw_breakpoint_at): Adjust for kind.
9689 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9690 (remove_memory_breakpoint): Adjust for kind call bp_size.
9691 (set_raw_breakpoint_at): Adjust for kind.
9692 (set_breakpoint): Likewise.
9693 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9694 (delete_raw_breakpoint): Adjust for kind.
9695 (delete_breakpoint): Likewise.
9696 (find_gdb_breakpoint): Likewise.
9697 (set_gdb_breakpoint_1): Likewise.
9698 (set_gdb_breakpoint): Likewise.
9699 (delete_gdb_breakpoint_1): Likewise.
9700 (delete_gdb_breakpoint): Likewise.
9701 (uninsert_raw_breakpoint): Likewise.
9702 (reinsert_raw_breakpoint): Likewise.
9703 (set_breakpoint_data): Remove.
9704 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9705 (check_mem_read): Adjust for kind call bp_size.
9706 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9707 (clone_one_breakpoint): Adjust for kind.
9708 * mem-break.h (set_gdb_breakpoint): Likewise.
9709 (delete_gdb_breakpoint): Likewise.
9710 * server.c (process_serial_event): Likewise.
9711
9712 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9713
9714 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9715 (struct linux_target_ops) <breakpoint>: Remove.
9716 (struct linux_target_ops) <breakpoint_len>: Remove.
9717 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9718 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9719 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9720 (arm_sw_breakpoint_from_kind): New function.
9721 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9722 (struct linux_target_ops) <breakpoint>: Remove.
9723 (struct linux_target_ops) <breakpoint_len>: Remove.
9724 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9725 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9726 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9727 (struct linux_target_ops) <breakpoint>: Remove.
9728 (struct linux_target_ops) <breakpoint_len>: Remove.
9729 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9730 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9731 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9732 (struct linux_target_ops) <breakpoint>: Remove.
9733 (struct linux_target_ops) <breakpoint_len>: Remove.
9734 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9735 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9736 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9737 and sw_breakpoint_from_kind to increment the pc.
9738 (linux_breakpoint_kind_from_pc): New function.
9739 (linux_sw_breakpoint_from_kind): New function.
9740 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9741 (initialize_low): Call breakpoint_kind_from_pc and
9742 sw_breakpoint_from_kind to replace breakpoint_data/len.
9743 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9744 New field.
9745 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9746 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9747 (struct linux_target_ops) <breakpoint>: Remove.
9748 (struct linux_target_ops) <breakpoint_len>: Remove.
9749 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9750 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9751 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9752 (struct linux_target_ops) <breakpoint>: Remove.
9753 (struct linux_target_ops) <breakpoint_len>: Remove.
9754 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9755 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9756 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9757 (struct linux_target_ops) <breakpoint>: Remove.
9758 (struct linux_target_ops) <breakpoint_len>: Remove.
9759 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9760 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9761 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9762 (struct linux_target_ops) <breakpoint>: Remove.
9763 (struct linux_target_ops) <breakpoint_len>: Remove.
9764 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9765 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9766 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9767 (struct linux_target_ops) <breakpoint>: Remove.
9768 (struct linux_target_ops) <breakpoint_len>: Remove.
9769 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9770 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9771 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9772 (struct linux_target_ops) <breakpoint>: Remove.
9773 (struct linux_target_ops) <breakpoint_len>: Remove.
9774 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9775 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9776 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9777 (struct linux_target_ops) <breakpoint>: Remove.
9778 (struct linux_target_ops) <breakpoint_len>: Remove.
9779 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9780 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9781 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9782 (struct linux_target_ops) <breakpoint>: Remove.
9783 (struct linux_target_ops) <breakpoint_len>: Remove.
9784 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9785 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9786 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9787 (struct linux_target_ops) <breakpoint>: Remove.
9788 (struct linux_target_ops) <breakpoint_len>: Remove.
9789 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9790 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9791 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9792 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9793 (struct linux_target_ops) <breakpoint>: Remove.
9794 (struct linux_target_ops) <breakpoint_len>: Remove.
9795 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9796 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9797 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9798 (struct linux_target_ops) <breakpoint>: Remove.
9799 (struct linux_target_ops) <breakpoint_len>: Remove.
9800 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9801 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9802
9803 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9804
9805 * linux-cris-low.c (cris_get_pc): Remove void arg.
9806
9807 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9808
9809 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9810 variable name.
9811
9812 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9813
9814 * inferiors.c (thread_pid_matches_callback): New function.
9815 (find_thread_process): New function.
9816 (remove_thread): Reset current_thread.
9817 (remove_process): Assert threads have been removed first.
9818
9819 2015-10-15 Yao Qi <yao.qi@linaro.org>
9820
9821 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9822 if it is 3.
9823 (aarch64_remove_point): Likewise.
9824 * regcache.c (regcache_register_size): New function.
9825
9826 2015-10-12 Yao Qi <yao.qi@linaro.org>
9827
9828 * linux-aarch64-low.c: Update all callers as emit_load_store
9829 is renamed to aarch64_emit_load_store.
9830
9831 2015-10-12 Yao Qi <yao.qi@linaro.org>
9832
9833 * linux-aarch64-low.c: Update all callers of function renaming
9834 from emit_insn to aarch64_emit_insn.
9835
9836 2015-10-12 Yao Qi <yao.qi@linaro.org>
9837
9838 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9839 arch/aarch64-insn.h.
9840 (struct aarch64_memory_operand): Likewise.
9841 (ENCODE): Likewise.
9842 (emit_insn): Move to arch/aarch64-insn.c.
9843 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9844 (emit_load_store): Move to arch/aarch64-insn.c.
9845 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9846 (can_encode_int32): Remove.
9847
9848 2015-10-12 Yao Qi <yao.qi@linaro.org>
9849
9850 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9851 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9852 (aarch64_relocate_instruction): Likewise.
9853 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9854 (struct aarch64_insn_visitor): Likewise.
9855
9856 2015-10-12 Yao Qi <yao.qi@linaro.org>
9857
9858 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9859 (struct aarch64_insn_visitor): New.
9860 (struct aarch64_insn_relocation_data): New.
9861 (aarch64_ftrace_insn_reloc_b): New function.
9862 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9863 (aarch64_ftrace_insn_reloc_cb): Likewise.
9864 (aarch64_ftrace_insn_reloc_tb): Likewise.
9865 (aarch64_ftrace_insn_reloc_adr): Likewise.
9866 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9867 (aarch64_ftrace_insn_reloc_others): Likewise.
9868 (visitor): New.
9869 (aarch64_relocate_instruction): Use visitor.
9870
9871 2015-10-12 Yao Qi <yao.qi@linaro.org>
9872
9873 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9874 int. Add argument buf.
9875 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9876 aarch64_relocate_instruction.
9877
9878 2015-10-12 Yao Qi <yao.qi@linaro.org>
9879
9880 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9881 argument insn. Remove local variable insn. Don't call
9882 target_read_uint32.
9883 (aarch64_install_fast_tracepoint_jump_pad): Call
9884 target_read_uint32.
9885
9886 2015-09-30 Yao Qi <yao.qi@linaro.org>
9887
9888 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9889 (emit_load_store_pair): Likewise.
9890
9891 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9892
9893 * dll.c (match_dll): Add cast(s).
9894 (unloaded_dll): Likewise.
9895 * linux-low.c (second_thread_of_pid_p): Likewise.
9896 (delete_lwp_callback): Likewise.
9897 (count_events_callback): Likewise.
9898 (select_event_lwp_callback): Likewise.
9899 (linux_set_resume_request): Likewise.
9900 * server.c (accumulate_file_name_length): Likewise.
9901 (emit_dll_description): Likewise.
9902 (handle_qxfer_threads_worker): Likewise.
9903 (visit_actioned_threads): Likewise.
9904 * thread-db.c (any_thread_of): Likewise.
9905 * tracepoint.c (same_process_p): Likewise.
9906 (match_blocktype): Likewise.
9907 (build_traceframe_info_xml): Likewise.
9908
9909 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9910
9911 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9912 assignment.
9913 (gdb_unparse_agent_expr): Likewise.
9914 * hostio.c (require_data): Likewise.
9915 (handle_pread): Likewise.
9916 * linux-low.c (disable_regset): Likewise.
9917 (fetch_register): Likewise.
9918 (store_register): Likewise.
9919 (get_dynamic): Likewise.
9920 (linux_qxfer_libraries_svr4): Likewise.
9921 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9922 (set_fast_tracepoint_jump): Likewise.
9923 (uninsert_fast_tracepoint_jumps_at): Likewise.
9924 (reinsert_fast_tracepoint_jumps_at): Likewise.
9925 (validate_inserted_breakpoint): Likewise.
9926 (clone_agent_expr): Likewise.
9927 * regcache.c (init_register_cache): Likewise.
9928 * remote-utils.c (putpkt_binary_1): Likewise.
9929 (decode_M_packet): Likewise.
9930 (decode_X_packet): Likewise.
9931 (look_up_one_symbol): Likewise.
9932 (relocate_instruction): Likewise.
9933 (monitor_output): Likewise.
9934 * server.c (handle_search_memory): Likewise.
9935 (handle_qxfer_exec_file): Likewise.
9936 (handle_qxfer_libraries): Likewise.
9937 (handle_qxfer): Likewise.
9938 (handle_query): Likewise.
9939 (handle_v_cont): Likewise.
9940 (handle_v_run): Likewise.
9941 (captured_main): Likewise.
9942 * target.c (write_inferior_memory): Likewise.
9943 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9944 * tracepoint.c (init_trace_buffer): Likewise.
9945 (add_tracepoint_action): Likewise.
9946 (add_traceframe): Likewise.
9947 (add_traceframe_block): Likewise.
9948 (cmd_qtdpsrc): Likewise.
9949 (cmd_qtdv): Likewise.
9950 (cmd_qtstatus): Likewise.
9951 (response_source): Likewise.
9952 (response_tsv): Likewise.
9953 (cmd_qtnotes): Likewise.
9954 (gdb_collect): Likewise.
9955 (initialize_tracepoint): Likewise.
9956
9957 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9958
9959 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9960 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9961 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9962 <NOP>: New.
9963 (enum aarch64_condition_codes): New enum.
9964 (w0): New static global.
9965 (fp): Likewise.
9966 (lr): Likewise.
9967 (struct aarch64_memory_operand) <type>: New
9968 MEMORY_OPERAND_POSTINDEX type.
9969 (postindex_memory_operand): New helper function.
9970 (emit_ret): New function.
9971 (emit_load_store_pair): New function, factored out of emit_stp
9972 with support for MEMORY_OPERAND_POSTINDEX.
9973 (emit_stp): Rewrite using emit_load_store_pair.
9974 (emit_ldp): New function.
9975 (emit_load_store): Likewise.
9976 (emit_ldr): Mention post-index instruction in comment.
9977 (emit_ldrh): New function.
9978 (emit_ldrb): New function.
9979 (emit_ldrsw): Mention post-index instruction in comment.
9980 (emit_str): Likewise.
9981 (emit_subs): New function.
9982 (emit_cmp): Likewise.
9983 (emit_and): Likewise.
9984 (emit_orr): Likewise.
9985 (emit_orn): Likewise.
9986 (emit_eor): Likewise.
9987 (emit_mvn): Likewise.
9988 (emit_lslv): Likewise.
9989 (emit_lsrv): Likewise.
9990 (emit_asrv): Likewise.
9991 (emit_mul): Likewise.
9992 (emit_sbfm): Likewise.
9993 (emit_sbfx): Likewise.
9994 (emit_ubfm): Likewise.
9995 (emit_ubfx): Likewise.
9996 (emit_csinc): Likewise.
9997 (emit_cset): Likewise.
9998 (emit_nop): Likewise.
9999 (emit_ops_insns): New helper function.
10000 (emit_pop): Likewise.
10001 (emit_push): Likewise.
10002 (aarch64_emit_prologue): New function.
10003 (aarch64_emit_epilogue): Likewise.
10004 (aarch64_emit_add): Likewise.
10005 (aarch64_emit_sub): Likewise.
10006 (aarch64_emit_mul): Likewise.
10007 (aarch64_emit_lsh): Likewise.
10008 (aarch64_emit_rsh_signed): Likewise.
10009 (aarch64_emit_rsh_unsigned): Likewise.
10010 (aarch64_emit_ext): Likewise.
10011 (aarch64_emit_log_not): Likewise.
10012 (aarch64_emit_bit_and): Likewise.
10013 (aarch64_emit_bit_or): Likewise.
10014 (aarch64_emit_bit_xor): Likewise.
10015 (aarch64_emit_bit_not): Likewise.
10016 (aarch64_emit_equal): Likewise.
10017 (aarch64_emit_less_signed): Likewise.
10018 (aarch64_emit_less_unsigned): Likewise.
10019 (aarch64_emit_ref): Likewise.
10020 (aarch64_emit_if_goto): Likewise.
10021 (aarch64_emit_goto): Likewise.
10022 (aarch64_write_goto_address): Likewise.
10023 (aarch64_emit_const): Likewise.
10024 (aarch64_emit_call): Likewise.
10025 (aarch64_emit_reg): Likewise.
10026 (aarch64_emit_pop): Likewise.
10027 (aarch64_emit_stack_flush): Likewise.
10028 (aarch64_emit_zero_ext): Likewise.
10029 (aarch64_emit_swap): Likewise.
10030 (aarch64_emit_stack_adjust): Likewise.
10031 (aarch64_emit_int_call_1): Likewise.
10032 (aarch64_emit_void_call_2): Likewise.
10033 (aarch64_emit_eq_goto): Likewise.
10034 (aarch64_emit_ne_goto): Likewise.
10035 (aarch64_emit_lt_goto): Likewise.
10036 (aarch64_emit_le_goto): Likewise.
10037 (aarch64_emit_gt_goto): Likewise.
10038 (aarch64_emit_ge_got): Likewise.
10039 (aarch64_emit_ops_impl): New static global variable.
10040 (aarch64_emit_ops): New target function, return
10041 &aarch64_emit_ops_impl.
10042 (struct linux_target_ops): Install it.
10043
10044 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10045
10046 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10047 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10048 aarch64-ipa.o.
10049 * linux-aarch64-ipa.c: New file.
10050 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10051 and endian.h.
10052 (aarch64_get_thread_area): New target method.
10053 (extract_signed_bitfield): New helper function.
10054 (aarch64_decode_ldr_literal): New function.
10055 (enum aarch64_opcodes): New enum.
10056 (struct aarch64_register): New struct.
10057 (struct aarch64_operand): New struct.
10058 (x0): New static global.
10059 (x1): Likewise.
10060 (x2): Likewise.
10061 (x3): Likewise.
10062 (x4): Likewise.
10063 (w2): Likewise.
10064 (ip0): Likewise.
10065 (sp): Likewise.
10066 (xzr): Likewise.
10067 (aarch64_register): New helper function.
10068 (register_operand): Likewise.
10069 (immediate_operand): Likewise.
10070 (struct aarch64_memory_operand): New struct.
10071 (offset_memory_operand): New helper function.
10072 (preindex_memory_operand): Likewise.
10073 (enum aarch64_system_control_registers): New enum.
10074 (ENCODE): New macro.
10075 (emit_insn): New helper function.
10076 (emit_b): New function.
10077 (emit_bcond): Likewise.
10078 (emit_cb): Likewise.
10079 (emit_tb): Likewise.
10080 (emit_blr): Likewise.
10081 (emit_stp): Likewise.
10082 (emit_ldp_q_offset): Likewise.
10083 (emit_stp_q_offset): Likewise.
10084 (emit_load_store): Likewise.
10085 (emit_ldr): Likewise.
10086 (emit_ldrsw): Likewise.
10087 (emit_str): Likewise.
10088 (emit_ldaxr): Likewise.
10089 (emit_stxr): Likewise.
10090 (emit_stlr): Likewise.
10091 (emit_data_processing_reg): Likewise.
10092 (emit_data_processing): Likewise.
10093 (emit_add): Likewise.
10094 (emit_sub): Likewise.
10095 (emit_mov): Likewise.
10096 (emit_movk): Likewise.
10097 (emit_mov_addr): Likewise.
10098 (emit_mrs): Likewise.
10099 (emit_msr): Likewise.
10100 (emit_sevl): Likewise.
10101 (emit_wfe): Likewise.
10102 (append_insns): Likewise.
10103 (can_encode_int32_in): New helper function.
10104 (aarch64_relocate_instruction): New function.
10105 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10106 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10107 (struct linux_target_ops): Install aarch64_get_thread_area,
10108 aarch64_install_fast_tracepoint_jump_pad and
10109 aarch64_get_min_fast_tracepoint_insn_len.
10110
10111 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10112
10113 * Makefile.in (aarch64-insn.o): New rule.
10114 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10115
10116 2015-09-21 Yao Qi <yao.qi@linaro.org>
10117
10118 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10119
10120 2015-09-21 Yao Qi <yao.qi@linaro.org>
10121
10122 * tracepoint.c (max_jump_pad_size): Remove.
10123
10124 2015-09-18 Yao Qi <yao.qi@linaro.org>
10125
10126 * linux-aarch64-low.c: Don't include sys/uio.h.
10127 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10128
10129 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10130
10131 * tracepoint.c (eval_result_type): Change prototype.
10132 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10133
10134 2015-09-15 Pedro Alves <palves@redhat.com>
10135
10136 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10137 Check whether to report exec events instead of checking whether
10138 multiprocess is enabled.
10139
10140 2015-09-15 Pedro Alves <palves@redhat.com>
10141
10142 PR remote/18965
10143 * remote-utils.c (prepare_resume_reply): Merge
10144 TARGET_WAITKIND_VFORK_DONE switch case with the
10145 TARGET_WAITKIND_FORKED case.
10146
10147 2015-09-15 Yao Qi <yao.qi@linaro.org>
10148
10149 * server.c (handle_query): Check string comparison using
10150 "else if" instead of "if".
10151
10152 2015-09-15 Yao Qi <yao.qi@linaro.org>
10153
10154 * server.c (vCont_supported): New global variable.
10155 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10156 matches. Append ";vContSupported+" to own_buf.
10157 (handle_v_requests): Append ";s;S" to own_buf if target supports
10158 hardware single step or vCont_supported is false.
10159 (capture_main): Set vCont_supported to zero.
10160
10161 2015-09-15 Yao Qi <yao.qi@linaro.org>
10162
10163 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10164 it to ...
10165 (linux_supports_hardware_single_step): ... New function.
10166 (linux_target_ops): Update.
10167 * lynx-low.c (lynx_target_ops): Set field
10168 supports_hardware_single_step to target_can_do_hardware_single_step.
10169 * nto-low.c (nto_target_ops): Likewise.
10170 * spu-low.c (spu_target_ops): Likewise.
10171 * win32-low.c (win32_target_ops): Likewise.
10172 * target.c (target_can_do_hardware_single_step): New function.
10173 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10174 Remove. <supports_hardware_single_step>: New field.
10175 (target_supports_conditional_breakpoints): Remove.
10176 (target_supports_hardware_single_step): New macro.
10177 (target_can_do_hardware_single_step): Declare.
10178 * server.c (handle_query): Use target_supports_hardware_single_step
10179 instead of target_supports_conditional_breakpoints.
10180
10181 2015-09-15 Yao Qi <yao.qi@linaro.org>
10182
10183 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10184 function.
10185 (struct linux_target_ops the_low_target): Install
10186 aarch64_linux_siginfo_fixup.
10187
10188 2015-09-11 Don Breazeal <donb@codesourcery.com>
10189 Luis Machado <lgustavo@codesourcery.com>
10190
10191 * linux-low.c (linux_mourn): Static declaration.
10192 (linux_arch_setup): Move in front of
10193 handle_extended_wait.
10194 (linux_arch_setup_thread): New function.
10195 (handle_extended_wait): Handle exec events. Call
10196 linux_arch_setup_thread. Make event_lwp argument a
10197 pointer-to-a-pointer.
10198 (check_zombie_leaders): Do not check stopped threads.
10199 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10200 (linux_low_filter_event): Add lwp and thread for exec'ing
10201 non-leader thread if leader thread has been deleted.
10202 Refactor code into linux_arch_setup_thread and call it.
10203 Pass child lwp pointer by reference to handle_extended_wait.
10204 (linux_wait_for_event_filtered): Update comment.
10205 (linux_wait_1): Prevent clobbering exec event status.
10206 (linux_supports_exec_events): New function.
10207 (linux_target_ops) <supports_exec_events>: Initialize new member.
10208 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10209 new member.
10210 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10211 * server.c (report_exec_events): New global variable.
10212 (handle_query): Handle qSupported query for exec-events feature.
10213 (captured_main): Initialize report_exec_events.
10214 * server.h (report_exec_events): Declare new global variable.
10215 * target.h (struct target_ops) <supports_exec_events>: New
10216 member.
10217 (target_supports_exec_events): New macro.
10218 * win32-low.c (win32_target_ops) <supports_exec_events>:
10219 Initialize new member.
10220
10221 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10222
10223 * linux-low.c (linux_low_enable_btrace): Remove.
10224 (linux_target_ops): Replace linux_low_enable_btrace with
10225 linux_enable_btrace.
10226
10227 2015-09-03 Yao Qi <yao.qi@linaro.org>
10228
10229 * linux-aarch64-low.c (aarch64_insert_point): Call
10230 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10231 returns true.
10232
10233 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10234
10235 * linux-low.c (check_stopped_by_breakpoint): Use
10236 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10237
10238 2015-08-27 Pedro Alves <palves@redhat.com>
10239
10240 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10241
10242 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10243
10244 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10245 the XNEW-family equivalent.
10246 (compile_bytecodes): Likewise.
10247 * dll.c (loaded_dll): Likewise.
10248 * event-loop.c (append_callback_event): Likewise.
10249 (create_file_handler): Likewise.
10250 (create_file_event): Likewise.
10251 * hostio.c (handle_open): Likewise.
10252 * inferiors.c (add_thread): Likewise.
10253 (add_process): Likewise.
10254 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10255 * linux-arm-low.c (arm_new_process): Likewise.
10256 (arm_new_thread): Likewise.
10257 * linux-low.c (add_to_pid_list): Likewise.
10258 (linux_add_process): Likewise.
10259 (handle_extended_wait): Likewise.
10260 (add_lwp): Likewise.
10261 (enqueue_one_deferred_signal): Likewise.
10262 (enqueue_pending_signal): Likewise.
10263 (linux_resume_one_lwp_throw): Likewise.
10264 (linux_resume_one_thread): Likewise.
10265 (linux_read_memory): Likewise.
10266 (linux_write_memory): Likewise.
10267 * linux-mips-low.c (mips_linux_new_process): Likewise.
10268 (mips_linux_new_thread): Likewise.
10269 (mips_add_watchpoint): Likewise.
10270 * linux-x86-low.c (initialize_low_arch): Likewise.
10271 * lynx-low.c (lynx_add_process): Likewise.
10272 * mem-break.c (set_raw_breakpoint_at): Likewise.
10273 (set_breakpoint): Likewise.
10274 (add_condition_to_breakpoint): Likewise.
10275 (add_commands_to_breakpoint): Likewise.
10276 (clone_agent_expr): Likewise.
10277 (clone_one_breakpoint): Likewise.
10278 * regcache.c (new_register_cache): Likewise.
10279 * remote-utils.c (look_up_one_symbol): Likewise.
10280 * server.c (queue_stop_reply): Likewise.
10281 (start_inferior): Likewise.
10282 (queue_stop_reply_callback): Likewise.
10283 (handle_target_event): Likewise.
10284 * spu-low.c (fetch_ppc_memory): Likewise.
10285 (store_ppc_memory): Likewise.
10286 * target.c (set_target_ops): Likewise.
10287 * thread-db.c (thread_db_load_search): Likewise.
10288 (try_thread_db_load_1): Likewise.
10289 * tracepoint.c (add_tracepoint): Likewise.
10290 (add_tracepoint_action): Likewise.
10291 (create_trace_state_variable): Likewise.
10292 (cmd_qtdpsrc): Likewise.
10293 (cmd_qtro): Likewise.
10294 (add_while_stepping_state): Likewise.
10295 * win32-low.c (child_add_thread): Likewise.
10296 (get_image_name): Likewise.
10297
10298 2015-08-25 Yao Qi <yao.qi@linaro.org>
10299
10300 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10301
10302 2015-08-25 Yao Qi <yao.qi@linaro.org>
10303
10304 * Makefile.in (aarch64-linux.o): New rule.
10305 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10306 srv_tgtobj.
10307 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10308 (aarch64_init_debug_reg_state): Make it extern.
10309 (aarch64_linux_prepare_to_resume): Remove.
10310
10311 2015-08-25 Yao Qi <yao.qi@linaro.org>
10312
10313 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10314 lwp_arch_private_info and ptid_of_lwp.
10315
10316 2015-08-25 Yao Qi <yao.qi@linaro.org>
10317
10318 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10319 Find proc_info by find_process_pid. All callers updated.
10320
10321 2015-08-25 Yao Qi <yao.qi@linaro.org>
10322
10323 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10324 Remove.
10325 (debug_reg_change_callback): Remove.
10326 (aarch64_notify_debug_reg_change): Remove.
10327
10328 2015-08-25 Yao Qi <yao.qi@linaro.org>
10329
10330 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10331 Call current_lwp_ptid.
10332
10333 2015-08-25 Yao Qi <yao.qi@linaro.org>
10334
10335 * linux-aarch64-low.c (debug_reg_change_callback): Use
10336 debug_printf.
10337
10338 2015-08-25 Yao Qi <yao.qi@linaro.org>
10339
10340 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10341
10342 2015-08-25 Yao Qi <yao.qi@linaro.org>
10343
10344 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10345
10346 2015-08-25 Yao Qi <yao.qi@linaro.org>
10347
10348 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10349 the code.
10350
10351 2015-08-25 Yao Qi <yao.qi@linaro.org>
10352
10353 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10354 Remove.
10355 (debug_reg_change_callback): Remove argument entry and add argument
10356 lwp. Remove local variable thread. Don't print thread id in the
10357 debugging output. Don't check whether pid of thread equals to pid.
10358 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10359 iterate_over_lwps instead find_inferior.
10360
10361 2015-08-24 Pedro Alves <palves@redhat.com>
10362
10363 * inferiors.c (get_first_process): New function.
10364 * inferiors.h (get_first_process): New declaration.
10365 * remote-utils.c (read_ptid): Default to the first process in the
10366 list, instead of to the current thread's process.
10367
10368 2015-08-24 Pedro Alves <palves@redhat.com>
10369
10370 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10371 * event-loop.c: Likewise.
10372 * remote-utils.c: Likewise.
10373 * tracepoint.c: Likewise.
10374
10375 2015-08-24 Pedro Alves <palves@redhat.com>
10376
10377 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10378 ptid_get_lwp.
10379
10380 2015-08-21 Pedro Alves <palves@redhat.com>
10381
10382 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10383 instead of literal 1.
10384
10385 2015-08-21 Pedro Alves <palves@redhat.com>
10386
10387 * tdesc.c (default_description): Explicitly zero-initialize.
10388
10389 2015-08-21 Pedro Alves <palves@redhat.com>
10390
10391 PR gdb/18749
10392 * inferiors.c (remove_thread): Discard any pending stop reply for
10393 this thread.
10394 * server.c (remove_all_on_match_pid): Rename to ...
10395 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10396 instead of a pid.
10397 (discard_queued_stop_replies): Change parameter to a ptid. Now
10398 extern.
10399 (handle_v_kill, kill_inferior_callback, captured_main)
10400 (process_serial_event): Adjust.
10401 * server.h (discard_queued_stop_replies): Declare.
10402
10403 2015-08-21 Pedro Alves <palves@redhat.com>
10404
10405 * linux-low.c (wait_for_sigstop): Always switch to no thread
10406 selected if the previously current thread dies.
10407 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10408 process instead of the current thread's.
10409 * remote-utils.c (input_interrupt): Don't check if there's no
10410 current thread.
10411 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10412 current thread to the general thread fails, error out.
10413 (handle_qxfer_auxv, handle_qxfer_libraries)
10414 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10415 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10416 (handle_query): Check if there's a thread selected instead of
10417 checking whether there's any thread in the thread list.
10418 (handle_qxfer_threads, handle_qxfer_btrace)
10419 (handle_qxfer_btrace_conf): Don't error out early if there's no
10420 thread in the thread list.
10421 (handle_v_cont, myresume): Don't set the current thread to the
10422 continue thread.
10423 (process_serial_event) <Hg handling>: Also set thread_id if the
10424 previous general thread is still alive.
10425 (process_serial_event) <g/G handling>: If setting the current
10426 thread to the general thread fails, error out.
10427 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10428 thread's lwp instead of the current thread's.
10429 * target.c (set_desired_thread): If the desired thread was not
10430 found, leave the current thread pointing to NULL. Return an int
10431 (boolean) indicating success.
10432 * target.h (set_desired_thread): Change return type to int.
10433
10434 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10435
10436 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10437 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10438 #includes.
10439 (ps_get_thread_area): New function.
10440
10441 2015-08-19 Gary Benson <gbenson@redhat.com>
10442
10443 * hostio.c (handle_pread): Do not attempt to read more data
10444 than hostio_reply_with_data can fit in a packet.
10445
10446 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10447
10448 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10449
10450 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10451
10452 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10453
10454 2015-08-06 Pedro Alves <palves@redhat.com>
10455
10456 * tracepoint.c (expr_eval_result): Now an int.
10457
10458 2015-08-06 Pedro Alves <palves@redhat.com>
10459
10460 * gdbthread.h (struct regcache): Forward declare.
10461 (struct thread_info) <regcache_data>: Now a struct regcache
10462 pointer.
10463 * inferiors.c (inferior_regcache_data)
10464 (set_inferior_regcache_data): Now work with struct regcache
10465 pointers.
10466 * inferiors.h (struct regcache): Forward declare.
10467 (inferior_regcache_data, set_inferior_regcache_data): Now work
10468 with struct regcache pointers.
10469 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10470 (free_register_cache_thread): Remove struct regcache pointer
10471 casts.
10472
10473 2015-08-06 Pedro Alves <palves@redhat.com>
10474
10475 * server.c (captured_main): On error, print the exception message
10476 to stderr, and if run_once is set, throw a quit.
10477
10478 2015-08-06 Pedro Alves <palves@redhat.com>
10479
10480 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10481 the current thread.
10482
10483 2015-08-06 Pedro Alves <palves@redhat.com>
10484
10485 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10486 reading beyond the passed in buffer length.
10487
10488 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10489
10490 * tracepoint.c (symbol_list) <required>: Remove.
10491
10492 2015-08-06 Pedro Alves <palves@redhat.com>
10493
10494 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10495 count if stopping and suspending threads.
10496 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10497 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10498 (linux_detach): Complete an ongoing step-over.
10499 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10500 throughout.
10501 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10502 (linux_wait_1): If passing a signal to the inferior after
10503 finishing a step-over, unsuspend and re-resume all lwps. If we
10504 see a single-step event but the thread should be continuing, don't
10505 pass the trap to gdb.
10506 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10507 internal_error instead of gdb_assert.
10508 (enqueue_pending_signal): New function.
10509 (check_ptrace_stopped_lwp_gone): Add debug output.
10510 (start_step_over): Use internal_error instead of gdb_assert.
10511 (complete_ongoing_step_over): New function.
10512 (linux_resume_one_thread): Don't resume a suspended thread.
10513 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10514 it stepping.
10515
10516 2015-08-06 Pedro Alves <palves@redhat.com>
10517
10518 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10519 (linux_thread_alive): Use lwp_is_marked_dead.
10520 (extended_event_reported): Delete.
10521 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10522 instead of extended_event_reported.
10523 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10524 as well.
10525 (lwp_is_marked_dead): New function.
10526 (lwp_running): Use lwp_is_marked_dead.
10527 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10528 comment.
10529
10530 2015-08-06 Pedro Alves <palves@redhat.com>
10531
10532 * linux-low.c (linux_wait_1): Move fork event output out of the
10533 !report_to_gdb check. Pass event_child->waitstatus to
10534 target_waitstatus_to_string instead of ourstatus.
10535
10536 2015-08-04 Yao Qi <yao.qi@linaro.org>
10537
10538 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10539 if current_thread is 32 bit.
10540
10541 2015-08-04 Yao Qi <yao.qi@linaro.org>
10542
10543 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10544 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10545 * server.c (extended_protocol): Remove "static".
10546 * server.h (extended_protocol): Declare it.
10547
10548 2015-08-04 Yao Qi <yao.qi@linaro.org>
10549
10550 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10551 both aarch64 and aarch32.
10552 (aarch64_set_pc): Likewise.
10553
10554 2015-08-04 Yao Qi <yao.qi@linaro.org>
10555
10556 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10557 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10558 arm-with-neon.xml to srv_xmlfiles.
10559 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10560 (is_64bit_tdesc): New function.
10561 (aarch64_linux_read_description): New function.
10562 (aarch64_arch_setup): Call aarch64_linux_read_description.
10563 (regs_info): Rename to regs_info_aarch64.
10564 (aarch64_regs_info): Return right regs_info.
10565 (initialize_low_arch): Call initialize_low_arch_aarch32.
10566
10567 2015-08-04 Yao Qi <yao.qi@linaro.org>
10568
10569 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10570 * linux-aarch32-low.c: New file.
10571 * linux-aarch32-low.h: New file.
10572 * linux-arm-low.c (arm_fill_gregset): Move it to
10573 linux-aarch32-low.c.
10574 (arm_store_gregset): Likewise.
10575 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10576 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10577 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10578 (regs_info): Rename to regs_info_arm.
10579 (arm_regs_info): Return regs_info_aarch32 if
10580 have_ptrace_getregset is 1 and target description is
10581 arm_with_neon or arm_with_vfpv3.
10582 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10583 Call initialize_low_arch_aarch32 instead.
10584
10585 2015-08-04 Yao Qi <yao.qi@linaro.org>
10586
10587 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10588 * linux-low.c: ... here.
10589 * linux-low.h (have_ptrace_getregset): Declare it.
10590
10591 2015-08-04 Pedro Alves <palves@redhat.com>
10592
10593 * thread-db.c (struct thread_db): Use new typedefs.
10594 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10595 CHK calls.
10596 (disable_thread_event_reporting): Cast result of dlsym to
10597 destination function pointer type.
10598 (thread_db_mourn): Use td_ta_delete_ftype.
10599
10600 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10601
10602 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10603 arch variant.
10604 (CDX_BREAKPOINT): Define for R2.
10605 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10606 (the_low_target): Add comments.
10607
10608 2015-07-30 Yao Qi <yao.qi@linaro.org>
10609
10610 * linux-arm-low.c (arm_hwcap): Remove it.
10611 (arm_read_description): New local variable arm_hwcap. Don't
10612 set arm_hwcap to zero.
10613
10614 2015-07-30 Yao Qi <yao.qi@linaro.org>
10615
10616 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10617 Use regcache->tdesc instead.
10618 (arm_store_wmmxregset): Likewise.
10619 (arm_fill_vfpregset): Likewise.
10620 (arm_store_vfpregset): Likewise.
10621
10622 2015-07-30 Yao Qi <yao.qi@linaro.org>
10623
10624 * linux-arm-low.c: Include arch/arm.h.
10625 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10626 (arm_store_gregset): Likewise.
10627
10628 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10629
10630 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10631 ptrace's 4th parameter.
10632
10633 2015-07-27 Yao Qi <yao.qi@linaro.org>
10634
10635 * configure.srv (case aarch64*-*-linux*): Don't set
10636 srv_linux_usrregs.
10637
10638 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10639
10640 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10641 sys/ptrace.h.
10642 * linux-arm-low.c: Likewise.
10643 * linux-cris-low.c: Likewise.
10644 * linux-crisv32-low.c: Likewise.
10645 * linux-low.c: Likewise.
10646 * linux-m68k-low.c: Likewise.
10647 * linux-mips-low.c: Likewise.
10648 * linux-nios2-low.c: Likewise.
10649 * linux-s390-low.c: Likewise.
10650 * linux-sparc-low.c: Likewise.
10651 * linux-tic6x-low.c: Likewise.
10652 * linux-tile-low.c: Likewise.
10653 * linux-x86-low.c: Likewise.
10654
10655 2015-07-24 Pedro Alves <palves@redhat.com>
10656
10657 * config.in: Regenerate.
10658 * configure: Regenerate.
10659
10660 2015-07-24 Pedro Alves <palves@redhat.com>
10661
10662 * acinclude.m4: Include ../ptrace.m4.
10663 * configure.ac: Call GDB_AC_PTRACE.
10664 * config.in, configure: Regenerate.
10665
10666 2015-07-24 Yao Qi <yao.qi@linaro.org>
10667
10668 * linux-low.c (linux_create_inferior): Remove setting to
10669 proc->priv->new_inferior.
10670 (linux_attach): Likewise.
10671 (linux_low_filter_event): Likewise.
10672 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10673
10674 2015-07-24 Yao Qi <yao.qi@linaro.org>
10675
10676 * linux-low.c (linux_arch_setup): New function.
10677 (linux_low_filter_event): If proc->tdesc is NULL and
10678 proc->attached is true, call the_low_target.arch_setup.
10679 Otherwise, keep status pending, and return.
10680 (linux_resume_one_lwp_throw): Don't call get_pc if
10681 thread->while_stepping isn't NULL. Don't call
10682 get_thread_regcache if proc->tdesc is NULL.
10683 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10684 (linux_target_ops): Install arch_setup.
10685 * server.c (start_inferior): Call the_target->arch_setup.
10686 * target.h (struct target_ops) <arch_setup>: New field.
10687 (target_arch_setup): New marco.
10688 * lynx-low.c (lynx_target_ops): Update.
10689 * nto-low.c (nto_target_ops): Update.
10690 * spu-low.c (spu_target_ops): Update.
10691 * win32-low.c (win32_target_ops): Update.
10692
10693 2015-07-24 Yao Qi <yao.qi@linaro.org>
10694
10695 * linux-low.c (linux_add_process): Don't set
10696 proc->priv->new_inferior.
10697 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10698 (linux_attach): Likewise.
10699
10700 2015-07-24 Yao Qi <yao.qi@linaro.org>
10701
10702 * server.c (start_inferior): Code refactor.
10703
10704 2015-07-24 Yao Qi <yao.qi@linaro.org>
10705
10706 * server.c (process_serial_event): Set general_thread.
10707
10708 2015-07-21 Yao Qi <yao.qi@linaro.org>
10709
10710 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10711 aarch64_linux_get_debug_reg_capacity.
10712
10713 2015-07-17 Yao Qi <yao.qi@linaro.org>
10714
10715 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10716 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10717 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10718 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10719 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10720 (AARCH64_HWP_ALIGNMENT): Likewise.
10721 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10722 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10723 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10724 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10725 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10726 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10727 (struct aarch64_debug_reg_state): Likewise.
10728 (struct arch_lwp_info): Likewise.
10729 (aarch64_align_watchpoint): Likewise.
10730 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10731 (aarch64_watchpoint_length): Likewise.
10732 (aarch64_point_encode_ctrl_reg): Likewise
10733 (aarch64_point_is_aligned): Likewise.
10734 (aarch64_align_watchpoint): Likewise.
10735 (aarch64_linux_set_debug_regs):
10736 (aarch64_dr_state_insert_one_point): Likewise.
10737 (aarch64_dr_state_remove_one_point): Likewise.
10738 (aarch64_handle_breakpoint): Likewise.
10739 (aarch64_handle_aligned_watchpoint): Likewise.
10740 (aarch64_handle_unaligned_watchpoint): Likewise.
10741 (aarch64_handle_watchpoint): Likewise.
10742
10743 2015-07-17 Yao Qi <yao.qi@linaro.org>
10744
10745 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10746 and don't aarch64_get_debug_reg_state. All callers update.
10747 (aarch64_handle_aligned_watchpoint): Likewise.
10748 (aarch64_handle_unaligned_watchpoint): Likewise.
10749 (aarch64_handle_watchpoint): Likewise.
10750 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10751 (aarch64_remove_point): Likewise.
10752
10753 2015-07-17 Yao Qi <yao.qi@linaro.org>
10754
10755 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10756 debug_printf.
10757 (aarch64_handle_unaligned_watchpoint): Likewise.
10758
10759 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10760
10761 Revert the previous 3 commits:
10762 Move gdb_regex* to common/
10763 Move linux_find_memory_regions_full & co.
10764 gdbserver build-id attribute generator
10765
10766 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10767 Jan Kratochvil <jan.kratochvil@redhat.com>
10768
10769 gdbserver build-id attribute generator.
10770 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10771 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10772 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10773 (find_phdr): New.
10774 (get_dynamic): Use find_pdhr to traverse program headers.
10775 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10776 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10777 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10778 (get_hex_build_id): New.
10779 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10780 to reply XML document.
10781
10782 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10783 Jan Kratochvil <jan.kratochvil@redhat.com>
10784
10785 * target.c: Include target/target-utils.h and fcntl.h.
10786 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10787 (target_fileio_read_stralloc): New functions.
10788
10789 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10790
10791 * Makefile.in (OBS): Add gdb_regex.o.
10792 (gdb_regex.o): New.
10793 * config.in: Rebuilt.
10794 * configure: Rebuilt.
10795
10796 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10797 Jan Kratochvil <jan.kratochvil@redhat.com>
10798
10799 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10800 * Makefile.in (OBS): Add target-utils.o.
10801 (linux-maps.o, target-utils.o): New.
10802 * configure.srv (srv_linux_obj): Add linux-maps.o.
10803
10804 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10805
10806 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10807 function, return 1.
10808 (the_low_target): Install it.
10809
10810 2015-07-14 Pedro Alves <palves@redhat.com>
10811
10812 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10813 Instead, ignore ECHILD, and throw an error for other errnos.
10814
10815 2015-07-10 Pedro Alves <palves@redhat.com>
10816
10817 * event-loop.c (struct callback_event) <data>: Change type to
10818 gdb_client_data instance instead of gdb_client_data pointer.
10819 (append_callback_event): Adjust.
10820
10821 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10822
10823 * linux-aarch64-low.c: Add comments for each linux_target_ops
10824 method. Remove comments already covered in target_ops and
10825 linux_target_ops definitions.
10826 (the_low_target): Add comments for each unimplemented method.
10827
10828 2015-07-09 Yao Qi <yao.qi@linaro.org>
10829
10830 * linux-aarch64-low.c (aarch64_regmap): Remove.
10831 (aarch64_usrregs_info): Remove.
10832 (regs_info): Set field usrregs to NULL.
10833
10834 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10835
10836 * linux-low.c: Include "rsp-low.h"
10837 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10838 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10839 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10840 (handle_btrace_enable_pt): New.
10841 (handle_btrace_general_set): Support "pt".
10842 (handle_btrace_conf_general_set): Support "pt:size".
10843
10844 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10845
10846 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10847 Z_PACKET_SW_BP.
10848
10849 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10850
10851 * linux-aarch64-low.c: Remove comment about endianness.
10852 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10853 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10854 memcmp.
10855
10856 2015-06-24 Gary Benson <gbenson@redhat.com>
10857
10858 * linux-i386-ipa.c (stdint.h): Do not include.
10859 * lynx-i386-low.c (stdint.h): Likewise.
10860 * lynx-ppc-low.c (stdint.h): Likewise.
10861 * mem-break.c (stdint.h): Likewise.
10862 * thread-db.c (stdint.h): Likewise.
10863 * tracepoint.c (stdint.h): Likewise.
10864 * win32-low.c (stdint.h): Likewise.
10865
10866 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10867
10868 * server.c (write_qxfer_response): Update call to
10869 remote_escape_output.
10870
10871 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10872 Jan Kratochvil <jan.kratochvil@redhat.com>
10873
10874 Merge multiple hex conversions.
10875 * gdbreplay.c (tohex): Rename to 'fromhex'.
10876 (logchar): Use fromhex.
10877
10878 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10879
10880 * server.c (handle_qxfer_libraries): Set `version' attribute for
10881 <library-list>.
10882
10883 2015-06-10 Gary Benson <gbenson@redhat.com>
10884
10885 * target.h (struct target_ops) <multifs_open>: New field.
10886 <multifs_unlink>: Likewise.
10887 <multifs_readlink>: Likewise.
10888 * linux-low.c (nat/linux-namespaces.h): New include.
10889 (linux_target_ops): Initialize the_target->multifs_open,
10890 the_target->multifs_unlink and the_target->multifs_readlink.
10891 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10892 * hostio.c (hostio_fs_pid): New static variable.
10893 (hostio_handle_new_gdb_connection): New function.
10894 (handle_setfs): Likewise.
10895 (handle_open): Use the_target->multifs_open as appropriate.
10896 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10897 (handle_readlink): Use the_target->multifs_readlink as
10898 appropriate.
10899 (handle_vFile): Handle vFile:setfs packets.
10900 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10901 after target_handle_new_gdb_connection.
10902
10903 2015-06-10 Gary Benson <gbenson@redhat.com>
10904
10905 * configure.ac (AC_CHECK_FUNCS): Add setns.
10906 * config.in: Regenerate.
10907 * configure: Likewise.
10908 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10909 (linux-namespaces.o): New rule.
10910 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10911
10912 2015-06-09 Gary Benson <gbenson@redhat.com>
10913
10914 * hostio.c (handle_open): Process mode argument with
10915 fileio_to_host_mode.
10916
10917 2015-06-01 Yao Qi <yao.qi@linaro.org>
10918
10919 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10920 * linux-x86-low.c: Likewise.
10921
10922 2015-05-28 Don Breazeal <donb@codesourcery.com>
10923
10924 * linux-low.c (handle_extended_wait): Initialize
10925 thread_info.last_resume_kind for new fork children.
10926
10927 2015-05-15 Pedro Alves <palves@redhat.com>
10928
10929 * target.h (target_handle_new_gdb_connection): Rewrite using if
10930 wrapped in do/while.
10931
10932 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10933
10934 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10935 * configure, config.in: Regenerate.
10936 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10937 Declare typedef.
10938
10939 2015-05-12 Don Breazeal <donb@codesourcery.com>
10940
10941 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10942 PTRACE_EVENT_VFORK_DONE.
10943 (linux_low_ptrace_options, extended_event_reported): Add vfork
10944 events.
10945 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10946 and "vforkdone" for RSP 'T' Stop Reply Packet.
10947 * server.h (report_vfork_events): Declare
10948 global variable.
10949
10950 2015-05-12 Don Breazeal <donb@codesourcery.com>
10951
10952 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10953 (the_low_target) <new_fork>: Initialize new member.
10954 * linux-arm-low.c (arm_new_fork): New function.
10955 (the_low_target) <new_fork>: Initialize new member.
10956 * linux-low.c (handle_extended_wait): Call new target function
10957 new_fork.
10958 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10959 * linux-mips-low.c (mips_add_watchpoint): New function
10960 extracted from mips_insert_point.
10961 (the_low_target) <new_fork>: Initialize new member.
10962 (mips_linux_new_fork): New function.
10963 (mips_insert_point): Call mips_add_watchpoint.
10964 * linux-x86-low.c (x86_linux_new_fork): New function.
10965 (the_low_target) <new_fork>: Initialize new member.
10966
10967 2015-05-12 Don Breazeal <donb@codesourcery.com>
10968
10969 * linux-low.c (handle_extended_wait): Implement return value,
10970 rename argument 'event_child' to 'event_lwp', handle
10971 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10972 (linux_low_ptrace_options): New function.
10973 (linux_low_filter_event): Call linux_low_ptrace_options,
10974 use different argument fo linux_enable_event_reporting,
10975 use return value from handle_extended_wait.
10976 (extended_event_reported): New function.
10977 (linux_wait_1): Call extended_event_reported and set
10978 status to report fork events.
10979 (linux_write_memory): Add pid to debug message.
10980 (reset_lwp_ptrace_options_callback): New function.
10981 (linux_handle_new_gdb_connection): New function.
10982 (linux_target_ops): Initialize new structure member.
10983 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10984 * lynx-low.c: Initialize new structure member.
10985 * remote-utils.c (prepare_resume_reply): Implement stop reason
10986 "fork" for "T" stop message.
10987 * server.c (handle_query): Call handle_new_gdb_connection.
10988 * server.h (report_fork_events): Declare global flag.
10989 * target.h (struct target_ops) <handle_new_gdb_connection>:
10990 New member.
10991 (target_handle_new_gdb_connection): New macro.
10992 * win32-low.c: Initialize new structure member.
10993
10994 2015-05-12 Don Breazeal <donb@codesourcery.com>
10995
10996 * mem-break.c (APPEND_TO_LIST): Define macro.
10997 (clone_agent_expr): New function.
10998 (clone_one_breakpoint): New function.
10999 (clone_all_breakpoints): New function.
11000 * mem-break.h: Declare new functions.
11001
11002 2015-05-12 Don Breazeal <donb@codesourcery.com>
11003
11004 * linux-low.c (linux_supports_fork_events): New function.
11005 (linux_supports_vfork_events): New function.
11006 (linux_target_ops): Initialize new structure members.
11007 (initialize_low): Call linux_check_ptrace_features.
11008 * lynx-low.c (lynx_target_ops): Initialize new structure
11009 members.
11010 * server.c (report_fork_events, report_vfork_events):
11011 New global flags.
11012 (handle_query): Add new features to qSupported packet and
11013 response.
11014 (captured_main): Initialize new global variables.
11015 * target.h (struct target_ops) <supports_fork_events>:
11016 New member.
11017 <supports_vfork_events>: New member.
11018 (target_supports_fork_events): New macro.
11019 (target_supports_vfork_events): New macro.
11020 * win32-low.c (win32_target_ops): Initialize new structure
11021 members.
11022
11023 2015-05-12 Gary Benson <gbenson@redhat.com>
11024
11025 * server.c (handle_qxfer_exec_file): Use current process
11026 if annex is empty.
11027
11028 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11029
11030 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11031 Remove HAVE_PTRACE_GETREGS conditionals.
11032 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11033 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11034
11035 2015-05-08 Yao Qi <yao.qi@linaro.org>
11036
11037 * linux-low.c (linux_supports_conditional_breakpoints): New
11038 function.
11039 (linux_target_ops): Install new target method.
11040 * lynx-low.c (lynx_target_ops): Install NULL hook for
11041 supports_conditional_breakpoints.
11042 * nto-low.c (nto_target_ops): Likewise.
11043 * spu-low.c (spu_target_ops): Likewise.
11044 * win32-low.c (win32_target_ops): Likewise.
11045 * server.c (handle_query): Check
11046 target_supports_conditional_breakpoints.
11047 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11048 New field.
11049 (target_supports_conditional_breakpoints): New macro.
11050
11051 2015-05-06 Pedro Alves <palves@redhat.com>
11052
11053 PR server/18081
11054 * server.c (start_inferior): If the process exits, mourn it.
11055
11056 2015-04-21 Gary Benson <gbenson@redhat.com>
11057
11058 * hostio.c (fileio_open_flags_to_host): Factored out to
11059 fileio_to_host_openflags in common/fileio.c. Single use
11060 updated.
11061
11062 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11063
11064 * linux-xtensa-low.c (xtensa_fill_gregset)
11065 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11066 XCHAL_HAVE_LOOP.
11067
11068 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11069
11070 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11071 (regs_info): Replace usrregs pointer with NULL.
11072
11073 2015-04-17 Gary Benson <gbenson@redhat.com>
11074
11075 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11076 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11077 * server.c (handle_qxfer_exec_file): New function.
11078 (qxfer_packets): Add exec-file entry.
11079 (handle_query): Report qXfer:exec-file:read as supported packet.
11080
11081 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11082
11083 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11084
11085 2015-04-09 Gary Benson <gbenson@redhat.com>
11086
11087 * hostio-errno.c (errno_to_fileio_error): Remove function.
11088 Update caller to use remote_fileio_to_fio_error.
11089
11090 2015-04-09 Yao Qi <yao.qi@linaro.org>
11091
11092 * linux-low.c (linux_insert_point): Call
11093 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11094 (linux_remove_point): Call remove_memory_breakpoint if type is
11095 raw_bkpt_type_sw.
11096 * linux-x86-low.c (x86_insert_point): Don't call
11097 insert_memory_breakpoint.
11098 (x86_remove_point): Don't call remove_memory_breakpoint.
11099
11100 2015-04-01 Pedro Alves <palves@redhat.com>
11101 Cleber Rosa <crosa@redhat.com>
11102
11103 * server.c (gdbserver_usage): Reorganize and extend the usage
11104 message.
11105
11106 2015-03-24 Pedro Alves <palves@redhat.com>
11107
11108 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11109 output. Also dump TRAP_TRACE.
11110 (linux_low_filter_event): In debug output, distinguish a
11111 resume_stop SIGSTOP from a delayed SIGSTOP.
11112
11113 2015-03-24 Gary Benson <gbenson@redhat.com>
11114
11115 * linux-x86-low.c (x86_linux_new_thread): Moved to
11116 nat/x86-linux.c.
11117 (x86_linux_prepare_to_resume): Likewise.
11118
11119 2015-03-24 Gary Benson <gbenson@redhat.com>
11120
11121 * Makefile.in (x86-linux-dregs.o): New rule.
11122 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11123 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11124 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11125 (x86_linux_dr_get): Likewise.
11126 (x86_linux_dr_set): Likewise.
11127 (update_debug_registers_callback): Likewise.
11128 (x86_linux_dr_set_addr): Likewise.
11129 (x86_linux_dr_get_addr): Likewise.
11130 (x86_linux_dr_set_control): Likewise.
11131 (x86_linux_dr_get_control): Likewise.
11132 (x86_linux_dr_get_status): Likewise.
11133 (x86_linux_update_debug_registers): Likewise.
11134
11135 2015-03-24 Gary Benson <gbenson@redhat.com>
11136
11137 * linux-x86-low.c (x86_linux_update_debug_registers):
11138 New function, factored out from...
11139 (x86_linux_prepare_to_resume): ...this.
11140
11141 2015-03-24 Gary Benson <gbenson@redhat.com>
11142
11143 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11144 (x86_linux_dr_set): Likewise.
11145 (update_debug_registers_callback): Likewise.
11146 (x86_linux_dr_set_addr): Likewise.
11147 (x86_linux_dr_get_addr): Likewise.
11148 (x86_linux_dr_set_control): Likewise.
11149 (x86_linux_dr_get_control): Likewise.
11150 (x86_linux_dr_get_status): Likewise.
11151 (x86_linux_prepare_to_resume): Likewise.
11152
11153 2015-03-24 Gary Benson <gbenson@redhat.com>
11154
11155 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11156 Use perror_with_name. Pass string through gettext.
11157 (x86_linux_dr_set): Likewise.
11158
11159 2015-03-24 Gary Benson <gbenson@redhat.com>
11160
11161 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11162 (x86_linux_dr_set_addr): ...this.
11163 (x86_dr_low_get_addr): Rename to...
11164 (x86_linux_dr_get_addr): ...this.
11165 (x86_dr_low_set_control): Rename to...
11166 (x86_linux_dr_set_control): ...this.
11167 (x86_dr_low_get_control): Rename to...
11168 (x86_linux_dr_get_control): ...this.
11169 (x86_dr_low_get_status): Rename to...
11170 (x86_linux_dr_get_status): ...this.
11171 (x86_dr_low): Update with new function names.
11172
11173 2015-03-24 Gary Benson <gbenson@redhat.com>
11174
11175 * Makefile.in (x86-linux.o): New rule.
11176 * configure.srv: Add x86-linux.o to relevant targets.
11177 * linux-low.c (lwp_set_arch_private_info): New function.
11178 (lwp_arch_private_info): Likewise.
11179 * linux-x86-low.c: Include nat/x86-linux.h.
11180 (arch_lwp_info): Removed structure.
11181 (update_debug_registers_callback):
11182 Use lwp_set_debug_registers_changed.
11183 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11184 and lwp_set_debug_registers_changed.
11185 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11186
11187 2015-03-24 Gary Benson <gbenson@redhat.com>
11188
11189 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11190 * linux-arm-low.c (arm_new_thread): Likewise.
11191 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11192 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11193 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11194 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11195
11196 2015-03-24 Gary Benson <gbenson@redhat.com>
11197
11198 * linux-low.c (ptid_of_lwp): New function.
11199 (lwp_is_stopped): Likewise.
11200 (lwp_stop_reason): Likewise.
11201 * linux-x86-low.c (update_debug_registers_callback):
11202 Use lwp_is_stopped.
11203 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11204 lwp_stop_reason.
11205
11206 2015-03-24 Gary Benson <gbenson@redhat.com>
11207
11208 * linux-low.h (linux_stop_lwp): Remove declaration.
11209
11210 2015-03-24 Gary Benson <gbenson@redhat.com>
11211
11212 * linux-low.h: Include nat/linux-nat.h.
11213 * linux-low.c (iterate_over_lwps_args): New structure.
11214 (iterate_over_lwps_filter): New function.
11215 (iterate_over_lwps): Likewise.
11216 * linux-x86-low.c (update_debug_registers_callback):
11217 Update signature to what iterate_over_lwps expects.
11218 Remove PID check that iterate_over_lwps now performs.
11219 (x86_dr_low_set_addr): Use iterate_over_lwps.
11220 (x86_dr_low_set_control): Likewise.
11221
11222 2015-03-24 Gary Benson <gbenson@redhat.com>
11223
11224 * linux-x86-low.c (x86_debug_reg_state): New function.
11225 (x86_linux_prepare_to_resume): Use the above.
11226
11227 2015-03-24 Gary Benson <gbenson@redhat.com>
11228
11229 * linux-low.c (current_lwp_ptid): New function.
11230 * linux-x86-low.c: Include nat/linux-nat.h.
11231 (x86_dr_low_get_addr): Use current_lwp_ptid.
11232 (x86_dr_low_get_control): Likewise.
11233 (x86_dr_low_get_status): Likewise.
11234
11235 2015-03-20 Pedro Alves <palves@redhat.com>
11236
11237 * tracepoint.c (cmd_qtstatus): Make "str" const.
11238
11239 2015-03-20 Pedro Alves <palves@redhat.com>
11240
11241 * server.c (handle_general_set): Make "req_str" const.
11242
11243 2015-03-19 Pedro Alves <palves@redhat.com>
11244
11245 * linux-low.c (linux_resume_one_lwp): Rename to ...
11246 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11247 instead call perror_with_name.
11248 (check_ptrace_stopped_lwp_gone): New function.
11249 (linux_resume_one_lwp): Reimplement as wrapper around
11250 linux_resume_one_lwp_throw that swallows errors if the LWP is
11251 gone.
11252
11253 2015-03-19 Pedro Alves <palves@redhat.com>
11254
11255 * linux-low.c (count_events_callback, select_event_lwp_callback):
11256 No longer check whether the thread has resume_stop as last resume
11257 kind.
11258
11259 2015-03-19 Pedro Alves <palves@redhat.com>
11260
11261 * linux-low.c (count_events_callback, select_event_lwp_callback):
11262 Use the lwp's status_pending_p field, not the thread's.
11263
11264 2015-03-19 Pedro Alves <palves@redhat.com>
11265
11266 * linux-low.c (select_event_lwp_callback): Update comments to
11267 no longer mention SIGTRAP.
11268
11269 2015-03-18 Gary Benson <gbenson@redhat.com>
11270
11271 * server.c (handle_query): Do not report vFile:fstat as supported.
11272
11273 2015-03-11 Gary Benson <gbenson@redhat.com>
11274
11275 * hostio.c (sys/types.h): New include.
11276 (sys/stat.h): Likewise.
11277 (common-remote-fileio.h): Likewise.
11278 (handle_fstat): New function.
11279 (handle_vFile): Handle vFile:fstat packets.
11280
11281 2015-03-11 Gary Benson <gbenson@redhat.com>
11282
11283 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11284 struct stat.st_blocks and struct stat.st_blksize.
11285 * configure: Regenerate.
11286 * config.in: Likewise.
11287 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11288 (OBS): Add common-remote-fileio.o.
11289 (common-remote-fileio.o): New rule.
11290
11291 2015-03-09 Pedro Alves <palves@redhat.com>
11292
11293 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11294 'struct sockaddr' pointer in 'accept' call.
11295
11296 2015-03-09 Pedro Alves <palves@redhat.com>
11297
11298 Revert:
11299 2015-03-07 Pedro Alves <palves@redhat.com>
11300 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11301 or <winsock2.h> here. Instead include "gdb_socket.h".
11302 (remote_open): Use union gdb_sockaddr_u.
11303 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11304 or <winsock2.h> here. Instead include "gdb_socket.h".
11305 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11306 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11307 or <sys/un.h>.
11308 (init_named_socket, gdb_agent_helper_thread): Use union
11309 gdb_sockaddr_u.
11310
11311 2015-03-07 Pedro Alves <palves@redhat.com>
11312
11313 * configure.ac (build_warnings): Move
11314 -Wdeclaration-after-statement to the C-specific set.
11315 * configure: Regenerate.
11316
11317 2015-03-07 Pedro Alves <palves@redhat.com>
11318
11319 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11320 or <winsock2.h> here. Instead include "gdb_socket.h".
11321 (remote_open): Use union gdb_sockaddr_u.
11322 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11323 or <winsock2.h> here. Instead include "gdb_socket.h".
11324 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11325 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11326 or <sys/un.h>.
11327 (init_named_socket, gdb_agent_helper_thread): Use union
11328 gdb_sockaddr_u.
11329
11330 2015-03-07 Pedro Alves <palves@redhat.com>
11331
11332 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11333 instead.
11334
11335 2015-03-06 Yao Qi <yao.qi@linaro.org>
11336
11337 * linux-aarch64-low.c (aarch64_insert_point): Use
11338 show_debug_regs as a boolean.
11339 (aarch64_remove_point): Likewise.
11340
11341 2015-03-05 Pedro Alves <palves@redhat.com>
11342
11343 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11344 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11345 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11346 * nto-low.c (nto_target_ops): Likewise.
11347 * spu-low.c (spu_target_ops): Likewise.
11348 * win32-low.c (win32_target_ops): Likewise.
11349
11350 2015-03-04 Pedro Alves <palves@redhat.com>
11351
11352 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11353 Decide whether a breakpoint triggered based on the SIGTRAP's
11354 siginfo.si_code.
11355 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11356 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11357 (linux_low_filter_event): Check for breakpoints before checking
11358 watchpoints.
11359 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11360 siginfo.si_code.
11361 (linux_stopped_by_sw_breakpoint)
11362 (linux_supports_stopped_by_sw_breakpoint)
11363 (linux_stopped_by_hw_breakpoint)
11364 (linux_supports_stopped_by_hw_breakpoint): New functions.
11365 (linux_target_ops): Install new target methods.
11366
11367 2015-03-04 Pedro Alves <palves@redhat.com>
11368
11369 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11370 * server.c (swbreak_feature, hwbreak_feature): New globals.
11371 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11372 (captured_main): Clear swbreak_feature and hwbreak_feature.
11373 * server.h (swbreak_feature, hwbreak_feature): Declare.
11374 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11375 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11376 supports_stopped_by_hw_breakpoint>: New fields.
11377 (target_supports_stopped_by_sw_breakpoint)
11378 (target_stopped_by_sw_breakpoint)
11379 (target_supports_stopped_by_hw_breakpoint)
11380 (target_stopped_by_hw_breakpoint): Declare.
11381
11382 2015-03-04 Pedro Alves <palves@redhat.com>
11383
11384 enum lwp_stop_reason -> enum target_stop_reason
11385 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11386 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11387 (linux_wait_1, stuck_in_jump_pad_callback)
11388 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11389 (linux_stopped_by_watchpoint):
11390 * linux-low.h (enum lwp_stop_reason): Delete.
11391 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11392 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11393
11394 2015-03-04 Yao Qi <yao.qi@linaro.org>
11395
11396 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11397
11398 2015-03-03 Gary Benson <gbenson@redhat.com>
11399
11400 * hostio.c (handle_vFile): Fix prefix lengths.
11401
11402 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11403
11404 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11405 ptr_bits.
11406
11407 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11408
11409 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11410 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11411 (clean): Add "rm -f" for above C files.
11412 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11413 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11414 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11415 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11416 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11417 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11418 (init_registers_s390x_vx_linux64)
11419 (init_registers_s390x_tevx_linux64)
11420 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11421 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11422 declarations.
11423 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11424 (s390_store_vxrs_high): New functions.
11425 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11426 NT_S390_VXRS_HIGH.
11427 (s390_arch_setup): Add logic for selecting one of the new target
11428 descriptions. Activate the new vector regsets if applicable.
11429 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11430 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11431 and init_registers_s390x_tevx_linux64.
11432
11433 2015-03-01 Pedro Alves <palves@redhat.com>
11434
11435 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11436 parameter.
11437
11438 2015-02-27 Pedro Alves <palves@redhat.com>
11439
11440 * linux-x86-low.c (u_debugreg_offset): New function.
11441 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11442
11443 2015-02-27 Pedro Alves <palves@redhat.com>
11444
11445 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11446 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11447 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11448 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11449 (ps_lsetfpregs, ps_getpid)
11450 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11451 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11452 (ps_lsetxregs, ps_plog): Declare.
11453
11454 2015-02-27 Pedro Alves <palves@redhat.com>
11455
11456 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11457 IP_AGENT_EXPORT_FUNC.
11458 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11459 IP_AGENT_EXPORT_FUNC.
11460 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11461 (IP_AGENT_EXPORT): Delete.
11462 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11463 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11464 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11465 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11466 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11467 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11468 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11469 (traceframe_read_count, traceframe_write_count)
11470 (traceframes_created, trace_state_variables, get_raw_reg)
11471 (get_trace_state_variable_value, set_trace_state_variable_value)
11472 (ust_loaded, helper_thread_id, cmd_buf): Use
11473 IPA_SYM_EXPORTED_NAME.
11474 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11475 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11476 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11477 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11478 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11479 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11480 EXTERN_C_PUSH/EXTERN_C_POP.
11481 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11482 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11483 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11484 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11485 (traceframe_write_count, traceframe_read_count)
11486 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11487 (about_to_request_buffer_space, get_trace_state_variable_value)
11488 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11489 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11490 EXTERN_C_PUSH/EXTERN_C_POP.
11491 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11492 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11493 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11494 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11495 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11496 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11497 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11498 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11499 Define.
11500 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11501 (IP_AGENT_EXPORT_VAR_DECL): Define.
11502 (tracing): Declare.
11503 (gdb_agent_get_raw_reg): Declare.
11504
11505 2015-02-27 Tom Tromey <tromey@redhat.com>
11506 Pedro Alves <palves@redhat.com>
11507
11508 Rename symbols whose names are reserved C++ keywords throughout.
11509
11510 2015-02-27 Pedro Alves <palves@redhat.com>
11511
11512 * Makefile.in (COMPILER): New, get it from autoconf.
11513 (CXX): Get from autoconf instead.
11514 (COMPILE.pre): Use COMPILER.
11515 (CC-LD): Rename to ...
11516 (CC_LD): ... this. Use COMPILER.
11517 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11518 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11519 * acinclude.m4: Include build-with-cxx.m4.
11520 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11521 Disable -Werror by default if building in C++ mode.
11522 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11523 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11524 the C++ compiler. Save/restore CXXFLAGS too.
11525 * configure: Regenerate.
11526
11527 2015-02-27 Pedro Alves <palves@redhat.com>
11528
11529 * acinclude.m4: Include libiberty.m4.
11530 * configure.ac: Call libiberty_INIT.
11531 * config.in, configure: Regenerate.
11532
11533 2015-02-26 Pedro Alves <palves@redhat.com>
11534
11535 * linux-low.c (linux_wait_1): When incrementing the PC past a
11536 program breakpoint always use the_low_target.breakpoint_len as
11537 increment, rather than the maximum between that and
11538 the_low_target.decr_pc_after_break.
11539
11540 2015-02-23 Pedro Alves <palves@redhat.com>
11541
11542 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11543 thread was doing a step-over; always adjust the PC if
11544 we stepped over a permanent breakpoint.
11545 (linux_wait_1): If we stepped over breakpoint that was on top of a
11546 permanent breakpoint, manually advance the PC past it.
11547
11548 2015-02-23 Pedro Alves <palves@redhat.com>
11549
11550 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11551 modes.
11552 (x86_fill_gregset, x86_store_gregset): Use it when handling
11553 $orig_eax.
11554
11555 2015-02-20 Pedro Alves <palves@redhat.com>
11556
11557 * thread-db.c: Include "nat/linux-procfs.h".
11558 (thread_db_init): Skip listing new threads if the kernel supports
11559 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11560
11561 2015-02-20 Pedro Alves <palves@redhat.com>
11562
11563 * linux-low.c (status_pending_p_callback): Use ptid_match.
11564
11565 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11566
11567 PR breakpoints/16812
11568 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11569 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11570 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11571
11572 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11573
11574 PR breakpoints/15956
11575 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11576
11577 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11578
11579 * linux-low.c (linux_low_btrace_conf): Print size.
11580 * server.c (handle_btrace_conf_general_set): New.
11581 (hanle_general_set): Call handle_btrace_conf_general_set.
11582 (handle_query): Report Qbtrace-conf:bts:size as supported.
11583
11584 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11585
11586 * linux-low.c (linux_low_enable_btrace): Update parameters.
11587 (linux_low_btrace_conf): New.
11588 (linux_target_ops)<to_btrace_conf>: Initialize.
11589 * server.c (current_btrace_conf): New.
11590 (handle_btrace_enable): Rename to ...
11591 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11592 to target_enable_btrace. Update comment. Update users.
11593 (handle_qxfer_btrace_conf): New.
11594 (qxfer_packets): Add btrace-conf entry.
11595 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11596 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11597 (target_ops)<read_btrace_conf>: New.
11598 (target_enable_btrace): Update parameters.
11599 (target_read_btrace_conf): New.
11600
11601 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11602
11603 * server.c (handle_btrace_general_set): Remove call to
11604 target_supports_btrace.
11605 (supported_btrace_packets): New.
11606 (handle_query): Call supported_btrace_packets.
11607 * target.h: include btrace-common.h.
11608 (btrace_target_info): Removed.
11609 (supports_btrace, target_supports_btrace): Update parameters.
11610
11611 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11612
11613 * Makefile.in (SFILES): Add common/btrace-common.c.
11614 (OBS): Add common/btrace-common.o.
11615 (btrace-common.o): Add build rules.
11616 * linux-low: Include btrace-common.h.
11617 (linux_low_read_btrace): Use struct btrace_data. Call
11618 btrace_data_init and btrace_data_fini.
11619
11620 2015-02-06 Pedro Alves <palves@redhat.com>
11621
11622 * thread-db.c (find_new_threads_callback): Add debug output.
11623
11624 2015-02-04 Pedro Alves <palves@redhat.com>
11625
11626 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11627 (resume_stopped_resumed_lwps): New function.
11628 (linux_wait_for_event_filtered): Use it.
11629
11630 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11631
11632 * Makefile.in (SFILES): Add linux-personality.c.
11633 (linux-personality.o): New rule.
11634 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11635 list of objects to be built.
11636 * linux-low.c: Include nat/linux-personality.h.
11637 (linux_create_inferior): Remove code to disable address space
11638 randomization (moved to ../nat/linux-personality.c). Create
11639 cleanup to disable address space randomization.
11640
11641 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11642
11643 * Makefile.in (posix-strerror.o): New rule.
11644 (mingw-strerror.o): Likewise.
11645 * configure: Regenerated.
11646 * configure.ac: Source file ../common/common.host. Initialize new
11647 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11648
11649 2015-01-14 Yao Qi <yao@codesourcery.com>
11650
11651 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11652 (ppc-linux.o): New rule.
11653 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11654 * configure.ac: AC_CHECK_FUNCS(getauxval).
11655 * config.in: Re-generated.
11656 * configure: Re-generated.
11657 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11658 ppc64_64bit_inferior_p
11659
11660 2015-01-14 Yao Qi <yao@codesourcery.com>
11661
11662 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11663 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11664 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11665 (PT_ORIG_R3, PT_TRAP): Likewise.
11666 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11667 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11668 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11669
11670 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11671
11672 * i387-fp.c (i387_cache_to_xsave): In look over
11673 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11674 zmmh_low_space field by use of zmmh_high_space.
11675
11676 2015-01-09 Pedro Alves <palves@redhat.com>
11677
11678 * linux-low.c (step_over_bkpt): Move higher up in the file.
11679 (handle_extended_wait): Don't store the stop_pc here.
11680 (get_stop_pc): Adjust comments and rename to ...
11681 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11682 stopped for a software breakpoint or hardware breakpoint.
11683 (thread_still_has_status_pending_p): New function.
11684 (status_pending_p_callback): Use
11685 thread_still_has_status_pending_p. If the event is no longer
11686 interesting, resume the LWP.
11687 (handle_tracepoints): Add assert.
11688 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11689 (wstatus_maybe_breakpoint): New function.
11690 (cancel_breakpoint): Delete function.
11691 (check_stopped_by_watchpoint): New function, factored out from
11692 linux_low_filter_event.
11693 (lp_status_maybe_breakpoint): Delete function.
11694 (linux_low_filter_event): Remove filter_ptid argument.
11695 Leave thread group exits pending here. Store the LWP's stop PC.
11696 Always leave events pending.
11697 (linux_wait_for_event_filtered): Pull all events out of the
11698 kernel, and leave them all pending.
11699 (count_events_callback, select_event_lwp_callback): Consider all
11700 events.
11701 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11702 (select_event_lwp): Only give preference to the stepping LWP in
11703 all-stop mode. Adjust comments.
11704 (ignore_event): New function.
11705 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11706 references to cancel_breakpoints. Adjust to renames. Also give
11707 equal priority to all LWPs that have had events in non-stop mode.
11708 If reporting a software breakpoint event, unadjust the LWP's PC.
11709 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11710 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11711 Adjust.
11712 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11713 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11714 (linux_stopped_by_watchpoint): Adjust.
11715 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11716 * linux-low.h (enum lwp_stop_reason): New.
11717 (struct lwp_info) <stop_pc>: Adjust comment.
11718 <stopped_by_watchpoint>: Delete field.
11719 <stop_reason>: New field.
11720 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11721 * mem-break.c (software_breakpoint_inserted_here)
11722 (hardware_breakpoint_inserted_here): New function.
11723 * mem-break.h (software_breakpoint_inserted_here)
11724 (hardware_breakpoint_inserted_here): Declare.
11725 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11726 (cancel_breakpoints): Delete.
11727 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11728 (upload_fast_traceframes): Remove references to
11729 cancel_breakpoints.
11730
11731 2015-01-09 Pedro Alves <palves@redhat.com>
11732
11733 * thread-db.c (find_new_threads_callback): Ignore thread if the
11734 kernel thread ID is -1.
11735
11736 2015-01-09 Pedro Alves <palves@redhat.com>
11737
11738 * linux-low.c (linux_attach_fail_reason_string): Move to
11739 nat/linux-ptrace.c, and rename.
11740 (linux_attach_lwp): Update comment.
11741 (attach_proc_task_lwp_callback): New function.
11742 (linux_attach): Adjust to rename and use
11743 linux_proc_attach_tgid_threads.
11744 (linux_attach_fail_reason_string): Delete declaration.
11745
11746 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11747
11748 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11749 * server.c (gdbserver_version): Likewise.
11750
11751 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11752
11753 * remote-utils.c: Include ctype.h.
11754 (input_interrupt): Explicitly handle the case when the char
11755 received is the NUL byte. Improve the printing of non-ASCII
11756 characters.
11757
11758 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11759
11760 * linux-low.c (linux_low_filter_event): Update call to
11761 linux_enable_event_reporting following the addition of
11762 a new parameter to that function.
11763
11764 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11765
11766 PR server/17457
11767 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11768 (AARCH64_FPCR_REGNO): Likewise.
11769 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11770 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11771 (aarch64_store_fpregset): Likewise.
11772
11773 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11774
11775 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11776 Remove FIXME comment about assumption about N.
11777
11778 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11779
11780 * configure.ac: If large-file support is disabled in GDBserver,
11781 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11782 * configure: Regenerate.
11783
11784 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11785
11786 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11787 warning upon ENODATA from ptrace.
11788 * linux-s390-low.c (s390_store_tdb): New.
11789 (s390_regsets): Add regset for NT_S390_TDB.
11790
11791 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11792
11793 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11794 without a fill_function.
11795 * linux-s390-low.c (s390_fill_last_break): Remove.
11796 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11797 (s390_arch_setup): Use regset's size instead of fill_function for
11798 loop end condition.
11799
11800 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11801
11802 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11803 the regset's store function when ptrace returned an error.
11804 * regcache.c (get_thread_regcache): Invalidate register cache
11805 before fetching inferior's registers.
11806
11807 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11808
11809 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11810 while-loop as for-loop.
11811 (regsets_store_inferior_registers): Likewise.
11812
11813 2014-11-28 Yao Qi <yao@codesourcery.com>
11814
11815 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11816 * config.in, configure: Re-generate.
11817 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11818 is defined.
11819
11820 2014-11-21 Yao Qi <yao@codesourcery.com>
11821
11822 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11823 (AC_CHECK_HEADERS): Remove malloc.h.
11824 * configure: Re-generated.
11825 * config.in: Re-generated.
11826 * server.h: Don't include alloca.h and malloc.h.
11827 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11828 Don't include malloc.h.
11829
11830 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11831
11832 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11833 corresponding ERRNO check in same block.
11834
11835 2014-11-12 Pedro Alves <palves@redhat.com>
11836
11837 * server.c (cont_thread): Update comment.
11838 (start_inferior, attach_inferior): No longer clear cont_thread.
11839 (handle_v_cont): No longer set cont_thread.
11840 (captured_main): Clear cont_thread each time a GDB connects.
11841
11842 2014-11-12 Pedro Alves <palves@redhat.com>
11843
11844 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11845 thread, and don't resume all threads if the Hc thread has exited.
11846
11847 2014-11-12 Pedro Alves <palves@redhat.com>
11848
11849 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11850 the process group instead of to a specific LWP.
11851
11852 2014-10-15 Pedro Alves <palves@redhat.com>
11853
11854 PR server/17487
11855 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11856 parameter.
11857 (arm_set_thread_context): Delete.
11858 (the_low_target): Adjust.
11859 * win32-i386-low.c (debug_registers_changed)
11860 (debug_registers_used): Delete.
11861 (update_debug_registers_callback): New function.
11862 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11863 needing to update their debug registers.
11864 (win32_get_current_dr): New function.
11865 (x86_dr_low_get_addr, x86_dr_low_get_control)
11866 (x86_dr_low_get_status): Fetch the debug register from the thread
11867 record's context.
11868 (i386_initial_stuff): Adjust.
11869 (i386_get_thread_context): Remove current_event parameter. Don't
11870 clear debug_registers_changed nor copy DR values to
11871 debug_reg_state.
11872 (i386_set_thread_context): Delete.
11873 (i386_prepare_to_resume): New function.
11874 (i386_thread_added): Mark the thread as needing to update irs
11875 debug registers.
11876 (the_low_target): Remove i386_set_thread_context and install
11877 i386_prepare_to_resume.
11878 * win32-low.c (win32_get_thread_context): Adjust.
11879 (win32_set_thread_context): Use SetThreadContext
11880 directly.
11881 (win32_prepare_to_resume): New function.
11882 (win32_require_context): New function, factored out from ...
11883 (thread_rec): ... this.
11884 (continue_one_thread): Call win32_prepare_to_resume on each thread
11885 we're about to continue.
11886 (win32_resume): Call win32_prepare_to_resume on the event thread.
11887 * win32-low.h (struct win32_thread_info)
11888 <debug_registers_changed>: New field.
11889 (struct win32_target_ops): Change prototype of set_thread_context,
11890 delete set_thread_context and add prepare_to_resume.
11891 (win32_require_context): New declaration.
11892
11893 2014-10-08 Gary Benson <gbenson@redhat.com>
11894
11895 * server.h: Do not include common-exceptions.h.
11896
11897 2014-10-08 Gary Benson <gbenson@redhat.com>
11898
11899 * server.h: Do not include cleanups.h.
11900
11901 2014-09-30 James Hogan <james.hogan@imgtec.com>
11902
11903 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11904 mips64-dsp-linux.c.
11905
11906 2014-09-23 Yao Qi <yao@codesourcery.com>
11907
11908 * linux-low.c (lp_status_maybe_breakpoint): New function.
11909 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11910 (count_events_callback): Likewise.
11911 (select_event_lwp_callback): Likewise.
11912 (cancel_breakpoints_callback): Likewise.
11913
11914 2014-09-19 Don Breazeal <donb@codesourcery.com>
11915
11916 * linux-low.c (handle_extended_wait): Call
11917 linux_ptrace_get_extended_event.
11918 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11919 linux_is_extended_waitstatus.
11920
11921 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11922
11923 * Makefile.in (CPPFLAGS): Define.
11924 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11925 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11926
11927 2014-09-16 Gary Benson <gbenson@redhat.com>
11928
11929 * inferiors.h (current_inferior): Renamed as...
11930 (current_thread): New variable. All uses updated.
11931 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11932 (maybe_move_out_of_jump_pad): Likewise.
11933 (cancel_breakpoint): Likewise.
11934 (linux_low_filter_event): Likewise.
11935 (wait_for_sigstop): Likewise.
11936 (linux_resume_one_lwp): Likewise.
11937 (need_step_over_p): Likewise.
11938 (start_step_over): Likewise.
11939 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11940 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11941 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11942 and save_inferior as saved_thread.
11943 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11944 saved_thread.
11945 (regcache_invalidate_thread): Likewise.
11946 * remote-utils.c (prepare_resume_reply): Likewise.
11947 * thread-db.c (thread_db_get_tls_address): Likewise.
11948 (disable_thread_event_reporting): Likewise.
11949 (remove_thread_event_breakpoints): Likewise.
11950 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11951 as saved_thread.
11952 * target.h (set_desired_inferior): Renamed as...
11953 (set_desired_thread): New declaration. All uses updated.
11954 * server.c (myresume): Updated comment to reference thread instead
11955 of inferior.
11956 (handle_serial_event): Likewise.
11957 (handle_target_event): Likewise.
11958
11959 2014-09-12 Tom Tromey <tromey@redhat.com>
11960 Gary Benson <gbenson@redhat.com>
11961
11962 * regcache.h: Include common-regcache.h.
11963 (regcache_read_pc): Don't declare.
11964 * regcache.c (get_thread_regcache_for_ptid): New function.
11965
11966 2014-09-11 Tom Tromey <tromey@redhat.com>
11967 Gary Benson <gbenson@redhat.com>
11968
11969 * symbol.c: New file.
11970 * Makefile.in (SFILES): Add symbol.c.
11971 (OBS): Add symbol.o.
11972
11973 2014-09-11 Gary Benson <gbenson@redhat.com>
11974
11975 * target.c (target_stop_ptid, target_continue_ptid): New
11976 functions.
11977
11978 2014-09-11 Tom Tromey <tromey@redhat.com>
11979 Gary Benson <gbenson@redhat.com>
11980
11981 * target.h: Include target/target.h.
11982 * target.c (target_read_memory, target_read_uint32)
11983 (target_write_memory): New functions.
11984
11985 2014-09-11 Gary Benson <gbenson@redhat.com>
11986
11987 * server.h (debug_hw_points): Don't declare.
11988 * server.c (debug_hw_points): Don't define. Replace all uses
11989 with show_debug_regs.
11990 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11991 all uses with show_debug_regs.
11992
11993 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11994
11995 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11996 endianness into account.
11997 (ppc_supply_ptrace_register): Likewise.
11998
11999 2014-09-03 James Hogan <james.hogan@imgtec.com>
12000
12001 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12002 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12003
12004 2014-09-03 Gary Benson <gbenson@redhat.com>
12005
12006 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12007 ALL_DEBUG_ADDRESS_REGISTERS.
12008
12009 2014-09-02 Gary Benson <gbenson@redhat.com>
12010
12011 * i386-low.h: Renamed as...
12012 * x86-low.h: New file. All type, function and variable name
12013 prefixes changed from "i386_" to "x86_". All references updated.
12014 * i386-low.c: Renamed as...
12015 * x86-low.c: New file. All type, function and variable name
12016 prefixes changed from "i386_" to "x86_". All references updated.
12017
12018 2014-09-02 Gary Benson <gbenson@redhat.com>
12019
12020 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12021 (x86_linux_new_thread): Likewise.
12022
12023 2014-08-29 Gary Benson <gbenson@redhat.com>
12024
12025 * server.h (setjmp.h): Do not include.
12026 (toplevel): Do not declare.
12027 (common-exceptions.h): Include.
12028 (cleanups.h): Likewise.
12029 * server.c (toplevel): Do not define.
12030 (exit_code): New static global.
12031 (detach_or_kill_for_exit_cleanup): New function.
12032 (main): New function. Original main renamed to...
12033 (captured_main): New function.
12034 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12035
12036 2014-08-29 Gary Benson <gbenson@redhat.com>
12037
12038 * Makefile.in (SFILES): Add common/common-exceptions.c.
12039 (OBS): Add common-exceptions.o.
12040 (common-exceptions.o): New rule.
12041 * utils.c (prepare_to_throw_exception): New function.
12042
12043 2014-08-29 Gary Benson <gbenson@redhat.com>
12044
12045 * config.in: Regenerate.
12046 * configure: Likewise.
12047
12048 2014-08-29 Gary Benson <gbenson@redhat.com>
12049
12050 * Makefile.in (SFILES): Add common/cleanups.c.
12051 (OBS): cleanups.o.
12052 (cleanups.o): New rule.
12053
12054 2014-08-29 Gary Benson <gbenson@redhat.com>
12055
12056 * utils.c (internal_vwarning): New function.
12057
12058 2014-08-28 Gary Benson <gbenson@redhat.com>
12059
12060 * utils.h (fatal): Remove declaration.
12061 * utils.c (fatal): Remove function.
12062
12063 2014-08-28 Gary Benson <gbenson@redhat.com>
12064
12065 * tracepoint.c (gdb_agent_init): Replace fatal with
12066 perror_with_name.
12067 (initialize_tracepoint): Likewise.
12068
12069 2014-08-28 Gary Benson <gbenson@redhat.com>
12070
12071 * remote-utils.c (remote_prepare): Replace fatal with error.
12072
12073 2014-08-28 Gary Benson <gbenson@redhat.com>
12074
12075 * linux-low.c (linux_async): Replace fatal with warning.
12076 Tidy up and return.
12077 (linux_start_non_stop): Return -1 if linux_async failed.
12078
12079 2014-08-28 Gary Benson <gbenson@redhat.com>
12080
12081 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12082 gdb_assert.
12083 (i386_dr_low_get_addr): Remove vague comment.
12084 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12085 gdb_assert.
12086
12087 2014-08-28 Gary Benson <gbenson@redhat.com>
12088
12089 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12090 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12091 internal_error.
12092 (linux_resume_one_lwp): Likewise.
12093 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12094 gdb_assert.
12095 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12096 with internal_error.
12097 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12098 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12099 (find_register_by_name): Replace fatal with internal_error.
12100 (find_regno): Likewise.
12101 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12102 * thread-db.c (thread_db_create_event): Likewise.
12103 (thread_db_load_search): Likewise.
12104 (try_thread_db_load_1): Likewise.
12105 * tracepoint.c (get_jump_space_head): Replace fatal with
12106 internal_error.
12107 (claim_trampoline_space): Likewise.
12108 (have_fast_tracepoint_trampoline_buffer): Likewise.
12109 (cmd_qtstart): Likewise.
12110 (stop_tracing): Likewise.
12111 (fast_tracepoint_collecting): Likewise.
12112 (target_malloc): Likewise.
12113 (download_tracepoint): Likewise.
12114 (download_trace_state_variables): Replace check with gdb_assert.
12115 (upload_fast_traceframes): Replace fatal with internal_error.
12116
12117 2014-08-19 Tom Tromey <tromey@redhat.com>
12118 Gary Benson <gbenson@redhat.com>
12119
12120 * Makefile.in (SFILES): Add common/common-debug.c.
12121 (OBS): Add common-debug.o.
12122 (common-debug.o): New rule.
12123 * debug.h (debug_printf): Don't declare.
12124 * debug.c (debug_printf): Renamed and rewritten as...
12125 (debug_vprintf): New function.
12126
12127 2014-08-19 Gary Benson <gbenson@redhat.com>
12128
12129 * utils.h: Do not include print-utils.h.
12130
12131 2014-08-19 Tom Tromey <tromey@redhat.com>
12132 Gary Benson <gbenson@redhat.com>
12133
12134 * server.h: Add static assertion.
12135 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12136
12137 2014-08-19 Tom Tromey <tromey@redhat.com>
12138 Gary Benson <gbenson@redhat.com>
12139
12140 * Makefile.in (SFILES): Add common/errors.c.
12141 (OBS): Add errors.o.
12142 (IPA_OBS): Add errors-ipa.o.
12143 (errors.o): New rule.
12144 (errors-ipa.o): Likewise.
12145 * utils.h (perror_with_name, error, warning): Don't declare.
12146 * utils.c (warning): Renamed and rewritten as...
12147 (vwarning): New function.
12148 (error): Renamed and rewritten as...
12149 (verror): New function.
12150 (internal_error): Renamed and rewritten as...
12151 (internal_verror): New function.
12152
12153 2014-08-07 Gary Benson <gbenson@redhat.com>
12154
12155 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12156 * configure: Regenerate.
12157 * config.in: Likewise.
12158 * server.h: Do not include errno.h.
12159 * event-loop.c: Likewise.
12160 * hostio-errno.c: Likewise.
12161 * linux-low.c: Likewise.
12162 * remote-utils.c: Likewise.
12163 * spu-low.c: Likewise.
12164 * utils.c: Likewise.
12165 * gdbreplay.c: Unconditionally include errno.h.
12166
12167 2014-08-07 Gary Benson <gbenson@redhat.com>
12168
12169 * server.h: Do not include string.h.
12170 * event-loop.c: Likewise.
12171 * linux-low.c: Likewise.
12172 * regcache.c: Likewise.
12173 * remote-utils.c: Likewise.
12174 * spu-low.c: Likewise.
12175 * utils.c: Likewise.
12176
12177 2014-08-07 Gary Benson <gbenson@redhat.com>
12178
12179 * server.h: Do not include gdb_assert.h.
12180
12181 2014-08-07 Gary Benson <gbenson@redhat.com>
12182
12183 * server.h: Do not include common-utils.h.
12184
12185 2014-08-07 Gary Benson <gbenson@redhat.com>
12186
12187 * server.h: Do not include ptid.h.
12188 * notif.h: Likewise.
12189
12190 2014-08-07 Gary Benson <gbenson@redhat.com>
12191
12192 * server.h: Do not include gdb_locale.h.
12193
12194 2014-08-07 Gary Benson <gbenson@redhat.com>
12195
12196 * server.h: Do not include gdb/signals.h.
12197 * win32-low.c: Likewise.
12198
12199 2014-08-07 Gary Benson <gbenson@redhat.com>
12200
12201 * server.h: Do not include pathmax.h.
12202
12203 2014-08-07 Gary Benson <gbenson@redhat.com>
12204
12205 * server.h: Do not include libiberty.h.
12206 * linux-bfin-low.c: Likewise.
12207
12208 2014-08-07 Gary Benson <gbenson@redhat.com>
12209
12210 * server.h: Do not include ansidecl.h.
12211
12212 2014-08-07 Gary Benson <gbenson@redhat.com>
12213
12214 * linux-x86-low.c: Do not include stddef.h.
12215 * lynx-ppc-low.c: Likewise.
12216 * tracepoint.c: Likewise.
12217
12218 2014-08-07 Gary Benson <gbenson@redhat.com>
12219
12220 * server.h: Do not include stdarg.h.
12221 * nto-low.c: Likewise.
12222
12223 2014-08-07 Gary Benson <gbenson@redhat.com>
12224
12225 * server.h: Do not include stdlib.h.
12226 * inferiors.c: Likewise.
12227 * linux-low.c: Likewise.
12228 * regcache.c: Likewise.
12229 * spu-low.c: Likewise.
12230 * tracepoint.c: Likewise.
12231 * utils.c: Likewise.
12232
12233 2014-08-07 Gary Benson <gbenson@redhat.com>
12234
12235 * server.h: Do not include stdio.h.
12236 * linux-low.c: Likewise.
12237 * remote-utils.c: Likewise.
12238 * spu-low.c: Likewise.
12239 * utils.c: Likewise.
12240 * wincecompat.c: Likewise.
12241
12242 2014-08-06 Gary Benson <gbenson@redhat.com>
12243
12244 * regcache.c (init_register_cache): Move conditionals inside if.
12245
12246 2014-08-06 Gary Benson <gbenson@redhat.com>
12247
12248 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12249
12250 2014-07-31 Gary Benson <gbenson@redhat.com>
12251
12252 * ax.h: Do not include server.h.
12253 * gdbthread.h: Likewise.
12254 * lynx-low.h: Likewise.
12255 * notif.h: Likewise.
12256
12257 2014-07-30 Gary Benson <gbenson@redhat.com>
12258
12259 * server.h: Include common-defs.h.
12260 Do not include config.h or build-gnulib-gdbserver/config.h.
12261
12262 2014-07-30 Gary Benson <gbenson@redhat.com>
12263
12264 * hostio-errno.c: Move server.h to top of includes list.
12265 * inferiors.c: Likewise.
12266 * linux-x86-low.c: Likewise.
12267 * notif.c: Include server.h.
12268
12269 2014-07-24 Tom Tromey <tromey@redhat.com>
12270 Gary Benson <gbenson@redhat.com>
12271
12272 * server.h (CORE_ADDR): Now unsigned.
12273
12274 2014-07-16 Pedro Alves <palves@redhat.com>
12275
12276 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12277
12278 2014-07-15 Pedro Alves <palves@redhat.com>
12279
12280 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12281 copy.
12282
12283 2014-07-11 Pedro Alves <palves@redhat.com>
12284
12285 * linux-low.c (kill_wait_lwp): New function, based on
12286 kill_one_lwp_callback, but use my_waitpid directly.
12287 (kill_one_lwp_callback, linux_kill): Use it.
12288
12289 2014-06-23 Pedro Alves <palves@redhat.com>
12290
12291 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12292 before setting DR0..DR3.
12293
12294 2014-06-20 Gary Benson <gbenson@redhat.com>
12295
12296 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12297 * configure: Regenerated.
12298 * config.in: Likewise.
12299
12300 2014-06-20 Gary Benson <gbenson@redhat.com>
12301
12302 * Makefile.in (SFILES): Update locations for files moved
12303 from common to nat.
12304 (object file files): Reordered.
12305
12306 2014-06-20 Gary Benson <gbenson@redhat.com>
12307
12308 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12309 (i386_dr_low_set_addr): Likewise.
12310 (i386_dr_low_get_addr): Likewise.
12311 (i386_dr_low_can_set_control): Likewise.
12312 (i386_dr_low_set_control): Likewise.
12313 (i386_dr_low_get_control): Likewise.
12314 (i386_dr_low_get_status): Likewise.
12315 (i386_get_debug_register_length): Likewise.
12316 * linux-x86-low.c (i386_dr_low_set_addr):
12317 Changed signature. Made static.
12318 (i386_dr_low_get_addr): Likewise.
12319 (i386_dr_low_set_control): Likewise.
12320 (i386_dr_low_get_control): Likewise.
12321 (i386_dr_low_get_status): Likewise.
12322 (i386_dr_low): New global variable.
12323 * win32-i386-low.c (i386_dr_low_set_addr):
12324 Changed signature. Made static.
12325 (i386_dr_low_get_addr): Likewise.
12326 (i386_dr_low_set_control): Likewise.
12327 (i386_dr_low_get_control): Likewise.
12328 (i386_dr_low_get_status): Likewise.
12329 (i386_dr_low): New global variable.
12330
12331 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12332
12333 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12334 * Makefile.in (AR, AR_FLAGS): Define.
12335 * configure: Regenerate.
12336
12337 2014-06-19 Gary Benson <gbenson@redhat.com>
12338
12339 * Makefile.in (i386-dregs.o): New rule.
12340 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12341 * i386-low.c (target.h): Remove include.
12342 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12343 (DR_CONTROL_SHIFT): Likewise.
12344 (DR_CONTROL_SIZE): Likewise.
12345 (DR_RW_EXECUTE): Likewise.
12346 (DR_RW_WRITE): Likewise.
12347 (DR_RW_READ): Likewise.
12348 (DR_RW_IORW): Likewise.
12349 (DR_LEN_1): Likewise.
12350 (DR_LEN_2): Likewise.
12351 (DR_LEN_4): Likewise.
12352 (DR_LEN_8): Likewise.
12353 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12354 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12355 (DR_ENABLE_SIZE): Likewise.
12356 (DR_LOCAL_SLOWDOWN): Likewise.
12357 (DR_GLOBAL_SLOWDOWN): Likewise.
12358 (DR_CONTROL_RESERVED): Likewise.
12359 (I386_DR_CONTROL_MASK): Likewise.
12360 (I386_DR_VACANT): Likewise.
12361 (I386_DR_LOCAL_ENABLE): Likewise.
12362 (I386_DR_GLOBAL_ENABLE): Likewise.
12363 (I386_DR_DISABLE): Likewise.
12364 (I386_DR_SET_RW_LEN): Likewise.
12365 (I386_DR_GET_RW_LEN): Likewise.
12366 (I386_DR_WATCH_HIT): Likewise.
12367 (i386_wp_op_t): Likewise.
12368 (i386_show_dr): Likewise.
12369 (i386_length_and_rw_bits): Likewise.
12370 (i386_insert_aligned_watchpoint): Likewise.
12371 (i386_remove_aligned_watchpoint): Likewise.
12372 (i386_handle_nonaligned_watchpoint): Likewise.
12373 i386_update_inferior_debug_regs(): Likewise.
12374 (i386_dr_insert_watchpoint): Likewise.
12375 (i386_dr_remove_watchpoint): Likewise.
12376 (i386_dr_region_ok_for_watchpoint): Likewise.
12377 (i386_dr_stopped_data_address): Likewise.
12378 (i386_dr_stopped_by_watchpoint): Likewise.
12379
12380 2014-06-19 Gary Benson <gbenson@redhat.com>
12381
12382 * i386-low.c (i386_dr_show): Renamed to
12383 i386_show_dr and made static. All uses updated.
12384 (i386_dr_length_and_rw_bits): Renamed to
12385 i386_length_and_rw_bits and made static.
12386 All uses updated.
12387 (i386_dr_insert_aligned_watchpoint): Renamed to
12388 i386_insert_aligned_watchpoint and made static.
12389 All uses updated.
12390 (i386_dr_remove_aligned_watchpoint): Renamed to
12391 i386_remove_aligned_watchpoint and made static.
12392 All uses updated.
12393 (i386_dr_update_inferior_debug_regs): Renamed to
12394 i386_update_inferior_debug_regs and made static.
12395 All uses updated.
12396
12397 2014-06-18 Gary Benson <gbenson@redhat.com>
12398
12399 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12400 (i386_dr_low_can_set_control): Likewise.
12401 (i386_get_debug_register_length): Likewise.
12402 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12403 (i386_dr_low_can_set_control): Likewise.
12404 (i386_get_debug_register_length): Likewise.
12405
12406 2014-06-17 Gary Benson <gbenson@redhat.com>
12407
12408 * i386-low.h (i386-dregs.h): New include.
12409 (DR_FIRSTADDR): Now in i386-dregs.h.
12410 (DR_LASTADDR): Likewise.
12411 (DR_NADDR): Likewise.
12412 (DR_STATUS): Likewise.
12413 (DR_CONTROL): Likewise.
12414 (i386_debug_reg_state): Likewise.
12415 (i386_dr_insert_watchpoint): Likewise.
12416 (i386_dr_remove_watchpoint): Likewise.
12417 (i386_dr_region_ok_for_watchpoint): Likewise.
12418 (i386_dr_stopped_data_address): Likewise.
12419 (i386_dr_stopped_by_watchpoint): Likewise.
12420 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12421
12422 2014-06-18 Gary Benson <gbenson@redhat.com>
12423
12424 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12425 i386_dr_insert_watchpoint.
12426 (i386_low_remove_watchpoint): Renamed to
12427 i386_dr_remove_watchpoint.
12428 (i386_low_region_ok_for_watchpoint): Renamed to
12429 i386_dr_region_ok_for_watchpoint.
12430 (i386_low_stopped_data_address): Renamed to
12431 i386_dr_stopped_data_address.
12432 (i386_low_stopped_by_watchpoint): Renamed to
12433 i386_dr_stopped_by_watchpoint.
12434 * i386-low.c (i386_show_dr): Renamed to
12435 i386_dr_show and made nonstatic. All uses updated.
12436 (i386_length_and_rw_bits): Renamed to
12437 i386_dr_length_and_rw_bits and made nonstatic.
12438 All uses updated.
12439 (i386_insert_aligned_watchpoint): Renamed to
12440 i386_dr_insert_aligned_watchpoint and made nonstatic.
12441 All uses updated.
12442 (i386_remove_aligned_watchpoint): Renamed to
12443 i386_dr_remove_aligned_watchpoint and made nonstatic.
12444 All uses updated.
12445 (i386_update_inferior_debug_regs): Renamed to
12446 i386_dr_update_inferior_debug_regs and made nonstatic.
12447 All uses updated.
12448 (i386_low_insert_watchpoint): Renamed to
12449 i386_dr_insert_watchpoint. All uses updated.
12450 (i386_low_remove_watchpoint): Renamed to
12451 i386_dr_remove_watchpoint. All uses updated.
12452 (i386_low_region_ok_for_watchpoint): Renamed to
12453 i386_dr_region_ok_for_watchpoint. All uses updated.
12454 (i386_low_stopped_data_address): Renamed to
12455 i386_dr_stopped_data_address. All uses updated.
12456 (i386_low_stopped_by_watchpoint): Renamed to
12457 i386_dr_stopped_by_watchpoint. All uses updated.
12458
12459 2014-06-18 Gary Benson <gbenson@redhat.com>
12460
12461 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12462 (i386_dr_low_can_set_control): Likewise.
12463 (i386_insert_aligned_watchpoint): New check.
12464
12465 2014-06-18 Gary Benson <gbenson@redhat.com>
12466
12467 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12468 Renamed to state.
12469
12470 2014-06-18 Gary Benson <gbenson@redhat.com>
12471
12472 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12473 instead of fatal and error.
12474 (i386_handle_nonaligned_watchpoint): Likewise.
12475
12476 2014-06-18 Gary Benson <gbenson@redhat.com>
12477
12478 * i386-low.c (i386_get_debug_register_length): New macro.
12479 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12480 (i386_show_dr): Use debug_printf instead of fprintf. Use
12481 phex to format values.
12482
12483 2014-06-18 Gary Benson <gbenson@redhat.com>
12484
12485 * i386-low.h: Comment changes.
12486 * i386-low.c: Likewise.
12487
12488 2014-06-18 Gary Benson <gbenson@redhat.com>
12489
12490 * i386-low.c: Whitespace changes.
12491
12492 2014-06-12 Tom Tromey <tromey@redhat.com>
12493
12494 * utils.c (freeargv): Remove.
12495
12496 2014-06-12 Tom Tromey <tromey@redhat.com>
12497
12498 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12499 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12500 (parse_debug_format_options): Likewise.
12501 (gdbserver_usage): Likewise.
12502 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12503 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12504 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12505 against libiberty.
12506 ($(LIBGNU)): Depend on libiberty.
12507 (all-lib): Recurse into all subdirs.
12508 (install-only): Invoke "install" target in subdirs.
12509 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12510 targets.
12511 * configure: Rebuild.
12512 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12513 for vasprintf, vsnprintf, or gettimeofday.
12514 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12515 srv_tgtobj.
12516
12517 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12518
12519 * development.sh: Delete.
12520 * Makefile.in (config.status): Adjust dependency on development.sh.
12521 * configure.ac: Adjust development.sh source call.
12522 * configure: Regenerate.
12523
12524 2014-06-02 Pedro Alves <palves@redhat.com>
12525
12526 * ax.c (gdb_free_agent_expr): New function.
12527 * ax.h (gdb_free_agent_expr): New declaration.
12528 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12529 list.
12530 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12531 static.
12532 (clear_breakpoint_conditions_and_commands): New function.
12533 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12534 (clear_breakpoint_conditions_and_commands): New declaration.
12535
12536 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12537
12538 * linux-aarch64-low.c (asm/ptrace.h): Include.
12539
12540 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12541
12542 Fix TLS access for -static -pthread.
12543 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12544 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12545 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12546
12547 2014-05-20 Pedro Alves <palves@redhat.com>
12548
12549 * linux-aarch64-low.c (aarch64_insert_point)
12550 (aarch64_remove_point): No longer check whether the type is
12551 supported here. Adjust to new interface.
12552 (the_low_target): Install aarch64_supports_z_point_type as
12553 supports_z_point_type method.
12554 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12555 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12556 instead of a Z packet char. Adjust.
12557 (arm_supports_z_point_type): New function.
12558 (arm_insert_point, arm_remove_point): Adjust to new interface.
12559 (the_low_target): Install arm_supports_z_point_type.
12560 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12561 (cris_insert_point, cris_remove_point): Adjust to new interface.
12562 Don't check whether the type is supported here.
12563 (the_low_target): Install cris_supports_z_point_type.
12564 * linux-low.c (linux_supports_z_point_type): New function.
12565 (linux_insert_point, linux_remove_point): Adjust to new interface.
12566 * linux-low.h (struct linux_target_ops) <insert_point,
12567 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12568 raw_breakpoint pointer parameter.
12569 <supports_z_point_type>: New method.
12570 * linux-mips-low.c (mips_supports_z_point_type): New function.
12571 (mips_insert_point, mips_remove_point): Adjust to new interface.
12572 Use mips_supports_z_point_type.
12573 (the_low_target): Install mips_supports_z_point_type.
12574 * linux-ppc-low.c (the_low_target): Install NULL as
12575 supports_z_point_type method.
12576 * linux-s390-low.c (the_low_target): Install NULL as
12577 supports_z_point_type method.
12578 * linux-sparc-low.c (the_low_target): Install NULL as
12579 supports_z_point_type method.
12580 * linux-x86-low.c (x86_supports_z_point_type): New function.
12581 (x86_insert_point): Adjust to new insert_point interface. Use
12582 insert_memory_breakpoint. Adjust to new
12583 i386_low_insert_watchpoint interface.
12584 (x86_remove_point): Adjust to remove_point interface. Use
12585 remove_memory_breakpoint. Adjust to new
12586 i386_low_remove_watchpoint interface.
12587 (the_low_target): Install x86_supports_z_point_type.
12588 * lynx-low.c (lynx_target_ops): Install NULL as
12589 supports_z_point_type callback.
12590 * nto-low.c (nto_supports_z_point_type): New.
12591 (nto_insert_point, nto_remove_point): Adjust to new interface.
12592 (nto_target_ops): Install nto_supports_z_point_type.
12593 * mem-break.c: Adjust intro comment.
12594 (struct raw_breakpoint) <raw_type, size>: New fields.
12595 <inserted>: Update comment.
12596 <shlib_disabled>: Delete field.
12597 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12598 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12599 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12600 (raw_bkpt_type_to_target_hw_bp_type): New function.
12601 (find_enabled_raw_code_breakpoint_at): New function.
12602 (find_raw_breakpoint_at): New type and size parameters. Use them.
12603 (insert_memory_breakpoint): New function, based off
12604 set_raw_breakpoint_at.
12605 (remove_memory_breakpoint): New function.
12606 (set_raw_breakpoint_at): Reimplement.
12607 (set_breakpoint): New, based on set_breakpoint_at.
12608 (set_breakpoint_at): Reimplement.
12609 (delete_raw_breakpoint): Go through the_target->remove_point
12610 instead of assuming memory breakpoints.
12611 (find_gdb_breakpoint_at): Delete.
12612 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12613 (find_gdb_breakpoint): New function.
12614 (set_gdb_breakpoint_at): Delete.
12615 (z_type_supported): New function.
12616 (set_gdb_breakpoint_1): New function, loosely based off
12617 set_gdb_breakpoint_at.
12618 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12619 (delete_gdb_breakpoint_at): Delete.
12620 (delete_gdb_breakpoint_1): New function, loosely based off
12621 delete_gdb_breakpoint_at.
12622 (delete_gdb_breakpoint): New function.
12623 (clear_gdb_breakpoint_conditions): Rename to ...
12624 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12625 breakpoint.
12626 (add_condition_to_breakpoint): Make static.
12627 (add_breakpoint_condition): Take a struct breakpoint pointer
12628 instead of an address. Adjust.
12629 (gdb_condition_true_at_breakpoint): Rename to ...
12630 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12631 z_type parameter.
12632 (gdb_condition_true_at_breakpoint): Reimplement.
12633 (add_breakpoint_commands): Take a struct breakpoint pointer
12634 instead of an address. Adjust.
12635 (gdb_no_commands_at_breakpoint): Rename to ...
12636 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12637 parameter. Return true if no breakpoint was found. Change debug
12638 output.
12639 (gdb_no_commands_at_breakpoint): Reimplement.
12640 (run_breakpoint_commands): Rename to ...
12641 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12642 and change return type to boolean.
12643 (run_breakpoint_commands): New function.
12644 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12645 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12646 breakpoint. Go through the_target->remove_point instead of
12647 assuming memory breakpoint.
12648 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12649 software and hardware breakpoints.
12650 (reinsert_raw_breakpoint): Go through the_target->insert_point
12651 instead of assuming memory breakpoint.
12652 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12653 software and hardware breakpoints.
12654 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12655 Check both software and hardware breakpoints.
12656 (validate_inserted_breakpoint): Assert the breakpoint is a
12657 software breakpoint. Set the inserted flag to -1 instead of
12658 setting shlib_disabled.
12659 (delete_disabled_breakpoints): Adjust.
12660 (validate_breakpoints): Only validate software breakpoints.
12661 Adjust to inserted flag change.
12662 (check_mem_read, check_mem_write): Skip breakpoint types other
12663 than software breakpoints. Adjust to inserted flag change.
12664 * mem-break.h (enum raw_bkpt_type): New enum.
12665 (raw_breakpoint, struct process_info): Forward declare.
12666 (Z_packet_to_target_hw_bp_type): Delete declaration.
12667 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12668 (set_gdb_breakpoint, delete_gdb_breakpoint)
12669 (clear_breakpoint_conditions): New declarations.
12670 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12671 (breakpoint_inserted_here): Update comment.
12672 (add_breakpoint_condition, add_breakpoint_commands): Replace
12673 address parameter with a breakpoint pointer parameter.
12674 (gdb_breakpoint_here): Update comment.
12675 (delete_gdb_breakpoint_at): Delete.
12676 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12677 * server.c (process_point_options): Take a struct breakpoint
12678 pointer instead of an address. Adjust.
12679 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12680 delete_gdb_breakpoint.
12681 * spu-low.c (spu_target_ops): Install NULL as
12682 supports_z_point_type method.
12683 * target.h: Include mem-break.h.
12684 (struct target_ops) <prepare_to_access_memory>: Update comment.
12685 <supports_z_point_type>: New field.
12686 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12687 instead of a char. Also take a raw breakpoint pointer.
12688 * win32-arm-low.c (the_low_target): Install NULL as
12689 supports_z_point_type.
12690 * win32-i386-low.c (i386_supports_z_point_type): New function.
12691 (i386_insert_point, i386_remove_point): Adjust to new interface.
12692 (the_low_target): Install i386_supports_z_point_type.
12693 * win32-low.c (win32_supports_z_point_type): New function.
12694 (win32_insert_point, win32_remove_point): Adjust to new interface.
12695 (win32_target_ops): Install win32_supports_z_point_type.
12696 * win32-low.h (struct win32_target_ops):
12697 <supports_z_point_type>: New method.
12698 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12699 instead of a char. Also take a raw breakpoint pointer.
12700
12701 2014-05-20 Pedro Alves <palves@redhat.com>
12702
12703 * mem-break.h: Include break-common.h.
12704 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12705 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12706 (Z_packet_to_target_hw_bp_type): New declaration.
12707 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12708 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12709 (Z_PACKET_ACCESS_WP): Delete macros.
12710 (Z_packet_to_hw_type): Delete function.
12711 * i386-low.h: Don't include break-common.h here.
12712 (Z_packet_to_hw_type): Delete declaration.
12713 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12714 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12715 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12716 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12717 * linux-aarch64-low.c: Don't include break-common.h here.
12718 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12719 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12720 (Z_packet_to_target_hw_bp_type): Delete function.
12721 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12722 function.
12723 (mips_insert_point, mips_remove_point): Use
12724 Z_packet_to_target_hw_bp_type.
12725
12726 2014-05-20 Pedro Alves <palves@redhat.com>
12727
12728 * linux-aarch64-low.c: Include break-common.h.
12729 (enum target_point_type): Delete.
12730 (Z_packet_to_point_type): Rename to ...
12731 (Z_packet_to_target_hw_bp_type): ... this, and return a
12732 target_hw_bp_type instead.
12733 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12734 instead of an enum target_point_type.
12735 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12736 breakpoint type.
12737 (aarch64_dr_state_insert_one_point)
12738 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12739 (aarch64_handle_aligned_watchpoint)
12740 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12741 Take an enum target_hw_bp_type instead of an enum
12742 target_point_type.
12743 (aarch64_supports_z_point_type): New function.
12744 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12745 use Z_packet_to_target_hw_bp_type.
12746
12747 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12748
12749 * configure.ac: Only use -Werror by default when DEVELOPMENT
12750 is true.
12751 * configure: Regenerate.
12752
12753 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12754
12755 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12756 * linux-x86-low.c (X86_64_USER_REGS): New.
12757 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12758
12759 2014-04-28 Yao Qi <yao@codesourcery.com>
12760
12761 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12762 name.
12763
12764 2014-04-25 Pedro Alves <palves@redhat.com>
12765
12766 PR server/16255
12767 * linux-low.c (linux_attach_fail_reason_string): New function.
12768 (linux_attach_lwp): Delete.
12769 (linux_attach_lwp_1): Rename to ...
12770 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12771 argument. Remove "initial" parameter. Return int instead of
12772 void. Don't error or warn here.
12773 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12774 failure to attach to the tgid. Call warning when failing to
12775 attach to an lwp.
12776 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12777 argument. Remove "initial" parameter. Return int instead of
12778 void. Don't error or warn here.
12779 (linux_attach_fail_reason_string): New declaration.
12780 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12781 interface change. Use linux_attach_fail_reason_string.
12782
12783 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12784 Walfred Tedeschi <walfred.tedeschi@intel.com>
12785
12786 * Makefile.in: Added rules to handle new files
12787 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12788 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12789 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12790 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12791 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12792 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12793 x32-avx512-linux.o.
12794 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12795 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12796 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12797 i386/x32-avx512.xml.
12798 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12799 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12800 i386/x32-avx512-linux.xml.
12801 * i387-fp.c (num_avx512_k_registers): New constant for number
12802 of K registers.
12803 (num_avx512_zmmh_low_registers): New constant for number of
12804 lower ZMM registers (0-15).
12805 (num_avx512_zmmh_high_registers): New constant for number of
12806 higher ZMM registers (16-31).
12807 (num_avx512_ymmh_registers): New contant for number of higher
12808 YMM registers (ymm16-31 added by avx521 on x86_64).
12809 (num_avx512_xmm_registers): New constant for number of higher
12810 XMM registers (xmm16-31 added by AVX512 on x86_64).
12811 (struct i387_xsave): Add space for AVX512 registers.
12812 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12813 Add code to handle AVX512 registers.
12814 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12815 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12816 prototypei from generated file.
12817 (tdesc_amd64_avx512_linux): Likewise.
12818 (init_registers_x32_avx512_linux): Likewise.
12819 (tdesc_x32_avx512_linux): Likewise.
12820 (init_registers_i386_avx512_linux): Likewise.
12821 (tdesc_i386_avx512_linux): Likewise.
12822 (x86_64_regmap): Add AVX512 registers.
12823 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12824 mask.
12825 (initialize_low_arch): Add code to initialize AVX512 registers.
12826
12827 2014-04-23 Pedro Alves <palves@redhat.com>
12828
12829 * mem-break.c (find_gdb_breakpoint_at): Make static.
12830 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12831
12832 2014-04-23 Pedro Alves <palves@redhat.com>
12833
12834 * i386-low.c: Don't include break-common.h here.
12835 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12836 prototype to take target_hw_bp_type as argument instead of a Z
12837 packet char.
12838 * i386-low.h: Include break-common.h here.
12839 (Z_packet_to_hw_type): Declare.
12840 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12841 prototypes.
12842 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12843 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12844 (x86_remove_point): Convert the packet number to a
12845 target_hw_bp_type before calling i386_low_remove_watchpoint.
12846 * win32-i386-low.c (i386_insert_point): Convert the packet number
12847 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12848 (i386_remove_point): Convert the packet number to a
12849 target_hw_bp_type before calling i386_low_remove_watchpoint.
12850
12851 2014-04-23 Pedro Alves <palves@redhat.com>
12852
12853 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12854
12855 2014-04-10 Pedro Alves <palves@redhat.com>
12856
12857 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12858 Check if the condition or command is NULL before checking if the
12859 breakpoint is known. On success, return true.
12860 * mem-break.h (add_breakpoint_condition): Document return.
12861 (add_breakpoint_commands): Add describing comment.
12862 * server.c (skip_to_semicolon): New function.
12863 (process_point_options): Use it.
12864
12865 2014-04-09 Pedro Alves <palves@redhat.com>
12866
12867 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12868 to lwpid_of.
12869
12870 2014-02-27 Pedro Alves <palves@redhat.com>
12871
12872 PR 12702
12873 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12874 macros.
12875 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12876 output.
12877 (last_thread_of_process_p): Take a PID argument instead of a
12878 thread pointer.
12879 (linux_wait_for_lwp): Delete.
12880 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12881 functions.
12882 (linux_low_filter_event): New function, party factored out from
12883 linux_wait_for_event.
12884 (linux_wait_for_event): Rename to ...
12885 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12886 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12887 sigsuspend. Check for zombie leaders.
12888 (linux_wait_for_event): Reimplement as wrapper around
12889 linux_wait_for_event_filtered.
12890 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12891 a normal or signal exit is seen, it's the whole process exiting.
12892 (wait_for_sigstop): No longer a for_each_inferior callback.
12893 Rewrite on top of linux_wait_for_event_filtered.
12894 (stop_all_lwps): Call wait_for_sigstop directly.
12895 * server.c (resume, handle_target_event): Handle
12896 TARGET_WAITKIND_NO_RESUMED.
12897
12898 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12899
12900 * win32-low.c (psapi_get_dll_name,
12901 * win32_CreateToolhelp32Snapshot): Delete.
12902 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12903 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12904 Delete.
12905 (handle_load_dll): Add function description.
12906 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12907
12908 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12909
12910 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12911 Add comment.
12912 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12913 base address when calling win32_add_one_solib.
12914 (handle_load_dll): Delete local variable load_addr.
12915 Remove 0x1000 offset applied to DLL base address when calling
12916 win32_add_one_solib.
12917 (handle_unload_dll): Add comment.
12918
12919 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12920
12921 * win32-low.c (win32_add_all_dlls): Renames
12922 win32_ensure_ntdll_loaded. Rewrite function documentation.
12923 Adjust implementation to always load all DLLs.
12924 Add 0x1000 offset to DLL base address when calling
12925 win32_add_one_solib.
12926 (child_initialization_done): New static global.
12927 (do_initial_child_stuff): Set child_initialization_done to
12928 zero during child initialization, and 1 after. Replace call
12929 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12930 Add comment.
12931 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12932 (handle_unload_dll): Add function documentation.
12933 (get_child_debug_event): Ignore load and unload DLL events
12934 during child initialization.
12935
12936 2014-02-20 Doug Evans <dje@google.com>
12937
12938 Remove global all_lwps.
12939 * inferiors.h (ptid_of): Move here from linux-low.h.
12940 (pid_of, lwpid_of): Ditto.
12941 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12942 parameter is a struct thread_info * now.
12943 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12944 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12945 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12946 directly.
12947 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12948 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12949 * linux-arm-low.c (update_registers_callback): Update, "entry"
12950 parameter is a struct thread_info * now.
12951 Fetch lwpid from current_inferior directly.
12952 (arm_insert_point): Pass &all_threads to find_inferior instead of
12953 &all_lwps.
12954 (arm_remove_point): Ditto.
12955 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12956 (arm_prepare_to_resume): Fetch pid from thread.
12957 (arm_read_description): Fetch lwpid from current_inferior directly.
12958 * linux-low.c (all_lwps): Delete.
12959 (delete_lwp): Delete call to remove_inferior.
12960 (handle_extended_wait): Fetch lwpid from thread.
12961 (add_lwp): Don't set lwp->entry.id. Remove call to
12962 add_inferior_to_list.
12963 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12964 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12965 (kill_one_lwp_callback): Ditto.
12966 (linux_kill): Don't dereference NULL pointer.
12967 Fetch ptid,lwpid from thread.
12968 (get_detach_signal): Fetch ptid from thread.
12969 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12970 Simplify call to regcache_invalidate_thread.
12971 (delete_lwp_callback): Update, "entry" parameter is a
12972 struct thread_info * now. Fetch pid from thread.
12973 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12974 (status_pending_p_callback): Update, "entry" parameter is a
12975 struct thread_info * now. Fetch ptid from thread.
12976 (find_lwp_pid): Update, "entry" parameter is a
12977 struct thread_info * now.
12978 (linux_wait_for_lwp): Fetch pid from thread.
12979 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12980 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12981 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12982 (dequeue_one_deferred_signal): Ditto.
12983 (cancel_breakpoint): Fetch ptid from current_inferior.
12984 (linux_wait_for_event): Pass &all_threads to find_inferior,
12985 not &all_lwps. Fetch ptid, lwpid from thread.
12986 (count_events_callback): Update, "entry" parameter is a
12987 struct thread_info * now.
12988 (select_singlestep_lwp_callback): Ditto.
12989 (select_event_lwp_callback): Ditto.
12990 (cancel_breakpoints_callback): Ditto.
12991 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12992 not &all_lwps.
12993 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12994 (unsuspend_one_lwp): Update, "entry" parameter is a
12995 struct thread_info * now.
12996 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12997 not &all_lwps.
12998 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12999 Fetch lwpid from thread, not lwp.
13000 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13001 Pass &all_threads to find_inferior, not &all_lwps.
13002 (send_sigstop): Fetch lwpid from thread, not lwp.
13003 (send_sigstop_callback): Update, "entry" parameter is a
13004 struct thread_info * now.
13005 (suspend_and_send_sigstop_callback): Ditto.
13006 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13007 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13008 struct thread_info * now.
13009 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13010 from thread, lwp.
13011 (lwp_running): Update, "entry" parameter is a
13012 struct thread_info * now.
13013 (stop_all_lwps): Fetch ptid from thread.
13014 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13015 (linux_resume_one_lwp): Fetch lwpid from thread.
13016 (linux_set_resume_request): Update, "entry" parameter is a
13017 struct thread_info * now. Fetch pid, lwpid from thread.
13018 (resume_status_pending_p): Update, "entry" parameter is a
13019 struct thread_info * now.
13020 (need_step_over_p): Ditto. Fetch lwpid from thread.
13021 (start_step_over): Fetch lwpid from thread.
13022 (linux_resume_one_thread): Update, "entry" parameter is a
13023 struct thread_info * now. Fetch lwpid from thread.
13024 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13025 (proceed_one_lwp): Update, "entry" parameter is a
13026 struct thread_info * now. Fetch lwpid from thread.
13027 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13028 struct thread_info * now.
13029 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13030 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13031 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13032 directly.
13033 (regsets_store_inferior_registers): Ditto.
13034 (fetch_register, store_register): Ditto.
13035 (linux_read_memory, linux_write_memory): Ditto.
13036 (linux_request_interrupt): Ditto.
13037 (linux_read_auxv): Ditto.
13038 (linux_xfer_siginfo): Ditto.
13039 (linux_qxfer_spu): Ditto.
13040 (linux_qxfer_libraries_svr4): Ditto.
13041 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13042 moved to inferiors.h.
13043 (get_lwp): Delete.
13044 (get_thread_lwp): Update.
13045 (struct lwp_info): Delete member "entry". Simplify comment for
13046 member "thread".
13047 (all_lwps): Delete.
13048 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13049 current_inferior directly.
13050 (update_watch_registers_callback): Update, "entry" parameter is a
13051 struct thread_info * now. Fetch pid from thread.
13052 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13053 (mips_insert_point): Fetch lwpid from current_inferior.
13054 Pass &all_threads to find_inferior, not &all_lwps.
13055 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13056 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13057 directly.
13058 (mips_stopped_data_address): Ditto.
13059 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13060 directly.
13061 * linux-tile-low.c (tile_arch_setup): Ditto.
13062 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13063 (update_debug_registers_callback): Update, "entry" parameter is a
13064 struct thread_info * now. Fetch pid from thread.
13065 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13066 Pass &all_threads to find_inferior, not &all_lwps.
13067 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13068 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13069 Pass &all_threads to find_inferior, not &all_lwps.
13070 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13071 (i386_dr_low_get_status): Ditto.
13072 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13073 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13074 (x86_linux_read_description): Ditto.
13075 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13076
13077 2014-02-20 Doug Evans <dje@google.com>
13078
13079 * inferiors.c (get_first_inferior): Fix buglet.
13080
13081 2014-02-19 Doug Evans <dje@google.com>
13082
13083 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13084 * inferiors.c (add_thread): Change result type to struct thread_info *.
13085 All callers updated.
13086 (add_lwp): Call add_thread here instead of in callers.
13087 All callers updated.
13088 * linux-low.h (get_lwp_thread): Rewrite.
13089 (struct lwp_info): New member "thread".
13090
13091 2014-02-19 Doug Evans <dje@google.com>
13092
13093 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13094 All callers updated.
13095
13096 2014-02-19 Doug Evans <dje@google.com>
13097
13098 * inferiors.c (add_thread): Fix whitespace.
13099
13100 2014-02-19 Doug Evans <dje@google.com>
13101
13102 * dll.c (clear_dlls): Replace accessing list implemention details
13103 with API function.
13104 * gdbthread.h (get_first_thread): Declare.
13105 * inferiors.c (for_each_inferior_with_data): New function.
13106 (get_first_thread): New function.
13107 (find_thread_ptid): Simplify.
13108 (get_first_inferior): New function.
13109 (clear_list): Delete.
13110 (one_inferior_p): New function.
13111 (clear_inferior_list): New function.
13112 (clear_inferiors): Update.
13113 * inferiors.h (for_each_inferior_with_data): Declare.
13114 (clear_inferior_list): Declare.
13115 (one_inferior_p): Declare.
13116 (get_first_inferior): Declare.
13117 * linux-low.c (linux_wait_for_event): Replace accessing list
13118 implemention details with API function.
13119 * server.c (target_running): Ditto.
13120 (accumulate_file_name_length): New function.
13121 (emit_dll_description): New function.
13122 (handle_qxfer_libraries): Replace accessing list implemention
13123 details with API function.
13124 (handle_qxfer_threads_worker): New function.
13125 (handle_qxfer_threads_proper): Replace accessing list implemention
13126 details with API function.
13127 (handle_query): Ditto.
13128 (visit_actioned_threads_callback_ftype): New typedef.
13129 (visit_actioned_threads_data): New struct.
13130 (visit_actioned_threads): Rewrite to be find_inferior callback.
13131 (resume): Call find_inferior.
13132 (handle_status): Replace accessing list implemention
13133 details with API function.
13134 (process_serial_event): Replace accessing list implemention details
13135 with API function.
13136 * target.c (set_desired_inferior): Replace accessing list implemention
13137 details with API function.
13138 * tracepoint.c (same_process_p): New function.
13139 (gdb_agent_about_to_close): Replace accessing list implemention
13140 details with API function.
13141 * win32-low.c (child_delete_thread): Replace accessing list
13142 implemention details with API function.
13143 (match_dll_by_basename): New function.
13144 (dll_is_loaded_by_basename): New function.
13145 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13146 details call to dll_is_loaded_by_basename.
13147
13148 2014-02-19 Doug Evans <dje@google.com>
13149
13150 * dll.h (struct dll_info): Add comment.
13151 * gdbthread.h (struct thread_info): Add comment.
13152 (current_ptid): Simplify.
13153 * inferiors.c (add_process): Update.
13154 (remove_process): Update.
13155 * inferiors.h (struct process_info): Rename member "head" to "entry".
13156 * linux-low.c (delete_lwp): Update.
13157 (add_lwp): Update.
13158 (last_thread_of_process_p): Update.
13159 (kill_one_lwp_callback, linux_kill): Update.
13160 (status_pending_p_callback): Update.
13161 (wait_for_sigstop): Update. Simplify read of ptid.
13162 (start_step_over): Update.
13163 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13164 (get_lwp_thread): Update.
13165 (struct lwp_info): Rename member "head" to "entry".
13166 * regcache.h (inferior_list_entry): Delete.
13167 * server.c (kill_inferior_callback): Update.
13168 (detach_or_kill_inferior_callback): Update.
13169 (print_started_pid): Update.
13170 (print_attached_pid): Update.
13171 (process_serial_event): Simplify read of ptid.
13172 * thread-db.c (thread_db_create_event): Update.
13173 (thread_db_get_tls_address): Update.
13174 * win32-low.c (current_inferior_ptid): Simplify.
13175
13176 2014-02-19 Tom Tromey <tromey@redhat.com>
13177
13178 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13179 argument.
13180 (target_supports_btrace): Update.
13181
13182 2014-02-14 Yao Qi <yao@codesourcery.com>
13183
13184 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13185 (rsp-low-ipa.o): New target.
13186
13187 2014-02-12 Tom Tromey <tromey@redhat.com>
13188
13189 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13190 convert_ascii_to_int.
13191 * regcache.c (registers_to_string): Likewise.
13192 * remote-utils.c (decode_M_packet): Likewise.
13193 * server.c (process_serial_event): Likewise.
13194
13195 2014-02-12 Tom Tromey <tromey@redhat.com>
13196
13197 * server.c (handle_query, handle_v_run): Use hex2bin, not
13198 unhexify.
13199 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13200
13201 2014-02-12 Tom Tromey <tromey@redhat.com>
13202
13203 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13204 convert_int_to_ascii.
13205 * regcache.c (registers_to_string, collect_register_as_string):
13206 Likewise.
13207 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13208 Likewise.
13209 * server.c (process_serial_event): Likewise.
13210 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13211 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13212
13213 2014-02-12 Tom Tromey <tromey@redhat.com>
13214
13215 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13216 bin2hex, not hexify.
13217 * tracepoint.c (cmd_qtstatus): Likewise.
13218
13219 2014-02-12 Tom Tromey <tromey@redhat.com>
13220
13221 * remote-utils.c (monitor_output): Pass explicit length to
13222 hexify.
13223
13224 2014-02-12 Tom Tromey <tromey@redhat.com>
13225
13226 * tracepoint.c: Include rsp-low.h.
13227 * server.c: Include rsp-low.h.
13228 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13229 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13230 declare.
13231 * remote-utils.c: Include rsp-low.h.
13232 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13233 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13234 (convert_int_to_ascii, convert_ascii_to_int): Move to
13235 common/rsp-low.c.
13236 * regcache.c: Include rsp-low.h.
13237 * ax.c: Include rsp-low.h.
13238 * Makefile.in (SFILES): Add common/rsp-low.c.
13239 (OBS): Add rsp-low.o.
13240 (rsp-low.o): New target.
13241
13242 2014-02-12 Tom Tromey <tromey@redhat.com>
13243
13244 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13245 Include print-utils.h.
13246 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13247 (plongest, thirty_two, phex_nz): Remove.
13248 * Makefile.in (SFILES): Add common/print-utils.c.
13249 (OBS): Add print-utils.o.
13250 (print-utils-ipa.o): New target.
13251 (print-utils.o): New target.
13252 (IPA_OBJS): Add print-utils-ipa.o.
13253
13254 2014-02-06 Tom Tromey <tromey@redhat.com>
13255
13256 * Makefile.in (SFILES): Fix indentation.
13257
13258 2014-02-05 Doug Evans <dje@google.com>
13259
13260 * linux-low.c (linux_wait_for_event): Improve comment.
13261 (linux_wait_1): Keep current_inferior in sync with event_child.
13262
13263 2014-01-22 Doug Evans <dje@google.com>
13264
13265 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13266
13267 2014-01-22 Doug Evans <dje@google.com>
13268
13269 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13270 * configure: Regenerate.
13271 * config.in: Regenerate.
13272 * Makefile.in (SFILES): Add debug.c.
13273 (OBS): Add debug.o.
13274 * debug.c: New file.
13275 * debug.h: New file.
13276 * linux-aarch64-low.c (*): Update all debugging printfs to use
13277 debug_printf instead of fprintf.
13278 * linux-arm-low.c (*): Ditto.
13279 * linux-cris-low.c (*): Ditto.
13280 * linux-crisv32-low.c (*): Ditto.
13281 * linux-m32r-low.c (*): Ditto.
13282 * linux-sparc-low.c (*): Ditto.
13283 * linux-x86.c (*): Ditto.
13284 * linux-low.c (*): Ditto.
13285 (linux_wait_1): Add calls to debug_enter, debug_exit.
13286 (linux_wait): Remove redundant debugging printf.
13287 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13288 (linux_resume, unstop_all_lwps): Ditto.
13289 * mem-break.c (*): Update all debugging printfs to use
13290 debug_printf instead of fprintf.
13291 * remote-utils.c (*): Ditto.
13292 * thread-db.c (*): Ditto.
13293 * server.c #include <ctype.h>, "gdb_vecs.h".
13294 (debug_threads): Moved to debug.c.
13295 (*): Update all debugging printfs to use debug_printf instead of
13296 fprintf.
13297 (start_inferior): Replace call to fflush with call to debug_flush.
13298 (monitor_show_help): Mention set debug-format.
13299 (parse_debug_format_options): New function.
13300 (handle_monitor_command): Handle "monitor set debug-format".
13301 (gdbserver_usage): Mention --debug-format.
13302 (main): Parse --debug-format.
13303 * server.h (debug_threads): Declaration moved to debug.h.
13304 #include "debug.h".
13305 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13306 trace_debug_1 that uses debug_printf.
13307 (tracepoint_look_up_symbols): Update all debugging printfs to use
13308 debug_printf instead of fprintf.
13309
13310 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13311
13312 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13313 sys/ptrace.h.
13314
13315 2014-01-17 Pedro Alves <palves@redhat.com>
13316
13317 PR build/16445
13318 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13319 defined after including gdb_proc_service.h.
13320
13321 2014-01-16 Doug Evans <dje@google.com>
13322
13323 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13324 (match_dll): Use it.
13325
13326 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13327
13328 * target.h (target_ops) <read_btrace>: Change parameters and
13329 return type to allow error reporting.
13330 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13331 trace reading errors on.
13332 * linux-low.c (linux_low_read_btrace): Pass trace reading
13333 errors on.
13334 (linux_low_disable_btrace): New.
13335
13336 2014-01-15 Doug Evans <dje@google.com>
13337
13338 * inferiors.c (thread_id_to_gdb_id): Delete.
13339 * inferiors.h (thread_id_to_gdb_id): Delete.
13340
13341 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13342
13343 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13344 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13345 versions.
13346
13347 2014-01-08 Pedro Alves <palves@redhat.com>
13348
13349 * server.c (handle_status): Don't discard previous queued stop
13350 replies or thread's pending status here.
13351 (main) <disconnection>: Do it here instead.
13352
13353 2014-01-08 Pedro Alves <palves@redhat.com>
13354
13355 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13356 * server.c (visit_actioned_threads, handle_pending_status): New
13357 function.
13358 (handle_v_cont): Factor out parts to ...
13359 (resume): ... this new function. If in all-stop, and a thread
13360 being resumed has a pending status, report it without actually
13361 resuming.
13362 (myresume): Adjust to use the new 'resume' function.
13363 (clear_pending_status_callback, set_pending_status_callback)
13364 (find_status_pending_thread_callback): New functions.
13365 (handle_status): Handle the case of multiple threads having
13366 interesting statuses to report. Report threads' real last signal
13367 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13368 with an interesting thread to report the status for, instead of
13369 always reporting the status of the first thread.
13370
13371 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13372
13373 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13374 * gdbreplay.c (gdbreplay_version): Likewise.
13375
13376 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13377
13378 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13379 iov.iov_len with the real length in use.
13380
13381 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13382
13383 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13384 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13385 for all targets that use win32-low.c.
13386 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13387 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13388
13389 2013-12-13 Pedro Alves <palves@redhat.com>
13390
13391 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13392 if equal to TARGET_WAITKIND_LOADED.
13393 * win32-low.c (cached_status): New static global.
13394 (win32_wait): Add declaration.
13395 (do_initial_child_stuff): Flush all initial pending debug events
13396 up to the initial breakpoint.
13397 (win32_wait): If CACHED_STATUS was set, return that instead
13398 of doing a real wait. Remove the code resuming the execution
13399 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13400 during the initial phase. Also remove the code changing
13401 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13402 TARGET_WAITKIND_STOPPED.
13403
13404 2013-12-11 Yao Qi <yao@codesourcery.com>
13405
13406 * notif.c (handle_notif_ack): Return 0 if no notification
13407 matches.
13408
13409 2013-11-20 Doug Evans <dje@google.com>
13410
13411 * linux-low.c (linux_set_resume_request): Fix comment.
13412
13413 2013-11-20 Doug Evans <dje@google.com>
13414
13415 * linux-low.c (resume_status_pending_p): Tweak comment.
13416
13417 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13418
13419 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13420 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13421 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13422 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13423 (srv_amd64_regobj): Add amd64-mpx.o.
13424 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13425 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13426 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13427 * i387-fp.c (num_pl_bnd_register) Added constant.
13428 (num_pl_bnd_cfg_registers) Added constant.
13429 (struct i387_xsave) Added reserved area and MPX fields.
13430 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13431 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13432 function.
13433 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13434 (init_registers_amd64_mpx_linux): Declare new function.
13435 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13436 (x86_64_regmap): Add MPX registers.
13437 (x86_linux_read_description): Add MPX case.
13438 (initialize_low_arch): Initialize MPX targets.
13439
13440 2013-11-18 Tom Tromey <tromey@redhat.com>
13441
13442 * configure: Rebuild.
13443 * configure.ac: Don't check for stdlib.h.
13444 * gdbreplay.c: Unconditionally include stdlib.h.
13445
13446 2013-11-18 Tom Tromey <tromey@redhat.com>
13447
13448 * config.in: Rebuild.
13449 * configure: Rebuild.
13450 * configure.ac: Don't use AC_HEADER_DIRENT.
13451
13452 2013-11-18 Tom Tromey <tromey@redhat.com>
13453
13454 * server.h: Don't check HAVE_STRING_H.
13455 * gdbreplay.c: Don't check HAVE_STRING_H.
13456 * configure: Rebuild.
13457
13458 2013-11-18 Tom Tromey <tromey@redhat.com>
13459
13460 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13461 LIBGNU.
13462
13463 2013-11-08 Tom Tromey <tromey@redhat.com>
13464
13465 * configure, config.in: Rebuild.
13466 * configure.ac: Remove unused configury.
13467
13468 2013-11-08 Tom Tromey <tromey@redhat.com>
13469
13470 * acinclude.m4: Include common.m4, codeset.m4.
13471 * configure, config.in: Rebuild.
13472 * configure.ac: Use GDB_AC_COMMON.
13473
13474 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13475
13476 * linux-s390-low.c (HWCAP_S390_TE): New define.
13477 (s390_arch_setup): Consider the TE field in the HWCAP for
13478 determining 'have_regset_tdb'.
13479
13480 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13481
13482 PR gdb/16014
13483 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13484 call to sizeof.
13485
13486 2013-10-02 Pedro Alves <palves@redhat.com>
13487
13488 * server.c (process_serial_event): Don't output "GDBserver
13489 exiting" if GDB is connected through stdio.
13490 * target.c (mywait): Likewise, be silent if GDB is connected
13491 through stdio.
13492
13493 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13494
13495 * lynx-low.c (lynx_add_threads_after_attach): New function.
13496 (lynx_attach): Remove call to add_thread. Add call to
13497 lynx_add_threads_after_attach instead.
13498
13499 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13500
13501 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13502 * config.in, configure: Regenerated.
13503
13504 2013-09-18 Yao Qi <yao@codesourcery.com>
13505
13506 PR server/15959
13507 * server.c (start_inferior): Clear 'resume_info'.
13508
13509 2013-09-16 Jiong Wang <jiwang@tilera.com>
13510
13511 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13512 for each register.
13513
13514 2013-09-16 Jiong Wang <jiwang@tilera.com>
13515
13516 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13517 linux-tile-low.o to srv_tgtobj.
13518
13519 2013-09-16 Will Newton <will.newton@linaro.org>
13520
13521 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13522 out regs.
13523
13524 2013-09-06 Pedro Alves <palves@redhat.com>
13525
13526 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13527 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13528 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13529 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13530 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13531 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13532
13533 2013-09-06 Pedro Alves <palves@redhat.com>
13534
13535 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13536 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13537
13538 2013-09-06 Pedro Alves <palves@redhat.com>
13539
13540 * linux-amd64-ipa.c: Include tracepoint.h.
13541 * linux-i386-ipa.c: Include tracepoint.h.
13542
13543 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13544
13545 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13546 (ps_get_thread_area): New function.
13547
13548 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13549
13550 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13551 (initialize_low_arch): Call init_registers_crisv32 rather than
13552 init_register_crisv32.
13553
13554 2013-09-05 Pedro Alves <palves@redhat.com>
13555
13556 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13557 to ...
13558 * hostio.h: ... this new file.
13559 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13560 win32-low.c: Include hostio.h.
13561
13562 2013-09-05 Pedro Alves <palves@redhat.com>
13563
13564 * server.h (gdb_client_data, handler_func, callback_handler_func)
13565 (delete_file_handler, add_file_handler, append_callback_event)
13566 (delete_callback_event, start_event_loop, initialize_event_loop):
13567 Move to event-loop.h and include it.
13568 * event-loop.h: New file.
13569
13570 2013-09-05 Pedro Alves <palves@redhat.com>
13571
13572 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13573 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13574 (loaded_dll, unloaded_dll): Move to ...
13575 * dll.h: ... this new file.
13576 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13577
13578 2013-09-05 Pedro Alves <palves@redhat.com>
13579
13580 * server.h (current_process, get_thread_process, all_processes)
13581 (add_inferior_to_list, for_each_inferior, current_inferior)
13582 (remove_inferior, add_process, remove_process, find_process_pid)
13583 (have_started_inferiors_p, have_attached_inferiors_p)
13584 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13585 (clear_inferiors, find_inferior, find_inferior_id)
13586 (inferior_target_data, set_inferior_target_data)
13587 (inferior_regcache_data, set_inferior_regcache_data): Move to
13588 inferiors.h, and include it.
13589 * inferiors.h: New file.
13590
13591 2013-09-05 Pedro Alves <palves@redhat.com>
13592
13593 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13594 Move ...
13595 * ax.h: ... here.
13596
13597 2013-09-05 Pedro Alves <palves@redhat.com>
13598
13599 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13600 tracepoint.h.
13601 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13602 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13603 (handle_tracepoint_general_set, handle_tracepoint_query)
13604 (tracepoint_finished_step, tracepoint_was_hit)
13605 (release_while_stepping_state_list, current_traceframe)
13606 (in_readonly_region, traceframe_read_mem)
13607 (fetch_traceframe_registers, traceframe_read_sdata)
13608 (traceframe_read_info, struct fast_tpoint_collect_status)
13609 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13610 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13611 (supply_fast_tracepoint_registers)
13612 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13613 (ipa_tdesc, claim_trampoline_space)
13614 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13615 (agent_mem_read, agent_get_trace_state_variable_value)
13616 (agent_set_trace_state_variable_value, agent_tsv_read)
13617 (agent_mem_read_string, get_raw_reg_func_addr)
13618 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13619 * tracepoint.h: ... this new file.
13620
13621 2013-09-05 Pedro Alves <palves@redhat.com>
13622
13623 * server.h (perror_with_name, error, fatal, warning, paddress)
13624 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13625 include it.
13626 * utils.h: New file.
13627
13628 2013-09-05 Pedro Alves <palves@redhat.com>
13629
13630 * server.h (remote_debug, noack_mode, transport_is_reliable)
13631 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13632 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13633 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13634 (write_enn, initialize_async_io, enable_async_io)
13635 (disable_async_io, check_remote_input_interrupt_request)
13636 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13637 (dead_thread_notify, prepare_resume_reply)
13638 (decode_address_to_semicolon, decode_address, decode_m_packet)
13639 (decode_M_packet, decode_X_packet, decode_xfer_write)
13640 (decode_search_memory_packet, unhexify, hexify)
13641 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13642 (look_up_one_symbol, relocate_instruction)
13643 (monitor_output): Move to remote-utils.h, and include it.
13644 * remote-utils.h: New file.
13645
13646 2013-09-05 Pedro Alves <palves@redhat.com>
13647
13648 * server.h (_): Delete.
13649
13650 2013-09-02 Pedro Alves <palves@redhat.com>
13651
13652 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13653 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13654 allocated.
13655 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13656
13657 2013-09-02 Pierre Muller <muller@sourceware.org>
13658
13659 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13660 or WriteProcessMemory complete successfully and handle
13661 ERROR_PARTIAL_COPY error.
13662
13663 2013-09-02 Pedro Alves <palves@redhat.com>
13664
13665 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13666 error instead of EIO.
13667
13668 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13669
13670 PR server/15604
13671 * linux-low.c: Include filestuff.h.
13672 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13673 * lynx-low.c: Include filestuff.h.
13674 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13675 * server.c: Include filestuff.h.
13676 (main): Call notice_open_fds.
13677 * spu-low.c: Include filestuff.h.
13678 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13679
13680 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13681
13682 * Makefile.in: Explain why ../target and ../nat are not
13683 listed as include file search paths.
13684 (linux-waitpid.o): New object file rule.
13685 * configure.srv (srv_native_linux_obj): New variable.
13686 Replace all occurrences of linux native object files with
13687 $srv_native_linux_obj.
13688 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13689 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13690 (linux_enable_event_reporting): Remove declaration.
13691 (my_waitpid): Moved to common/linux-waitpid.c.
13692 (linux_wait_for_event): Pass ptid when calling
13693 linux_enable_event_reporting.
13694 (linux_supports_tracefork_flag): Remove.
13695 (linux_enable_event_reporting): Likewise.
13696 (linux_tracefork_grandchild): Remove.
13697 (STACK_SIZE): Moved to common/linux-ptrace.c.
13698 (linux_tracefork_child): Remove.
13699 (linux_test_for_tracefork): Remove.
13700 (linux_look_up_symbols): Call linux_supports_traceclone.
13701 (initialize_low): Remove call to linux_test_for_tracefork.
13702 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13703 common/linux-ptrace.h.
13704 (PTRACE_TYPE_ARG4): Likewise.
13705 Include linux-ptrace.h.
13706
13707 2013-08-21 Pedro Alves <palves@redhat.com>
13708
13709 * config.in: Renegerate.
13710
13711 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13712
13713 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13714 (SFILES): Remove $(srcdir)/common/target-common.c and
13715 add $(srcdir)/target/waitstatus.c.
13716 (OBS): Remove target-common.o and add waitstatus.o.
13717 (server_h): Remove $(srcdir)/../common/target-common.h and
13718 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13719 and $(srcdir)/../target/waitstatus.h.
13720 (target-common.o): Remove.
13721 (waitstatus.o): New target object file.
13722 * target.h: Do not include target-common.h and
13723 include target/resume.h, target/wait.h and
13724 target/waitstatus.h.
13725
13726 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13727
13728 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13729 to PTRACE_TYPE_ARG3.
13730 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13731 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13732 PTRACE_TYPE_ARG4.
13733 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13734 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13735
13736 2013-07-27 Jie Zhang <jie@codesourcery.com>
13737 Daniel Jacobowitz <dan@codesourcery.com>
13738 Yao Qi <yao@codesourcery.com>
13739
13740 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13741 (mips-linux-watch.o): New rule.
13742 (mips_linux_watch_h): New variable.
13743 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13744 srv_tgtobj.
13745 * linux-mips-low.c: Include mips-linux-watch.h.
13746 (struct arch_process_info, struct arch_lwp_info): New.
13747 (update_watch_registers_callback): New function.
13748 (mips_linux_new_process, mips_linux_new_thread) New functions.
13749 (mips_linux_prepare_to_resume, mips_insert_point): New
13750 functions.
13751 (mips_remove_point, mips_stopped_by_watchpoint): New
13752 functions.
13753 (rsp_bp_type_to_target_hw_bp_type): New function.
13754 (mips_stopped_data_address): New function.
13755 (the_low_target): Add watchpoint support functions.
13756
13757 2013-07-27 Yao Qi <yao@codesourcery.com>
13758
13759 * i386-low.c: Include break-common.h.
13760 (enum target_hw_bp_type): Remove.
13761
13762 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13763
13764 * Makefile.in (SFILES): /common/target-common.c.
13765 (OBS): Add target-common.o.
13766 (server_h): Add $(srcdir)/../common/target-common.h.
13767 (target-common.o): New target.
13768 * server.c (queue_stop_reply_callback): Free
13769 status string after use.
13770 * target.c (target_waitstatus_to_string): Remove.
13771 * target.h: Include target-common.h.
13772 (resume_kind): Likewise.
13773 (target_waitkind): Likewise.
13774 (target_waitstatus): Likewise.
13775 (TARGET_WNOHANG): Likewise.
13776
13777 2013-07-04 Yao Qi <yao@codesourcery.com>
13778
13779 * Makefile.in (host_alias): Use @host_noncanonical@.
13780 (target_alias): Use @target_noncanonical@.
13781 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13782 ACX_NONCANONICAL_HOST.
13783 * configure: Regenerated.
13784
13785 Revert:
13786 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13787
13788 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13789 * configure: Rebuild.
13790 * Makefile.in (version_host, version_target): Get from configure.
13791 (version.c): Use $(version_host) and $(version_target).
13792
13793 2013-07-03 Pedro Alves <palves@redhat.com>
13794
13795 * Makefile.in (config.status): Depend on development.sh.
13796 * acinclude.m4: Include libmcheck.m4.
13797 * configure: Regenerate.
13798
13799 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13800
13801 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13802 attribute inside the parentheses.
13803 (winapi_DebugSetProcessKillOnExit): Ditto.
13804 (winapi_DebugBreakProcess): Ditto.
13805 (winapi_GenerateConsoleCtrlEvent): Ditto.
13806
13807 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13808
13809 * notif.h (notif_event): Add a dummy member to avoid compiler
13810 errors.
13811
13812 2013-07-01 Pedro Alves <palves@redhat.com>
13813
13814 * hostio.c (HOSTIO_PATH_MAX): Define.
13815 (require_filename, handle_open, handle_unlink, handle_readlink):
13816 Use it.
13817
13818 2013-07-01 Pedro Alves <palves@redhat.com>
13819
13820 * server.h: Include "pathmax.h".
13821 * linux-low.c: Don't include sys/param.h.
13822 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13823 MAXPATHLEN.
13824 * win32-low.c: Don't include sys/param.h.
13825 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13826
13827 2013-07-01 Pedro Alves <palves@redhat.com>
13828
13829 * event-loop.c: Don't check HAVE_UNISTD_H before including
13830 <unistd.h>.
13831 * gdbreplay.c: Likewise.
13832 * remote-utils.c: Likewise.
13833 * server.c: Likewise.
13834 * configure.ac: Don't check for unistd.h.
13835 * configure: Regenerate.
13836
13837 2013-06-28 Tom Tromey <tromey@redhat.com>
13838
13839 * Makefile.in (version.c): Use version.in, not
13840 common/version.in.
13841
13842 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13843
13844 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13845 * configure: Rebuild.
13846 * Makefile.in (version_host, version_target): Get from configure.
13847 (version.c): Use $(version_host) and $(version_target).
13848
13849 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13850
13851 Fix trace-status to output user name without trailing colon.
13852 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13853
13854 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13855
13856 Fix trace-status to output proper start-time and stop-time.
13857 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13858 output start time and stop time in hex as gdb expects.
13859
13860 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13861
13862 * tracepoint.c (build_traceframe_info_xml): Output trace state
13863 variables present in the trace buffer.
13864
13865 2013-06-24 Tom Tromey <tromey@redhat.com>
13866
13867 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13868 create-version.sh.
13869 (version.o): Remove.
13870 * gdbreplay.c: Include version.h.
13871 (version, host_name): Don't declare.
13872 * server.h: Include version.h.
13873 (version, host_name): Don't declare.
13874
13875 2013-06-12 Pedro Alves <palves@redhat.com>
13876
13877 * linux-x86-low.c (linux_is_elf64): Delete global.
13878 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13879 with local linux_pid_exe_is_elf_64_file use.
13880
13881 2013-06-11 Pedro Alves <palves@redhat.com>
13882
13883 * linux-low.c (regset_disabled, disable_regset): New functions.
13884 (regsets_fetch_inferior_registers)
13885 (regsets_store_inferior_registers): Use them.
13886 (initialize_regsets_info); Don't allocate the disabled_regsets
13887 array here.
13888 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13889 comment.
13890
13891 2013-06-11 Pedro Alves <palves@redhat.com>
13892
13893 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13894 xmalloc.
13895
13896 2013-06-11 Pedro Alves <palves@redhat.com>
13897
13898 * linux-x86-low.c (initialize_low_arch): Call
13899 init_registers_x32_avx_linux.
13900
13901 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13902
13903 Fix compatibility with Android Bionic.
13904 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13905 it is not empty.
13906
13907 2013-06-07 Pedro Alves <palves@redhat.com>
13908
13909 PR server/14823
13910 * Makefile.in (OBS): Add tdesc.o.
13911 (IPA_OBJS): Add tdesc-ipa.o.
13912 (tdesc-ipa.o): New rule.
13913 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13914 interface.
13915 * linux-low.c (new_inferior): Delete.
13916 (disabled_regsets, num_regsets): Delete.
13917 (linux_add_process): Adjust to set the new per-process
13918 new_inferior flag.
13919 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13920 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13921 was a stop. When calling arch_setup, switch the current inferior
13922 to the thread that got an event.
13923 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13924 (regsets_fetch_inferior_registers)
13925 (regsets_store_inferior_registers): New regsets_info parameter.
13926 Adjust to use it.
13927 (linux_register_in_regsets): New regs_info parameter. Adjust to
13928 use it.
13929 (register_addr, fetch_register, store_register): New usrregs_info
13930 parameter. Adjust to use it.
13931 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13932 parameter regs_info. Adjust to use it.
13933 (linux_fetch_registers): Get the current inferior's regs_info, and
13934 adjust to use it.
13935 (linux_store_registers): Ditto.
13936 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13937 (initialize_low): Don't initialize the target_regsets here. Call
13938 initialize_low_arch.
13939 * linux-low.h (target_regsets): Delete declaration.
13940 (struct regsets_info): New.
13941 (struct usrregs_info): New.
13942 (struct regs_info): New.
13943 (struct process_info_private) <new_inferior>: New field.
13944 (struct linux_target_ops): Delete the num_regs, regmap, and
13945 regset_bitmap fields. New field regs_info.
13946 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13947 * i387-fp.c (num_xmm_registers): Delete.
13948 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13949 calls to new interface.
13950 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13951 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13952 Infer the number of xmm registers from the regcache's target
13953 description.
13954 * i387-fp.h (num_xmm_registers): Delete.
13955 * inferiors.c (add_thread): Don't install the thread's regcache
13956 here.
13957 * proc-service.c (gregset_info): Fetch the current inferior's
13958 regs_info. Adjust to use it.
13959 * regcache.c: Include tdesc.h.
13960 (register_bytes, reg_defs, num_registers)
13961 (gdbserver_expedite_regs): Delete.
13962 (get_thread_regcache): If the thread doesn't have a regcache yet,
13963 create one, instead of aborting gdbserver.
13964 (regcache_invalidate_one): Rename to ...
13965 (regcache_invalidate_thread): ... this.
13966 (regcache_invalidate_one): New.
13967 (regcache_invalidate): Only invalidate registers of the current
13968 process.
13969 (init_register_cache): Add target_desc parameter, and use it.
13970 (new_register_cache): Ditto. Assert the target description has a
13971 non zero registers_size.
13972 (regcache_cpy): Add assertions. Adjust.
13973 (realloc_register_cache, set_register_cache): Delete.
13974 (registers_to_string, registers_from_string): Adjust.
13975 (find_register_by_name, find_regno, find_register_by_number)
13976 (register_cache_size): Add target_desc parameter, and use it.
13977 (free_register_cache_thread, free_register_cache_thread_one)
13978 (regcache_release, register_cache_size): New.
13979 (register_size): Add target_desc parameter, and use it.
13980 (register_data, supply_register, supply_register_zeroed)
13981 (supply_regblock, supply_register_by_name, collect_register)
13982 (collect_register_as_string, collect_register_by_name): Adjust.
13983 * regcache.h (struct target_desc): Forward declare.
13984 (struct regcache) <tdesc>: New field.
13985 (init_register_cache, new_register_cache): Add target_desc
13986 parameter.
13987 (regcache_invalidate_thread): Declare.
13988 (regcache_invalidate_one): Delete declaration.
13989 (regcache_release): Declare.
13990 (find_register_by_number, register_cache_size, register_size)
13991 (find_regno): Add target_desc parameter.
13992 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13993 declarations.
13994 * remote-utils.c: Include tdesc.h.
13995 (outreg, prepare_resume_reply): Adjust.
13996 * server.c: Include tdesc.h.
13997 (gdbserver_xmltarget): Delete declaration.
13998 (get_features_xml, process_serial_event): Adjust.
13999 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14000 declare.
14001 (struct process_info) <tdesc>: New field.
14002 (ipa_tdesc): Declare.
14003 * tdesc.c: New file.
14004 * tdesc.h: New file.
14005 * tracepoint.c: Include tdesc.h.
14006 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14007 (get_context_regcache): Adjust to pass ipa_tdesc down.
14008 (do_action_at_tracepoint): Adjust to get the register cache size
14009 from the context regcache's description.
14010 (traceframe_walk_blocks): Adjust to get the register cache size
14011 from the current trace frame's description.
14012 (traceframe_get_pc): Adjust to get current trace frame's
14013 description and pass it down.
14014 (gdb_collect): Adjust to get the register cache size from the
14015 IPA's description.
14016 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14017 (gdbserver_xmltarget): Delete.
14018 (initialize_low_tracepoint): Set the ipa's target description.
14019 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14020 (initialize_low_tracepoint): Set the ipa's target description.
14021 * linux-x86-low.c: Include tdesc.h.
14022 [__x86_64__] (is_64bit_tdesc): New.
14023 (ps_get_thread_area, x86_get_thread_area): Use it.
14024 (i386_cannot_store_register): Rename to ...
14025 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14026 (i386_cannot_fetch_register): Rename to ...
14027 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14028 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14029 to new interface.
14030 (target_regsets): Rename to ...
14031 (x86_regsets): ... this.
14032 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14033 interface.
14034 (x86_siginfo_fixup): Use is_64bit_tdesc.
14035 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14036 (tdesc_x32_avx_linux, tdesc_x32_linux)
14037 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14038 Declare.
14039 (x86_linux_update_xmltarget): Delete.
14040 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14041 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14042 (AMD64_LINUX_USER64_CS): New.
14043 (x86_linux_read_description): New, based on
14044 x86_linux_update_xmltarget.
14045 (same_process_callback): New.
14046 (x86_arch_setup_process_callback): New.
14047 (x86_linux_update_xmltarget): New.
14048 (x86_regsets_info): New.
14049 (amd64_linux_regs_info): New.
14050 (i386_linux_usrregs_info): New.
14051 (i386_linux_regs_info): New.
14052 (x86_linux_regs_info): New.
14053 (x86_arch_setup): Reimplement.
14054 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14055 (x86_emit_ops): Ditto.
14056 (the_low_target): Adjust. Install x86_linux_regs_info,
14057 x86_cannot_fetch_register, and x86_cannot_store_register.
14058 (initialize_low_arch): New.
14059 * linux-ia64-low.c (tdesc_ia64): Declare.
14060 (ia64_fetch_register): Adjust.
14061 (ia64_usrregs_info, regs_info): New globals.
14062 (ia64_regs_info): New function.
14063 (the_low_target): Adjust.
14064 (initialize_low_arch): New function.
14065 * linux-sparc-low.c (tdesc_sparc64): Declare.
14066 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14067 Adjust.
14068 (sparc_arch_setup): New function.
14069 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14070 (the_low_target): Adjust.
14071 (initialize_low_arch): New function.
14072 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14073 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14074 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14075 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14076 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14077 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14078 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14079 (tdesc_powerpc_isa205_vsx64l): Declare.
14080 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14081 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14082 (ppc_set_pc, ppc_get_hwcap): Adjust.
14083 (ppc_usrregs_info): Forward declare.
14084 (!__powerpc64__) ppc_regmap_adjusted: New global.
14085 (ppc_arch_setup): Adjust to the current process'es target
14086 description.
14087 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14088 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14089 (ppc_store_evrregset): Adjust.
14090 (target_regsets): Rename to ...
14091 (ppc_regsets): ... this, and make static.
14092 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14093 (ppc_regs_info): New function.
14094 (the_low_target): Adjust.
14095 (initialize_low_arch): New function.
14096 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14097 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14098 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14099 (tdesc_s390x_linux64v2): Declare.
14100 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14101 (s390_fill_gregset, s390_store_last_break): Adjust.
14102 (target_regsets): Rename to ...
14103 (s390_regsets): ... this, and make static.
14104 (s390_get_pc, s390_set_pc): Adjust.
14105 (s390_get_hwcap): New target_desc parameter, and use it.
14106 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14107 (s390_arch_setup): Adjust to set the current process'es target
14108 description. Don't adjust the regmap.
14109 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14110 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14111 (regs_info_3264): New globals.
14112 (s390_regs_info): New function.
14113 (the_low_target): Adjust.
14114 (initialize_low_arch): New function.
14115 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14116 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14117 [__mips64] (init_registers_mips_linux)
14118 (init_registers_mips_dsp_linux): Delete defines.
14119 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14120 (have_dsp): New global.
14121 (mips_read_description): New, based on mips_arch_setup.
14122 (mips_arch_setup): Reimplement.
14123 (get_usrregs_info): New function.
14124 (mips_cannot_fetch_register, mips_cannot_store_register)
14125 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14126 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14127 (target_regsets): Rename to ...
14128 (mips_regsets): ... this, and make static.
14129 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14130 (dsp_regs_info, regs_info): New globals.
14131 (mips_regs_info): New function.
14132 (the_low_target): Adjust.
14133 (initialize_low_arch): New function.
14134 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14135 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14136 Declare.
14137 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14138 (arm_read_description): New, with bits factored from
14139 arm_arch_setup.
14140 (arm_arch_setup): Reimplement.
14141 (target_regsets): Rename to ...
14142 (arm_regsets): ... this, and make static.
14143 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14144 (arm_regs_info): New function.
14145 (the_low_target): Adjust.
14146 (initialize_low_arch): New function.
14147 * linux-m68k-low.c (tdesc_m68k): Declare.
14148 (target_regsets): Rename to ...
14149 (m68k_regsets): ... this, and make static.
14150 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14151 (m68k_regs_info): New function.
14152 (m68k_arch_setup): New function.
14153 (the_low_target): Adjust.
14154 (initialize_low_arch): New function.
14155 * linux-sh-low.c (tdesc_sharch): Declare.
14156 (target_regsets): Rename to ...
14157 (sh_regsets): ... this, and make static.
14158 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14159 (sh_regs_info, sh_arch_setup): New functions.
14160 (the_low_target): Adjust.
14161 (initialize_low_arch): New function.
14162 * linux-bfin-low.c (tdesc_bfin): Declare.
14163 (bfin_arch_setup): New function.
14164 (bfin_usrregs_info, regs_info): New globals.
14165 (bfin_regs_info): New function.
14166 (the_low_target): Adjust.
14167 (initialize_low_arch): New function.
14168 * linux-cris-low.c (tdesc_cris): Declare.
14169 (cris_arch_setup): New function.
14170 (cris_usrregs_info, regs_info): New globals.
14171 (cris_regs_info): New function.
14172 (the_low_target): Adjust.
14173 (initialize_low_arch): New function.
14174 * linux-cris-low.c (tdesc_crisv32): Declare.
14175 (cris_arch_setup): New function.
14176 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14177 (cris_regs_info): New function.
14178 (the_low_target): Adjust.
14179 (initialize_low_arch): New function.
14180 * linux-m32r-low.c (tdesc_m32r): Declare.
14181 (m32r_arch_setup): New function.
14182 (m32r_usrregs_info, regs_info): New globals.
14183 (m32r_regs_info): Adjust.
14184 (initialize_low_arch): New function.
14185 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14186 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14187 (tic6x_usrregs_info): Forward declare.
14188 (tic6x_read_description): New function, based on ...
14189 (tic6x_arch_setup): ... this. Reimplement.
14190 (target_regsets): Rename to ...
14191 (tic6x_regsets): ... this, and make static.
14192 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14193 (tic6x_regs_info): New function.
14194 (the_low_target): Adjust.
14195 (initialize_low_arch): New function.
14196 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14197 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14198 (target_regsets): Rename to ...
14199 (xtensa_regsets): ... this, and make static.
14200 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14201 globals.
14202 (xtensa_arch_setup, xtensa_regs_info): New functions.
14203 (the_low_target): Adjust.
14204 (initialize_low_arch): New function.
14205 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14206 (nios2_arch_setup): Set the current process'es tdesc.
14207 (target_regsets): Rename to ...
14208 (nios2_regsets): ... this.
14209 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14210 (nios2_regs_info): New function.
14211 (the_low_target): Adjust.
14212 (initialize_low_arch): New function.
14213 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14214 (aarch64_arch_setup): Set the current process'es tdesc.
14215 (target_regsets): Rename to ...
14216 (aarch64_regsets): ... this.
14217 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14218 (aarch64_regs_info): New function.
14219 (the_low_target): Adjust.
14220 (initialize_low_arch): New function.
14221 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14222 globals.
14223 (target_regsets): Rename to ...
14224 (tile_regsets): ... this.
14225 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14226 (tile_regs_info): New function.
14227 (tile_arch_setup): Set the current process'es tdesc.
14228 (the_low_target): Adjust.
14229 (initialize_low_arch): New function.
14230 * spu-low.c (tdesc_spu): Declare.
14231 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14232 * win32-arm-low.c (tdesc_arm): Declare.
14233 (arm_arch_setup): New function.
14234 (the_low_target): Install arm_arch_setup instead of
14235 init_registers_arm.
14236 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14237 (init_windows_x86): Rename to ...
14238 (i386_arch_setup): ... this. Set `win32_tdesc'.
14239 (the_low_target): Adjust.
14240 * win32-low.c (win32_tdesc): New global.
14241 (child_add_thread): Don't create the thread cache here.
14242 (do_initial_child_stuff): Set the new process'es tdesc.
14243 * win32-low.h (struct target_desc): Forward declare.
14244 (win32_tdesc): Declare.
14245 * lynx-i386-low.c (tdesc_i386): Declare global.
14246 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14247 * lynx-low.c (lynx_tdesc): New global.
14248 (lynx_add_process): Set the new process'es tdesc.
14249 * lynx-low.h (struct target_desc): Forward declare.
14250 (lynx_tdesc): Declare global.
14251 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14252 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14253 * nto-low.c (nto_tdesc): New global.
14254 (do_attach): Set the new process'es tdesc.
14255 * nto-low.h (struct target_desc): Forward declare.
14256 (nto_tdesc): Declare.
14257 * nto-x86-low.c (tdesc_i386): Declare.
14258 (nto_x86_arch_setup): Set `nto_tdesc'.
14259
14260 2013-06-04 Gary Benson <gbenson@redhat.com>
14261
14262 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14263 to qSupported response when appropriate.
14264 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14265 with nonzero-length annex.
14266 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14267 arguments supplied in annex.
14268
14269 2013-05-31 Doug Evans <dje@google.com>
14270
14271 PR server/15594
14272 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14273 64 bits in 64-cross-32 environment.
14274
14275 2013-05-28 Pedro Alves <palves@redhat.com>
14276
14277 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14278 (aarch64-without-fpu.c): Delete rule.
14279 * configure.srv (aarch64*-*-linux*): Remove references to
14280 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14281 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14282 declaration.
14283
14284 2013-05-24 Pedro Alves <palves@redhat.com>
14285
14286 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14287 instead of strchr/decode_address. Error if the range isn't split
14288 with a ','. Don't assume there's be a ':' in the action.
14289
14290 2013-05-23 Yao Qi <yao@codesourcery.com>
14291 Pedro Alves <palves@redhat.com>
14292
14293 * linux-low.c (lwp_in_step_range): New function.
14294 (linux_wait_1): If the thread was range stepping and stopped
14295 outside the stepping range, report the stop to GDB. Otherwise,
14296 continue stepping. Add range stepping debug output.
14297 (linux_set_resume_request): Copy the step range from the resume
14298 request to the lwp.
14299 (linux_supports_range_stepping): New.
14300 (linux_target_ops) <supports_range_stepping>: Set to
14301 linux_supports_range_stepping.
14302 * linux-low.h (struct linux_target_ops)
14303 <supports_range_stepping>: New field.
14304 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14305 * linux-x86-low.c (x86_supports_range_stepping): New.
14306 (the_low_target) <supports_range_stepping>: Set to
14307 x86_supports_range_stepping.
14308 * server.c (handle_v_cont): Handle 'r' action.
14309 (handle_v_requests): Append ";r" if the target supports range
14310 stepping.
14311 * target.h (struct thread_resume) <step_range_start,
14312 step_range_end>: New fields.
14313 (struct target_ops) <supports_range_stepping>:
14314 New field.
14315 (target_supports_range_stepping): New macro.
14316
14317 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14318
14319 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14320 confusion in comment.
14321
14322 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14323
14324 * lynx-low.c (struct process_info_private): New type.
14325 (lynx_add_process): New function.
14326 (lynx_create_inferior, lynx_attach): Replace calls to
14327 add_process by calls to lynx_add_process.
14328 (lynx_resume): If PTID is null, then try using
14329 current_process()->private->last_wait_event_ptid.
14330 Add comments.
14331 (lynx_clear_inferiors): Delete. The contents of that function
14332 has been inlined in lynx_mourn;
14333 (lynx_wait_1): Save the ptid in the process's private data.
14334 (lynx_mourn): Free the process' private data. Replace call
14335 to lynx_clear_inferiors by call to clear_inferiors.
14336
14337 2013-05-17 Yao Qi <yao@codesourcery.com>
14338
14339 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14340 the right place.
14341
14342 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14343
14344 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14345 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14346 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14347 PT_TEXT_END_ADDR guards. Update comments.
14348 (linux_target_op) <read_offsets>: Conditionally define to
14349 linux_read_offsets if the target is UCLIBC and if it defines
14350 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14351
14352 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14353 Andrew Jenner <andrew@codesourcery.com>
14354
14355 * Makefile.in (SFILES): Add linux-nios2-low.c.
14356 (clean): Add action to delete nios2-linux.c.
14357 (nios2-linux.c): New rule.
14358 * configure.srv: Add nios2*-*-linux*.
14359 * linux-nios2-low.c: New.
14360
14361 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14362
14363 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14364
14365 2013-04-25 Hui Zhu <hui@codesourcery.com>
14366
14367 PR gdb/15186
14368 * ax.c (ax_printf): Add fflush.
14369
14370 2013-04-22 Tom Tromey <tromey@redhat.com>
14371
14372 * Makefile.in (SFILES): Add filestuff.c.
14373 (OBS): Add filestuff.o.
14374 (filestuff.o): New target.
14375 * config.in, configure: Rebuild.
14376 * configure.ac: Check for fdwalk, pipe2.
14377
14378 2013-04-17 Pedro Alves <palves@redhat.com>
14379
14380 * configure.ac (USE_THREAD_DB): Delete variable.
14381 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14382 Don't AC_SUBST USE_THREAD_DB.
14383 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14384 * config.in, configure: Regenerate.
14385
14386 2013-04-16 Pedro Alves <palves@redhat.com>
14387
14388 * linux-low.h (struct lwp_info) <thread_known>: Move under
14389 the USE_THREAD_DB #ifdef.
14390
14391 2013-04-16 Pedro Alves <palves@redhat.com>
14392
14393 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14394 (linux-low.o): Delete rule.
14395 * linux-low.h: Always include "gdb_thread_db.h" instead of
14396 conditionally including thread_db.h.
14397 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14398 HAVE_THREAD_DB_H.
14399
14400 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14401
14402 * Makefile.in (install-only): Fix make install regression.
14403
14404 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14405
14406 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14407 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14408 installation.
14409 * gdbserver.1: Remove.
14410
14411 2013-03-22 Pedro Alves <palves@redhat.com>
14412
14413 * linux-low.c (handle_extended_wait): Don't call
14414 linux_enable_event_reporting.
14415
14416 2013-03-15 Tony Theodore <tonyt@logyst.com>
14417
14418 PR build/9098:
14419 * Makefile.in (SHELL): Use @SHELL@.
14420
14421 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14422
14423 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14424 compiler warning.
14425
14426 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14427
14428 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14429 Remove extraneous NULL element.
14430
14431 2013-03-13 Yao Qi <yao@codesourcery.com>
14432
14433 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14434 'V' block in trace frame.
14435
14436 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14437
14438 * target.h (struct target_ops): Add btrace ops.
14439 (target_supports_btrace): New macro.
14440 (target_enable_btrace): New macro.
14441 (target_disable_btrace): New macro.
14442 (target_read_btrace): New macro.
14443 * gdbthread.h (struct thread_info): Add btrace field.
14444 * server.c: Include btrace-common.h.
14445 (handle_btrace_general_set): New function.
14446 (handle_btrace_enable): New function.
14447 (handle_btrace_disable): New function.
14448 (handle_general_set): Call handle_btrace_general_set.
14449 (handle_qxfer_btrace): New function.
14450 (struct qxfer qxfer_packets[]): Add btrace entry.
14451 * inferiors.c (remove_thread): Disable btrace.
14452 * linux-low: Include linux-btrace.h.
14453 (linux_low_enable_btrace): New function.
14454 (linux_low_read_btrace): New function.
14455 (linux_target_ops): Add btrace ops.
14456 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14457 Add srv_linux_btrace=yes.
14458 (x86_64-*-linux*): Add linux-btrace.o.
14459 Add srv_linux_btrace=yes.
14460 * configure.ac: Define HAVE_LINUX_BTRACE.
14461 * config.in: Regenerated.
14462 * configure: Regenerated.
14463
14464 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14465
14466 * server.c (handle_qxfer): Preserve error message if -3 is
14467 returned.
14468 (qxfer): Document the -3 return value.
14469
14470 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14471
14472 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14473 (linux_btrace_h): New variable.
14474 (linux-btrace.o): New rule.
14475
14476 2013-03-08 Stan Shebs <stan@codesourcery.com>
14477 Hafiz Abid Qadeer <abidh@codesourcery.com>
14478
14479 * tracepoint.c (trace_buffer_size): New global.
14480 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14481 (init_trace_buffer): Change to one-argument function. Allocate
14482 trace buffer memory.
14483 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14484 handle QTBuffer:size packet.
14485 (cmd_bigqtbuffer_size): New function.
14486 (initialize_tracepoint): Call init_trace_buffer with
14487 DEFAULT_TRACE_BUFFER_SIZE.
14488 * server.c (handle_query): Add QTBuffer:size in the
14489 supported packets.
14490
14491 2013-03-07 Yao Qi <yao@codesourcery.com>
14492
14493 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14494 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14495 of -1.
14496 (cmd_qtsp): Adjust condition. Do post increment.
14497 Set cur_action and cur_step_action back to 0.
14498
14499 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14500
14501 PR server/15236
14502 * linux-low.c (linux_write_memory): Return early success if LEN is
14503 zero.
14504
14505 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14506
14507 * configure.srv: Add x86_64-*-cygwin* as target.
14508
14509 2013-02-28 Tom Tromey <tromey@redhat.com>
14510
14511 * configure.ac: Invoke AC_SYS_LARGEFILE.
14512 * configure, config.in: Rebuild.
14513
14514 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14515
14516 * win32-low.c: Throughout, fix format strings and casts of
14517 printf-like functions to avoid type related warnings on all
14518 platforms.
14519 (get_child_debug_event): Print dwDebugEventCode as hex since
14520 that's how it's usually documented.
14521
14522 2013-02-28 Yao Qi <yao@codesourcery.com>
14523
14524 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14525 pulongest.
14526
14527 2013-02-27 Jiong Wang <jiwang@tilera.com>
14528
14529 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14530 (reg-tilegx32.c): New rule.
14531 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14532 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14533 different register info initializer according to elf class.
14534 (init_registers_tilgx32): New function. The tilegx32 register info
14535 initializer.
14536 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14537 (tile_store_gregset): Likewise.
14538
14539 2013-02-27 Yao Qi <yao@codesourcery.com>
14540
14541 * server.c (process_point_options): Print debug message when
14542 debug_threads is true.
14543
14544 2013-02-26 Yao Qi <yao@codesourcery.com>
14545
14546 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14547
14548 2013-02-19 Pedro Alves <palves@redhat.com>
14549 Kai Tietz <ktietz@redhat.com>
14550
14551 PR gdb/15161
14552
14553 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14554 instead of strtoul to extract address from packet.
14555 (process_serial_event) <'z'>: Likewise.
14556
14557 2013-02-18 Yao Qi <yao@codesourcery.com>
14558
14559 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14560
14561 2013-02-14 Pedro Alves <palves@redhat.com>
14562
14563 Plug memory leak.
14564
14565 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14566 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14567
14568 2013-02-14 Pedro Alves <palves@redhat.com>
14569
14570 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14571
14572 2013-02-14 Pedro Alves <palves@redhat.com>
14573
14574 * tracepoint.c (save_string): Delete.
14575 (add_tracepoint_action): Use savestring instead of save_string.
14576
14577 2013-02-12 Pedro Alves <palves@redhat.com>
14578
14579 * linux-xtensa-low.c: Ditto.
14580 * xtensa-xtregs.c: Ditto.
14581
14582 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14583
14584 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14585 thread_db.
14586
14587 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14588
14589 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14590 aarch64_num_wp_regs and aarch64_num_bp_regs to
14591 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14592
14593 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14594
14595 * linux-aarch64-low.c (ps_get_thread_area): Replace
14596 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14597
14598 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14599 Marcus Shawcroft <marcus.shawcroft@arm.com>
14600 Nigel Stephens <nigel.stephens@arm.com>
14601 Yufeng Zhang <yufeng.zhang@arm.com>
14602
14603 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14604 (aarch64.c, aarch64-without-fpu.c): New targets.
14605 * configure.srv (aarch64*-*-linux*): New.
14606 * linux-aarch64-low.c: New file.
14607
14608 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14609
14610 * linux-low.c (handle_extended_wait, linux_create_inferior)
14611 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14612 (dequeue_one_deferred_signal, linux_resume_one_thread)
14613 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14614 (linux_tracefork_grandchild, linux_test_for_tracefork)
14615 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14616 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14617 where the argument is 0.
14618
14619 2013-01-25 Yao Qi <yao@codesourcery.com>
14620
14621 * event-loop.c: Include "queue.h".
14622 (gdb_event_p): New typedef.
14623 (struct gdb_event) <next_event>: Remove.
14624 (event_queue): Change to QUEUE(gdb_event_p).
14625 (async_queue_event): Remove.
14626 (gdb_event_xfree): New.
14627 (initialize_event_loop): New.
14628 (process_event): Use API from QUEUE.
14629 (wait_for_event): Likewise.
14630 * server.c (main): Call initialize_event_loop.
14631 * server.h (initialize_event_loop): Declare.
14632
14633 2013-01-18 Yao Qi <yao@codesourcery.com>
14634
14635 * ax.h (struct eval_agent_expr_context): New.
14636 (gdb_eval_agent_expr): Update declaration.
14637 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14638 TFRAME. Add new argument CTX.
14639 * server.h (struct eval_agent_expr_context): Declare.
14640 (agent_mem_read, agent_tsv_read): Update declaration.
14641 (agent_mem_read_string): Likewise.
14642 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14643 (add_traceframe_block): Add new argument TPOINT.
14644 Increase TPOINT->traceframe_usage.
14645 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14646 eval_tracepoint_agent_expr.
14647 (condition_true_at_tracepoint): Likewise.
14648 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14649 (agent_mem_read_string, agent_tsv_read): Likewise.
14650
14651 2013-01-16 Yao Qi <yao@codesourcery.com>
14652
14653 * linux-low.c (linux_resume_one_lwp): Don't check
14654 'lwp->bp_reinsert != 0'.
14655
14656 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14657 Pedro Alves <palves@redhat.com>
14658
14659 * lynx-low.c (ptrace_request_to_str): Define a temporary
14660 macro and use it to simplify this function's implementation.
14661
14662 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14663
14664 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14665 sets errno.
14666
14667 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14668
14669 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14670
14671 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14672
14673 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14674
14675 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14676
14677 * lynx-low.c (lynx_resume): Use the resume_info parameter
14678 to determine the ptid for the lynx_ptrace call, unless
14679 it is equal to minus_one_ptid, in which case we use the
14680 ptid of the current_inferior.
14681 (lynx_wait_1): After having received a thread create/exit
14682 event, resume the inferior's execution using the signaling
14683 thread's ptid, rather than the old ptid.
14684
14685 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14686
14687 * lynx-low.c (lynx_resume): Delete variable ret.
14688
14689 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14690
14691 * gdbreplay.c (gdbreplay_version): Update copyright year.
14692 * server.c (gdbserver_version): Likewise.
14693
14694 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14695
14696 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14697 new thread.
14698
14699 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14700
14701 * lynx-low.c (ptrace_request_to_str): Add handling for
14702 PTRACE_GETTRACESIG.
14703
14704 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14705
14706 * lynx-low.c (lynx_attach): Delete variable new_process.
14707
14708 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14709
14710 * lynx-low.c (lynx_create_inferior): Delete variable
14711 new_process.
14712
14713 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14714
14715 * lynx-low.c (ptrace_request_to_str): Do not handle
14716 PTRACE_GETTHREADLIST if this macro does not exist.
14717
14718 2012-12-15 Yao Qi <yao@codesourcery.com>
14719
14720 * Makefile.in (OBS): Add notif.o.
14721 * notif.c, notif.h: New.
14722 * server.c: Include "notif.h".
14723 (struct vstop_notif) <next>: Remove.
14724 <base>: New field.
14725 (queue_stop_reply): Update.
14726 (push_event, send_next_stop_reply): Remove.
14727 (discard_queued_stop_replies): Update.
14728 (notif_stop): New variable.
14729 (handle_v_stopped): Remove.
14730 (handle_v_requests): Don't call handle_v_stopped. Call
14731 handle_ack_notif instead.
14732 (queue_stop_reply_callback): Call notif_event_enque instead
14733 of queue_stop_reply.
14734 (handle_status): Don't call send_next_stop_reply, call
14735 notif_write_event instead.
14736 (kill_inferior_callback): Likewise.
14737 (detach_or_kill_inferior_callback): Likewise.
14738 (main): Call initialize_notif.
14739 (process_serial_event): Call QUEUE_is_empty.
14740 (handle_target_event): Call notif_push instead of push event.
14741 * server.h (push_event): Remove declaration.
14742
14743 2012-12-10 Tom Tromey <tromey@redhat.com>
14744
14745 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14746 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14747 macros.
14748 (.c.o): Rewrite.
14749 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14750 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14751 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14752 (amd64-linux-ipa.o, ax.o): Rewrite.
14753 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14754 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14755 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14756 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14757 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14758 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14759 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14760 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14761 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14762 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14763 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14764 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14765 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14766 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14767 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14768 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14769 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14770 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14771 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14772 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14773 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14774 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14775 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14776 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14777 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14778 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14779 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14780 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14781 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14782 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14783 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14784 (reg-tilegx.o): Remove.
14785 (all_object_files): New macro.
14786 Include .deps files.
14787 * aclocal.m4, configure: Rebuild.
14788 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14789 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14790 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14791
14792 2012-12-05 Tom Tromey <tromey@redhat.com>
14793
14794 PR gdb/14917:
14795 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14796
14797 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14798
14799 * configure.ac: Check for linux/perf_event.h.
14800 * config.in: Regenerated.
14801 * configure: Regenerated.
14802
14803 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14804
14805 * hostio.c (handle_readlink): Decrease buffer size
14806 parameter passed to readlink by one byte.
14807
14808 2012-11-26 Yao Qi <yao@codesourcery.com>
14809
14810 * configure.ac (build_warnings): Append '-Wempty-body'.
14811 * configure: Regenerated.
14812 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14813 body.
14814
14815 2012-11-15 Pierre Muller <muller@sourceware.org>
14816
14817 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14818 * config.in: Regenerate.
14819 * configure: Regenerate.
14820 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14821 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14822 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14823 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14824 header.
14825 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14826 instead of <sys/wait.h> header.
14827 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14828
14829 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14830
14831 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14832 (various make rules): Remove -DGDBSERVER
14833
14834 2012-11-09 Yao Qi <yao@codesourcery.com>
14835
14836 * spu-low.c (current_ptid): Move it to ..
14837 * gdbthread.h: ... here. New.
14838 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14839 * server.c (myresume, process_serial_event): Likewise.
14840 * thread-db.c (thread_db_find_new_threads): Likewise.
14841 * tracepoint.c (run_inferior_command): Likewise.
14842
14843 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14844
14845 * server.c (handle_search_memory_1): Include access length in
14846 warning message.
14847
14848 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14849
14850 * linux-crisv32-low.c: Fix compile errors.
14851
14852 2012-09-04 Yao Qi <yao@codesourcery.com>
14853
14854 * tracepoint.c (cmd_qtsv): Adjust debug message.
14855 Don't check CUR_TPOINT.
14856
14857 2012-08-28 Yao Qi <yao@codesourcery.com>
14858
14859 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14860 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14861 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14862 Remove declarations of xmalloc, xreallloc, xstrdup and
14863 freeargv.
14864 * Makefile.in (libiberty_h): New.
14865 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14866 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14867
14868 2012-08-23 Yao Qi <yao@codesourcery.com>
14869
14870 * server.h: Remove declaration of 'xsnprintf'.
14871
14872 2012-08-22 Keith Seitz <keiths@redhat.com>
14873
14874 * server.h: Include build-gnulib-gbserver/config.h.
14875 * gdbreplay.c: Likewise.
14876
14877 2012-08-08 Doug Evans <dje@google.com>
14878
14879 * Makefile.in (SFILES): Add gdb_vecs.c.
14880 (OBS): Add gdb_vecs.o.
14881 (gdb_vecs_h, host_defs_h): New variables.
14882 (thread-db.o): Add $(gdb_vecs_h) dependency.
14883 (gdb_vecs.o): New rule.
14884 * thread-db.c: #include "gdb_vecs.h".
14885 (thread_db_load_search): Use a vector to iterate over path elements.
14886 Handle text appearing after "$pdir".
14887
14888 * configure.ac: Add check for strstr.
14889 * config.in: Regenerate.
14890 * configure: Regenerate.
14891
14892 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14893
14894 * hostio.c (handle_pread): If pread fails, fall back to attempting
14895 lseek/read.
14896 (handle_pwrite): Likewise for pwrite.
14897
14898 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14899
14900 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14901 between unsupported TYPE and unimplementable ADDR/LEN combination.
14902 (arm_insert_point): Act on new return value.
14903
14904 2012-07-31 Pedro Alves <palves@redhat.com>
14905
14906 * server.c (process_point_options): Only skip tokens if we find
14907 one that is unrecognized. Don't treat 'X' specially while
14908 skipping unrecognized tokens.
14909
14910 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14911
14912 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14913 to 4-byte-align HW breakpoint addresses for Thumb.
14914
14915 2012-07-27 Yao Qi <yao@codesourcery.com>
14916
14917 PR remote/14161.
14918
14919 * server.h: Declare gdb_agent_about_to_close.
14920 * target.c (kill_inferior): Include "agent.h".
14921 New. Send command 'kill'.
14922 * target.h (kill_inferior): Removed macro.
14923 * tracepoint.c (gdb_agent_about_to_close): New.
14924 (gdb_agent_helper_thread): Handle command 'close'.
14925 Wait endlessly until the inferior stops.
14926 Install gdb_agent_remove_socket to atexit hook.
14927 (agent_socket_name): New static variable.
14928 (gdb_agent_socket_init): Replace local variable 'name' with
14929 'agent_socket_name'.
14930 (gdb_agent_remove_socket): New.
14931
14932 2012-07-27 Yao Qi <yao@codesourcery.com>
14933
14934 * server.c (process_point_options): Stop at 'X' when parsing.
14935
14936 2012-07-19 Michael Eager <eager@eagercon.com>
14937
14938 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14939 to hw_execute.
14940 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14941 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14942 hardware breakpoint.
14943
14944 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14945
14946 * gdbserver/linux-low.c (initialize_low): Call
14947 linux_ptrace_init_warnings.
14948
14949 2012-07-02 Doug Evans <dje@google.com>
14950
14951 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14952 pointer to int.
14953
14954 2012-07-02 Stan Shebs <stan@codesourcery.com>
14955
14956 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14957 (ax.o): Add it to build rule.
14958 (ax-ipa.o): Ditto.
14959 (OBS): Add format.o.
14960 (IPA_OBS): Add format.o.
14961 * server.c (handle_query): Claim support for breakpoint commands.
14962 (process_point_options): Add command case.
14963 (process_serial_event): Leave running if there are printfs in
14964 effect.
14965 * mem-break.h (any_persistent_commands): Declare.
14966 (add_breakpoint_commands): Declare.
14967 (gdb_no_commands_at_breakpoint): Declare.
14968 (run_breakpoint_commands): Declare.
14969 * mem-break.c (struct point_command_list): New struct.
14970 (struct breakpoint): New field command_list.
14971 (any_persistent_commands): New function.
14972 (add_commands_to_breakpoint): New function.
14973 (add_breakpoint_commands): New function.
14974 (gdb_no_commands_at_breakpoint): New function.
14975 (run_breakpoint_commands): New function.
14976 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14977 locally.
14978 * ax.c: Include format.h.
14979 (ax_printf): New function.
14980 (gdb_eval_agent_expr): Add printf opcode.
14981
14982 2012-06-13 Yao Qi <yao@codesourcery.com>
14983
14984 * server.c (start_inferior): Remove duplicated writes to fields
14985 'last_resume_kind' and 'last_status' of 'current_inferior'.
14986
14987 2012-06-12 Yao Qi <yao@codesourcery.com>
14988 Pedro Alves <palves@redhat.com>
14989
14990 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14991 comment.
14992 * server.c (handle_v_cont): Extend comment.
14993
14994 2012-06-11 Yao Qi <yao@codesourcery.com>
14995
14996 * linux-low.c (linux_attach): Add 'static'.
14997
14998 2012-06-06 Yao Qi <yao@codesourcery.com>
14999
15000 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15001
15002 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15003
15004 Fix gcc -flto compilation warning.
15005 * server.c (main): Make variable multi_mode and attach volatile.
15006
15007 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15008
15009 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15010 if the platform doesn't know about it.
15011
15012 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15013
15014 * Makefile.in (SFILES): Add linux-tile-low.c.
15015 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15016 * configure.srv: Handle tilegx-*-linux*.
15017 * linux-tile-low.c: New file.
15018
15019 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15020
15021 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15022
15023 2012-05-24 Pedro Alves <palves@redhat.com>
15024
15025 PR gdb/7205
15026
15027 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15028
15029 2012-05-24 Pedro Alves <palves@redhat.com>
15030
15031 PR gdb/7205
15032
15033 Replace target_signal with gdb_signal throughout.
15034
15035 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15036
15037 * linux-low.c (linux_store_registers): Avoid the copying sequence
15038 when no data has been retrieved by ptrace.
15039
15040 2012-05-22 Will Deacon <will.deacon@arm.com>
15041
15042 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15043 Include asm/ptrace.h.
15044 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15045 already defined.
15046
15047 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15048
15049 * linux-low.c (linux_store_registers): Don't re-retrieve data
15050 with ptrace that has already been obtained from /proc. Always
15051 copy any data retrieved with ptrace to the buffer supplied.
15052
15053 2012-05-11 Yao Qi <yao@codesourcery.com>
15054 Pedro Alves <palves@redhat.com>
15055
15056 * linux-low.c (enum stopping_threads_kind): New.
15057 (stopping_threads): Change type to `enum stopping_threads_kind'.
15058 (handle_extended_wait): If stopping and suspending threads, leave
15059 the new_lwp suspended too.
15060 (linux_wait_for_event): Adjust.
15061 (stop_all_lwps): Set `stopping_threads' to
15062 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15063 whether we're suspending threads or just stopping them. Assert no
15064 recursion happens.
15065
15066 2012-04-29 Yao Qi <yao@codesourcery.com>
15067
15068 * server.h: Move some code to ...
15069 * gdbthread.h: ... here. New.
15070 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15071 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15072 (nto-low.o, win32-low.o): Likewise.
15073 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15074 * regcache.c, remote-utils.c, server.c: Likewise.
15075 * target.c, tracepoint.c, win32-low.c: Likewise.
15076
15077 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15078
15079 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15080 (PTRACE_ARG4_TYPE): Likewise.
15081 (PTRACE_XFER_TYPE): Likewise.
15082 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15083 ptrace to PTRACE_ARG3_TYPE.
15084 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15085 (PTRACE_ARG4_TYPE): Likewise.
15086 (PTRACE_XFER_TYPE): Likewise.
15087 (linux_detach_one_lwp): Cast fourth argument of
15088 ptrace to long then PTRACE_ARG4_TYPE.
15089 (regsets_fetch_inferior_registers): Cast third argument of
15090 ptrace to long then PTRACE_ARG3_TYPE.
15091 (regsets_store_inferior_registers): Likewise.
15092
15093 2012-04-20 Pedro Alves <palves@redhat.com>
15094
15095 * configure: Regenerate.
15096
15097 2012-04-19 Pedro Alves <palves@redhat.com>
15098
15099 * Makefile.in (GNULIB_BUILDDIR): New.
15100 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15101 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15102 (all, install-only, uninstall, clean-info, all-lib, clean): No
15103 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15104 (maintainer-clean realclean distclean): Use subdir_do.
15105 (subdir_do): New.
15106 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15107 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15108 * acinclude.m4: Include acx_configure_dir.m4.
15109 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15110 calls. Call AC_PROG_RANLIB. Configure gnulib using
15111 ACX_CONFIGURE_DIR.
15112 (GNULIB): New.
15113 (GNULIB_STDINT_H): Adjust.
15114 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15115 * gdbreplay.c: Include build-gnulib/config.h.
15116 * server.h: Likewise.
15117 * aclocal.m4: Regenerate.
15118 * config.in: Regenerate.
15119 * configure: Regenerate.
15120
15121 2012-04-19 Pedro Alves <palves@redhat.com>
15122
15123 * Makefile.in (LIBGNU, INCGNU): Adjust.
15124 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15125 (all, install-only, uninstall, clean-info, all-lib, clean)
15126 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15127 * configure.ac: Adjust AC_OUTPUT output.
15128 * aclocal.m4: Regenerate.
15129 * configure: Regenerate.
15130
15131 2012-04-19 Pedro Alves <palves@redhat.com>
15132
15133 * Makefile.in (generated_files): New.
15134 (server_h): Remove the explicit dependency on config.h, and depend
15135 on $generated_files.
15136
15137 2012-04-19 Pedro Alves <palves@redhat.com>
15138
15139 * Makefile.in (INCGNU): Add -Ignulib.
15140
15141 2012-04-19 Pedro Alves <palves@redhat.com>
15142
15143 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15144 (INCGNU): ... this, and spell out -I here.
15145 (GNULIB_LIB): Rename to ...
15146 (LIBGNU): ... this.
15147 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15148
15149 2012-04-19 Pedro Alves <palves@redhat.com>
15150
15151 * config.in: Regenerate.
15152
15153 2012-04-19 Pedro Alves <palves@redhat.com>
15154
15155 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15156 * server.h (memmem): Remove declaration.
15157 * config.in: Regenerate.
15158 * configure: Regenerate.
15159
15160 2012-04-19 Yao Qi <yao@codesourcery.com>
15161
15162 * Makefile.in (SFILES): Add common/vec.c.
15163 (OBS): Add vec.o.
15164 (vec.o): New rule.
15165
15166 2012-04-19 Yao Qi <yao@codesourcery.com>
15167
15168 * remote-utils.c (prepare_resume_reply): Replace with macro
15169 target_core_of_thread.
15170 * server.c (handle_qxfer_threads_proper): Likewise.
15171 * target.h (traget_core_of_thread): New macro.
15172
15173 2012-04-18 Pedro Alves <palves@redhat.com>
15174
15175 * aclocal.m4: Regenerate.
15176 * configure: Regenerate.
15177
15178 2012-04-16 Yao Qi <yao@codesourcery.com>
15179
15180 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15181 duplicated on address.
15182
15183 2012-04-16 Yao Qi <yao@codesourcery.com>
15184
15185 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15186 (struct tracepoint_action_ops) <send>: New field.
15187 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15188 (agent_expr_send, x_tracepoint_action_send): New.
15189 (l_tracepoint_action_send): New.
15190 (cmd_qtdp): Download and install tracepoint
15191 according to `use_agent'.
15192 (run_inferior_command): Add one more parameter `len'.
15193 Update callers.
15194 (tracepoint_send_agent): New.
15195 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15196
15197 2012-04-16 Yao Qi <yao@codesourcery.com>
15198
15199 * tracepoint.c (download_tracepoints): Moved to ...
15200 (cmd_qtstart): ... here.
15201
15202 2012-04-14 Yao Qi <yao@codesourcery.com>
15203
15204 * tracepoint.c: Include inttypes.h.
15205 (struct collect_memory_action): Use sized types.
15206 (struct tracepoint): Likewise.
15207 (cmd_qtdp, stop_tracing): Update print specifiers.
15208 (cmd_qtp, response_tracepoint): Likewise.
15209 (collect_data_at_tracepoint): Likewise.
15210 (collect_data_at_step): Likewise.
15211
15212 2012-04-14 Yao Qi <yao@codesourcery.com>
15213
15214 Import gnulib module inttypes.
15215 * aclocal.m4, config.in, configure: Regenerated.
15216
15217 2012-04-14 Yao Qi <yao@codesourcery.com>
15218
15219 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15220 Makefile and config.status at last.
15221
15222 2012-04-13 Yao Qi <yao@codesourcery.com>
15223
15224 * tracepoint.c: Include stdint.h unconditionally.
15225
15226 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15227
15228 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15229 on BFD_HAVE_SYS_PROCFS_TYPE.
15230 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15231 * configure: Regenerate.
15232 * config.in: Likewise.
15233
15234 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15235
15236 * Makefile.in (clean): Also remove x32.c x32-linux.c
15237 x32-avx.c x32-avx-linux.c.
15238 (x32.o): New target.
15239 (x32.c): Likewise.
15240 (x32-linux.o): Likewise.
15241 (x32-linux.c): Likewise.
15242 (x32-avx.o): Likewise.
15243 (x32-avx.c): Likewise.
15244 (x32-avx-linux.o): Likewise.
15245 (x32-avx-linux.c): Likewise.
15246
15247 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15248 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15249 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15250 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15251 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15252 i386/x32-avx-linux.xml.
15253
15254 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15255 (init_registers_x32_avx_linux): Likwise.
15256 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15257 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15258
15259 2012-04-13 Pedro Alves <palves@redhat.com>
15260
15261 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15262 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15263 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15264 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15265 the sub-make.
15266
15267 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15268
15269 * linux-x86-low.c (compat_x32_clock_t): New.
15270 (compat_x32_siginfo_t): Likewise.
15271 (compat_x32_siginfo_from_siginfo): Likewise.
15272 (siginfo_from_compat_x32_siginfo): Likewise.
15273 (linux_is_elf64): Likewise.
15274 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15275 and siginfo_from_compat_x32_siginfo for x32.
15276 (x86_arch_setup): Set linux_is_elf64.
15277
15278 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15279
15280 PR gdb/13969
15281 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15282 e_machine field.
15283 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15284 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15285 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15286 compatible with process.
15287
15288 2012-04-12 Yao Qi <yao@codesourcery.com>
15289
15290 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15291 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15292 (install-only, install-info, clean): Handle sub dir gnulib.
15293 (all-lib, am--refresh): New targets.
15294 (memmem.o): Remove target.
15295 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15296 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15297 (AC_REPLACE_FUNCS): Remove memmem.
15298 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15299 (AC_OUTPUT): Generate Makefile in gnulib/.
15300 * aclocal.m4, config.in, configure: Regenerated.
15301
15302 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15303
15304 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15305
15306 2012-04-05 Pedro Alves <palves@redhat.com>
15307
15308 -Werror=strict-aliasing
15309
15310 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15311 pointer.
15312
15313 2012-04-04 Pedro Alves <palves@redhat.com>
15314
15315 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15316 (sparc_store_gregset_from_stack, sparc_store_gregset)
15317 (sparc_breakpoint_at): Fix formatting.
15318
15319 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15320
15321 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15322 are available.
15323 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15324 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15325 * config.in: Regenerate.
15326 * configure: Likewise.
15327
15328 2012-03-29 Pedro Alves <palves@redhat.com>
15329
15330 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15331 Correct ptrace arguments.
15332
15333 2012-03-28 Pedro Alves <palves@redhat.com>
15334
15335 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15336 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15337 (IA64_FR1_REGNUM): New defines.
15338 (ia64_fetch_register): New.
15339 (the_low_target): Install it.
15340 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15341 field.
15342 * linux-low.c (linux_fetch_registers): Try the
15343 the_low_target.fetch_register hook first.
15344
15345 * linux-arm-low.c (the_low_target): Adjust.
15346 * linux-bfin-low.c (the_low_target): Adjust.
15347 * linux-cris-low.c (the_low_target): Adjust.
15348 * linux-crisv32-low.c (the_low_target): Adjust.
15349 * linux-m32r-low.c (the_low_target): Adjust.
15350 * linux-m68k-low.c (the_low_target): Adjust.
15351 * linux-mips-low.c (the_low_target): Adjust.
15352 * linux-ppc-low.c (the_low_target): Adjust.
15353 * linux-s390-low.c (the_low_target): Adjust.
15354 * linux-sh-low.c (the_low_target): Adjust.
15355 * linux-sparc-low.c (the_low_target): Adjust.
15356 * linux-tic6x-low.c (the_low_target): Adjust.
15357 * linux-x86-low.c (the_low_target): Adjust.
15358 * linux-xtensa-low.c (the_low_target): Adjust.
15359
15360 2012-03-26 Pedro Alves <palves@redhat.com>
15361
15362 * server.c (handle_qxfer_libraries): Don't bail early if
15363 the_target->qxfer_libraries_svr4 is not NULL.
15364
15365 2012-03-26 Pedro Alves <palves@redhat.com>
15366
15367 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15368
15369 2012-03-23 Pedro Alves <palves@redhat.com>
15370
15371 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15372 "library-list-svr4" element's start tag when the the DSO list is
15373 empty.
15374
15375 2012-03-23 Pedro Alves <palves@redhat.com>
15376
15377 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15378 a variable whose type size is the same as the inferior's pointer
15379 size.
15380
15381 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15382
15383 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15384 struct siginfo.
15385 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15386 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15387 * linux-low.h: Include <signal.h>.
15388 (struct siginfo): Remove forward declaration.
15389 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15390 struct siginfo.
15391
15392 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15393
15394 * .gitignore: Ignore more files.
15395
15396 2012-03-19 Pedro Alves <palves@redhat.com>
15397 Jan Kratochvil <jan.kratochvil@redhat.com>
15398
15399 * server.c (cont_thread, general_thread): Add describing comments.
15400 (start_inferior): Clear `cont_thread'.
15401 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15402 of a process.
15403
15404 2012-03-15 Yao Qi <yao@codesourcery.com>
15405
15406 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15407 handling to ...
15408 (cmd_qtdp): ... here.
15409
15410 2012-03-15 Yao Qi <yao@codesourcery.com>
15411
15412 * tracepoint.c (struct tracepoint_action_ops): New.
15413 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15414 (m_tracepoint_action_download): New.
15415 (r_tracepoint_action_download): New.
15416 (x_tracepoint_action_download): New.
15417 (l_tracepoint_action_download): New.
15418 (add_tracepoint_action): Install `action->ops' according type.
15419 (download_tracepoint_1): Move code `download' function pointer
15420 of various tracepoint_action_ops.
15421
15422 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15423
15424 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15425 linux_ptrace_attach_warnings.
15426
15427 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15428
15429 * Makefile.in (linux-ptrace.o): New.
15430 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15431 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15432 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15433 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15434 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15435 of these targets.
15436 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15437
15438 2012-03-08 Yao Qi <yao@codesourcery.com>
15439 Pedro Alves <palves@redhat.com>
15440
15441 Fix PR server/13392.
15442 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15443 offset of JMP insn.
15444 * tracepoint.c (remove_tracepoint): New.
15445 (cmd_qtdp): Call remove_tracepoint when failed to install.
15446
15447 2012-03-07 Pedro Alves <palves@redhat.com>
15448
15449 * linux-low.c (get_detach_signal): New.
15450 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15451 Pass on pending signals to PTRACE_DETACH. Check the result of the
15452 ptrace call.
15453 * server.c (program_signals, program_signals_p): New.
15454 (handle_general_set): Handle QProgramSignals.
15455 * server.h (program_signals, program_signals_p): Declare.
15456
15457 2012-03-05 Pedro Alves <palves@redhat.com>
15458 Jan Kratochvil <jan.kratochvil@redhat.com>
15459
15460 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15461 New comment why.
15462
15463 2012-03-03 Yao Qi <yao@codesourcery.com>
15464
15465 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15466 agent_look_up_symbols.
15467
15468 2012-03-03 Yao Qi <yao@codesourcery.com>
15469
15470 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15471 (linux-x86-low.o): Likewise.
15472 * server.h: Remove in_process_agent_loaded.
15473 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15474 common/agent.c.
15475 Update callers.
15476
15477 2012-03-03 Yao Qi <yao@codesourcery.com>
15478
15479 * tracepoint.c (gdb_agent_capability): New global.
15480 (in_process_agent_loaded_ust): Renamed to
15481 `in_process_agent_supports_ust'.
15482 Update callers.
15483 (in_process_agent_supports_ust): Call agent_capability_check.
15484 (clear_installed_tracepoints): Assert that agent supports
15485 agent.
15486
15487 2012-03-03 Yao Qi <yao@codesourcery.com>
15488
15489 * linux-low.c (linux_supports_agent): New.
15490 (linux_target_ops): Initialize field `supports_agent' with
15491 linux_supports_agent.
15492 * target.h (struct target_ops) <supports_agent>: New.
15493 (target_supports_agent): New macro.
15494 * server.c (handle_general_set): Handle packet 'QAgent'.
15495 (handle_query): Send `QAgent+'.
15496 * Makefile.in (server.o): Depends on agent.h.
15497
15498 2012-03-03 Yao Qi <yao@codesourcery.com>
15499
15500 * Makefile.in (OBS): Add agent.o.
15501 Add new rule for agent.o.
15502 Track dependence of tracepoint.c on agent.h.
15503 * tracepoint.c (run_inferior_command_1):
15504 (run_inferior_command): Call agent_run_command.
15505 (gdb_ust_connect_sync_socket): Deleted. Move it to
15506 common/agent.c.
15507 (resume_thread, stop_thread): Likewise.
15508 (gdb_ust_socket_init): Renamed to ...
15509 (gdb_agent_socket_init): ... New.
15510 (gdb_ust_thread): Renamed to ...
15511 (gdb_agent_helper_thread): ... New.
15512 (gdb_ust_init): Move some code to ...
15513 (gdb_agent_init): ... here. New.
15514 [HAVE_UST]: Call gdb_ust_init.
15515 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15516 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15517 * config.in, configure: Regenerated.
15518
15519 2012-03-02 Pedro Alves <palves@redhat.com>
15520
15521 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15522 * linux-low.c (struct simple_pid_list): New.
15523 (stopped_pids): New a struct simple_pid_list pointer.
15524 (add_to_pid_list, pull_pid_from_list): New.
15525 (handle_extended_wait): Don't assume the first signal new children
15526 report is SIGSTOP. Adjust call to pull_pid_from_list.
15527 (linux_wait_for_lwp): Adjust.
15528
15529 2012-03-02 Yao Qi <yao@codesourcery.com>
15530
15531 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15532 debug log.
15533
15534 2012-03-02 Yao Qi <yao@codesourcery.com>
15535
15536 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15537 `stop_pc' and `tpoint'. Update caller.
15538
15539 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15540
15541 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15542 * linux-low.c (use_linux_regsets): New macro.
15543 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15544 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15545 (linux_register_in_regsets): New function.
15546 (usr_fetch_inferior_registers): Skip registers covered by
15547 regsets.
15548 (usr_store_inferior_registers): Likewise.
15549 (usr_fetch_inferior_registers): New macro.
15550 (usr_store_inferior_registers): Likewise.
15551 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15552 (linux_store_registers): Likewise.
15553 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15554 prototype.
15555 (init_registers_mips64_dsp_linux): Likewise.
15556 (init_registers_mips_linux): New macro.
15557 (init_registers_mips_dsp_linux): Likewise.
15558 (mips_dsp_num_regs): Likewise.
15559 (DSP_BASE, DSP_CONTROL): New fallback macros.
15560 (mips_base_regs): New macro.
15561 (mips_regmap): Use it. Fix the size.
15562 (mips_dsp_regmap): New variable.
15563 (mips_dsp_regset_bitmap): Likewise.
15564 (mips_arch_setup): New function.
15565 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15566 than mips_regmap.
15567 (mips_cannot_store_register): Likewise.
15568 (the_low_target): Update .arch_setup, .num_regs and .regmap
15569 initializers. Add .regset_bitmap initializer.
15570 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15571 initializer.
15572 * linux-bfin-low.c (the_low_target): Likewise.
15573 * linux-cris-low.c (the_low_target): Likewise.
15574 * linux-crisv32-low.c (the_low_target): Likewise.
15575 * linux-ia64-low.c (the_low_target): Likewise.
15576 * linux-m32r-low.c (the_low_target): Likewise.
15577 * linux-m68k-low.c (the_low_target): Likewise.
15578 * linux-ppc-low.c (the_low_target): Likewise.
15579 * linux-s390-low.c (the_low_target): Likewise.
15580 * linux-sh-low.c (the_low_target): Likewise.
15581 * linux-sparc-low.c (the_low_target): Likewise.
15582 * linux-tic6x-low.c (the_low_target): Likewise.
15583 * linux-x86-low.c (the_low_target): Likewise.
15584 * linux-xtensa-low.c (the_low_target): Likewise.
15585 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15586 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15587 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15588 srv_xmlfiles.
15589 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15590 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15591
15592 2012-02-29 Yao Qi <yao@codesourcery.com>
15593 Pedro Alves <palves@redhat.com>
15594
15595 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15596 `step_over_finished' is true.
15597
15598 2012-02-27 Pedro Alves <palves@redhat.com>
15599
15600 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15601 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15602
15603 2012-02-27 Pedro Alves <palves@redhat.com>
15604
15605 PR server/9684
15606 * linux-low.c (pid_is_stopped): New.
15607 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15608
15609 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15610
15611 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15612 of conditions.
15613
15614 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15615
15616 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15617
15618 2012-02-24 Luis Machado <lgustavo@codesourcery>
15619
15620 * server.c (handle_query): Advertise support for target-side
15621 breakpoint condition evaluation.
15622 (process_point_options): New function.
15623 (process_serial_event): When inserting a breakpoint, check for
15624 a target-side condition that should be evaluated.
15625
15626 * mem-break.c: Include regcache.h and ax.h.
15627 (point_cond_list_t): New data structure.
15628 (breakpoint) <cond_list>: New field.
15629 (find_gdb_breakpoint_at): Make non-static.
15630 (delete_gdb_breakpoint_at): Clear any target-side
15631 conditions.
15632 (clear_gdb_breakpoint_conditions): New function.
15633 (add_condition_to_breakpoint): Likewise.
15634 (add_breakpoint_condition): Likewise.
15635 (gdb_condition_true_at_breakpoint): Likewise.
15636 (gdb_breakpoint_here): Return result directly instead
15637 of going through a local variable.
15638
15639 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15640 (clear_gdb_breakpoint_conditions): Likewise.
15641 (add_breakpoint_condition): Likewise.
15642 (gdb_condition_true_at_breakpoint): Likewise.
15643
15644 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15645 (need_step_over_p): Take target-side breakpoint condition into
15646 consideration.
15647
15648 2012-02-24 Luis Machado <lgustavo@codesourcery>
15649
15650 * server.h: Include tracepoint.h.
15651 (agent_mem_read, agent_get_trace_state_variable_value,
15652 agent_set_trace_state_variable_value,
15653 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15654 get_set_tsv_func_addr): New prototypes.
15655
15656 * ax.h: New include file.
15657 * ax.c: New source file.
15658
15659 * tracepoint.c: Include ax.h.
15660 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15661 agent_expr, eval_result_type): Move to ax.h.
15662 (parse_agent_expr): Rename to ...
15663 (gdb_parse_agent_expr): ... this, make it non-static and move
15664 to ax.h.
15665 (unparse_agent_expr) Rename to ...
15666 (gdb_unparse_agent_expr): ... this, make it non-static and move
15667 to ax.h.
15668 (eval_agent_expr): Rename to ...
15669 (eval_tracepoint_agent_expr): ... this.
15670 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15671 forward declarations.
15672 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15673 (agent_get_trace_state_variable_value): New function.
15674 (agent_set_trace_state_variable_value): New function.
15675 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15676 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15677 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15678 (condition_true_at_tracepoint): Likewise.
15679 (parse_agent_expr): Rename to ...
15680 (gdb_parse_agent_expr): ... this and move to ax.c.
15681 (unparse_agent_expr): Rename to ...
15682 (gdb_unparse_agent_expr): ... this and move to ax.c.
15683 (gdb_agent_op_name): Move to ax.c.
15684 (eval_agent_expr): Rename to ...
15685 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15686 and move to ax.c.
15687 (eval_tracepoint_agent_expr): New function.
15688 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15689 non-static.
15690 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15691 ax.c.
15692 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15693 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15694 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15695 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15696 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15697 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15698 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15699 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15700 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15701 (compile_bytecodes): Remove forward declaration.
15702 (is_goto_target): Move to ax.c.
15703 (compile_bytecodes): Move to ax.c and call
15704 agent_get_trace_state_variable_value (...) and
15705 agent_set_trace_state_variable_value (...).
15706
15707 * Makefile.in: Update ax.c and IPA dependencies.
15708
15709 2012-02-24 Pedro Alves <palves@redhat.com>
15710
15711 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15712 (cmd_bigqtbuffer_circular): ... this. Only handle
15713 'QTBuffer:circular:'.
15714 (handle_tracepoint_general_set): Adjust.
15715
15716 2012-02-16 Yao Qi <yao@codesourcery.com>
15717
15718 * inferiors.c: Move code to ...
15719 * dll.c: .... here. New.
15720 * server.h: Declare clear_dlls.
15721 * Makefile.in (SFILES): Add dll.c.
15722 (OBS): Add dll.o
15723 (dll.o): New rule.
15724
15725 2012-02-11 Yao Qi <yao@codesourcery.com>
15726
15727 * server.c: (handle_monitor_command): Add a new parameter
15728 `own_buf'.
15729 (handle_query): Update caller.
15730
15731 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15732
15733 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15734 * configure, config.in: Regenerate.
15735 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15736 is not defined.
15737
15738 2012-02-02 Pedro Alves <palves@redhat.com>
15739
15740 Try SIGKILL first, then PTRACE_KILL.
15741 * linux-low.c (linux_kill_one_lwp): New.
15742 (linux_kill_one_lwp): Rename to ...
15743 (kill_one_lwp_callback): ... this. Use the new
15744 linux_kill_one_lwp.
15745
15746 2012-02-02 Pedro Alves <palves@redhat.com>
15747
15748 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15749 inferior.
15750
15751 2012-01-27 Pedro Alves <palves@redhat.com>
15752
15753 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15754 (elf_64_file_p): Make static.
15755 (linux_pid_exe_is_elf_64_file): New.
15756 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15757 Delete declarations.
15758 (linux_pid_exe_is_elf_64_file): Declare.
15759 * linux-x86-low.c (x86_arch_setup): Use
15760 linux_pid_exe_is_elf_64_file.
15761
15762 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15763
15764 * linux-low.c (linux_wait_for_event_1): Rename to ...
15765 (linux_wait_for_event): ... here and merge it with former
15766 linux_wait_for_event - new variable wait_ptid, use it.
15767 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15768
15769 2012-01-23 Pedro Alves <palves@redhat.com>
15770
15771 * server.c (main): Avoid yet another case of infinite loop while
15772 detaching/killing after a longjmp.
15773
15774 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15775
15776 Code cleanup.
15777 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15778
15779 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15780
15781 * hostio.c (handle_readlink): New function.
15782 (handle_vFile): Call it to handle "vFile:readlink" packets.
15783
15784 2012-01-20 Pedro Alves <palves@redhat.com>
15785 Ulrich Weigand <ulrich.weigand@linaro.org>
15786
15787 * server.c (handle_v_requests): Only support vAttach and vRun to
15788 start multiple processes when in extended protocol mode.
15789
15790 2012-01-17 Pedro Alves <palves@redhat.com>
15791
15792 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15793 memalign plus mprotect to allocate the scratch buffer.
15794
15795 2012-01-13 Pedro Alves <palves@redhat.com>
15796
15797 * server.c (attach_inferior): Clear `cont_thread'.
15798
15799 2012-01-13 Pedro Alves <palves@redhat.com>
15800
15801 * server.c (main): Avoid infinite loop while detaching/killing
15802 after a longjmp.
15803
15804 2012-01-09 Doug Evans <dje@google.com>
15805
15806 * server.c (start_inferior): Set last_ptid in --wrapper case.
15807
15808 2012-01-06 Yao Qi <yao@codesourcery.com>
15809
15810 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15811 defined.
15812 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15813
15814 2012-01-04 Yao Qi <yao@codesourcery.com>
15815
15816 * tracepoint.c (cmd_qtdp): Print debug message
15817 for static tracepoint.
15818
15819 2012-01-04 Yao Qi <yao@codesourcery.com>
15820
15821 * tracepoint.c (trace_vdebug): Differentiate debug message
15822 between gdbserver and IPA.
15823
15824 2012-01-03 Yao Qi <yao@codesourcery.com>
15825
15826 * tracepoint.c (tracepoint_was_hit): Don't collect for
15827 static tracepoint.
15828
15829 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15830
15831 * terminal.h: Reformat copyright header.
15832
15833 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15834
15835 * server.c (gdbserver_version): Update copyright year.
15836 * gdbreplay.c (gdbreplay_version): Likewise.
15837
15838 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15839
15840 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15841
15842 Revert:
15843 2011-12-18 Hui Zhu <teawater@gmail.com>
15844 * linux-low.c (linux_create_inferior): Save return value to ret.
15845
15846 2011-12-18 Hui Zhu <teawater@gmail.com>
15847
15848 * linux-low.c (linux_create_inferior): Save return value to ret.
15849
15850 2011-12-16 Doug Evans <dje@google.com>
15851
15852 * linux-low.c (linux_create_inferior): If stdio connection,
15853 redirect stdin from /dev/null, stdout to stderr.
15854 * remote-utils.c (remote_is_stdio): New static global.
15855 (remote_connection_is_stdio): New function.
15856 (remote_prepare): Handle stdio connection.
15857 (remote_open): Ditto.
15858 (remote_close): Don't close stdin for stdio connections.
15859 (read_prim,write_prim): New functions. Replace all calls to
15860 read/write to these.
15861 * server.c (main): Watch for "-" argument. Move call to
15862 remote_prepare before start_inferior.
15863 * server.h (STDIO_CONNECTION_NAME): New macro.
15864 (remote_connection_is_stdio): Declare.
15865
15866 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15867 in debugging output.
15868
15869 2011-12-15 Yao Qi <yao@codesourcery.com>
15870
15871 * tracepoint.c: Include sys/syscall.h.
15872 (gdb_ust_thread): Remove preprocessor conditional.
15873
15874 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15875
15876 * linux-low.c (linux_detach_one_lwp): Call
15877 the_low_target.prepare_to_resume before detaching.
15878
15879 2011-12-14 Yao Qi <yao@codesourcery.com>
15880
15881 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15882 of write.
15883
15884 2011-12-14 Yao Qi <yao@codesourcery.com>
15885
15886 * i386-low.c (i386_low_stopped_data_address): Initialize local
15887 variable `control'.
15888
15889 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15890
15891 PR remote/13492
15892
15893 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15894 DR_CONTROL unless necessary. Extend comments.
15895 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15896 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15897
15898 2011-12-13 Yao Qi <yao@codesourcery.com>
15899
15900 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15901 macros.
15902 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15903
15904 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15905
15906 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15907 Print new debug message for such case.
15908
15909 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15910
15911 Fix overlapping memcpy.
15912 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15913 the read_inferior_memory transfer.
15914 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15915 write_inferior_memory transfer.
15916 (set_fast_tracepoint_jump): New variable buf. Use it for the
15917 read_inferior_memory and write_inferior_memory transfers.
15918 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15919 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15920 Use it for the write_inferior_memory transfer.
15921 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15922 buffers.
15923
15924 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15925
15926 * linux-low.c (fetch_register, store_register): Make code
15927 consistent, fix formatting.
15928
15929 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15930
15931 * linux-low.c (usr_store_inferior_registers): Factor out code
15932 to handle individual registers into...
15933 (store_register): ... this new function.
15934
15935 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15936
15937 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15938 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15939 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15940 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15941 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15942 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15943 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15944 (srv_xmlfiles): Add new XML files.
15945
15946 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15947 and <sys/uio.h>.
15948 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15949 (init_registers_s390_linux32v1): Add prototype.
15950 (init_registers_s390_linux32v2): Likewise.
15951 (init_registers_s390_linux64v1): Likewise.
15952 (init_registers_s390_linux64v2): Likewise.
15953 (init_registers_s390x_linux64v1): Likewise.
15954 (init_registers_s390x_linux64v2): Likewise.
15955 (s390_num_regs): Increment to 52.
15956 (s390_regmap): Add orig_r2 register.
15957 (s390_num_regs_3264): Increment to 68.
15958 (s390_regmap_3264): Add orig_r2 register.
15959 (s390_collect_ptrace_register): Handle orig_r2 register.
15960 (s390_supply_ptrace_register): Likewise.
15961 (s390_fill_last_break): New function.
15962 (s390_store_last_break): Likewise.
15963 (s390_fill_system_call): New function.
15964 (s390_store_system_call): Likewise.
15965 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15966 register sets.
15967 (s390_check_regset): New function.
15968 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15969 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15970 Update target_regsets for available register sets.
15971
15972 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15973 Jan Kratochvil <jan.kratochvil@redhat.com>
15974
15975 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15976 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15977 New.
15978 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15979 * linux-low.h (struct process_info_private): New member r_debug.
15980 * server.c (handle_qxfer_libraries): Call
15981 the_target->qxfer_libraries_svr4.
15982 (handle_qxfer_libraries_svr4): New function.
15983 (qxfer_packets): New entry "libraries-svr4".
15984 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15985 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15986 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15987 PACKET_qXfer_libraries_svr4.
15988
15989 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15990
15991 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15992 PSW address/mask between 8-byte and 16-byte formats.
15993 (s390_supply_ptrace_register): Likewise.
15994 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15995 basic addressing mode bit.
15996
15997 2011-11-24 Stan Shebs <stan@codesourcery.com>
15998
15999 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16000
16001 2011-11-17 Stan Shebs <stan@codesourcery.com>
16002
16003 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16004 (tracing_start_time): New global.
16005 (tracing_stop_time): New global.
16006 (tracing_user_name): New global.
16007 (tracing_notes): New global.
16008 (tracing_stop_note): New global.
16009 (cmd_qtstart): Set traceframe_usage, start_time.
16010 (stop_tracing): Set stop_time.
16011 (cmd_qtstatus): Report additional status.
16012 (cmd_qtp): New function.
16013 (handle_tracepoint_query): Call it.
16014 (cmd_qtnotes): New function.
16015 (handle_tracepoint_general_set): Call it.
16016 (get_timestamp): Rename from tsv_get_timestamp.
16017
16018 2011-11-14 Stan Shebs <stan@codesourcery.com>
16019 Kwok Cheung Yeung <kcy@codesourcery.com>
16020
16021 * linux-x86-low.c (small_jump_insn): New.
16022 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16023 trampoline and error message, build a trampoline and issue a small
16024 jump instruction to it.
16025 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16026 trampoline and error message.
16027 (x86_get_min_fast_tracepoint_insn_len): New.
16028 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16029 * linux-low.h (struct linux_target_ops): Add arguments to
16030 install_fast_tracepoint_jump_pad operation, add new operation.
16031 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16032 arguments.
16033 (linux_get_min_fast_tracepoint_insn_len): New function.
16034 (linux_target_op): Add new operation.
16035 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16036 (gdb_trampoline_buffer_end): Ditto.
16037 (gdb_trampoline_buffer_error): Ditto.
16038 (struct ipa_sym_addresses): Add fields for new IPA variables.
16039 (symbol_list): Add entries for new IPA variables.
16040 (struct tracepoint): Add fields to hold the address range of the
16041 trampoline used by the tracepoint.
16042 (trampoline_buffer_head): New static variable.
16043 (trampoline_buffer_tail): Ditto.
16044 (claim_trampoline_space): New function.
16045 (have_fast_tracepoint_trampoline_buffer): New function.
16046 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16047 structure.
16048 (install_fast_tracepoint): Ditto, also add error buffer argument.
16049 (cmd_qtminftpilen): New function.
16050 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16051 (fast_tracepoint_from_trampoline_address): New function.
16052 (fast_tracepoint_collecting): Handle trampoline as part of jump
16053 pad space.
16054 (set_trampoline_buffer_space): New function.
16055 (initialize_tracepoint): Initialize new IPA variables.
16056 * target.h (struct target_ops): Add arguments to
16057 install_fast_tracepoint_jump_pad operation, add new
16058 get_min_fast_tracepoint_insn_len operation.
16059 (target_get_min_fast_tracepoint_insn_len): New.
16060 (install_fast_tracepoint_jump_pad): Add arguments.
16061 * server.h (IPA_BUFSIZ): Define.
16062 * linux-i386-ipa.c: Include extra header files.
16063 (initialize_fast_tracepoint_trampoline_buffer): New function.
16064 (initialize_low_tracepoint): Call it.
16065 * server.h (set_trampoline_buffer_space): Declare.
16066 (claim_trampoline_space): Ditto.
16067 (have_fast_tracepoint_trampoline_buffer): Ditto.
16068
16069 2011-11-14 Yao Qi <yao@codesourcery.com>
16070
16071 * server.c (handle_query): Handle InstallInTrace for qSupported.
16072 * tracepoint.c (add_tracepoint): Sort list.
16073 (install_tracepoint, download_tracepoint): New.
16074 (cmd_qtdp): Call them to install and download tracepoints.
16075 (sort_tracepoints): Removed.
16076 (cmd_qtstart): Update.
16077
16078 2011-11-14 Yao Qi <yao@codesourcery.com>
16079
16080 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16081 * mem-break.h: Declare.
16082 * tracepoint.c (cmd_qtstart): Move some code to ...
16083 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16084 New.
16085 (download_tracepoints): Move some code to ...
16086 (download_tracepoint_1): ... here. New.
16087
16088 2011-11-08 Yao Qi <yao@codesourcery.com>
16089
16090 * remote-utils.c (relocate_instruction): A comment fix.
16091
16092 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16093
16094 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16095 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16096 dr_status_mirror and dr_control_mirror from debug_reg_state.
16097 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16098 (i386_initial_stuff): Remove use of deleted globals.
16099 (i386_get_thread_context, i386_set_thread_context,
16100 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16101 from debug_reg_state.
16102
16103 2011-11-05 Yao Qi <yao@codesourcery.com>
16104
16105 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16106 address as TPOINT's.
16107
16108 2011-11-02 Stan Shebs <stan@codesourcery.com>
16109
16110 * tracepoint.c (agent_mem_read_string): New function.
16111 (eval_agent_expr): Call it for tracenz.
16112 * server.c (handle_query): Report support for tracenz.
16113
16114 2011-11-02 Yao Qi <yao@codesourcery.com>
16115
16116 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16117
16118 2011-11-02 Yao Qi <yao@codesourcery.com>
16119
16120 * target.h: Fix a typo in comment.
16121
16122 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16123
16124 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16125 clobber the breakpoints' shadows with fast tracepoint jumps.
16126 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16127 * target.c (write_inferior_memory): Also pass MYADDR down to
16128 check_mem_write.
16129
16130 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16131
16132 * configure.ac: Check support for personality routine.
16133 * configure: Regenerate.
16134 * config.in: Likewise.
16135 * linux-low.c: Include <sys/personality.h>.
16136 Define ADDR_NO_RANDOMIZE if necessary.
16137 (linux_create_inferior): Disable address space randomization when
16138 forking inferior, if requested.
16139 (linux_supports_disable_randomization): New function.
16140 (linux_target_ops): Install it.
16141 * server.h (disable_randomization): Declare.
16142 * server.c (disable_randomization): New global variable.
16143 (handle_general_set): Handle QDisableRandomization.
16144 (handle_query): Likewise for qSupported.
16145 (main): Support --disable-randomization and --no-disable-randomization
16146 command line arguments.
16147 * target.h (struct target_ops): Add supports_disable_randomization.
16148 (target_supports_disable_randomization): New macro.
16149
16150 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16151
16152 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16153 ifdef check.
16154 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16155 [!PT_GETDSBT] (target_loadmap): New definition.
16156 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16157 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16158 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16159 and PT_GETDSBT to LINUX_LOADMAP.
16160 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16161 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16162
16163 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16164
16165 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16166 (arm_linux_hwbp_cap): New static variable.
16167 (arm_linux_get_hwbp_cap): Replace by ...
16168 (arm_linux_init_hwbp_cap): ... this new function.
16169 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16170 (arm_linux_get_hw_watchpoint_count): Likewise.
16171 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16172 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16173 (arm_prepare_to_resume): Use perror_with_name instead of error.
16174
16175 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16176
16177 * linux-arm-low.c: Include <signal.h>.
16178 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16179 (struct arm_linux_hwbp_cap): New data type.
16180 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16181 (struct arm_linux_hw_breakpoint): New data type.
16182 (MAX_BPTS, MAX_WPTS): Define.
16183 (struct arch_process_info, struct arch_lwp_info): New data types.
16184 (arm_linux_get_hwbp_cap): New function.
16185 (arm_linux_get_hw_breakpoint_count): Likewise.
16186 (arm_linux_get_hw_watchpoint_count): Likewise.
16187 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16188 (arm_hwbp_control_initialize): Likewise.
16189 (arm_hwbp_control_is_enabled): Likewise.
16190 (arm_hwbp_control_is_initialized): Likewise.
16191 (arm_hwbp_control_disable): Likewise.
16192 (arm_linux_hw_breakpoint_equal): Likewise.
16193 (arm_linux_hw_point_initialize): Likewise.
16194 (struct update_registers_data): New data structure.
16195 (update_registers_callback: New function.
16196 (arm_insert_point): Likewise.
16197 (arm_remove_point): Likewise.
16198 (arm_stopped_by_watchpoint): Likewise.
16199 (arm_stopped_data_address): Likewise.
16200 (arm_new_process): Likewise.
16201 (arm_new_thread): Likewise.
16202 (arm_prepare_to_resume): Likewise.
16203 (the_low_target): Register arm_insert_point, arm_remove_point,
16204 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16205 arm_new_thread, and arm_prepare_to_resume.
16206
16207 2011-09-15 Stan Shebs <stan@codesourcery.com>
16208
16209 * server.h (struct emit_ops): Add compare-goto fields.
16210 * tracepoint.c (gdb_agent_op_sizes): New table.
16211 (emit_eq_goto): New function.
16212 (emit_ne_goto): New function.
16213 (emit_lt_goto): New function.
16214 (emit_le_goto): New function.
16215 (emit_gt_goto): New function.
16216 (emit_ge_goto): New function.
16217 (is_goto_target): New function.
16218 (compile_bytecodes): Recognize special cases of compare-goto
16219 combinations and call specialized emitters for them.
16220 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16221 (amd64_emit_ne_goto): New function.
16222 (amd64_emit_lt_goto): New function.
16223 (amd64_emit_le_goto): New function.
16224 (amd64_emit_gt_goto): New function.
16225 (amd64_emit_ge_goto): New function.
16226 (amd64_emit_ops): Add the new functions.
16227 (i386_emit_eq_goto): New function.
16228 (i386_emit_ne_goto): New function.
16229 (i386_emit_lt_goto): New function.
16230 (i386_emit_le_goto): New function.
16231 (i386_emit_gt_goto): New function.
16232 (i386_emit_ge_goto): New function.
16233 (i386_emit_ops): Add the new functions.
16234
16235 2011-09-08 Stan Shebs <stan@codesourcery.com>
16236
16237 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16238 (i386_emit_epilogue): Restore %ebx.
16239
16240 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16241
16242 * server.c (step_thread): Remove definition.
16243 (process_serial_event): Don't handle Hs.
16244 * server.h (step_thread): Remove declaration.
16245 * target.c (set_desired_inferior): Remove use of step_thread.
16246
16247 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16248
16249 * linux-low.c: Include linux-procfs.h.
16250 (linux_attach_lwp_1): Update comments.
16251 (linux_attach): Scan for existing threads when attaching to a
16252 process that is the tgid.
16253 * Makefile.in: Update dependencies.
16254
16255 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16256
16257 * configure.srv: Add linux-procfs.o dependencies.
16258
16259 2011-08-14 Yao Qi <yao@codesourcery.com>
16260
16261 * target.h (struct target_ops): Fix indent.
16262 * win32-low.c (win32_target_ops): Fix comment.
16263
16264 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16265 Yao Qi <yao@codesourcery.com>
16266
16267 * Makefile.in (clean): Remove tic6x-*.c files.
16268 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16269 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16270 (tic6x-c64xp-linux.c): Likewise.
16271 * configure.srv: Add support for tic6x-*-uclinux.
16272 * linux-tic6x-low.c: New.
16273 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16274
16275 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16276 Yao Qi <yao@codesourcery.com>
16277
16278 * target.h (struct target_ops): Add read_loadmap.
16279 * linux-low.c (struct target_loadseg): New type.
16280 (struct target_loadmap): New type.
16281 (linux_read_loadmap): New function.
16282 (linux_target_ops): Add linux_read_loadmap.
16283 * server.c (handle_query): Support qXfer:fdpic:read packet.
16284 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16285 to NULL.
16286
16287 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16288
16289 * win32-low.c: Include <stdint.h>.
16290
16291 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16292
16293 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16294 to the inferior here.
16295 (i386_remove_aligned_watchpoint): Ditto.
16296 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16297 fit part of the watchpoint in the debug registers.
16298 (i386_update_inferior_debug_regs): New.
16299 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16300 registers, and only update the inferior on success.
16301 (i386_low_remove_watchpoint): Ditto.
16302
16303 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16304
16305 * linux-low.c (compare_ints, unique, list_threads, show_process,
16306 linux_core_of_thread): Delete.
16307 (linux_target_ops): Change linux_core_of_thread to
16308 linux_common_core_of_thread.
16309 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16310 * utils.c (malloc_failure): Change type of argument.
16311 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16312 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16313 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16314 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16315 (IPA_OBJS): Add common-utils-ipa.o.
16316 (ptid_h, linux_osdata_h): New macros.
16317 (server_h): Add common/common-utils.h, common/xml-utils.h,
16318 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16319 common/ptid.h.
16320 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16321 ptid.o, buffer.o): New rules.
16322 (linux-low.o): Add common/linux-osdata.h as a dependency.
16323 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16324 * configure.ac: Add AC_HEADER_DIRENT check.
16325 * config.in: Regenerate.
16326 * configure: Regenerate.
16327 * remote-utils.c (xml_escape_text): Delete.
16328 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16329 buffer_xml_printf): Move to common/buffer.c.
16330 * server.c (main): Remove call to initialize_inferiors.
16331 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16332 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16333 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16334 internal_error, gdb_assert, gdb_assert_fail): Delete.
16335 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16336 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16337 common/buffer.h.
16338 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16339 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16340 initialize_inferiors): Delete.
16341
16342 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16343
16344 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16345 symbol error.
16346
16347 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16348
16349 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16350 assertion.
16351 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16352
16353 2011-05-26 Yao Qi <yao@codesourcery.com>
16354
16355 * Makefile.in (thread-db.o): Track dependence to
16356 common/gdb_thread_db.h.
16357 * thread-db.c: include gdb_thread_db.h from right place.
16358
16359 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16360
16361 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16362 __FILE__ and __LINE__ to internal_error.
16363
16364 2011-05-13 Doug Evans <dje@google.com>
16365
16366 * thread-db.c (try_thread_db_load_from_sdir): New function.
16367 (try_thread_db_load_from_dir): New function.
16368 (thread_db_load_search): Handle $sdir, ignore $pdir.
16369 Remove trying of system directories if search of
16370 libthread-db-search-path fails, that is now done via $sdir.
16371
16372 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16373
16374 * server.c (handle_query): Add EnableDisableTracepoints to the list
16375 of supported features.
16376 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16377 tracepoints.
16378 (cmd_qtenable_disable): New.
16379 (cmd_qtstart): Install tracepoints even if disabled.
16380 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16381 receiving a QTEnable or QTDisable packet.
16382 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16383 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16384 tracepoints.
16385 (gdb_probe): Skip data collection if static tracepoint is disabled.
16386
16387 2011-05-10 Doug Evans <dje@google.com>
16388
16389 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16390
16391 2011-05-04 Doug Evans <dje@google.com>
16392
16393 * linux-low.c (linux_join): Skip process lookup.
16394 * spu-low.c (spu_join): Ditto.
16395 * server.c (join_inferiors_callback): Delete.
16396 (process_serial_event): For 'D' packet (detach) call join_inferior
16397 directly.
16398
16399 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16400
16401 * README: Don't mention xscale*-*-linux*.
16402 * configure.srv (xscale*-*-linux*): Don't handle target.
16403
16404 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16405
16406 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16407 casting pointers.
16408 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16409 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16410 (i386_emit_void_call_2): Likewise.
16411
16412 2011-04-26 Yao Qi <yao@codesourcery.com>
16413
16414 * linux-low.c: Move common macros to linux-ptrace.h.
16415 Include linux-ptrace.h.
16416 * Makefile.in (linux_ptrace_h): New.
16417 (linux-low.o): Depends on linux-ptrace.h.
16418
16419 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16420
16421 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16422 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16423 (remote_prepare): New function with most of the TCP code from ...
16424 (remote_open): ... here. Detect PORT here unconditionally. Move also
16425 setting transport_is_reliable.
16426 * server.c (run_once): New variable.
16427 (gdbserver_usage): Document it.
16428 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16429 the first run if RUN_ONCE.
16430 * server.h (run_once, remote_prepare): New declarations.
16431
16432 2011-04-19 Tom Tromey <tromey@redhat.com>
16433
16434 * win32-low.c (handle_load_dll): Remove duplicate "the".
16435
16436 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16437
16438 Remove support for old Cygwin 1.5 versions.
16439 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16440 function to avoid warning.
16441 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16442 warning.
16443
16444 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16445
16446 * gdbserver/server.h (Macro _): Define it if not available.
16447
16448 2011-03-14 Michael Snyder <msnyder@vmware.com>
16449
16450 * hostio.c (handle_close): Remove unnecessary null test.
16451
16452 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16453
16454 * Makefile.in (maintainer-clean realclean distclean): Remove
16455 "make ... subdir_do" command.
16456
16457 2011-03-10 Michael Snyder <msnyder@vmware.com>
16458
16459 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16460
16461 * server.c (handle_v_run): Free alloced buffer on early return.
16462
16463 2011-03-09 Yao Qi <yao@codesourcery.com>
16464
16465 Revert:
16466 2011-03-04 Yao Qi <yao@codesourcery.com>
16467
16468 * Makefile.in: Remove GNU make feature --directory.
16469
16470 2011-03-05 Yao Qi <yao@codesourcery.com>
16471
16472 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16473 (subdir_do): New make target. Copied from gdb/Makefile.
16474 (maintainer-clean, realclean, distclean, clean): Call corresponding
16475 make targets in common/Makefile.
16476
16477 2011-02-11 Yao Qi <yao@codesourcery.com>
16478
16479 * configure.ac: Call AC_PROG_RANLIB.
16480 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16481 * configure: Regenerate.
16482
16483 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16484
16485 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16486
16487 2011-03-06 Yao Qi <yao@codesourcery.com>
16488
16489 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16490
16491 2011-03-05 Yao Qi <yao@codesourcery.com>
16492
16493 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16494 (subdir_do): New make target. Copied from gdb/Makefile.
16495 (maintainer-clean, realclean, distclean, clean): Call corresponding
16496 make targets in common/Makefile.
16497
16498 2011-03-04 Yao Qi <yao@codesourcery.com>
16499
16500 * Makefile.in: Remove GNU make feature --directory.
16501
16502 2011-03-04 Michael Snyder <msnyder@vmware.com>
16503
16504 * server.c (queue_stop_reply): Call xmalloc not malloc.
16505
16506 2011-03-02 Michael Snyder <msnyder@vmware.com>
16507
16508 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16509
16510 2011-02-28 Michael Snyder <msnyder@vmware.com>
16511
16512 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16513 (cmd_qtframe): Ditto.
16514 (cmd_qtbuffer): Ditto.
16515 (cmd_bigqtbuffer): Ditto.
16516
16517 * utils.c (decimal2str): Initialize 'width' to nine, then
16518 don't mess with it.
16519
16520 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16521
16522 * hostio.c (require_data): Free *data, not data.
16523
16524 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16525
16526 * hostio.c (require_data): Use free, not xfree.
16527
16528 2011-02-27 Michael Snyder <msnyder@vmware.com>
16529
16530 * server.c (handle_query): Discard unused value.
16531
16532 * hostio.c (require_data): Free malloc memory before returning
16533 error.
16534
16535 2011-02-26 Michael Snyder <msnyder@vmware.com>
16536
16537 * linux-low.c (list_threads): Call closedir for dirent.
16538
16539 2011-02-27 Michael Snyder <msnyder@vmware.com>
16540
16541 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16542 a case statement falls through.
16543
16544 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16545
16546 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16547 in comparison.
16548
16549 2011-02-26 Michael Snyder <msnyder@vmware.com>
16550
16551 * utils.c (decimal2str): Eliminate dead code and dead param.
16552 (pulongest): Drop dead param from call to decimal2str.
16553 (plongest): Ditto.
16554
16555 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16556
16557 Revert the following patch (not approved yet):
16558 2011-02-21 Hui Zhu <teawater@gmail.com>
16559 * tracepoint.c (tp_printf): New function.
16560 (eval_agent_expr): Handle gdb_agent_op_printf.
16561
16562 2011-02-21 Hui Zhu <teawater@gmail.com>
16563
16564 * tracepoint.c (tp_printf): New function.
16565 (eval_agent_expr): Handle gdb_agent_op_printf.
16566
16567 2011-02-18 Tom Tromey <tromey@redhat.com>
16568
16569 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16570 (tracepoint.o): Likewise.
16571 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16572 (gdb_agent_op_names): Likewise.
16573
16574 2011-02-18 Tom Tromey <tromey@redhat.com>
16575
16576 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16577 gdb_agent_op_rot>: New constants.
16578 (gdb_agent_op_names): Add pick and roll.
16579 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16580 cases.
16581
16582 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16583
16584 * aclocal.m4: Regenerated with aclocal-1.11.1.
16585
16586 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16587
16588 * server.c (handle_qxfer_traceframe_info): New.
16589 (qxfer_packets): Register "traceframe-info".
16590 (handle_query): Report support for qXfer:traceframe-info:read+.
16591 * tracepoint.c (match_blocktype): New.
16592 (traceframe_find_block_type): Rename to ...
16593 (traceframe_walk_blocks): ... this. Add callback filter argument,
16594 and use it.
16595 (traceframe_find_block_type): New, reimplemented on top of
16596 traceframe_walk_blocks.
16597 (build_traceframe_info_xml): New.
16598 (traceframe_read_info): New.
16599 * server.h (traceframe_read_info): Declare.
16600
16601 2011-02-11 Yao Qi <yao@codesourcery.com>
16602
16603 * configure.ac: Call AC_PROG_RANLIB.
16604 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16605 * configure: Regenerate.
16606
16607 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16608
16609 * server.c (gdb_read_memory): Change return semantics to allow
16610 partial transfers.
16611 (handle_search_memory_1): Adjust.
16612 (process_serial_event) <'m' packet>: Handle partial transfers.
16613 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16614
16615 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16616
16617 * regcache.c (init_register_cache): Initialize
16618 regcache->register_status.
16619 (free_register_cache): Release regcache->register_status.
16620 (regcache_cpy): Copy register_status.
16621 (registers_to_string): Print 'x's for unavailable registers.
16622 (supply_register): Mark the register's status valid or
16623 unavailable, depending on whether a buffer was passed in or not.
16624 (supply_register_zeroed): New.
16625 (supply_regblock): Mark the registers' status valid or
16626 unavailable, depending on whether a buffer was passed in or not.
16627 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16628 (struct regcache): New `register_status' field.
16629 (supply_register_zeroed): Declare.
16630 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16631 supply_register_zeroed, rather than passing a NULL buffer to
16632 supply_register.
16633 * tracepoint.c (fetch_traceframe_registers): Update comment.
16634
16635 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16636
16637 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16638 buffer explicit.
16639
16640 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16641
16642 * server.h (decode_xfer_write): Change prototype.
16643 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16644 and don't extract the annex here.
16645 * server.c (decode_xfer_read): Remove `annex' parameter,
16646 and don't extract the annex here.
16647 (decode_xfer): New.
16648 (struct qxfer): New.
16649 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16650 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16651 (handle_qxfer_statictrace): New functions, abstracted out from
16652 handle_query, and made to use the struct qxfer interface.
16653 (handle_threads_qxfer_proper): Rename to ...
16654 (handle_qxfer_threads_proper): ... this.
16655 (handle_threads_qxfer): Rename to ...
16656 (handle_qxfer_threads): ... this. Adjust.
16657 (qxfer_packets): New array.
16658 (handle_qxfer): New function.
16659 (handle_query): Use handle_qxfer.
16660
16661 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16662
16663 * gdbreplay.c: Shorten lines of >= 80 columns.
16664 * linux-low.c: Ditto.
16665 * linux-ppc-low.c: Ditto.
16666 * linux-s390-low.c: Ditto.
16667 * linux-sparc-low.c: Ditto.
16668 * linux-x86-low.c: Ditto.
16669 * linux-xtensa-low.c: Ditto.
16670 * mem-break.c: Ditto.
16671 * nto-low.c: Ditto.
16672 * regcache.h: Ditto.
16673 * remote-utils.c: Ditto.
16674 * server.c: Ditto.
16675 * server.h: Ditto.
16676 * thread-db.c: Ditto.
16677 * tracepoint.c: Ditto.
16678 * utils.c: Ditto.
16679 * win32-low.h: Ditto.
16680
16681 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16682
16683 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16684 update.
16685
16686 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16687
16688 * server.c (gdbserver_version): Update copyright year in version
16689 output.
16690 * gdbreplay.c (gdbreplay_version): Ditto.
16691
16692 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16693
16694 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16695 * linux-bfin-low.c: New file.
16696 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16697 PT_DATA_ADDR for BFIN targets.
16698 * Makefile.in (SFILES): Add linux-bfin-low.c.
16699 (clean): Remove reg-bfin.c.
16700 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16701 * README: Mention supported Blackfin targets.
16702
16703 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16704
16705 * .gitignore: New file.
16706
16707 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16708
16709 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16710
16711 2010-10-22 Jie Zhang <jie@codesourcery.com>
16712
16713 * Makefile.in: Add FLAGS_TO_PASS variable.
16714 (install): Remove dependency of install-only and recursively
16715 invoke make for install-only.
16716
16717 2010-10-04 Doug Evans <dje@google.com>
16718
16719 * Makefile.in (uninstall): Use $(DESTDIR).
16720
16721 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16722
16723 PR gdb/11842
16724
16725 * linux-x86-low.c (compat_siginfo_from_siginfo)
16726 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16727 si_code is < 0. Check for si_code == SI_TIMER before checking for
16728 si_code < 0.
16729
16730 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16731
16732 * lynx-i386-low.c: New file.
16733 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16734
16735 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16736
16737 * lynx-low.c (ptrace_request_to_str): Remove handling for
16738 request values that have been removed in LynxOS 5.x.
16739
16740 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16741
16742 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16743 <ptrace.h>
16744
16745 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16746
16747 * configure.ac: Add --enable-inprocess-agent option.
16748 * configure: Rebuilt.
16749
16750 2010-09-06 Yao Qi <yao@codesourcery.com>
16751
16752 * linux-low.c (linux_kill): Remove unused variable.
16753 (linux_stabilize_threads): Likewise.
16754 * server.c (start_inferior): Likewise.
16755 (queue_stop_reply_callback): Likewise.
16756 * tracepoint.c (do_action_at_tracepoint): Likewise.
16757
16758 2010-09-06 Yao Qi <yao@codesourcery.com>
16759
16760 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16761 on return.
16762
16763 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16764
16765 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16766
16767 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16768
16769 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16770 "$(IPA_DEPFILES)".
16771
16772 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16773
16774 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16775 gdbserver/lynx-ppc-low.c: New files.
16776 * Makefile.in (lynx_low_h): New variable.
16777 (lynx-low.o, lynx-ppc-low.o): New rules.
16778 * configure.ac: On LynxOS, link with -lnetinet.
16779 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16780 * configure: regenerate.
16781
16782 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16783
16784 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16785 * configure.ac: Add check for vasprintf and vsnprintf.
16786 * configure, config.in: Regenerate.
16787 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16788
16789 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16790
16791 * gdbreplay.c: Move include of alloca.h up, next to include of
16792 malloc.h.
16793 * server.h: Add include of malloc.h.
16794 * mem-break.c: Remove include of malloc.h.
16795 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16796
16797 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16798
16799 * Makefile.in (memmem.o): Build with -Wno-error.
16800
16801 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16802
16803 * utils.c (xsnprintf): Make non-static.
16804 * server.h: Add xsnprintf declaration.
16805 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16806 replace calls to snprintf by calls to xsnprintf throughout.
16807
16808 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16809
16810 * configure.ac: Add configure check for alloca.
16811 * configure, config.in: Regenerate.
16812 * server.h: Include alloca.h if it exists.
16813 * gdbreplay.c: Include alloca.h if it exists.
16814
16815 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16816
16817 * linux-low.c (__SIGRTMIN): Define if not already defined.
16818 (linux_create_inferior): Check for __ANDROID__ rather than
16819 __SIGRTMIN.
16820 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16821 are already deferred.
16822 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16823 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16824 stopped and already has a pending signal to report.
16825 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16826 a pending signal to report or is moving out of a jump pad.
16827 (linux_init_signals): Check for __ANDROID__ rather than
16828 __SIGRTMIN.
16829
16830 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16831
16832 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16833 debug_threads check. Avoid a linear search when not doing debug
16834 output.
16835
16836 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16837
16838 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16839 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16840 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16841 (process_event): Change local fd's type to gdb_fildes_t.
16842 (create_file_handler): Adjust prototype.
16843 (delete_file_handler): Adjust prototype.
16844 (handle_file_event): Adjust prototype. Use pfildes.
16845 (create_file_event): Adjsut prototype.
16846 * remote-utils.c (remote_desc, listen_desc): Change type to
16847 gdb_fildes_t.
16848 * server.h: New gdb_fildes_t typedef.
16849 [USE_WIN32API]: Include winsock2.h.
16850 (delete_file_handler, add_file_handler): Adjust prototypes.
16851 (pfildes): Declare.
16852 * utils.c (pfildes): New.
16853
16854 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16855
16856 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16857 * configure: Regenerate.
16858
16859 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16860
16861 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16862 (linux_done_accessing_memory): ... this.
16863 (linux_target_ops): Adjust.
16864 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16865 * nto-low.c (nto_target_ops): Adjust comment.
16866 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16867 * spu-low.c (spu_target_ops): Adjust comment.
16868 * target.h (target_ops): Rename unprepare_to_access_memory field
16869 to done_accessing_memory.
16870 (unprepare_to_access_memory): Rename to ...
16871 (done_accessing_memory): ... this.
16872
16873 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16874
16875 * linux-low.c (linux_prepare_to_access_memory): New.
16876 (linux_unprepare_to_access_memory): New.
16877 (linux_target_ops): Install them.
16878 * server.c (read_memory): Rename to ...
16879 (gdb_read_memory): ... this. Use
16880 prepare_to_access_memory/prepare_to_access_memory.
16881 (write_memory): Rename to ...
16882 (gdb_write_memory): ... this. Use
16883 prepare_to_access_memory/prepare_to_access_memory.
16884 (handle_search_memory_1): Adjust.
16885 (process_serial_event): Adjust.
16886 * target.h (struct target_ops): New fields
16887 prepare_to_access_memory and unprepare_to_access_memory.
16888 (prepare_to_access_memory, unprepare_to_access_memory): New.
16889 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16890 prepare_to_access_memory/prepare_to_access_memory.
16891 * nto-low.c (nto_target_ops): Adjust.
16892 * spu-low.c (spu_target_ops): Adjust.
16893 * win32-low.c (win32_target_ops): Adjust.
16894
16895 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16896
16897 * Makefile.in (WARN_CFLAGS): Get it from configure.
16898 (WERROR_CFLAGS): New.
16899 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16900 * configure.ac: Introduce --enable-werror, which adds -Werror to
16901 the compiler command line. Enabled by default. Disable with
16902 --disable-werror. Add -Wdeclaration-after-statement
16903 Wpointer-arith and -Wformat-nonliteral to warning flags.
16904 * configure: Regenerate.
16905
16906 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16907
16908 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16909
16910 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16911
16912 * gdbreplay.c (remote_error): New.
16913 (gdbchar): New.
16914 (expect): Use gdbchar. Check for error reading from GDB.
16915 Clarify sync error output.
16916 (play): Check for errors writing to GDB.
16917 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16918 * remote-utils.c (getpkt): Check for errors writing to the remote
16919 descriptor.
16920
16921 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16922
16923 * linux-low.c (linux_wait_1): Move non-debugging code out of
16924 `debug_threads' control.
16925
16926 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16927
16928 * linux-low.c (linux_wait_1): Don't set last_status here.
16929 * server.c (push_event, queue_stop_reply_callback): Assert we're
16930 not pushing a TARGET_WAITKIND_IGNORE event.
16931 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16932 (myresume, handle_target_event): Set the thread's last_resume_kind
16933 and last_status from the target returned status.
16934
16935 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16936
16937 PR threads/10729
16938
16939 * linux-x86-low.c (update_debug_registers_callback): New.
16940 (i386_dr_low_set_addr): Use it.
16941 (i386_dr_low_get_addr): New.
16942 (i386_dr_low_set_control): Use update_debug_registers_callback.
16943 (i386_dr_low_get_control): New.
16944 (i386_dr_low_get_status): Adjust.
16945 * linux-low.c (linux_stop_lwp): New.
16946 * linux-low.h (linux_stop_lwp): Declare.
16947
16948 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16949 argument instead of a i386_debug_reg_state.
16950 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16951 a i386_debug_reg_state.
16952 (i386_insert_aligned_watchpoint): Adjust.
16953 (i386_remove_aligned_watchpoint): Adjust.
16954 (i386_low_stopped_data_address): Read the debug registers from the
16955 inferior instead of from the mirrors.
16956 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16957 (i386_dr_low_get_addr): Declare.
16958 (i386_dr_low_get_control): Declare.
16959 (i386_dr_low_get_status): Change prototype.
16960
16961 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16962 (i386_dr_low_get_addr): New.
16963 (i386_dr_low_get_control): New.
16964 (i386_dr_low_get_status): Adjust prototype. Return
16965 dr_status_mirror.
16966 (i386_initial_stuff): Clear dr_status_mirror and
16967 dr_control_mirror.
16968 (i386_get_thread_context): Adjust.
16969 (i386_set_thread_context): Adjust.
16970 (i386_thread_added): Adjust.
16971
16972 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16973
16974 * linux-low.h (linux_thread_area): Delete declaration.
16975
16976 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16977
16978 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16979 after its termination.
16980
16981 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16982
16983 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16984 (gdb_wants_all_stopped): Delete.
16985 (linux_wait_1): Don't call them.
16986 * server.c (handle_v_cont): Tag all threads as want-stopped.
16987 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16988 stopped as "client-wants-stopped".
16989
16990 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16991
16992 * Makefile.in (signals_h): New.
16993 (server_h): Depend on it.
16994 (server.o): Don't depend on $(signals_def).
16995 (signals.o): Depend on $(signals_def).
16996
16997 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16998
16999 * Makefile.in (signals_def): New.
17000 (server_h): Append include/gdb/signals.h and signals_def.
17001 (server.o): Append signals_def.
17002
17003 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17004
17005 * server.c (handle_target_event): Use target_signal_to_host for
17006 resume_info.sig initialization.
17007 * target.h (struct thread_resume) <sig>: New comment.
17008
17009 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17010
17011 * server.c (handle_query): strcpy() the returned string from paddress()
17012 instead of sprintf().
17013 * utils.c (paddress): Return phex_nz().
17014
17015 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17016
17017 * server.c (handle_v_cont): Call mourn_inferior if process
17018 just exited.
17019 (myresume): Likewise.
17020
17021 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17022
17023 Static tracepoints, and integration with UST.
17024
17025 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17026 * mem-break.c (uninsert_all_breakpoints)
17027 (reinsert_all_breakpoints): New.
17028 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17029 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17030 (gdb_agent_ust_loaded, helper_thread_id)
17031 (gdb_agent_helper_thread_id): New macros.
17032 (struct ipa_sym_addresses): Add addr_ust_loaded,
17033 addr_helper_thread_id, addr_cmd_buf.
17034 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17035 (in_process_agent_loaded_ust): New.
17036 (write_e_ust_not_loaded): New.
17037 (maybe_write_ipa_ust_not_loaded): New.
17038 (struct collect_static_trace_data_action): New.
17039 (enum tracepoint_type) <static_tracepoint>: New.
17040 (struct tracepoint) <handle>: Mention static tracepoints.
17041 (struct static_tracepoint_ctx): New.
17042 (CMD_BUF_SIZE): New.
17043 (add_tracepoint_action): Handle static tracepoint actions.
17044 (unprobe_marker_at): New.
17045 (clear_installed_tracepoints): Handle static tracepoints.
17046 (cmd_qtdp): Handle static tracepoints.
17047 (probe_marker_at): New.
17048 (cmd_qtstart): Handle static tracepoints.
17049 (response_tracepoint): Handle static tracepoints.
17050 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17051 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17052 (get_context_regcache): Handle static tracepoints.
17053 (do_action_at_tracepoint): Handle static tracepoint actions.
17054 (traceframe_find_block_type): Handle static trace data blocks.
17055 (traceframe_read_sdata): New.
17056 (download_tracepoints): Download static tracepoint actions.
17057 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17058 (GDB_PROBE_NAME): New.
17059 (ust_ops): New.
17060 (GET_UST_SYM): New.
17061 (USTF): New.
17062 (dlsym_ust): New.
17063 (ust_marker_to_static_tracepoint): New.
17064 (gdb_probe): New.
17065 (collect_ust_data_at_tracepoint): New.
17066 (gdb_ust_probe): New.
17067 (UNIX_PATH_MAX, SOCK_DIR): New.
17068 (gdb_ust_connect_sync_socket): New.
17069 (resume_thread, stop_thread): New.
17070 (run_inferior_command): New.
17071 (init_named_socket): New.
17072 (gdb_ust_socket_init): New.
17073 (cstr_to_hexstr): New.
17074 (next_st): New.
17075 (first_marker, next_marker): New.
17076 (response_ust_marker): New.
17077 (cmd_qtfstm, cmd_qtsstm): New.
17078 (unprobe_marker_at, probe_marker_at): New.
17079 (cmd_qtstmat, gdb_ust_thread): New.
17080 (gdb_ust_init): New.
17081 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17082 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17083 (ST_REGENTRY): New.
17084 (x86_64_st_collect_regmap): New.
17085 (X86_64_NUM_ST_COLLECT_GREGS): New.
17086 (AMD64_RIP_REGNUM): New.
17087 (supply_static_tracepoint_registers): New.
17088 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17089 (ST_REGENTRY): New.
17090 (i386_st_collect_regmap): New.
17091 (i386_NUM_ST_COLLECT_GREGS): New.
17092 (supply_static_tracepoint_registers): New.
17093 * server.c (handle_query): Handle qXfer:statictrace:read.
17094 <qSupported>: Report support for StaticTracepoints, and
17095 qXfer:statictrace:read features.
17096 * server.h (traceframe_read_sdata)
17097 (supply_static_tracepoint_registers): Declare.
17098 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17099 (unpack_varlen_hex): Include in IPA build.
17100 * Makefile.in (ustlibs, ustinc): New.
17101 (IPA_OBJS): Add remote-utils-ipa.o.
17102 ($(IPA_LIB)): Link -ldl and -lpthread.
17103 (UST_CFLAGS): New.
17104 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17105 * config.in, configure: Regenerate.
17106
17107 2010-06-20 Ian Lance Taylor <iant@google.com>
17108 Pedro Alves <pedro@codesourcery.com>
17109
17110 * linux-x86-low.c (always_true): Delete.
17111 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17112 trying to fool the compiler with always_true.
17113
17114 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17115
17116 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17117 conditions in gdbserver.
17118
17119 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17120
17121 * spu-low.c (spu_read_memory): Wrap around local store limit.
17122 (spu_write_memory): Likewise.
17123
17124 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17125
17126 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17127 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17128 LONGEST uses.
17129 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17130 uses.
17131 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17132 uses with LONGEST uses.
17133
17134 2010-06-14 Stan Shebs <stan@codesourcery.com>
17135 Pedro Alves <pedro@codesourcery.com>
17136
17137 Bytecode compiler.
17138
17139 * linux-x86-low.c: Include limits.h.
17140 (add_insns): New.
17141 (always_true): New.
17142 (EMIT_ASM): New.
17143 (EMIT_ASM32): New.
17144 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17145 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17146 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17147 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17148 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17149 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17150 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17151 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17152 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17153 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17154 (amd64_emit_void_call_2): New.
17155 (amd64_emit_ops): New.
17156 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17157 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17158 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17159 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17160 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17161 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17162 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17163 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17164 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17165 (i386_emit_stack_adjust, i386_emit_int_call_1)
17166 (i386_emit_void_call_2): New.
17167 (i386_emit_ops): New.
17168 (x86_emit_ops): New.
17169 (the_low_target): Install x86_emit_ops.
17170 * server.h (struct emit_ops): New.
17171 (get_raw_reg_func_addr): Declare.
17172 (current_insn_ptr, emit_error): Declare.
17173 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17174 (set_trace_state_variable_value): New defines.
17175 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17176 addr_get_trace_state_variable_value and
17177 addr_set_trace_state_variable_value.
17178 (symbol_list): New fields for get_raw_reg,
17179 get_trace_state_variable_value and set_trace_state_variable_value.
17180 (condfn): New typedef.
17181 (struct tracepoint): New field `compiled_cond'.
17182 (do_action_at_tracepoint): Clear compiled_cond.
17183 (get_trace_state_variable_value, set_trace_state_variable_value):
17184 Export in the IPA.
17185 (condition_true_at_tracepoint): If there's a compiled condition,
17186 run that.
17187 (current_insn_ptr, emit_error): New globals.
17188 (struct bytecode_address): New.
17189 (get_raw_reg_func_addr): New.
17190 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17191 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17192 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17193 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17194 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17195 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17196 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17197 (compile_tracepoint_condition, compile_bytecodes): New.
17198 * target.h (emit_ops): Forward declare.
17199 (struct target_ops): New field emit_ops.
17200 (target_emit_ops): New.
17201 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17202 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17203 * linux-low.c (linux_emit_ops): New.
17204 (linux_target_ops): Install it.
17205 * linux-low.h (struct linux_target_ops): New field emit_ops.
17206
17207 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17208
17209 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17210 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17211
17212 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17213 Stan Shebs <stan@codesourcery.com>
17214
17215 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17216 (all): Depend on $(extra_libraries).
17217 (install-only): Install the IPA.
17218 (IPA_OBJS, IPA_LIB): New.
17219 (clean): Remove the IPA lib.
17220 (IPAGENT_CFLAGS): New.
17221 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17222 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17223 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17224 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17225 * configure.ac: Check for atomic builtins support in the compiler.
17226 (IPA_DEPFILES, extra_libraries): Define.
17227 * configure.srv (ipa_obj): Add description.
17228 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17229 (i[34567]86-*-linux*): Set ipa_obj.
17230 (x86_64-*-linux*): Set ipa_obj.
17231 * linux-low.c (stabilizing_threads): New.
17232 (supports_fast_tracepoints): New.
17233 (linux_detach): Stabilize threads before detaching.
17234 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17235 the lwp is either not stabilizing, or is moving out of a jump pad.
17236 (linux_fast_tracepoint_collecting): New.
17237 (maybe_move_out_of_jump_pad): New.
17238 (enqueue_one_deferred_signal): New.
17239 (dequeue_one_deferred_signal): New.
17240 (linux_wait_for_event_1): If moving out of a jump pad, defer
17241 pending signals to later.
17242 (linux_stabilize_threads): New.
17243 (linux_wait_1): Check if threads need moving out of jump pads, and
17244 do it if so.
17245 (stuck_in_jump_pad_callback): New.
17246 (move_out_of_jump_pad_callback): New.
17247 (lwp_running): New.
17248 (linux_resume_one_lwp): Handle moving out of jump pads.
17249 (linux_set_resume_request): Dequeue deferred signals.
17250 (need_step_over_p): Also step over fast tracepoint jumps.
17251 (start_step_over): Also uninsert fast tracepoint jumps.
17252 (finish_step_over): Also reinsert fast tracepoint jumps.
17253 (linux_install_fast_tracepoint_jump): New.
17254 (linux_target_ops): Install linux_stabilize_threads and
17255 linux_install_fast_tracepoint_jump_pad.
17256 * linux-low.h (linux_target_ops) <get_thread_area,
17257 install_fast_tracepoint_jump_pad>: New fields.
17258 (struct lwp_info) <collecting_fast_tracepoint,
17259 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17260 (linux_get_thread_area): Declare.
17261 * linux-x86-low.c (jump_insn): New.
17262 (x86_get_thread_area): New.
17263 (append_insns): New.
17264 (push_opcode): New.
17265 (amd64_install_fast_tracepoint_jump_pad): New.
17266 (i386_install_fast_tracepoint_jump_pad): New.
17267 (x86_install_fast_tracepoint_jump_pad): New.
17268 (the_low_target): Install x86_get_thread_area and
17269 x86_install_fast_tracepoint_jump_pad.
17270 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17271 (struct fast_tracepoint_jump): New.
17272 (fast_tracepoint_jump_insn): New.
17273 (fast_tracepoint_jump_shadow): New.
17274 (find_fast_tracepoint_jump_at): New.
17275 (fast_tracepoint_jump_here): New.
17276 (delete_fast_tracepoint_jump): New.
17277 (set_fast_tracepoint_jump): New.
17278 (uninsert_fast_tracepoint_jumps_at): New.
17279 (reinsert_fast_tracepoint_jumps_at): New.
17280 (set_breakpoint_at): Use write_inferior_memory.
17281 (uninsert_raw_breakpoint): Use write_inferior_memory.
17282 (check_mem_read): Mask out fast tracepoint jumps.
17283 (check_mem_write): Mask out fast tracepoint jumps.
17284 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17285 (set_fast_tracepoint_jump): Declare.
17286 (delete_fast_tracepoint_jump)
17287 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17288 (reinsert_fast_tracepoint_jumps_at): Declare.
17289 * regcache.c: Don't compile many functions when building the
17290 in-process agent library.
17291 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17292 the register buffer in the heap.
17293 (free_register_cache): If the register buffer isn't owned by the
17294 regcache, don't free it.
17295 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17296 pre-existing register caches.
17297 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17298 type.
17299 (convert_ascii_to_int): : Constify `from' parameter type.
17300 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17301 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17302 the needed buffer in-place.
17303 (relocate_instruction): New.
17304 * server.c (handle_query) <qSymbols>: If the target supports
17305 tracepoints, give it a chance of looking up symbols. Report
17306 support for fast tracepoints.
17307 (handle_status): Stabilize threads.
17308 (process_serial_event): Adjust.
17309 * server.h (struct fast_tracepoint_jump): Forward declare.
17310 (struct process_info) <fast_tracepoint_jumps>: New field.
17311 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17312 (decode_X_packet, decode_M_packet): Adjust.
17313 (relocate_instruction): Declare.
17314 (in_process_agent_loaded): Declare.
17315 (tracepoint_look_up_symbols): Declare.
17316 (struct fast_tpoint_collect_status): Declare.
17317 (fast_tracepoint_collecting): Declare.
17318 (force_unlock_trace_buffer): Declare.
17319 (handle_tracepoint_bkpts): Declare.
17320 (initialize_low_tracepoint)
17321 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17322 * target.h (struct target_ops) <stabilize_threads,
17323 install_fast_tracepoint_jump_pad>: New fields.
17324 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17325 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17326 [HAVE_STDINT_H]: Include stdint.h.
17327 (trace_debug_1): Rename to ...
17328 (trace_vdebug): ... this.
17329 (trace_debug): Rename to ...
17330 (trace_debug_1): ... this. Add `level' parameter.
17331 (trace_debug): New.
17332 (ATTR_USED, ATTR_NOINLINE): New.
17333 (IP_AGENT_EXPORT): New.
17334 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17335 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17336 (about_to_request_buffer_space, trace_buffer_is_full)
17337 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17338 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17339 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17340 (traceframe_write_count, traceframes_created)
17341 (trace_state_variables)
17342 New renaming defines.
17343 (struct ipa_sym_addresses): New.
17344 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17345 (symbol_list): New.
17346 (ipa_sym_addrs): New.
17347 (all_tracepoint_symbols_looked_up): New.
17348 (in_process_agent_loaded): New.
17349 (write_e_ipa_not_loaded): New.
17350 (maybe_write_ipa_not_loaded): New.
17351 (tracepoint_look_up_symbols): New.
17352 (debug_threads) [IN_PROCESS_AGENT]: New.
17353 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17354 (UNKNOWN_SIDE_EFFECTS): New.
17355 (stop_tracing): New.
17356 (flush_trace_buffer): New.
17357 (stop_tracing_bkpt): New.
17358 (flush_trace_buffer_bkpt): New.
17359 (read_inferior_integer): New.
17360 (read_inferior_uinteger): New.
17361 (read_inferior_data_pointer): New.
17362 (write_inferior_data_pointer): New.
17363 (write_inferior_integer): New.
17364 (write_inferior_uinteger): New.
17365 (struct collect_static_trace_data_action): Delete.
17366 (enum tracepoint_type): New.
17367 (struct tracepoint) <type>: New field `type'.
17368 <actions_str, step_actions, step_actions_str>: Only include in
17369 GDBserver.
17370 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17371 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17372 (tracepoints): Use IP_AGENT_EXPORT.
17373 (last_tracepoint): Don't include in the IPA.
17374 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17375 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17376 (alloced_trace_state_variables): New.
17377 (trace_state_variables): Use IP_AGENT_EXPORT.
17378 (traceframe_t): Delete unused variable.
17379 (circular_trace_buffer): Don't include in the IPA.
17380 (trace_buffer_start): Delete.
17381 (struct trace_buffer_control): New.
17382 (trace_buffer_free): Delete.
17383 (struct ipa_trace_buffer_control): New.
17384 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17385 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17386 New.
17387 (trace_buffer_ctrl): New.
17388 (TRACE_BUFFER_CTRL_CURR): New.
17389 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17390 Reimplement as macros.
17391 (trace_buffer_wrap): Delete.
17392 (traceframe_write_count, traceframe_read_count)
17393 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17394 (struct tracepoint_hit_ctx) <type>: New field.
17395 (struct fast_tracepoint_ctx): New.
17396 (memory_barrier): New.
17397 (cmpxchg): New.
17398 (record_tracepoint_error): Update atomically in the IPA.
17399 (clear_inferior_trace_buffer): New.
17400 (about_to_request_buffer_space): New.
17401 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17402 updating the same buffer.
17403 (add_tracepoint): Default the tracepoint's type to trap
17404 tracepoint, and orig_size to -1.
17405 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17406 internal variables.
17407 (create_trace_state_variable): New parameter `gdb'. Handle it.
17408 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17409 (cmd_qtdp): Handle fast tracepoints.
17410 (cmd_qtdv): Adjust.
17411 (max_jump_pad_size): New.
17412 (gdb_jump_pad_head): New.
17413 (get_jump_space_head): New.
17414 (claim_jump_space): New.
17415 (sort_tracepoints): New.
17416 (MAX_JUMP_SIZE): New.
17417 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17418 IPA.
17419 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17420 support. Upload fast traceframes, and delete internal IPA
17421 breakpoints.
17422 (stop_tracing_handler): New.
17423 (flush_trace_buffer_handler): New.
17424 (cmd_qtstop): Upload fast tracepoints.
17425 (response_tracepoint): Handle fast tracepoints.
17426 (tracepoint_finished_step): Upload fast traceframes. Set the
17427 tracepoint hit context's tracepoint type.
17428 (handle_tracepoint_bkpts): New.
17429 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17430 type. Add comment about fast tracepoints.
17431 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17432 non-existing action_str field.
17433 (get_context_regcache): Handle fast tracepoints.
17434 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17435 to the regcache.
17436 (fast_tracepoint_from_jump_pad_address): New.
17437 (fast_tracepoint_from_ipa_tpoint_address): New.
17438 (collecting_t): New.
17439 (force_unlock_trace_buffer): New.
17440 (fast_tracepoint_collecting): New.
17441 (collecting): New.
17442 (gdb_collect): New.
17443 (write_inferior_data_ptr): New.
17444 (target_tp_heap): New.
17445 (target_malloc): New.
17446 (download_agent_expr): New.
17447 (UALIGN): New.
17448 (download_tracepoints): New.
17449 (download_trace_state_variables): New.
17450 (upload_fast_traceframes): New.
17451 (IPA_FIRST_TRACEFRAME): New.
17452 (IPA_NEXT_TRACEFRAME_1): New.
17453 (IPA_NEXT_TRACEFRAME): New.
17454 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17455 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17456 (gdb_jump_pad_buffer_end): New.
17457 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17458 (initialize_tracepoint): Adjust.
17459 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17460 buffer. Initialize the low module.
17461 * utils.c (PREFIX, TOOLNAME): New.
17462 (malloc_failure): Use PREFIX.
17463 (error): In the IPA, an error causes an exit.
17464 (fatal, warning): Use PREFIX.
17465 (internal_error): Use TOOLNAME.
17466 (NUMCELLS): Increase to 10.
17467 * configure, config.in: Regenerate.
17468
17469 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17470
17471 * server.c (handle_query) <qSupported>: Do two passes over the
17472 qSupported string to avoid nesting strtok.
17473
17474 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17475
17476 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17477 (CDEPS): New.
17478 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17479 -Wl,--dynamic-list.
17480 * configure: Regenerate.
17481 * proc-service.list: New.
17482
17483 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17484
17485 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17486 New comment.
17487
17488 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17489
17490 * gdbreplay.c (remote_open): Check error return from socket() call by
17491 its equality to -1 not by it being negative.
17492 * remote-utils.c (remote_open): Likewise.
17493
17494 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17495
17496 * config.h: Regenerate.
17497
17498 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17499
17500 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17501 doesn't provide PTRACE_GET_THREAD_AREA.
17502
17503 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17504
17505 * linux-m68k-low.c: Include <asm/ptrace.h>
17506 (ps_get_thread_area): Implement.
17507
17508 2010-05-03 Doug Evans <dje@google.com>
17509
17510 * event-loop.c (struct callback_event): New struct.
17511 (callback_list): New global.
17512 (append_callback_event, delete_callback_event): New functions.
17513 (process_callback): New function.
17514 (start_event_loop): Call it.
17515 * remote-utils.c (NOT_SCHEDULED): Define.
17516 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17517 moved out of readchar.
17518 (readchar): Rewrite. Call reschedule before returning.
17519 (reset_readchar): New function.
17520 (remote_close): Call it.
17521 (process_remaining, reschedule): New functions.
17522 * server.h (callback_handler_func): New typedef.
17523 (append_callback_event, delete_callback_event): Declare.
17524
17525 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17526
17527 * proc-service.c (ps_pglobal_lookup): Use
17528 thread_db_look_up_one_symbol.
17529 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17530 parameter. Use it instead of all_symbols_looked_up.
17531 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17532 field.
17533 (all_symbols_looked_up): Don't declare.
17534 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17535 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17536 field.
17537 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17538 Set all_symbols_looked_up here.
17539 (thread_db_look_up_one_symbol): New.
17540 (thread_db_get_tls_address): Adjust.
17541 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17542 thread_db object on the heap, and tentatively set it in the
17543 process structure.
17544 (thread_db_init): Don't set all_symbols_looked_up here.
17545 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17546
17547 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17548
17549 * linux-low.c (linux_kill, linux_detach): Adjust.
17550 (status_pending_p_callback): Remove redundant statement. Check
17551 for !TARGET_WAITIKIND_IGNORE, instead of
17552 TARGET_WAITKIND_STOPPED.
17553 (handle_tracepoints): Make sure LWP is locked. Adjust.
17554 (linux_wait_for_event_1): Adjust.
17555 (linux_cancel_breakpoints): New.
17556 (unsuspend_one_lwp): New.
17557 (unsuspend_all_lwps): New.
17558 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17559 (send_sigstop_callback): Change return type to int, add new
17560 `except' parameter and handle it.
17561 (suspend_and_send_sigstop_callback): New.
17562 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17563 pass them down. If SUSPEND, also increment the lwp's suspend
17564 count.
17565 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17566 (need_step_over_p): Don't consider suspended LWPs.
17567 (start_step_over): Adjust.
17568 (proceed_one_lwp): Change return type to int, add new `except'
17569 parameter and handle it.
17570 (unsuspend_and_proceed_one_lwp): New.
17571 (proceed_all_lwps): Use find_inferior instead of
17572 for_each_inferior.
17573 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17574 also decrement the suspend count of LWPs. Pass `except' down,
17575 instead of hacking its suspend count.
17576 (linux_pause_all): Add `freeze' parameter. Adjust.
17577 (linux_unpause_all): New.
17578 (linux_target_ops): Install linux_unpause_all.
17579 * server.c (handle_status): Adjust.
17580 * target.h (struct target_ops): New fields `unpause_all' and
17581 `cancel_breakpoints'. Add new parameter to `pause_all'.
17582 (pause_all): Add new `freeze' parameter.
17583 (unpause_all): New.
17584 (cancel_breakpoints): New.
17585 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17586 cancel breakpoints.
17587 (cmd_qtstart): Pause threads.
17588 (stop_tracing): Pause threads, and cancel breakpoints.
17589 * win32-low.c (win32_target_ops): Adjust.
17590
17591 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17592
17593 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17594 the inferior right away from here...
17595 (linux_wait_1): ... to here, and adjust to check the thread's
17596 last_resume_kind instead of the lwp's step or stop_expected flags.
17597
17598 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17599
17600 * README: Use consistent `GDB' and `GDBserver' spellings.
17601
17602 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17603
17604 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17605 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17606 (linux_detach_one_lwp): Assume the lwp is stopped.
17607 (any_thread_of): Delete.
17608 (linux_detach): Stop all lwps here. Don't blindly delete all
17609 breakpoints.
17610 (delete_lwp_callback): New.
17611 (linux_mourn): Delete all lwps of the process that is gone.
17612 (linux_wait_1): Don't delete the last lwp of the process here.
17613 * mem-break.h (mark_breakpoints_out): Declare.
17614 * mem-break.c (mark_breakpoints_out): New.
17615 (free_all_breakpoints): Use it.
17616 * server.c (handle_target_event): If the process is gone, mark
17617 breakpoints out.
17618 * thread-db.c (struct thread_db) <create_bp>: New field.
17619 (thread_db_enable_reporting): Fix prototype. Store a thread event
17620 breakpoint reference in the thread_db struct.
17621 (thread_db_load_search): Clear the thread_db object.
17622 (try_thread_db_load_1): Ditto.
17623 (switch_to_process): New.
17624 (disable_thread_event_reporting): Use it.
17625 (remove_thread_event_breakpoints): New.
17626 (thread_db_detach, thread_db_mourn): Use it.
17627
17628 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17629
17630 * linux-low.c (linux_enable_event_reporting): New.
17631 (linux_wait_for_event_1, handle_extended_wait): Use it.
17632
17633 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17634
17635 * linux-low.c (linux_kill_one_lwp, linux_kill)
17636 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17637 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17638 SIGSTOP even if the LWP is stopped.
17639 (send_sigstop_callback): New.
17640 (stop_all_lwps): Use send_sigstop_callback instead.
17641 (linux_resume_one_thread): Adjust.
17642 (proceed_one_lwp): Still proceed an LWP that the client has
17643 requested to stop, if we haven't reported it as stopped yet. Make
17644 sure that LWPs the client want stopped, have a pending SIGSTOP.
17645
17646 2010-04-26 Doug Evans <dje@google.com>
17647
17648 * server.c (handle_general_set): Make static.
17649
17650 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17651 Print received char after testing for error/eof instead of before.
17652 (input_interrupt): Tweak comment.
17653
17654 2010-04-23 Doug Evans <dje@google.com>
17655
17656 * server.c (start_inferior): Print inferior argv if --debug.
17657
17658 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17659
17660 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17661 * nto-x86-low.c: Include server.h
17662
17663 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17664
17665 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17666 be consistent with other sources of this directory.
17667 (init_registers_amd64): Correct name of source file of this function
17668 in the comment.
17669
17670 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17671
17672 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17673 64-bit executables.
17674
17675 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17676
17677 * win32-i386-low.c: Add 64-bit support.
17678 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17679 (init_registers_amd64): Declare.
17680 (mappings): Add 64-bit version of array.
17681 (init_windows_x86): New function.
17682 (the_low_target): Change init_arch field to init_windows_x86.
17683
17684 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17685
17686 * win32-low.c: Adapt to support also 64-bit architecture.
17687 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17688 (get_image_name): Use SIZE_T type for local variable `done'.
17689 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17690 (toolhelp_get_dll_name): Idem.
17691 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17692 Use uintptr_t typecast to avoid warning.
17693 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17694 (handle_exception): Use phex_nz to avoid warning.
17695 (win32_wait): Remove unused local variable `process'.
17696
17697 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17698
17699 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17700 `amd64-avx.o'.
17701
17702 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17703
17704 * configure.ac: Use `ws2_32' library for srv_mingw.
17705 * configure: Regenerate.
17706 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17707 * remote-utils.c: Likewise.
17708
17709 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17710
17711 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17712 if __x86_64__ is defined.
17713
17714 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17715
17716 * configure: Regenerate.
17717
17718 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17719
17720 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17721 * target.h (target_ops): New get_tib_address field.
17722 * win32-low.h (win32_thread_info): Add thread_local_base field.
17723 * win32-low.c (child_add_thread): Add tlb argument.
17724 Set thread_local_base field to TLB.
17725 (get_child_debug_event): Adapt to child_add_thread change.
17726 (win32_get_tib_address): New function.
17727 (win32_target_ops): Set get_tib_address field to
17728 win32_get_tib_address.
17729 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17730
17731 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17732
17733 * linux-low.c (linux_mourn): Also remove the process.
17734 * server.c (handle_target_event): Don't remove the process here.
17735 * nto-low.c (nto_mourn): New.
17736 (nto_target_ops): Install it.
17737 * spu-low.c (spu_mourn): New.
17738 (spu_target_ops): Install it.
17739 * win32-low.c (win32_mourn): New.
17740 (win32_target_ops): Install it.
17741
17742 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17743
17744 * server.h (buffer_xml_printf): Remove redundant `;'.
17745
17746 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17747
17748 * regcache.c (set_register_cache): Invalidate regcaches before
17749 changing the register cache layout.
17750 (regcache_invalidate_one): Allow a NULL regcache.
17751 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17752 regcaches before changing the register cache layout or the target
17753 regsets.
17754
17755 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17756
17757 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17758 variable warning on Linux/x86-64.
17759
17760 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17761
17762 GDBserver disconnected tracing support.
17763
17764 * linux-low.c (linux_remove_process): Delete.
17765 (add_lwp): Don't set last_resume_kind here.
17766 (linux_kill): Use `mourn'.
17767 (linux_detach): Use `thread_db_detach', and `mourn'.
17768 (linux_mourn): New.
17769 (linux_attach_lwp_1): Adjust comment.
17770 (linux_attach): last_resume_kind moved the thread_info; adjust.
17771 (status_pending_p_callback): Adjust.
17772 (linux_wait_for_event_1): Adjust.
17773 (count_events_callback, select_singlestep_lwp_callback)
17774 (select_event_lwp_callback, cancel_breakpoints_callback)
17775 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17776 (proceed_one_lwp): Adjust.
17777 (linux_async): Add debug output.
17778 (linux_thread_stopped): New.
17779 (linux_pause_all): New.
17780 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17781 linux_pause_all.
17782 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17783 (thread_db_free): Delete declaration.
17784 (thread_db_detach, thread_db_mourn): Declare.
17785 * thread-db.c (thread_db_init): Use thread_db_mourn.
17786 (thread_db_free): Delete, split in two.
17787 (disable_thread_event_reporting): New.
17788 (thread_db_detach): New.
17789 (thread_db_mourn): New.
17790
17791 * server.h (struct thread_info) <last_resume_kind>: New field.
17792 <attached>: Add comment.
17793 <gdb_detached>: New field.
17794 (handler_func): Change return type to int.
17795 (handle_serial_event, handle_target_event): Ditto.
17796 (gdb_connected): Declare.
17797 (tracing): Delete.
17798 (disconnected_tracing): Declare.
17799 (stop_tracing): Declare.
17800
17801 * server.c (handle_query) <qSupported>: Report support for
17802 disconnected tracing.
17803 (queue_stop_reply_callback): Account for running threads.
17804 (gdb_wants_thread_stopped): New.
17805 (gdb_wants_all_threads_stopped): New.
17806 (gdb_reattached_process): New.
17807 (handle_status): Clear the `gdb_detached' flag of all processes.
17808 In all-stop, stop all threads.
17809 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17810 (process_serial_event): If the remote connection breaks, or if an
17811 exit was forced with "monitor exit", force an event loop exit.
17812 Handle disconnected tracing on detach.
17813 (handle_serial_event): Adjust.
17814 (handle_target_event): If GDB isn't connected, forward events back
17815 to the inferior, unless the last process exited, in which case,
17816 exit gdbserver. Adjust interface.
17817
17818 * remote-utils.c (remote_open): Don't block in accept. Instead
17819 register an event loop source on the listen socket file
17820 descriptor. Refactor bits into ...
17821 (listen_desc): ... this new global.
17822 (gdb_connected): ... this new function.
17823 (enable_async_notification): ... this new function.
17824 (handle_accept_event): ... this new function.
17825 (remote_close): Clear remote_desc.
17826
17827 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17828
17829 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17830 New fields.
17831 (mourn_inferior): Define.
17832 (target_process_qsupported): Avoid the dangling else problem.
17833 (thread_stopped): Define.
17834 (pause_all): Define.
17835 (target_waitstatus_to_string): Declare.
17836 * target.c (target_waitstatus_to_string): New.
17837
17838 * tracepoint.c (tracing): Make extern.
17839 (disconnected_tracing): New.
17840 (stop_tracing): Make extern. Handle tracing stops due to GDB
17841 disconnecting.
17842 (cmd_qtdisconnected): New.
17843 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17844 (handle_tracepoint_general_set): Handle QTDisconnected.
17845
17846 * event-loop.c (event_handler_func): Change return type to int.
17847 (process_event): Bail out if the event handler wants the event
17848 loop to stop.
17849 (handle_file_event): Ditto.
17850 (start_event_loop): Bail out if the event handler wants the event
17851 loop to stop.
17852
17853 * nto-low.c (nto_target_ops): Adjust.
17854 * spu-low.c (spu_wait): Don't remove the process here.
17855 (spu_target_ops): Adjust.
17856 * win32-low.c (win32_wait): Don't remove the process here.
17857 (win32_target_ops): Adjust.
17858
17859 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17860
17861 * regcache.c (realloc_register_cache): Invalidate inferior's
17862 regcache before recreating it.
17863
17864 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17865
17866 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17867
17868 2010-04-09 Stan Shebs <stan@codesourcery.com>
17869 Pedro Alves <pedro@codesourcery.com>
17870
17871 * server.h (LONGEST): New.
17872 (struct thread_info) <while_stepping>: New field.
17873 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17874 Declare.
17875 (initialize_tracepoint, handle_tracepoint_general_set)
17876 (handle_tracepoint_query, tracepoint_finished_step)
17877 (tracepoint_was_hit, release_while_stepping_state_list):
17878 (current_traceframe): Declare.
17879 * server.c (handle_general_set): Handle tracepoint packets.
17880 (read_memory): New.
17881 (write_memory): New.
17882 (handle_search_memory_1): Use read_memory.
17883 (handle_query): Report support for conditional tracepoints, trace
17884 state variables, and tracepoint sources. Handle tracepoint
17885 queries.
17886 (main): Initialize the tracepoints module.
17887 (process_serial_event): Handle traceframe reads/writes.
17888
17889 * linux-low.c (handle_tracepoints): New.
17890 (linux_wait_1): Call it.
17891 (linux_resume_one_lwp): Handle while-stepping.
17892 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17893 (linux_target_ops): Install them.
17894 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17895 New field.
17896 * linux-x86-low.c (x86_supports_tracepoints): New.
17897 (the_low_target). Install it.
17898
17899 * mem-break.h (delete_breakpoint): Declare.
17900 * mem-break.c (delete_breakpoint): Make external.
17901
17902 * target.h (struct target_ops): Add `supports_tracepoints',
17903 `read_pc', and `write_pc' fields.
17904 (target_supports_tracepoints): Define.
17905 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17906 (phex_nz): New.
17907
17908 * regcache.h (struct regcache) <registers_owned>: New field.
17909 (init_register_cache, regcache_cpy): Declare.
17910 (regcache_read_pc, regcache_write_pc): Declare.
17911 (register_cache_size): Declare.
17912 (supply_regblock): Declare.
17913 * regcache.c (init_register_cache): New.
17914 (new_register_cache): Use it.
17915 (regcache_cpy): New.
17916 (register_cache_size): New.
17917 (supply_regblock): New.
17918 (regcache_read_pc, regcache_write_pc): New.
17919
17920 * tracepoint.c: New.
17921
17922 * Makefile.in (OBS): Add tracepoint.o.
17923 (tracepoint.o): New rule.
17924
17925 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17926
17927 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17928 (i386-mmx.o): New.
17929 (i386-mmx.c): Likewise.
17930 (i386-mmx-linux.o): Likewise.
17931 (i386-mmx-linux.c): Likewise.
17932
17933 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17934 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17935 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17936 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17937
17938 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17939 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17940 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17941
17942 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17943
17944 * Makefile.in (clean): Updated.
17945 (i386-avx.o): New.
17946 (i386-avx.c): Likewise.
17947 (i386-avx-linux.o): Likewise.
17948 (i386-avx-linux.c): Likewise.
17949 (amd64-avx.o): Likewise.
17950 (amd64-avx.c): Likewise.
17951 (amd64-avx-linux.o): Likewise.
17952 (amd64-avx-linux.c): Likewise.
17953
17954 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17955 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17956 (srv_amd64_regobj): Add amd64-avx.o.
17957 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17958 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17959 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17960 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17961 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17962 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17963 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17964
17965 * i387-fp.c: Include "i386-xstate.h".
17966 (i387_xsave): New.
17967 (i387_cache_to_xsave): Likewise.
17968 (i387_xsave_to_cache): Likewise.
17969 (x86_xcr0): Likewise.
17970
17971 * i387-fp.h (i387_cache_to_xsave): Likewise.
17972 (i387_xsave_to_cache): Likewise.
17973 (x86_xcr0): Likewise.
17974
17975 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17976 * linux-crisv32-low.c (target_regsets): Likewise.
17977 * linux-m68k-low.c (target_regsets): Likewise.
17978 * linux-mips-low.c (target_regsets): Likewise.
17979 * linux-ppc-low.c (target_regsets): Likewise.
17980 * linux-s390-low.c (target_regsets): Likewise.
17981 * linux-sh-low.c (target_regsets): Likewise.
17982 * linux-sparc-low.c (target_regsets): Likewise.
17983 * linux-xtensa-low.c (target_regsets): Likewise.
17984
17985 * linux-low.c: Include <sys/uio.h>.
17986 (regsets_fetch_inferior_registers): Support nt_type.
17987 (regsets_store_inferior_registers): Likewise.
17988 (linux_process_qsupported): New.
17989 (linux_target_ops): Add linux_process_qsupported.
17990
17991 * linux-low.h (regset_info): Add nt_type.
17992 (linux_target_ops): Add process_qsupported.
17993
17994 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17995 and <sys/uio.h>.
17996 (init_registers_i386_avx_linux): New.
17997 (init_registers_amd64_avx_linux): Likewise.
17998 (xmltarget_i386_linux_no_xml): Likewise.
17999 (xmltarget_amd64_linux_no_xml): Likewise.
18000 (PTRACE_GETREGSET): Likewise.
18001 (PTRACE_SETREGSET): Likewise.
18002 (x86_fill_xstateregset): Likewise.
18003 (x86_store_xstateregset): Likewise.
18004 (use_xml): Likewise.
18005 (x86_linux_update_xmltarget): Likewise.
18006 (x86_linux_process_qsupported): Likewise.
18007 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18008 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18009 init_registers_i386_linux here. Call
18010 x86_linux_update_xmltarget.
18011 (the_low_target): Add x86_linux_process_qsupported.
18012
18013 * server.c (handle_query): Call target_process_qsupported.
18014
18015 * target.h (target_ops): Add process_qsupported.
18016 (target_process_qsupported): New.
18017
18018 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18019
18020 * inferiors.c (add_thread): Set last_status kind to
18021 TARGET_WAITKIND_IGNORE.
18022 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18023 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18024 (linux_wait_1): Move `thread' local definition to block that uses
18025 it. Don't NULL initialize `event_child'.
18026 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18027 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18028 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18029
18030 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18031
18032 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18033 an extended waitstatus, or by a watchpoint.
18034 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18035 thread was stepping or has been stopped by a watchpoint.
18036
18037 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18038
18039 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18040 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18041 of another, then delete the previous, and validate all
18042 breakpoints.
18043 (validate_inserted_breakpoint): New.
18044 (delete_disabled_breakpoints): New.
18045 (validate_breakpoints): New.
18046 (check_mem_read): Validate breakpoints before trusting their
18047 shadow. Delete disabled breakpoints.
18048 (check_mem_write): Validate breakpoints before trusting they
18049 should be inserted. Delete disabled breakpoints.
18050 * mem-break.h (validate_breakpoints):
18051 * server.c (handle_query): Validate breakpoints when we see a
18052 qSymbol query.
18053
18054 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18055
18056 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18057 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18058 if we could tell there's a GDB breakpoint at stop_pc.
18059 (need_step_over_p): Don't do a step over if we find a GDB
18060 breakpoint at the resume PC.
18061
18062 * mem-break.c (struct raw_breakpoint): New.
18063 (enum bkpt_type): New type `gdb_breakpoint'.
18064 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18065 fields. New field `raw'.
18066 (find_raw_breakpoint_at): New.
18067 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18068 breakpoint instead.
18069 (set_breakpoint_at): Adjust.
18070 (delete_raw_breakpoint): New.
18071 (release_breakpoint): New.
18072 (delete_breakpoint): Rename to...
18073 (delete_breakpoint_1): ... this. Add proc parameter. Use
18074 release_breakpoint. Return ENOENT.
18075 (delete_breakpoint): Reimplement.
18076 (find_breakpoint_at): Delete.
18077 (find_gdb_breakpoint_at): New.
18078 (delete_breakpoint_at): Delete.
18079 (set_gdb_breakpoint_at): New.
18080 (delete_gdb_breakpoint_at): New.
18081 (gdb_breakpoint_here): New.
18082 (set_reinsert_breakpoint): Use release_breakpoint.
18083 (uninsert_breakpoint): Rename to ...
18084 (uninsert_raw_breakpoint): ... this.
18085 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18086 (reinsert_raw_breakpoint): Change parameter type to
18087 raw_breakpoint.
18088 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18089 instead.
18090 (check_breakpoints): Adjust. Use release_breakpoint.
18091 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18092 (breakpoint_inserted_here): Ditto.
18093 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18094 Don't trust the breakpoint's shadow if it is not inserted.
18095 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18096 (delete_all_breakpoints): Adjust.
18097 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18098 use delete_breakpoint_1.
18099
18100 * mem-break.h (breakpoints_supported): Delete declaration.
18101 (set_gdb_breakpoint_at): Declare.
18102 (gdb_breakpoint_here): Declare.
18103 (delete_breakpoint_at): Delete.
18104 (delete_gdb_breakpoint_at): Declare.
18105
18106 * server.h (struct raw_breakpoint): Forward declare.
18107 (struct process_info): New field `raw_breakpoints'.
18108
18109 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18110 breakpoints.
18111
18112 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18113
18114 * linux-low.c (status_pending_p_callback): Fix comment.
18115 (linux_wait_for_event_1): Move most of the internal breakpoint
18116 handling from here...
18117 (linux_wait_1): ... to here.
18118 (count_events_callback): New.
18119 (select_singlestep_lwp_callback): New.
18120 (select_event_lwp_callback): New.
18121 (cancel_breakpoints_callback): New.
18122 (select_event_lwp): New.
18123 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18124 priority to all LWPs that have had events that should be reported
18125 to the client. Cancel breakpoints when about to reporting the
18126 event to the client, not while stopping lwps. No longer cancel
18127 finished single-steps here.
18128 (cancel_finished_single_step): Delete.
18129 (cancel_finished_single_steps): Delete.
18130
18131 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18132
18133 * mem-break.c (enum bkpt_type): New.
18134 (struct breakpoint): New field `type'.
18135 (set_breakpoint_at): Change return type to struct breakpoint
18136 pointer. Set type to `other_breakpoint' by default.
18137 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18138 in the breakpoint list.
18139 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18140 (reinsert_breakpoint): Rename to ...
18141 (reinsert_raw_breakpoint): ... this.
18142 (reinsert_breakpoints_at): Adjust.
18143 * mem-break.h (struct breakpoint): Declare.
18144 (set_breakpoint_at): Change return type to struct breakpoint
18145 pointer.
18146
18147 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18148
18149 * server.c (handle_query): Assign, not compare.
18150
18151 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18152
18153 Teach linux gdbserver to step-over-breakpoints.
18154
18155 * linux-low.c (can_hardware_single_step): New.
18156 (supports_breakpoints): New.
18157 (handle_extended_wait): If stopping threads, read the stop pc of
18158 the new cloned LWP.
18159 (get_pc): New.
18160 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18161 low target doesn't support retrieving the PC.
18162 (add_lwp): Set last_resume_kind to resume_continue.
18163 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18164 (linux_attach): Don't clear stop_expected. Set the lwp's
18165 last_resume_kind to resume_stop.
18166 (linux_detach_one_lwp): Don't check for removed breakpoints.
18167 (check_removed_breakpoint): Delete.
18168 (status_pending_p): Rename to ...
18169 (status_pending_p_callback): ... this. Don't check for removed
18170 breakpoints. Don't consider threads that are stopped from GDB's
18171 perspective.
18172 (linux_wait_for_lwp): Always read the stop_pc here.
18173 (cancel_breakpoint): New.
18174 (step_over_bkpt): New global.
18175 (linux_wait_for_event_1): Implement stepping over breakpoints.
18176 (gdb_wants_lwp_stopped): New.
18177 (gdb_wants_all_stopped): New.
18178 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18179 single-step traps here. Store the thread's last reported target
18180 wait status.
18181 (send_sigstop): Don't clear stop_expected. Always set it,
18182 instead.
18183 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18184 (cancel_finished_single_step): New.
18185 (cancel_finished_single_steps): New.
18186 (wait_for_sigstop): Don't cancel finished single-step traps here.
18187 (linux_resume_one_lwp): Don't check for removed breakpoints.
18188 Don't set `step' on non-hardware step archs.
18189 (linux_set_resume_request): Ignore resume_stop requests if already
18190 stopping or stopped. Set the lwp's last_resume_kind.
18191 (resume_status_pending_p): Don't check for removed breakpoints.
18192 (need_step_over_p): New.
18193 (start_step_over): New.
18194 (finish_step_over): New.
18195 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18196 requests. Clear the thread's last reported target waitstatus.
18197 Don't use the `suspended' flag. Don't consider pending breakpoints.
18198 (linux_resume): Start a step-over if necessary.
18199 (proceed_one_lwp): New.
18200 (proceed_all_lwps): New.
18201 (unstop_all_lwps): New.
18202 * linux-low.h (struct lwp_info): Rewrite comment for the
18203 `suspended' flag. Add the `stop_pc' field. Delete the
18204 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18205 Add `'last_resume_kind' and `need_step_over' fields.
18206 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18207 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18208 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18209 (set_raw_breakpoint_at): New.
18210 (set_breakpoint_at): Rewrite to use it.
18211 (reinsert_breakpoint_handler): Delete.
18212 (set_reinsert_breakpoint): New.
18213 (reinsert_breakpoint_by_bp): Delete.
18214 (delete_reinsert_breakpoints): New.
18215 (uninsert_breakpoint): Rewrite.
18216 (uninsert_breakpoints_at): New.
18217 (reinsert_breakpoint): Rewrite.
18218 (reinsert_breakpoints_at): New.
18219 (check_breakpoints): Rewrite.
18220 (breakpoint_here): New.
18221 (breakpoint_inserted_here): New.
18222 (check_mem_read): Adjust.
18223 * mem-break.h (breakpoints_supported, breakpoint_here)
18224 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18225 (reinsert_breakpoint_by_bp): Delete declaration.
18226 (delete_reinsert_breakpoints): Declare.
18227 (reinsert_breakpoint): Delete declaration.
18228 (reinsert_breakpoints_at): Declare.
18229 (uninsert_breakpoint): Delete declaration.
18230 (uninsert_breakpoints_at): Declare.
18231 (check_breakpoints): Adjust prototype.
18232 * server.h: Adjust include order.
18233 (struct thread_info): Declare here. Add a `last_status' field.
18234
18235 2010-03-23 Michael Snyder <msnyder@vmware.com>
18236
18237 * server.c (crc32): New function.
18238 (handle_query): Add handling for 'qCRC:' request.
18239
18240 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18241
18242 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18243 lwp had been stopped by a watchpoint.
18244
18245 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18246
18247 * server.h (internal_error): Declare.
18248 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18249 * utils.c (internal_error): New function.
18250
18251 2010-03-15 Andreas Schwab <schwab@redhat.com>
18252
18253 * configure.srv: Fix typo setting srv_regobj.
18254
18255 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18256
18257 * linux-low.c (fetch_register): Avoid passing a non string literal
18258 format to `error'.
18259 (usr_store_inferior_registers): Ditto.
18260
18261 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18262
18263 * linux-low.c (linux_write_memory): Bail out early if peeking
18264 memory failed.
18265
18266 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18267
18268 * linux-low.h (struct lwp_info): New fields
18269 `stopped_by_watchpoint' and `stopped_data_address'.
18270 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18271 here, and cache them in the lwp object.
18272 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18273 directly.
18274 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18275 field.
18276 (linux_stopped_by_watchpoint): Rewrite.
18277 (linux_stopped_data_address): Rewrite.
18278
18279 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18280
18281 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18282 switching the current inferior, not before.
18283
18284 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18285
18286 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18287 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18288 i386-linux.c and amd64-linux.c.
18289 (reg-i386.o): Removed.
18290 (reg-i386.c): Likewise.
18291 (reg-i386-linux.o): Likewise.
18292 (reg-i386-linux.c): Likewise.
18293 (reg-x86-64.o): Likewise.
18294 (reg-x86-64.c): Likewise.
18295 (reg-x86-64-linux.o): Likewise.
18296 (reg-x86-64-linux.c): Likewise.
18297 (i386.o): New.
18298 (i386.c): Likewise.
18299 (i386-linux.o): Likewise.
18300 (i386-linux.c): Likewise.
18301 (amd64.o): Likewise.
18302 (amd64.c): Likewise.
18303 (amd64-linux.o): Likewise.
18304 (amd64-linux.c): Likewise.
18305
18306 * configure.srv (srv_i386_regobj): New.
18307 (srv_i386_linux_regobj): Likewise.
18308 (srv_amd64_regobj): Likewise.
18309 (srv_amd64_linux_regobj): Likewise.
18310 (srv_i386_32bit_xmlfiles): Likewise.
18311 (srv_i386_64bit_xmlfiles): Likewise.
18312 (srv_i386_xmlfiles): Likewise.
18313 (srv_amd64_xmlfiles): Likewise.
18314 (srv_i386_linux_xmlfiles): Likewise.
18315 (srv_amd64_linux_xmlfiles): Likewise.
18316 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18317 srv_xmlfiles to $srv_i386_xmlfiles.
18318 (i[34567]86-*-mingw32ce*): Likewise.
18319 (i[34567]86-*-mingw*): Likewise.
18320 (i[34567]86-*-nto*): Likewise.
18321 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18322 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18323 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18324 (x86_64-*-linux*): Likewise.
18325
18326 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18327 (init_registers_amd64_linux): New.
18328 (x86_arch_setup): Replace init_registers_x86_64_linux with
18329 init_registers_amd64_linux.
18330
18331 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18332
18333 * configure.ac: Check for libdl. If it is not available link against
18334 static libthread_db.
18335 * configure: Regenerate.
18336
18337 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18338
18339 PR9605
18340
18341 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18342 handing a read watchpoint.
18343 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18344
18345 2010-02-12 Doug Evans <dje@google.com>
18346
18347 * linux-low.c (linux_supports_tracefork_flag): Document.
18348 (linux_look_up_symbols): Add comment.
18349
18350 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18351
18352 * regcache.c (supply_register): Clear regcache if buf is NULL.
18353
18354 2010-02-02 Nicolas Roche <roche@sourceware.org>
18355 Joel Brobecker <brobecker@adacore.com>
18356
18357 * inferiors.c (find_inferior): Add function documentation.
18358 (unloaded_dll): Handle the case where the unloaded dll has not
18359 been previously registered in the dll list.
18360
18361 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18362
18363 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18364 (thumb2_breakpoint): New.
18365 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18366
18367 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18368
18369 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18370 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18371 breakpoints.
18372
18373 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18374
18375 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18376
18377 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18378
18379 * linux-s390-low.c (s390_collect_ptrace_register)
18380 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18381
18382 2010-01-21 Doug Evans <dje@google.com>
18383
18384 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18385 (PTRACE_ARG4_TYPE): New macro.
18386 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18387 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18388 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18389 (usr_store_inferior_registers): Ditto.
18390 (linux_read_memory, linux_write_memory): Ditto.
18391 (linux_test_for_tracefork): Ditto.
18392
18393 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18394 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18395
18396 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18397
18398 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18399 target.
18400
18401 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18402
18403 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18404 prototype to take a regcache. Adjust.
18405
18406 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18407
18408 * regcache.h (struct thread_info): Forward declare.
18409 (struct regcache): New.
18410 (new_register_cache): Adjust prototype.
18411 (get_thread_regcache): Declare.
18412 (free_register_cache): Adjust prototype.
18413 (registers_to_string, registers_from_string): Ditto.
18414 (supply_register, supply_register_by_name, collect_register)
18415 (collect_register_as_string, collect_register_by_name): Ditto.
18416 * regcache.c (struct inferior_regcache_data): Delete.
18417 (get_regcache): Rename to ...
18418 (get_thread_regcache): ... this. Adjust. Switch inferior before
18419 fetching registers.
18420 (regcache_invalidate_one): Adjust.
18421 (regcache_invalidate): Fix prototype.
18422 (new_register_cache): Return the new register cache.
18423 (free_register_cache): Change prototype.
18424 (realloc_register_cache): Adjust.
18425 (registers_to_string): Change prototype to take a regcache. Adjust.
18426 (registers_from_string): Ditto.
18427 (register_data): Ditto.
18428 (supply_register): Ditto.
18429 (supply_register_by_name): Ditto.
18430 (collect_register): Ditto.
18431 (collect_register_as_string): Ditto.
18432 (collect_register_by_name): Ditto.
18433 * server.c (process_serial_event): Adjust.
18434 * linux-low.h (regset_fill_func, regset_store_func): Change
18435 prototype.
18436 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18437 Change prototype.
18438 * linux-low.c (get_stop_pc): Adjust.
18439 (check_removed_breakpoint): Adjust.
18440 (linux_wait_for_event): Adjust.
18441 (linux_resume_one_lwp): Adjust.
18442 (fetch_register): Add regcache parameter. Adjust.
18443 (usr_store_inferior_registers): Ditto.
18444 (regsets_fetch_inferior_registers): Ditto.
18445 (regsets_store_inferior_registers): Ditto.
18446 (linux_fetch_registers, linux_store_registers): Ditto.
18447 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18448 regcache. Adjust.
18449 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18450 Ditto.
18451 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18452 prototype to take a regcache.
18453 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18454 * remote-utils.c (convert_ascii_to_int, outreg)
18455 (prepare_resume_reply): Change prototype to take a regcache.
18456 Adjust.
18457 * target.h (struct target_ops) <fetch_registers, store_registers>:
18458 Change prototype to take a regcache.
18459 (fetch_inferior_registers, store_inferior_registers): Change
18460 prototype to take a regcache. Adjust.
18461 * proc-service.c (ps_lgetregs): Adjust.
18462 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18463 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18464 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18465 take a regcache. Adjust.
18466 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18467 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18468 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18469 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18470 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18471 (cris_cannot_fetch_register):
18472 (cris_breakpoint_at): Change prototype to take a regcache.
18473 Adjust.
18474 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18475 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18476 to take a regcache. Adjust.
18477 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18478 Adjust.
18479 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18480 take a regcache. Adjust.
18481 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18482 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18483 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18484 * linux-mips-low.c (mips_get_pc):
18485 (mips_set_pc): Change prototype to take a regcache. Adjust.
18486 (mips_reinsert_addr): Adjust.
18487 (mips_collect_register): Change prototype to take a regcache.
18488 Adjust.
18489 (mips_supply_register):
18490 (mips_collect_register_32bit, mips_supply_register_32bit)
18491 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18492 (mips_store_fpregset): Ditto.
18493 * linux-ppc-low.c (ppc_supply_ptrace_register)
18494 (ppc_supply_ptrace_register): Ditto.
18495 (parse_spufs_run): Adjust.
18496 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18497 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18498 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18499 take a regcache. Adjust.
18500 * linux-s390-low.c (s390_collect_ptrace_register)
18501 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18502 (s390_set_pc): Change prototype to take a regcache. Adjust.
18503 (s390_arch_setup): Adjust.
18504 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18505 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18506 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18507 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18508 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18509 regcache. Adjust.
18510 (sparc_breakpoint_at): Adjust.
18511 * linux-xtensa-low.c (xtensa_fill_gregset):
18512 (xtensa_store_gregset):
18513 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18514 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18515 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18516 prototype to take a regcache. Adjust.
18517 * win32-arm-low.c (arm_fetch_inferior_register)
18518 (arm_store_inferior_register): Change prototype to take a
18519 regcache. Adjust.
18520 * win32-i386-low.c (i386_fetch_inferior_register)
18521 (i386_store_inferior_register): Change prototype to take a
18522 regcache. Adjust.
18523 * win32-low.c (child_fetch_inferior_registers)
18524 (child_store_inferior_registers): Change prototype to take a
18525 regcache. Adjust.
18526 (win32_wait): Adjust.
18527 (win32_fetch_inferior_registers): Change prototype to take a
18528 regcache. Adjust.
18529 (win32_store_inferior_registers): Adjust.
18530 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18531 store_inferior_register>: Change prototype to take a regcache.
18532
18533 2010-01-20 Doug Evans <dje@google.com>
18534
18535 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18536 #ifdef.
18537 (linux_wait_for_event1, linux_init_signals): Ditto.
18538 (W_STOPCODE): Provide definition if missing.
18539
18540 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18541
18542 * linux-low.c (linux_core_of_thread): New.
18543 (compare_ints, show_process, list_threads): New.
18544 (linux_qxfer_osdata): Report threads and cores.
18545 (linux_target_op): Register linux_core_of_thread.
18546 * remote-utils.c (prepare_resume_reply): Report the core.
18547 (buffer_xml_printf): Support %d specifier.
18548 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18549 New.
18550 (handle_query): Handle qXfer:threads. Announce availability
18551 thereof.
18552 * target.h (struct target_ops): New field core_of_thread.
18553
18554 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18555
18556 * Makefile.in (clean): Remove new generated files.
18557 (reg-s390.o, reg-s390.c): Remove rules.
18558 (reg-s390x.o, reg-s390x.c): Likewise.
18559 (s390-linux32.o, s390-linux32.c): Add rules.
18560 (s390-linux64.o, s390-linux64.c): Likewise.
18561 (s390x-linux64.o, s390x-linux64.c): Likewise.
18562 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18563 * linux-s390-low.c: Include <elf.h>.
18564 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18565 (init_registers_s390): Remove prototype.
18566 (init_registers_s390x): Likewise.
18567 (init_registers_s390_linux32): Add prototype.
18568 (init_registers_s390_linux64): Likewise.
18569 (init_registers_s390x_linux64): Likewise.
18570 (s390_num_regs_3264): New define.
18571 (s390_regmap_3264): New global variable.
18572 (s390_cannot_fetch_register): Remove obsolete check.
18573 (s390_cannot_store_register): Likewise.
18574 (s390_collect_ptrace_register): Handle upper/lower register halves.
18575 (s390_supply_ptrace_register): Likewise.
18576 (s390_fill_gregset): Update to register number changes.
18577 (s390_get_hwcap): New routine.
18578 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18579 Install appropriate regmap and register set.
18580
18581 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18582
18583 * server.c (gdbserver_version): Update copyright year to 2010.
18584 * gdbreplay.c (gdbreplay_version): Likewise.
18585
18586 2009-12-28 Doug Evans <dje@google.com>
18587
18588 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18589 elf/external.h. Include <elf.h> instead but only if necessary.
18590
18591 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18592
18593 * linux-low.c (linux_remove_process): Remove `detaching'
18594 parameter. Don't release/detach from thread_db here.
18595 (linux_kill): Release/detach from thread_db here, ...
18596 (linux_detach): ... and here, before actually detaching.
18597 (linux_wait_1): ... and here, when a process exits.
18598 * thread-db.c (any_thread_of): New.
18599 (thread_db_free): Switch the current inferior to a thread of the
18600 passed in process.
18601
18602 2009-12-21 Doug Evans <dje@google.com>
18603
18604 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18605
18606 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18607 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18608 warning ifndef __NR_tkill. Move setting of errno there too.
18609 Delete unnecessary resetting of errno after syscall.
18610 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18611
18612 * configure.ac: Check for dladdr.
18613 * config.in: Regenerate.
18614 * configure: Regenerate.
18615 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18616 (try_thread_db_load): Update.
18617
18618 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18619
18620 2009-12-18 Doug Evans <dje@google.com>
18621
18622 * event-loop.c: Include unistd.h if it exists.
18623
18624 * linux-low.c (my_waitpid): Move definition away from being in
18625 between linux_tracefork_child/linux_test_for_tracefork.
18626
18627 * gdb_proc_service.h (psaddr_t): Fix type.
18628 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18629 signature to match glibc.
18630
18631 2009-12-16 Doug Evans <dje@google.com>
18632
18633 * linux-low.c (linux_read_memory): Fix argument to read.
18634
18635 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18636
18637 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18638 events, don't leave current_inferior pointing at null.
18639
18640 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18641
18642 * win32-low.c (LOG): Delete.
18643 (OUTMSG): Output to stderr.
18644 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18645 on compile time LOG macro.
18646 (win32_wait): Fix debug output.
18647
18648 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18649
18650 * win32-low.c (win32_add_one_solib): If the dll name is
18651 "ntdll.dll", prepend the system directory to the dll path.
18652
18653 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18654
18655 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18656
18657 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18658 Vladimir Prus <vladimir@codesourcery.com>
18659
18660 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18661 * configure.ac: Check for __mcoldfire__ and set
18662 gdb_cv_m68k_is_coldfire.
18663 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18664 reg-cf.o and reg-m68k.o.
18665 * configure: Regenerated.
18666
18667 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18668
18669 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18670 Pass it to thread_db_free.
18671 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18672 proper `detaching' argument to linux_remove_process.
18673 * linux-low.h (thread_db_free): Add `detaching' parameter.
18674 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18675 to thread_db_free.
18676 (thread_db_free): Add `detaching' parameter. Only
18677 call td_ta_clear_event if detaching from process.
18678
18679 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18680
18681 * thread-db.c (thread_db_free): Fix typo.
18682
18683 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18684
18685 PR gdb/10838
18686 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18687
18688 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18689
18690 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18691 with an i686 compiler.
18692 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18693 needed.
18694 * configure: Rebuilt.
18695
18696 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18697
18698 PR gdb/10783
18699
18700 * server.c (handle_search_memory_1): Correct read_addr initialization
18701 in loop for searching subsequent chunks.
18702
18703 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18704
18705 * configure.ac: New --with-libthread-db option.
18706 * thread-db.c: Allow direct dependence on libthread_db.
18707 (thread_db_free): Adjust.
18708 * config.in: Regenerate.
18709 * configure: Likewise.
18710
18711 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18712
18713 PR gdb/10757
18714 * thread-db.c (attach_thread): New function.
18715 (maybe_attach_thread): Return success/failure.
18716 (find_new_threads_callback): Adjust.
18717 (thread_db_find_new_threads): Loop until no new threads.
18718
18719 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18720
18721 * proc-service.c (ps_lgetregs): Formatting.
18722
18723 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18724
18725 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18726 * configure.ac: Adjust.
18727 * linux-low.h (struct process_info_private): Move members to struct
18728 thread_db.
18729 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18730 * linux-low.c (linux_remove_process): Adjust.
18731 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18732 * server.c (handle_query): Move code ...
18733 (handle_monitor_command): ... here. New function.
18734 * target.h (struct target_ops): New member.
18735 * thread-db.c (struct thread_db): New.
18736 (libthread_db_search_path): New variable.
18737 (thread_db_create_event, thread_db_enable_reporting)
18738 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18739 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18740 (try_thread_db_load_1, dladdr_to_soname): New functions.
18741 (try_thread_db_load, thread_db_load_search): New functions.
18742 (thread_db_init): Search for libthread_db.
18743 (thread_db_free): New function.
18744 (thread_db_handle_monitor_command): Likewise.
18745 * config.in: Regenerate.
18746 * configure: Regenerate.
18747
18748 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18749
18750 * spu-low.c (spu_kill): Wait for inferior to terminate.
18751 Call clear_inferiors.
18752 (spu_detach): Call clear_inferiors.
18753
18754 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18755
18756 * aclocal.m4: Regenerate.
18757 * config.in: Likewise.
18758 * configure: Likewise.
18759
18760 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18761
18762 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18763 (parse_spufs_run): New function.
18764 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18765 (ppc_breakpoint_at): Handle SPU breakpoints.
18766
18767 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18768
18769 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18770 (SPUFS_MAGIC): Define.
18771 (spu_enumerate_spu_ids): New function.
18772 (linux_qxfer_spu): New function.
18773 (linux_target_ops): Install linux_qxfer_spu.
18774
18775 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18776
18777 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18778 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18779 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18780 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18781 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18782 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18783 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18784 (init_registers_powerpc_cell32l): Add prototype.
18785 (init_registers_powerpc_cell64l): Likewise.
18786 (ppc_arch_setup): Detect Cell/B.E. architecture.
18787
18788 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18789
18790 * Makefile.in (datarootdir): New variable.
18791
18792 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18793
18794 * linux-low.c (linux_write_memory): Update debugging output.
18795 * Makefile.in (clean): Add new descriptions.
18796 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18797 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18798 * configure.srv: Add new files for arm*-*-linux*.
18799 * linux-arm-low.c: Add new declarations.
18800 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18801 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18802 (HWCAP_VFPv3D16): New.
18803 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18804 instead of __IWMMXT__.
18805 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18806 (arm_arch_setup): New.
18807 (target_regsets): Remove #ifdef. Add VFP regset.
18808 (the_low_target): Use arm_arch_setup.
18809
18810 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18811
18812 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18813 the main thread again.
18814
18815 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18816
18817 Adding Neutrino gdbserver.
18818 * configure: Regenerated.
18819 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18820 * configure.srv (i[34567]86-*-nto*): New target.
18821 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18822 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18823 (nto_comctrl) [__QNX__]: New function.
18824 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18825
18826 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18827
18828 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18829 srv_tgtobj.
18830
18831 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18832 Pedro Alves <pedro@codesourcery.com>
18833
18834 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18835 don't support CONTEXT_EXTENDED_REGISTERS.
18836 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18837 (the_low_target): Install them.
18838 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18839 failing with ERROR_PIPE_NOT_CONNECTED.
18840
18841 2009-06-30 Doug Evans <dje@google.com>
18842 Pierre Muller <muller@ics.u-strasbg.fr>
18843
18844 Add h/w watchpoint support to x86-linux, win32-i386.
18845 * Makefile.in (SFILES): Add i386-low.c
18846 (i386_low_h): Define.
18847 (i386-low.o): Add dependencies.
18848 (linux-x86-low.o): Add i386-low.h dependency.
18849 (win32-i386-low.o): Ditto.
18850 * i386-low.c: New file.
18851 * i386-low.h: New file.
18852 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18853 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18854 * linux-low.c (linux_add_process): Initialize arch_private.
18855 (linux_remove_process): Free arch_private.
18856 (add_lwp): Initialize arch_private.
18857 (delete_lwp): Free arch_private.
18858 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18859 provided.
18860 * linux-low.h (process_info_private): New member arch_private.
18861 (lwp_info): New member arch_private.
18862 (linux_target_ops): New members new_process, new_thread,
18863 prepare_to_resume.
18864 (ptid_of): New macro.
18865 * linux-x86-low.c: Include stddef.h, i386-low.h.
18866 (arch_process_info): New struct.
18867 (arch_lwp_info): New struct.
18868 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18869 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18870 (i386_dr_low_get_status): New function.
18871 (x86_insert_point, x86_remove_point): New functions.
18872 (x86_stopped_by_watchpoint): New function.
18873 (x86_stopped_data_address): New function.
18874 (x86_linux_new_process, x86_linux_new_thread): New functions.
18875 (x86_linux_prepare_to_resume): New function.
18876 (the_low_target): Add entries for insert_point, remove_point,
18877 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18878 prepare_to_resume.
18879 * server.c (debug_hw_points): New global.
18880 (monitor_show_help): Document set debug-hw-points.
18881 (handle_query): Process "set debug-hw-points".
18882 * server.h (debug_hw_points): Declare.
18883 (paddress): Declare.
18884 * utils.c (NUMCELLS, CELLSIZE): New macros.
18885 (get_sell, xsnprintf, paddress): New functions.
18886 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18887 remove_point, stopped_by_watchpoint, stopped_data_address.
18888 * win32-i386-low.c: Include i386-low.h.
18889 (debug_reg_state): Replaces dr.
18890 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18891 (i386_dr_low_get_status): New function.
18892 (i386_insert_point, i386_remove_point): New functions.
18893 (i386_stopped_by_watchpoint): New function.
18894 (i386_stopped_data_address): New function.
18895 (i386_initial_stuff): Update.
18896 (get_thread_context,set_thread_context,i386_thread_added): Update.
18897 (the_low_target): Add entries for insert_point,
18898 remove_point, stopped_by_watchpoint, stopped_data_address.
18899 * win32-low.c (win32_insert_watchpoint): New function.
18900 (win32_remove_watchpoint): New function.
18901 (win32_stopped_by_watchpoint): New function.
18902 (win32_stopped_data_address): New function.
18903 (win32_target_ops): Add entries for insert_watchpoint,
18904 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18905 * win32-low.h (win32_target_ops): New members insert_point,
18906 remove_point, stopped_by_watchpoint, stopped_data_address.
18907
18908 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18909
18910 * server.c (process_serial_event): Re-return unsupported, not
18911 error, if the type isn't recognized. Re-allow supporting only
18912 insert or remove packets. Also call require_running for
18913 breakpoints. Add missing break statement to default case. Tidy.
18914 * target.h (struct target_ops): Rename insert_watchpoint to
18915 insert_point, and remove_watchpoint to remove_point.
18916
18917 * linux-low.h (struct linux_target_ops): Likewise.
18918 * linux-low.c (linux_insert_watchpoint): Rename to ...
18919 (linux_insert_point): ... this. Adjust.
18920 (linux_remove_watchpoint): Rename to ...
18921 (linux_remove_point): ... this. Adjust.
18922 (linux_target_ops): Adjust.
18923 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18924 (cris_insert_point): ... this.
18925 (cris_remove_watchpoint): Rename to ...
18926 (cris_remove_point): ... this.
18927 (the_low_target): Adjust.
18928
18929 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18930
18931 * server.c (handle_v_kill): Pass signal_pid to
18932 kill_inferior if multi_process is zero.
18933
18934 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18935
18936 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18937 * target.h (target_ops): Comment for *_watchpoint to make it clear
18938 the functions can get types '0' and '1'.
18939
18940 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18941
18942 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18943 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18944 * regcache.c (get_regcache): Likewise.
18945 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18946 * win32-low.c (child_fetch_inferior_registers): Remove check for
18947 regno 0.
18948
18949 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18950 Pedro Alves <pedro@codesourcery.com>
18951
18952 * target.h (struct target_ops) <supports_multi_process>: New
18953 callback.
18954 (target_supports_multi_process): New.
18955 * server.c (handle_query): Even if GDB reports support, only
18956 enable multi-process if the target also supports it. Report
18957 multi-process support only if the target backend supports it.
18958 * linux-low.c (linux_supports_multi_process): New function.
18959 (linux_target_ops): Install it as target_supports_multi_process
18960 callback.
18961
18962 2009-05-24 Doug Evans <dje@google.com>
18963
18964 Global renaming of find_thread_pid to find_thread_ptid.
18965 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18966 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18967 All callers updated.
18968
18969 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18970 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18971 directly.
18972
18973 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18974 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18975 (linux_resume_one_lwp): Ditto.
18976
18977 2009-05-23 Doug Evans <dje@google.com>
18978
18979 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18980 from struct inferior_list_entry * to struct lwp_info *.
18981 All callers updated.
18982
18983 2009-05-13 Doug Evans <dje@google.com>
18984
18985 * linux-x86-low.c: Don't include assert.h.
18986 (x86_siginfo_fixup): Use fatal, not assert.
18987 (x86_arch_setup): Fix comment.
18988
18989 2009-05-12 Doug Evans <dje@google.com>
18990
18991 Biarch support for i386/amd64 gdbserver.
18992 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18993 Add linux-x86-low.c.
18994 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18995 (linux-x86-low.o): Add.
18996 * linux-x86-64-low.c: Delete.
18997 * linux-i386-low.c: Delete.
18998 * linux-x86-low.c: New file.
18999 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19000 linux-x86-low.o.
19001 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19002 linux-x86-low.o.
19003 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19004 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19005 (linux_child_pid_to_exec_file): New function.
19006 (elf_64_header_p, elf_64_file_p): New functions.
19007 (siginfo_fixup): New function.
19008 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19009 give target a chance to convert layout.
19010 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19011 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19012
19013 2009-05-07 Doug Evans <dje@google.com>
19014
19015 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19016 (regsets_store_inferior_registers): Ditto.
19017
19018 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19019
19020 PR server/10048
19021
19022 * linux-low.c (must_set_ptrace_flags): Delete.
19023 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19024 of the global.
19025 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19026 `lwp->must_set_ptrace_flags' instead.
19027 (linux_wait_for_event_1): Set ptrace options here.
19028 (linux_wait_1): ... not here.
19029
19030 2009-04-30 Doug Evans <dje@google.com>
19031
19032 * inferiors.c (started_inferior_callback): New function.
19033 (attached_inferior_callback): New function.
19034 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19035 * server.c (print_started_pid, print_attached_pid): New functions.
19036 (detach_or_kill_for_exit): New function.
19037 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19038 * server.h (have_started_inferiors_p): Declare.
19039 (have_attached_inferiors_p): Declare.
19040
19041 * inferiors.c (remove_process): Fix memory leak, free process.
19042 * linux-low.c (linux_remove_process): New function.
19043 (linux_kill): Call it instead of remove_process.
19044 (linux_detach, linux_wait_1): Ditto.
19045
19046 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19047
19048 * configure.srv: Add x86 Windows CE target.
19049
19050 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19051
19052 * inferiors.c (get_thread_process): Make global.
19053 * server.h (get_thread_process): Add prototype.
19054 * thread-db.c (find_one_thread): Use get_thread_process
19055 instead of current_process.
19056 (thread_db_get_tls_address): Do not crash if called when
19057 thread layer is not yet initialized.
19058
19059 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19060
19061 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19062 * spu-low.c (current_tid): Rename to ...
19063 (current_ptid): ... this.
19064 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19065 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19066 ptid_get_lwp (current_ptid) instead of current_tid.
19067 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19068 instead of current_tid. Use find_process_pid to verify pid
19069 argument is valid. Pass proper argument to remove_process.
19070 (spu_thread_alive): Compare current_ptid instead of current_tid.
19071 (spu_resume): Likewise.
19072
19073 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19074
19075 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19076 variable.
19077
19078 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19079
19080 Implement the multiprocess extensions, and add linux multiprocess
19081 support.
19082
19083 * server.h (ULONGEST): Declare.
19084 (struct ptid, ptid_t): New.
19085 (minus_one_ptid, null_ptid): Declare.
19086 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19087 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19088 (struct inferior_list_entry): Change `id' type from unsigned from
19089 to ptid_t.
19090 (struct sym_cache, struct breakpoint, struct
19091 process_info_private): Forward declare.
19092 (struct process_info): Declare.
19093 (current_process): Declare.
19094 (all_processes): Declare.
19095 (initialize_inferiors): Declare.
19096 (add_thread): Adjust to use ptid_t.
19097 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19098 (add_process, remove_process, find_thread_pid): Declare.
19099 (find_inferior_id): Adjust to use ptid_t.
19100 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19101 (multi_process): Declare.
19102 (push_event): Adjust to use ptid_t.
19103 (read_ptid, write_ptid): Declare.
19104 (prepare_resume_reply): Adjust to use ptid_t.
19105 (clear_symbol_cache): Declare.
19106 * inferiors.c (all_processes): New.
19107 (null_ptid, minus_one_ptid): New.
19108 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19109 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19110 (add_thread): Change unsigned long to ptid. Remove gdb_id
19111 parameter. Adjust.
19112 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19113 (gdb_id_to_thread): Rename to ...
19114 (find_thread_pid): ... this. Change unsigned long to ptid.
19115 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19116 (loaded_dll, pull_pid_from_list): Adjust.
19117 (add_process, remove_process, find_process_pid)
19118 (get_thread_process, current_process, initialize_inferiors): New.
19119 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19120 (struct target_waitstatus) <related_pid>: Ditto.
19121 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19122 return type to int.
19123 (struct target_ops) <join>: Add `pid' argument.
19124 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19125 (struct target_ops) <wait>: Add `ptid' field. Change return type
19126 to ptid.
19127 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19128 (mywait): Add `ptid' argument. Change return type to ptid_t.
19129 (target_pid_to_str): Declare.
19130 * target.c (set_desired_inferior): Adjust to use ptids.
19131 (mywait): Add new `ptid' argument. Adjust.
19132 (target_pid_to_str): New.
19133 * mem-break.h (free_all_breakpoints): Declare.
19134 * mem-break.c (breakpoints): Delelete.
19135 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19136 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19137 to use per-process breakpoint list.
19138 (free_all_breakpoints): New.
19139 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19140 (symbol_cache, all_symbols_looked_up): Delete.
19141 (hexchars): New.
19142 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19143 read_ptid): New.
19144 (prepare_resume_reply): Change ptid argument's type from unsigned
19145 long to ptid_t. Adjust. Implement W;process and X;process.
19146 (free_sym_cache, clear_symbol_cache): New.
19147 (look_up_one_symbol): Adjust to per-process symbol cache. *
19148 * server.c (cont_thread, general_thread, step_thread): Change type
19149 to ptid_t.
19150 (attached): Delete.
19151 (multi_process): New.
19152 (last_ptid): Change type to ptid_t.
19153 (struct vstop_notif) <ptid>: Change type to ptid_t.
19154 (queue_stop_reply, push_event): Change `ptid' argument's type to
19155 ptid_t.
19156 (discard_queued_stop_replies): Add `pid' argument.
19157 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19158 changes. Don't reference the `attached' global.
19159 (attach_inferior): Adjust to mywait interface changes.
19160 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19161 features. Handle and report "multiprocess+". Handle
19162 "qAttached:PID".
19163 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19164 changes.
19165 (handle_v_kill): New.
19166 (handle_v_stopped): Adjust to use target_pid_to_str.
19167 (handle_v_requests): Allow multiple attaches and runs when
19168 multiprocess extensions are in effect. Handle "vKill".
19169 (myresume): Adjust to use ptids.
19170 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19171 (handle_status): Adjust to discard_queued_stop_replies interface
19172 change.
19173 (first_thread_of, kill_inferior_callback)
19174 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19175 (main): Call initialize_inferiors. Adjust to use ptids, killing
19176 and detaching from all inferiors. Handle multiprocess packet
19177 variants.
19178 * linux-low.h: Include gdb_proc_service.h.
19179 (struct process_info_private): New.
19180 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19181 <lwpid_of>: Use ptid_get_lwp.
19182 (get_lwp_thread): Adjust.
19183 (struct lwp_info): Add `dead' member.
19184 (find_lwp_pid): Declare.
19185 * linux-low.c (thread_db_active): Delete.
19186 (new_inferior): Adjust comment.
19187 (inferior_pid): Delete.
19188 (linux_add_process): New.
19189 (handle_extended_wait): Adjust.
19190 (add_lwp): Change unsigned long to ptid.
19191 (linux_create_inferior): Add process to processes table. Adjust
19192 to use ptids. Don't set new_inferior here.
19193 (linux_attach_lwp): Rename to ...
19194 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19195 it. Adjust to use ptids.
19196 (linux_attach_lwp): New.
19197 (linux_attach): Add process to processes table. Don't set
19198 new_inferior here.
19199 (struct counter): New.
19200 (second_thread_of_pid_p, last_thread_of_process_p): New.
19201 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19202 multiple processes.
19203 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19204 processes. Remove process from process table.
19205 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19206 to multiple processes.
19207 (any_thread_of): New.
19208 (linux_detach): Add `pid' argument, and handle it. Remove process
19209 from processes table.
19210 (linux_join): Add `pid' argument. Handle it.
19211 (linux_thread_alive): Change unsighed long argument to ptid_t.
19212 Consider dead lwps as not being alive.
19213 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19214 threads we're not interested in.
19215 (same_lwp, find_lwp_pid): New.
19216 (linux_wait_for_lwp): Change `pid' argument's type from int to
19217 ptid_t. Adjust.
19218 (linux_wait_for_event): Rename to ...
19219 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19220 from int to ptid_t. Adjust.
19221 (linux_wait_for_event): New.
19222 (linux_wait_1): Add `ptid' argument. Change return type to
19223 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19224 that exit from the process table.
19225 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19226 Adjust.
19227 (mark_lwp_dead): New.
19228 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19229 stopping all threads, mark its main lwp as dead.
19230 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19231 ptids.
19232 (fetch_register, usr_store_inferior_registers)
19233 (regsets_fetch_inferior_registers)
19234 (regsets_store_inferior_registers, linux_read_memory)
19235 (linux_write_memory): Inline `inferior_pid'.
19236 (linux_look_up_symbols): Adjust to use per-process
19237 `thread_db_active'.
19238 (linux_request_interrupt): Adjust to use ptids.
19239 (linux_read_auxv): Inline `inferior_pid'.
19240 (initialize_low): Don't reference thread_db_active.
19241 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19242 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19243 (ps_getpid): Return the pid of the current inferior.
19244 * thread-db.c (proc_handle, thread_agent): Delete.
19245 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19246 per-process data.
19247 (find_one_thread): Change argument type to ptid_t. Adjust to
19248 per-process data.
19249 (maybe_attach_thread): Adjust to per-process data and ptids.
19250 (thread_db_find_new_threads): Ditto.
19251 (thread_db_init): Ditto.
19252 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19253 processes table. Adjust to use ptids.
19254 (spu_kill, spu_detach): Adjust interface. Remove process from
19255 processes table.
19256 (spu_join, spu_thread_alive): Adjust interface.
19257 (spu_wait): Adjust interface. Remove process from processes
19258 table. Adjust to use ptids.
19259 * win32-low.c (current_inferior_tid): Delete.
19260 (current_inferior_ptid): New.
19261 (debug_event_ptid): New.
19262 (thread_rec): Take a ptid. Adjust.
19263 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19264 (child_delete_thread): Ditto.
19265 (do_initial_child_stuff): Add `attached' argument. Add process to
19266 processes table.
19267 (child_fetch_inferior_registers, child_store_inferior_registers):
19268 Adjust.
19269 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19270 (win32_attach): Pass 1 to do_initial_child_stuff.
19271 (win32_kill): Adjust interface. Remove process from processes
19272 table.
19273 (win32_detach): Ditto.
19274 (win32_join): Adjust interface.
19275 (win32_thread_alive): Take a ptid.
19276 (win32_resume): Adjust to use ptids.
19277 (get_child_debug_event): Ditto.
19278 (win32_wait): Adjust interface. Remove exiting process from
19279 processes table.
19280
19281 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19282
19283 Non-stop mode support.
19284
19285 * server.h (non_stop): Declare.
19286 (gdb_client_data, handler_func): Declare.
19287 (delete_file_handler, add_file_handler, start_event_loop):
19288 Declare.
19289 (handle_serial_event, handle_target_event, push_event)
19290 (putpkt_notif): Declare.
19291 * target.h (enum resume_kind): New.
19292 (struct thread_resume): Replace `step' field by `kind' field.
19293 (TARGET_WNOHANG): Define.
19294 (struct target_ops) <wait>: Add `options' argument.
19295 <supports_non_stop, async, start_non_stop>: New fields.
19296 (target_supports_non_stop, target_async): New.
19297 (start_non_stop): Declare.
19298 (mywait): Add `options' argument.
19299 * target.c (mywait): Add `options' argument. Print child exit
19300 notifications here.
19301 (start_non_stop): New.
19302 * server.c (non_stop, own_buf, mem_buf): New globals.
19303 (struct vstop_notif): New.
19304 (notif_queue): New global.
19305 (queue_stop_reply, push_event, discard_queued_stop_replies)
19306 (send_next_stop_reply): New.
19307 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19308 interface changes.
19309 (attach_inferior): In non-stop mode, don't wait for the target
19310 here.
19311 (handle_general_set): Handle QNonStop.
19312 (handle_query): When handling qC, return the current general
19313 thread, instead of the first thread of the list.
19314 (handle_query): If the backend supports non-stop mode, include
19315 QNonStop+ in the qSupported query response.
19316 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19317 and non-stop mode.
19318 (handle_v_attach, handle_v_run): Handle non-stop mode.
19319 (handle_v_stopped): New.
19320 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19321 (myresume): Adjust to use resume_kind. Handle non-stop.
19322 (queue_stop_reply_callback): New.
19323 (handle_status): Handle non-stop mode.
19324 (main): Clear non_stop flag on reconnection. Use the event-loop.
19325 Refactor serial protocol handling from here ...
19326 (process_serial_event): ... to this new function. When GDB
19327 selects any thread, select one here. In non-stop mode, wait until
19328 GDB acks all pending events before exiting.
19329 (handle_serial_event, handle_target_event): New.
19330 * remote-utils.c (remote_open): Install remote_desc in the event
19331 loop.
19332 (remote_close): Remove remote_desc from the event loop.
19333 (putpkt_binary): Rename to...
19334 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19335 (putpkt_binary): New as wrapper around putpkt_binary_1.
19336 (putpkt_notif): New.
19337 (prepare_resume_reply): In non-stop mode, don't change the
19338 general_thread.
19339 * event-loop.c: New.
19340 * Makefile.in (OBJ): Add event-loop.o.
19341 (event-loop.o): New rule.
19342
19343 * linux-low.h (pid_of): Moved here.
19344 (lwpid_of): New.
19345 (get_lwp_thread): Use lwpid_of.
19346 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19347 * linux-low.c (pid_of): Delete.
19348 (inferior_pid): Use lwpid_of.
19349 (linux_event_pipe): New.
19350 (target_is_async_p): New.
19351 (delete_lwp): New.
19352 (handle_extended_wait): Use lwpid_of.
19353 (add_lwp): Don't set lwpid field.
19354 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19355 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19356 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19357 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19358 first. Adjust to linux_wait_for_event interface changes. Use
19359 lwpid_of.
19360 (linux_detach): Don't delete the main lwp here.
19361 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19362 (status_pending_p): Don't consider explicitly suspended lwps.
19363 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19364 pointer. Add OPTIONS argument. Change return type to int. Use
19365 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19366 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19367 pointer. Add status pointer argument. Return a pid instead of a
19368 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19369 changes. In non-stop mode, don't switch to a random thread.
19370 (linux_wait): Rename to...
19371 (linux_wait_1): ... this. Add target_options argument, and handle
19372 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19373 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19374 clean exit and signal exit code. Don't stop all threads in
19375 non-stop mode. In all-stop mode, only stop all threads when
19376 reporting a stop to GDB. Handle explicit thread stop requests.
19377 (async_file_flush, async_file_mark): New.
19378 (linux_wait): New.
19379 (send_sigstop): Use lwpid_of.
19380 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19381 interface changes. In non-stop mode, don't switch to a random
19382 thread.
19383 (linux_resume_one_lwp): Use lwpid_of.
19384 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19385 (linux_resume_one_thread): ... this. Handle resume_stop. In
19386 non-stop mode, don't look for pending flag in all threads.
19387 (resume_status_pending_p): Don't consider explicitly suspended
19388 threads.
19389 (my_waitpid): Reimplement. Emulate __WALL.
19390 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19391 Use lwpid_of.
19392 (sigchld_handler, linux_supports_non_stop, linux_async)
19393 (linux_start_non_stop): New.
19394 (linux_target_ops): Register linux_supports_non_stop, linux_async
19395 and linux_start_non_stop.
19396 (initialize_low): Install SIGCHLD handler.
19397 * thread-db.c (thread_db_create_event, find_one_thread)
19398 (thread_db_get_tls_address): Use lwpid_of.
19399 * win32-low.c (win32_detach): Adjust to use resume_kind.
19400 (win32_wait): Add `options' argument.
19401 * spu-low.c (spu_resume): Adjust to use resume_kind.
19402 (spu_wait): Add `options' argument.
19403
19404 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19405
19406 Decouple target code from remote protocol.
19407
19408 * target.h (enum target_waitkind): New.
19409 (struct target_waitstatus): New.
19410 (struct target_ops) <wait>: Return an unsigned long. Take a
19411 target_waitstatus pointer instead of a char pointer.
19412 (mywait): Likewise.
19413 * target.c (mywait): Change prototype to return an unsigned long.
19414 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19415 * server.h (thread_from_wait, old_thread_from_wait): Delete
19416 declarations.
19417 (prepare_resume_reply): Change prototype to take a
19418 target_waitstatus.
19419 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19420 (last_status, last_ptid): New.
19421 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19422 pid instead of a signal.
19423 (attach_inferior): Remove "status" and "signal" parameters.
19424 Adjust.
19425 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19426 not as an address.
19427 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19428 (handle_v_requests, myresume): Remove "status" and "signal"
19429 parameters. Adjust.
19430 (handle_status): New.
19431 (main): Delete local `status'. Adjust.
19432 * remote-utils.c: Include target.h.
19433 (prepare_resume_reply): Change prototype to take a
19434 target_waitstatus. Adjust.
19435
19436 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19437 interface.
19438 * spu-low.c (spu_wait): Adjust.
19439 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19440 Delete.
19441 (win32_wait): Adjust.
19442
19443 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19444
19445 * target.h (struct thread_resume): Delete leave_stopped member.
19446 (struct target_ops): Add a `n' argument to the `resume' callback.
19447 * server.c (start_inferior): Adjust.
19448 (handle_v_cont, myresume): Adjust.
19449 * linux-low.c (check_removed_breakpoint): Adjust to resume
19450 interface change, and to removed leave_stopped field.
19451 (resume_ptr): Delete.
19452 (struct thread_resume_array): New.
19453 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19454 resume interface change.
19455 (linux_continue_one_thread, linux_queue_one_thread)
19456 (resume_status_pending_p): Check if the resume field is NULL
19457 instead of checking the leave_stopped member.
19458 (linux_resume): Adjust to the target resume interface change.
19459 * spu-low.c (spu_resume): Adjust to the target resume interface
19460 change.
19461 * win32-low.c (win32_detach, win32_resume): Ditto.
19462
19463 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19464
19465 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19466 flag.
19467 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19468 pending.
19469 (linux_continue_one_thread): Only preserve the stepping flag if
19470 there's a pending breakpoint.
19471
19472 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19473
19474 * server.c (main): After the inferior having exited, call
19475 remote_close before exiting gdbserver.
19476
19477 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19478
19479 Fix size of FPSCR in Power 7 processors.
19480 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19481 (PPC_FEATURE_HAS_DFP): New #define.
19482 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19483 size of the FPSCR.
19484
19485 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19486
19487 * server.c (handle_query) Whitespace and formatting.
19488
19489 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19490
19491 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19492 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19493 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19494 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19495 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19496 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19497 Makefile.in, configure.ac: Fix whitespace throughout.
19498 * configure: Regenerate.
19499
19500 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19501
19502 * inferiors.c (find_inferior): Make it safe for the callback
19503 function to delete the currently iterated inferior.
19504
19505 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19506
19507 * Makefile.in (linuw_low_h): Move higher.
19508 (thread-db.o): Depend on $(linux_low_h).
19509
19510 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19511
19512 Rename "process" to "lwp" throughout.
19513
19514 * linux-low.c (all_processes): Rename to...
19515 (all_lwps): ... this.
19516 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19517 (add_process): Rename to ...
19518 (add_lwp): ... this. Adjust.
19519 (linux_create_inferior): Adjust.
19520 (linux_attach_lwp): Adjust.
19521 (linux_attach): Adjust.
19522 (linux_kill_one_process): Rename to ...
19523 (linux_kill_one_lwp): ... this. Adjust.
19524 (linux_kill): Adjust.
19525 (linux_detach_one_process): Rename to ...
19526 (linux_detach_one_lwp): ... this. Adjust.
19527 (linux_detach): Adjust.
19528 (check_removed_breakpoint): Adjust.
19529 (status_pending_p): Adjust.
19530 (linux_wait_for_process): Rename to ...
19531 (linux_wait_for_lwp): ... this. Adjust.
19532 (linux_wait_for_event): Adjust.
19533 (send_sigstop): Adjust.
19534 (wait_for_sigstop): Adjust.
19535 (stop_all_processes): Rename to ...
19536 (stop_all_lwps): ... this.
19537 (linux_resume_one_process): Rename to ...
19538 (linux_resume_one_lwp): ... this. Adjust.
19539 (linux_set_resume_request, linux_continue_one_thread)
19540 (linux_queue_one_thread, resume_status_pending_p)
19541 (usr_store_inferior_registers, regsets_store_inferior_registers)
19542 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19543 Adjust.
19544 * linux-low.h (get_process): Rename to ...
19545 (get_lwp): ... this. Adjust.
19546 (get_thread_process): Rename to ...
19547 (get_thread_lwp): ... this. Adjust.
19548 (get_process_thread): Rename to ...
19549 (get_lwp_thread): ... this. Adjust.
19550 (struct process_info): Rename to ...
19551 (struct lwp_info): ... this.
19552 (all_processes): Rename to ...
19553 (all_lwps): ... this.
19554 * proc-service.c (ps_lgetregs): Adjust.
19555 * thread-db.c (thread_db_create_event, find_one_thread)
19556 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19557
19558 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19559
19560 * server.c (handle_query): Handle "qAttached".
19561
19562 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19563
19564 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19565 GPLv3, update license URL.
19566
19567 2009-03-01 Doug Evans <dje@google.com>
19568
19569 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19570 (server_h): Add gdb_signals.h.
19571 (signals.o): Update.
19572 * server.h (target_signal_from_host,target_signal_to_host_p)
19573 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19574
19575 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19576
19577 * remote-utils.c (getpkt): Also generate remote-debug
19578 information if noack_mode is set.
19579
19580 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19581
19582 * server.c (handle_query): Report qXfer:siginfo:read and
19583 qXfer:siginfo:write as supported and handle them.
19584 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19585 * linux-low.c (linux_xfer_siginfo): New.
19586 (linux_target_ops): Set it.
19587
19588 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19589
19590 * server.c (gdbserver_usage): Mention --remote-debug.
19591 (main): Accept '--remote-debug' switch.
19592
19593 2009-01-18 Doug Evans <dje@google.com>
19594
19595 * regcache.c (new_register_cache): No need to check result of xcalloc.
19596 * server.c (handle_search_memory): Back out calls to xmalloc,
19597 result is checked and error is returned to user upon failure.
19598 (handle_query): Ditto. Add more checks for result of malloc.
19599 (handle_v_cont): Check result of malloc, report error back to
19600 user upon failure.
19601 (handle_v_run): Ditto. Call freeargv.
19602 * server.h (freeargv): Declare.
19603 * utils.c (freeargv): New fn.
19604
19605 2009-01-15 Doug Evans <dje@google.com>
19606
19607 * gdbreplay.c (perror_with_name): Make arg const char *.
19608 * server.h (target_signal_to_name): Make return type const char *.
19609 * thread-db.c (thread_db_err_str): Make return type const char *.
19610 * utils.c (perror_with_name): Make arg const char *.
19611
19612 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19613
19614 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19615 when handling a EXIT_PROCESS_DEBUG_EVENT.
19616
19617 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19618
19619 * gdbreplay.c (gdbreplay_version): Update copyright year.
19620 * server.c (gdbserver_version): Likewise.
19621
19622 2009-01-05 Doug Evans <dje@google.com>
19623
19624 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19625 (handle_extended_wait): Improve comment.
19626
19627 2008-12-13 Doug Evans <dje@google.com>
19628
19629 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19630 * server.h (ATTR_MALLOC): New macro.
19631 (xmalloc,xcalloc,xstrdup): Declare.
19632 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19633 * inferiors.c: Ditto.
19634 * linux-low.c: Ditto.
19635 * mem-break.c: Ditto.
19636 * regcache.c: Ditto.
19637 * remote-utils.c: Ditto.
19638 * server.c: Ditto.
19639 * target.c: Ditto.
19640 * win32-low.c: Ditto.
19641
19642 2008-12-12 Doug Evans <dje@google.com>
19643
19644 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19645 in debugging printf.
19646
19647 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19648
19649 2008-12-09 Doug Evans <dje@google.com>
19650
19651 * linux-low.h (struct process_info): Delete member tid, unused.
19652 * thread-db.c (find_one_thread): Update.
19653 (maybe_attach_thread): Update.
19654
19655 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19656
19657 * target.h (struct target_ops): Add qxfer_osdata member.
19658 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19659 and dirent.h.
19660 (linux_qxfer_osdata): New functions.
19661 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19662 callback.
19663 * server.c (handle_query): Handle "qXfer:osdata:read:".
19664 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19665 (buffer_xml_printf): New functions.
19666 * server.h (struct buffer): New.
19667 (buffer_grow_str, buffer_grow_str0): New macros.
19668 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19669 (buffer_xml_printf): Declare.
19670
19671 2008-11-24 Doug Evans <dje@google.com>
19672
19673 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19674
19675 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19676
19677 * server.c (handle_v_run): Always use the supplied argument list.
19678
19679 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19680
19681 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19682 (xtensa_regmap_table): Add entry for scompare1.
19683
19684 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19685
19686 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19687 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19688 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19689 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19690 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19691 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19692 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19693 XML target descriptions.
19694 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19695 when inferior is running on an ISA 2.05 or later processor. Add
19696 special case to return offset for full 64-bit slot of FPSCR when
19697 in 32-bits.
19698
19699 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19700
19701 * Makefile.in (SFILES, clean): Added sparc64 files.
19702 (reg-sparc64.o, reg-sparc64.c): New.
19703 * configure.srv (sparc*-*-linux*): New configuration.
19704 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19705 syscall arguments for SPARC.
19706 (regsets_store_inferior_registers): Likewise.
19707 * linux-sparc-low.c: New file.
19708
19709 2008-10-21 Doug Evans <dje@google.com>
19710
19711 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19712 (READLINE_DIR,READLINE_DEP): Delete.
19713 (INTERNAL_CFLAGS): Update.
19714 (LINTFLAGS): Update.
19715
19716 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19717
19718 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19719 whole argv from the last run, not just argv[0].
19720
19721 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19722
19723 * regcache.c (new_register_cache): Return NULL if the register
19724 cache size isn't known yet.
19725 (free_register_cache): Avoid dereferencing a NULL regcache.
19726
19727 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19728
19729 * configure.srv: Merge MIPS and MIPS64.
19730
19731 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19732
19733 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19734
19735 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19736
19737 * Makefile.in: Add required vsx dependencies.
19738
19739 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19740 Declare init_registers_powerpc_vsx32l.
19741 Declare init_registers_powerpc_vsx64l.
19742 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19743 (ppc_arch_setup): Check for VSX in hwcap.
19744 (ppc_fill_vsxregset): New function.
19745 (ppc_store_vsxregset): New function.
19746 Add new VSX entry in regset_info target_regsets.
19747
19748 * configure.srv: Add new VSX dependencies.
19749
19750 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19751
19752 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19753 (remote_open): Set or clear transport_is_reliable.
19754 (putpkt_binary): Don't expect acks in noack mode.
19755 (getpkt): Don't send ack/nac in noack mode.
19756 * server.c (handle_general_set): Handle QStartNoAckMode.
19757 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19758 qSupported.
19759 (main): Reset noack_mode on every connection.
19760 * server.h (noack_mode): Declare.
19761
19762 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19763
19764 * Makefile.in (GDBREPLAY_OBS): New variable.
19765 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19766
19767 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19768 Daniel Jacobowitz <dan@codesourcery.com>
19769
19770 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19771 (usr_store_inferior_registers): Likewise.
19772 (regsets_store_inferior_registers): Likewise.
19773
19774 2008-07-31 Rolf Jansen <rj@surtec.com>
19775 Pedro Alves <pedro@codesourcery.com>
19776
19777 * configure.ac: Check for memmem declaration.
19778 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19779 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19780 (disable_packet_qfThreadInfo): Unconditionally compile.
19781 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19782 * configure, config.in: Regenerate.
19783
19784 2008-07-28 Doug Kwan <dougkwan@google.com>
19785
19786 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19787 (linux_write_memory): Remove declaration of errno.
19788
19789 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19790
19791 * linux-low.c (handle_extended_wait): Do not use "status"
19792 variable uninitialized.
19793
19794 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19795
19796 * server.c (handle_v_attach): Inhibit reporting dll changes.
19797
19798 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19799
19800 * remote-utils.c (prepare_resume_reply): If requested, don't
19801 output "thread:TID" in the T stop reply.
19802
19803 * server.c (disable_packet_vCont, disable_packet_Tthread)
19804 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19805 (handle_query): If requested, disable support for qC, qfThreadInfo
19806 and qsThreadInfo.
19807 (handle_v_requests): If requested, disable support for vCont.
19808 (gdbserver_show_disableable): New.
19809 (main): Handle --disable-packet and --disable-packet=LIST.
19810
19811 * server.h (disable_packet_vCont, disable_packet_Tthread)
19812 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19813
19814 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19815
19816 * server.c (gdbserver_usage): Mention --version.
19817
19818 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19819
19820 * Makefile.in (gdbreplay.o): New rule.
19821
19822 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19823
19824 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19825 message, not gdbserver.
19826
19827 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19828 Nathan Sidwell <nathan@codesourcery.com>
19829 Joseph Myers <joseph@codesourcery.com>
19830
19831 * acinclude.m4: Include ../../config/acx.m4.
19832 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19833 * configure, config.in: Regenerate.
19834 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19835 * server.c (gdbserver_version): Print PKGVERSION.
19836 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19837 (main): Adjust gdbserver_usage calls.
19838 * gdbreplay.c (version, host_name): Add declarations.
19839 (gdbreplay_version, gdbreplay_usage): New.
19840 (main): Accept --version and --help options.
19841
19842 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19843
19844 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19845 (arm_breakpoint_at): Handle Thumb.
19846 (the_low_target): Add comment.
19847
19848 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19849
19850 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19851
19852 2008-05-09 Doug Evans <dje@google.com>
19853
19854 * server.h (decode_search_memory_packet): Declare.
19855 * remote-utils.c (decode_search_memory_packet): New fn.
19856 * server.c (handle_search_memory_1): New fn.
19857 (handle_search_memory): New fn.
19858 (handle_query): Process qSearch:memory packets.
19859
19860 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19861
19862 * regcache.c (registers_length): Remove.
19863 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19864 full register packet.
19865 * regcache.h (registers_length): Remove prototype.
19866 * server.h (PBUFSIZ): Define to 16384.
19867
19868 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19869
19870 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19871 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19872 powerpc-64l.o, and powerpc-altivec64l.o.
19873 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19874 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19875 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19876 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19877 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19878 to srv_xmlfiles.
19879
19880 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19881 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19882 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19883 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19884 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19885 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19886 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19887 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19888 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19889 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19890 (clean): Update.
19891
19892 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19893 (init_registers_powerpc_32l): ... this new prototype.
19894 (init_registers_powerpc_32): Remove, replace by ...
19895 (init_registers_powerpc_altivec32l): ... this new prototype.
19896 (init_registers_powerpc_e500): Remove, replace by ...
19897 (init_registers_powerpc_e500l): ... this new prototype.
19898 (init_registers_ppc64): Remove, replace by ...
19899 (init_registers_powerpc_64l): ... this new prototype.
19900 (init_registers_powerpc_64): Remove, replace by ...
19901 (init_registers_powerpc_altivec64l): ... this new prototype.
19902 (ppc_num_regs): Set to 73.
19903 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19904 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19905 (ppc_cannot_store_register): Handle orig_r3 and trap.
19906 (ppc_arch_setup): Update init_registers_... calls.
19907 (ppc_fill_gregset): Handle orig_r3 and trap.
19908
19909 * inferiors.c (clear_inferiors): Reset current_inferior.
19910
19911 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19912
19913 * acinclude.m4: Add override.m4.
19914 * configure: Regenerate.
19915
19916 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19917
19918 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19919 initial call to init_register_ppc64.
19920
19921 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19922
19923 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19924 single powerpc*-*-linux* case.
19925 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19926
19927 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19928
19929 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19930 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19931 from reg_xmlfiles.
19932 * linux-ppc-low.c: Include <elf.h>.
19933 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19934 (ppc_hwcap): New global variable.
19935 (ppc_regmap): Remove __SPE__ #ifdef sections.
19936 (ppc_regmap_e500): New global variable.
19937 (ppc_cannot_store_register): Update __SPE__ special case.
19938 (ppc_get_hwcap): New function.
19939 (ppc_arch_setup): Use it to determine whether inferior supports
19940 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19941 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19942 Do not access registers if target does not support AltiVec.
19943 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19944 Do not access registers if target does not support SPE.
19945 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19946
19947 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19948
19949 * linux-low.c (disabled_regsets, num_regsets): New.
19950 (use_regsets_p): Delete.
19951 (linux_wait_for_process): Clear disabled_regsets.
19952 (regsets_fetch_inferior_registers): Check and set it.
19953 (regsets_store_inferior_registers): Likewise.
19954 (linux_fetch_registers, linux_store_registers): Do not use
19955 use_regsets_p.
19956 (initialize_low): Allocate disabled_regsets.
19957
19958 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19959
19960 * Makefile.in (LIBOBJS): New.
19961 (OBS): Use LIBOBJS.
19962 (memmem.o): New rule.
19963 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19964 * configure: Regenerated.
19965
19966 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19967
19968 * server.c (handle_query): Never return "unsupported" for
19969 qXfer:features:read queries.
19970
19971 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19972
19973 * server.c (get_features_xml): Fix inverted condition.
19974 (handle_query): Always support qXfer:feature:read.
19975
19976 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19977
19978 * server.c (wrapper_argv): New.
19979 (start_inferior): Handle wrapper_argv. If set, expect an extra
19980 trap.
19981 (gdbserver_usage): Document --wrapper.
19982 (main): Parse --wrapper.
19983
19984 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19985
19986 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19987 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19988 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19989 (ppc_set_pc): Likewise.
19990 (ppc_arch_setup): New function.
19991 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19992 of collect_register.
19993 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19994
19995 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19996
19997 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19998 instead of linux-ppc64-low.o.
19999 * linux-ppc64-low.c: Remove file.
20000 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20001 (linux-ppc64-low.o): Remove rule.
20002
20003 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20004 (init_registers_powerpc_64): Likewise.
20005 (ppc_regmap): Conditionally define depending on __powerpc64__.
20006 (ppc_cannot_store_register): Do not special-case "fpscr" when
20007 compiled on __powerpc64__.
20008 (ppc_collect_ptrace_register): New function.
20009 (ppc_supply_ptrace_register): New function.
20010 (ppc_breakpoint): Change type to "unsigned int".
20011 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20012 (the_low_target): Conditionally provide initializers for the
20013 arch_setup member depending on __powerpc64__. Install
20014 collect_ptrace_register and supply_ptrace_register members.
20015
20016 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20017
20018 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20019 * server.c (gdbserver_xmltarget): Define.
20020 (get_features_xml): Use it to replace "target.xml" and arch_string.
20021
20022 * configure.srv: Remove srv_xmltarget. Add XML files that were
20023 mentioned there to srv_xmlfiles instead. Remove conditional tests
20024 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20025 srv_xmlfiles and srv_regobj to include all possible choices.
20026 * configure.ac (srv_xmltarget): Remove.
20027 (srv_xmlfiles): Do not add "target.xml".
20028 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20029 checks for supplementary target information.
20030 * configure: Regenerate.
20031 * Makefile.in (XML_TARGET): Remove.
20032 (target.xml): Remove rule.
20033 (clean): Do not clean up target.xml.
20034 (.PRECIOUS): Do not mention target.xml.
20035
20036 * target.h (struct target_ops): Remove arch_string member.
20037 * linux-low.c (linux_arch_string): Remove.
20038 (linux_target_ops): Remove arch_string initializer.
20039 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20040 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20041 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20042 * spu-low.c (spu_arch_string): Remove.
20043 (spu_target_ops): Remove arch_string initializer.
20044 * win32-low.c (win32_arch_string): Remove.
20045 (win32_target_ops): Remove arch_string initializer.
20046 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20047 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20048 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20049
20050 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20051
20052 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20053 by collect_ptrace_register and supply_ptrace_register hooks.
20054 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20055 instead of checking for the_low_target.left_pad_xfer.
20056 (usr_store_inferior_registers): Use collect_ptrace_register callback
20057 instead of checking for the_low_target.left_pad_xfer.
20058
20059 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20060 (s390_supply_ptrace_register): Likewise.
20061 (s390_fill_gregset): Call s390_collect_ptrace_register.
20062 (the_low_target): Update.
20063
20064 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20065 (ppc_supply_ptrace_register): Likewise.
20066 (the_low_target): Update.
20067
20068 * linux-i386-low.c (the_low_target): Update.
20069 * linux-x86-64-low.c (the_low_target): Update.
20070
20071 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20072
20073 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20074 reg-s390.o and reg-s390x.o.
20075
20076 * linux-low.c (new_inferior): New global variable.
20077 (linux_create_inferior, linux_attach): Set it.
20078 (linux_wait_for_process): Call the_low_target.arch_setup after the
20079 target has stopped for the first time.
20080 (initialize_low): Do not call the_low_target.arch_setup.
20081
20082 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20083 (s390_set_pc): Likewise.
20084 (s390_arch_setup): New function.
20085 (the_low_target): Use s390_arch_setup as arch_setup routine.
20086
20087 * regcache.c (realloc_register_cache): New function.
20088 (set_register_cache): Call it for each existing regcache.
20089
20090 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20091
20092 * server.h (init_registers): Remove prototype.
20093
20094 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20095 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20096 instead of init_registers ().
20097 * linux-arm-low.c (init_registers_arm): Add prototype.
20098 (init_registers_arm_with_iwmmxt): Likewise.
20099 (the_low_target): Add initializer for arch_setup field.
20100 * linux-cris-low.c (init_registers_cris): Add prototype.
20101 (the_low_target): Add initializer for arch_setup field.
20102 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20103 (the_low_target): Add initializer for arch_setup field.
20104 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20105 (the_low_target): Add initializer for arch_setup field.
20106 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20107 (the_low_target): Add initializer for arch_setup field.
20108 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20109 (the_low_target): Add initializer for arch_setup field.
20110 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20111 (the_low_target): Add initializer for arch_setup field.
20112 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20113 (init_registers_mips64_linux): Likewise.
20114 (the_low_target): Add initializer for arch_setup field.
20115 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20116 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20117 (the_low_target): Add initializer for arch_setup field.
20118 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20119 (init_registers_powerpc_64): Likewise.
20120 (the_low_target): Add initializer for arch_setup field.
20121 * linux-s390-low.c (init_registers_s390): Add prototype.
20122 (init_registers_s390x): Likewise.
20123 (the_low_target): Add initializer for arch_setup field.
20124 * linux-sh-low.c (init_registers_sh): Add prototype.
20125 (the_low_target): Add initializer for arch_setup field.
20126 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20127 (the_low_target): Add initializer for arch_setup field.
20128 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20129 (the_low_target): Add initializer for arch_setup field.
20130
20131 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20132 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20133 instead of init_registers ().
20134 * win32-arm-low.c (init_registers_arm): Add prototype.
20135 (the_low_target): Add initializer for arch_setup field.
20136 * win32-i386-low.c (init_registers_i386): Add prototype.
20137 (the_low_target): Add initializer for arch_setup field.
20138
20139 * spu-low.c (init_registers_spu): Add prototype.
20140 (initialize_low): Call initialie_registers_spu () instead of
20141 initialize_registers ().
20142
20143 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20144
20145 * server.c (handle_v_requests): When handling the vRun and vAttach
20146 packets, if already debugging a process, don't kill it. Return an
20147 error instead.
20148
20149 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20150
20151 * server.c (handle_query): Correct length check.
20152
20153 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20154
20155 * win32-low.c (do_initial_child_stuff): Add process handle
20156 parameter. Set current_process_handle and current_process_id from the
20157 parameters. Clear globals.
20158 (win32_create_inferior): Don't set current_process_handle and
20159 current_process_id here. Instead pass them on the call to
20160 do_initial_child_stuff.
20161 (win32_attach): Likewise.
20162 (win32_clear_inferiors): New.
20163 (win32_kill): Don't close the current process handle or the
20164 current thread handle here. Instead call win32_clear_inferiors.
20165 (win32_detach): Don't open a new handle to the process. Call
20166 win32_clear_inferiors.
20167 (win32_join): Don't rely on current_process_handle; open a new
20168 handle using the process id.
20169 (win32_wait): Call win32_clear_inferiors when the inferior process
20170 has exited.
20171
20172 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20173
20174 * server.c (monitor_show_help): Add "exit".
20175
20176 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20177
20178 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20179 (clean): Add reg-xtensa.c.
20180 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20181 * configure.srv (xtensa*-*-linux*) New target.
20182 * linux-xtensa-low.c: New.
20183 * xtensa-xtregs.c: New.
20184
20185 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20186
20187 * hostio.c: Don't include errno.h.
20188 (errno_to_fileio_errno): Move to hostio-errno.
20189 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20190 error number outputting to the target->hostio_last_error callback.
20191 (hostio_packet_error): Use FILEIO_EINVAL directly.
20192 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20193 calls to hostio_error.
20194 * hostio-errno.c: New.
20195 * server.h (hostio_last_error_from_errno): Declare.
20196 * target.h (target_ops): Add hostio_last_error member.
20197 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20198 as hostio_last_error handler.
20199 * spu-low.c (spu_target_ops): Likewise.
20200 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20201 (wince_hostio_last_error): New functions.
20202 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20203 as hostio_last_error handler.
20204 (win32_target_ops) [!_WIN32_WCE]: Register
20205 hostio_last_error_from_errno as hostio_last_error handler.
20206 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20207 (hostio-errno.o): New rule.
20208 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20209 * configure.srv (srv_hostio_err_objs): New variable. Default to
20210 hostio-errno.o.
20211 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20212 * configure: Regenerate.
20213
20214 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20215
20216 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20217 (linux_kill, linux_detach): Clean up the process list.
20218 * remote-utils.c (remote_open): Improve port number parsing.
20219 (putpkt_binary, input_interrupt): Only send interrupts if the target
20220 is running.
20221 * server.c (extended_protocol): Make static.
20222 (attached): Define earlier.
20223 (exit_requested, response_needed, program_argv): New variables.
20224 (target_running): New.
20225 (start_inferior): Clear attached here.
20226 (attach_inferior): Set attached here.
20227 (require_running): Define.
20228 (handle_query): Use require_running and target_running. Implement
20229 "monitor exit".
20230 (handle_v_attach, handle_v_run): New.
20231 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20232 (gdbserver_usage): Update.
20233 (main): Redo argument parsing. Handle --debug and --multi. Handle
20234 --attach along with other options or after the port. Save
20235 program_argv. Support no initial program. Resynchronize
20236 communication with GDB after an error. Handle "monitor exit".
20237 Use require_running and target_running. Always allow the extended
20238 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20239 restart in extended mode.
20240 * README: Refer to the GDB manual. Update --attach usage.
20241
20242 2007-12-20 Andreas Schwab <schwab@suse.de>
20243
20244 * linux-low.c (STACK_SIZE): Define.
20245 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20246 (linux_test_for_tracefork): Likewise.
20247
20248 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20249
20250 * linux-low.c (linux_wait_for_event): Update messages. Do not
20251 reinsert auto-delete breakpoints.
20252 * mem-break.c (struct breakpoint): Change return type of handler to
20253 int.
20254 (set_breakpoint_at): Update handler type.
20255 (reinsert_breakpoint_handler): Return 1 instead of calling
20256 delete_breakpoint.
20257 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20258 setting a new one.
20259 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20260 * mem-break.h (set_breakpoint_at): Update handler type.
20261 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20262 * win32-low.c (auto_delete_breakpoint): New.
20263 (get_child_debug_event): Use it.
20264
20265 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20266
20267 * configure.ac: Check for pread and pwrite.
20268 * hostio.c (handle_pread): Fall back to lseek and read.
20269 (handle_pwrite): Fall back to lseek and write.
20270 * config.in, configure: Regenerated.
20271
20272 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20273
20274 * server.c (myresume): Add own_buf argument.
20275 (main): Update calls.
20276
20277 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20278
20279 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20280 * remote-utils.c (remote_open): Do not call disable_async_io.
20281 (block_async_io): Delete.
20282 (unblock_async_io): Make static.
20283 (initialize_async_io): New.
20284 * server.c (handle_v_cont): Handle async I/O here.
20285 (myresume): Likewise. Move other common resume tasks here...
20286 (main): ... from here. Call initialize_async_io. Disable async
20287 I/O before the main loop.
20288 * server.h (initialize_async_io): Declare.
20289 (block_async_io, unblock_async_io): Delete prototypes.
20290 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20291
20292 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20293
20294 * remote-utils.c (readchar): Allow binary data in received messages.
20295
20296 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20297
20298 * win32-low.c (attaching): New global.
20299 (win32_create_inferior): Clear the `attaching' global.
20300 (win32_attach): Set the `attaching' global.
20301 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20302 attaching. Only set a breakpoint at the entry point if not
20303 attaching.
20304
20305 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20306
20307 * server.c (main): Don't report dll events on the initial
20308 connection on attaches.
20309
20310 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20311
20312 * server.c (main): Relax numerical bases supported for the pid of
20313 the --attach command line argument.
20314
20315 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20316
20317 * win32-low.c (win32_attach): Call OpenProcess before
20318 DebugActiveProcess, not after. Add last error output to error
20319 call.
20320
20321 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20322
20323 * win32-low.c (win32_get_thread_context)
20324 (win32_set_thread_context): New functions.
20325 (thread_rec): Use win32_get_thread_context.
20326 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20327 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20328 field.
20329
20330 2007-12-03 Leo Zayas
20331 Pedro Alves <pedro_alves@portugalmail.pt>
20332
20333 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20334 global variables.
20335 (child_add_thread): Minor cleanup.
20336 (child_continue): Resume artificially suspended threads before
20337 calling ContinueDebugEvent.
20338 (suspend_one_thread): New.
20339 (fake_breakpoint_event): New.
20340 (get_child_debug_event): Change return type to int. Check here if
20341 gdb sent an interrupt request. If a soft interrupt was requested,
20342 fake a breakpoint event. Return 0 if there is no event to handle,
20343 and 1 otherwise.
20344 (win32_wait): Don't check here if gdb sent an interrupt request.
20345 Ensure there is a valid event to handle.
20346 (win32_request_interrupt): Add soft interruption method as last
20347 resort.
20348
20349 2007-12-03 Leo Zayas
20350 Pedro Alves <pedro_alves@portugalmail.pt>
20351
20352 * win32-low.h (win32_thread_info): Add descriptions to the
20353 structure members. Replace `suspend_count' counter by a
20354 `suspended' flag.
20355 * win32-low.c (thread_rec): Update condition of when to get the
20356 context from the inferior. Rely on ContextFlags being set if it
20357 has already been retrieved. Only suspend the inferior thread if
20358 we haven't already. Warn if that fails.
20359 (continue_one_thread): s/suspend_count/suspended/. Only call
20360 ResumeThread once. Warn if that fails.
20361
20362 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20363
20364 * win32-low.c (win32_wait): Don't read from the inferior when it
20365 has already exited.
20366
20367 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20368
20369 * Makefile.in (win32_low_h): New variable.
20370 (win32-low.o): Add dependency on $(win32_low_h).
20371 (win32-arm-low.o, win32-i386-low.o): New rules.
20372
20373 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20374
20375 * hostio.c: Correct copyright year.
20376
20377 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20378
20379 * Makefile.in (OBS): Add hostio.o.
20380 (hostio.o): New rule.
20381 * server.h (handle_vFile): Declare.
20382 * hostio.c: New file.
20383 * server.c (handle_v_requests): Take packet_len and new_packet_len
20384 for binary packets. Call handle_vFile.
20385 (main): Update call to handle_v_requests.
20386
20387 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20388
20389 * linux-low.c: Include <sched.h>.
20390
20391 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20392
20393 * linux-low.c (linux_tracefork_grandchild): New.
20394 (linux_tracefork_child): Use clone.
20395 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20396
20397 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20398
20399 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20400
20401 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20402
20403 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20404
20405 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20406
20407 * inferiors.c (change_inferior_id): Delete.
20408 (add_pid_to_list, pull_pid_from_list): New.
20409 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20410 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20411 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20412 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20413 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20414 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20415 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20416 (using_threads): Always set to 1.
20417 (handle_extended_wait): New.
20418 (add_process): Do not set TID.
20419 (linux_create_inferior): Set must_set_ptrace_flags.
20420 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20421 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20422 (linux_thread_alive): Rename TID argument to LWPID.
20423 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20424 (linux_wait_for_event): Do not use TID or check using_threads. Update
20425 call to dead_thread_notify. Call handle_extended_wait.
20426 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20427 (send_sigstop): Delete sigstop_sent.
20428 (wait_for_sigstop): Avoid TID.
20429 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20430 (linux_test_for_tracefork): New.
20431 (linux_lookup_signals): Use thread_db_active and
20432 linux_supports_tracefork_flag.
20433 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20434 * linux-low.h (get_process_thread): Avoid TID.
20435 (struct process_ifo): Move thread_known and tid to the end. Remove
20436 sigstop_sent.
20437 (linux_attach_lwp, thread_db_init): Update prototypes.
20438 * server.h (change_inferior_id): Delete prototype.
20439 (add_pid_to_list, pull_pid_from_list): New prototypes.
20440 * thread-db.c (thread_db_use_events): New.
20441 (find_first_thread): Rename to...
20442 (find_one_thread): ...this. Update callers and messages. Do not
20443 call fatal. Check thread_db_use_events. Do not call
20444 change_inferior_id or new_thread_notify.
20445 (maybe_attach_thread): Update. Do not call new_thread_notify.
20446 (thread_db_init): Set thread_db_use_events. Check use_events.
20447 * utils.c (fatal, warning): Correct message prefix.
20448
20449 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20450
20451 * Makefile.in (clean): Remove new files.
20452 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20453 (powerpc-64.o, powerpc-64.c): New rules.
20454 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20455 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20456 with SPE.
20457 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20458 SPE targets.
20459 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20460 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20461 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20462 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20463 (target_regsets): Add AltiVec and SPE register sets.
20464 * configure.ac: Check for AltiVec and SPE.
20465 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20466 (ppc_fill_vrregset, ppc_store_vrregset): New.
20467 (target_regsets): Add AltiVec register set.
20468 * configure: Regenerated.
20469
20470 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20471
20472 * linux-low.c (O_LARGEFILE): Define.
20473 (linux_read_memory): Use /proc/PID/mem.
20474 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20475 * configure, config.in: Regenerated.
20476
20477 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20478
20479 * linux-low.c (linux_wait_for_event): Do not pass signals while
20480 single-stepping.
20481
20482 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20483
20484 * win32-low.c (create_process): New.
20485 (win32_create_inferior): Use create_process instead of
20486 CreateProcess. If create_process failed retry appending an ".exe"
20487 suffix. Store the GetLastError result immediatelly after
20488 create_process calls and use it on the call to error.
20489
20490 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20491
20492 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20493
20494 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20495
20496 * configure.ac: Switch license to GPLv3.
20497
20498 2007-08-01 Michael Snyder <msnyder@access-company.com>
20499
20500 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20501
20502 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20503
20504 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20505 typedef.
20506 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20507 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20508 CloseToolhelp32Snapshot.
20509 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20510 CloseToolhelp32Snapshot.
20511
20512 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20513
20514 * server.c (main): Check for inferior exit before main loop.
20515
20516 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20517
20518 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20519 instead of on tmp_desc.
20520
20521 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20522 Daniel Jacobowitz <dan@codesourcery.com>
20523
20524 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20525 (add_thread): Minor cleanups.
20526 (clear_inferiors): Move lower in the file. Clear the DLL
20527 list.
20528 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20529 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20530 (xml_escape_text): New.
20531 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20532 for qSupported.
20533 (handle_v_cont): Report errors.
20534 (gdbserver_version): Update.
20535 (main): Correct size of own_buf. Do not report initial DLL events.
20536 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20537 (unloaded_dll, xml_escape_text): New.
20538 * win32-low.c (enum target_waitkind): Update comments.
20539 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20540 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20541 (win32_EnumProcessModules, win32_GetModuleInformation)
20542 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20543 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20544 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20545 (win32_Module32First, win32_Module32Next, load_toolhelp)
20546 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20547 (get_child_debug_event): Handle DLL events.
20548 (win32_wait): Likewise.
20549
20550 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20551
20552 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20553 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20554
20555 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20556
20557 * win32-low.c (handle_output_debug_string): Ignore event if not
20558 waiting.
20559
20560 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20561
20562 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20563
20564 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20565
20566 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20567
20568 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20569
20570 * inferiors.c (change_inferior_id): Add comment.
20571 * linux-low.c (check_removed_breakpoint): Add an early
20572 prototype. Improve debug output.
20573 (linux_attach): Doc update.
20574 (linux_detach_one_process, linux_detach): Clean up before releasing
20575 each process.
20576 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20577 * linux-low.h (struct process_info): Doc improvement.
20578 * mem-break.c (delete_all_breakpoints): New.
20579 * mem-break.h (delete_all_breakpoints): New prototype.
20580 * thread-db.c (find_first_thread): New.
20581 (thread_db_create_event): Call it instead of
20582 thread_db_find_new_threads. Clean up unused variables.
20583 (maybe_attach_thread): Remove first thread handling.
20584 (thread_db_find_new_threads): Use find_first_thread.
20585 (thread_db_get_tls_address): Likewise.
20586
20587 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20588
20589 * thread-db.c (thread_db_find_new_threads): Add prototype.
20590 (thread_db_create_event): Check for the main thread before adding
20591 a new thread.
20592 (maybe_attach_thread): Only enable event reporting if TID == 0.
20593 (thread_db_get_tls_address): Check for new threads.
20594
20595 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20596
20597 * linux-low.c (linux_create_inferior): Try execv before execvp.
20598 * spu-low.c (spu_create_inferior): Likewise.
20599
20600 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20601
20602 * linux-low.c (linux_create_inferior): Change execv to execvp.
20603 * spu-low.c (spu_create_inferior): Likewies.
20604
20605 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20606
20607 * Makefile.in (clean): Clean new files instead of deleted ones.
20608 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20609 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20610 rules.
20611 * configure.srv: Specify XML files and new regformats for MIPS and
20612 MIPS64 GNU/Linux.
20613 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20614 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20615 an entry for the restart register.
20616 (mips_cannot_fetch_register, mips_cannot_store_register)
20617 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20618 register names to match the XML descriptions.
20619 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20620 restart register instead of $0.
20621
20622 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20623 Markus Deuling <deuling@de.ibm.com>
20624
20625 * remote-utils.c (decode_xfer_write): New function.
20626 * server.h (decode_xfer_write): Add prototype.
20627 * server.c (handle_query): Add PACKET_LEN argument. Support
20628 qXfer:spu:read and qXfer:spu:write packets.
20629 (main): Pass packet_len to handle_query.
20630 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20631 * target.h (target_ops): Add qxfer_spu.
20632
20633 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20634
20635 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20636 accessing non-seekable spufs files.
20637
20638 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20639
20640 * server.c (handle_query): Add reply for qC packet.
20641
20642 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20643 Leo Zayas <lerele@champenstudios@com>
20644
20645 * server.h (check_remote_input_interrupt_request): New function.
20646 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20647 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20648 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20649 (check_remote_input_interrupt_request): New function.
20650 * server.h (check_remote_input_interrupt_request): Declare.
20651 * win32-low.c (winapi_DebugBreakProcess,
20652 winapi_GenerateConsoleCtrlEvent): New typedefs.
20653 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20654 to 250 ms.
20655 (win32_wait): Check for remote interrupt request
20656 with check_remote_input_interrupt_request.
20657 (win32_request_interrupt): New function.
20658 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20659
20660 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20661
20662 * win32-low.c (debug_registers_changed,
20663 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20664 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20665 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20666 (thread_rec): Get context using the low target.
20667 (child_add_thread): Call thread_added on the low target,
20668 which does the same thing.
20669 (regptr): Delete.
20670 (do_initial_child_stuff): Remove debug registers references.
20671 Set context using the low target. Resume threads after
20672 setting the contexts.
20673 (child_continue): Remove dead variable. Remove debug
20674 registers references.
20675 (child_fetch_inferior_registers): Go through the low target.
20676 (do_child_store_inferior_registers): Remove.
20677 (child_store_inferior_registers): Go through the low target.
20678 (win32_resume): Remove debug registers references.
20679 Set context using the low target.
20680 (handle_exception): Change return type to void. Don't record
20681 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20682 first chance exception.
20683 (get_child_debug_event): Change return type to void. Remove
20684 goto loop. Always return after waiting for debug event.
20685 (win32_wait): Convert to switch statement. Handle spurious
20686 events.
20687
20688 * win32-i386-low.c (debug_registers_changed,
20689 debug_registers_used): New.
20690 (initial_stuff): Rename to ...
20691 (i386_initial_stuff): ... this. Clear debug registers
20692 state variables.
20693 (store_debug_registers): Delete.
20694 (i386_get_thread_context): New.
20695 (load_debug_registers): Delete.
20696 (i386_set_thread_context): New.
20697 (i386_thread_added): New.
20698 (single_step): Rename to ...
20699 (i386_single_step): ... this.
20700 (do_fetch_inferior_registers): Rename to ...
20701 (i386_fetch_inferior_register): ... this.
20702 (i386_store_inferior_register): New.
20703 (the_low_target): Adapt to new interface.
20704
20705 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20706 (arm_get_thread_context): New.
20707 (arm_set_thread_context): New.
20708 (regptr): New.
20709 (do_fetch_inferior_registers): Rename to ...
20710 (arm_fetch_inferior_register): ... this.
20711 (arm_store_inferior_register): New.
20712 (arm_wince_breakpoint): Reimplement as unsigned long.
20713 (arm_wince_breakpoint_len): Define.
20714 (the_low_target): Adapt to new interface.
20715
20716 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20717 load_debug_registers. Add get_thread_context, set_thread_context,
20718 thread_added and store_inferior_register. Rename
20719 fetch_inferior_registers to fetch_inferior_register.
20720 (regptr): Remove declaration.
20721
20722 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20723
20724 * linux-low.c (linux_detach): Change return type to int. Return 0.
20725 * spu-low.c (spu_detach): Likewise.
20726
20727 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20728
20729 * target.h (target_ops): Change return type of detach to int.
20730 Add join.
20731 (join_inferior): New.
20732 * server.c (main): Don't skip detach support on mingw32.
20733 If the inferior doesn't support detaching return error.
20734 Call join_inferior instead of using waitpid.
20735 * linux-low.c (linux_join): New.
20736 (linux_target_op): Add linux_join.
20737 * spu-low.c (spu_join): New.
20738 (spu_target_ops): Add spu_join.
20739 * win32-low.c (win32_detach): Adapt to new interface.
20740 Reopen current_process_handle before detaching. Issue a child
20741 resume before detaching.
20742 (win32_join): New.
20743 (win32_target_op): Add win32_join.
20744
20745 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20746
20747 * win32-low.c (win32-attach): Fix return value.
20748 * target.h (target_ops): Describe ATTACH return values.
20749
20750 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20751
20752 * win32-low.c (GETPROCADDRESS): Define.
20753 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20754 (winapi_DebugSetProcessKillOnExit): Likewise.
20755 (win32_create_inferior): Force usage of ansi CreateProcessA.
20756 (win32_attach): Use GETPROCADDRESS.
20757 (win32_detach): Likewise.
20758
20759 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20760
20761 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20762
20763 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20764
20765 * win32-low.c: Commit leftover changes from 2007-03-29.
20766
20767 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20768
20769 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20770 fields short instead of int. Add explicit padding.
20771 (i387_cache_to_fsave): Remove unnecessary casts.
20772 (i387_fsave_to_cache): Doc fix.
20773 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20774
20775 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20776
20777 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20778 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20779
20780 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20781
20782 * configure.srv (arm*-*-mingw32ce*): Move near the other
20783 arm targets.
20784
20785 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20786
20787 * configure.ac: Add errno checking.
20788 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20789 sys/file.h and malloc.h.
20790 (AC_CHECK_DECLS): Add perror.
20791 (srv_mingwce): Handle.
20792 * configure.srv (i[34567]86-*-cygwin*): Add
20793 win32-i386-low.o to srv_tgtobj.
20794 (i[34567]86-*-mingw*): Likewise.
20795 (arm*-*-mingw32ce*): Add case.
20796 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20797 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20798 [__MINGW32CE__] (strerror): New function.
20799 [__MINGW32CE__] (errno): Define to GetLastError.
20800 [__MINGW32CE__] (COUNTOF): New macro.
20801 (remote_open): Remove extra close call.
20802 * mem-break.c (delete_breakpoint_at): New function.
20803 * mem-break.h (delete_breakpoint_at): Declare.
20804 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20805 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20806 [USE_WIN32API] (read, write): Add char* casts.
20807 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20808 * server.h: Include wincecompat.h on Windows CE.
20809 [HAVE_ERRNO_H]: Check.
20810 (perror): Declare if not declared.
20811 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20812 (perror_with_name): Remove errno declaration.
20813 * wincecompat.h: New.
20814 * wincecompat.c: New.
20815 * win32-low.h: New.
20816 * win32-arm-low.c: New.
20817 * win32-i386-low.c: New.
20818 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20819 (OUTMSG2): Make it safe.
20820 (_T): New macro.
20821 (COUNTOF): New macro.
20822 (NUM_REGS): Get it from the low target.
20823 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20824 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20825 (thread_rec): Let low target handle debug registers.
20826 (child_add_thread): Likewise.
20827 (child_init_thread_list): Likewise.
20828 (continue_one_thread): Likewise.
20829 (regptr): New.
20830 (do_child_fetch_inferior_registers): Move to ...
20831 * win32-i386-low.c: ... here, and rename to ...
20832 (do_fetch_inferior_registers): ... this.
20833 * win32-low.c (child_fetch_inferior_registers):
20834 Go through the low target.
20835 (do_child_store_inferior_registers): Use regptr.
20836 (strwinerror): New function.
20837 (win32_create_inferior): Handle Windows CE.
20838 Use strwinerror instead of strerror on Windows error
20839 codes. Add program to the error output.
20840 Don't close the main thread handle on Windows CE.
20841 (win32_attach): Use coredll.dll on Windows CE.
20842 (win32_kill): Close current process and current
20843 thread handles.
20844 (win32_detach): Use coredll.dll on Windows CE.
20845 (win32_resume): Let low target handle debug registers, and
20846 step request.
20847 (handle_exception): Add/Remove initial breakpoint. Avoid
20848 non-existant WSTOPSIG on Windows CE.
20849 (win32_read_inferior_memory): Cast to remove warning.
20850 (win32_arch_string): Go through the low target.
20851 (initialize_low): Call set_breakpoint_data with the low
20852 target's breakpoint.
20853 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20854 FOP_REGNUM, mappings): Move to ...
20855 * win32-i386-low.c: ... here.
20856 * win32-low.c (win32_thread_info): Move to ...
20857 * win32-low.h: ... here.
20858 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20859 win32-arm-low.c and wincecompat.c.
20860 (all:): Add $EXEEXT.
20861 (install-only:): Likewise.
20862 (gdbserver:): Likewise.
20863 (gdbreplay:): Likewise.
20864 * config.in: Regenerate.
20865 * configure: Regenerate.
20866
20867 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20868
20869 * win32-low.c: Rename typedef thread_info to
20870 win32_thread_info throughout.
20871
20872 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20873
20874 * win32-i386-low.c: Rename to ...
20875 * win32-low.c: ... this.
20876 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20877 * Makefile.in: Likewise.
20878
20879 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20880
20881 * remote-utils.c (monitor_output): Constify msg parameter.
20882 * server.h (monitor_output): Likewise.
20883 * win32-i386-low.c (handle_output_debug_string): New.
20884 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20885 handle_output_debug_string.
20886 (get_child_debug_event): Likewise.
20887
20888 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20889
20890 * server.c (main): Correct strtoul check.
20891
20892 2007-03-27 Jon Ringle <jon@ringle.org>
20893
20894 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20895
20896 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20897
20898 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20899
20900 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20901
20902 * terminal.h: Check HAVE_SGTTY_H.
20903
20904 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20905
20906 * remote-utils.c (remote_open): Print out the assigned port number.
20907
20908 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20909
20910 * remote-utils.c (monitor_output): New function.
20911 * server.c (debug_threads): Define here.
20912 (monitor_show_help): New function.
20913 (handle_query): Handle qRcmd.
20914 (main): Do not handle 'd' packet.
20915 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20916 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20917 of debug_threads.
20918
20919 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20920
20921 * Makefile.in (EXEEXT): New.
20922 (clean): Use $(EXEEXT).
20923
20924 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20925
20926 * target.h (target_ops): Rename send_signal to request_interrupt,
20927 and remove enum target_signal parameter.
20928 * linux-low.c (linux_request_interrupt): Rename from
20929 linux_send_signal, and always send SIGINT.
20930 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20931 and always send SIGINT.
20932 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20933 of send_signal.
20934 (input_interrupt): Likewise.
20935
20936 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20937
20938 * server.c (get_features_xml): Check if target implemented
20939 arch_string.
20940 * win32-i386-low.c (win32_arch_string): New.
20941 (win32_target_ops): Add win32_arch_string as arch_string member.
20942
20943 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20944
20945 * spu-low.c (spu_arch_string): New.
20946 (spu_target_ops): Add spu_arch_string.
20947
20948 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20949
20950 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20951 * configure.ac: Do not check for terminal.h.
20952 * configure, config.in: Regenerated.
20953
20954 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20955
20956 * Makefile.in (OBS): Add $(XML_BUILTIN).
20957 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20958 (clean): Update.
20959 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20960 (arm-with-iwmmxt.c): New.
20961 * config.in, configure: Regenerate.
20962 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20963 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20964 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20965 (arm*-*-linux*): Add iWMMXt and regset support.
20966 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20967 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20968 (arm_store_wmmxregset, target_regsets): New.
20969 * server.c (get_features_xml): Take annex argument. Check builtin
20970 XML documents.
20971 (handle_query): Handle multiple annexes.
20972
20973 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20974
20975 * remote-utils.c [USE_WIN32API] (read, write): Define.
20976 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20977 write.
20978
20979 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20980
20981 * linux-i386-low.c (the_low_target): Set arch_string.
20982 * linux-x86-64-low.c (the_low_target): Likewise.
20983 * linux-low.c (linux_arch_string): New.
20984 (linux_target_ops): Add it.
20985 * linux-low.h (struct linux_target_ops): Add arch_string.
20986 * server.c (write_qxfer_response): Use const void * for DATA.
20987 (get_features_xml): New.
20988 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20989 * target.h (struct target_ops): Add arch_string method.
20990
20991 2007-01-03 Denis Pilat <denis.pilat@st.com>
20992 Daniel Jacobowitz <dan@codesourcery.com>
20993
20994 * linux-low.c (linux_kill): Handle being called with no threads.
20995 * win32-i386-low.c (win32_kill): Likewise.
20996 (get_child_debug_event): Clear current_process_handle.
20997
20998 2006-12-30 Denis PILAT <denis.pilat@st.com>
20999 Daniel Jacobowitz <dan@codesourcery.com>
21000
21001 * remote-utils.c (remote_open): Check the type of specified
21002 serial port devices before opening them.
21003 * server.c (main): Kill the inferior if an error occurs during
21004 the first remote_open.
21005
21006 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21007
21008 * README: Update supported targets.
21009
21010 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21011
21012 * Makefile.in (clean): Remove reg-mips64.c.
21013 (reg-mips64.c, reg-mips64.o): New rules.
21014 * configure.srv: Handle mips64. Include regset support for mips.
21015 * linux-mips-low.c (union mips_register): New.
21016 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21017 (mips_breakpoint, mips_breakpoint_at): Use int.
21018 (mips_collect_register, mips_supply_register)
21019 (mips_collect_register_32bit, mips_supply_register_32bit)
21020 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21021 (mips_store_fpregset, target_regsets): New.
21022 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21023
21024 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21025
21026 * configure.srv: Add target "spu*-*-*".
21027 * Makefile.in (clean): Remove reg-spu.c.
21028 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21029 * spu-low.c: New file.
21030
21031 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21032
21033 * configure.ac: Correct td_thr_tls_get_addr test.
21034 * configure: Regenerated.
21035
21036 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21037
21038 * linux-low.c (linux_wait_for_event): Reformat. Use the
21039 pass_signals array.
21040 * remote-utils.c (decode_address_to_semicolon): New.
21041 * server.c (pass_signals, handle_general_set): New.
21042 (handle_query): Mention QPassSignals for qSupported.
21043 (main): Call handle_general_set.
21044 * server.h (pass_signals, decode_address_to_semicolon): New.
21045
21046 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21047
21048 * server.c (handle_query): Correct error handling for read_auxv.
21049
21050 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21051
21052 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21053 and srv_linux_thread_db to yes.
21054 * linux-s390-low.c (s390_fill_gregset): New function.
21055 (target_regsets): Define data structure.
21056
21057 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21058
21059 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21060 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21061 * config.in, configure: Regenerated.
21062 * inferiors.c (gdb_id_to_thread): New function.
21063 (gdb_id_to_thread_id): Use it.
21064 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21065 * linux-low.h (struct process_info): Add th member.
21066 (thread_db_get_tls_address): New prototype.
21067 * remote-utils.c (decode_address): Make non-static.
21068 * server.c (handle_query): Handle qGetTLSAddr.
21069 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21070 * target.h (struct target_ops): Add get_tls_address.
21071 * thread-db.c (maybe_attach_thread): Save the thread handle.
21072 (thread_db_get_tls_address): New.
21073
21074 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21075
21076 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21077 (linux_resume_one_process): Take a siginfo_t *. Update all
21078 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21079 (struct pending_signals): Add a siginfo_t.
21080 (linux_wait_for_process): Always set last_status.
21081 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21082 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21083 * linux-low.h (struct process_info): Add last_status.
21084
21085 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21086
21087 * remote-utils.c (try_rle): New function.
21088 (putpkt_binary): Use it.
21089
21090 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21091
21092 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21093 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21094 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21095 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21096 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21097 point registers.
21098
21099 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21100
21101 * server.c (terminal_fd): New variable.
21102 (old_foreground_pgrp): Likewise.
21103 (restore_old_foreground_pgrp): New function.
21104 (start_inferior): Record the terminal file descriptor in terminal_fd
21105 and its original foreground group in old_foreground_pgrp. Register
21106 restore_old_foreground_pgrp with atexit().
21107
21108 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21109
21110 * server.c (handle_query): Correct qPart to qXfer.
21111
21112 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21113
21114 * configure.ac: Check for more headers which are missing on
21115 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21116 * configure.srv: Add Cygwin and mingw32.
21117 * remote-utils.c: Don't include headers unconditionally which
21118 are missing on mingw32. Include <winsock.h> for mingw32.
21119 (remote_open): Adjust for mingw32 support. Flush
21120 standard error after writing to it.
21121 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21122 (unblock_async_io, enable_async_io, disable_async_io)
21123 (readchar, getpkt): Update for Winsock support.
21124 (prepare_resume_reply): Expect a protocol signal number.
21125 * server.c: Disable <sys/wait.h> on mingw32.
21126 (start_inferior): Adjust for mingw32 support. Flush
21127 standard error after writing to it.
21128 (attach_inferior): Likewise. Use protocol signal
21129 numbers.
21130 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21131 and names.
21132 * win32-i386-low.c: New file.
21133 * Makefile.in (XM_CLIBS): Set.
21134 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21135 (win32-i386-low.o): New dependency rule.
21136 * linux-low.c (linux_wait): Use target signal numbers.
21137 * target.h (struct target_ops): Doc fix.
21138 * server.h (target_signal_to_name): New prototype.
21139 * gdbreplay.c: Don't include headers unconditionally which
21140 are missing on mingw32. Include <winsock.h> for mingw32.
21141 (remote_close, remote_open): Adjust for Winsock support.
21142 * configure, config.in: Regenerated.
21143
21144 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21145
21146 * server.c (decode_xfer_read, write_qxfer_response): New.
21147 (handle_query): Take a packet length argument. Handle
21148 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21149 the qSupported response.
21150 (main): Update call to handle_query.
21151
21152 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21153
21154 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21155 (putpkt_binary): Renamed from putpkt and adjusted for binary
21156 data.
21157 (putpkt): New wrapper for putpkt_binary.
21158 (readchar): Don't mask off the high bit.
21159 (decode_X_packet): New function.
21160 * server.c (main): Call putpkt_binary if a handler sets the packet
21161 length. Save the length of the incoming packet. Handle 'X'.
21162 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21163
21164 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21165
21166 * server.c (handle_query): Handle qSupported.
21167
21168 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21169
21170 * remote-utils.c (all_symbols_looked_up): New variable.
21171 (look_up_one_symbol): Check it.
21172 * server.h (look_up_one_symbol): New declaration.
21173 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21174
21175 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21176
21177 * Makefile.in (linux-arm-low.o): Update dependencies.
21178 * linux-arm-low.c: Include "gdb_proc_service.h".
21179 (PTRACE_GET_THREAD_AREA): Define.
21180 (ps_get_thread_area): New function.
21181
21182 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21183
21184 * configure.srv (m68k*-*-uclinux*): New target.
21185 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21186 (linux_resume_one_process): Remove extraneous cast.
21187 (linux_read_offsets): New.
21188 (linux_target_op): Add linux_read_offsets on mmuless systems.
21189 * server.c (handle_query): Add qOffsets logic.
21190 * target.h (struct target_ops): Add read_offsets.
21191
21192 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21193
21194 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21195 (PTRACE_GET_THREAD_AREA): Define.
21196 (ps_get_thread_area): New function.
21197 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21198 (linux-x86-64-low.o): Update.
21199
21200 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21201
21202 * configure.ac: Remove checks for prfpregset_t.
21203 * gdb_proc_service.h: New file.
21204 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21205 new "gdb_proc_service.h".
21206 * proc-service.c: Likewise.
21207 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21208 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21209 * Makefile.in (gdb_proc_service_h): Updated.
21210 * configure, config.in: Regenerated.
21211
21212 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21213
21214 * remote-utils.c (prepare_resume_reply): Move declaration
21215 of gdb_id_from_wait to the top of the block.
21216
21217 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21218
21219 * linux-low.c (regsets_store_inferior_registers): Read the regset
21220 from the target before filling it.
21221
21222 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21223
21224 * server.c (attach_inferior): Return SIGTRAP for a successful
21225 attach.
21226
21227 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21228
21229 * Makefile.in (OBS): Add version.o.
21230 (STAGESTUFF): Delete.
21231 (version.o): Add dependencies.
21232 (version.c): Replace rule.
21233 (clean): Remove version.c.
21234 * server.c (gdbserver_version): New.
21235 (gdbserver_usage): Use printf.
21236 (main): Handle --version and --help.
21237 * server.h (version, host_name): Add declarations.
21238
21239 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21240
21241 * linux-arm-low.c:
21242 * linux-arm-low.c:
21243 * inferiors.c:
21244 * i387-fp.h:
21245 * i387-fp.c:
21246 * gdbreplay.c:
21247 * regcache.c:
21248 * proc-service.c:
21249 * mem-break.h:
21250 * mem-break.c:
21251 * linux-x86-64-low.c:
21252 * linux-sh-low.c:
21253 * linux-s390-low.c:
21254 * linux-ppc64-low.c:
21255 * linux-ppc-low.c:
21256 * linux-mips-low.c:
21257 * linux-m68k-low.c:
21258 * linux-m32r-low.c:
21259 * linux-low.h:
21260 * linux-low.c:
21261 * linux-ia64-low.c:
21262 * linux-i386-low.c:
21263 * linux-crisv32-low.c:
21264 * thread-db.c:
21265 * terminal.h:
21266 * target.h:
21267 * target.c:
21268 * server.h:
21269 * server.c:
21270 * remote-utils.c:
21271 * regcache.h:
21272 * utils.c:
21273 * Makefile.in:
21274 * configure.ac:
21275 * gdbserver.1: Add (C) after Copyright. Update the FSF
21276 address.
21277
21278 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21279
21280 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21281 (arm_breakpoint_at): Recognize both breakpoints.
21282 (the_low_target): Use the correct breakpoint instruction.
21283
21284 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21285
21286 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21287 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21288 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21289 (the_low_target): Update.
21290
21291 2005-10-25 Andreas Schwab <schwab@suse.de>
21292
21293 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21294
21295 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21296 (ia64_num_regs): Reduce to 462.
21297
21298 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21299
21300 * acinclude.m4: Correct quoting.
21301 * aclocal.m4: Regenerated.
21302
21303 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21304 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21305 (thread_db_init): Call thread_db_err_str.
21306 * configure.ac: Check for TD_VERSION.
21307 * config.in, configure: Regenerated.
21308
21309 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21310
21311 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21312
21313 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21314
21315 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21316 is not available. Define HAVE_PTRACE_GETREGS if it is.
21317 * config.in, configure: Regenerated.
21318 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21319 * linux-i386-low.c, linux-m68k-low.c: Update to use
21320 HAVE_PTRACE_GETREGS.
21321 * linux-low.c (regsets_fetch_inferior_registers)
21322 (regsets_store_inferior_registers): Only return 0 if we processed
21323 GENERAL_REGS.
21324 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21325 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21326
21327 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21328
21329 * inferiors.c (struct thread_info): Add gdb_id.
21330 (add_thread): Add gdb_id argument.
21331 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21332 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21333 calls to add_thread.
21334 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21335 * server.c (handle_query): Use thread_to_gdb_id.
21336 (handle_v_cont, main): Use gdb_id_to_thread_id.
21337 * server.h (add_thread): Update prototype.
21338 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21339 prototypes.
21340
21341 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21342
21343 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21344 left-padded registers.
21345 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21346 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21347
21348 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21349
21350 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21351 * configure: Regenerate.
21352 * config.in: Regenerate.
21353 * server.h (NEED_DECLARATION_STRERROR):
21354 Replace with !HAVE_DECL_STRERROR.
21355
21356 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21357
21358 * linux-low.c (linux_wait, linux_send_signal): Don't test
21359 an unsigned long variable for > 0 if it could be MAX_ULONG.
21360 * server.c (myresume): Likewise.
21361 * target.c (set_desired_inferior): Likewise.
21362
21363 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21364
21365 * configure.ac: Simplify and improve check for socklen_t.
21366 * configure, config.in: Regenerate.
21367
21368 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21369
21370 * acconfig.h: Remove.
21371 * configure.ac: Add a test for socklen_t. Use three-argument
21372 AC_DEFINE throughout.
21373 * config.in: Regenerated using autoheader 2.59.
21374 * configure: Regenerated.
21375
21376 * gdbreplay.c (socklen_t): Provide a default.
21377 (remote_open): Use socklen_t.
21378 * remote-utils.c (socklen_t): Provide a default.
21379 (remote_open): Use socklen_t.
21380 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21381 unsigned char.
21382
21383 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21384 char for buffers.
21385 * linux-low.c (linux_read_memory, linux_write_memory)
21386 (linux_read_auxv): Likewise.
21387 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21388 (check_mem_write): Likewise.
21389 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21390 Likewise.
21391 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21392 (registers_from_string, register_data): Likewise.
21393 * server.c (handle_query, main): Likewise.
21394 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21395 (decode_M_packet): Likewise.
21396 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21397 * target.h (struct target_ops): Update read_memory, write_memory,
21398 and read_auxv.
21399 (read_inferior_memory, write_inferior_memory): Update.
21400 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21401 to unsigned char *.
21402 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21403 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21404 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21405 linux-s390-low.c, linux-sh-low.c: Update for changes in
21406 read_inferior_memory and the_low_target->breakpoint.
21407
21408 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21409
21410 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21411 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21412 * configure.srv: Add powerpc64-*-linux*.
21413 * linux-ppc64-low.c: New file.
21414
21415 2005-05-23 Orjan Friberg <orjanf@axis.com>
21416
21417 * linux-cris-low.c: New file with support for CRIS.
21418 * linux-crisv32-low.c: Ditto for CRISv32.
21419 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21420 (clean): Add reg-cris.c and reg-crisv32.c.
21421 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21422 reg-crisv32.o, and reg-crisv32.c to make rules.
21423 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21424 recognized targets.
21425
21426 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21427
21428 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21429 of sizeof (PTRACE_XFER_TYPE).
21430 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21431
21432 2005-05-12 Orjan Friberg <orjanf@axis.com>
21433
21434 * target.h (struct target_ops): Add insert_watchpoint,
21435 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21436 pointers for hardware watchpoint support.
21437 * linux-low.h (struct linux_target_ops): Ditto.
21438 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21439 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21440 to linux_target_ops.
21441 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21442 reply packet.
21443 * server.c (main): Recognize 'Z' and 'z' packets.
21444
21445 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21446
21447 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21448 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21449 (the_low_target): Add new members.
21450
21451 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21452
21453 * proc-service.c (ps_lgetregs): Search all_processes instead of
21454 all_threads.
21455
21456 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21457
21458 * server.c (start_inferior): Change return type to int.
21459 (attach_inferior): Change sigptr to int *.
21460 (handle_v_cont, handle_v_requests): Change signal to int *.
21461 (main): Change signal to int.
21462
21463 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21464
21465 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21466 * configure.srv: Add m32r*-*-linux*.
21467 * linux-m32r-low.c: New file.
21468
21469 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21470
21471 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21472
21473 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21474
21475 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21476 Take unsigned long arguments for PIDs.
21477 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21478 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21479 (wait_for_sigstop, linux_resume_one_process)
21480 (regsets_fetch_inferior_registers, linux_send_signal)
21481 (linux_read_auxv): Likewise. Update the types of variables holding
21482 PIDs. Update format string specifiers.
21483 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21484 * remote-utils.c (prepare_resume_reply): Likewise.
21485 * server.c (cont_thread, general_thread, step_thread)
21486 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21487 unsigned long.
21488 (handle_query): Update format specifiers.
21489 (handle_v_cont, main): Use strtoul for thread IDs.
21490 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21491 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21492 (general_thread, step_thread, thread_from_wait)
21493 (old_thread_from_wait): Update.
21494 * target.h (struct thread_resume): Use unsigned long for THREAD.
21495 (struct target_ops): Use unsigned long for arguments to attach and
21496 thread_alive.
21497
21498 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21499
21500 * acinclude.m4: Include bfd/bfd.m4 directly.
21501 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21502 <agriffis@toolchain.org>.
21503 * aclocal.m4, configure: Regenerated.
21504
21505 2005-01-07 Andrew Cagney <cagney@gnu.org>
21506
21507 * configure.ac: Rename configure.in, require autoconf 2.59.
21508 * configure: Re-generate.
21509
21510 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21511
21512 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21513 LIBS when finished.
21514 * aclocal.m4: Regenerated.
21515 * configure: Regenerated.
21516
21517 2004-11-21 Andreas Schwab <schwab@suse.de>
21518
21519 * linux-m68k-low.c (m68k_num_gregs): Define.
21520 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21521 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21522 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21523 (m68k_breakpoint_at): New. Add to the_low_target.
21524
21525 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21526 srv_linux_thread_db to yes.
21527
21528 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21529
21530 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21531 (ARCH_SET_FS): Likewise.
21532 (ARCH_GET_FS): Likewise.
21533 (ARCH_GET_GS): Likewise.
21534
21535 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21536
21537 * linux-i386-low.c (ps_get_thread_area): New.
21538 * linux-x86-64-low.c (ps_get_thread_area): New.
21539 * linux-low.c: Include <sys/syscall.h>.
21540 (linux_kill_one_process): Don't kill the first thread here.
21541 (linux_kill): Kill the first thread here.
21542 (kill_lwp): New function.
21543 (send_sigstop, linux_send_signal): Use it.
21544 * proc-service.c: Clean up #ifdefs.
21545 (fpregset_info): Delete.
21546 (ps_lgetregs): Update and enable implementation.
21547 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21548 implementations.
21549 * remote-utils.c (struct sym_cache, symbol_cache): New.
21550 (input_interrupt): Print a clearer message.
21551 (async_io_enabled): New variable.
21552 (enable_async_io, disable_async_io): Use it. Update comments.
21553 (look_up_one_symbol): Use the symbol cache.
21554 * thread-db.c (thread_db_look_up_symbols): New function.
21555 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21556
21557 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21558
21559 * configure.in: Test for -rdynamic.
21560 * configure: Regenerated.
21561 * Makefile (INTERNAL_LDFLAGS): New.
21562 (gdbserver, gdbreplay): Use it.
21563
21564 2004-09-02 Andrew Cagney <cagney@gnu.org>
21565
21566 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21567
21568 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21569
21570 * linux-low.c (linux_wait): Clear all_processes list also.
21571
21572 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21573
21574 * linux-low.c: Include <errno.h>. Remove extern declaration of
21575 errno.
21576
21577 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21578
21579 * gdbreplay.c, server.h, utils.c: Update copyright years.
21580
21581 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21582
21583 * server.c (main): Print child status or termination signal from
21584 variable 'signal', not 'sig'.
21585
21586 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21587
21588 * linux-low.c (linux_read_memory): Change return type to
21589 int. Check for and return error from ptrace().
21590 * target.c (read_inferior_memory): Change return type to int. Pass
21591 back return status from the_target->read_memory().
21592 * target.h (struct target_ops): Adapt *read_memory() prototype.
21593 Update comment.
21594 (read_inferior_memory): Adapt prototype.
21595 * server.c (main): Return an error packet if
21596 read_inferior_memory() returns an error.
21597
21598 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21599
21600 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21601 Unify with other clean targets.
21602
21603 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21604
21605 * server.c (handle_v_cont): Call set_desired_inferior.
21606
21607 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21608
21609 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21610
21611 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21612
21613 * linux-low.c (linux_wait): Unblock async I/O.
21614 (linux_resume): Block and enable async I/O.
21615 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21616 * server.h (block_async_io, unblock_async_io): Add prototypes.
21617
21618 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21619
21620 * remote-utils.c (remote_open): Print a status notice after
21621 opening a TCP port.
21622 * server.c (attach_inferior): Print a status notice after
21623 attaching.
21624
21625 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21626
21627 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21628
21629 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21630
21631 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21632 error packet.
21633 * server.c, target.h: Update copyright years.
21634
21635 2004-02-25 Roland McGrath <roland@redhat.com>
21636
21637 * target.h (struct target_ops): New member `read_auxv'.
21638 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21639 * linux-low.c (linux_read_auxv): New function.
21640 (linux_target_ops): Initialize `read_auxv' member to that.
21641
21642 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21643
21644 Committed by Jim Blandy <jimb@redhat.com>.
21645
21646 * linux-s390-low.c (s390_num_regs): Update.
21647 (s390_regmap): Remove control registers. Use __s390x__ predefine
21648 instead of GPR_SIZE to distiguish s390 and s390x targets.
21649
21650 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21651
21652 * linux-low.c: Update copyright year.
21653 (check_removed_breakpoint): Clear pending_is_breakpoint.
21654 (linux_set_resume_request, linux_queue_one_thread)
21655 (resume_status_pending_p): New functions.
21656 (linux_continue_one_thread): Use process->resume.
21657 (linux_resume): Only resume threads if there are no pending events.
21658 * linux-low.h (struct process_info): Add resume request
21659 pointer.
21660
21661 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21662
21663 * regcache.c (new_register_cache): Clear the allocated register
21664 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21665
21666 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21667
21668 * linux-low.c (linux_resume): Take a struct thread_resume *
21669 argument.
21670 (linux_wait): Update call.
21671 (resume_ptr): New static variable.
21672 (linux_continue_one_thread): Renamed from
21673 linux_continue_one_process. Use resume_ptr.
21674 (linux_resume): Use linux_continue_one_thread.
21675 * server.c (handle_v_cont, handle_v_requests): New functions.
21676 (myresume): New function.
21677 (main): Handle 'v' case.
21678 * target.h (struct thread_resume): New type.
21679 (struct target_ops): Change argument of "resume" to struct
21680 thread_resume *.
21681 (myresume): Delete macro.
21682
21683 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21684
21685 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21686 (uninstall): Support DESTDIR.
21687
21688 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21689
21690 * configure.srv: Add xscale*linux copy of arm*linux entry.
21691
21692 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21693
21694 * linux-arm-low.c (arm_reinsert_addr): New function.
21695 (the_low_target): Add arm_reinsert_addr.
21696
21697 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21698
21699 * mem-break.c: Remove whitespace at end of file.
21700
21701 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21702
21703 * configure.in: Check whether we need to prototype strerror.
21704 * server.h: Optionally prototype strerror.
21705 * gdbreplay.c (perror_with_name): Use strerror.
21706 * linux-low.c (linux_attach_lwp): Use strerror.
21707 * utils.c (perror_with_name): Use strerror.
21708 * config.in, configure: Regenerated.
21709
21710 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21711
21712 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21713 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21714
21715 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21716
21717 * Makefile.in (SFILES): Update.
21718 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21719 low-sun3.c: Remove files.
21720
21721 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21722
21723 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21724 (linux_detach_one_process, linux_detach): New functions.
21725 (linux_target_ops): Add linux_detach.
21726 * server.c (main): Handle 'D' packet.
21727 * target.h (struct target_ops): Add "detach" member.
21728 (detach_inferior): Define.
21729
21730 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21731
21732 From Kelley Cook <kelleycook@wideopenwest.com>:
21733 * configure.srv: Accept i[34567]86 variants.
21734
21735 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21736
21737 * linux-low.c (linux_wait_for_event): Correct comment typos.
21738 (linux_resume_one_process): Call check_removed_breakpoint.
21739 (linux_send_signal): New function.
21740 (linux_target_ops): Add linux_send_signal.
21741 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21742 of kill.
21743 * target.h (struct target_ops): Add send_signal.
21744
21745 2003-05-29 Jim Blandy <jimb@redhat.com>
21746
21747 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21748 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21749 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21750 away part of the register's value.
21751
21752 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21753
21754 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21755 (linux_wait_for_event, linux_init_signals): Likewise.
21756
21757 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21758
21759 * configure.in: Check for stdlib.h.
21760 * configure: Regenerated.
21761 * config.in: Regenerated.
21762
21763 2003-01-04 Andreas Schwab <schwab@suse.de>
21764
21765 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21766
21767 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21768
21769 * Makefile.in: Remove obsolete code.
21770
21771 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21772
21773 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21774 defined(PT_FPR0_HI).
21775
21776 2002-11-17 Stuart Hughes <seh@zee2.com>
21777
21778 * linux-arm-low.c (arm_num_regs): Increase.
21779 (arm_regmap): Include status register.
21780
21781 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21782
21783 * linux-low.c (register_addr): Remove incorrect -1 check.
21784
21785 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21786
21787 * linux-low.c (linux_create_inferior): Call setpgid. Return
21788 the new PID.
21789 (unstopped_p, linux_signal_pid): Remove.
21790 (linux_target_ops): Remove linux_signal_pid.
21791 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21792 global instead of target method.
21793 * target.h (struct target_ops): Remove signal_pid. Update comment
21794 for create_inferior.
21795 * server.c (signal_pid): New variable.
21796 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21797 gdbserver. Set the child to be the foreground process group.
21798 (attach_inferior): Set signal_pid.
21799
21800 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21801
21802 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21803
21804 2002-08-20 Jim Blandy <jimb@redhat.com>
21805
21806 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21807 default for this.
21808
21809 2002-08-01 Andrew Cagney <cagney@redhat.com>
21810
21811 * Makefile.in: Make chill references obsolete.
21812
21813 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21814
21815 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21816 * configure: Regenerate.
21817 * config.in: Regenerate.
21818
21819 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21820
21821 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21822 (perror_with_name, remote_close, remote_open, expect, play): Static.
21823
21824 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21825
21826 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21827 byte offsets instead of an array of indexes.
21828 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21829
21830 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21831
21832 * regcache.c: Add comment.
21833
21834 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21835
21836 * thread-db.c: New file.
21837 * proc-service.c: New file.
21838 * acinclude.m4: New file.
21839 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21840 proc-service.o, and thread-db.o.
21841 (linux-low.o): Add USE_THREAD_DB.
21842 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21843 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21844 * aclocal.m4: Regenerated.
21845 * config.in: Regenerated.
21846 * configure: Regenerated.
21847 * configure.in: Check for proc_service.h, sys/procfs.h,
21848 thread_db.h, and linux/elf.h headrs.
21849 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21850 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21851 Check for -lthread_db and thread support.
21852 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21853 PowerPC, and SuperH.
21854 * i387-fp.c: Constify arguments.
21855 * i387-fp.h: Likewise.
21856 * inferiors.c: (struct thread_info): Renamed from
21857 `struct inferior_info'. Remove PID member. Use generic inferior
21858 list header. All uses updated.
21859 (inferiors, signal_pid): Removed.
21860 (all_threads): New variable.
21861 (get_thread): Define.
21862 (add_inferior_to_list): New function.
21863 (for_each_inferior): New function.
21864 (change_inferior_id): New function.
21865 (add_inferior): Removed.
21866 (remove_inferior): New function.
21867 (add_thread): New function.
21868 (free_one_thread): New function.
21869 (remove_thread): New function.
21870 (clear_inferiors): Use for_each_inferior and free_one_thread.
21871 (find_inferior): New function.
21872 (find_inferior_id): New function.
21873 (inferior_target_data): Update argument type.
21874 (set_inferior_target_data): Likewise.
21875 (inferior_regcache_data): Likewise.
21876 (set_inferior_regcache_data): Likewise.
21877 * linux-low.c (linux_bp_reinsert): Remove.
21878 (all_processes, stopping_threads, using_thrads)
21879 (struct pending_signals, debug_threads, pid_of): New.
21880 (inferior_pid): Replace with macro.
21881 (struct inferior_linux_data): Remove.
21882 (get_stop_pc, add_process): New functions.
21883 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21884 Use add_process and add_thread.
21885 (linux_attach_lwp): New function, based on old linux_attach. Use
21886 add_process and add_thread. Set stop_expected for new threads.
21887 (linux_attach): New function.
21888 (linux_kill_one_process): New function.
21889 (linux_kill): Kill all LWPs.
21890 (linux_thread_alive): Use find_inferior_id.
21891 (check_removed_breakpoints, status_pending_p): New functions.
21892 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21893 Update. Use WNOHANG. Wait for cloned processes also. Update process
21894 struct for the found process.
21895 (linux_wait_for_event): New function.
21896 (linux_wait): Use it. Support LWPs.
21897 (send_sigstop, wait_for_sigstop, stop_all_processes)
21898 (linux_resume_one_process, linux_continue_one_process): New functions.
21899 (linux_resume): Support LWPs.
21900 (REGISTER_RAW_SIZE): Remove.
21901 (fetch_register): Use register_size instead. Call supply_register.
21902 (usr_store_inferior_registers): Likewise. Call collect_register.
21903 Fix recursive case.
21904 (regsets_fetch_inferior_registers): Improve error message.
21905 (regsets_store_inferior_registers): Add debugging.
21906 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21907 (unstopped_p, linux_signal_pid): New functions.
21908 (linux_target_ops): Add linux_signal_pid.
21909 (linux_init_signals): New function.
21910 (initialize_low): Call it. Initialize using_threads.
21911 * regcache.c (inferior_regcache_data): Add valid
21912 flag.
21913 (get_regcache): Fetch registers lazily. Add fetch argument
21914 and update all callers.
21915 (regcache_invalidate_one, regcache_invalidate): New
21916 functions.
21917 (new_register_cache): Renamed from create_register_cache.
21918 Return the new regcache.
21919 (free_register_cache): Change argument to a void *.
21920 (registers_to_string, registers_from_string): Call get_regcache
21921 with fetch flag set.
21922 (register_data): Make static. Pass fetch flag to get_regcache.
21923 (supply_register): Call get_regcache with fetch flag clear.
21924 (collect_register): Call get_regcache with fetch flag set.
21925 (collect_register_as_string): New function.
21926 * regcache.h: Update.
21927 * remote-utils.c (putpkt): Flush after debug output and use
21928 stderr.
21929 Handle input interrupts while waiting for an ACK.
21930 (input_interrupt): Use signal_pid method.
21931 (getpkt): Flush after debug output and use stderr.
21932 (outreg): Use collect_register_as_string.
21933 (new_thread_notify, dead_thread_notify): New functions.
21934 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21935 and general_thread.
21936 (look_up_one_symbol): Flush after debug output.
21937 * server.c (step_thread, server_waiting): New variables.
21938 (start_inferior): Don't use signal_pid. Update call to mywait.
21939 (attach_inferior): Update call to mywait.
21940 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21941 (main): Don't fetch/store registers explicitly. Use
21942 set_desired_inferior. Support proposed ``Hs'' packet. Update
21943 calls to mywait.
21944 * server.h: Update.
21945 (struct inferior_list, struct_inferior_list_entry): New.
21946 * target.c (set_desired_inferior): New.
21947 (write_inferior_memory): Constify.
21948 (mywait): New function.
21949 * target.h: Update.
21950 (struct target_ops): New signal_pid method.
21951 (mywait): Removed macro, added prototype.
21952
21953 * linux-low.h (regset_func): Removed.
21954 (regset_fill_func, regset_store_func): New.
21955 (enum regset_type): New.
21956 (struct regset_info): Add type field. Use new operation types.
21957 (struct linux_target_ops): stop_pc renamed to get_pc.
21958 Add decr_pc_after_break and breakpoint_at.
21959 (get_process, get_thread_proess, get_process_thread)
21960 (strut process_info, all_processes, linux_attach_lwp)
21961 (thread_db_init): New.
21962
21963 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21964 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21965 (the_low_target): Add new members.
21966 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21967 (i386_store_fpxregset): Constify.
21968 (target_regsets): Add new kind identifier.
21969 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21970 (i386_set_pc): Add debugging.
21971 (i386_breakpoint_at): New function.
21972 (the_low_target): Add new members.
21973 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21974 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21975 (mips_breakpoint_at): New.
21976 (the_low_target): Add new members.
21977 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21978 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21979 (the_low_target): Add new members.
21980 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21981 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21982 (the_low_target): Add new members.
21983 * linux-x86-64-low.c (target_regsets): Add new kind
21984 identifier.
21985
21986 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21987
21988 From Martin Pool <mbp@samba.org>:
21989 * server.c (gdbserver_usage): New function.
21990 (main): Call it.
21991
21992 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21993
21994 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21995 stop_at -> stop_pc.
21996
21997 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21998
21999 * Makefile.in: Remove obsolete code.
22000
22001 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22002
22003 * linux-low.c (regsets_fetch_inferior_registers),
22004 (regsets_store_inferior_registers): Removed cast to int from
22005 ptrace() calls.
22006 * regcache.h: Added declaration of struct inferior_info.
22007
22008 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22009
22010 * inferiors.c (struct inferior_info): Add regcache_data.
22011 (add_inferior): Call create_register_cache.
22012 (clear_inferiors): Call free_register_cache.
22013 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22014 * regcache.c (struct inferior_regcache_data): New.
22015 (registers): Remove.
22016 (get_regcache): New function.
22017 (create_register_cache, free_register_cache): New functions.
22018 (set_register_cache): Don't initialize the register cache here.
22019 (registers_to_string, registers_from_string, register_data): Call
22020 get_regcache.
22021 * regcache.h: Add prototypes.
22022 * server.h: Likewise.
22023
22024 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22025
22026 * mem-break.c: New file.
22027 * mem-break.h: New file.
22028 * Makefile.in: Add mem-break.o rule; update server.h
22029 dependencies.
22030 * inferiors.c (struct inferior_info): Add target_data
22031 member.
22032 (clear_inferiors): Free target_data member if set.
22033 (inferior_target_data, set_inferior_target_data): New functions.
22034 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22035 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22036 * linux-low.c (linux_bp_reinsert): New variable.
22037 (struct inferior_linux_data): New.
22038 (linux_create_inferior): Use set_inferior_target_data.
22039 (linux_attach): Likewise. Call add_inferior.
22040 (linux_wait_for_one_inferior): New function.
22041 (linux_wait): Call it.
22042 (linux_write_memory): Add const.
22043 (initialize_low): Call set_breakpoint_data.
22044 * linux-low.h (struct linux_target_ops): Add breakpoint
22045 handling members.
22046 * server.c (attach_inferior): Remove extra add_inferior
22047 call.
22048 * server.h: Include mem-break.h. Update inferior.c
22049 prototypes.
22050 * target.c (read_inferior_memory)
22051 (write_inferior_memory): New functions.
22052 * target.h (read_inferior_memory)
22053 (write_inferior_memory): Change macros to prototypes.
22054 (struct target_ops): Update comments. Add const to write_memory
22055 definition.
22056
22057 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22058
22059 * linux-low.c (usr_store_inferior_registers): Support
22060 registers which are allowed to fail to store.
22061 * linux-low.h (linux_target_ops): Likewise.
22062 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22063 (ppc_cannot_store_register): FPSCR may not be storable.
22064
22065 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22066
22067 * server.h: Include <string.h> if HAVE_STRING_H.
22068 * ChangeLog: Correct paths in last ChangeLog entry.
22069
22070 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22071
22072 * linux-low.h: Remove obsolete prototypes.
22073 (struct linux_target_ops): New.
22074 (extern the_low_target): New.
22075 * linux-low.c (num_regs, regmap): Remove declarations.
22076 (register_addr): Use the_low_target explicitly.
22077 (fetch_register): Likewise.
22078 (usr_fetch_inferior_registers): Likewise.
22079 (usr_store_inferior_registers): Likewise.
22080 * linux-arm-low.c (num_regs): Remove.
22081 (arm_num_regs): Define.
22082 (arm_regmap): Renamed from regmap, made static.
22083 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22084 made static.
22085 (arm_cannot_store_register): Renamed from cannot_store_register,
22086 made static.
22087 (the_low_target): New.
22088 * linux-i386-low.c (num_regs): Remove.
22089 (i386_num_regs): Define.
22090 (i386_regmap): Renamed from regmap, made static.
22091 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22092 made static.
22093 (i386_cannot_store_register): Renamed from cannot_store_register,
22094 made static.
22095 (the_low_target): New.
22096 * linux-ia64-low.c (num_regs): Remove.
22097 (ia64_num_regs): Define.
22098 (ia64_regmap): Renamed from regmap, made static.
22099 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22100 made static.
22101 (ia64_cannot_store_register): Renamed from cannot_store_register,
22102 made static.
22103 (the_low_target): New.
22104 * linux-m68k-low.c (num_regs): Remove.
22105 (m68k_num_regs): Define.
22106 (m68k_regmap): Renamed from regmap, made static.
22107 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22108 made static.
22109 (m68k_cannot_store_register): Renamed from cannot_store_register,
22110 made static.
22111 (the_low_target): New.
22112 * linux-mips-low.c (num_regs): Remove.
22113 (mips_num_regs): Define.
22114 (mips_regmap): Renamed from regmap, made static.
22115 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22116 made static.
22117 (mips_cannot_store_register): Renamed from cannot_store_register,
22118 made static.
22119 (the_low_target): New.
22120 * linux-ppc-low.c (num_regs): Remove.
22121 (ppc_num_regs): Define.
22122 (ppc_regmap): Renamed from regmap, made static.
22123 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22124 made static.
22125 (ppc_cannot_store_register): Renamed from cannot_store_register,
22126 made static.
22127 (the_low_target): New.
22128 * linux-s390-low.c (num_regs): Remove.
22129 (s390_num_regs): Define.
22130 (s390_regmap): Renamed from regmap, made static.
22131 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22132 made static.
22133 (s390_cannot_store_register): Renamed from cannot_store_register,
22134 made static.
22135 (the_low_target): New.
22136 * linux-sh-low.c (num_regs): Remove.
22137 (sh_num_regs): Define.
22138 (sh_regmap): Renamed from regmap, made static.
22139 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22140 made static.
22141 (sh_cannot_store_register): Renamed from cannot_store_register,
22142 made static.
22143 (the_low_target): New.
22144 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22145 (the_low_target): New.
22146
22147 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22148
22149 * Makefile.in: Add stamp-h target.
22150 * configure.in: Create stamp-h.
22151 * configure: Regenerated.
22152
22153 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22154
22155 * inferiors.c: New file.
22156 * target.c: New file.
22157 * target.h: New file.
22158 * Makefile.in: Add target.o and inferiors.o. Update
22159 dependencies.
22160 * linux-low.c (inferior_pid): New static variable,
22161 moved from server.c.
22162 (linux_create_inferior): Renamed from create_inferior.
22163 Call add_inferior. Return 0 on success instead of a PID.
22164 (linux_attach): Renamed from myattach.
22165 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22166 (linux_thread_alive): Renamed from mythread_alive.
22167 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22168 child dies.
22169 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22170 (regsets_store_inferior_registers): Correct error message.
22171 Add missing ``return 0''.
22172 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22173 (linux_store_registers): Renamed from store_inferior_registers.
22174 (linux_read_memory): Renamed from read_inferior_memory.
22175 (linux_write_memory): Renamed from write_inferior_memory.
22176 (linux_target_ops): New structure.
22177 (initialize_low): Call set_target_ops ().
22178 * remote-utils.c (unhexify): New function.
22179 (hexify): New function.
22180 (input_interrupt): Send signals to ``signal_pid''.
22181 * server.c (inferior_pid): Remove.
22182 (start_inferior): Update create_inferior call.
22183 (attach_inferior): Call add_inferior.
22184 (handle_query): New function.
22185 (main): Call handle_query for `q' packets.
22186 * server.h: Include "target.h". Remove obsolete prototypes.
22187 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22188
22189 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22190
22191 * Makefile.in: Add WARN_CFLAGS. Update configury
22192 dependencies.
22193 * configure.in: Check for <string.h>
22194 * configure: Regenerate.
22195 * config.in: Regenerate.
22196 * gdbreplay.c: Include needed system headers.
22197 (remote_open): Remove strchr prototype.
22198 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22199 * regcache.c (supply_register): Change buf argument to const void *.
22200 (supply_register_by_name): Likewise.
22201 (collect_register): Change buf argument to void *.
22202 (collect_register_by_name): Likewise.
22203 * regcache.h: Add missing prototypes.
22204 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22205 * server.c (handle_query): New function.
22206 (attached): New static variable, moved out of main.
22207 (main): Quiet longjmp clobber warnings.
22208 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22209 * utils.c (error): Remove NORETURN.
22210 (fatal): Likewise.
This page took 0.45592 seconds and 3 git commands to generate.