Use construct_inferior_arguments which handles special chars
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
2
3 PR gdbserver/25893
4 * linux-low.cc (linux_process_target::create_inferior),
5 lynx-low.cc (lynx_process_target::create_inferior),
6 win32-low.cc (win32_process_target::create_inferior): Use
7 construct_inferior_arguments instead of stringify_argv
8 to get string representation which properly escapes
9 special characters.
10 * server.cc (handle_v_run): Just pass empty program arg
11 as such, since any further processing is now handled via
12 construct_inferior_arguments.
13
14 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
15
16 * nto-low.cc (nto_process_target::create_inferior): Pass
17 argv to spawnp function as char **.
18
19 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
20
21 * server.cc (captured_main), (handle_v_run): No longer
22 insert extra NULL element to args vector.
23
24 2020-05-23 Pedro Alves <palves@redhat.com>
25
26 * gdb-safe-ctype.h: New.
27
28 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
29
30 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
31 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
32 (ia64_target::low_breakpoint_at): Ditto.
33
34 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
35
36 * win32-i386-low.cc (i386_supports_z_point_type): Handle
37 Z_PACKET_HW_BP z_type.
38 (i386_insert_point): Handle raw_bkpt_type type.
39 (i386_remove_point): Likewise.
40
41 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
42
43 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
44 Add arch/i386.o.
45 * win32-arm-low.cc (arm_num_regs): New function.
46 (struct win32_target_ops): Use arm_num_regs.
47 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
48 processes.
49 (i386_get_thread_context): Likewise.
50 (i386_prepare_to_resume): Likewise.
51 (i386_thread_added): Likewise.
52 (i386_single_step): Likewise.
53 (i386_fetch_inferior_register): Likewise.
54 (i386_store_inferior_register): Likewise.
55 (i386_arch_setup): Likewise.
56 (i386_win32_num_regs): New function.
57 (struct win32_target_ops): Use i386_win32_num_regs.
58 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
59 processes.
60 (win32_require_context): Likewise.
61 (child_add_thread): Likewise.
62 (do_initial_child_stuff): Likewise.
63 (continue_one_thread): Likewise.
64 (win32_process_target::resume): Likewise.
65 (load_psapi): Likewise.
66 (win32_add_all_dlls): Likewise.
67 (maybe_adjust_pc): Likewise.
68 (win32_process_target::qxfer_siginfo): Likewise.
69 (initialize_low): Likewise.
70 * win32-low.h (struct win32_target_ops): Change num_regs to
71 callback function.
72
73 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
74
75 * configure.ac: Remove check for fs_base/gs_base in
76 user_regs_struct.
77 * configure: Re-generate.
78 * config.in: Re-generate.
79 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
80 x86_store_gregset): Adjust.
81
82 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
83
84 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
85 comparison.
86
87 2020-04-16 Tom Tromey <tromey@adacore.com>
88
89 * win32-low.cc (windows_nat::handle_access_violation): New
90 function.
91
92 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
93
94 * win32-low.cc (get_child_debug_event): Fix format string warning.
95
96 2020-04-13 Tom Tromey <tom@tromey.com>
97
98 * server.h (gdb_fildes_t): Remove typedef.
99 * remote-utils.c (remote_desc, list_desc): Now int.
100 (INVALID_DESCRIPTOR): Remove.
101 (gdb_connected, remote_close)
102 (check_remote_input_interrupt_request): Update.
103 * utils.h (pfildes): Don't declare.
104 * utils.c (pfildes): Remove.
105
106 2020-04-13 Tom Tromey <tom@tromey.com>
107
108 * server.h (handle_serial_event, handle_target_event): Update.
109 * server.c: Don't call initialize_event_loop.
110 (keep_processing_events): New global.
111 (handle_serial_event): Return void. Set keep_processing_events.
112 (handle_target_event): Return void.
113 (start_event_loop): Move from event-loop.c. Rewrite.
114 * remote-utils.c (handle_accept_event): Return void.
115 (reset_readchar): Use delete_timer.
116 (process_remaining): Return void.
117 (reschedule): Use create_timer.
118 * event-loop.h: Remove.
119 * event-loop.cc: Remove.
120 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
121
122 2020-04-13 Tom Tromey <tom@tromey.com>
123
124 * server.c (invoke_async_signal_handlers)
125 (check_async_event_handlers, flush_streams, gdb_select): New
126 functions.
127
128 2020-04-13 Tom Tromey <tom@tromey.com>
129
130 * configure: Rebuild.
131 * config.in: Rebuild.
132
133 2020-04-08 Tom Tromey <tromey@adacore.com>
134
135 PR gdb/22992
136 * win32-low.c (child_continue): Call matching_pending_stop.
137 (get_child_debug_event): Call fetch_pending_stop. Push pending
138 stop when needed.
139
140 2020-04-08 Tom Tromey <tromey@adacore.com>
141
142 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
143 (win32_process_target::supports_stopped_by_sw_breakpoint):
144 Declare.
145 * win32-low.c (win32_supports_z_point_type): Always handle
146 Z_PACKET_SW_BP.
147 (win32_insert_point): Call insert_memory_breakpoint when needed.
148 (win32_remove_point): Call remove_memory_breakpoint when needed.
149 (win32_process_target::stopped_by_sw_breakpoint)
150 (win32_process_target::supports_stopped_by_sw_breakpoint): New
151 methods.
152 (win32_target_ops): Update.
153 (maybe_adjust_pc): New function.
154 (win32_wait): Call maybe_adjust_pc.
155
156 2020-04-08 Tom Tromey <tromey@adacore.com>
157
158 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
159 field.
160 * win32-i386-low.c (the_low_target): Update.
161 * win32-arm-low.c (the_low_target): Update.
162
163 2020-04-08 Tom Tromey <tromey@adacore.com>
164
165 * win32-low.h (win32_process_target::read_pc)
166 (win32_process_target::write_pc): Declare.
167 * win32-low.c (win32_process_target::read_pc)
168 (win32_process_target::write_pc): New methods.
169 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
170 functions.
171 (the_low_target): Update.
172 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
173 functions.
174 (the_low_target): Update.
175
176 2020-04-08 Tom Tromey <tromey@adacore.com>
177
178 * win32-low.c (win32_kill, get_child_debug_event): Use
179 wait_for_debug_event.
180
181 2020-04-08 Tom Tromey <tromey@adacore.com>
182
183 * win32-low.c (child_continue): Call continue_last_debug_event.
184
185 2020-04-08 Tom Tromey <tromey@adacore.com>
186
187 * win32-low.c (handle_exception): Remove.
188 (windows_nat::handle_ms_vc_exception): New function.
189 (get_child_debug_event): Add "continue_status" parameter.
190 Update.
191 (win32_wait): Update.
192
193 2020-04-08 Tom Tromey <tromey@adacore.com>
194
195 * win32-low.c (windows_nat::handle_load_dll): Rename from
196 handle_load_dll. No longer static.
197 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
198 No longer static.
199
200 2020-04-08 Tom Tromey <tromey@adacore.com>
201
202 * win32-low.c (handle_output_debug_string): Add parameter. Change
203 return type.
204 (win32_kill, get_child_debug_event): Update.
205
206 2020-04-08 Tom Tromey <tromey@adacore.com>
207
208 * win32-low.c (current_process_handle, current_process_id)
209 (main_thread_id, last_sig, current_event, siginfo_er): Move to
210 nat/windows-nat.c.
211
212 2020-04-08 Tom Tromey <tromey@adacore.com>
213
214 * win32-low.c (get_image_name): Remove.
215 (handle_load_dll): Update.
216
217 2020-04-08 Tom Tromey <tromey@adacore.com>
218
219 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
220 No longer static. Change parameters.
221 (child_add_thread, child_fetch_inferior_registers)
222 (child_store_inferior_registers, win32_resume)
223 (win32_get_tib_address): Update.
224
225 2020-04-08 Tom Tromey <tromey@adacore.com>
226
227 * win32-low.h (struct win32_target_ops): Use qualified names where
228 needed.
229 * win32-i386-low.c: Add "using namespace".
230 * win32-low.c: Add "using namespace".
231 * win32-arm-low.c: Add "using namespace".
232
233 2020-04-08 Tom Tromey <tromey@adacore.com>
234
235 * win32-low.c (delete_thread_info): Don't call CloseHandle.
236
237 2020-04-08 Tom Tromey <tromey@adacore.com>
238
239 * win32-low.c (win32_require_context, suspend_one_thread): Use
240 windows_thread_info::suspend.
241 (continue_one_thread): Use windows_thread_info::resume.
242 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
243
244 2020-04-08 Tom Tromey <tromey@adacore.com>
245
246 * win32-i386-low.c (update_debug_registers)
247 (i386_prepare_to_resume, i386_thread_added): Update.
248
249 2020-04-08 Tom Tromey <tromey@adacore.com>
250
251 * win32-low.c (child_add_thread): Use new.
252 (delete_thread_info): Use delete.
253
254 2020-04-08 Tom Tromey <tromey@adacore.com>
255
256 * win32-low.h (struct windows_thread_info): Remove.
257
258 2020-04-08 Tom Tromey <tromey@adacore.com>
259
260 * win32-low.h (struct windows_thread_info): Rename from
261 win32_thread_info. Remove typedef.
262 (struct win32_target_ops, win32_require_context): Update.
263 * win32-low.c (win32_get_thread_context)
264 (win32_set_thread_context, win32_prepare_to_resume)
265 (win32_require_context, thread_rec, child_add_thread)
266 (delete_thread_info, continue_one_thread)
267 (child_fetch_inferior_registers, child_store_inferior_registers)
268 (win32_resume, suspend_one_thread, win32_get_tib_address):
269 Update.
270 * win32-i386-low.c (update_debug_registers)
271 (win32_get_current_dr, i386_get_thread_context)
272 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
273 (i386_fetch_inferior_register, i386_store_inferior_register):
274 Update.
275 * win32-arm-low.c (arm_get_thread_context)
276 (arm_fetch_inferior_register, arm_store_inferior_register):
277 Update.
278
279 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
280
281 * linux-low.h (struct linux_target_ops): Remove.
282 (the_low_target): Remove.
283 * linux-x86-low.cc (the_low_target): Remove.
284 * linux-aarch64-low.cc (the_low_target): Ditto.
285 * linux-arm-low.cc (the_low_target): Ditto.
286 * linux-bfin-low.cc (the_low_target): Ditto.
287 * linux-cris-low.cc (the_low_target): Ditto.
288 * linux-crisv32-low.cc (the_low_target): Ditto.
289 * linux-ia64-low.cc (the_low_target): Ditto.
290 * linux-m32r-low.cc (the_low_target): Ditto.
291 * linux-m68k-low.cc (the_low_target): Ditto.
292 * linux-mips-low.cc (the_low_target): Ditto.
293 * linux-nios2-low.cc (the_low_target): Ditto.
294 * linux-ppc-low.cc (the_low_target): Ditto.
295 * linux-riscv-low.cc (the_low_target): Ditto.
296 * linux-s390-low.cc (the_low_target): Ditto.
297 * linux-sh-low.cc (the_low_target): Ditto.
298 * linux-sparc-low.cc (the_low_target): Ditto.
299 * linux-tic6x-low.cc (the_low_target): Ditto.
300 * linux-tile-low.cc (the_low_target): Ditto.
301 * linux-xtensa-low.cc (the_low_target): Ditto.
302
303 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
304
305 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
306 linux target define the op by overriding the declaration in
307 process_stratum_target.
308
309 * linux-low.h (struct linux_target_ops): Remove the op.
310 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
311 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
312 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
313 (x86_get_ipa_tdesc_idx): Turn into...
314 (x86_target::get_ipa_tdesc_idx): ...this.
315 (the_low_target): Remove the op field.
316 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
317 (ppc_get_ipa_tdesc_idx): Turn into...
318 (ppc_target::get_ipa_tdesc_idx): ...this.
319 (the_low_target): Remove the op field.
320 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
321 (s390_get_ipa_tdesc_idx): Turn into...
322 (s390_target::get_ipa_tdesc_idx): ...this.
323 (the_low_target): Remove the op field.
324
325 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
326
327 Turn the 'get_syscall_trapinfo' linux target op into a method
328 of process_stratum_target.
329
330 * linux-low.h (struct linux_target_ops): Remove the op.
331 (class linux_process_target) <get_syscall_trapinfo>
332 <gdb_catch_this_syscall>
333 <low_supports_catch_syscall>
334 <low_get_syscall_trapinfo>: Declare.
335 * linux-low.cc (get_syscall_trapinfo): Turn into...
336 (linux_process_target::get_syscall_trapinfo): ...this.
337 (linux_process_target::low_get_syscall_trapinfo): Define.
338 (gdb_catch_this_syscall_p): Turn into...
339 (linux_process_target::gdb_catch_this_syscall): ...this.
340 (linux_process_target::low_supports_catch_syscall): Define.
341
342 Update the callers below.
343
344 (linux_process_target::wait_1)
345 (linux_process_target::supports_catch_syscall)
346
347 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
348 <low_get_syscall_trapinfo>: Declare.
349 (x86_target::low_supports_catch_syscall): Define.
350 (x86_get_syscall_trapinfo): Turn into...
351 (x86_target::low_get_syscall_trapinfo): ...this.
352 (the_low_target): Remove the op field.
353 * linux-aarch64-low.cc (class aarch64_target)
354 <low_supports_catch_syscall>
355 <low_get_syscall_trapinfo>: Declare.
356 (aarch64_target::low_supports_catch_syscall): Define.
357 (aarch64_get_syscall_trapinfo): Turn into...
358 (aarch64_target::low_get_syscall_trapinfo): ...this.
359 (the_low_target): Remove the op field.
360 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
361 <low_get_syscall_trapinfo>: Declare.
362 (arm_target::low_supports_catch_syscall): Define.
363 (arm_get_syscall_trapinfo): Turn into...
364 (arm_target::low_get_syscall_trapinfo): ...this.
365 (the_low_target): Remove the op field.
366 * linux-ppc-low.cc (the_low_target): Remove the op field.
367 * linux-s390-low.cc (the_low_target): Remove the op field.
368
369 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
370
371 Remove the 'supports_hardware_single_step' linux target op and
372 override the process_stratum_target's op definition in
373 linux_process_target to return true.
374
375 * linux-low.h (struct linux_target_ops): Remove the op.
376 (class linux_process_target) <finish_step_over>
377 <maybe_hw_step>: Declare.
378 * linux-low.cc (can_hardware_single_step): Remove.
379 (maybe_hw_step): Turn into...
380 (linux_process_target::maybe_hw_step): ...this.
381 (finish_step_over): Turn into...
382 (linux_process_target::finish_step_over): ...this.
383 (linux_process_target::supports_hardware_single_step): Update
384 to return true.
385
386 Update the callers below.
387
388 (linux_process_target::single_step)
389 (linux_process_target::resume_one_lwp_throw)
390
391 * linux-arm-low.cc (class arm_target)
392 <supports_hardware_single_step>: Declare.
393 (arm_supports_hardware_single_step): Turn into...
394 (arm_target::supports_hardware_single_step): ...this.
395 (the_low_target): Remove the op field.
396 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
397 (the_low_target): Remove the op field.
398 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
399 Remove.
400 (the_low_target): Remove the op field.
401 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
402 (the_low_target): Remove the op field.
403 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
404 (the_low_target): Remove the op field.
405 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
406 (the_low_target): Remove the op field.
407 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
408 (the_low_target): Remove the op field.
409 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
410 (the_low_target): Remove the op field.
411 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
412 (the_low_target): Remove the op field.
413 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
414 (the_low_target): Remove the op field.
415 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
416 (the_low_target): Remove the op field.
417 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
418 (the_low_target): Remove the op field.
419 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
420 Remove.
421 (the_low_target): Remove the op field.
422
423 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
424
425 Turn the 'supports_range_stepping' linux target op into a method
426 of linux_process_target.
427
428 * linux-low.h (struct linux_target_ops): Remove the op.
429 (class linux_process_target) <low_supports_range_stepping>: Declare.
430 * linux-low.cc (linux_process_target::low_supports_range_stepping):
431 Define.
432 (linux_process_target::supports_range_stepping): Update the call
433 site.
434 * linux-x86-low.cc (class x86_target)
435 <low_supports_range_stepping>: Declare.
436 (x86_supports_range_stepping): Turn into...
437 (x86_target::low_supports_range_stepping): ...this.
438 (the_low_target): Remove the op field.
439 * linux-aarch64-low.cc (class aarch64_target)
440 <low_supports_range_stepping>: Declare.
441 (aarch64_supports_range_stepping): Turn into...
442 (aarch64_target::low_supports_range_stepping): ...this.
443 (the_low_target): Remove the op field.
444 * linux-arm-low.cc (the_low_target): Remove the op field.
445 * linux-bfin-low.cc (the_low_target): Ditto.
446 * linux-crisv32-low.cc (the_low_target): Ditto.
447 * linux-m32r-low.cc (the_low_target): Ditto.
448 * linux-m68k-low.cc (the_low_target): Ditto.
449 * linux-ppc-low.cc (the_low_target): Ditto.
450 * linux-s390-low.cc (the_low_target): Ditto.
451 * linux-sh-low.cc (the_low_target): Ditto.
452 * linux-tic6x-low.cc (the_low_target): Ditto.
453 * linux-tile-low.cc (the_low_target): Ditto.
454 * linux-xtensa-low.cc (the_low_target): Ditto.
455
456 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
457
458 Remove the 'emit_ops' linux target ops and let the concrete
459 linux target define the op by overriding the declaration of
460 process_stratum_target.
461
462 * linux-low.h (struct linux_target_ops): Remove the op.
463 (class linux_process_target) <emit_ops>: Remove.
464 * linux-low.cc (linux_process_target::emit_ops): Remove.
465 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
466 (x86_emit_ops): Turn into...
467 (x86_target::emit_ops): ...this.
468 (the_low_target): Remove the op field.
469 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
470 (aarch64_emit_ops): Turn into...
471 (aarch64_target::emit_ops): ...this.
472 (the_low_target): Remove the op field.
473 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
474 (ppc_emit_ops): Turn into...
475 (ppc_target::emit_ops): ...this.
476 (the_low_target): Remove the op field.
477 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
478 (s390_emit_ops): Turn into...
479 (s390_target::emit_ops): ...this.
480 (the_low_target): Remove the op field.
481 * linux-arm-low.cc (the_low_target): Remove the op field.
482 * linux-bfin-low.cc (the_low_target): Ditto.
483 * linux-crisv32-low.cc (the_low_target): Ditto.
484 * linux-m32r-low.cc (the_low_target): Ditto.
485 * linux-m68k-low.cc (the_low_target): Ditto.
486 * linux-sh-low.cc (the_low_target): Ditto.
487 * linux-tic6x-low.cc (the_low_target): Ditto.
488 * linux-tile-low.cc (the_low_target): Ditto.
489 * linux-xtensa-low.cc (the_low_target): Ditto.
490
491 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
492
493 Remove the 'install_fast_tracepoint_jump_pad' and
494 'get_min_fast_tracepoint_insn_len' linux target ops to let the
495 concrete linux target define the ops by overriding the declarations
496 of process_stratum_target.
497
498 * linux-low.h (struct linux_target_ops): Remove the ops.
499 (class linux_process_target) <supports_fast_tracepoints>
500 <install_fast_tracepoint_jump_pad>
501 <get_min_fast_tracepoint_insn_len>: Remove.
502 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
503 (linux_process_target::install_fast_tracepoint_jump_pad)
504 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
505 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
506 <install_fast_tracepoint_jump_pad>
507 <get_min_fast_tracepoint_insn_len>: Declare.
508 (x86_target::supports_fast_tracepoints): Define.
509 (x86_install_fast_tracepoint_jump_pad): Turn into...
510 (x86_target::install_fast_tracepoint_jump_pad): ...this.
511 (x86_get_min_fast_tracepoint_insn_len): Turn into...
512 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
513 (the_low_target): Remove the op fields.
514 * linux-aarch64-low.cc (class aarch64_target)
515 <supports_fast_tracepoints>
516 <install_fast_tracepoint_jump_pad>
517 <get_min_fast_tracepoint_insn_len>: Declare.
518 (aarch64_target::supports_fast_tracepoints): Define.
519 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
520 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
521 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
522 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
523 (the_low_target): Remove the op fields.
524 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
525 <install_fast_tracepoint_jump_pad>
526 <get_min_fast_tracepoint_insn_len>: Declare.
527 (ppc_target::supports_fast_tracepoints): Define.
528 (ppc_install_fast_tracepoint_jump_pad): Turn into...
529 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
530 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
531 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
532 (the_low_target): Remove the op fields.
533 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
534 <install_fast_tracepoint_jump_pad>
535 <get_min_fast_tracepoint_insn_len>: Declare.
536 (s390_target::supports_fast_tracepoints): Define.
537 (s390_install_fast_tracepoint_jump_pad): Turn into...
538 (s390_target::install_fast_tracepoint_jump_pad): ...this.
539 (s390_get_min_fast_tracepoint_insn_len): Turn into...
540 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
541 (the_low_target): Remove the op fields.
542 * linux-arm-low.cc (the_low_target): Remove the op fields.
543 * linux-bfin-low.cc (the_low_target): Ditto.
544 * linux-crisv32-low.cc (the_low_target): Ditto.
545 * linux-m32r-low.cc (the_low_target): Ditto.
546 * linux-m68k-low.cc (the_low_target): Ditto.
547 * linux-sh-low.cc (the_low_target): Ditto.
548 * linux-tic6x-low.cc (the_low_target): Ditto.
549 * linux-tile-low.cc (the_low_target): Ditto.
550 * linux-xtensa-low.cc (the_low_target): Ditto.
551
552 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
553
554 Turn the 'get_thread_area' linux target op into a method of
555 process_stratum_target.
556
557 * linux-low.h (struct linux_target_ops): Remove the op.
558 (class linux_process_target) <stuck_in_jump_pad>
559 <linux_fast_tracepoint_collecting>
560 <low_get_thread_area>: Declare.
561 * linux-low.cc (supports_fast_tracepoints): Remove.
562 (linux_fast_tracepoint_collecting): Turn into...
563 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
564 (linux_process_target::low_get_thread_area): Define.
565 (stuck_in_jump_pad_callback): Turn into...
566 (linux_process_target::stuck_in_jump_pad): ...this.
567
568 Update the caller below.
569
570 (linux_process_target::stabilize_threads)
571
572 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
573 Declare.
574 (x86_get_thread_area): Turn into...
575 (x86_target::low_get_thread_area): ...this.
576 (the_low_target): Remove the op field.
577 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
578 Declare.
579 (aarch64_get_thread_area): Turn into...
580 (aarch64_target::low_get_thread_area): ...this.
581 (the_low_target): Remove the op field.
582 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
583 Declare.
584 (ppc_get_thread_area): Turn into...
585 (ppc_target::low_get_thread_area): ...this.
586 (the_low_target): Remove the op field.
587 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
588 Declare.
589 (s390_get_thread_area): Turn into...
590 (s390_target::low_get_thread_area): ...this.
591 (the_low_target): Remove the op field.
592 * linux-arm-low.cc (the_low_target): Remove the op field.
593 * linux-bfin-low.cc (the_low_target): Ditto.
594 * linux-crisv32-low.cc (the_low_target): Ditto.
595 * linux-m32r-low.cc (the_low_target): Ditto.
596 * linux-m68k-low.cc (the_low_target): Ditto.
597 * linux-sh-low.cc (the_low_target): Ditto.
598 * linux-tic6x-low.cc (the_low_target): Ditto.
599 * linux-tile-low.cc (the_low_target): Ditto.
600 * linux-xtensa-low.cc (the_low_target): Ditto.
601
602 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
603
604 Remote the 'supports_tracepoints' linux target op and let the
605 concrete linux target define it by overriding the op declared in
606 process_stratum_target.
607
608 * linux-low.h (struct linux_target_ops): Remove the op.
609 (class linux_process_target) <supports_tracepoints>: Remove.
610 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
611 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
612 Declare.
613 (x86_supports_tracepoints): Turn into...
614 (x86_target::supports_tracepoints): ...this.
615 (the_low_target): Remove the op field.
616 * linux-aarch64-low.cc (class aarch64_target)
617 <supports_tracepoints>: Declare.
618 (aarch64_supports_tracepoints): Turn into...
619 (aarch64_target::supports_tracepoints): ...this.
620 (the_low_target): Remove the op field.
621 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
622 Declare.
623 (ppc_supports_tracepoints): Turn into...
624 (ppc_target::supports_tracepoints): ...this.
625 (the_low_target): Remove the op field.
626 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
627 Declare.
628 (s390_supports_tracepoints): Turn into...
629 (s390_target::supports_tracepoints): ...this.
630 (the_low_target): Remove the op field.
631 * linux-arm-low.cc (the_low_target): Remove the op field.
632 * linux-bfin-low.cc (the_low_target): Ditto.
633 * linux-crisv32-low.cc (the_low_target): Ditto.
634 * linux-m32r-low.cc (the_low_target): Ditto.
635 * linux-m68k-low.cc (the_low_target): Ditto.
636 * linux-sh-low.cc (the_low_target): Ditto.
637 * linux-tic6x-low.cc (the_low_target): Ditto.
638 * linux-tile-low.cc (the_low_target): Ditto.
639 * linux-xtensa-low.cc (the_low_target): Ditto.
640
641 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
642
643 Remove the 'process_qsupported' linux target op and let a concrete
644 linux target define the op by overriding the op declaration in
645 process_stratum_target.
646
647 * linux-low.h (struct linux_target_ops): Remove the op.
648 (class linux_process_target) <process_qsupported>: Remove.
649 * linux-low.cc (linux_process_target::process_qsupported): Remove.
650 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
651 (x86_linux_process_qsupported): Turn into...
652 (x86_target::process_qsupported): ...this.
653 (the_low_target): Remove the op field.
654 * linux-aarch64-low.cc (the_low_target): Remove the op
655 field.
656 * linux-arm-low.cc (the_low_target): Ditto.
657 * linux-bfin-low.cc (the_low_target): Ditto.
658 * linux-crisv32-low.cc (the_low_target): Ditto.
659 * linux-m32r-low.cc (the_low_target): Ditto.
660 * linux-m68k-low.cc (the_low_target): Ditto.
661 * linux-ppc-low.cc (the_low_target): Ditto.
662 * linux-s390-low.cc (the_low_target): Ditto.
663 * linux-sh-low.cc (the_low_target): Ditto.
664 * linux-tic6x-low.cc (the_low_target): Ditto.
665 * linux-tile-low.cc (the_low_target): Ditto.
666 * linux-xtensa-low.cc (the_low_target): Ditto.
667
668 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
669
670 Turn the 'prepare_to_resume' linux target op into a method of
671 linux_process_target.
672
673 * linux-low.h (struct linux_target_ops): Remove the op.
674 (class linux_process_target) <low_prepare_to_resume>: Declare.
675 * linux-low.cc (linux_process_target::low_prepare_to_resume):
676 Define.
677
678 Update the callers below:
679
680 (linux_process_target::resume_one_lwp_throw)
681 (linux_process_target::low_prepare_to_resume)
682
683 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
684 Declare.
685 (x86_target::low_prepare_to_resume): Define.
686 (the_low_target): Remove the op field.
687 * linux-aarch64-low.cc (class aarch64_target)
688 <low_prepare_to_resume>: Declare.
689 (aarch64_target::low_prepare_to_resume): Define.
690 (the_low_target): Remove the op field.
691 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
692 Declare.
693 (arm_prepare_to_resume): Turn into...
694 (arm_target::low_prepare_to_resume): ...this.
695 (the_low_target): Remove the op field.
696 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
697 Declare.
698 (mips_linux_prepare_to_resume): Turn into...
699 (mips_target::low_prepare_to_resume): ...this.
700 (the_low_target): Remove the op field.
701 * linux-bfin-low.cc (the_low_target): Remove the op field.
702 * linux-crisv32-low.cc (the_low_target): Ditto.
703 * linux-m32r-low.cc (the_low_target): Ditto.
704 * linux-m68k-low.cc (the_low_target): Ditto.
705 * linux-ppc-low.cc (the_low_target): Ditto.
706 * linux-s390-low.cc (the_low_target): Ditto.
707 * linux-sh-low.cc (the_low_target): Ditto.
708 * linux-tic6x-low.cc (the_low_target): Ditto.
709 * linux-tile-low.cc (the_low_target): Ditto.
710 * linux-xtensa-low.cc (the_low_target): Ditto.
711
712 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
713
714 Turn the 'new_process', 'delete_process', 'new_thread',
715 'delete_thread', and 'new_fork' linux target ops into methods
716 of linux_process_target.
717
718 * linux-low.h (struct linux_target_ops): Remove the ops.
719 (class linux_process_target) <add_linux_process>
720 <add_lwp>
721 <delete_lwp>
722 <attach_lwp>
723 <detach_one_lwp>
724 <check_zombie_leaders>
725 <filter_exit_event>
726 <low_new_process>
727 <low_delete_process>
728 <low_new_thread>
729 <low_delete_thread>
730 <low_new_fork>: Declare.
731 * linux-low.cc (delete_lwp): Turn into...
732 (linux_process_target::delete_lwp): ...this.
733 (linux_process_target::low_delete_thread): Define.
734 (linux_add_process): Turn into...
735 (linux_process_target::add_linux_process): ...this.
736 (linux_process_target::low_new_process): Define.
737 (linux_process_target::low_delete_process): Define.
738 (linux_process_target::low_new_fork): Define.
739 (add_lwp): Turn into...
740 (linux_process_target::add_lwp): ...this.
741 (linux_process_target::low_new_thread): Define.
742 (linux_attach_lwp): Turn into...
743 (linux_process_target::attach_lwp): ...this.
744 (linux_detach_one_lwp): Turn into...
745 (linux_process_target::detach_one_lwp): ...this.
746 (linux_detach_lwp_callback): Remove and inline...
747 (linux_process_target::detach): ...here.
748 (check_zombie_leaders): Turn into...
749 (linux_process_target::check_zombie_leaders): ...this.
750 (filter_exit_event): Turn into...
751 (linux_process_target::filter_exit_event): ...this.
752
753 Update the callers below.
754
755 (linux_process_target::handle_extended_wait)
756 (linux_process_target::create_inferior)
757 (attach_proc_task_lwp_callback)
758 (linux_process_target::attach)
759 (linux_process_target::detach)
760 (linux_process_target::mourn)
761 * thread-db.cc (attach_thread)
762
763 * linux-x86-low.cc (class x86_target) <low_new_process>
764 <low_delete_process>
765 <low_new_thread>
766 <low_delete_thread>
767 <low_new_fork>: Declare.
768 (x86_linux_new_process): Turn into...
769 (x86_target::low_new_process): ...this.
770 (x86_linux_delete_process): Turn into...
771 (x86_target::low_delete_process): ...this.
772 (x86_target::low_new_thread): Define.
773 (x86_target::low_delete_thread): Define.
774 (x86_linux_new_fork): Turn into...
775 (x86_target::low_new_fork): ...this.
776 (the_low_target): Remove the op fields.
777 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
778 <low_delete_process>
779 <low_new_thread>
780 <low_delete_thread>
781 <low_new_fork>: Declare.
782 (aarch64_linux_new_process): Turn into...
783 (aarch64_target::low_new_process): ...this.
784 (aarch64_linux_delete_process): Turn into...
785 (aarch64_target::low_delete_process): ...this.
786 (aarch64_target::low_new_thread): Define.
787 (aarch64_target::low_delete_thread): Define.
788 (aarch64_linux_new_fork): Turn into...
789 (aarch64_target::low_new_fork): ...this.
790 (the_low_target): Remove the op fields.
791 * linux-arm-low.cc (class arm_target) <low_new_process>
792 <low_delete_process>
793 <low_new_thread>
794 <low_delete_thread>
795 <low_new_fork>: Declare.
796 (arm_new_process): Turn into...
797 (arm_target::low_new_process): ...this.
798 (arm_delete_process): Turn into...
799 (arm_target::low_delete_process): ...this.
800 (arm_new_thread): Turn into...
801 (arm_target::low_new_thread): ...this.
802 (arm_delete_thread): Turn into...
803 (arm_target::low_delete_thread): ...this.
804 (arm_new_fork): Turn into...
805 (arm_target::low_new_fork): ...this.
806 (the_low_target): Remove the op fields.
807 * linux-mips-low.cc (class mips_target) <low_new_process>
808 <low_delete_process>
809 <low_new_thread>
810 <low_delete_thread>
811 <low_new_fork>: Declare.
812 (mips_linux_new_process): Turn into...
813 (mips_target::low_new_process): ...this.
814 (mips_linux_delete_process): Turn into...
815 (mips_target::low_delete_process): ...this.
816 (mips_linux_new_thread): Turn into...
817 (mips_target::low_new_thread): ...this.
818 (mips_linux_delete_thread): Turn into...
819 (mips_target::low_delete_thread): ...this.
820 (mips_linux_new_fork): Turn into...
821 (mips_target::low_new_fork): ...this.
822 (the_low_target): Remove the op fields.
823 * linux-bfin-low.cc (the_low_target): Remove the op fields.
824 * linux-crisv32-low.cc (the_low_target): Ditto.
825 * linux-m32r-low.cc (the_low_target): Ditto.
826 * linux-m68k-low.cc (the_low_target): Ditto.
827 * linux-ppc-low.cc (the_low_target): Ditto.
828 * linux-s390-low.cc (the_low_target): Ditto.
829 * linux-sh-low.cc (the_low_target): Ditto.
830 * linux-tic6x-low.cc (the_low_target): Ditto.
831 * linux-tile-low.cc (the_low_target): Ditto.
832 * linux-xtensa-low.cc (the_low_target): Ditto.
833
834 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
835
836 Turn the 'siginfo_fixup' linux target op into a method of
837 linux_process_target.
838
839 * linux-low.h (struct linux_target_ops): Remove the op.
840 (class linux_process_target) <siginfo_fixup>
841 <low_siginfo_fixup>: Declare.
842 * linux-low.cc (siginfo_fixup): Turn into...
843 (linux_process_target::siginfo_fixup): ...this.
844 (linux_process_target::low_siginfo_fixup): Define.
845 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
846 (x86_siginfo_fixup): Turn into...
847 (x86_target::low_siginfo_fixup): ...this.
848 (the_low_target): Remove the op field.
849 * linux-aarch64-low.cc (class aarch64_target):
850 <low_siginfo_fixup>: Declare.
851 (aarch64_linux_siginfo_fixup): Turn into...
852 (aarch64_target::low_siginfo_fixup): ...this.
853 (the_low_target): Remove the op field.
854 * linux-arm-low.cc (the_low_target): Remove the op field.
855 * linux-bfin-low.cc (the_low_target): Ditto.
856 * linux-crisv32-low.cc (the_low_target): Ditto.
857 * linux-m32r-low.cc (the_low_target): Ditto.
858 * linux-m68k-low.cc (the_low_target): Ditto.
859 * linux-mips-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 'collect_ptrace_register' and 'supply_ptrace_register'
870 linux target ops into methods of linux_process_target.
871
872 * linux-low.h (struct linux_target_ops): Remove the ops.
873 (class linux_process_target) <low_collect_ptrace_register>
874 <low_store_ptrace_register>: Declare.
875 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
876 (linux_process_target::low_supply_ptrace_register): Define.
877
878 Update the callers below.
879
880 (linux_process_target::fetch_register)
881 (linux_process_target::store_register)
882
883 * linux-x86-low.cc (the_low_target): Remove the op fields.
884 * linux-aarch64-low.cc (the_low_target): Ditto.
885 * linux-arm-low.cc (the_low_target): Ditto.
886 * linux-bfin-low.cc (the_low_target): Ditto.
887 * linux-crisv32-low.cc (the_low_target): Ditto.
888 * linux-m32r-low.cc (the_low_target): Ditto.
889 * linux-m68k-low.cc (the_low_target): Ditto.
890 * linux-sh-low.cc (the_low_target): Ditto.
891 * linux-sparc-low.cc (the_low_target): Ditto.
892 * linux-tic6x-low.cc (the_low_target): Ditto.
893 * linux-tile-low.cc (the_low_target): Ditto.
894 * linux-xtensa-low.cc (the_low_target): Ditto.
895 * linux-mips-low.cc (class mips_target)
896 <low_collect_ptrace_register>
897 <low_supply_ptrace_register>: Declare.
898 (mips_collect_ptrace_register): Turn into ...
899 (mips_target::low_collect_ptrace_register): ...this.
900 (mips_supply_ptrace_register): Turn into...
901 (mips_target::low_supply_ptrace_register): ...this.
902 (the_low_target): Remove the op fields.
903 * linux-ppc-low.cc (class ppc_target)
904 <low_collect_ptrace_register>
905 <low_supply_ptrace_register>: Declare.
906 (ppc_collect_ptrace_register): Turn into ...
907 (ppc_target::low_collect_ptrace_register): ...this.
908 (ppc_supply_ptrace_register): Turn into ...
909 (ppc_target::low_supply_ptrace_register): ...this.
910 (ppc_fill_gregset): Update for the calls to
911 low_collect_ptrace_register.
912 (the_low_target): Remove the op fields.
913 * linux-s390-low.cc (class s390_target)
914 <low_collect_ptrace_register>
915 <low_supply_ptrace_register>: Declare.
916 (s390_collect_ptrace_register): Turn into ...
917 (s390_target::low_collect_ptrace_register): ...this.
918 (s390_supply_ptrace_register): Turn into ...
919 (s390_target::low_supply_ptrace_register): ...this.
920 (s390_fill_gregset): Update for the calls to
921 low_collect_ptrace_register.
922 (the_low_target): Remove the op fields.
923
924 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
925
926 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
927 target ops into methods of linux_process_target.
928
929 * linux-low.h (struct linux_target_ops): Remove the ops.
930 (class linux_process_target) <check_stopped_by_watchpoint>
931 <low_stopped_by_watchpoint>
932 <low_stopped_data_address>: Declare.
933 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
934 (linux_process_target::check_stopped_by_watchpoint): ...this.
935 (linux_process_target::low_stopped_by_watchpoint): Define.
936 (linux_process_target::low_stopped_data_address): Define.
937 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
938 <low_stopped_data_address>: Declare.
939 (x86_stopped_by_watchpoint): Turn into...
940 (x86_target::low_stopped_by_watchpoint): ...this.
941 (x86_stopped_data_address): Turn into...
942 (x86_target::low_stopped_data_address): ...this.
943 (the_low_target): Remove the op fields.
944 * linux-aarch64-low.cc (class aarch64_target)
945 <low_stopped_by_watchpoint>
946 <low_stopped_data_address>: Declare.
947 (aarch64_stopped_by_watchpoint): Turn into...
948 (aarch64_target::low_stopped_by_watchpoint): ...this.
949 (aarch64_stopped_data_address): Turn into...
950 (aarch64_target::low_stopped_data_address): ...this.
951 (the_low_target): Remove the op fields.
952 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
953 <low_stopped_data_address>: Declare.
954 (arm_stopped_by_watchpoint): Turn into...
955 (arm_target::low_stopped_by_watchpoint): ...this.
956 (arm_stopped_data_address): Turn into...
957 (arm_target::low_stopped_data_address): ...this.
958 (the_low_target): Remove the op fields.
959 * linux-crisv32-low.cc (class crisv32_target)
960 <low_stopped_by_watchpoint>
961 <low_stopped_data_address>: Declare.
962 (cris_stopped_by_watchpoint): Turn into...
963 (crisv32_target::low_stopped_by_watchpoint): ...this.
964 (cris_stopped_data_address): Turn into...
965 (crisv32_target::low_stopped_data_address): ...this.
966 (the_low_target): Remove the op fields.
967 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
968 <low_stopped_data_address>: Declare.
969 (mips_stopped_by_watchpoint): Turn into...
970 (mips_target::low_stopped_by_watchpoint): ...this.
971 (mips_stopped_data_address): Turn into...
972 (mips_target::low_stopped_data_address): ...this.
973 (the_low_target): Remove the op fields.
974 * linux-bfin-low.cc (the_low_target): Remove the op fields.
975 * linux-m32r-low.cc (the_low_target): Ditto.
976 * linux-m68k-low.cc (the_low_target): Ditto.
977 * linux-ppc-low.cc (the_low_target): Ditto.
978 * linux-s390-low.cc (the_low_target): Ditto.
979 * linux-sh-low.cc (the_low_target): Ditto.
980 * linux-sparc-low.cc (the_low_target): Ditto.
981 * linux-tic6x-low.cc (the_low_target): Ditto.
982 * linux-tile-low.cc (the_low_target): Ditto.
983 * linux-xtensa-low.cc (the_low_target): Ditto.
984
985 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
986
987 Turn the 'insert_point' and 'remove_point' linux target ops into
988 methods of linux_process_target.
989
990 * linux-low.h (struct linux_target_ops): Remove the ops.
991 (class linux_process_target) <low_insert_point>
992 <low_remove_point>: Declare.
993 * linux-low.cc (linux_process_target::low_insert_point)
994 (linux_process_target::low_remove_point): Define.
995 (linux_process_target::insert_point)
996 (linux_process_target::remove_point): Update for calls to
997 low_insert_point and low_remove_point.
998 * linux-x86-low.cc (class x86_target) <low_insert_point>
999 <low_remove_point>: Declare.
1000 (x86_insert_point): Turn into...
1001 (x86_target::low_insert_point): ...this.
1002 (x86_remove_point): Turn into...
1003 (x86_target::low_remove_point): ...this.
1004 (the_low_target): Remove the op fields.
1005 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1006 <low_remove_point>: Declare.
1007 (aarch64_insert_point): Turn into...
1008 (aarch64_target::low_insert_point): ...this.
1009 (aarch64_remove_point): Turn into...
1010 (aarch64_target::low_remove_point): ...this.
1011 (the_low_target): Remove the op fields.
1012 * linux-arm-low.cc (class arm_target) <low_insert_point>
1013 <low_remove_point>: Declare.
1014 (arm_insert_point): Turn into...
1015 (arm_target::low_insert_point): ...this.
1016 (arm_remove_point): Turn into...
1017 (arm_target::low_remove_point): ...this.
1018 (the_low_target): Remove the op fields.
1019 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1020 <low_remove_point>: Declare.
1021 (crisv32_insert_point): Turn into...
1022 (crisv32_target::low_insert_point): ...this.
1023 (crisv32_remove_point): Turn into...
1024 (crisv32_target::low_remove_point): ...this.
1025 (the_low_target): Remove the op fields.
1026 * linux-mips-low.cc (class mips_target) <low_insert_point>
1027 <low_remove_point>: Declare.
1028 (mips_insert_point): Turn into...
1029 (mips_target::low_insert_point): ...this.
1030 (mips_remove_point): Turn into...
1031 (mips_target::low_remove_point): ...this.
1032 (the_low_target): Remove the op fields.
1033 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1034 <low_remove_point>: Declare.
1035 (ppc_insert_point): Turn into...
1036 (ppc_target::low_insert_point): ...this.
1037 (ppc_remove_point): Turn into...
1038 (ppc_target::low_remove_point): ...this.
1039 (the_low_target): Remove the op fields.
1040 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1041 * linux-m32r-low.cc (the_low_target): Ditto.
1042 * linux-m68k-low.cc (the_low_target): Ditto.
1043 * linux-s390-low.cc (the_low_target): Ditto.
1044 * linux-sh-low.cc (the_low_target): Ditto.
1045 * linux-sparc-low.cc (the_low_target): Ditto.
1046 * linux-tic6x-low.cc (the_low_target): Ditto.
1047 * linux-tile-low.cc (the_low_target): Ditto.
1048 * linux-xtensa-low.cc (the_low_target): Ditto.
1049
1050 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1051
1052 Remove the 'supports_z_point_type' linux target op and let the
1053 concrete linux target define it by overriding the op declared in
1054 process_stratum_target.
1055
1056 * linux-low.cc (linux_process_target::supports_z_point_type):
1057 Remove.
1058 * linux-low.h (struct linux_target_ops): Remove the op.
1059 (class linux_process_target) <supports_z_point_type>: Remove.
1060 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1061 Declare.
1062 (x86_supports_z_point_type): Turn into...
1063 (x86_target::supports_z_point_type): ...this.
1064 (the_low_target): Remove the op field.
1065 * linux-aarch64-low.cc (class aarch64_target)
1066 <supports_z_point_type>: Declare.
1067 (aarch64_supports_z_point_type): Turn into...
1068 (aarch64_target::supports_z_point_type): ...this.
1069 (the_low_target): Remove the op field.
1070 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1071 Declare.
1072 (arm_supports_z_point_type): Turn into...
1073 (arm_target::supports_z_point_type): ...this.
1074 (the_low_target): Remove the op field.
1075 * linux-crisv32-low.cc (class crisv32_target)
1076 <supports_z_point_type>: Declare.
1077 (cris_supports_z_point_type): Turn into...
1078 (crisv32_target::supports_z_point_type): ...this.
1079 (the_low_target): Remove the op field.
1080 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1081 Declare.
1082 (mips_supports_z_point_type): Turn into...
1083 (mips_target::supports_z_point_type): ...this.
1084 (the_low_target): Remove the op field.
1085 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1086 Declare.
1087 (ppc_supports_z_point_type): Turn into...
1088 (ppc_target::supports_z_point_type): ...this.
1089 (the_low_target): Remove the op field.
1090 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1091 Declare.
1092 (s390_supports_z_point_type): Turn into...
1093 (s390_target::supports_z_point_type): ...this.
1094 (the_low_target): Remove the op field.
1095 * linux-bfin-low.cc (the_low_target): Remove the op field.
1096 * linux-m32r-low.cc (the_low_target): Ditto.
1097 * linux-m68k-low.cc (the_low_target): Ditto.
1098 * linux-sh-low.cc (the_low_target): Ditto.
1099 * linux-sparc-low.cc (the_low_target): Ditto.
1100 * linux-tic6x-low.cc (the_low_target): Ditto.
1101 * linux-tile-low.cc (the_low_target): Ditto.
1102 * linux-xtensa-low.cc (the_low_target): Ditto.
1103
1104 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1105
1106 Turn the 'breakpoint_at' linux target op into a method of
1107 linux_process_target.
1108
1109 * linux-low.h (struct linux_target_ops): Remove the op.
1110 (class linux_process_target) <low_breakpoint_at>: Declare.
1111
1112 Update the callers below:
1113
1114 * linux-low.cc (linux_process_target::save_stop_reason)
1115 (linux_process_target::thread_still_has_status_pending)
1116 (linux_process_target::wait_1)
1117
1118 * linux-x86-low.cc (class x86_target)
1119 <low_breakpoint_at>: Declare.
1120 (x86_breakpoint_at): Turn into...
1121 (x86_target::low_breakpoint_at): ...this.
1122 (the_low_target): Remove the op field.
1123 * linux-aarch64-low.cc (class aarch64_target)
1124 <low_breakpoint_at>: Declare.
1125 (aarch64_breakpoint_at): Turn into...
1126 (aarch64_target::low_breakpoint_at): ...this.
1127 (the_low_target): Remove the op field.
1128 * linux-arm-low.cc (class arm_target)
1129 <low_breakpoint_at>: Declare.
1130 (arm_target::low_breakpoint_at): Define.
1131 (the_low_target): Remove the op field.
1132 * linux-bfin-low.cc (class bfin_target)
1133 <low_breakpoint_at>: Declare.
1134 (bfin_breakpoint_at): Turn into...
1135 (bfin_target::low_breakpoint_at): ...this.
1136 (the_low_target): Remove the op field.
1137 * linux-cris-low.cc (class cris_target)
1138 <low_breakpoint_at>: Declare.
1139 (cris_breakpoint_at): Turn into...
1140 (cris_target::low_breakpoint_at): ...this.
1141 (the_low_target): Remove the op field.
1142 * linux-crisv32-low.cc (class crisv32_target)
1143 <low_breakpoint_at>: Declare.
1144 (crisv32_breakpoint_at): Turn into...
1145 (crisv32_target::low_breakpoint_at): ...this.
1146 (the_low_target): Remove the op field.
1147 * linux-ia64-low.cc (class ia64_target)
1148 <low_breakpoint_at>: Declare.
1149 (ia64_target::low_breakpoint_at): Define.
1150 * linux-m32r-low.cc (class m32r_target)
1151 <low_breakpoint_at>: Declare.
1152 (m32r_breakpoint_at): Turn into...
1153 (m32r_target::low_breakpoint_at): ...this.
1154 (the_low_target): Remove the op field.
1155 * linux-m68k-low.cc (class m68k_target)
1156 <low_breakpoint_at>: Declare.
1157 (m68k_breakpoint_at): Turn into...
1158 (m68k_target::low_breakpoint_at): ...this.
1159 (the_low_target): Remove the op field.
1160 * linux-mips-low.cc (class mips_target)
1161 <low_breakpoint_at>: Declare.
1162 (mips_breakpoint_at): Turn into...
1163 (mips_target::low_breakpoint_at): ...this.
1164 (the_low_target): Remove the op field.
1165 * linux-nios2-low.cc (class nios2_target)
1166 <low_breakpoint_at>: Declare.
1167 (nios2_breakpoint_at): Turn into...
1168 (nios2_target::low_breakpoint_at): ...this.
1169 (the_low_target): Remove the op field.
1170 * linux-ppc-low.cc (class ppc_target)
1171 <low_breakpoint_at>: Declare.
1172 (ppc_breakpoint_at): Turn into...
1173 (ppc_target::low_breakpoint_at): ...this.
1174 (the_low_target): Remove the op field.
1175 * linux-riscv-low.cc (class riscv_target)
1176 <low_breakpoint_at>: Declare.
1177 (riscv_breakpoint_at): Turn into...
1178 (riscv_target::low_breakpoint_at): ...this.
1179 (the_low_target): Remove the op field.
1180 * linux-s390-low.cc (class s390_target)
1181 <low_breakpoint_at>: Declare.
1182 (s390_breakpoint_at): Turn into...
1183 (s390_target::low_breakpoint_at): ...this.
1184 (the_low_target): Remove the op field.
1185 * linux-sh-low.cc (class sh_target)
1186 <low_breakpoint_at>: Declare.
1187 (sh_breakpoint_at): Turn into...
1188 (sh_target::low_breakpoint_at): ...this.
1189 (the_low_target): Remove the op field.
1190 * linux-sparc-low.cc (class sparc_target)
1191 <low_breakpoint_at>: Declare.
1192 (sparc_breakpoint_at): Turn into...
1193 (sparc_target::low_breakpoint_at): ...this.
1194 (the_low_target): Remove the op field.
1195 * linux-tic6x-low.cc (class tic6x_target)
1196 <low_breakpoint_at>: Declare.
1197 (tic6x_breakpoint_at): Turn into...
1198 (tic6x_target::low_breakpoint_at): ...this.
1199 (the_low_target): Remove the op field.
1200 * linux-tile-low.cc (class tile_target)
1201 <low_breakpoint_at>: Declare.
1202 (tile_breakpoint_at): Turn into...
1203 (tile_target::low_breakpoint_at): ...this.
1204 (the_low_target): Remove the op field.
1205 * linux-xtensa-low.cc (class xtensa_target)
1206 <low_breakpoint_at>: Declare.
1207 (xtensa_breakpoint_at): Turn into...
1208 (xtensa_target::low_breakpoint_at): ...this.
1209 (the_low_target): Remove the op field.
1210
1211 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1212
1213 Turn the 'decr_pc_after_break' linux_target_ops field into
1214 a method of linux_process_target.
1215
1216 * linux-low.h (struct linux_target_ops)
1217 <decr_pc_after_break>: Remove.
1218 (class linux_process_target) <low_decr_pc_after_break>: New method
1219 declaration.
1220 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1221 New method implementation.
1222
1223 Update the users below.
1224
1225 (linux_process_target::save_stop_reason)
1226 (linux_process_target::wait_1)
1227 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1228 New declaration.
1229 (x86_target::low_decr_pc_after_break): New method implementation.
1230 (the_low_target): Remove the field.
1231 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1232 New declaration.
1233 (bfin_target::low_decr_pc_after_break): New method implementation.
1234 (the_low_target): Remove the field.
1235 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1236 New declaration.
1237 (m68k_target::low_decr_pc_after_break): New method implementation.
1238 (the_low_target): Remove the field.
1239 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1240 New declaration.
1241 (s390_target::low_decr_pc_after_break): New method implementation.
1242 (the_low_target): Remove the field.
1243 * linux-aarch64-low.cc (the_low_target): Remove the field.
1244 * linux-arm-low.cc (the_low_target): Remove the field.
1245 * linux-cris-low.cc (the_low_target): Remove the field.
1246 * linux-crisv32-low.cc (the_low_target): Remove the field.
1247 * linux-m32r-low.cc (the_low_target): Remove the field.
1248 * linux-mips-low.cc (the_low_target): Remove the field.
1249 * linux-nios2-low.cc (the_low_target): Remove the field.
1250 * linux-ppc-low.cc (the_low_target): Remove the field.
1251 * linux-riscv-low.cc (the_low_target): Remove the field.
1252 * linux-sh-low.cc (the_low_target): Remove the field.
1253 * linux-sparc-low.cc (the_low_target): Remove the field.
1254 * linux-tic6x-low.cc (the_low_target): Remove the field.
1255 * linux-tile-low.cc (the_low_target): Remove the field.
1256 * linux-xtensa-low.cc (the_low_target): Remove the field.
1257
1258 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1259
1260 Remove the 'supports_software_single_step' linux target op and let
1261 the concrete linux target define it by overriding the op in
1262 process_stratum_target.
1263 Turn the 'get_next_pcs' linux target op into a method of
1264 linux_process_target.
1265
1266 * linux-low.h (struct linux_target_ops): Remove the ops.
1267 (class linux_process_target) <supports_software_single_step>:
1268 Remove.
1269 <low_get_next_pcs>: Declare.
1270 * linux-low.cc (can_software_single_step): Remove.
1271 (linux_process_target::low_get_next_pcs): Define.
1272 (linux_process_target::supports_software_single_step): Remove.
1273
1274 Update the callers below.
1275
1276 (linux_process_target::handle_extended_wait)
1277 (linux_process_target::wait_1)
1278 (linux_process_target::install_software_single_step_breakpoints)
1279 (linux_process_target::single_step)
1280 (linux_process_target::thread_needs_step_over)
1281 (linux_process_target::proceed_one_lwp)
1282 (linux_process_target::supports_range_stepping)
1283
1284 * linux-x86-low.cc (the_low_target): Remove the op field.
1285 * linux-aarch64-low.cc (the_low_target): Ditto.
1286 * linux-bfin-low.cc (the_low_target): Ditto.
1287 * linux-cris-low.cc (the_low_target): Ditto.
1288 * linux-crisv32-low.cc (the_low_target): Ditto.
1289 * linux-m32r-low.cc (the_low_target): Ditto.
1290 * linux-m68k-low.cc (the_low_target): Ditto.
1291 * linux-mips-low.cc (the_low_target): Ditto.
1292 * linux-nios2-low.cc (the_low_target): Ditto.
1293 * linux-ppc-low.cc (the_low_target): Ditto.
1294 * linux-riscv-low.cc (the_low_target): Ditto.
1295 * linux-s390-low.cc (the_low_target): Ditto.
1296 * linux-sh-low.cc (the_low_target): Ditto.
1297 * linux-sparc-low.cc (the_low_target): Ditto.
1298 * linux-tic6x-low.cc (the_low_target): Ditto.
1299 * linux-tile-low.cc (the_low_target): Ditto.
1300 * linux-xtensa-low.cc (the_low_target): Ditto.
1301 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1302 <supports_software_single_step>: Declare.
1303 (arm_target::supports_software_single_step): Define.
1304 (arm_gdbserver_get_next_pcs): Turn into...
1305 (arm_target::low_get_next_pcs): ...this.
1306 (the_low_target): Remove the op field.
1307
1308 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1309
1310 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1311 the concrete linux target define it by overriding the op
1312 in process_stratum_target.
1313
1314 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1315 Remove.
1316 * linux-low.h (struct linux_target_ops): Remove the op.
1317 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1318 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1319 Declare.
1320 (x86_sw_breakpoint_from_kind): Turn into...
1321 (x86_target::sw_breakpoint_from_kind): ...this.
1322 (the_low_target): Remove the op field.
1323 * linux-aarch64-low.cc (class aarch64_target)
1324 <sw_breakpoint_from_kind>: Declare.
1325 (aarch64_sw_breakpoint_from_kind): Turn into...
1326 (aarch64_target::sw_breakpoint_from_kind): ...this.
1327 (the_low_target): Remove the op field.
1328 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1329 Declare.
1330 (arm_target::sw_breakpoint_from_kind): Define.
1331 (the_low_target): Remove the op field.
1332 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1333 Declare.
1334 (bfin_sw_breakpoint_from_kind): Turn into...
1335 (bfin_target::sw_breakpoint_from_kind): ...this.
1336 (the_low_target): Remove the op field.
1337 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1338 Declare.
1339 (cris_sw_breakpoint_from_kind): Turn into...
1340 (cris_target::sw_breakpoint_from_kind): ...this.
1341 (the_low_target): Remove the op field.
1342 * linux-crisv32-low.cc (class crisv32_target)
1343 <sw_breakpoint_from_kind>: Declare.
1344 (cris_sw_breakpoint_from_kind): Turn into...
1345 (crisv32_target::sw_breakpoint_from_kind): ...this.
1346 (the_low_target): Remove the op field.
1347 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1348 Declare.
1349 (ia64_target::sw_breakpoint_from_kind): Define.
1350 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1351 Declare.
1352 (m32r_sw_breakpoint_from_kind): Turn into...
1353 (m32r_target::sw_breakpoint_from_kind): ...this.
1354 (the_low_target): Remove the op field.
1355 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1356 Declare.
1357 (m68k_sw_breakpoint_from_kind): Turn into...
1358 (m68k_target::sw_breakpoint_from_kind): ...this.
1359 (the_low_target): Remove the op field.
1360 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1361 Declare.
1362 (mips_sw_breakpoint_from_kind): Turn into...
1363 (mips_target::sw_breakpoint_from_kind): ...this.
1364 (the_low_target): Remove the op field.
1365 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1366 Declare.
1367 (nios2_sw_breakpoint_from_kind): Turn into...
1368 (nios2_target::sw_breakpoint_from_kind): ...this.
1369 (the_low_target): Remove the op field.
1370 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1371 Declare.
1372 (ppc_sw_breakpoint_from_kind): Turn into...
1373 (ppc_target::sw_breakpoint_from_kind): ...this.
1374 (the_low_target): Remove the op field.
1375 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1376 Declare.
1377 (riscv_sw_breakpoint_from_kind): Turn into...
1378 (riscv_target::sw_breakpoint_from_kind): ...this.
1379 (the_low_target): Remove the op field.
1380 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1381 Declare.
1382 (s390_sw_breakpoint_from_kind): Turn into...
1383 (s390_target::sw_breakpoint_from_kind): ...this.
1384 (the_low_target): Remove the op field.
1385 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1386 Declare.
1387 (sh_sw_breakpoint_from_kind): Turn into...
1388 (sh_target::sw_breakpoint_from_kind): ...this.
1389 (the_low_target): Remove the op field.
1390 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1391 Declare.
1392 (sparc_sw_breakpoint_from_kind): Turn into...
1393 (sparc_target::sw_breakpoint_from_kind): ...this.
1394 (the_low_target): Remove the op field.
1395 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1396 Declare.
1397 (tic6x_sw_breakpoint_from_kind): Turn into...
1398 (tic6x_target::sw_breakpoint_from_kind): ...this.
1399 (the_low_target): Remove the op field.
1400 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1401 Declare.
1402 (tile_sw_breakpoint_from_kind): Turn into...
1403 (tile_target::sw_breakpoint_from_kind): ...this.
1404 (the_low_target): Remove the op field.
1405 * linux-xtensa-low.cc (class xtensa_target)
1406 <sw_breakpoint_from_kind>: Declare.
1407 (xtensa_sw_breakpoint_from_kind): Turn into...
1408 (xtensa_target::sw_breakpoint_from_kind): ...this.
1409 (the_low_target): Remove the op field.
1410
1411 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1412
1413 Remove the 'breakpoint_kind_from_pc' and
1414 'breakpoint_kind_from_current_state' linux target ops, and let the
1415 concrete linux target define them by overriding the ops of
1416 process_stratum_target.
1417
1418 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1419 Remove.
1420 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1421 * linux-low.h (struct linux_target_ops): Remove ops.
1422 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1423 <breakpoint_kind_from_current_state>: Remove.
1424 * linux-x86-low.cc (the_low_target): Remove the op fields.
1425 * linux-bfin-low.cc (the_low_target): Ditto.
1426 * linux-cris-low.cc (the_low_target): Ditto.
1427 * linux-crisv32-low.cc (the_low_target): Ditto.
1428 * linux-m32r-low.cc (the_low_target): Ditto.
1429 * linux-m68k-low.cc (the_low_target): Ditto.
1430 * linux-mips-low.cc (the_low_target): Ditto.
1431 * linux-nios2-low.cc (the_low_target): Ditto.
1432 * linux-ppc-low.cc (the_low_target): Ditto.
1433 * linux-s390-low.cc (the_low_target): Ditto.
1434 * linux-sh-low.cc (the_low_target): Ditto.
1435 * linux-sparc-low.cc (the_low_target): Ditto.
1436 * linux-tic6x-low.cc (the_low_target): Ditto.
1437 * linux-tile-low.cc (the_low_target): Ditto.
1438 * linux-xtensa-low.cc (the_low_target): Ditto.
1439 * linux-aarch64-low.cc (class aarch64_target)
1440 <breakpoint_kind_from_pc>
1441 <breakpoint_kind_from_current_state>: Declare.
1442 (aarch64_breakpoint_kind_from_pc): Turn into...
1443 (aarch64_target::breakpoint_kind_from_pc): ...this.
1444 (aarch64_breakpoint_kind_from_current_state): Turn into...
1445 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1446 (the_low_target): Remove the op fields.
1447 * linux-arm-low.cc (class arm_target):
1448 <breakpoint_kind_from_pc>
1449 <breakpoint_kind_from_current_state>: Declare.
1450 (arm_target::breakpoint_kind_from_pc): Define.
1451 (arm_target::breakpoint_kind_from_current_state): Define.
1452 (the_low_target): Remove the op fields.
1453 * linux-riscv-low.cc (class riscv_target):
1454 <breakpoint_kind_from_pc>: Declare.
1455 (riscv_breakpoint_kind_from_pc): Turn into...
1456 (riscv_target::breakpoint_kind_from_pc): ...this.
1457 (the_low_target): Remove the op fields.
1458
1459 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1460
1461 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1462 of linux_process_target.
1463
1464 * linux-low.h (struct linux_target_ops): Remove the ops.
1465 (class linux_process_target) <low_supports_breakpoints>
1466 <low_get_pc>
1467 <low_set_pc>: Declare.
1468 * linux-low.cc (supports_breakpoints): Turn into...
1469 (linux_process_target::low_supports_breakpoints): ...this.
1470 (linux_process_target::low_get_pc): Define.
1471 (linux_process_target::low_set_pc): Define.
1472
1473 Update the callers below.
1474
1475 (linux_process_target::get_pc)
1476 (linux_process_target::save_stop_reason)
1477 (linux_process_target::maybe_move_out_of_jump_pad)
1478 (linux_process_target::wait_1)
1479 (linux_process_target::resume_one_lwp_throw)
1480 (linux_process_target::resume)
1481 (linux_process_target::proceed_all_lwps)
1482 (linux_process_target::read_pc)
1483 (linux_process_target::write_pc)
1484
1485 * linux-x86-low.cc (class linux_process_target)
1486 <low_supports_breakpoints>
1487 <low_get_pc>
1488 <low_set_pc>: Declare.
1489 (x86_target::low_supports_breakpoints): Define.
1490 (x86_get_pc): Turn into...
1491 (x86_target::low_get_pc): ...this.
1492 (x86_set_pc): Turn into...
1493 (x86_target::low_set_pc): ...this.
1494 (the_low_target): Remove the op fields.
1495 * linux-arm-low.cc (class arm_target)
1496 <low_supports_breakpoints>
1497 <low_get_pc>
1498 <low_set_pc>: Declare.
1499 (arm_target::low_supports_breakpoints)
1500 (arm_target::low_get_pc)
1501 (arm_target::low_set_pc): Define.
1502 (the_low_target): Remove the op fields.
1503 * linux-bfin-low.cc (class bfin_target)
1504 <low_supports_breakpoints>
1505 <low_get_pc>
1506 <low_set_pc>: Declare.
1507 (bfin_target::low_supports_breakpoints)
1508 (bfin_target::low_get_pc)
1509 (bfin_target::low_set_pc): Define.
1510 (the_low_target): Remove the op fields.
1511 * linux-cris-low.cc (class cris_target)
1512 <low_supports_breakpoints>
1513 <low_get_pc>
1514 <low_set_pc>: Declare.
1515 (cris_target::low_supports_breakpoints)
1516 (cris_target::low_get_pc)
1517 (cris_target::low_set_pc): Define.
1518 (the_low_target): Remove the op fields.
1519 * linux-crisv32-low.cc (class crisv32_target)
1520 <low_supports_breakpoints>
1521 <low_get_pc>
1522 <low_set_pc>: Declare.
1523 (crisv32_target::low_supports_breakpoints)
1524 (crisv32_target::low_get_pc)
1525 (crisv32_target::low_set_pc): Define.
1526 (the_low_target): Remove the op fields.
1527 * linux-m32r-low.cc (class m32r_target)
1528 <low_supports_breakpoints>
1529 <low_get_pc>
1530 <low_set_pc>: Declare.
1531 (m32r_target::low_supports_breakpoints)
1532 (m32r_target::low_get_pc)
1533 (m32r_target::low_set_pc): Define.
1534 (the_low_target): Remove the op fields.
1535 * linux-m68k-low.cc (class m68k_target)
1536 <low_supports_breakpoints>
1537 <low_get_pc>
1538 <low_set_pc>: Declare.
1539 (m68k_target::low_supports_breakpoints)
1540 (m68k_target::low_get_pc)
1541 (m68k_target::low_set_pc): Define.
1542 (the_low_target): Remove the op fields.
1543 * linux-nios2-low.cc (class nios2_target)
1544 <low_supports_breakpoints>
1545 <low_get_pc>
1546 <low_set_pc>: Declare.
1547 (nios2_target::low_supports_breakpoints)
1548 (nios2_target::low_get_pc)
1549 (nios2_target::low_set_pc): Define.
1550 (the_low_target): Remove the op fields.
1551 * linux-sh-low.cc (class sh_target)
1552 <low_supports_breakpoints>
1553 <low_get_pc>
1554 <low_set_pc>: Declare.
1555 (sh_target::low_supports_breakpoints)
1556 (sh_target::low_get_pc)
1557 (sh_target::low_set_pc): Define.
1558 (the_low_target): Remove the op fields.
1559 * linux-xtensa-low.cc (class xtensa_target)
1560 <low_supports_breakpoints>
1561 <low_get_pc>
1562 <low_set_pc>: Declare.
1563 (xtensa_target::low_supports_breakpoints)
1564 (xtensa_target::low_get_pc)
1565 (xtensa_target::low_set_pc): Define.
1566 (the_low_target): Remove the op fields.
1567 * linux-sparc-low.cc (class sparc_target)
1568 <low_supports_breakpoints>
1569 <low_get_pc>: Declare.
1570 (sparc_target::low_supports_breakpoints)
1571 (sparc_target::low_get_pc): Define.
1572 (the_low_target): Remove the op fields.
1573 * linux-tile-low.cc (class tile_target)
1574 <low_supports_breakpoints>
1575 <low_get_pc>
1576 <low_set_pc>: Declare.
1577 (tile_target::low_supports_breakpoints)
1578 (tile_target::low_get_pc)
1579 (tile_target::low_set_pc): Define.
1580 (the_low_target): Remove the op fields.
1581 * linux-aarch64-low.cc (class aarch64_target)
1582 <low_supports_breakpoints>
1583 <low_get_pc>
1584 <low_set_pc>: Declare.
1585 (aarch64_target::low_supports_breakpoints): Define.
1586 (aarch64_get_pc): Turn into...
1587 (aarch64_target::low_get_pc): ...this.
1588 (aarch64_set_pc): Turn into...
1589 (aarch64_target::low_set_pc): ...this.
1590 (the_low_target): Remove the op fields.
1591 * linux-mips-low.cc (class mips_target)
1592 <low_supports_breakpoints>
1593 <low_get_pc>
1594 <low_set_pc>: Declare.
1595 (mips_target::low_supports_breakpoints): Define.
1596 (mips_get_pc): Turn into...
1597 (mips_target::low_get_pc): ...this.
1598 (mips_set_pc): Turn into...
1599 (mips_target::low_set_pc): ...this.
1600 (the_low_target): Remove the op fields.
1601 * linux-ppc-low.cc (class ppc_target)
1602 <low_supports_breakpoints>
1603 <low_get_pc>
1604 <low_set_pc>: Declare.
1605 (ppc_target::low_supports_breakpoints): Define.
1606 (ppc_get_pc): Turn into...
1607 (ppc_target::low_get_pc): ...this.
1608 (ppc_set_pc): Turn into...
1609 (ppc_target::low_set_pc): ...this.
1610 (the_low_target): Remove the op fields.
1611 * linux-riscv-low.cc (class riscv_target)
1612 <low_supports_breakpoints>
1613 <low_get_pc>
1614 <low_set_pc>: Declare.
1615 (riscv_target::low_supports_breakpoints): Define.
1616 (riscv_get_pc): Turn into...
1617 (riscv_target::low_get_pc): ...this.
1618 (riscv_set_pc): Turn into...
1619 (riscv_target::low_set_pc): ...this.
1620 (the_low_target): Remove the op fields.
1621 * linux-s390-low.cc (class s390_target)
1622 <low_supports_breakpoints>
1623 <low_get_pc>
1624 <low_set_pc>: Declare.
1625 (s390_target::low_supports_breakpoints): Define.
1626 (s390_get_pc): Turn into...
1627 (s390_target::low_get_pc): ...this.
1628 (s390_set_pc): Turn into...
1629 (s390_target::low_set_pc): ...this.
1630 (the_low_target): Remove the op fields.
1631 * linux-tic6x-low.cc (class tic6x_target)
1632 <low_supports_breakpoints>
1633 <low_get_pc>
1634 <low_set_pc>: Declare.
1635 (tic6x_target::low_supports_breakpoints): Define.
1636 (tic6x_get_pc): Turn into...
1637 (tic6x_target::low_get_pc): ...this.
1638 (tic6x_set_pc): Turn into...
1639 (tic6x_target::low_set_pc): ...this.
1640 (the_low_target): Remove the op fields.
1641
1642 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1643
1644 Turn some more static methods in linux-low into private methods
1645 of linux_process_target.
1646
1647 * linux-low.cc (get_pc): Turn into...
1648 (linux_process_target::get_pc): ...this.
1649 (save_stop_reason): Turn into...
1650 (linux_process_target::save_stop_reason): ...this.
1651 (thread_still_has_status_pending_p): Turn into...
1652 (linux_process_target::thread_still_has_status_pending): ...this.
1653 (status_pending_p_callback): Turn into...
1654 (linux_process_target::status_pending_p_callback): ...this.
1655 (resume_stopped_resumed_lwps): Turn into...
1656 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1657 (install_software_single_step_breakpoints): Turn into...
1658 (linux_process_target::install_software_single_step_breakpoints):
1659 ...this.
1660 (single_step): Turn into...
1661 (linux_process_target::single_step): ...this.
1662 (linux_resume_one_lwp_throw): Turn into...
1663 (linux_process_target::resume_one_lwp_throw): ...this.
1664 (linux_resume_one_lwp): Turn into...
1665 (linux_process_target::resume_one_lwp): ...this.
1666 (resume_status_pending_p): Turn into...
1667 (linux_process_target::resume_status_pending): ...this.
1668 (need_step_over_p): Turn into...
1669 (linux_process_target::thread_needs_step_over): ...this.
1670 (linux_resume_one_thread): Turn into...
1671 (linux_process_target::resume_one_thread): ...this.
1672 (proceed_one_lwp): Turn into...
1673 (linux_process_target::proceed_one_lwp): ...this.
1674 (unsuspend_and_proceed_one_lwp): Turn into...
1675 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1676
1677 Update the calls/references to the above functions below.
1678
1679 (linux_process_target::handle_extended_wait)
1680 (linux_process_target::filter_event)
1681 (linux_process_target::wait_for_event_filtered)
1682 (linux_process_target::wait_1)
1683 (linux_process_target::move_out_of_jump_pad)
1684 (linux_process_target::start_step_over)
1685 (linux_process_target::resume)
1686 (linux_process_target::proceed_all_lwps)
1687 (regsets_store_inferior_registers)
1688 (linux_process_target::store_register)
1689
1690 * linux-low.h (class linux_process_target)
1691 <get_pc>
1692 <save_stop_reason>
1693 <thread_still_has_status_pending>
1694 <status_pending_p_callback>
1695 <resume_stopped_resumed_lwps>
1696 <install_software_single_step_breakpoints>
1697 <single_step>
1698 <resume_one_lwp_throw>
1699 <resume_one_lwp>
1700 <resume_status_pending>
1701 <thread_needs_step_over>
1702 <resume_one_thread>
1703 <proceed_one_lwp>
1704 <unsuspend_and_proceed_one_lwp>: Declare.
1705
1706 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1707
1708 Turn the 'fetch_register' linux target op into a method of
1709 linux_process_target.
1710
1711 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1712 (class linux_process_target) <low_fetch_register>: Declare.
1713 * linux-x86-low.cc (the_low_target)
1714 * linux-aarch64-low.cc (the_low_target)
1715 * linux-arm-low.cc (the_low_target)
1716 * linux-bfin-low.cc (the_low_target)
1717 * linux-cris-low.cc (the_low_target)
1718 * linux-crisv32-low.cc (the_low_target)
1719 * linux-m32r-low.cc (the_low_target)
1720 * linux-m68k-low.cc (the_low_target)
1721 * linux-nios2-low.cc (the_low_target)
1722 * linux-ppc-low.cc (the_low_target)
1723 * linux-s390-low.cc (the_low_target)
1724 * linux-sh-low.cc (the_low_target)
1725 * linux-sparc-low.cc (the_low_target)
1726 * linux-tic6x-low.cc (the_low_target)
1727 * linux-tile-low.cc (the_low_target)
1728 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1729 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1730 Declare.
1731 (ia64_fetch_register): Turn into...
1732 (ia64_target::low_fetch_register): ...this.
1733 (the_low_target): Remove the op field.
1734 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1735 Declare.
1736 (mips_fetch_register): Turn into...
1737 (mips_target::low_fetch_register): ...this.
1738 (the_low_target): Remove the op field.
1739 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1740 Declare.
1741 (riscv_fetch_register): Turn into...
1742 (riscv_target::low_fetch_register): ...this.
1743 (the_low_target): Remove the op field.
1744
1745 Update the callers below.
1746
1747 * linux-low.cc (linux_process_target::fetch_registers)
1748 (linux_process_target::low_fetch_register)
1749
1750 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1751
1752 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1753 linux target ops into methods of linux_process_target.
1754
1755 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1756 (class linux_process_target) <fetch_register>
1757 <store_register>
1758 <usr_fetch_inferior_registers>
1759 <usr_store_inferior_registers>
1760 <low_cannot_fetch_register>
1761 <low_cannot_fetch_register> Declare.
1762 * linux-low.cc (fetch_register): Turn into...
1763 (linux_process_target::fetch_register): ...this.
1764 (store_register): Turn into ...
1765 (linux_process_target::store_register): ...this.
1766 (usr_fetch_inferior_registers): Turn into...
1767 (linux_process_target::usr_fetch_inferior_registers): ...this.
1768 (usr_store_inferior_registers): Turn into...
1769 (linux_process_target::usr_store_inferior_registers): ...this.
1770 * linux-x86-low.cc (class x86_target)
1771 <low_cannot_fetch_register>
1772 <low_cannot_store_register>: Declare.
1773 (x86_cannot_store_register): Turn into...
1774 (x86_target::low_cannot_store_register): ...this.
1775 (x86_cannot_fetch_register): Turn into...
1776 (x86_target::low_cannot_fetch_register): ...this.
1777 (the_low_target): Remove the target op fields.
1778 * linux-aarch64-low.cc (class aarch64_target)
1779 <low_cannot_fetch_register>
1780 <low_cannot_store_register>: Declare.
1781 (aarch64_target::low_cannot_fetch_register)
1782 (aarch64_target::low_cannot_store_register): Define.
1783 (the_low_target): Remove the op fields.
1784 * linux-arm-low.cc (class arm_target)
1785 <low_cannot_fetch_register>
1786 <low_cannot_store_register>: Declare.
1787 (arm_cannot_fetch_register): Turn into...
1788 (arm_target::low_cannot_fetch_register): ...this.
1789 (arm_cannot_store_register): Turn into...
1790 (arm_target::low_cannot_store_register): ...this.
1791 (the_low_target): Remove the op fields.
1792 * linux-bfin-low.cc (class bfin_target)
1793 <low_cannot_fetch_register>
1794 <low_cannot_store_register>: Declare.
1795 (bfin_cannot_fetch_register): Turn into...
1796 (bfin_target::low_cannot_fetch_register): ...this.
1797 (bfin_cannot_store_register): Turn into...
1798 (bfin_target::low_cannot_store_register): ...this.
1799 (the_low_target): Remove the op fields.
1800 * linux-cris-low.cc (class cris_target)
1801 <low_cannot_fetch_register>
1802 <low_cannot_store_register>: Declare.
1803 (cris_cannot_fetch_register): Turn into...
1804 (cris_target::low_cannot_fetch_register): ...this.
1805 (cris_cannot_store_register): Turn into...
1806 (cris_target::low_cannot_store_register): ...this.
1807 (the_low_target): Remove the op fields.
1808 * linux-crisv32-low.cc (class crisv32_target)
1809 <low_cannot_fetch_register>
1810 <low_cannot_store_register>: Declare.
1811 (crisv32_target::low_cannot_fetch_register)
1812 (crisv32_target::low_cannot_store_register): Define.
1813 (the_low_target): Remove the op fields.
1814 * linux-ia64-low.cc (class ia64_target)
1815 <low_cannot_fetch_register>
1816 <low_cannot_store_register>: Declare.
1817 (ia64_cannot_fetch_register): Turn into...
1818 (ia64_target::low_cannot_fetch_register): ...this.
1819 (ia64_cannot_store_register): Turn into...
1820 (ia64_target::low_cannot_store_register): ...this.
1821 (the_low_target): Remove the op fields.
1822 * linux-m32r-low.cc (class m32r_target)
1823 <low_cannot_fetch_register>
1824 <low_cannot_store_register>: Declare.
1825 (m32r_cannot_fetch_register): Turn into...
1826 (m32r_target::low_cannot_fetch_register): ...this.
1827 (m32r_cannot_store_register): Turn into...
1828 (m32r_target::low_cannot_store_register): ...this.
1829 (the_low_target): Remove the op fields.
1830 * linux-m68k-low.cc (class m68k_target)
1831 <low_cannot_fetch_register>
1832 <low_cannot_store_register>: Declare.
1833 (m68k_cannot_fetch_register): Turn into...
1834 (m68k_target::low_cannot_fetch_register): ...this.
1835 (m68k_cannot_store_register): Turn into...
1836 (m68k_target::low_cannot_store_register): ...this.
1837 (the_low_target): Remove the op fields.
1838 * linux-mips-low.cc (class mips_target)
1839 <low_cannot_fetch_register>
1840 <low_cannot_store_register>: Declare.
1841 (mips_cannot_fetch_register): Turn into...
1842 (mips_target::low_cannot_fetch_register): ...this.
1843 (mips_cannot_store_register): Turn into...
1844 (mips_target::low_cannot_store_register): ...this.
1845 (get_usrregs_info): Inline at the call sites in
1846 low_cannot_fetch_register and low_cannot_store_register,
1847 and remove.
1848 (the_low_target): Remove the op fields.
1849 * linux-nios2-low.cc (class nios2_target)
1850 <low_cannot_fetch_register>
1851 <low_cannot_store_register>: Declare.
1852 (nios2_cannot_fetch_register): Turn into...
1853 (nios2_target::low_cannot_fetch_register): ...this.
1854 (nios2_cannot_store_register): Turn into...
1855 (nios2_target::low_cannot_store_register): ...this.
1856 (the_low_target): Remove the op fields.
1857 * linux-ppc-low.cc (class ppc_target)
1858 <low_cannot_fetch_register>
1859 <low_cannot_store_register>: Declare.
1860 (ppc_cannot_fetch_register): Turn into...
1861 (ppc_target::low_cannot_fetch_register): ...this.
1862 (ppc_cannot_store_register): Turn into...
1863 (ppc_target::low_cannot_store_register): ...this.
1864 (the_low_target): Remove the op fields.
1865 * linux-riscv-low.cc (class riscv_target)
1866 <low_cannot_fetch_register>
1867 <low_cannot_store_register>: Declare.
1868 (riscv_target::low_cannot_fetch_register)
1869 (riscv_target::low_cannot_store_register): Define.
1870 (the_low_target): Remove the op fields.
1871 * linux-s390-low.cc (class s390_target)
1872 <low_cannot_fetch_register>
1873 <low_cannot_store_register>: Declare.
1874 (s390_cannot_fetch_register): Turn into...
1875 (s390_target::low_cannot_fetch_register): ...this.
1876 (s390_cannot_store_register): Turn into...
1877 (s390_target::low_cannot_store_register): ...this.
1878 (the_low_target): Remove the op fields.
1879 * linux-sh-low.cc (class sh_target)
1880 <low_cannot_fetch_register>
1881 <low_cannot_store_register>: Declare.
1882 (sh_cannot_fetch_register): Turn into...
1883 (sh_target::low_cannot_fetch_register): ...this.
1884 (sh_cannot_store_register): Turn into...
1885 (sh_target::low_cannot_store_register): ...this.
1886 (the_low_target): Remove the op fields.
1887 * linux-sparc-low.cc (class sparc_target)
1888 <low_cannot_fetch_register>
1889 <low_cannot_store_register>: Declare.
1890 (sparc_cannot_fetch_register): Turn into...
1891 (sparc_target::low_cannot_fetch_register): ...this.
1892 (sparc_cannot_store_register): Turn into...
1893 (sparc_target::low_cannot_store_register): ...this.
1894 (the_low_target): Remove the op fields.
1895 * linux-tic6x-low.cc (class tic6x_target)
1896 <low_cannot_fetch_register>
1897 <low_cannot_store_register>: Declare.
1898 (tic6x_cannot_fetch_register): Turn into...
1899 (tic6x_target::low_cannot_fetch_register): ...this.
1900 (tic6x_cannot_store_register): Turn into...
1901 (tic6x_target::low_cannot_store_register): ...this.
1902 (the_low_target): Remove the op fields.
1903 * linux-tile-low.cc (class tile_target)
1904 <low_cannot_fetch_register>
1905 <low_cannot_store_register>: Declare.
1906 (tile_cannot_fetch_register): Turn into...
1907 (tile_target::low_cannot_fetch_register): ...this.
1908 (tile_cannot_store_register): Turn into...
1909 (tile_target::low_cannot_store_register): ...this.
1910 (the_low_target): Remove the op fields.
1911 * linux-xtensa-low.cc (class xtensa_target)
1912 <low_cannot_fetch_register>
1913 <low_cannot_store_register>: Declare.
1914 (xtensa_target::low_cannot_fetch_register)
1915 (xtensa_target::low_cannot_store_register): Define.
1916 (the_low_target): Remove the op fields.
1917
1918 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1919
1920 Turn the 'regs_info' linux target op into a method of
1921 linux_process_target.
1922
1923 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1924 (class linux_process_target) <get_regs_info>: Define.
1925
1926 Update the callers below.
1927
1928 * linux-low.cc (linux_process_target::fetch_registers)
1929 (linux_process_target::store_registers)
1930 * proc-service.cc (gregset_info)
1931
1932 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1933 (x86_linux_regs_info): Turn into ...
1934 (x86_target::get_regs_info): ...this.
1935 (the_low_target): Remove the op field.
1936 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1937 Declare.
1938 (aarch64_regs_info): Turn into ...
1939 (aarch64_target::get_regs_info): ...this.
1940 (the_low_target): Remove the op field.
1941 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1942 (arm_regs_info): Turn into ...
1943 (arm_target::get_regs_info): ...this.
1944 (the_low_target): Remove the op field.
1945 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1946 (bfin_regs_info): Turn into ...
1947 (bfin_target::get_regs_info): ...this.
1948 (the_low_target): Remove the op field.
1949 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1950 (cris_regs_info): Turn into ...
1951 (cris_target::get_regs_info): ...this.
1952 (the_low_target): Remove the op field.
1953 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1954 Declare.
1955 (crisv32_regs_info): Turn into ...
1956 (crisv32_target::get_regs_info): ...this.
1957 (the_low_target): Remove the op field.
1958 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1959 (ia64_regs_info): Turn into ...
1960 (ia64_target::get_regs_info): ...this.
1961 (the_low_target): Remove the op field.
1962 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1963 (m32r_regs_info): Turn into ...
1964 (m32r_target::get_regs_info): ...this.
1965 (the_low_target): Remove the op field.
1966 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1967 (m68k_regs_info): Turn into ...
1968 (m68k_target::get_regs_info): ...this.
1969 (the_low_target): Remove the op field.
1970 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1971 (mips_regs_info): Turn into ...
1972 (mips_target::get_regs_info): ...this.
1973 (the_low_target): Remove the op field.
1974 (get_usrregs_info): Update the call to the op.
1975 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1976 (nios2_regs_info): Turn into ...
1977 (nios2_target::get_regs_info): ...this.
1978 (the_low_target): Remove the op field.
1979 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1980 (ppc_regs_info): Turn into ...
1981 (ppc_target::get_regs_info): ...this.
1982 (the_low_target): Remove the op field.
1983 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1984 (riscv_regs_info): Turn into ...
1985 (riscv_target::get_regs_info): ...this.
1986 (the_low_target): Remove the op field.
1987 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1988 (s390_regs_info): Turn into ...
1989 (s390_target::get_regs_info): ...this.
1990 (the_low_target): Remove the op field.
1991 (s390_collect_ptrace_register)
1992 (s390_supply_ptrace_register)
1993 (s390_fill_gregset): Update the call to the op.
1994 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1995 (sh_regs_info): Turn into ...
1996 (sh_target::get_regs_info): ...this.
1997 (the_low_target): Remove the op field.
1998 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1999 (sparc_regs_info): Turn into ...
2000 (sparc_target::get_regs_info): ...this.
2001 (the_low_target): Remove the op field.
2002 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2003 (tic6x_regs_info): Turn into ...
2004 (tic6x_target::get_regs_info): ...this.
2005 (the_low_target): Remove the op field.
2006 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2007 (tile_regs_info): Turn into ...
2008 (tile_target::get_regs_info): ...this.
2009 (the_low_target): Remove the op field.
2010 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2011 Declare.
2012 (xtensa_regs_info): Turn into ...
2013 (xtensa_target::get_regs_info): ...this.
2014 (the_low_target): Remove the op field.
2015
2016 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2017
2018 Turn the 'arch_setup' linux target op into a method of
2019 linux_process_target.
2020
2021 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2022 (class linux_process_target) <arch_setup_thread>
2023 <low_arch_setup>: New declarations.
2024 * linux-low.cc (linux_arch_setup): Delete.
2025 (linux_arch_setup_thread): Turn into...
2026 (linux_process_target::arch_setup_thread): ... this.
2027
2028 Update the callers below.
2029
2030 (linux_process_target::handle_extended_wait)
2031 (linux_process_target::post_create_inferior)
2032 (linux_process_target::filter_event)
2033
2034 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2035 declaration.
2036 (x86_linux_update_xmltarget): Turn into...
2037 (x86_target::update_xmltarget): ...this.
2038 (x86_linux_process_qsupported): Update the call to
2039 x86_linux_update_xmltarget.
2040 (x86_arch_setup): Turn into ...
2041 (x86_target::low_arch_setup): ...this.
2042 (the_low_target): Remove the op field.
2043 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2044 declaration.
2045 (aarch64_arch_setup): Turn into ...
2046 (aarch64_target::low_arch_setup): ...this.
2047 (the_low_target): Remove the op field.
2048 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2049 declaration.
2050 (arm_arch_setup): Turn into ...
2051 (arm_target::low_arch_setup): ...this.
2052 (the_low_target): Remove the op field.
2053 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2054 declaration.
2055 (bfin_arch_setup): Turn into ...
2056 (bfin_target::low_arch_setup): ...this.
2057 (the_low_target): Remove the op field.
2058 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2059 declaration.
2060 (cris_arch_setup): Turn into ...
2061 (cris_target::low_arch_setup): ...this.
2062 (the_low_target): Remove the op field.
2063 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2064 declaration.
2065 (crisv32_arch_setup): Turn into ...
2066 (crisv32_target::low_arch_setup): ...this.
2067 (the_low_target): Remove the op field.
2068 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2069 declaration.
2070 (ia64_arch_setup): Turn into ...
2071 (ia64_target::low_arch_setup): ...this.
2072 (the_low_target): Remove the op field.
2073 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2074 declaration.
2075 (m32r_arch_setup): Turn into ...
2076 (m32r_target::low_arch_setup): ...this.
2077 (the_low_target): Remove the op field.
2078 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2079 declaration.
2080 (m68k_arch_setup): Turn into ...
2081 (m68k_target::low_arch_setup): ...this.
2082 (the_low_target): Remove the op field.
2083 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2084 declaration.
2085 (mips_arch_setup): Turn into ...
2086 (mips_target::low_arch_setup): ...this.
2087 (the_low_target): Remove the op field.
2088 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2089 declaration.
2090 (nios2_arch_setup): Turn into ...
2091 (nios2_target::low_arch_setup): ...this.
2092 (the_low_target): Remove the op field.
2093 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2094 declaration.
2095 (ppc_arch_setup): Turn into ...
2096 (ppc_target::low_arch_setup): ...this.
2097 (the_low_target): Remove the op field.
2098 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2099 declaration.
2100 (riscv_arch_setup): Turn into ...
2101 (riscv_target::low_arch_setup): ...this.
2102 (the_low_target): Remove the op field.
2103 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2104 declaration.
2105 (s390_arch_setup): Turn into ...
2106 (s390_target::low_arch_setup): ...this.
2107 (the_low_target): Remove the op field.
2108 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2109 declaration.
2110 (sh_arch_setup): Turn into ...
2111 (sh_target::low_arch_setup): ...this.
2112 (the_low_target): Remove the op field.
2113 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2114 declaration.
2115 (sparc_arch_setup): Turn into ...
2116 (sparc_target::low_arch_setup): ...this.
2117 (the_low_target): Remove the op field.
2118 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2119 declaration.
2120 (tic6x_arch_setup): Turn into ...
2121 (tic6x_target::low_arch_setup): ...this.
2122 (the_low_target): Remove the op field.
2123 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2124 declaration.
2125 (tile_arch_setup): Turn into ...
2126 (tile_target::low_arch_setup): ...this.
2127 (the_low_target): Remove the op field.
2128 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2129 declaration.
2130 (xtensa_arch_setup): Turn into ...
2131 (xtensa_target::low_arch_setup): ...this.
2132 (the_low_target): Remove the op field.
2133
2134 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2135
2136 * linux-low.h (the_linux_target): New extern declaration.
2137 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2138 'the_target'.
2139 (the_linux_target): Remove.
2140 * linux-x86-low.cc (class x86_target): New class.
2141 (the_x86_target): New static object.
2142 (the_linux_target): Define as pointer to the_x86_target.
2143 * linux-aarch64-low.cc (class aarch64_target): New class.
2144 (the_aarch64_target): New static object.
2145 (the_linux_target): Define as pointer to the_aarch64_target.
2146 * linux-arm-low.cc (class arm_target): New class.
2147 (the_arm_target): New static object.
2148 (the_linux_target): Define as pointer to the_arm_target.
2149 * linux-bfin-low.cc (class bfin_target): New class.
2150 (the_bfin_target): New static object.
2151 (the_linux_target): Define as pointer to the_bfin_target.
2152 * linux-cris-low.cc (class cris_target): New class.
2153 (the_cris_target): New static object.
2154 (the_linux_target): Define as pointer to the_cris_target.
2155 * linux-crisv32-low.cc (class crisv32_target): New class.
2156 (the_crisv32_target): New static object.
2157 (the_linux_target): Define as pointer to the_crisv32_target.
2158 * linux-ia64-low.cc (class ia64_target): New class.
2159 (the_ia64_target): New static object.
2160 (the_linux_target): Define as pointer to the_ia64_target.
2161 * linux-m32r-low.cc (class m32r_target): New class.
2162 (the_m32r_target): New static object.
2163 (the_linux_target): Define as pointer to the_m32r_target.
2164 * linux-m68k-low.cc (class m68k_target): New class.
2165 (the_m68k_target): New static object.
2166 (the_linux_target): Define as pointer to the_m68k_target.
2167 * linux-mips-low.cc (class mips_target): New class.
2168 (the_mips_target): New static object.
2169 (the_linux_target): Define as pointer to the_mips_target.
2170 * linux-nios2-low.cc (class nios2_target): New class.
2171 (the_nios2_target): New static object.
2172 (the_linux_target): Define as pointer to the_nios2_target.
2173 * linux-ppc-low.cc (class ppc_target): New class.
2174 (the_ppc_target): New static object.
2175 (the_linux_target): Define as pointer to the_ppc_target.
2176 * linux-riscv-low.cc (class riscv_target): New class.
2177 (the_riscv_target): New static object.
2178 (the_linux_target): Define as pointer to the_riscv_target.
2179 * linux-s390-low.cc (class s390_target): New class.
2180 (the_s390_target): New static object.
2181 (the_linux_target): Define as pointer to the_s390_target.
2182 * linux-sh-low.cc (class sh_target): New class.
2183 (the_sh_target): New static object.
2184 (the_linux_target): Define as pointer to the_sh_target.
2185 * linux-sparc-low.cc (class sparc_target): New class.
2186 (the_sparc_target): New static object.
2187 (the_linux_target): Define as pointer to the_sparc_target.
2188 * linux-tic6x-low.cc (class tic6x_target): New class.
2189 (the_tic6x_target): New static object.
2190 (the_linux_target): Define as pointer to the_tic6x_target.
2191 * linux-tile-low.cc (class tile_target): New class.
2192 (the_tile_target): New static object.
2193 (the_linux_target): Define as pointer to the_tile_target.
2194 * linux-xtensa-low.cc (class xtensa_target): New class.
2195 (the_xtensa_target): New static object.
2196 (the_linux_target): Define as pointer to the_xtensa_target.
2197
2198 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2199
2200 Turn some static functions in linux-low.cc into private methods of
2201 linux_process_target.
2202
2203 * linux-low.cc (handle_extended_wait): Turn into ...
2204 (linux_process_target::handle_extended_wait): ...this. Call
2205 'mourn' on 'this' object instead of 'the_target'.
2206 (maybe_move_out_of_jump_pad): Turn into...
2207 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2208 (linux_low_filter_event): Turn into...
2209 (linux_process_target::filter_event): ...this.
2210 (linux_wait_for_event_filtered): Turn into...
2211 (linux_process_target::wait_for_event_filtered): ...this.
2212 (linux_wait_for_event): Turn into...
2213 (linux_process_target::wait_for_event): ...this.
2214 (linux_wait_1): Turn into...
2215 (linux_process_target::wait_1): ...this.
2216 (wait_for_sigstop): Turn into...
2217 (linux_process_target::wait_for_sigstop): ...this.
2218 (move_out_of_jump_pad_callback): Turn into...
2219 (linux_process_target::move_out_of_jump_pad): ...this.
2220 (stop_all_lwps): Turn into...
2221 (linux_process_target::stop_all_lwps): ...this.
2222 (start_step_over): Turn into...
2223 (linux_process_target::start_step_over): ...this.
2224 (complete_ongoing_step_over): Turn into...
2225 (linux_process_target::complete_ongoing_step_over): ...this.
2226 (proceed_all_lwps): Turn into...
2227 (linux_process_target::proceed_all_lwps): ...this.
2228 (unstop_all_lwps): Turn into...
2229 (linux_process_target::unstop_all_lwps): ...this.
2230
2231 * linux-low.h (class linux_process_target)
2232 <handle_extended_wait>
2233 <maybe_move_out_of_jump_pad>
2234 filter_event>
2235 <wait_for_event_filtered>
2236 <wait_for_event>
2237 <wait_1>
2238 <wait_for_sigstop>
2239 <move_out_of_jump_pad>
2240 <stop_all_lwps>
2241 <start_step_over>
2242 <complete_ongoing_step_over>
2243 <proceed_all_lwps>
2244 <unstop_all_lwps>: Declare.
2245
2246 Update the callers below.
2247
2248 * linux-low.cc (linux_process_target::attach): Update.
2249 (linux_process_target::stabilize_threads): Ditto.
2250 (linux_process_target::wait): Ditto.
2251
2252 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2253
2254 * linux-low.h (struct linux_target_ops): Update the comment for
2255 'cannot_store_register' to return 0 or 1.
2256 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2257 of 2.
2258
2259 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2260
2261 * config.in: Re-generate.
2262 * configure: Re-generate.
2263
2264 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2265
2266 * regcache.cc (find_register_by_number): Update.
2267 * tdesc.cc (init_target_desc): Likewise.
2268 * tdesc.h (target_desc::reg_defs): Likewise.
2269
2270 2020-03-12 Tom Tromey <tom@tromey.com>
2271
2272 * configure: Rebuild.
2273 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2274 (WIN32APILIBS): New subst.
2275 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2276 gdbsupport files.
2277 (gdbsupport/%.o): Remove target.
2278 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2279 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2280 (WIN32APILIBS): New variable.
2281 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2282 (gdbreplay$(EXEEXT)): Likewise.
2283
2284 2020-03-12 Tom Tromey <tom@tromey.com>
2285
2286 * config.in, configure: Rebuild.
2287 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2288 * acinclude.m4: Include gettext-sister.m4.
2289 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2290 variables.
2291 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2292 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2293
2294 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2295
2296 * acinclude.m4: Update path to selftest.m4.
2297
2298 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2299
2300 * configure.ac: Don't source bfd/development.sh, move
2301 GDB_AC_COMMON higher.
2302 * configure: Re-generate.
2303
2304 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2305
2306 * configure: Re-generate.
2307
2308 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2309
2310 * configure: Re-generate.
2311
2312 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2313
2314 * .dir-locals.el: New file.
2315
2316 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2317
2318 * .gitattributes: New file.
2319
2320 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2321
2322 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2323 reply into an S reply.
2324 * server.cc (disable_packet_T): New global.
2325 (captured_main): Set new global when appropriate.
2326 * server.h (disable_packet_T): Declare.
2327
2328 2020-02-21 Tom Tromey <tom@tromey.com>
2329
2330 * Makefile.in (mostlyclean): New target.
2331
2332 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2333
2334 * target.h (struct process_stratum_target): Remove.
2335 (class process_target): Rename to ...
2336 (class process_stratum_target): ... this.
2337 * linux-low.h (class linux_process_target): Derive from
2338 'process_stratum_target'.
2339 * linux-low.cc (linux_target_ops): Remove.
2340 (initialize_low): Set the_target to the singleton instance of
2341 linux_process_target.
2342 * lynx-low.h (class lynx_process_target): Derive from
2343 'process_stratum_target'.
2344 * lynx-low.cc (lynx_target_ops): Remove.
2345 (initialize_low): Set the_target to the singleton instance of
2346 lynx_process_target.
2347 * nto-low.h (class nto_process_target): Derive from
2348 'process_stratum_target'.
2349 * nto-low.cc (nto_target_ops): Remove.
2350 (initialize_low): Set the_target to the singleton instance of
2351 nto_process_target.
2352 * win32-low.h (class win32_process_target): Derive from
2353 'process_stratum_target'.
2354 * win32-low.cc (win32_target_ops): Remove.
2355 (initialize_low): Set the_target to the singleton instance of
2356 win32_process_target.
2357
2358 Replace 'the_target->pt' with 'the_target' in the uses below.
2359
2360 * hostio.cc (hostio_error)
2361 (handle_setfs)
2362 (handle_open)
2363 (handle_unlink)
2364 (handle_readlink)
2365 * linux-aarch32-low.cc (arm_breakpoint_at)
2366 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2367 * linux-arm-low.cc (arm_sigreturn_next_pc)
2368 (arm_get_hwcap)
2369 (arm_get_syscall_trapinfo)
2370 * linux-cris-low.cc (cris_breakpoint_at)
2371 * linux-crisv32-low.cc (cris_breakpoint_at)
2372 * linux-low.cc (handle_extended_wait)
2373 (linux_wait_1)
2374 (linux_read_memory)
2375 (linux_process_target::breakpoint_kind_from_pc)
2376 (linux_get_auxv)
2377 * linux-m32r-low.cc (m32r_breakpoint_at)
2378 * linux-mips-low.cc (mips_breakpoint_at)
2379 * linux-nios2-low.cc (nios2_breakpoint_at)
2380 * linux-ppc-low.cc (ppc_breakpoint_at)
2381 * linux-s390-low.cc (s390_get_hwcap)
2382 * linux-sh-low.cc (sh_breakpoint_at)
2383 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2384 (sparc_store_gregset_from_stack)
2385 (sparc_breakpoint_at)
2386 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2387 * linux-tile-low.cc (tile_breakpoint_at)
2388 * linux-x86-low.cc (x86_breakpoint_at)
2389 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2390 * mem-break.cc (bp_size)
2391 (bp_opcode)
2392 (insert_memory_breakpoint)
2393 (set_raw_breakpoint_at)
2394 (delete_raw_breakpoint)
2395 (z_type_supported)
2396 (uninsert_raw_breakpoint)
2397 (reinsert_raw_breakpoint)
2398 (validate_inserted_breakpoint)
2399 * regcache.cc (regcache_read_pc)
2400 (regcache_write_pc)
2401 * remote-utils.cc (putpkt_binary_1)
2402 (input_interrupt)
2403 (getpkt)
2404 (prepare_resume_reply)
2405 * server.cc (handle_general_set)
2406 (handle_detach)
2407 (handle_qxfer_auxv)
2408 (handle_qxfer_exec_file)
2409 (handle_qxfer_libraries_svr4)
2410 (handle_qxfer_osdata)
2411 (handle_qxfer_siginfo)
2412 (handle_qxfer_fdpic)
2413 (handle_query)
2414 (resume)
2415 (handle_v_requests)
2416 (queue_stop_reply_callback)
2417 (captured_main)
2418 * target.cc (prepare_to_access_memory)
2419 (done_accessing_memory)
2420 (read_inferior_memory)
2421 (target_write_memory)
2422 (target_stop_and_wait)
2423 (target_wait)
2424 (target_mourn_inferior)
2425 (target_continue_no_signal)
2426 (target_continue)
2427 (target_supports_multi_process)
2428 (kill_inferior)
2429 * target.h
2430 (target_create_inferior)
2431 (target_post_create_inferior)
2432 (myattach)
2433 (target_supports_fork_events)
2434 (target_supports_vfork_events)
2435 (target_supports_exec_events)
2436 (target_handle_new_gdb_connection)
2437 (detach_inferior)
2438 (mythread_alive)
2439 (fetch_inferior_registers)
2440 (store_inferior_registers)
2441 (join_inferior)
2442 (target_supports_non_stop)
2443 (target_async)
2444 (target_process_qsupported)
2445 (target_supports_catch_syscall)
2446 (target_get_ipa_tdesc_idx)
2447 (target_supports_tracepoints)
2448 (target_supports_fast_tracepoints)
2449 (target_get_min_fast_tracepoint_insn_len)
2450 (target_thread_stopped)
2451 (target_pause_all)
2452 (target_unpause_all)
2453 (target_stabilize_threads)
2454 (target_install_fast_tracepoint_jump_pad)
2455 (target_emit_ops)
2456 (target_supports_disable_randomization)
2457 (target_supports_agent)
2458 (target_enable_btrace)
2459 (target_disable_btrace)
2460 (target_read_btrace)
2461 (target_read_btrace_conf)
2462 (target_supports_range_stepping)
2463 (target_supports_stopped_by_sw_breakpoint)
2464 (target_stopped_by_sw_breakpoint)
2465 (target_supports_stopped_by_hw_breakpoint)
2466 (target_supports_hardware_single_step)
2467 (target_stopped_by_hw_breakpoint)
2468 (target_breakpoint_kind_from_pc)
2469 (target_breakpoint_kind_from_current_state)
2470 (target_supports_software_single_step)
2471 (target_core_of_thread)
2472 (target_thread_name)
2473 (target_thread_handle)
2474 * win32-low.cc (do_initial_child_stuff)
2475
2476 Rename target op default definitions listed below.
2477
2478 * target.cc (process_target::post_create_inferior): Rename as ...
2479 (process_stratum_target::post_create_inferior): ... this.
2480 (process_target::prepare_to_access_memory): Rename as ...
2481 (process_stratum_target::prepare_to_access_memory): ... this.
2482 (process_target::done_accessing_memory): Rename as ...
2483 (process_stratum_target::done_accessing_memory): ... this.
2484 (process_target::look_up_symbols): Rename as ...
2485 (process_stratum_target::look_up_symbols): ... this.
2486 (process_target::supports_read_auxv): Rename as ...
2487 (process_stratum_target::supports_read_auxv): ... this.
2488 (process_target::read_auxv): Rename as ...
2489 (process_stratum_target::read_auxv): ... this.
2490 (process_target::supports_z_point_type): Rename as ...
2491 (process_stratum_target::supports_z_point_type): ... this.
2492 (process_target::insert_point): Rename as ...
2493 (process_stratum_target::insert_point): ... this.
2494 (process_target::remove_point): Rename as ...
2495 (process_stratum_target::remove_point): ... this.
2496 (process_target::stopped_by_sw_breakpoint): Rename as ...
2497 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2498 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2499 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2500 (process_target::stopped_by_hw_breakpoint): Rename as ...
2501 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2502 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2503 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2504 (process_target::supports_hardware_single_step): Rename as ...
2505 (process_stratum_target::supports_hardware_single_step): ... this.
2506 (process_target::stopped_by_watchpoint): Rename as ...
2507 (process_stratum_target::stopped_by_watchpoint): ... this.
2508 (process_target::stopped_data_address): Rename as ...
2509 (process_stratum_target::stopped_data_address): ... this.
2510 (process_target::supports_read_offsets): Rename as ...
2511 (process_stratum_target::supports_read_offsets): ... this.
2512 (process_target::read_offsets): Rename as ...
2513 (process_stratum_target::read_offsets): ... this.
2514 (process_target::supports_get_tls_address): Rename as ...
2515 (process_stratum_target::supports_get_tls_address): ... this.
2516 (process_target::get_tls_address): Rename as ...
2517 (process_stratum_target::get_tls_address): ... this.
2518 (process_target::hostio_last_error): Rename as ...
2519 (process_stratum_target::hostio_last_error): ... this.
2520 (process_target::supports_qxfer_osdata): Rename as ...
2521 (process_stratum_target::supports_qxfer_osdata): ... this.
2522 (process_target::qxfer_osdata): Rename as ...
2523 (process_stratum_target::qxfer_osdata): ... this.
2524 (process_target::supports_qxfer_siginfo): Rename as ...
2525 (process_stratum_target::supports_qxfer_siginfo): ... this.
2526 (process_target::qxfer_siginfo): Rename as ...
2527 (process_stratum_target::qxfer_siginfo): ... this.
2528 (process_target::supports_non_stop): Rename as ...
2529 (process_stratum_target::supports_non_stop): ... this.
2530 (process_target::async): Rename as ...
2531 (process_stratum_target::async): ... this.
2532 (process_target::start_non_stop): Rename as ...
2533 (process_stratum_target::start_non_stop): ... this.
2534 (process_target::supports_multi_process): Rename as ...
2535 (process_stratum_target::supports_multi_process): ... this.
2536 (process_target::supports_fork_events): Rename as ...
2537 (process_stratum_target::supports_fork_events): ... this.
2538 (process_target::supports_vfork_events): Rename as ...
2539 (process_stratum_target::supports_vfork_events): ... this.
2540 (process_target::supports_exec_events): Rename as ...
2541 (process_stratum_target::supports_exec_events): ... this.
2542 (process_target::handle_new_gdb_connection): Rename as ...
2543 (process_stratum_target::handle_new_gdb_connection): ... this.
2544 (process_target::handle_monitor_command): Rename as ...
2545 (process_stratum_target::handle_monitor_command): ... this.
2546 (process_target::core_of_thread): Rename as ...
2547 (process_stratum_target::core_of_thread): ... this.
2548 (process_target::supports_read_loadmap): Rename as ...
2549 (process_stratum_target::supports_read_loadmap): ... this.
2550 (process_target::read_loadmap): Rename as ...
2551 (process_stratum_target::read_loadmap): ... this.
2552 (process_target::process_qsupported): Rename as ...
2553 (process_stratum_target::process_qsupported): ... this.
2554 (process_target::supports_tracepoints): Rename as ...
2555 (process_stratum_target::supports_tracepoints): ... this.
2556 (process_target::read_pc): Rename as ...
2557 (process_stratum_target::read_pc): ... this.
2558 (process_target::write_pc): Rename as ...
2559 (process_stratum_target::write_pc): ... this.
2560 (process_target::supports_thread_stopped): Rename as ...
2561 (process_stratum_target::supports_thread_stopped): ... this.
2562 (process_target::thread_stopped): Rename as ...
2563 (process_stratum_target::thread_stopped): ... this.
2564 (process_target::supports_get_tib_address): Rename as ...
2565 (process_stratum_target::supports_get_tib_address): ... this.
2566 (process_target::get_tib_address): Rename as ...
2567 (process_stratum_target::get_tib_address): ... this.
2568 (process_target::pause_all): Rename as ...
2569 (process_stratum_target::pause_all): ... this.
2570 (process_target::unpause_all): Rename as ...
2571 (process_stratum_target::unpause_all): ... this.
2572 (process_target::stabilize_threads): Rename as ...
2573 (process_stratum_target::stabilize_threads): ... this.
2574 (process_target::supports_fast_tracepoints): Rename as ...
2575 (process_stratum_target::supports_fast_tracepoints): ... this.
2576 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2577 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2578 (process_target::emit_ops): Rename as ...
2579 (process_stratum_target::emit_ops): ... this.
2580 (process_target::supports_disable_randomization): Rename as ...
2581 (process_stratum_target::supports_disable_randomization): ... this.
2582 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2583 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2584 (process_target::qxfer_libraries_svr4): Rename as ...
2585 (process_stratum_target::qxfer_libraries_svr4): ... this.
2586 (process_target::supports_agent): Rename as ...
2587 (process_stratum_target::supports_agent): ... this.
2588 (process_target::enable_btrace): Rename as ...
2589 (process_stratum_target::enable_btrace): ... this.
2590 (process_target::disable_btrace): Rename as ...
2591 (process_stratum_target::disable_btrace): ... this.
2592 (process_target::read_btrace): Rename as ...
2593 (process_stratum_target::read_btrace): ... this.
2594 (process_target::read_btrace_conf): Rename as ...
2595 (process_stratum_target::read_btrace_conf): ... this.
2596 (process_target::supports_range_stepping): Rename as ...
2597 (process_stratum_target::supports_range_stepping): ... this.
2598 (process_target::supports_pid_to_exec_file): Rename as ...
2599 (process_stratum_target::supports_pid_to_exec_file): ... this.
2600 (process_target::pid_to_exec_file): Rename as ...
2601 (process_stratum_target::pid_to_exec_file): ... this.
2602 (process_target::supports_multifs): Rename as ...
2603 (process_stratum_target::supports_multifs): ... this.
2604 (process_target::multifs_open): Rename as ...
2605 (process_stratum_target::multifs_open): ... this.
2606 (process_target::multifs_unlink): Rename as ...
2607 (process_stratum_target::multifs_unlink): ... this.
2608 (process_target::multifs_readlink): Rename as ...
2609 (process_stratum_target::multifs_readlink): ... this.
2610 (process_target::breakpoint_kind_from_pc): Rename as ...
2611 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2612 (process_target::breakpoint_kind_from_current_state): Rename as ...
2613 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2614 (process_target::thread_name): Rename as ...
2615 (process_stratum_target::thread_name): ... this.
2616 (process_target::thread_handle): Rename as ...
2617 (process_stratum_target::thread_handle): ... this.
2618 (process_target::supports_software_single_step): Rename as ...
2619 (process_stratum_target::supports_software_single_step): ... this.
2620 (process_target::supports_catch_syscall): Rename as ...
2621 (process_stratum_target::supports_catch_syscall): ... this.
2622 (process_target::get_ipa_tdesc_idx): Rename as ...
2623 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2624
2625 2020-02-20 Pedro Alves <palves@redhat.com>
2626
2627 * target.cc (set_target_ops): Simply copy the given target pointer
2628 instead of creating a copy of the pointed object.
2629
2630 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2631
2632 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2633 of process_target.
2634
2635 * target.h (struct process_stratum_target): Remove the target op.
2636 (class process_target): Add the target op.
2637 (target_get_ipa_tdesc_idx): Update the macro.
2638 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2639
2640 Update the derived classes and callers below.
2641
2642 * linux-low.cc (linux_target_ops): Update.
2643 (linux_get_ipa_tdesc_idx): Turn into ...
2644 (linux_process_target::get_ipa_tdesc_idx): ... this.
2645 * linux-low.h (class linux_process_target): Update.
2646 * lynx-low.cc (lynx_target_ops): Update.
2647 * nto-low.cc (nto_target_ops): Update.
2648 * win32-low.cc (win32_target_ops): Update.
2649
2650 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2651
2652 Turn process_stratum_target's supports_catch_syscall op into a
2653 method of process_target.
2654
2655 * target.h (struct process_stratum_target): Remove the target op.
2656 (class process_target): Add the target op.
2657 (target_supports_catch_syscall): Update the macro.
2658 * target.cc (process_target::supports_catch_syscall): Define.
2659
2660 Update the derived classes and callers below.
2661
2662 * linux-low.cc (linux_target_ops): Update.
2663 (linux_supports_catch_syscall): Turn into ...
2664 (linux_process_target::supports_catch_syscall): ... this.
2665 * linux-low.h (class linux_process_target): Update.
2666 * lynx-low.cc (lynx_target_ops): Update.
2667 * nto-low.cc (nto_target_ops): Update.
2668 * win32-low.cc (win32_target_ops): Update.
2669
2670 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2671
2672 Turn process_stratum_target's supports_software_single_step op
2673 into a method of process_target.
2674
2675 * target.h (struct process_stratum_target): Remove the target op.
2676 (class process_target): Add the target op.
2677 (target_supports_software_single_step): Update the macro.
2678 * target.cc (process_target::supports_software_single_step): Define.
2679
2680 Update the derived classes and callers below.
2681
2682 * linux-low.cc (linux_target_ops): Update.
2683 (linux_supports_software_single_step): Turn into ...
2684 (linux_process_target::supports_software_single_step): ... this.
2685 * linux-low.h (class linux_process_target): Update.
2686 * lynx-low.cc (lynx_target_ops): Update.
2687 * nto-low.cc (nto_target_ops): Update.
2688 * win32-low.cc (win32_target_ops): Update.
2689
2690 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2691
2692 Turn process_stratum_target's thread_name and thread_handle ops
2693 into methods of process_target.
2694
2695 * target.h (struct process_stratum_target): Remove the target ops.
2696 (class process_target): Add the target ops.
2697 (target_thread_name): Update the macro.
2698 (target_thread_handle): Update the macro.
2699 * target.cc (process_target::thread_name): Define.
2700 (process_target::thread_handle): Define.
2701
2702 Update the derived classes and callers below.
2703
2704 * linux-low.cc (linux_target_ops): Update.
2705 (linux_process_target::thread_name): Define.
2706 (linux_process_target::thread_handle): Define.
2707 * linux-low.h (class linux_process_target): Update.
2708 * lynx-low.cc (lynx_target_ops): Update.
2709 * nto-low.cc (nto_target_ops): Update.
2710 * win32-low.cc (win32_target_ops): Update.
2711
2712 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2713
2714 Turn process_stratum_target's breakpoint_kind_from_pc,
2715 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2716 ops into methods of process_target.
2717
2718 * target.h (struct process_stratum_target): Remove the target op.
2719 (class process_target): Add the target op.
2720 (target_breakpoint_kind_from_pc): Update the macro.
2721 (target_breakpoint_kind_from_current_state): Update the macro.
2722 (default_breakpoint_kind_from_pc): Remove declaration.
2723 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2724 (process_target::breakpoint_kind_from_pc): ... this.
2725 (process_target::breakpoint_kind_from_current_state): Define.
2726
2727 Update the derived classes and callers below.
2728
2729 * mem-break.cc (bp_size): Update.
2730 (bp_opcode): Update.
2731 * linux-low.cc (linux_target_ops): Update.
2732 (linux_wait_1): Update.
2733 (linux_breakpoint_kind_from_pc): Turn into ...
2734 (linux_process_target::breakpoint_kind_from_pc): ... this.
2735 (linux_sw_breakpoint_from_kind): Turn into ...
2736 (linux_process_target::sw_breakpoint_from_kind): ... this.
2737 (linux_breakpoint_kind_from_current_state): Turn into ...
2738 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2739 * linux-low.h (class linux_process_target): Update.
2740 * lynx-low.cc (lynx_target_ops): Update.
2741 (lynx_process_target::sw_breakpoint_from_kind): Define.
2742 * lynx-low.h (class lynx_process_target): Update.
2743 * nto-low.cc (nto_target_ops): Update.
2744 (nto_sw_breakpoint_from_kind): Turn into ...
2745 (nto_process_target::sw_breakpoint_from_kind): ... this.
2746 * nto-low.h (class nto_process_target): Update.
2747 * win32-low.cc (win32_target_ops): Update.
2748 (win32_sw_breakpoint_from_kind): Turn into ...
2749 (win32_process_target::sw_breakpoint_from_kind): ... this.
2750 * win32-low.h (class win32_process_target): Update.
2751
2752 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2753
2754 Turn process_stratum_target's multifs_open, multifs_readlink,
2755 multifs_unlink ops into methods of process_target.
2756
2757 * target.h (struct process_stratum_target): Remove the target ops.
2758 (class process_target): Add the target ops. Also add
2759 'supports_multifs'.
2760 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2761 "sys/stat.h".
2762 (process_target::supports_multifs): Define.
2763 (process_target::multifs_open): Define.
2764 (process_target::multifs_readlink): Define.
2765 (process_target::multifs_unlink): Define.
2766
2767 Update the derived classes and callers below.
2768
2769 * hostio.cc (handle_setfs): Update.
2770 (handle_open): Update.
2771 (handle_unlink): Update.
2772 (handle_readlink): Update.
2773 * linux-low.cc (linux_target_ops): Update.
2774 (linux_process_target::supports_multifs): Define.
2775 (linux_process_target::multifs_open): Define.
2776 (linux_process_target::multifs_readlink): Define.
2777 (linux_process_target::multifs_unlink): Define.
2778 * linux-low.h (class linux_process_target): Update.
2779 * lynx-low.cc (lynx_target_ops): Update.
2780 * nto-low.cc (nto_target_ops): Update.
2781 * win32-low.cc (win32_target_ops): Update.
2782
2783 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2784
2785 Turn process_stratum_target's pid_to_exec_file op into a method
2786 of process_target.
2787
2788 * target.h (struct process_stratum_target): Remove the target op.
2789 (class process_target): Add the target op. Also add
2790 'supports_pid_to_exec_file'.
2791 * target.cc (process_target::pid_to_exec_file): Define.
2792 (process_target::supports_pid_to_exec_file): Define.
2793
2794 Update the derived classes and callers below.
2795
2796 * server.cc (handle_qxfer_exec_file): Update.
2797 (handle_query): Update.
2798 * linux-low.cc (linux_target_ops): Update.
2799 (linux_process_target::supports_pid_to_exec_file): Define.
2800 (linux_process_target::pid_to_exec_file): Define.
2801 * linux-low.h (class linux_process_target): Update.
2802 * lynx-low.cc (lynx_target_ops): Update.
2803 * nto-low.cc (nto_target_ops): Update.
2804 * win32-low.cc (win32_target_ops): Update.
2805
2806 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2807
2808 Turn process_stratum_target's supports_range_stepping op into a
2809 method of process_target.
2810
2811 * target.h (struct process_stratum_target): Remove the target op.
2812 (class process_target): Add the target op.
2813 (target_supports_range_stepping): Update the macro.
2814 * target.cc (process_target::supports_range_stepping): Define.
2815
2816 Update the derived classes and callers below.
2817
2818 * linux-low.cc (linux_target_ops): Update.
2819 (linux_supports_range_stepping): Turn into ...
2820 (linux_process_target::supports_range_stepping): ... this.
2821 * linux-low.h (class linux_process_target): Update.
2822 * lynx-low.cc (lynx_target_ops): Update.
2823 * nto-low.cc (nto_target_ops): Update.
2824 * win32-low.cc (win32_target_ops): Update.
2825
2826 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2827
2828 Turn process_stratum_target's btrace-related ops (enable_btrace,
2829 disable_btrace, read_btrace, read_btrace_conf) into methods of
2830 process_target.
2831
2832 * target.h (struct process_stratum_target): Remove the target ops.
2833 (class process_target): Add the target ops.
2834 (target_enable_btrace): Update.
2835 (target_disable_btrace): Update.
2836 (target_read_btrace): Update.
2837 (target_read_btrace_conf): Update.
2838 * target.cc (process_target::enable_btrace): Define.
2839 (process_target::disable_btrace): Define.
2840 (process_target::read_btrace): Define.
2841 (process_target::read_btrace_conf): Define.
2842
2843 Update the derived classes and callers below.
2844
2845 * linux-low.cc (linux_target_ops): Update.
2846 (linux_process_target:enable_btrace): Define as a wrapper around
2847 linux_enable_btrace.
2848 (linux_low_disable_btrace): Turn into ...
2849 (linux_process_target::disable_btrace): ... this.
2850 (linux_low_read_btrace): Turn into ...
2851 (linux_process_target::read_btrace): ... this.
2852 (linux_low_btrace_conf): Turn into ...
2853 (linux_process_target::read_btrace_conf): ... 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 supports_agent op into a method of
2862 process_target.
2863
2864 * target.h (struct process_stratum_target): Remove the target op.
2865 (class process_target): Add the target op.
2866 (target_supports_agent): Update the macro.
2867 * target.cc (process_target::supports_agent): Define.
2868
2869 Update the derived classes and callers below.
2870
2871 * linux-low.cc (linux_target_ops): Update.
2872 (linux_supports_agent): Turn into ...
2873 (linux_process_target::supports_agent): ... this.
2874 * linux-low.h (class linux_process_target): Update.
2875 * lynx-low.cc (lynx_target_ops): Update.
2876 * nto-low.cc (nto_target_ops): Update.
2877 * win32-low.cc (win32_target_ops): Update.
2878
2879 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2880
2881 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2882 method of process_target.
2883
2884 * target.h (struct process_stratum_target): Remove the target op.
2885 (class process_target): Add the target op. Also add
2886 'supports_qxfer_libraries_svr4'.
2887 * target.cc (process_target::qxfer_libraries_svr4): Define.
2888 (process_target::supports_qxfer_libraries_svr4): Define.
2889
2890 Update the derived classes and callers below.
2891
2892 * server.cc (handle_qxfer_libraries_svr4): Update.
2893 (handle_query): Update.
2894 * linux-low.cc (linux_target_ops): Update.
2895 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2896 (linux_qxfer_libraries_svr4): Turn into ...
2897 (linux_process_target::qxfer_libraries_svr4): ... this.
2898 * linux-low.h (class linux_process_target): Update.
2899 * lynx-low.cc (lynx_target_ops): Update.
2900 * nto-low.cc (nto_target_ops): Update.
2901 * win32-low.cc (win32_target_ops): Update.
2902
2903 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2904
2905 Turn process_stratum_target's supports_disable_randomization op
2906 into a method of process_target.
2907
2908 * target.h (struct process_stratum_target): Remove the target op.
2909 (class process_target): Add the target op.
2910 (target_supports_disable_randomization): Update the macro.
2911 * target.cc (process_target::supports_disable_randomization): Define.
2912
2913 Update the derived classes and callers below.
2914
2915 * linux-low.cc (linux_target_ops): Update.
2916 (linux_supports_disable_randomization): Turn into ...
2917 (linux_process_target::supports_disable_randomization): ... this.
2918 * linux-low.h (class linux_process_target): Update.
2919 * lynx-low.cc (lynx_target_ops): Update.
2920 * nto-low.cc (nto_target_ops): Update.
2921 * win32-low.cc (win32_target_ops): Update.
2922
2923 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2924
2925 Turn process_stratum_target's emit_ops op into a method of
2926 process_target.
2927
2928 * target.h (struct process_stratum_target): Remove the target op.
2929 (class process_target): Add the target op.
2930 (target_emit_ops): Update the macro.
2931 * target.cc (process_target::emit_ops): Define.
2932
2933 Update the derived classes and callers below.
2934
2935 * linux-low.cc (linux_target_ops): Update.
2936 (linux_emit_ops): Turn into ...
2937 (linux_process_target::emit_ops): ... this.
2938 * linux-low.h (class linux_process_target): Update.
2939 * lynx-low.cc (lynx_target_ops): Update.
2940 * nto-low.cc (nto_target_ops): Update.
2941 * win32-low.cc (win32_target_ops): Update.
2942
2943 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2944
2945 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2946 and get_min_fast_tracepoint_insn_len ops into methods of
2947 process_target.
2948
2949 * target.h (struct process_stratum_target): Remove the target ops.
2950 (class process_target): Add the target ops. Also add
2951 'supports_fast_tracepoints'.
2952 (target_supports_fast_tracepoints): Update the macro.
2953 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2954 (install_fast_tracepoint_jump_pad): Update and rename the macro
2955 to ...
2956 (target_install_fast_tracepoint_jump_pad): ... this.
2957 * target.cc (process_target::supports_fast_tracepoints): Define.
2958 (process_target::install_fast_tracepoint_jump_pad): Define.
2959 (process_target::get_min_fast_tracepoint_insn_len): Define.
2960
2961 Update the derived classes and callers below.
2962
2963 * tracepoint.cc (install_fast_tracepoint): Update.
2964 * linux-low.cc (linux_target_ops): Update.
2965 (linux_process_target::supports_fast_tracepoints): Define.
2966 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2967 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2968 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2969 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2970 * linux-low.h (class linux_process_target): Update.
2971 * lynx-low.cc (lynx_target_ops): Update.
2972 * nto-low.cc (nto_target_ops): Update.
2973 * win32-low.cc (win32_target_ops): Update.
2974
2975 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2976
2977 Turn process_stratum_target's stabilize_threads op into a
2978 method of process_target.
2979
2980 * target.h (struct process_stratum_target): Remove the target op.
2981 (class process_target): Add the target op.
2982 (target_stabilize_threads): Update the macro.
2983 * target.cc (process_target::stabilize_threads): Define.
2984
2985 Update the derived classes and callers below.
2986
2987 * server.cc (handle_status): Update.
2988 * tracepoint.cc (cmd_qtdp): Update.
2989 (cmd_qtstart): Update.
2990 * linux-low.cc (linux_target_ops): Update.
2991 (linux_stabilize_threads): Turn into ...
2992 (linux_process_target::stabilize_threads): ... this.
2993 (linux_wait_1): Update.
2994 * linux-low.h (class linux_process_target): Update.
2995 * lynx-low.cc (lynx_target_ops): Update.
2996 * nto-low.cc (nto_target_ops): Update.
2997 * win32-low.cc (win32_target_ops): Update.
2998
2999 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3000
3001 Turn process_stratum_target's pause_all and unpause_all ops
3002 into methods of process_target.
3003
3004 * target.h (struct process_stratum_target): Remove the target ops.
3005 (class process_target): Add the target ops.
3006 (pause_all): Update the macro and rename to...
3007 (target_pause_all): ... this.
3008 (unpause_all): Update the macro and rename to...
3009 (target_unpause_all): ... this.
3010 * target.cc (process_target::pause_all): Define.
3011 (process_target::unpause_all): Define.
3012
3013 Update the derived classes and callers below.
3014
3015 * server.cc (handle_status): Update.
3016 * tracepoint.cc (clear_installed_tracepoints): Update.
3017 (cmd_qtdp): Update.
3018 (cmd_qtstart): Update.
3019 (stop_tracing): Update.
3020 (cmd_qtstatus): Update.
3021 (upload_fast_traceframes): Update.
3022 (run_inferior_command): Update.
3023 * linux-low.cc (linux_target_ops): Update.
3024 (linux_pause_all): Turn into ...
3025 (linux_process_target::pause_all): ... this.
3026 (linux_unpause_all): Turn into ...
3027 (linux_process_target::unpause_all): ... this.
3028 (linux_process_target::prepare_to_access_memory): Update.
3029 (linux_process_target::done_accessing_memory): Update.
3030 * linux-low.h (class linux_process_target): Update.
3031 * lynx-low.cc (lynx_target_ops): Update.
3032 * nto-low.cc (nto_target_ops): Update.
3033 * win32-low.cc (win32_target_ops): Update.
3034
3035 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3036
3037 Turn process_stratum_target's get_tib_address op into a method of
3038 process_target.
3039
3040 * target.h (struct process_stratum_target): Remove the target op.
3041 (class process_target): Add the target op. Also add
3042 'supports_get_tib_address'.
3043 * target.cc (process_target::get_tib_address): Define.
3044 (process_target::supports_get_tib_address): Define.
3045
3046 Update the derived classes and callers below.
3047
3048 * server.cc (handle_query): Update.
3049 * linux-low.cc (win32_target_ops): Update.
3050 * lynx-low.cc (lynx_target_ops): Update.
3051 * nto-low.cc (nto_target_ops): Update.
3052 * win32-low.cc (win32_target_ops): Update.
3053 (win32_process_target::supports_get_tib_address): Define.
3054 (win32_get_tib_address): Turn into ...
3055 (win32_process_target::get_tib_address): ... this.
3056 * win32-low.h (class win32_process_target): Update.
3057
3058 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3059
3060 Turn process_stratum_target's thread_stopped op into a method of
3061 process_target.
3062
3063 * target.h (struct process_stratum_target): Remove the target op.
3064 (class process_target): Add the target op. Also add
3065 'supports_thread_stopped'.
3066 (target_thread_stopped): Update the macro.
3067 * target.cc (process_target::thread_stopped): Define.
3068 (process_target::supports_thread_stopped): Define.
3069 (prepare_to_access_memory): Update.
3070
3071 Update the derived classes and callers below.
3072
3073 * server.cc (queue_stop_reply_callback): Update.
3074 * linux-low.cc (linux_target_ops): Update.
3075 (linux_process_target::supports_thread_stopped): Define.
3076 (linux_thread_stopped): Turn into ...
3077 (linux_process_target::thread_stopped): ... this.
3078 * linux-low.h (class linux_process_target): Update.
3079 * lynx-low.cc (lynx_target_ops): Update.
3080 * nto-low.cc (nto_target_ops): Update.
3081 * win32-low.cc (win32_target_ops): Update.
3082
3083 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3084
3085 Turn process_stratum_target's read_pc and write_pc ops into
3086 methods of process_target.
3087
3088 * target.h (struct process_stratum_target): Remove the target ops.
3089 (class process_target): Add the target ops.
3090 * target.cc (process_target::read_pc): Define.
3091 (process_target::write_pc): Define.
3092
3093 Update the derived classes and callers below.
3094
3095 * regcache.cc (regcache_read_pc): Update.
3096 (regcache_write_pc): Update.
3097 * linux-low.cc (linux_target_ops): Update.
3098 (linux_read_pc): Turn into ...
3099 (linux_process_target::read_pc): ... this.
3100 (linux_write_pc): Turn into ...
3101 (linux_process_target::write_pc): ... this.
3102 * linux-low.h (class linux_process_target): Update.
3103 * lynx-low.cc (lynx_target_ops): Update.
3104 * nto-low.cc (nto_target_ops): Update.
3105 * win32-low.cc (win32_target_ops): Update.
3106
3107 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3108
3109 Turn process_stratum_target's supports_tracepoints op into a
3110 method of process_target.
3111
3112 * target.h (struct process_stratum_target): Remove the target op.
3113 (class process_target): Add the target op.
3114 (target_supports_tracepoints): Update the macro.
3115 * target.cc (process_target::supports_tracepoints): Define.
3116
3117 Update the derived classes and callers below.
3118
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_supports_tracepoints): Turn into ...
3121 (linux_process_target::supports_tracepoints): ... this.
3122 * linux-low.h (class linux_process_target): Update.
3123 * lynx-low.cc (lynx_target_ops): Update.
3124 * nto-low.cc (nto_target_ops): Update.
3125 * win32-low.cc (win32_target_ops): Update.
3126
3127 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3128
3129 Turn process_stratum_target's process_qsupported op into a method
3130 of process_target.
3131
3132 * target.h (struct process_stratum_target): Remove the target op.
3133 (class process_target): Add the target op.
3134 (target_process_qsupported): Update the macro.
3135 * target.cc (process_target::process_qsupported): Define.
3136
3137 Update the derived classes and callers below.
3138
3139 * linux-low.cc (linux_target_ops): Update.
3140 (linux_process_qsupported): Turn into ...
3141 (linux_process_target::process_qsupported): ... this.
3142 * linux-low.h (class linux_process_target): Update.
3143 * lynx-low.cc (lynx_target_ops): Update.
3144 * nto-low.cc (nto_target_ops): Update.
3145 * win32-low.cc (win32_target_ops): Update.
3146
3147 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3148
3149 Turn process_stratum_target's read_loadmap op into a method of
3150 process_target.
3151
3152 * target.h (struct process_stratum_target): Remove the target op.
3153 (class process_target): Add the target op. Also add
3154 'supports_read_loadmap'.
3155 * target.cc (process_target::read_loadmap): Define.
3156 (process_target::supports_read_loadmap): Define.
3157
3158 Update the derived classes and callers below.
3159
3160 * server.cc (handle_qxfer_fdpic): Update.
3161 (handle_query): Update.
3162 * linux-low.cc (linux_target_ops): Update.
3163 (linux_process_target::supports_read_loadmap): Define.
3164 (linux_read_loadmap): Turn into ...
3165 (linux_process_target::read_loadmap): ... this.
3166 * linux-low.h (class linux_process_target): Update.
3167 * lynx-low.cc (lynx_target_ops): Update.
3168 * nto-low.cc (nto_target_ops): Update.
3169 * win32-low.cc (win32_target_ops): Update.
3170
3171 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3172
3173 Turn process_stratum_target's core_of_thread op into a method of
3174 process_target.
3175
3176 * target.h (struct process_stratum_target): Remove the target op.
3177 (class process_target): Add the target op.
3178 (target_core_of_thread): Update the macro.
3179 * target.cc (process_target::core_of_thread): Define.
3180
3181 Update the derived classes and callers below.
3182
3183 * linux-low.cc (linux_target_ops): Update.
3184 (linux_process_target::core_of_thread): Define.
3185 * linux-low.h (class linux_process_target): Update.
3186 * lynx-low.cc (lynx_target_ops): Update.
3187 * nto-low.cc (nto_target_ops): Update.
3188 * win32-low.cc (win32_target_ops): Update.
3189
3190 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3191
3192 Turn process_stratum_target's handle_monitor_command op into a
3193 method of process_target.
3194
3195 * target.h (struct process_stratum_target): Remove the target op.
3196 (class process_target): Add the target op.
3197 (target_handle_monitor_command): Update the macro.
3198 * target.cc (process_target::handle_monitor_command): Define.
3199
3200 Update the derived classes and callers below.
3201
3202 * server.cc (handle_query): Update.
3203 * linux-low.cc (linux_target_ops): Update.
3204 (linux_process_target::handle_monitor_command): Define.
3205 * linux-low.h (class linux_process_target): Update.
3206 * lynx-low.cc (lynx_target_ops): Update.
3207 * nto-low.cc (nto_target_ops): Update.
3208 * win32-low.cc (win32_target_ops): Update.
3209
3210 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3211
3212 Turn process_stratum_target's handle_new_gdb_connection op into a
3213 method of process_target.
3214
3215 * target.h (struct process_stratum_target): Remove the target op.
3216 (class process_target): Add the target op.
3217 (target_handle_new_gdb_connection): Update the macro.
3218 * target.cc (process_target::handle_new_gdb_connection): Define.
3219
3220 Update the derived classes and callers below.
3221
3222 * linux-low.cc (linux_target_ops): Update.
3223 (linux_handle_new_gdb_connection): Turn into ...
3224 (linux_process_target::handle_new_gdb_connection): ... this.
3225 * linux-low.h (class linux_process_target): Update.
3226 * lynx-low.cc (lynx_target_ops): Update.
3227 * nto-low.cc (nto_target_ops): Update.
3228 * win32-low.cc (win32_target_ops): Update.
3229
3230 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3231
3232 Turn process_stratum_target's supports_fork_events,
3233 supports_vfork_events, and supports_exec_events ops into methods
3234 of process_target.
3235
3236 * target.h (struct process_stratum_target): Remove the target ops.
3237 (class process_target): Add the target ops.
3238 (target_supports_fork_events): Update the macro.
3239 (target_supports_vfork_events): Update the macro.
3240 (target_supports_exec_events): Update the macro.
3241 * target.cc (process_target::supports_fork_events): Define.
3242 (process_target::supports_vfork_events): Define.
3243 (process_target::supports_exec_events): Define.
3244
3245 Update the derived classes and callers below.
3246
3247 * linux-low.cc (linux_target_ops): Update.
3248 (linux_supports_fork_events): Turn into ...
3249 (linux_process_target::supports_fork_events): ... this.
3250 (linux_supports_vfork_events): Turn into ...
3251 (linux_process_target::supports_vfork_events): ... this.
3252 (linux_supports_exec_events): Turn into ...
3253 (linux_process_target::supports_exec_events): ... this.
3254 * linux-low.h (class linux_process_target): Update.
3255 * lynx-low.cc (lynx_target_ops): Update.
3256 * nto-low.cc (nto_target_ops): Update.
3257 * win32-low.cc (win32_target_ops): Update.
3258
3259 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3260
3261 Turn process_stratum_target's supports_multi_process op into a
3262 method of process_target.
3263
3264 * target.h (struct process_stratum_target): Remove the target op.
3265 (class process_target): Add the target op.
3266 * target.cc (process_target::supports_multi_process): Define.
3267 (target_supports_multi_process): Update.
3268
3269 Update the derived classes and callers below.
3270
3271 * linux-low.cc (linux_target_ops): Update.
3272 (linux_supports_multi_process): Turn into ...
3273 (linux_process_target::supports_multi_process): ... this.
3274 * linux-low.h (class linux_process_target): Update.
3275 * lynx-low.cc (lynx_target_ops): Update.
3276 * nto-low.cc (nto_target_ops): Update.
3277 * win32-low.cc (win32_target_ops): Update.
3278
3279 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3280
3281 Turn process_stratum_target's supports_non_stop, async, and
3282 start_non_stop ops into methods of process_target.
3283
3284 * target.h (struct process_stratum_target): Remove the target ops.
3285 (class process_target): Add the target ops.
3286 (target_supports_non_stop): Update the macro.
3287 (target_async): Update the macro.
3288 (start_non_stop): Remove declaration.
3289 * target.cc (process_target::supports_non_stop): Define.
3290 (process_target::async): Define.
3291 (process_target::start_non_stop): Define.
3292 (start_non_stop): Remove.
3293
3294 Update the derived classes and callers below.
3295
3296 * server.cc (handle_qxfer_siginfo): Update.
3297 (handle_query): Update.
3298 * linux-low.cc (linux_target_ops): Update.
3299 (linux_supports_non_stop): Turn into ...
3300 (linux_process_target::supports_non_stop): ... this.
3301 (linux_async): Turn into ...
3302 (linux_process_target::async): ... this.
3303 (linux_start_non_stop): Turn into ...
3304 (linux_process_target::start_non_stop): ... this.
3305 * linux-low.h (class linux_process_target): Update.
3306 * lynx-low.cc (lynx_target_ops): Update.
3307 * nto-low.cc (nto_target_ops): Update.
3308 (nto_supports_non_stop): Remove; rely on the default behavior
3309 instead.
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 qxfer_siginfo op into a method of
3315 process_target.
3316
3317 * target.h (struct process_stratum_target): Remove the target op.
3318 (class process_target): Add the target op. Also add
3319 'supports_qxfer_siginfo'.
3320 * target.cc (process_target::qxfer_siginfo): Define.
3321 (process_target::supports_qxfer_siginfo): Define.
3322
3323 Update the derived classes and callers below.
3324
3325 * server.cc (handle_qxfer_siginfo): Update.
3326 (handle_query): Update.
3327 * linux-low.cc (linux_target_ops): Update.
3328 (linux_process_target::supports_qxfer_siginfo): Define.
3329 (linux_xfer_siginfo): Turn into ...
3330 (linux_process_target::qxfer_siginfo): ... this.
3331 * linux-low.h (class linux_process_target): Update.
3332 * lynx-low.cc (lynx_target_ops): Update.
3333 * nto-low.cc (nto_target_ops): Update.
3334 * win32-low.cc (win32_target_ops): Update.
3335
3336 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3337
3338 Turn process_stratum_target's qxfer_osdata op into a method of
3339 process_target.
3340
3341 * target.h (struct process_stratum_target): Remove the target op.
3342 (class process_target): Add the target op. Also add
3343 'supports_qxfer_osdata'.
3344 * target.cc (process_target::qxfer_osdata): Define.
3345 (process_target::supports_qxfer_osdata): Define.
3346
3347 Update the derived classes and callers below.
3348
3349 * server.cc (handle_qxfer_osdata): Update.
3350 (handle_query): Update.
3351 * linux-low.cc (linux_target_ops): Update.
3352 (linux_process_target::supports_qxfer_osdata): Define.
3353 (linux_qxfer_osdata): Turn into ...
3354 (linux_process_target::qxfer_osdata): ... this.
3355 * linux-low.h (class linux_process_target): Update.
3356 * lynx-low.cc (lynx_target_ops): Update.
3357 * nto-low.cc (nto_target_ops): Update.
3358 * win32-low.cc (win32_target_ops): Update.
3359
3360 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3361
3362 Turn process_stratum_target's hostio_last_error op into a
3363 method of process_target.
3364
3365 * target.h (struct process_stratum_target): Remove the target op.
3366 (class process_target): Add the target op.
3367 * target.cc: Add "hostio.h" to includes.
3368 (process_target::hostio_last_error): Define.
3369
3370 Update the derived classes and callers below.
3371
3372 * hostio.cc (hostio_error): Update.
3373 * linux-low.cc: Remove "hostio.h" from includes.
3374 (linux_target_ops): Update.
3375 * lynx-low.cc (lynx_target_ops): Update.
3376 * nto-low.cc (nto_target_ops): Update.
3377 * win32-low.h (class win32_process_target): Update.
3378 * win32-low.cc (win32_target_ops): Update.
3379 (wince_hostio_last_error): Turn into ...
3380 (win32_process_target::hostio_last_error): ... this.
3381
3382 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3383
3384 Turn process_stratum_target's get_tls_address op into a method of
3385 process_target.
3386
3387 * target.h (struct process_stratum_target): Remove the target op.
3388 (class process_target): Add the target op. Also add
3389 'supports_get_tls_address'.
3390 * target.cc (process_target::get_tls_address): Define.
3391 (process_target::supports_get_tls_address): Define.
3392
3393 Update the derived classes and callers below.
3394
3395 * server.cc (handle_query): Update.
3396 * linux-low.cc (linux_target_ops): Update.
3397 (linux_process_target::supports_get_tls_address): Define.
3398 (linux_process_target::get_tls_address): Define.
3399 * linux-low.h (class linux_process_target): Update.
3400 * lynx-low.cc (lynx_target_ops): Update.
3401 * nto-low.cc (nto_target_ops): Update.
3402 * win32-low.cc (win32_target_ops): Update.
3403
3404 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3405
3406 Turn process_stratum_target's read_offsets op into a method of
3407 process_target.
3408
3409 * target.h (struct process_stratum_target): Remove the target op.
3410 (class process_target): Add the target op. Also add
3411 'supports_read_offsets'.
3412 * target.cc (process_target::read_offsets): Define.
3413 (process_target::supports_read_offsets): Define.
3414
3415 Update the derived classes and callers below.
3416
3417 * server.cc (handle_query): Update.
3418 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3419 (linux_target_ops): Update.
3420 (linux_process_target::supports_read_offsets): Define.
3421 (linux_read_offsets): Turn into ...
3422 (linux_process_target::read_offsets): ... this.
3423 * linux-low.h (class linux_process_target): Update.
3424 * lynx-low.cc (lynx_target_ops): Update.
3425 * nto-low.cc (nto_target_ops): Update.
3426 * win32-low.cc (win32_target_ops): Update.
3427
3428 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3429
3430 Turn process_stratum_target's stopped_by_watchpoint and
3431 stopped_data_address ops into methods of process_target.
3432
3433 * target.h (struct process_stratum_target): Remove the target ops.
3434 (class process_target): Add the target ops.
3435 * target.cc (process_target::stopped_by_watchpoint): Define.
3436 (process_target::stopped_data_address): Define.
3437
3438 Update the derived classes and callers below.
3439
3440 * remote-utils.cc (prepare_resume_reply): Update.
3441 * linux-low.cc (linux_target_ops): Update.
3442 (linux_stopped_by_watchpoint): Turn into ...
3443 (linux_process_target::stopped_by_watchpoint): ... this.
3444 (linux_stopped_data_address): Turn into ...
3445 (linux_process_target::stopped_data_address): ... this.
3446 * linux-low.h (class linux_process_target): Update.
3447 * lynx-low.cc (lynx_target_ops): Update.
3448 * nto-low.cc (nto_target_ops): Update.
3449 (nto_stopped_by_watchpoint): Turn into ...
3450 (nto_process_target::stopped_by_watchpoint): ... this.
3451 (nto_stopped_data_address): Turn into ...
3452 (nto_process_target::stopped_data_address): ... this.
3453 * nto-low.h (class nto_process_target): Update.
3454 * win32-low.cc (win32_target_ops): Update.
3455 (win32_stopped_by_watchpoint): Turn into ...
3456 (win32_process_target::stopped_by_watchpoint): ... this.
3457 (win32_stopped_data_address): Turn into ...
3458 (win32_process_target::stopped_data_address): ... this.
3459 * win32-low.h (class win32_process_target): Update.
3460
3461 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3462
3463 Turn process_stratum_target's supports_hardware_single_step op into
3464 a method of process_target.
3465
3466 * target.h (struct process_stratum_target): Remove the target op.
3467 (class process_target): Add the target op.
3468 (target_supports_hardware_single_step): Update the macro.
3469 (target_can_do_hardware_single_step): Remove declaration.
3470 * target.cc (process_target::supports_hardware_single_step): Define.
3471 (target_can_do_hardware_single_step): Remove.
3472
3473 Update the derived classes and callers below.
3474
3475 * linux-low.h (class linux_process_target): Update.
3476 * linux-low.cc (linux_target_ops): Update.
3477 (linux_supports_hardware_single_step): Turn into ...
3478 (linux_process_target::supports_hardware_single_step): ... this.
3479 * lynx-low.h (class lynx_process_target): Update.
3480 * lynx-low.cc (lynx_target_ops): Update.
3481 (lynx_process_target::supports_hardware_single_step): Define.
3482 * nto-low.h (class nto_process_target): Update.
3483 * nto-low.cc (nto_target_ops): Update.
3484 (nto_process_target::supports_hardware_single_step): Define.
3485 * win32-low.h (class win32_process_target): Update.
3486 * win32-low.cc (win32_target_ops): Update.
3487 (win32_process_target::supports_hardware_single_step): Define.
3488
3489 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3490
3491 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3492 ops into methods of process_target.
3493
3494 * target.h (struct process_stratum_target): Remove the target ops.
3495 (class process_target): Add the target ops.
3496 (target_stopped_by_hw_breakpoint): Update the macro.
3497 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3498 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3499 (process_target::supports_stopped_by_hw_breakpoint): Define.
3500
3501 Update the derived classes and callers below.
3502
3503 * linux-low.cc (linux_target_ops): Update.
3504 (linux_stopped_by_hw_breakpoint): Turn into ...
3505 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3506 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3507 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3508 * linux-low.h (class linux_process_target): Update.
3509 * lynx-low.cc (lynx_target_ops): Update.
3510 * nto-low.cc (nto_target_ops): Update.
3511 * win32-low.cc (win32_target_ops): Update.
3512
3513 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3514
3515 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3516 ops into methods of process_target.
3517
3518 * target.h (struct process_stratum_target): Remove the target ops.
3519 (class process_target): Add the target ops.
3520 (target_stopped_by_sw_breakpoint): Update the macro.
3521 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3522 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3523 (process_target::supports_stopped_by_sw_breakpoint): Define.
3524
3525 Update the derived classes and callers below.
3526
3527 * linux-low.cc (linux_target_ops): Update.
3528 (linux_stopped_by_sw_breakpoint): Turn into ...
3529 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3530 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3531 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3532 * linux-low.h (class linux_process_target): Update.
3533 * lynx-low.cc (lynx_target_ops): Update.
3534 * nto-low.cc (nto_target_ops): Update.
3535 * win32-low.cc (win32_target_ops): Update.
3536
3537 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3538
3539 Turn process_stratum_target's insert_point and remove_point ops
3540 into methods of process_target.
3541
3542 * target.h (struct process_stratum_target): Remove the target ops.
3543 (class process_target): Add the target ops.
3544 * target.cc (process_target::insert_point): Define.
3545 (process_target::remove_point): Define.
3546
3547 Update the derived classes and callers below.
3548
3549 * mem-break.cc (set_raw_breakpoint_at): Update.
3550 (delete_raw_breakpoint): Update.
3551 (uninsert_raw_breakpoint): Update.
3552 (reinsert_raw_breakpoint): Update.
3553 * linux-low.cc (linux_target_ops): Update.
3554 (linux_insert_point): Turn into ...
3555 (linux_process_target::insert_point): ... this.
3556 (linux_remove_point): Turn into ...
3557 (linux_process_target::remove_point): ... this.
3558 * linux-low.h (class linux_process_target): Update.
3559 * lynx-low.cc (lynx_target_ops): Update.
3560 * nto-low.cc (nto_target_ops): Update.
3561 (nto_insert_point): Turn into ...
3562 (nto_process_target::insert_point): ... this.
3563 (nto_remove_point): Turn into ...
3564 (nto_process_target::remove_point): ... this.
3565 * nto-low.h (class nto_process_target): Update.
3566 * win32-low.cc (win32_target_ops): Update.
3567 (win32_insert_point): Turn into ...
3568 (win32_process_target::insert_point): ... this.
3569 (win32_remove_point): Turn into ...
3570 (win32_process_target::remove_point): ... this.
3571 * win32-low.h (class win32_process_target): Update.
3572
3573 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3574
3575 Turn process_stratum_target's supports_z_point_type op into a
3576 method of process_target.
3577
3578 * target.h (struct process_stratum_target): Remove the target op.
3579 (class process_target): Add the target op.
3580 * target.cc (process_target::supports_z_point_type): Define.
3581
3582 Update the derived classes and callers below.
3583
3584 * mem-break.cc (z_type_supported): Update.
3585 * linux-low.cc (linux_target_ops): Update.
3586 (linux_supports_z_point_type): Turn into ...
3587 (linux_process_target::supports_z_point_type): ... this.
3588 * linux-low.h (class linux_process_target): Update.
3589 * lynx-low.cc (lynx_target_ops): Update.
3590 * nto-low.cc (nto_target_ops): Update.
3591 (nto_supports_z_point_type): Turn into ...
3592 (nto_process_target::supports_z_point_type): ... this.
3593 * nto-low.h (class nto_process_target): Update.
3594 * win32-low.cc (win32_target_ops): Update.
3595 (win32_supports_z_point_type): Turn into ...
3596 (win32_process_target::supports_z_point_type): ... this.
3597 * win32-low.h (class win32_process_target): Update.
3598
3599 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3600
3601 Turn process_stratum_target's read_auxv op into a method of
3602 process_target.
3603
3604 * target.h (class process_stratum_target): Remove the target op.
3605 (struct process_target): Add the target op. Also add
3606 'supports_read_auxv'.
3607 * target.cc (process_target::read_auxv): Define.
3608 (process_target::supports_read_auxv): Define.
3609
3610 Update the derived classes and callers below.
3611
3612 * server.cc (handle_qxfer_auxv): Update.
3613 (handle_query): Update.
3614 * linux-low.cc (linux_target_ops): Update.
3615 (linux_process_target::supports_read_auxv): Define.
3616 (linux_read_auxv): Turn into ...
3617 (linux_process_target::read_auxv): ... this.
3618 * linux-low.h (class linux_process_target): Update.
3619 * lynx-low.cc (lynx_target_ops): Update.
3620 * nto-low.cc (nto_target_ops): Update.
3621 (nto_process_target::supports_read_auxv): Define.
3622 (nto_read_auxv): Turn into ...
3623 (nto_process_target::read_auxv): ... this.
3624 * nto-low.h (class nto_process_target): Update.
3625 * win32-low.cc (win32_target_ops): Update.
3626
3627 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3628
3629 Turn process_stratum_target's request_interrupt op into a method of
3630 process_target.
3631
3632 * target.h (struct process_stratum_target): Remove the target op.
3633 (class process_target): Add the target op.
3634
3635 Update the derived classes and callers below.
3636
3637 * remote-utils.cc (putpkt_binary_1): Update.
3638 (input_interrupt): Update.
3639 (getpkt): Update.
3640 * server.cc (handle_v_requests): Update.
3641 * linux-low.cc (linux_target_ops): Update.
3642 (linux_request_interrupt): Turn into ...
3643 (linux_process_target::request_interrupt): ... this.
3644 * linux-low.h (class linux_process_target): Update.
3645 * lynx-low.cc (lynx_target_ops): Update.
3646 (lynx_request_interrupt): Turn into ...
3647 (lynx_process_target::request_interrupt): ... this.
3648 * lynx-low.h (class lynx_process_target): Update.
3649 * nto-low.cc (nto_target_ops): Update.
3650 (nto_request_interrupt): Turn into ...
3651 (nto_process_target::request_interrupt): ... this.
3652 * nto-low.h (class nto_process_target): Update.
3653 * win32-low.cc (win32_target_ops): Update.
3654 (win32_request_interrupt): Turn into ...
3655 (win32_process_target::request_interrupt): ... this.
3656 * win32-low.h (class win32_process_target): Update.
3657
3658 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3659
3660 Turn process_stratum_target's look_up_symbols op into a method of
3661 process_target.
3662
3663 * target.h (struct process_stratum_target): Remove the target op.
3664 (class process_target): Add the target op.
3665 * target.cc (process_target::look_up_symbols): Define.
3666
3667 Update the derived classes and callers below.
3668
3669 * server.cc (handle_query): Update.
3670 * linux-low.cc (linux_target_ops): Update.
3671 (linux_look_up_symbols): Turn into ...
3672 (linux_process_target::look_up_symbols): ... this.
3673 * linux-low.h (class linux_process_target): Update.
3674 * lynx-low.cc (lynx_target_ops): Update.
3675 * nto-low.cc (nto_target_ops): Update.
3676 * win32-low.cc (win32_target_ops): Update.
3677
3678 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3679
3680 Turn process_stratum_target's read_memory and write_memory
3681 ops into methods of process_target.
3682
3683 * target.h (struct process_stratum_target): Remove the target ops.
3684 (class process_target): Add the target ops.
3685
3686 Update the derived classes and callers below.
3687
3688 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3689 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3690 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3691 (arm_get_syscall_trapinfo): Update.
3692 * linux-cris-low.cc (cris_breakpoint_at): Update.
3693 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3694 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3695 * linux-mips-low.cc (mips_breakpoint_at): Update.
3696 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3697 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3698 * linux-sh-low.cc (sh_breakpoint_at): Update.
3699 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3700 (sparc_store_gregset_from_stack): Update.
3701 (sparc_breakpoint_at): Update.
3702 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3703 * linux-tile-low.cc (tile_breakpoint_at): Update.
3704 * linux-x86-low.cc (x86_breakpoint_at): Update.
3705 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3706 * mem-brea.cc (insert_memory_breakpoint): Update.
3707 (validate_inserted_breakpoint): Update.
3708 * target.cc (read_inferior_memory): Update.
3709 (target_write_memory): Update.
3710 * linux-low.cc (linux_target_ops): Update.
3711 (linux_read_memory): Make a wrapper around the read_memory target
3712 op call.
3713 (linux_process_target::read_memory): Rename from linux_read_memory.
3714 (linux_write_memory): Turn into ...
3715 (linux_process_target::write_memory): ... this.
3716 * linux-low.h (class linux_process_target): Update.
3717 * lynx-low.cc (lynx_target_ops): Update.
3718 (lynx_read_memory): Turn into ...
3719 (lynx_process_target::read_memory): ... this.
3720 (lynx_write_memory): Turn into ...
3721 (lynx_process_target::write_memory): ... this.
3722 * lynx-low.h (class lynx_process_target): Update.
3723 * nto-low.cc (nto_target_ops): Update.
3724 (nto_read_memory): Turn into ...
3725 (nto_process_target::read_memory): ... this.
3726 (nto_write_memory): Turn into ...
3727 (nto_process_target::write_memory): ... this.
3728 * nto-low.h (class nto_process_target): Update.
3729 * win32-low.cc (win32_target_ops): Update.
3730 (win32_read_inferior_memory): Turn into ...
3731 (win32_process_target::read_memory): ... this.
3732 (win32_write_inferior_memory): Turn into ...
3733 (win32_process_target::write_memory): ... this.
3734 * win32-low.h (class win32_process_target): Update.
3735
3736 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3737
3738 Turn process_stratum_target's prepare_to_access_memory and
3739 done_accessing_memory ops into methods of process_target.
3740
3741 * target.h (struct process_stratum_target): Remove the target ops.
3742 (class process_target): Add the target ops.
3743 * target.cc (process_target::prepare_to_access_memory): Define.
3744 (process_target::done_accessing_memory): Define.
3745 (prepare_to_access_memory): Update.
3746 (done_accessing_memory): Update.
3747
3748 Update the derived classes and callers below.
3749
3750 * linux-low.cc (linux_target_ops): Update.
3751 (linux_prepare_to_access_memory): Turn into ...
3752 (linux_process_target::prepare_to_access_memory): ... this.
3753 (linux_done_accessing_memory): Turn into ...
3754 (linux_process_target::done_accessing_memory): ... this.
3755 * linux-low.h (class linux_process_target): Update.
3756 * lynx-low.cc (lynx_target_ops): Update.
3757 * nto-low.cc (nto_target_ops): Update.
3758 * win32-low.cc (win32_target_ops): Update.
3759
3760 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3761
3762 Turn process_stratum_target's fetch_registers and store_registers
3763 ops into methods of process_target.
3764
3765 * target.h (struct process_stratum_target): Remove the target ops.
3766 (class process_target): Add the target ops.
3767 (fetch_inferior_registers): Update the macro.
3768 (store_inferior_registers): Update the macro.
3769
3770 Update the derived classes and callers below.
3771
3772 * linux-low.cc (linux_target_ops): Update.
3773 (linux_fetch_registers): Turn into ...
3774 (linux_process_target::fetch_registers): ... this.
3775 (linux_store_registers): Turn into ...
3776 (linux_process_target::store_registers): ... this.
3777 * linux-low.h (class linux_process_target): Update.
3778 * lynx-low.cc (lynx_target_ops): Update.
3779 (lynx_fetch_registers): Turn into ...
3780 (lynx_process_target::fetch_registers): ... this.
3781 (lynx_store_registers): Turn into ...
3782 (lynx_process_target::store_registers): ... this.
3783 * lynx-low.h (class lynx_process_target): Update.
3784 * nto-low.cc (nto_target_ops): Update.
3785 (nto_fetch_registers): Turn into ...
3786 (nto_process_target::fetch_registers): ... this.
3787 (nto_store_registers): Turn into ...
3788 (nto_process_target::store_registers): ... this.
3789 * nto-low.h (class nto_process_target): Update.
3790 * win32-low.cc (win32_target_ops): Update.
3791 (win32_fetch_inferior_registers): Turn into ...
3792 (win32_process_target::fetch_registers): ... this.
3793 (win32_store_inferior_registers): Turn into ...
3794 (win32_process_target::store_registers): ... this.
3795 * win32-low.h (class win32_process_target): Update.
3796
3797 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3798
3799 Turn process_stratum_target's wait op into a method of
3800 process_target.
3801
3802 * target.h (struct process_stratum_target): Remove the target op.
3803 (class process_target): Add the target op.
3804
3805 Update the derived classes and callers below.
3806
3807 * target.cc (target_wait): Update.
3808 * linux-low.cc (linux_target_ops): Update.
3809 (linux_wait): Turn into ...
3810 (linux_process_target::wait): ... this.
3811 * linux-low.h (class linux_process_target): Update.
3812 * lynx-low.cc (lynx_target_ops): Update.
3813 (lynx_wait): Turn into ...
3814 (lynx_process_target::wait): ... this.
3815 * lynx-low.h (class lynx_process_target): Update.
3816 * nto-low.cc (nto_target_ops): Update.
3817 (nto_wait): Turn into ...
3818 (nto_process_target::wait): ... this.
3819 * nto-low.h (class nto_process_target): Update.
3820 * win32-low.cc (win32_target_ops): Update.
3821 (win32_wait): Turn into ...
3822 (win32_process_target::wait): ... this.
3823 (do_initial_child_stuff): Update.
3824 * win32-low.h (class win32_process_target): Update.
3825
3826 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3827
3828 Turn process_stratum_target's resume op into a method of
3829 process_target.
3830
3831 * target.h (struct process_stratum_target): Remove the target op.
3832 (class process_target): Add the target op.
3833
3834 Update the derived classes and callers below.
3835
3836 * server.cc (resume): Update.
3837 * target.cc (target_stop_and_wait): Update.
3838 (target_continue_no_signal): Update.
3839 (target_continue): Update.
3840 * linux-low.cc (linux_target_ops): Update.
3841 (linux_resume): Turn into ...
3842 (linux_process_target::resume): ... this.
3843 * linux-low.h (class linux_process_target): Update.
3844 * lynx-low.cc (lynx_target_ops): Update.
3845 (lynx_resume): Turn into ...
3846 (lynx_process_target::resume): ... this.
3847 * lynx-low.h (class lynx_process_target): Update.
3848 * nto-low.cc (nto_target_ops): Update.
3849 (nto_resume): Turn into ...
3850 (nto_process_target::resume): ... this.
3851 * nto-low.h (class nto_process_target): Update.
3852 * win32-low.cc (win32_target_ops): Update.
3853 (win32_resume): Turn into ...
3854 (win32_process_target::resume): ... this.
3855 (win32_process_target::detach): Update.
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 thread_alive 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 (mythread_alive): Update the macro.
3867
3868 Update the derived classes and callers below.
3869
3870 * linux-low.cc (linux_target_ops): Update.
3871 (linux_thread_alive): Turn into ...
3872 (linux_process_target::thread_alive): ... this.
3873 (wait_for_sigstop): Update.
3874 * linux-low.h (class linux_process_target): Update.
3875 * lynx-low.cc (lynx_target_ops): Update.
3876 (lynx_thread_alive): Turn into ...
3877 (lynx_process_target::thread_alive): ... this.
3878 * lynx-low.h (class lynx_process_target): Update.
3879 * nto-low.cc (nto_target_ops): Update.
3880 (nto_thread_alive): Turn into ...
3881 (nto_process_target::thread_alive): ... this.
3882 * nto-low.h (class nto_process_target): Update.
3883 * win32-low.cc (win32_target_ops): Update.
3884 (win32_thread_alive): Turn into ...
3885 (win32_process_target::thread_alive): ... this.
3886 * win32-low.h (class win32_process_target): Update.
3887
3888 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3889
3890 Turn process_stratum_target's join op into a method of
3891 process_target.
3892
3893 * target.h (struct process_stratum_target): Remove the target op.
3894 (class process_target): Add the target op.
3895 (join_inferior): Update the macro.
3896
3897 Update the derived classes and callers below.
3898
3899 * linux-low.cc (linux_target_ops): Update.
3900 (linux_join): Turn into ...
3901 (linux_process_target::join): ... this.
3902 * linux-low.h (class linux_process_target): Update.
3903 * lynx-low.cc (lynx_target_ops): Update.
3904 (lynx_join): Turn into ...
3905 (lynx_process_target::join): ... this.
3906 * lynx-low.h (class lynx_process_target): Update.
3907 * nto-low.cc (nto_target_ops): Update.
3908 (nto_process_target::join): Define.
3909 * nto-low.h (class nto_process_target): Update.
3910 * win32-low.cc (win32_target_ops): Update.
3911 (win32_join): Turn into ...
3912 (win32_process_target::join): ... this.
3913 * win32-low.h (class win32_process_target): Update.
3914
3915 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3916
3917 Turn process_stratum_target's mourn op into a method of
3918 process_target.
3919
3920 * target.h (struct process_stratum_target): Remove the target op.
3921 (class process_target): Add the target op.
3922
3923 Update the derived classes and callers below.
3924
3925 * target.cc (target_mourn_inferior): Update.
3926 * linux-low.cc (linux_target_ops): Update.
3927 (linux_mourn): Turn into ...
3928 (linux_process_target::mourn): ... this.
3929 (handle_extended_wait): Update.
3930 (linux_process_target::kill): Update.
3931 (linux_process_target::detach): Update.
3932 * linux-low.h (class linux_process_target): Update.
3933 * lynx-low.cc (lynx_target_ops): Update.
3934 (lynx_mourn): Turn into ...
3935 (lynx_process_target::mourn): ... this.
3936 * lynx-low.h (class lynx_process_target): Update.
3937 * nto-low.cc (nto_target_ops): Update.
3938 (nto_mourn): Turn into ...
3939 (nto_process_target::mourn): ... this.
3940 * nto-low.h (class nto_process_target): Update.
3941 * win32-low.cc (win32_target_ops): Update.
3942 (win32_mourn): Turn into ...
3943 (win32_process_target::mourn): ... this.
3944 * win32-low.h (class win32_process_target): Update.
3945
3946 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3947
3948 Turn process_stratum_target's detach op into a method of
3949 process_target.
3950
3951 * target.h (struct process_stratum_target): Remove the target op.
3952 (class process_target): Add the target op.
3953 (detach_inferior): Update the macro.
3954
3955 Update the derived classes and callers below.
3956
3957 * linux-low.cc (linux_target_ops): Update.
3958 (linux_detach): Turn into ...
3959 (linux_process_target::detach): ... this.
3960 * linux-low.h (class linux_process_target): Update.
3961 * lynx-low.cc (lynx_target_ops): Update.
3962 (lynx_detach): Turn into ...
3963 (lynx_process_target::detach): ... this.
3964 * lynx-low.h (class lynx_process_target): Update.
3965 * nto-low.cc (nto_target_ops): Update.
3966 (nto_detach): Turn into ...
3967 (nto_process_target::detach): ... this.
3968 * nto-low.h (class nto_process_target): Update.
3969 * win32-low.cc (win32_target_ops): Update.
3970 (win32_detach): Turn into ...
3971 (win32_process_target::detach): ... this.
3972 * win32-low.h (class win32_process_target): Update.
3973
3974 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3975
3976 Turn process_stratum_target's kill op into a method of
3977 process_target.
3978
3979 * target.h (struct process_stratum_target): Remove the target op.
3980 (class process_target): Add the target op.
3981
3982 Update the derived classes and callers below.
3983
3984 * target.cc (kill_inferior): Update.
3985 * linux-low.cc (linux_target_ops): Update.
3986 (linux_kill): Turn into ...
3987 (linux_process_target::kill): ... this.
3988 * linux-low.h (class linux_process_target): Update.
3989 * lynx-low.cc (lynx_target_ops): Update.
3990 (lynx_kill): Turn into ...
3991 (lynx_process_target::kill): ... this.
3992 * lynx-low.h (class lynx_process_target): Update.
3993 * nto-low.cc (nto_target_ops): Update.
3994 (nto_kill): Turn into ...
3995 (nto_process_target::kill): ... this.
3996 * nto-low.h (class nto_process_target): Update.
3997 * win32-low.cc (win32_target_ops): Update.
3998 (win32_kill): Turn into ...
3999 (win32_process_target::kill): ... this.
4000 * win32-low.h (class win32_process_target): Update.
4001
4002 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4003
4004 Turn process_stratum_target's attach op into a method of
4005 process_target.
4006
4007 * target.h (struct process_stratum_target): Remove the target op.
4008 (class process_target): Add the target op.
4009 (myattach): Update the macro.
4010
4011 Update the derived classes and callers below.
4012
4013 * linux-low.cc (linux_target_ops): Update.
4014 (linux_attach): Turn into ...
4015 (linux_process_target::attach): ... this.
4016 * linux-low.h (class linux_process_target): Update.
4017 * lynx-low.cc (lynx_target_ops): Update.
4018 (lynx_attach): Turn into ...
4019 (lynx_process_target::attach): ... this.
4020 * lynx-low.h (class lynx_process_target): Update.
4021 * nto-low.cc (nto_target_ops): Update.
4022 (nto_attach): Turn into ...
4023 (nto_process_target::attach): ... this.
4024 * nto-low.h (class nto_process_target): Update.
4025 * win32-low.cc (win32_target_ops): Update.
4026 (win32_attach): Turn into ...
4027 (win32_process_target::attach): ... this.
4028 * win32-low.h (class win32_process_target): Update.
4029
4030 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4031
4032 Turn process_stratum_target's post_create_inferior op into a method
4033 of process_target.
4034
4035 * target.h (struct process_stratum_target): Remove the target op.
4036 (class process_target): Add the target op.
4037 (target_post_create_inferior): Update the macro.
4038 * target.cc (process_target::post_create_inferior): Define.
4039
4040 Update the derived classes and callers below.
4041
4042 * linux-low.cc (linux_target_ops): Update.
4043 (linux_post_create_inferior): Turn into ...
4044 (linux_process_target::post_create_inferior): ... this.
4045 * linux-low.h (class linux_process_target): Update.
4046 * lynx-low.cc (lynx_target_ops): Update.
4047 * nto-low.cc (nto_target_ops): Update.
4048 * win32-low.cc (win32_target_ops): Update.
4049
4050 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4051
4052 Turn process_stratum_target's create_inferior op into a method of
4053 process_target.
4054
4055 * target.h (struct process_stratum_target): Remove the target op.
4056 (class process_target): Add the target op.
4057 (create_inferior): Rename the macro to ...
4058 (target_create_inferior): ... this.
4059
4060 Update the derived classes and callers below.
4061
4062 * server.cc (handle_v_run): Update.
4063 (captured_main): Update.
4064 (process_serial_event): Update.
4065 * linux-low.cc (linux_target_ops): Update.
4066 (linux_create_inferior): Turn into ...
4067 (linux_process_target::create_inferior): ... this.
4068 * linux-low.h (class linux_process_target): Update.
4069 * lynx-low.cc (lynx_target_ops): Update.
4070 (lynx_create_inferior): Turn into ...
4071 (lynx_process_target::create_inferior): ... this.
4072 * lynx-low.h (class lynx_process_target): Update.
4073 * nto-low.cc (nto_target_ops): Update.
4074 (nto_create_inferior): Turn into ...
4075 (nto_process_target::create_inferior): ... this.
4076 * nto-low.h (class nto_process_target): Update.
4077 * win32-low.cc (win32_target_ops): Update.
4078 (win32_create_inferior): Turn into ...
4079 (win32_process_target::create_inferior): ... this.
4080 * win32-low.h (class win32_process_target): Update.
4081
4082 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4083
4084 * target.h (class process_target): New class definition.
4085 (struct process_stratum_target) <pt>: New field with type
4086 'process_target*'.
4087 * linux-low.h (class linux_process_target): Define as a derived
4088 class of 'process_target'.
4089 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4090 as the 'pt' field.
4091 * lynx-low.h (class lynx_process_target): Define as a derived
4092 class of 'process_target'.
4093 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4094 as the 'pt' field.
4095 * nto-low.h (class nto_process_target): Define as a derived
4096 class of 'process_target'.
4097 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4098 as the 'pt' field.
4099 * win32-low.h (class win32_process_target): Define as a derived
4100 class of 'process_target'.
4101 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4102 as the 'pt' field.
4103
4104 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4105
4106 * configure: Regenerate.
4107
4108 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4109 Andrew Burgess <andrew.burgess@embecosm.com>
4110
4111 * linux-riscv-low.cc: New file.
4112 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4113 and nat/riscv-linux-tdesc.c.
4114 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4115 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4116 Define.
4117
4118 2020-02-14 Tom Tromey <tom@tromey.com>
4119
4120 * acinclude.m4: Don't include acx_configure_dir.m4.
4121 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4122 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4123 (all, install-only, uninstall, clean-info, clean)
4124 (maintainer-clean): Don't recurse.
4125 (subdir_do, all-lib): Remove.
4126 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4127 (GNULIB_H): Remove.
4128 (generated_files): Update.
4129 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4130 * configure: Rebuild.
4131 * configure.ac: Don't configure gnulib or libiberty.
4132 (GNULIB): Update.
4133
4134 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4135
4136 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4137 preparing the command line for CreateProcess.
4138 (win32_create_inferior): Reflect the program name in debugging
4139 output that shows the process and its command line.
4140
4141 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4142
4143 * Makefile.in: Rename source files from .c to .cc.
4144 * %.c: Rename to %.cc.
4145 * configure.ac: Rename server.c to server.cc.
4146 * configure: Re-generate.
4147
4148 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4149
4150 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4151
4152 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4153
4154 * win32-low.c (win32_create_inferior): Set signal_pid.
4155
4156 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4157 Pedro Alves <palves@redhat.com>
4158
4159 Skip building gdbserver in a cross-configuration.
4160 * configure.srv: Set $gdbserver_host depending on whether $target
4161 is $host. Use $gdbserver_host instead of $host.
4162
4163 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4164
4165 * configure: Re-generate.
4166
4167 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4168
4169 * configure: Re-generate.
4170
4171 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4172
4173 * acinclude.m4: Update warning.m4 path.
4174
4175 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4176
4177 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4178 (handle_exception): Set siginfo_er.
4179 (win32_xfer_siginfo): New function.
4180
4181 2020-02-07 Tom Tromey <tom@tromey.com>
4182 Pedro Alves <palves@redhat.com>
4183
4184 * README: Update build documentation.
4185 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4186 host, not target.
4187 * configure.ac: Update paths.
4188 * configure: Rebuild.
4189 * acinclude.m4: Update paths.
4190 * Makefile.in: Update include paths.
4191 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4192 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4193 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4194 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4195 (%-generated.c): Update paths.
4196 * Move entire directory from ../gdb/gdbserver.
4197
4198 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4199
4200 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4201
4202 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4203
4204 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4205 assignment instead of srv_linux_obj.
4206
4207 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4208
4209 * server.c (handle_qxfer_libraries): Write segment-address with
4210 paddress.
4211
4212 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4213
4214 * Makefile.in (install-strip): New target.
4215 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4216 * aclocal.m4: Regenerate.
4217 * configure: Regenerate.
4218 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4219
4220 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4221
4222 * Makefile.in (SFILES): Adjust paths to point to real files.
4223 (OBS): Move waitstatus.o to target/waitstatus.o.
4224 (TAGS): Transform paths appropriately.
4225 (%.o): Rename to...
4226 (nat/%.o): ... this pattern rule.
4227 (%.o): Rename to...
4228 (target/%.o): ... this pattern rule.
4229 * configure.srv: Adjust paths throughout to include nat/ prefix
4230 with the revant files.
4231 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4232 * configure: Regenerate.
4233
4234 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4235
4236 * Makefile.in (TAGS): Remove config files from the recipe.
4237
4238 2020-01-14 Tom Tromey <tom@tromey.com>
4239
4240 * configure: Rebuild.
4241 * configure.ac: Remove any checks that were added to common.m4.
4242 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4243 lib-link.m4.
4244
4245 2020-01-14 Tom Tromey <tom@tromey.com>
4246
4247 * server.h: Include config.h.
4248 * gdbreplay.c: Include config.h.
4249 * configure: Rebuild.
4250 * configure.ac: Don't source common.host.
4251 * acinclude.m4: Update path.
4252 * Makefile.in (INCSUPPORT): New variable.
4253 (INCLUDE_CFLAGS): Add INCSUPPORT.
4254 (SFILES): Update paths.
4255 (version-generated.c): Update path to create-version.sh.
4256 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4257
4258 2020-01-14 Tom Tromey <tom@tromey.com>
4259
4260 * configure.ac (LIBS): Use WIN32APILIBS.
4261 (USE_WIN32API): Don't define.
4262 * configure: Rebuild.
4263
4264 2020-01-14 Tom Tromey <tom@tromey.com>
4265
4266 * configure: Rebuild.
4267
4268 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4269
4270 * Makefile.in (%-generated.c): Remove rule for files from
4271 regformats/i386.
4272
4273 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4274
4275 * configure: Re-generate.
4276
4277 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4278
4279 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4280 Define to static.
4281 * tracepoint.c (stop_tracing, flush_trace_buffer,
4282 about_to_request_buffer_space, get_trace_state_variable_value,
4283 set_trace_state_variable_value, gdb_collect): Add declaration.
4284
4285 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4286
4287 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4288 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4289 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4290 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4291 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4292 static.
4293
4294 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4295
4296 * inferiors.c: Include gdbsupport/common-inferior.h.
4297
4298 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4299
4300 * hostio-errno.c: Include hostio.h.
4301
4302 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4303
4304 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4305 prerequisite.
4306
4307 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4308
4309 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4310 * linux-arm-tdesc.h: Include arch/arm.h.
4311
4312 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4313
4314 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4315
4316 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4317
4318 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4319 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4320
4321 2020-01-10 Pedro Alves <palves@redhat.com>
4322
4323 * fork-child.c (post_fork_inferior): Pass target down to
4324 startup_inferior.
4325 * inferiors.c (switch_to_thread): Add process_stratum_target
4326 parameter.
4327 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4328 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4329 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4330 * remote-utils.c (prepare_resume_reply): Pass the target to
4331 switch_to_thread.
4332 * target.c (the_target): Now a process_stratum_target.
4333 (done_accessing_memory): Pass the target to switch_to_thread.
4334 (set_target_ops): Ajust to use process_stratum_target.
4335 * target.h (struct target_ops): Rename to ...
4336 (struct process_stratum_target): ... this.
4337 (the_target, set_target_ops): Adjust.
4338 (prepare_to_access_memory): Adjust comment.
4339 * win32-low.c (child_xfer_memory): Adjust to use
4340 process_stratum_target.
4341 (win32_target_ops): Now a process_stratum_target.
4342
4343 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4344 Pedro Alves <palves@redhat.com>
4345
4346 * win32-low.c (get_child_debug_event): Extract the fatal exception
4347 from the exit status and convert to the equivalent Posix signal
4348 number.
4349 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4350 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4351
4352 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4353
4354 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4355
4356 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4357
4358 * server.c (gdbserver_version): Change copyright year to 2020.
4359 * gdbreplay.c (gdbreplay_version): Likewise.
4360
4361 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4362
4363 * configure: Regenerate.
4364 * configure.ac: Quote variable arguments of test.
4365
4366 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4367
4368 * Makefile.in: Fix build with GNU Make 3.81
4369
4370 2019-12-16 Tom Tromey <tromey@adacore.com>
4371
4372 * server.c (get_exec_file): Constify result.
4373
4374 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4375
4376 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4377 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4378 * config.in: Regenerate.
4379 * configure: Regenerate.
4380 * configure.ac: Don't check for strerror.
4381 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4382 Call safe_strerror instead of strerror.
4383 * server.h (strerror): Remove this now-unnecessary declaration.
4384 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4385 strerror.
4386 (gdb_agent_helper_thread): Likewise.
4387 * utils.c (perror_with_name): Likewise.
4388
4389 2019-11-26 Tom Tromey <tom@tromey.com>
4390
4391 * configure, config.in: Rebuild.
4392
4393 2019-11-26 Tom Tromey <tom@tromey.com>
4394
4395 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4396 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4397 gdb_sigmask.
4398 * configure, config.in: Rebuild.
4399
4400 2019-11-26 Tom Tromey <tom@tromey.com>
4401
4402 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4403 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4404 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4405 * acinclude.m4: Include ax_pthread.m4.
4406 * config.in, configure: Rebuild.
4407
4408 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4409
4410 * debug.c (debug_set_output): Call safe_strerror instead of
4411 strerror.
4412 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4413 (linux_kill_one_lwp): Likewise.
4414 (linux_detach_one_lwp): Likewise.
4415 (linux_wait_for_event_filtered): Likewise.
4416 (store_register): Likewise.
4417 * lynx-low.c (lynx_attach): Likewise.
4418 * mem-break.c (insert_memory_breakpoint): Likewise.
4419 (remove_memory_breakpoint): Likewise.
4420 (delete_fast_tracepoint_jump): Likewise.
4421 (set_fast_tracepoint_jump): Likewise.
4422 (uninsert_fast_tracepoint_jumps_at): Likewise.
4423 (reinsert_fast_tracepoint_jumps_at): Likewise.
4424 * nto-low.c (nto_xfer_memory): Likewise.
4425 (nto_resume): Likewise.
4426
4427 2019-11-20 Luis Machado <luis.machado@linaro.org>
4428
4429 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4430 instead of register count.
4431 * tdesc.c (tdesc_contains_feature): New function.
4432 * tdesc.h (tdesc_contains_feature): New prototype.
4433
4434 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4435
4436 * Makefile.in: Add safe-strerror.c.
4437 * configure: Regenerate.
4438 * configure.ac: Don't source common.host.
4439
4440 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4441
4442 * config.in: Regenerate.
4443 * configure: Regenerate.
4444
4445 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4446
4447 * ax.c (ax_printf): Handle size_t_arg.
4448
4449 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4450
4451 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4452 * mi/mi-main.c (output_cores): Likewise.
4453 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4454 (linux_xfer_osdata_modules): Likewise.
4455 * remote.c (register_remote_support_xml): Likewise.
4456 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4457 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4458
4459 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4460
4461 * configure: Regenerate.
4462 * configure.ac: Remove check for strerror_r.
4463
4464 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4465
4466 * config.in: Regenerate.
4467 * configure: Regenerate.
4468 * configure.ac: Also check for strerror_r.
4469
4470 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4471
4472 * ax.h (debug_agent): Remove duplicate declaration.
4473
4474 2019-10-26 Tom de Vries <tdevries@suse.de>
4475
4476 * linux-aarch64-low.c: Fix typos in comments.
4477 * linux-arm-low.c: Same.
4478 * linux-low.c: Same.
4479 * linux-ppc-low.c: Same.
4480 * proc-service.c: Same.
4481 * regcache.h: Same.
4482 * server.c: Same.
4483 * tracepoint.c: Same.
4484 * win32-low.c: Same.
4485
4486 2019-10-25 Tom Tromey <tromey@adacore.com>
4487
4488 * utils.c (xstrdup): Remove.
4489
4490 2019-10-23 Tom Tromey <tom@tromey.com>
4491
4492 * configure, config.in: Rebuild.
4493
4494 2019-10-23 Tom Tromey <tom@tromey.com>
4495
4496 * configure: Rebuild.
4497 * acinclude.m4: Use m4_include, not sinclude.
4498
4499 2019-10-17 Tom Tromey <tromey@adacore.com>
4500
4501 * configure: Rebuild.
4502 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4503 in AC_CONFIG_FILES invocation.
4504 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4505 invocation.
4506
4507 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4508
4509 * server.c: Include xml-builtin.h.
4510 (get_xml_features): Don't declare xml_builtins here.
4511
4512 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4513
4514 * Makefile.in: Remove references to vec-ipa.o.
4515
4516 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4517
4518 * Makefile.in: Remove references to vec.c.
4519
4520 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4521
4522 * server.c (server_waiting): Change to bool.
4523 (extended_protocol): Likewise.
4524 (response_needed): Likewise.
4525 (exit_requested): Likewise.
4526 (run_once): Likewise.
4527 (report_no_resumed): Likewise.
4528 (non_stop): Likewise.
4529 (disable_packet_vCont): Likewise.
4530 (disable_packet_Tthread): Likewise.
4531 (disable_packet_qC): Likewise.
4532 (disable_packet_qfThreadInfo): Likewise.
4533 (handle_general_set): Update.
4534 (handle_detach): Update.
4535 (handle_monitor_command): Update.
4536 (handle_query): Update.
4537 (captured_main): Update.
4538 (process_serial_event): Update.
4539 * server.h (server_waiting): Change to bool.
4540 (disable_packet_vCont): Likewise.
4541 (disable_packet_Tthread): Likewise.
4542 (disable_packet_qC): Likewise.
4543 (disable_packet_qfThreadInfo): Likewise.
4544 (run_once): Likewise.
4545 (non_stop): Likewise.
4546 * target.c (target_stop_and_wait): Update.
4547
4548 2019-10-02 Tom Tromey <tromey@adacore.com>
4549
4550 * Makefile.in (SFILES): Add common-inferior.c.
4551 (OBS): Add common-inferior.o.
4552 * server.c (startup_with_shell): Don't define.
4553
4554 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4555
4556 * linux-low.c (linux_low_read_btrace): Update for change to
4557 std::vector.
4558
4559 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4560
4561 * debug.c (debug_threads): Remove comment in favor of the header.
4562 * debug.h (using_threads): Add declaration.
4563 (debug_threads): Add comment.
4564 * linux-aarch64-low.c: Include debug.h and remove declaration of
4565 debug_threads.
4566 * nto-low.c: Likewise.
4567 * remote-utils.c: Likewise.
4568 * thread-db.c: Likewise.
4569
4570 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4571
4572 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4573 and powerpc-cell64l-ipa.o.
4574 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4575 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4576 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4577 (spu*-*-*): Remove.
4578
4579 * spu-low.c: Remove file.
4580
4581 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4582 (parse_spufs_run): Remove.
4583 (ppc_get_pc): Remove Cell/B.E. support.
4584 (ppc_set_pc): Likewise.
4585 (ppc_breakpoint_at): Likewise.
4586 (ppc_arch_setup): Likewise.
4587 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4588 tdesc_powerpc_cell32l.
4589 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4590 or init_registers_powerpc_cell32l.
4591 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4592 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4593 or init_registers_powerpc_cell32l.
4594 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4595 (init_registers_powerpc_cell32l): Remove prototype.
4596 (init_registers_powerpc_cell64l): Likewise.
4597
4598 * target.h (struct target_ops): Remove qxfer_spu member.
4599 * server.c (handle_qxfer_spu): Remove.
4600 (qxfer_packets): Remove entry for "spu".
4601 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4602 * linux-low.c (SPUFS_MAGIC): Remove.
4603 (spu_enumerate_spu_ids): Remove.
4604 (linux_qxfer_spu): Remove.
4605 (linux_target_ops): Remove qxfer_spu member.
4606 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4607 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4608 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4609
4610 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4611
4612 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4613 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4614 * config.in: Regenerate.
4615 * configure: Regenerate.
4616
4617 2019-08-15 Tom Tromey <tromey@adacore.com>
4618
4619 * target.c (target_write_memory): Use gdb::byte_vector.
4620
4621 2019-08-15 Tom Tromey <tromey@adacore.com>
4622
4623 * tracepoint.c (write_inferior_data_pointer)
4624 (write_inferior_integer, write_inferior_int8)
4625 (write_inferior_uinteger, m_tracepoint_action_download)
4626 (r_tracepoint_action_download, x_tracepoint_action_download)
4627 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4628 (download_agent_expr, download_tracepoint_1)
4629 (download_trace_state_variables, upload_fast_traceframes): Update.
4630 * server.c (gdb_write_memory): Update.
4631 * remote-utils.c (relocate_instruction): Update.
4632 * proc-service.c (ps_pdwrite): Update.
4633 * mem-break.c (remove_memory_breakpoint)
4634 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4635 (uninsert_fast_tracepoint_jumps_at)
4636 (reinsert_fast_tracepoint_jumps_at): Update.
4637 * linux-x86-low.c (append_insns)
4638 (i386_install_fast_tracepoint_jump_pad)
4639 (amd64_write_goto_address, i386_write_goto_address): Update.
4640 * linux-s390-low.c (append_insns, s390_write_goto_address):
4641 Update.
4642 * linux-ppc-low.c (ppc_relocate_instruction)
4643 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4644 (ppc_write_goto_address): Update.
4645 * linux-aarch64-low.c (append_insns): Update.
4646 * target.h (struct target_ops): Update.
4647 (write_inferior_memory): Don't declare.
4648 * target.c (target_write_memory): Rename from
4649 write_inferior_memory. Remove old target_write_memory.
4650
4651 2019-08-15 Tom Tromey <tromey@adacore.com>
4652
4653 * target.c (write_inferior_memory): Use std::vector.
4654
4655 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4656
4657 PR build/24886
4658 * configure.ac: Drop enable-libmcheck support.
4659 * configure, config.in: Rebuild.
4660 * acinclude.m4: Don't include it.
4661
4662 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4663
4664 * configure.srv: Remove Arm xml files.
4665
4666 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4667
4668 * configure.srv: Add new files. Remove xml generated files.
4669 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4670 registers.
4671 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4672 * linux-aarch32-tdesc.c: New file.
4673 * linux-aarch32-tdesc.h: New file.
4674 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4675 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4676 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4677 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4678 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4679 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4680 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4681 (arm_read_description): Call arm_linux_read_description.
4682 (initialize_low_arch): Don't init registers.
4683 * linux-arm-tdesc.c: New file.
4684 * linux-arm-tdesc.h: New file.
4685
4686 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4687
4688 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4689 Move counter inside for.
4690 (arm_read_description): Check ptrace earlier.
4691 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4692
4693 2019-07-09 Tom Tromey <tom@tromey.com>
4694
4695 * configure: Rebuild.
4696 * configure.ac: Change common to gdbsupport.
4697 * acinclude.m4: Change common to gdbsupport.
4698 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4699 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4700 common to gdbsupport.
4701 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4702 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4703 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4704 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4705 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4706 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4707 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4708 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4709 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4710 common to gdbsupport.
4711
4712 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4713
4714 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4715 defines.
4716 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4717
4718 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4719
4720 * configure.srv: Remove legacy xml.
4721 * linux-aarch64-low.c (initialize_low_arch): Remove
4722 initialize_low_tdesc call.
4723 * linux-aarch64-tdesc-selftest.c: Remove file.
4724 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4725 * linux-x86-low.c (initialize_low_arch): Remove
4726 initialize_low_tdesc call.
4727 * linux-x86-tdesc-selftest.c: Remove file.
4728 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4729
4730 2019-06-20 Tom de Vries <tdevries@suse.de>
4731
4732 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4733 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4734
4735 2019-06-19 Tom de Vries <tdevries@suse.de>
4736
4737 * debug.h (debug_write): Change return type to ssize_t.
4738 * debug.c (debug_write): Same.
4739
4740 2019-06-14 Tom Tromey <tom@tromey.com>
4741
4742 * configure.ac: Use new path to gnulib.
4743 * configure: Rebuild.
4744 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4745 to gnulib.
4746
4747 2019-06-11 Tom Tromey <tom@tromey.com>
4748
4749 * Makefile.in (SFILES): Add alloc.c.
4750 (OBS): Add alloc.o.
4751 (IPA_OBJS): Add alloc-ipa.o.
4752 (alloc-ipa.o): New target.
4753 (%.o: ../%.c): New pattern rule.
4754
4755 2019-06-10 Tom Tromey <tromey@adacore.com>
4756
4757 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4758 end warning with a newline.
4759 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4760 newline.
4761 * thread-db.c (attach_thread): Don't end warning with a newline.
4762 (thread_db_notice_clone): Likewise.
4763 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4764 newline.
4765 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4766 end warning with a newline.
4767
4768 2019-06-04 Pedro Alves <palves@redhat.com>
4769
4770 * server.c (captured_main): Use make_unique_xstrdup.
4771
4772 2019-06-02 Tom Tromey <tom@tromey.com>
4773
4774 * gdbreplay.c (fromhex): Remove.
4775 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4776
4777 2019-05-29 Tom Tromey <tromey@adacore.com>
4778
4779 * configure: Rebuild.
4780
4781 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4782
4783 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4784 sign extension code on 32-bit builds.
4785
4786 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4787
4788 * remote-utils.c:
4789 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4790
4791 2019-04-19 Tom Tromey <tom@tromey.com>
4792
4793 * server.c (struct vstop_notif): Derive from notif_event.
4794 <base>: Remove.
4795 (queue_stop_reply): Update.
4796 (remove_all_on_match_ptid): Change type. Rewrite.
4797 (discard_queued_stop_replies): Rewrite.
4798 (in_queued_stop_replies_ptid): Change type.
4799 (in_queued_stop_replies): Rewrite.
4800 (notif_stop): Update.
4801 (queue_stop_reply_callback): Update.
4802 (captured_main): Don't call initialize_notif.
4803 (push_stop_notification): Update.
4804 * notif.c (notif_write_event, handle_notif_ack)
4805 (notif_event_enque, notif_push): Update.
4806 (notif_event_xfree, initialize_notif): Remove.
4807 * notif.h (struct notif_event): Include <list>, not
4808 "common/queue.h".
4809 (struct notif_server) <queue>: Now a std::list.
4810 (notif_event_p): Remove typedef.
4811 (initialize_notif): Don't declare.
4812 (struct notif_event): Add virtual destructor.
4813
4814 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4815
4816 * ax.c (ax_vdebug): Call debug_printf.
4817 * debug.c (debug_write): New function.
4818 * debug.h (debug_write): New declaration.
4819 * linux-low.c (sigchld_handler): Call debug_write.
4820
4821 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4822
4823 * debug.c (debug_set_output): New function.
4824 (debug_vprintf): Send output to debug_file.
4825 (debug_flush): Likewise.
4826 * debug.h (debug_set_output): New declaration.
4827 * server.c (handle_monitor_command): Add debug-file option.
4828 (captured_main): Likewise.
4829
4830 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4831
4832 * debug.c (remote_debug): Add definition.
4833 * debug.h (remote_debug): Add declaration.
4834 * hostio.c (remote_debug): Remove declaration.
4835 * remote-utils.c (struct ui_file): Likewise.
4836 (remote_debug): Likewise.
4837 * remote-utils.h (remote_debug): Likewise,
4838 * server.c (remote_debug): Remove definition.
4839
4840 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4841
4842 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4843 when using a 64-bit gdbserver.
4844
4845 2019-04-09 Tom Tromey <tromey@adacore.com>
4846
4847 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4848
4849 2019-04-08 Tom Tromey <tom@tromey.com>
4850
4851 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4852 throw.
4853 (linux_resume_one_lwp): Likewise.
4854
4855 2019-04-08 Tom Tromey <tom@tromey.com>
4856
4857 * gdbreplay.c: Update.
4858 * linux-low.c: Update.
4859 * server.c: Update.
4860
4861 2019-04-08 Tom Tromey <tom@tromey.com>
4862
4863 * server.c: Use C++ exception handling.
4864 * linux-low.c: Use C++ exception handling.
4865 * gdbreplay.c: Use C++ exception handling.
4866
4867 2019-04-08 Tom Tromey <tom@tromey.com>
4868
4869 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4870 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4871 (captured_main, main): Update.
4872 * gdbreplay.c (main): Update.
4873
4874 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4875
4876 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4877 value in argument pointer, return 1 if the entry is found and 0
4878 otherwise. Move comment.
4879 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4880 * linux-low.h (linux_get_auxv): Declare.
4881 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4882
4883 2019-04-05 Tom Tromey <tromey@adacore.com>
4884
4885 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4886 variables.
4887
4888 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4889
4890 * linux-low.c (AT_HWCAP2): Add define if not already included.
4891
4892 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4893
4894 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4895 (aarch64_arch_setup): Call linux_get_hwcap.
4896 * linux-arm-low.c (arm_get_hwcap): Remove function.
4897 (arm_read_description): Call linux_get_hwcap.
4898 * linux-low.c (linux_get_auxv): New function.
4899 (linux_get_hwcap): Likewise.
4900 (linux_get_hwcap2): Likewise.
4901 * linux-low.h (linux_get_hwcap): New declaration.
4902 (linux_get_hwcap2): Likewise.
4903 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4904 (ppc_arch_setup): Call linux_get_hwcap.
4905 * linux-s390-low.c (s390_get_hwcap): Remove function.
4906 (s390_arch_setup): Call linux_get_hwcap.
4907
4908 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4909 Jiong Wang <jiong.wang@arm.com>
4910
4911 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4912 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4913 to fail.
4914 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4915
4916 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4917 Jiong Wang <jiong.wang@arm.com>
4918
4919 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4920 (aarch64_get_hwcap): New function.
4921 (aarch64_arch_setup): Read APIA hwcap.
4922
4923 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4924 Jiong Wang <jiong.wang@arm.com>
4925
4926 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4927 (initialize_low_tracepoint): Likewise.
4928 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4929 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4930 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4931 (aarch64_linux_read_description): Likewise.
4932 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4933
4934 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4935
4936 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4937 i386_create_target_description for 'segments' parameter.
4938 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4939 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4940 * win32-i386-low.c (i386_arch_setup): Likewise.
4941
4942 2019-03-12 Tom Tromey <tromey@adacore.com>
4943
4944 * linux-low.c (iterate_over_lwps): Update.
4945
4946 2019-03-06 Tom Tromey <tom@tromey.com>
4947
4948 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4949 (captured_main): Use SCOPE_EXIT.
4950
4951 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4952
4953 * configure.srv: Use '$enable_unittest' instead of '$development'
4954 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4955 case.
4956
4957 2019-02-27 Tom Tromey <tromey@adacore.com>
4958
4959 * gdbreplay.c (logchar): Handle \r\n.
4960
4961 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4962
4963 * linux-low.c (linux_attach): Add process before lwp.
4964 * server.c (attach_inferior): Check if already attached.
4965
4966 2019-02-07 Tom Tromey <tom@tromey.com>
4967
4968 * x86-tdesc.h: Rename include guard.
4969 * x86-low.h: Add include guard.
4970 * wincecompat.h: Rename include guard.
4971 * win32-low.h: Add include guard.
4972 * utils.h: Rename include guard.
4973 * tracepoint.h: Rename include guard.
4974 * tdesc.h: Rename include guard.
4975 * target.h: Rename include guard.
4976 * server.h: Rename include guard.
4977 * remote-utils.h: Rename include guard.
4978 * regcache.h: Rename include guard.
4979 * nto-low.h: Rename include guard.
4980 * notif.h: Add include guard.
4981 * mem-break.h: Rename include guard.
4982 * lynx-low.h: Add include guard.
4983 * linux-x86-tdesc.h: Add include guard.
4984 * linux-s390-tdesc.h: Add include guard.
4985 * linux-ppc-tdesc-init.h: Add include guard.
4986 * linux-low.h: Add include guard.
4987 * linux-aarch64-tdesc.h: Add include guard.
4988 * linux-aarch32-low.h: Add include guard.
4989 * inferiors.h: Rename include guard.
4990 * i387-fp.h: Rename include guard.
4991 * hostio.h: Rename include guard.
4992 * gdbthread.h: Rename include guard.
4993 * gdb_proc_service.h: Rename include guard.
4994 * event-loop.h: Rename include guard.
4995 * dll.h: Rename include guard.
4996 * debug.h: Rename include guard.
4997 * ax.h: Rename include guard.
4998
4999 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5000
5001 PR gdb/23985
5002 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5003 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5004
5005 2019-01-25 Tom Tromey <tom@tromey.com>
5006
5007 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5008
5009 2019-01-25 Tom Tromey <tom@tromey.com>
5010
5011 * win32-low.c: Fix common/ includes.
5012 * win32-i386-low.c: Fix common/ includes.
5013 * tracepoint.c: Fix common/ includes.
5014 * thread-db.c: Fix common/ includes.
5015 * target.h: Fix common/ includes.
5016 * symbol.c: Fix common/ includes.
5017 * spu-low.c: Fix common/ includes.
5018 * server.h: Fix common/ includes.
5019 * server.c: Fix common/ includes.
5020 * remote-utils.c: Fix common/ includes.
5021 * regcache.h: Fix common/ includes.
5022 * regcache.c: Fix common/ includes.
5023 * nto-x86-low.c: Fix common/ includes.
5024 * notif.h: Fix common/ includes.
5025 * mem-break.h: Fix common/ includes.
5026 * lynx-low.c: Fix common/ includes.
5027 * lynx-i386-low.c: Fix common/ includes.
5028 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5029 * linux-x86-low.c: Fix common/ includes.
5030 * linux-low.c: Fix common/ includes.
5031 * inferiors.h: Fix common/ includes.
5032 * i387-fp.c: Fix common/ includes.
5033 * hostio.c: Fix common/ includes.
5034 * hostio-errno.c: Fix common/ includes.
5035 * gdbthread.h: Fix common/ includes.
5036 * gdbreplay.c: Fix common/ includes.
5037 * fork-child.c: Fix common/ includes.
5038 * event-loop.c: Fix common/ includes.
5039 * ax.c:
5040 (enum gdb_agent_op): Fix common/ includes.
5041
5042 2019-01-21 Tom Tromey <tom@tromey.com>
5043
5044 * tracepoint.c: Fix includes.
5045 * remote-utils.c: Fix includes.
5046 * linux-x86-low.c: Fix includes.
5047
5048 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5049
5050 * gdbreplay.c (gdbreplay_version): Update copyright year in
5051 version message.
5052 * server.c (gdbserver_version): Likewise.
5053
5054 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5055
5056 * linux-low.c (add_lwp): Switch ordering.
5057
5058 2018-11-29 Tom Tromey <tom@tromey.com>
5059
5060 * win32-low.c (win32_join): Take pid, not process.
5061 * target.h (struct target_ops) <join>: Change argument type.
5062 (join_inferior): Change argument name.
5063 * spu-low.c (spu_join): Take pid, not process.
5064 * server.c (handle_detach): Preserve pid before destroying
5065 process.
5066 * lynx-low.c (lynx_join): Take pid, not process.
5067 * linux-low.c (linux_join): Take pid, not process.
5068
5069 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5070
5071 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5072 (aarch64_cannot_fetch_register): Likewise.
5073 (struct linux_target_ops): Update references.
5074
5075 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5076
5077 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5078
5079 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5080
5081 * configure.srv (ipa_ppc_linux_regobj): Add
5082 powerpc-isa207-htm-vsx32l-ipa.o and
5083 powerpc-isa207-htm-vsx64l-ipa.o.
5084 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5085 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5086 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5087 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5088 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5089 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5090 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5091 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5092 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5093 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5094 (init_registers_powerpc_isa207_htm_vsx32l)
5095 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5096 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5097 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5098 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5099 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5100 (ppc_store_tm_ctarregset): New functions.
5101 (ppc_regsets): Add entries for HTM regsets.
5102 (ppc_arch_setup): Set htm in features struct when needed. Set
5103 sizes for the HTM regsets.
5104 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5105 (initialize_low_arch): Call
5106 init_registers_powerpc_isa207_htm_vsx32l and
5107 init_registers_powerpc_isa207_htm_vsx64l.
5108 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5109 PPC_TDESC_ISA207_HTM_VSX.
5110 (initialize_low_tracepoint): Call
5111 init_registers_powerpc_isa207_htm_vsx32l and
5112 init_registers_powerpc_isa207_htm_vsx64l.
5113
5114 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5115
5116 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5117 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5118 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5119 (ppc_store_pmuregset): New functions.
5120 (ppc_regsets): Add entries for ebb and pmu regsets.
5121 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5122 pmu regsets are available. Set sizes for these regsets.
5123
5124 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5125
5126 * configure.srv (ipa_ppc_linux_regobj): Add
5127 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5128 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5129 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5130 rs6000/powerpc-isa207-vsx32l.xml, and
5131 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5132 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5133 <PPC_TDESC_ISA207_VSX>: New enum value.
5134 (init_registers_powerpc_isa207_vsx32l): Declare.
5135 (init_registers_powerpc_isa207_vsx64l): Declare.
5136 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5137 (ppc_store_tarregset): New function.
5138 (ppc_regsets): Add entry for the TAR regset.
5139 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5140 size for the TAR regsets.
5141 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5142 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5143 and init_registers_powerpc_isa207_vsx64l.
5144 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5145 (initialize_low_tracepoint): Call
5146 init_registers_powerpc_isa207_vsx32l and
5147 init_registers_powerpc_isa207_vsx64l.
5148
5149 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5150 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5151
5152 * configure.srv (ipa_ppc_linux_regobj): Add
5153 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5154 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5155 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5156 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5157 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5158 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5159 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5160 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5161 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5162 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5163 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5164 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5165 (ppc_hwcap): Add comment.
5166 (ppc_hwcap2): New global.
5167 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5168 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5169 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5170 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5171 when needed. Set sizes for the the DSCR and PPR regsets.
5172 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5173 (initialize_low_arch): Call
5174 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5175 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5176 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5177 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5178 (initialize_low_tracepoint): Call
5179 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5180 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5181
5182 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5183
5184 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5185
5186 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5187 Simon Marchi <simark@simark.ca>
5188
5189 * acinclude.m4: Include "../selftest.m4".
5190 * configure: Regenerate.
5191 * configure.ac: Use "GDB_AC_SELFTEST".
5192 * configure.srv: Use "$enable_unittests" instead of
5193 "$development" when checking whether unit tests have been
5194 enabled.
5195 * server.c (captured_main): Update message informing that
5196 selftests have been disabled.
5197
5198 2018-10-04 Tom Tromey <tom@tromey.com>
5199
5200 * configure: Rebuild.
5201
5202 2018-10-04 Tom Tromey <tom@tromey.com>
5203
5204 * server.c (handle_status): Rename inner "thread".
5205 (process_serial_event): Declare "res" in 'm' case.
5206 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5207 (iterate_over_lwps): Rename inner "thread".
5208 (linux_qxfer_libraries_svr4): Rename inner "len".
5209 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5210
5211 2018-10-01 Gary Benson <gbenson@redhat.com>
5212
5213 * gdb_proc_service.h: Moved common code to
5214 common/gdb_proc_service.h.
5215
5216 2018-10-01 Gary Benson <gbenson@redhat.com>
5217
5218 * gdb_proc_service.h: Synchronize comments and whitespace with
5219 GDB's version of this file.
5220
5221 2018-09-25 Tom Tromey <tom@tromey.com>
5222
5223 * configure: Rebuild.
5224 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5225
5226 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5227
5228 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5229 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5230 ($(IPA_LIB)): Sort IPA_OBJS.
5231
5232 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5233
5234 * Makefile.in: Remove references to $(ADD_DEPS).
5235
5236 2018-09-16 Tom Tromey <tom@tromey.com>
5237
5238 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5239 variables.
5240 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5241 variables.
5242
5243 2018-09-05 Tom Tromey <tom@tromey.com>
5244
5245 * configure: Rebuild.
5246
5247 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5248
5249 PR build/23399
5250 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5251
5252 2018-08-27 Tom Tromey <tom@tromey.com>
5253
5254 PR build/23087:
5255 * configure: Rebuild.
5256
5257 2018-08-27 Tom Tromey <tom@tromey.com>
5258
5259 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5260 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5261 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5262 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5263 (s390x_emit_stack_adjust): Add casts to unsigned char.
5264
5265 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5266
5267 PR gdb/23374
5268 PR gdb/23375
5269 * server.h (struct client_state) <disable_randomization>:
5270 Initialize to 1.
5271
5272 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5273
5274 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5275 variable.
5276 (mips_supply_ptrace_register): Likewise.
5277
5278 2018-07-22 Tom Tromey <tom@tromey.com>
5279
5280 * configure: Rebuild.
5281
5282 2018-07-22 Tom Tromey <tom@tromey.com>
5283
5284 * win32-low.c (win32_create_inferior): Remove unused variables.
5285 * gdbreplay.c (remote_open): Remove unused variable.
5286 * remote-utils.c (remote_prepare): Remove unused variable.
5287 * x86-tdesc.h (X86_TDESC_H): Define.
5288 (amd64_expedite_regs): Define conditionally.
5289 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5290 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5291 * remote-utils.c (readchar): Remove unused variable.
5292
5293 2018-07-13 Pedro Alves <palves@redhat.com>
5294
5295 * linux-low.c (linux_kill): Change parameter to process_info
5296 pointer instead of pid. Adjust.
5297 * lynx-low.c (lynx_kill): Likewise.
5298 * nto-low.c (nto_kill): Likewise.
5299 * spu-low.c (spu_kill): Likewise.
5300 * win32-low.c (win32_kill): Likewise.
5301 * server.c (handle_v_kill, kill_inferior_callback)
5302 (detach_or_kill_for_exit): Adjust.
5303 * target.c (kill_inferior): Change parameter to process_info
5304 pointer instead of pid. Adjust.
5305 * target.h (struct target_ops) <kill>: Change parameter to
5306 process_info pointer instead of pid. Adjust all implementations
5307 and callers.
5308 (kill_inferior): Likewise.
5309
5310 2018-07-13 Pedro Alves <palves@redhat.com>
5311
5312 * linux-low.c (linux_detach, linux_join): Change parameter to
5313 process_info pointer instead of pid. Adjust.
5314 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5315 * nto-low.c (nto_detach): Likewise.
5316 * spu-low.c (spu_detach, spu_join): Likewise.
5317 * win32-low.c (win32_detach, win32_join): Likewise.
5318 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5319 * target.h (struct target_ops) <detach, join>: Change parameter to
5320 process_info pointer instead of pid. Adjust all implementations
5321 and callers.
5322 (detach_inferior, join_inferior): Rename 'pid' parameter to
5323 'proc'.
5324
5325 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5326 Jan Kratochvil <jan.kratochvil@redhat.com>
5327 Paul Fertser <fercerpav@gmail.com>
5328 Tsutomu Seki <sekiriki@gmail.com>
5329
5330 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5331 (OBS): Add 'common/netstuff.o'.
5332 (GDBREPLAY_OBS): Likewise.
5333 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5334 (remote_open): Implement support for IPv6
5335 connections.
5336 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5337 and 'wspiapi.h'.
5338 (handle_accept_event): Accept connections from IPv6 sources.
5339 (remote_prepare): Handle IPv6-style hostnames; implement
5340 support for IPv6 connections.
5341 (remote_open): Implement support for printing connections from
5342 IPv6 sources.
5343
5344 2018-07-11 Pedro Alves <palves@redhat.com>
5345
5346 PR gdb/23377
5347 * mem-break.c (any_persistent_commands): Add process_info
5348 parameter and use it instead of relying on the current process.
5349 Change return type to bool.
5350 * mem-break.h (any_persistent_commands): Add process_info
5351 parameter and change return type to bool.
5352 * server.c (handle_detach): Remove require_running_or_return call.
5353 Look up the process_info for the process we're about to detach.
5354 If not found, return back error to GDB. Adjust
5355 any_persistent_commands call to pass down a process pointer.
5356
5357 2018-07-11 Pedro Alves <palves@redhat.com>
5358
5359 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5360 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5361 instead of collect_register_by_name.
5362 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5363 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5364
5365 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5366 Pedro Alves <palves@redhat.com>
5367
5368 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5369
5370 2018-07-03 Tom Tromey <tom@tromey.com>
5371
5372 * linux-low.c: Update.
5373 * lynx-low.c: Update.
5374 * mem-break.c: Update.
5375 * nto-low.c: Update.
5376 * remote-utils.c: Update.
5377 * server.c: Update.
5378 * spu-low.c: Update.
5379 * target.c: Update.
5380 * win32-low.c: Update.
5381
5382 2018-07-03 Tom Tromey <tom@tromey.com>
5383
5384 * server.c: Update.
5385
5386 2018-07-03 Tom Tromey <tom@tromey.com>
5387
5388 * linux-low.c: Update.
5389
5390 2018-07-03 Tom Tromey <tom@tromey.com>
5391
5392 * target.c: Update.
5393
5394 2018-07-03 Tom Tromey <tom@tromey.com>
5395
5396 * linux-low.c: Update.
5397 * linux-mips-low.c: Update.
5398 * lynx-low.c: Update.
5399 * nto-low.c: Update.
5400 * remote-utils.c: Update.
5401 * server.c: Update.
5402 * spu-low.c: Update.
5403 * target.c: Update.
5404 * thread-db.c: Update.
5405
5406 2018-07-03 Tom Tromey <tom@tromey.com>
5407
5408 * linux-low.c: Update.
5409 * linux-mips-low.c: Update.
5410 * lynx-low.c: Update.
5411 * mem-break.c: Update.
5412 * nto-low.c: Update.
5413 * remote-utils.c: Update.
5414 * server.c: Update.
5415 * spu-low.c: Update.
5416 * target.c: Update.
5417 * tracepoint.c: Update.
5418
5419 2018-07-03 Tom Tromey <tom@tromey.com>
5420
5421 * linux-low.c: Update.
5422 * linux-ppc-low.c: Update.
5423 * linux-x86-low.c: Update.
5424 * proc-service.c: Update.
5425 * server.c: Update.
5426 * spu-low.c: Update.
5427 * thread-db.c: Update.
5428 * win32-low.c: Update.
5429
5430 2018-07-03 Tom Tromey <tom@tromey.com>
5431
5432 * linux-low.c: Update.
5433 * lynx-low.c: Update.
5434 * nto-low.c: Update.
5435 * remote-utils.c: Update.
5436 * spu-low.c: Update.
5437 * thread-db.c: Update.
5438 * win32-low.c: Update.
5439
5440 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5441
5442 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5443 parameter in call to 'amd64_create_target_description'.
5444
5445 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5446
5447 * x86-tdesc.h: Remove executable permission flag.
5448
5449 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5450
5451 * configure.ac: Remove AC_PREREQ, add missing quoting.
5452 * configure: Re-generate.
5453 * config.in: Re-generate.
5454 * aclocal.m4: Re-generate.
5455
5456 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5457
5458 * tracepoint.h (current_traceframe): Remove declaration.
5459
5460 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5461
5462 * linux-aarch64-low.c (is_sve_tdesc): New function.
5463 (aarch64_sve_regs_copy_to_regcache): Likewise.
5464 (aarch64_sve_regs_copy_from_regcache): Likewise.
5465 (aarch64_regs_info): Add SVE checks.
5466 (initialize_low_arch): Initialize SVE.
5467
5468 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5469
5470 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5471
5472 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5473
5474 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5475 (initialize_low_tracepoint): Likewise
5476 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5477 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5478 param.
5479 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5480 checks.
5481 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5482
5483 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5484
5485 * server.h (PBUFSIZ): Increase size
5486
5487 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5488
5489 * regcache.c (regcache::raw_compare): New function.
5490 * regcache.h (regcache::raw_compare): New declaration.
5491
5492 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5493
5494 * regcache.c (new_register_cache): Use new.
5495 (free_register_cache): Use delete.
5496 (register_data): Use const.
5497 (supply_register): Move body inside regcache.
5498 (regcache::raw_supply): New override function.
5499 (collect_register): Move body inside regcache.
5500 (regcache::raw_collect): New override function.
5501 (regcache::get_register_status): New override function.
5502 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5503
5504 2018-06-09 Tom Tromey <tom@tromey.com>
5505
5506 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5507 declare queue.
5508 (event_queue): Use std::queue.
5509 (gdb_event_xfree): Remove.
5510 (initialize_event_loop, process_event, wait_for_event): Update.
5511
5512 2018-06-08 Stan Cox <scox@redhat.com>
5513
5514 * win32-low.c (win32_create_inferior): last_ptid and last_status
5515 moved to client_state.
5516
5517 2018-06-08 Pedro Alves <palves@redhat.com>
5518
5519 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5520 common/common-exceptions.o, common/common-utils.o,
5521 common/errors.o, common/print-utils.o and utils.o.
5522 * gdbreplay.c: Include "common-defs.h" instead of the two
5523 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5524 string.h or alloca.h.
5525 (perror_with_name): Delete.
5526 (remote_open): Use xstrdup instead of strdup.
5527 (main): Rename to ...
5528 (captured_main): ... this.
5529 (main): New.
5530
5531 2018-06-08 Tom Tromey <tom@tromey.com>
5532
5533 * linux-low.c (linux_low_read_btrace): Update.
5534
5535 2018-06-04 Stan Cox <scox@redhat.com>
5536
5537 * server.h (struct client_state): New.
5538 * server.c (cont_thread, general_thread, multi_process)
5539 (report_fork_events, report_vfork_events, report_exec_events)
5540 (report_thread_events, swbreak_feature, hwbreak_feature)
5541 (vCont_supported, disable_randomization, pass_signals)
5542 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5543 Moved to client_state.
5544 * remote-utils.c (remote_debug, noack_mode)
5545 (transport_is_reliable): Moved to client_state.
5546 * tracepoint.c (current_traceframe): Moved to client_state.
5547
5548 Update all callers.
5549 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5550 linux-low.c, remote-utils.h, target.c: Use client_state.
5551
5552 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5553
5554 * configure.srv: Add new c/h file.
5555
5556 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5557
5558 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5559 null VQ.
5560
5561 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5562
5563 * gdb.arch/mips-fpregset-core.exp: New test.
5564 * gdb.arch/mips-fpregset-core.c: New test source.
5565
5566 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5567
5568 PR server/23198
5569 * hostio.c (require_int): Do not report overflow for integers
5570 between 0xfffffff and 0x7fffffff.
5571
5572 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5573
5574 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5575 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5576 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5577 functions.
5578 (the_low_target): Wire them.
5579
5580 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5581
5582 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5583 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5584 mode. Call collect_register_by_name with vscr using
5585 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5586 (ppc_store_vrregset): Add and set vscr_offset variable as in
5587 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5588 vscr_offset.
5589
5590 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5591
5592 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5593 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5594 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5595
5596 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5597
5598 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5599 (ppc_store_vsxregset): Likewise.
5600 (ppc_fill_vrregset): Likewise.
5601 (ppc_store_vrregset): Likewise.
5602 (ppc_fill_evrregset): Likewise.
5603 (ppc_store_evrregset): Likewise.
5604 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5605 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5606 needed.
5607
5608 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5609
5610 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5611 wordsize of the inferior. Call ppc_linux_target_wordsize.
5612
5613 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5614
5615 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5616 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5617 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5618 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5619 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5620 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5621 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5622 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5623 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5624 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5625 (tdesc_powerpc_e500l): Remove.
5626 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5627 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5628 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5629 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5630 linux-ppc-tdesc.h.
5631 (ppc_arch_setup): Remove target description matching code. Fill a
5632 ppc_linux_features struct and call ppc_linux_match_description
5633 with it.
5634
5635 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5636
5637 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5638 width of the requested register exceeds the width of the
5639 `ptrace' data type.
5640 (mips_cannot_store_register): Likewise.
5641
5642 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5643
5644 * linux-mips-low.c (mips_fetch_register): New function. Update
5645 preceding comment.
5646 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5647 (the_low_target): Wire `mips_fetch_register'.
5648
5649 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5650
5651 * lynx-i386-low.c (LYNXOS_178): New macro.
5652 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5653 the layout on LynxOS-178.
5654 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5655 handle floating point registers that are not supported by
5656 LynxOS-178.
5657
5658 2018-05-10 Tom Tromey <tom@tromey.com>
5659
5660 * configure: Rebuild.
5661
5662 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5663
5664 PR server/23158:
5665 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5666 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5667 Use it to set the expedite_regs field in the given tdesc.
5668 * x86-tdesc.h: New file.
5669 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5670 Adjust following the addition of the new expedite_regs parameter
5671 to init_target_desc.
5672 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5673 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5674 (i386_linux_read_description, amd64_linux_read_description):
5675 Adjust following the addition of the new expedite_regs parameter
5676 to init_target_desc.
5677 * lynx-i386-low.c: #include "x86-tdesc.h".
5678 (lynx_i386_arch_setup): Adjust following the addition of the new
5679 expedite_regs parameter to init_target_desc.
5680 * nto-x86-low.c: #include "x86-tdesc.h".
5681 (nto_x86_arch_setup): Adjust following the addition of the new
5682 expedite_regs parameter to init_target_desc.
5683 * win32-i386-low.c: #include "x86-tdesc.h".
5684 (i386_arch_setup): Adjust following the addition of the new
5685 expedite_regs parameter to init_target_desc.
5686
5687 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5688
5689 PR server/23158:
5690 * win32-low.c (win32_create_inferior): Add call to my_wait
5691 setting last_status global.
5692
5693 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5694
5695 PR server/23158:
5696 * win32-low.c (create_process): Only call gdb_tilde_expand if
5697 inferior_cwd is not NULL.
5698
5699 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5700
5701 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5702 registers to the cache if their values have changed.
5703 (i387_xsave_to_cache): Provide default values for x87 control
5704 registers when these features are available, but disabled.
5705 * regcache.c (supply_register_by_name_zeroed): New function.
5706 * regcache.h (supply_register_by_name_zeroed): Declare new
5707 function.
5708
5709 2018-05-07 Tom Tromey <tom@tromey.com>
5710
5711 * configure: Rebuild.
5712
5713 2018-05-04 Tom Tromey <tom@tromey.com>
5714
5715 * configure: Rebuild.
5716
5717 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5718 Pedro Alves <palves@redhat.com>
5719
5720 * linux-aarch64-low.c (aarch64_stopped_data_address):
5721 Likewise.
5722
5723 2018-04-27 Tom Tromey <tom@tromey.com>
5724
5725 * configure: Rebuild.
5726
5727 2018-04-23 Tom Tromey <tom@tromey.com>
5728
5729 * configure: Rebuild.
5730
5731 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5732
5733 * Makefile.in (depcomp): Add "..".
5734 (all_deps_files): New and use it.
5735
5736 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5737
5738 * configure.srv (aarch64*-*-linux*): Don't include xml.
5739 (i[34567]86-*-cygwin*): Likewise.
5740 (i[34567]86-*-linux*): Likewise.
5741 (i[34567]86-*-lynxos*): Likewise.
5742 (i[34567]86-*-mingw32ce*): Likewise.
5743 (i[34567]86-*-mingw*): Likewise.
5744 (i[34567]86-*-nto*): Likewise.
5745 (tic6x-*-uclinux): Likewise.
5746 (x86_64-*-linux*): Likewise.
5747 (x86_64-*-mingw*): Likewise.
5748 (x86_64-*-cygwin*): Likewise.
5749
5750 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5751
5752 * tdesc.c: Remove xml parameter.
5753
5754 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5755
5756 * server.c (get_features_xml): Remove cast.
5757 * tdesc.c (void target_desc::accept): Fill in function.
5758 (tdesc_get_features_xml): Remove old xml creation.
5759 (print_xml_feature::visit_pre): Add xml vistor.
5760 * tdesc.h (struct target_desc): Make xmltarget mutable.
5761 (tdesc_get_features_xml): Remove declaration.
5762
5763 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5764
5765 * tdesc.c (tdesc_architecture_name): Add new function.
5766 (tdesc_osabi_name): Likewise.
5767 (tdesc_get_features_xml): Use new functions.
5768
5769 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5770
5771 * tdesc.c (tdesc_create_flags): Remove.
5772 (tdesc_add_flag): Likewise.
5773 (tdesc_named_type): Likewise.
5774 (tdesc_create_union): Likewise.
5775 (tdesc_create_struct): Likewise.
5776 (tdesc_create_vector): Likewise.
5777 (tdesc_add_bitfield): Likewise.
5778 (tdesc_add_field): Likewise.
5779 (tdesc_set_struct_size): Likewise.
5780
5781 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5782
5783 * tdesc.c (~target_desc): Remove implictly deleted items.
5784 (init_target_desc): Iterate all features.
5785 (tdesc_get_features_xml): Use vector.
5786 (tdesc_create_feature): Create feature.
5787 * tdesc.h (tdesc_feature) Remove
5788 (target_desc): Add features.
5789
5790 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5791
5792 * Makefile.in: Add common/tdesc.c
5793 * tdesc.c (init_target_desc): init all reg_defs from register
5794 vector.
5795 (tdesc_create_reg): Create tdesc_reg.
5796 * tdesc.h (tdesc_feature): Add register vector.
5797
5798 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5799
5800 * tdesc.h (struct target_desc) <features>: Change type to
5801 std::vector<std::string>.
5802 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5803 changes.
5804 (tdesc_get_features_xml): Likewise.
5805 (tdesc_create_feature): Likewise.
5806
5807 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5808
5809 * regcache.c (find_register_by_number): Return a ref.
5810 (find_regno): Use references.
5811 (register_size): Likewise.
5812 (register_data): Likewise.
5813 * tdesc.c (target_desc::~target_desc): Remove free calls.
5814 (target_desc::operator==): Use std::vector compare.
5815 (init_target_desc): Use reference.
5816 (tdesc_create_reg): Use reg constructors.
5817 * tdesc.h (struct target_desc): Replace pointer with object.
5818
5819 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5820
5821 * regcache.c (find_register_by_number): Make static.
5822 (find_regno): Use find_register_by_number
5823 * regcache.h (struct reg): Remove declaration.
5824
5825 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5826
5827 * tdesc.c (target_desc::~target_desc): Move to here.
5828 (target_desc::operator==): Likewise.
5829 * tdesc.h (target_desc::~target_desc): Move from here.
5830 (target_desc::operator==): Likewise.
5831
5832 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5833
5834 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5835
5836 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5837
5838 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5839 S390_TDESC_GS.
5840 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5841 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5842 and init_registers_s390_gs_linux64.
5843
5844 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5845
5846 * linux-s390-low.c (s390_fill_gs): Remove function.
5847 (s390_fill_gsbc): Remove function.
5848 (s390_regsets): Set fill functions for the guarded storage regsets
5849 to NULL.
5850
5851 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5852
5853 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5854 the word size. Add comment.
5855 (s390_get_wordsize): New function.
5856 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5857 pswm with it. Instead, use s390_get_wordsize to determine the
5858 word size first and derive the correct tdesc from that directly.
5859
5860 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5861
5862 * Makefile.in: Include silent-rules.mk.
5863 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5864 (COMPILE): Add ECHO_CXX.
5865 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5866 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5867 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5868 (version-generated.c): Add ECHO_GEN.
5869 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5870 (IPAGENT_COMPILE): Add ECHO_CXX.
5871 (%-generated.c): Add ECHO_REGDAT.
5872
5873 2018-03-14 Tom Tromey <tom@tromey.com>
5874
5875 PR cli/14977:
5876 * ax.c (ax_printf): Special case for NULL.
5877
5878 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5879
5880 * linux-low.c (linux_qxfer_libraries_svr4): Use
5881 xml_escape_text_append.
5882
5883 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5884
5885 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5886
5887 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5888
5889 * server.c (handle_general_set): Remove unnecessary xstrdup.
5890
5891 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5892
5893 * server.c (parse_debug_format_options): Adjust to
5894 delim_string_to_char_ptr_vec changes.
5895 * thread-db.c (thread_db_load_search): Adjust to
5896 dirnames_to_char_ptr_vec changes.
5897
5898 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5899
5900 * target.h (target_enable_btrace, target_disable_btrace)
5901 (target_read_btrace, target_read_btrace_conf): Turn macro into
5902 inline function. Throw error if target method is not defined.
5903 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5904 check for btrace target method. Be prepared to handle exceptions
5905 from btrace target methods.
5906
5907 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5908
5909 * server.c (captured_main): Change order of error message printed
5910 when the current working directory cannot be found.
5911
5912 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5913
5914 * server.c: Include "filenames.h" and "pathstuff.h".
5915 (program_name): Delete variable.
5916 (program_path): New anonymous class.
5917 (get_exec_wrapper): Use "program_path" instead of
5918 "program_name".
5919 (handle_v_run): Likewise.
5920 (captured_main): Likewise.
5921 (process_serial_event): Likewise.
5922
5923 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5924
5925 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5926 (OBJS): Add "pathstuff.o".
5927 * server.c (current_directory): New global variable.
5928 (captured_main): Initialize "current_directory".
5929
5930 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5931
5932 * tdesc.c: Use common/tdesc.h.
5933 * tdesc.h: Likewise.
5934
5935 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5936 Simon Marchi <simon.marchi@ericsson.com>
5937
5938 * Makefile.in: Switch order of make rules.
5939
5940 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5941
5942 * Makefile.in: Add common directory in build.
5943 * configure.ac: Add common reference.
5944 * configure: Regenerate.
5945
5946 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5947
5948 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5949 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5950 * spu-low.c (spu_target_ops): Likewise.
5951 * win32-low.c (win32_target_ops): Likewise.
5952 * server.c (supported_btrace_packets): Report packets unconditionally.
5953 * target.h (target_ops) <supports_btrace>: Remove.
5954 (target_supports_btrace): Remove.
5955
5956 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5957
5958 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5959 (handle_btrace_disable): Change return type to void. Use exceptions
5960 to report errors.
5961 (handle_btrace_general_set): Catch exception and copy message to
5962 return message.
5963
5964 2018-02-08 Tom Tromey <tom@tromey.com>
5965
5966 * linux-low.c (install_software_single_step_breakpoints): Use
5967 make_scoped_restore.
5968 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5969 (do_restore_current_thread_cleanup): Remove.
5970 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5971 declare.
5972
5973 2018-02-08 Tom Tromey <tom@tromey.com>
5974
5975 * mem-break.c (set_raw_breakpoint_at): Use
5976 gdb::unique_xmalloc_ptr.
5977
5978 2018-01-30 Pedro Alves <palves@redhat.com>
5979
5980 PR gdb/13211
5981 * target.c (target_terminal::terminal_state): Rename to ...
5982 (target_terminal::m_terminal_state): ... this.
5983
5984 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5985
5986 * linux-low.c (handle_extended_wait): Surround call to
5987 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5988
5989 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5990
5991 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5992 linux_ptrace_attach_fail_reason_string now returning an
5993 std::string.
5994 (linux_attach): Likewise.
5995 * thread-db.c (attach_thread): Likewise.
5996
5997 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5998
5999 PR gdb/21559
6000 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6001 checking for fs_base/gs_base fields in struct user_regs_struct.
6002 * configure: Regenerate.
6003
6004 2018-01-16 Yao Qi <yao.qi@linaro.org>
6005
6006 PR gdb/18749
6007 * linux-low.c (fetch_register): Call supply_register instead of
6008 error.
6009
6010 2018-01-08 Yao Qi <yao.qi@linaro.org>
6011 Simon Marchi <simon.marchi@ericsson.com>
6012
6013 * Makefile.in (OBS): Remove selftest.o.
6014 * configure.ac: Set srv_selftest_objs if $development is true.
6015 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6016 * configure: Re-generated.
6017 * server.c (captured_main): Wrap variable selftest_filter with
6018 GDB_SELF_TEST.
6019
6020 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6021
6022 * server.c (parse_debug_format_options): Return std::string.
6023 (handle_monitor_command, captured_main): Adjust.
6024
6025 2018-01-05 Pedro Alves <palves@redhat.com>
6026
6027 PR gdb/18653
6028 * server.c (captured_main): Pass quiet=false to
6029 save_original_signals_state.
6030
6031 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6032
6033 * gdbreplay.c (gdbreplay_version): Update copyright year in
6034 version message.
6035 * server.c (gdbserver_version): Likewise.
6036
6037 2017-12-08 Tom Tromey <tom@tromey.com>
6038
6039 * ax.c (ax_printf): Update.
6040
6041 2017-12-07 Yao Qi <yao.qi@linaro.org>
6042
6043 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6044 aarch64_linux_read_description.
6045 * linux-amd64-ipa.c (idx2mask): New array.
6046 (get_ipa_tdesc): Move idx2mask out.
6047 (initialize_low_tracepoint): Initialize target descriptions.
6048 * linux-i386-ipa.c (idx2mask): New array.
6049 (get_ipa_tdesc): Move idx2mask out.
6050 (initialize_low_tracepoint): Initialize target descriptions.
6051
6052 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6053
6054 * tdesc.c (struct tdesc_type): Change return type.
6055 (tdesc_add_flag): Change parameter type.
6056 (tdesc_add_bitfield): Likewise.
6057 (tdesc_add_field): Likewise.
6058 (tdesc_set_struct_size): Likewise.
6059
6060 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6061
6062 * regcache.c (registers_to_string): Remove unused variable.
6063
6064 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6065
6066 * inferiors.c (for_each_inferior_with_data): Remove.
6067 * inferiors.h (for_each_inferior_with_data): Remove.
6068 * server.c (handle_qxfer_threads_worker): Change parameter type.
6069 (handle_qxfer_threads_proper): Use for_each_thread.
6070
6071 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6072
6073 * inferiors.c (for_each_inferior): Remove.
6074 (clear_inferiors): Use for_each_thread.
6075 * inferiors.h (for_each_inferior): Remove.
6076 * linux-low.c (linux_wait_for_event_filtered): Use
6077 for_each_thread.
6078 (linux_stabilize_threads): Likewise.
6079 * regcache.c (regcache_release): Likewise.
6080 * server.c (gdb_wants_all_threads_stopped): Likewise.
6081 (clear_pending_status_callback): Remove.
6082 (handle_status): Use for_each_thread.
6083 (captured_main): Likewise.
6084 * win32-low.c (child_init_thread_list): Likewise.
6085 (win32_clear_inferiors): Likewise.
6086 (fake_breakpoint_event): Likewise.
6087
6088 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6089
6090 * inferiors.h (find_inferior): Remove.
6091 * inferiors.c (find_inferior): Remove.
6092
6093 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6094
6095 * linux-low.c (resume_status_pending_p): Update comment.
6096 (need_step_over_p): Update comment.
6097
6098 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6099
6100 * linux-low.c (proceed_one_lwp): Return void, change parameter
6101 type.
6102 (unsuspend_and_proceed_one_lwp): Likewise.
6103 (proceed_all_lwps): Use for_each_thread.
6104 (unstop_all_lwps): Likewise.
6105
6106 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6107
6108 * linux-low.c (linux_resume_one_thread): Return void, take
6109 parameter directly.
6110 (linux_resume): Use for_each_thread.
6111
6112 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6113
6114 * linux-low.c (send_sigstop_callback): Return void, change
6115 parameter type. Rename to...
6116 (send_sigstop): ... this.
6117 (suspend_and_send_sigstop_callback): Return void, change parameter
6118 type. Rename to...
6119 (suspend_and_send_sigstop): ... this.
6120 (stop_all_lwps): Use for_each_thread.
6121
6122 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6123
6124 * linux-low.c (lwp_running): Return bool, remove unused
6125 argument.
6126 (linux_stabilize_threads): Use find_thread.
6127
6128 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6129
6130 * linux-low.c (select_singlestep_lwp_callback): Remove.
6131 (count_events_callback): Remove.
6132 (select_event_lwp_callback): Remove.
6133 (select_event_lwp): Use find_thread/for_each_thread.
6134
6135 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6136
6137 * linux-low.c (not_stopped_callback): Return bool, take filter
6138 argument directly.
6139 (linux_wait_for_event_filtered): Use find_thread.
6140 (linux_wait_1): Likewise.
6141
6142 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6143
6144 * linux-low.c (same_lwp): Remove.
6145 (find_lwp_pid): Use find_thread.
6146
6147 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6148
6149 * linux-low.c (delete_lwp_callback): Remove.
6150 (linux_mourn): Use for_each_thread.
6151
6152 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6153
6154 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6155 args parameter, don't check for pid.
6156 (linux_detach): Use for_each_thread.
6157
6158 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6159
6160 * linux-low.c (struct counter): Remove.
6161 (second_thread_of_pid_p): Remove.
6162 (last_thread_of_process_p): Use find_thread.
6163
6164 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6165
6166 * inferiors.c (find_inferior_in_random): Remove.
6167 * inferiors.h (find_inferior_in_random): Remove.
6168 * linux-low.c (status_pending_p_callback): Return bool, accept
6169 parameter ptid directly.
6170 (linux_wait_for_event_filtered): Use find_thread_in_random.
6171 (linux_wait_1): Likewise.
6172
6173 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6174
6175 * inferiors.c (find_inferior_id): Remove.
6176 (find_thread_ptid): Move implemention from find_inferior_id to
6177 here.
6178 * inferiors.h (find_inferior_id): Remove.
6179 * server.c (handle_status): Use find_thread_ptid.
6180 (process_serial_event): Likewise.
6181 * thread-db.c (find_one_thread): Likewise.
6182 (thread_db_thread_handle): Likewise.
6183 * win32-low.c (thread_rec): Likewise.
6184 (child_delete_thread): Likewise.
6185 (win32_thread_alive): Likewise.
6186 (get_child_debug_event): Likewise.
6187
6188 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6189
6190 * linux-mips-low.c (update_watch_registers_callback): Return
6191 void, remove pid_p parameter, don't check for pid.
6192 (mips_insert_point, mips_remove_point): Use for_each_thread.
6193
6194 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6195
6196 * lynx.low (lynx_delete_thread_callback): Remove.
6197 (lynx_mourn): Use for_each_thread.
6198
6199 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6200
6201 * regcache.c (regcache_invalidate_one): Remove.
6202 (regcache_invalidate_pid): use for_each_thread.
6203
6204 2017-11-26 Tom Tromey <tom@tromey.com>
6205
6206 * linux-low.c (linux_create_inferior): Update.
6207
6208 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6209
6210 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6211
6212 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6213
6214 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6215 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6216 * linux-aarch64-tdesc-selftest.c: New file.
6217 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6218
6219 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6220
6221 * configure.srv: Add new file.
6222 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6223 * linux-aarch64-tdesc-selftest.c: New file.
6224 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6225
6226 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6227
6228 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6229 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6230 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6231
6232 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6233
6234 * configure.srv: Add new files.
6235 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6236 aarch64_linux_read_description.
6237 * linux-aarch64-low.c (aarch64_linux_read_description):
6238 Merge with aarch64_arch_setup.
6239 (aarch64_arch_setup): Call aarch64_linux_read_description.
6240 * linux-aarch64-tdesc.c: New file.
6241 * linux-aarch64-tdesc.h: New file.
6242
6243 2017-11-24 Yao Qi <yao.qi@linaro.org>
6244
6245 * configure.srv: Set $srv_regobj for tic6x-linux.
6246 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6247 (tic6x_read_description): Move some code to tic6x_arch_setup.
6248 (tic6x_tdesc_test): New function.
6249 (initialize_low_arch): Call selftests::register_test.
6250
6251 2017-11-22 Yao Qi <yao.qi@linaro.org>
6252
6253 * remote-utils.c (prepare_resume_reply): Use memcpy.
6254
6255 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6256
6257 * linux-low.c (kill_one_lwp_callback): Return void, take
6258 argument directly, don't filter on pid.
6259 (linux_kill): Use for_each_thread.
6260
6261 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6262
6263 * linux-low.c (need_step_over_p): Return bool, remove dummy
6264 argument.
6265 (linux_resume, proceed_all_lwps): Use find_thread.
6266
6267 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6268
6269 * linux-low.c (resume_status_pending_p): Return bool, remove
6270 flag_p argument.
6271 (linux_resume): Use find_thread.
6272
6273 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6274
6275 * linux-low.c (struct thread_resume_array): Remove.
6276 (linux_set_resume_request): Return void, take arguments
6277 directly.
6278 (linux_resume): Use for_each_thread.
6279
6280 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6281
6282 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6283 return bool, remove data argument.
6284 (linux_stabilize_threads): Use find_thread.
6285
6286 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6287
6288 * linux-low.c (unsuspend_one_lwp): Remove.
6289 (unsuspend_all_lwps): Use for_each_thread, inline code from
6290 unsuspend_one_lwp.
6291
6292 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6293
6294 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6295 * linux-low.c (struct iterate_over_lwps_args): Remove.
6296 (iterate_over_lwps_filter): Remove.
6297 (iterate_over_lwps): Use find_thread.
6298
6299 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6300
6301 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6302 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6303 code from reset_lwp_ptrace_options_callback.
6304
6305 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6306
6307 * linux-arm-low.c (struct update_registers_data): Remove.
6308 (update_registers_callback): Return void, take arguments
6309 directly, don't check thread's pid.
6310 (arm_insert_point, arm_remove_point): Use for_each_thread.
6311
6312 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6313
6314 * win32-low.c (continue_one_thread): Return void, take argument
6315 directly.
6316 (child_continue): Use for_each_thread.
6317
6318 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * win32-i386-low.c (update_debug_registers_callback): Rename
6321 to ...
6322 (update_debug_registers): ... this, return void, remove pid_p arg.
6323 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6324
6325 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6326
6327 * inferiors.h (struct process_info): Add constructor, initialize
6328 fields..
6329 <syscalls_to_catch>: Change type to std::vector<int>.
6330 * inferiors.c (add_process): Allocate process_info with new.
6331 (remove_process): Free process_info with delete.
6332 * linux-low.c (handle_extended_wait): Adjust.
6333 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6334 * server.c (handle_general_set): Adjust.
6335
6336 2017-11-16 Pedro Alves <palves@redhat.com>
6337
6338 * remote-utils.c (remote_close): Block SIGIO signals instead of
6339 uninstalling the SIGIO handler.
6340
6341 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6342
6343 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6344
6345 2017-11-16 Yao Qi <yao.qi@linaro.org>
6346
6347 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6348 (tic6x_store_gregset): Likewise.
6349 (tic6x_usrregs_info): Move it up.
6350
6351 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6352
6353 * Makefile.in: Update arch rules.
6354 * configure.srv: Explicitly mark arch/ files.
6355
6356 2017-11-13 Andreas Schwab <schwab@suse.de>
6357
6358 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6359 function.
6360 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6361
6362 2017-11-06 Pedro Alves <palves@redhat.com>
6363
6364 * config.in, configure: Regenerate.
6365
6366 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6367
6368 * target.c (struct thread_search): Remove.
6369 (thread_search_callback): Remove.
6370 (prepare_to_access_memory): Use for_each_thread instead of
6371 find_inferior. Inline code from thread_search_callback.
6372
6373 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6374
6375 * server.c (struct visit_actioned_threads_data): Remove.
6376 (visit_actioned_threads): Change prototype to take arguments
6377 directly.
6378 (resume): Use find_thread instead of find_inferior.
6379
6380 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6381
6382 * server.c (queue_stop_reply_callback): Change prototype, return
6383 void.
6384 (find_status_pending_thread_callback): Remove.
6385 (handle_status): Replace find_inferior with find_thread and
6386 for_each_thread.
6387
6388 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6389
6390 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6391 with REGNO.
6392 (aarch64_store_gregset): Likewise.
6393 (aarch64_fill_fpregset): Likewise.
6394 (aarch64_store_fpregset): Likewise.
6395
6396 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6397
6398 * gdbthread.h (find_thread, for_each_thread): New functions.
6399 * inferiors.c (thread_of_pid): Remove.
6400 (find_any_thread_of_pid): Use find_thread.
6401 * linux-low.c (num_lwps): Use for_each_thread.
6402
6403 2017-10-17 Yao Qi <yao.qi@linaro.org>
6404
6405 * Makefile.in: Remove one rule.
6406 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6407
6408 2017-10-17 Yao Qi <yao.qi@linaro.org>
6409
6410 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6411 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6412
6413 2017-10-17 Yao Qi <yao.qi@linaro.org>
6414
6415 * configure.srv: Rename arm.o with arch/arm.o.
6416
6417 2017-10-17 Yao Qi <yao.qi@linaro.org>
6418
6419 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6420 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6421 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6422 (arch-i386.o, arch-amd64.o): Remove rules.
6423 (arch/%.o): New rule.
6424 Update POSTCOMPILE and COMPILE.pre.
6425 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6426 * configure: Re-generated.
6427 * configure.srv: Replace arch-i386.o with arch/i386.o.
6428 Replace arch-amd64.o with arch/amd64.o.
6429
6430 2017-10-16 Yao Qi <yao.qi@linaro.org>
6431
6432 * configure: Regenerated.
6433
6434 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6435
6436 * inferiors.h: (struct inferior_list): Remove.
6437 (struct inferior_list_entry); Remove.
6438 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6439 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6440 get_first_inferior): Remove.
6441 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6442 find_inferior_id, find_inferior_in_random): Change signature.
6443 * inferiors.c (all_threads): Change type to
6444 std::list<thread_info *>.
6445 (get_thread): Remove macro.
6446 (find_inferior, find_inferior_id): Change signature, implement
6447 using find_thread.
6448 (find_inferior_in_random): Change signature, implement using
6449 find_thread_in_random.
6450 (for_each_inferior, for_each_inferior_with_data): Change
6451 signature, implement using for_each_thread.
6452 (add_inferior_to_list, remove_inferior): Remove.
6453 (add_thread, get_first_thread, thread_of_pid,
6454 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6455 (get_first_inferior, one_inferior_p, clear_inferior_list):
6456 Remove.
6457 (clear_inferiors, get_thread_process): Update.
6458 * gdbthread.h: Include <list>.
6459 (struct thread_info) <entry>: Remove field.
6460 <id>: New field.
6461 (all_threads): Change type to std::list<thread_info *>.
6462 (get_first_inferior): Add doc.
6463 (find_thread, for_each_thread, find_thread_in_random): New
6464 functions.
6465 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6466 * linux-arm-low.c (update_registers_callback): Update.
6467 * linux-low.c (second_thread_of_pid_p): Update.
6468 (kill_one_lwp_callback, linux_detach_lwp_callback,
6469 delete_lwp_callback, status_pending_p_callback, same_lwp,
6470 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6471 iterate_over_lwps, not_stopped_callback,
6472 resume_stopped_resumed_lwps, count_events_callback,
6473 select_singlestep_lwp_callback, select_event_lwp_callback,
6474 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6475 suspend_and_send_sigstop_callback, wait_for_sigstop,
6476 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6477 lwp_running, linux_set_resume_request, resume_status_pending_p,
6478 need_step_over_p, start_step_over, linux_resume_one_thread,
6479 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6480 reset_lwp_ptrace_options_callback): Update.
6481 * linux-mips-low.c (update_watch_registers_callback): Update.
6482 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6483 Update.
6484 (free_register_cache_thread_one): Remove.
6485 (regcache_release): Update.
6486 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6487 handle_qxfer_threads_worker): Update.
6488 (handle_query): Update, use list iterator.
6489 (visit_actioned_threads, handle_pending_status,
6490 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6491 clear_pending_status_callback, set_pending_status_callback,
6492 find_status_pending_thread_callback, handle_status,
6493 process_serial_event): Update.
6494 * target.c (thread_search_callback): Update.
6495 * thread-db.c (thread_db_get_tls_address): Update.
6496 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6497 Update.
6498 * win32-i386-low.c (update_debug_registers_callback): Update.
6499 * win32-low.c (delete_thread_info, child_delete_thread,
6500 continue_one_thread, suspend_one_thread,
6501 get_child_debug_event): Adjust.
6502
6503 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6504
6505 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6506 * inferiors.h: Include <list>.
6507 (struct process_info) <entry>: Remove field.
6508 <pid>: New field.
6509 (pid_of): Change macro to function.
6510 (ptid_of, lwpid_of): Remove macro.
6511 (all_processes): Change type to std::list<process_info *>.
6512 (ALL_PROCESSES): Remove macro.
6513 (for_each_process, find_process): New function.
6514 * inferiors.c (all_processes): Change type to
6515 std::list<process_info *>.
6516 (find_thread_process): Adjust.
6517 (add_process): Likewise.
6518 (remove_process): Likewise.
6519 (find_process_pid): Likewise.
6520 (get_first_process): Likewise.
6521 (started_inferior_callback): Remove.
6522 (have_started_inferiors_p): Adjust.
6523 (attached_inferior_callback): Remove.
6524 (have_attached_inferiors_p): Adjust.
6525 * linux-low.c (check_zombie_leaders): Likewise.
6526 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6527 (x86_linux_update_xmltarget): Adjust.
6528 * server.c (handle_query): Likewise.
6529 (gdb_reattached_process): Remove.
6530 (handle_status): Adjust.
6531 (kill_inferior_callback): Likewise.
6532 (detach_or_kill_inferior): Remove.
6533 (print_started_pid): Likewise.
6534 (print_attached_pid): Likewise.
6535 (detach_or_kill_for_exit): Update.
6536 (process_serial_event): Likewise.
6537 * linux-arm-low.c (arm_new_fork): Likewise.
6538
6539 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6540
6541 * dll.h: Include <list>.
6542 (struct dll_info): Add constructor.
6543 <entry>: Remove field.
6544 (all_dlls): Change type to std::list<dll_info>.
6545 * dll.c: Include <algorithm>.
6546 (get_dll): Remove macro.
6547 (all_dlls): Change type to std::list<dll_info *>.
6548 (free_one_dll): Remove.
6549 (match_dll): Likewise.
6550 (loaded_dll): Adjust.
6551 (unloaded_dll): Adjust to all_dlls type change, use
6552 std::find_if. Inline code from match_dll.
6553 (clear_dlls): Adjust to all_dlls type change.
6554 * server.c (emit_dll_description): Remove.
6555 (handle_qxfer_libraries): Adjust to all_dlls type change,
6556 integrate emit_dll_description's functionality.
6557
6558 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6559
6560 * linux-low.h (struct linux_target_ops) <delete_process>: New
6561 field.
6562 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6563 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6564 (struct linux_target_ops): Add delete_process callback.
6565 * linux-arm-low.c (arm_delete_process): New.
6566 (struct linux_target_ops): Add delete_process callback.
6567 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6568 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6569 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6570 * linux-mips-low.c (mips_linux_delete_process): New.
6571 (struct linux_target_ops): Add delete_process callback.
6572 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6573 * linux-s390-low.c (struct linux_target_ops): Likewise.
6574 * linux-sh-low.c (struct linux_target_ops): Likewise.
6575 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6576 * linux-tile-low.c (struct linux_target_ops): Likewise.
6577 * linux-x86-low.c (x86_linux_delete_process): New.
6578 (struct linux_target_ops): Add delete_process callback.
6579 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6580
6581 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6582
6583 * linux-aarch64-low.c (the_low_target): Add thread delete
6584 callback.
6585 * linux-arm-low.c (arm_delete_thread): New function.
6586 (the_low_target): Add thread delete callback.
6587 * linux-bfin-low.c (the_low_target): Likewise.
6588 * linux-crisv32-low.c (the_low_target): Likewise.
6589 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6590 set.
6591 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6592 field.
6593 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6594 * linux-mips-low.c (mips_linux_delete_thread): New function.
6595 (the_low_target): Add thread delete callback.
6596 * linux-ppc-low.c (the_low_target): Likewise.
6597 * linux-s390-low.c (the_low_target): Likewise.
6598 * linux-sh-low.c (the_low_target): Likewise.
6599 * linux-tic6x-low.c (the_low_target): Likewise.
6600 * linux-tile-low.c (the_low_target): Likewise.
6601 * linux-x86-low.c (the_low_target): Likewise.
6602 * linux-xtensa-low.c (the_low_target): Likewise.
6603
6604 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6605
6606 * win32-low.c: Include "common-inferior.h".
6607
6608 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6609
6610 * inferiors.c (set_inferior_cwd): New function.
6611 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6612 (handle_query): Inform that QSetWorkingDir is supported.
6613 * win32-low.c (create_process): Pass the inferior's cwd to
6614 CreateProcess.
6615
6616 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6617
6618 * inferiors.c (current_inferior_cwd): New global variable.
6619 (get_inferior_cwd): New function.
6620 * inferiors.h (struct process_info) <cwd>: New field.
6621
6622 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6623
6624 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6625 (OBS): Add gdb_tilde_expand.o.
6626
6627 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6628
6629 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6630 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6631
6632 2017-09-29 Pedro Alves <palves@redhat.com>
6633
6634 * ax.c (gdb_parse_agent_expr): Constify.
6635 * ax.h (gdb_parse_agent_expr): Constify.
6636 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6637 Constify.
6638 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6639 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6640 * remote-utils.h (read_ptid): Constify.
6641 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6642 (process_point_options, process_serial_event): Constify.
6643 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6644 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6645 (cmd_qtbuffer): Constify.
6646
6647 2017-09-29 Pedro Alves <palves@redhat.com>
6648
6649 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6650 fails.
6651
6652 2017-09-29 Pedro Alves <palves@redhat.com>
6653
6654 * linux-low.c (handle_extended_wait): Pass parent thread instead
6655 of process to thread_db_notice_clone.
6656 * linux-low.h (thread_db_notice_clone): Replace parent process
6657 parameter with parent thread parameter.
6658 * thread-db.c (find_one_thread): Add comment.
6659 (thread_db_notice_clone): Replace parent process parameter with
6660 parent thread parameter. Temporarily switch to the parent thread.
6661
6662 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6663
6664 * gdbthread.h: Include "common-gdbthread.h".
6665 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6666 "if" when validating the ptid.
6667 * remote-utils.c: Include "gdbthread.h".
6668 (prepare_resume_reply): Use "switch_to_thread".
6669 * target.c (done_accessing_memory): Likewise.
6670
6671 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6672
6673 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6674 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6675 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6676 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6677 s390x-gs-linux64-ipa.o to ipa_obj.
6678 * linux-s390-low.c (HWCAP_S390_GS): New define.
6679 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6680 New functions.
6681 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6682 (s390_arch_setup): Check for guarded-storage support and choose
6683 appropriate tdesc.
6684 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6685 init_registers_s390x_gs_linux64.
6686 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6687 enum value.
6688 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6689 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6690
6691 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6692
6693 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6694
6695 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6696
6697 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6698 (thread_db_thread_handle): Declare.
6699 * linux-low.c (linux_target_ops): Initialize thread_handle.
6700 * server.c (handle_qxfer_threads_worker): Add support for
6701 "handle" attribute.
6702 * target.h (struct target_ops): Add new function pointer,
6703 thread_handle.
6704 (target_thread_handle): Define.
6705 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6706 field in lwp.
6707 (thread_db_thread_handle): New function.
6708
6709 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6710
6711 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6712 * linux-low.h (thread_db_notice_clone): Declare.
6713 * thread-db.c (thread_db_notice_clone): New function.
6714
6715 2017-09-21 Pedro Alves <palves@redhat.com>
6716
6717 * server.c (gdb_read_memory, handle_status, process_serial_event)
6718 (handle_serial_event, handle_target_event): Adjust to
6719 set_desired_thread prototype change.
6720 * target.c (set_desired_thread): Remove 'use_general' parameter
6721 and adjust.
6722 * target.h (set_desired_thread): Remove 'use_general' parameter.
6723
6724 2017-09-20 Tom Tromey <tom@tromey.com>
6725
6726 * target.c (target_terminal::terminal_state): Define.
6727 (target_terminal::init): Rename from target_terminal_init.
6728 (target_terminal::inferior): Rename from
6729 target_terminal_inferior.
6730 (target_terminal::ours): Rename from target_terminal_ours.
6731 (target_terminal::ours_for_output, target_terminal::info): New.
6732
6733 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6734
6735 * server.c (accumulate_file_name_length): Remove.
6736 (emit_dll_description): Adjust to std::string change.
6737 (handle_qxfer_libraries): Use std::string to hold document.
6738
6739 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6740
6741 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6742 return type of xml_escape_text.
6743 * server.c (emit_dll_description): Likewise.
6744
6745 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6746
6747 * server.c (captured_main): Accept argument for --selftest.
6748 Update run_tests call.
6749 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6750 when registering selftests.
6751
6752 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6753
6754 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6755 instead of "VEC" for "target_desc.reg_defs".
6756 (regcache_cpy): Likewise.
6757 (registers_to_string): Likewise.
6758 (registers_from_string): Likewise.
6759 (find_regno): Likewise.
6760 (supply_regblock): Likewise.
6761 (regcache_raw_read_unsigned): Likewise.
6762 * tdesc.c (init_target_desc): Likewise.
6763 (tdesc_create_reg): Likewise.
6764 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6765 (struct target_desc) <reg_defs>: Convert to "std::vector".
6766 (target_desc): Do not initialize "reg_defs".
6767 (~target_desc): Update code to use "std::vector" instead of "VEC"
6768 for "target_desc.reg_defs".
6769 (operator==): Likewise.
6770
6771 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6772
6773 * inferiors.h (thread_to_gdb_id): Remove.
6774 * inferiors.c (thread_to_gdb_id): Remove.
6775 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6776 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6777 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6778 Likewise.
6779 * nto-low.c (nto_fetch_registers, nto_store_registers,
6780 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6781
6782 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6783
6784 * inferiors.h (gdb_id_to_thread_id): Remove.
6785 * inferiors.c (gdb_id_to_thread_id): Remove.
6786 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6787 removal. Move pid declaration closer to where it's used.
6788
6789 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6790
6791 * server.c (handle_detach): New function.
6792 (process_serial_event): Move code out, call handle_detach.
6793
6794 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6795
6796 * server.c (require_running): Rename to ...
6797 (require_running_or_return): ... this ...
6798 (require_running_or_break): ... and this.
6799 (handle_query, process_serial_event): Adjust.
6800
6801 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6802
6803 * linux-low.c (linux_set_resume_request): Remove unused
6804 variables.
6805
6806 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6807
6808 * server.c (first_thread_of): Remove.
6809 (process_serial_event): Replace usage of first_thread_of with
6810 find_any_thread_of_pid.
6811 * tracepoint.c (same_process_p): Remove.
6812 (gdb_agent_about_to_close): Replace usage of same_process_p with
6813 find_any_thread_of_pid.
6814 * linux-x86-low.c (same_process_callback): Remove.
6815 (x86_arch_setup_process_callback): Replace usage of
6816 same_process_callback with find_any_thread_of_pid.
6817 * thread-db.c (any_thread_of): Remove.
6818 (switch_to_process): Replace usage of any_thread_of with
6819 find_any_thread_of_pid.
6820 * inferiors.c (thread_pid_matches_callback): Remove.
6821 (find_thread_process): Adjust to use find_any_thread_of_pid.
6822
6823 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6824
6825 * regcache.c (get_thread_regcache): Guard calls to "memset"
6826 with "!VEC_empty".
6827
6828 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6829
6830 * linux-low.c (handle_extended_wait): Use
6831 "allocate_target_description" instead of "XNEW".
6832 * linux-x86-low.c (initialize_low_arch): Likewise.
6833
6834 2017-09-05 Yao Qi <yao.qi@linaro.org>
6835
6836 * configure.srv (srv_i386_regobj): Remove.
6837 (srv_amd64_regobj): Remove.
6838 (srv_regobj): Set it to "" for x86 non-linux targets.
6839 * linux-x86-tdesc.c (i386_linux_read_description):
6840 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6841 (init_registers_i386): Remove the declaration.
6842 (tdesc_i386): Remove the declaration.
6843 (lynx_i386_arch_setup): Call i386_create_target_description.
6844 * nto-x86-low.c: Likewise.
6845 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6846 [!__x86_64__]: include arch/i386.h.
6847 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6848
6849 2017-09-05 Yao Qi <yao.qi@linaro.org>
6850
6851 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6852 i386/amd64-XXX-linux from it.
6853
6854 2017-09-05 Yao Qi <yao.qi@linaro.org>
6855
6856 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6857 false.
6858 (ipa_amd64_linux_regobj): Remove.
6859 (ipa_x32_linux_regobj): Remove.
6860
6861 2017-09-05 Yao Qi <yao.qi@linaro.org>
6862
6863 * Makefile.in (arch-amd64.o): New rule.
6864 * configure.srv: Append arch-amd64.o.
6865 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6866 (get_ipa_tdesc): Call amd64_linux_read_description.
6867 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6868 and init_registers_amd64_XXX.
6869 * linux-x86-low.c (x86_linux_read_description): Call
6870 amd64_linux_read_description.
6871 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6872 (initialize_low_arch): Don't call init_registers_x32_XXX and
6873 init_registers_amd64_XXX.
6874 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6875 and tdesc_amd64_XXX.
6876 [__x86_64__] (amd64_tdesc_test): New function.
6877 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6878 and init_registers_amd64_XXX.
6879 * linux-x86-tdesc.c: Include arch/amd64.h.
6880 (xcr0_to_tdesc_idx): New function.
6881 (i386_linux_read_description): New function.
6882 (amd64_get_ipa_tdesc_idx): New function.
6883 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6884 (amd64_get_ipa_tdesc): Declare.
6885
6886 2017-09-05 Yao Qi <yao.qi@linaro.org>
6887
6888 * configure.srv (srv_i386_linux_xmlfiles): Remove
6889 i386/i386-XXX-linux.xml from it.
6890
6891 2017-09-05 Yao Qi <yao.qi@linaro.org>
6892
6893 * configure.srv: Set srv_i386_linux_regobj empty if $development
6894 is false.
6895 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6896 initialize_low_tdesc.
6897 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6898 with #if initialize_low_tdesc.
6899 * linux-x86-tdesc-selftest.c: New file.
6900 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6901
6902 2017-09-05 Yao Qi <yao.qi@linaro.org>
6903
6904 * Makefile.in (arch-i386.o): New rule.
6905 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6906 (x86_64-*-linux*): Likewise.
6907 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6908 include arch/i386.h.
6909 (i386_linux_read_description): Remove code and call
6910 i386_create_target_description.
6911 * tdesc.c (allocate_target_description): New function.
6912 * tdesc.h (set_tdesc_architecture): Remove declaration.
6913 (set_tdesc_osabi): Likewise.
6914
6915 2017-09-05 Yao Qi <yao.qi@linaro.org>
6916
6917 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6918 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6919 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6920 .xmltarget.
6921 * server.c (get_features_xml): Call tdesc_get_features_xml.
6922 * tdesc.c (set_tdesc_architecture): New function.
6923 (set_tdesc_osabi): New function.
6924 (tdesc_get_features_xml): New function.
6925 (tdesc_create_feature): Add an argument.
6926 * tdesc.h (struct target_desc) <features>: New field.
6927 <arch, osabi>: New field.
6928 (~target_desc): xfree features, arch, and osabi.
6929 (target_desc::oerator==): Don't compare .xmltarget.
6930 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6931 (set_tdesc_osabi): Likewise.
6932 (tdesc_get_features_xml): Likewise.
6933
6934 2017-09-05 Yao Qi <yao.qi@linaro.org>
6935
6936 * linux-x86-tdesc.c: Include selftest.h.
6937 (i386_tdesc_test): New function.
6938 (initialize_low_tdesc): Call selftests::register_test.
6939 * tdesc.h: Include regdef.h.
6940 (target_desc): Override operator == and !=.
6941
6942 2017-09-05 Yao Qi <yao.qi@linaro.org>
6943
6944 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6945 (ipa_obj): Likewise.
6946 * linux-i386-ipa.c: Include common/x86-xstate.h
6947 (get_ipa_tdesc): Call i386_linux_read_description.
6948 (initialize_low_tracepoint): Don't call init_registers_XXX
6949 functions, call initialize_low_tdesc instead.
6950 * linux-x86-low.c (x86_linux_read_description): Call
6951 i386_linux_read_description.
6952 (initialize_low_arch): Don't call init_registers_i386_XXX
6953 functions, call initialize_low_tdesc.
6954 * linux-x86-tdesc.c: New file.
6955 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6956 (i386_get_ipa_tdesc_idx): Declare.
6957 (i386_get_ipa_tdesc): Declare.
6958 (initialize_low_tdesc): Declare.
6959
6960 2017-09-05 Yao Qi <yao.qi@linaro.org>
6961
6962 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6963 instead of 0.
6964
6965 2017-09-05 Yao Qi <yao.qi@linaro.org>
6966
6967 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6968 * regcache.c (get_thread_regcache): Use VEC_length.
6969 (init_register_cache): Likewise.
6970 (regcache_cpy): Likewise.
6971 (registers_to_string): Iterate reg_defs via VEC_iterate.
6972 (find_regno): Likewise.
6973 (find_register_by_number): Use VEC_index.
6974 (register_size): Call find_register_by_number.
6975 (register_data): Call find_register_by_number.
6976 (supply_regblock): Use VEC_length.
6977 (regcache_raw_read_unsigned): Likewise.
6978 * tdesc.c (init_target_desc): Iterate reg_defs via
6979 VEC_iterate.
6980 (default_description): Update initializer.
6981 (copy_target_description): Don't update field num_registers.
6982 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6983 <num_registers>: Remove.
6984
6985 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6986
6987 * Makefile.in (.SECONDARY): Define target.
6988
6989 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6990
6991 * linux-low.c (linux_wait_1): Adjust.
6992 * server.c (queue_stop_reply_callback): Adjust.
6993
6994 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6995
6996 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6997 QEnvironmentUnset and QEnvironmentReset packets.
6998 (handle_query): Inform remote that QEnvironmentHexEncoded,
6999 QEnvironmentUnset and QEnvironmentReset are supported.
7000
7001 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7002
7003 * inferiors.h (inferior_target_data): Rename to ...
7004 (thread_target_data): ... this.
7005 (inferior_regcache_data): Rename to ...
7006 (thread_regcache_data): ... this.
7007 (set_inferior_regcache_data): Rename to ...
7008 (set_thread_regcache_data): ... this.
7009 * inferiors.c (inferior_target_data): Rename to ...
7010 (thread_target_data): ... this.
7011 (inferior_regcache_data): Rename to ...
7012 (thread_regcache_data): ... this.
7013 (set_inferior_regcache_data): Rename to ...
7014 (set_thread_regcache_data): ... this.
7015 (free_one_thread): Update.
7016 * linux-low.h (get_thread_lwp): Update.
7017 * regcache.c (get_thread_regcache): Update.
7018 (regcache_invalidate_thread): Update.
7019 (free_register_cache_thread): Update.
7020 * win32-i386-low.c (update_debug_registers_callback): Update.
7021 (win32_get_current_dr): Update.
7022 * win32-low.c (thread_rec): Update.
7023 (delete_thread_info): Update.
7024 (continue_one_thread): Update.
7025 (suspend_one_thread): Update.
7026
7027 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7028
7029 * inferiors.c (set_inferior_target_data): Remove.
7030 * inferiors.h (set_inferior_target_data): Remove.
7031
7032 2017-08-18 Yao Qi <yao.qi@linaro.org>
7033
7034 * Makefile.in (OBS): Add selftest.o.
7035 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7036 * configure, config.in: Re-generated.
7037 * server.c: Include common/sefltest.h.
7038 (captured_main): Handle option --selftest.
7039
7040 2017-08-09 Yao Qi <yao.qi@linaro.org>
7041
7042 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7043 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7044 i386-avx-mpx.o and i386-mmx.o.
7045 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7046 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7047 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7048 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7049 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7050 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7051 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7052 i386/amd64-avx-mpx.xml.
7053
7054 2017-08-09 Yao Qi <yao.qi@linaro.org>
7055
7056 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7057 and x32-avx-avx512.o.
7058 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7059 i386/x32-avx-avx512.xml.
7060
7061 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7062
7063 * tracepoint.h (enum class fast_tpoint_collect_result): New
7064 enumeration.
7065 (fast_tracepoint_collecting): Change return type to
7066 fast_tpoint_collect_result.
7067 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7068 * linux-low.h: Include tracepoint.h.
7069 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7070 fast_tpoint_collect_result.
7071 * linux-low.c (handle_tracepoints): Adjust.
7072 (linux_fast_tracepoint_collecting): Change return type to
7073 fast_tpoint_collect_result.
7074 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7075 linux_wait_1, stuck_in_jump_pad_callback,
7076 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7077 proceed_one_lwp): Adjust to type change.
7078
7079 2017-07-10 Yao Qi <yao.qi@linaro.org>
7080
7081 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7082
7083 2017-06-29 Yao Qi <yao.qi@linaro.org>
7084
7085 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7086 Remove.
7087 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7088
7089 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7090
7091 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7092
7093 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7094
7095 * linux-low.c (linux_create_inferior): Adjust code to access the
7096 environment information via 'gdb_environ' class.
7097 * lynx-low.c (lynx_create_inferior): Likewise.
7098 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7099 (get_environ): Return a pointer to 'our_environ'.
7100 (captured_main): Initialize 'our_environ'.
7101 * server.h (get_environ): Adjust prototype.
7102 * spu-low.c (spu_create_inferior): Adjust code to access the
7103 environment information via 'gdb_environ' class.
7104
7105 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7106
7107 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7108 usage of "register" keyword.
7109
7110 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7111
7112 * configure: Re-generate.
7113
7114 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7115
7116 * configure: Re-generate.
7117
7118 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7119
7120 * Makefile.in (COMPILE.pre): Add "-x c++".
7121
7122 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7123
7124 * fork-child.c: Conditionally include <signal.h>.
7125
7126 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7127
7128 * server.c (handle_general_set): Handle new packet
7129 "QStartupWithShell".
7130 (handle_query): Add "QStartupWithShell" to the list of supported
7131 packets.
7132 (gdbserver_usage): Add help text explaining the
7133 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7134 options.
7135 (captured_main): Recognize and act upon the presence of the new
7136 CLI options.
7137
7138 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7139 Pedro Alves <palves@redhat.com>
7140
7141 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7142 * configure: Regenerate.
7143 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7144 "fork-inferior.o".
7145 (i[34567]86-*-lynxos*): Likewise.
7146 (spu*-*-*): Likewise.
7147 * fork-child.c: New file.
7148 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7149 and "environ.h".
7150 (linux_ptrace_fun): New function.
7151 (linux_create_inferior): Adjust function prototype to reflect
7152 change on "target.h". Adjust function code to use
7153 "fork_inferior".
7154 (linux_request_interrupt): Delete "signal_pid".
7155 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7156 (lynx_ptrace_fun): New function.
7157 (lynx_create_inferior): Adjust function prototype to reflect
7158 change on "target.h". Adjust function code to use
7159 "fork_inferior".
7160 * nto-low.c (nto_create_inferior): Adjust function prototype and
7161 code to reflect change on "target.h". Update comments.
7162 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7163 "common-terminal.h" and "environ.h".
7164 (terminal_fd): Moved to fork-child.c.
7165 (old_foreground_pgrp): Likewise.
7166 (restore_old_foreground_pgrp): Likewise.
7167 (last_status): Make it global.
7168 (last_ptid): Likewise.
7169 (our_environ): New variable.
7170 (startup_with_shell): Likewise.
7171 (program_name): Likewise.
7172 (program_argv): Rename to...
7173 (program_args): ...this.
7174 (wrapper_argv): New variable.
7175 (start_inferior): Delete function.
7176 (get_exec_wrapper): New function.
7177 (get_exec_file): Likewise.
7178 (get_environ): Likewise.
7179 (prefork_hook): Likewise.
7180 (post_fork_inferior): Likewise.
7181 (postfork_hook): Likewise.
7182 (postfork_child_hook): Likewise.
7183 (handle_v_run): Update code to deal with arguments coming from the
7184 remote host. Update calls from "start_inferior" to
7185 "create_inferior".
7186 (captured_main): Likewise. Initialize environment variable. Call
7187 "have_job_control".
7188 * server.h (post_fork_inferior): New prototype.
7189 (get_environ): Likewise.
7190 (last_status): Declare.
7191 (last_ptid): Likewise.
7192 (signal_pid): Likewise.
7193 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7194 (spu_ptrace_fun): New function.
7195 (spu_create_inferior): Adjust function prototype to reflect change
7196 on "target.h". Adjust function code to use "fork_inferior".
7197 * target.c (target_terminal_init): New function.
7198 (target_terminal_inferior): Likewise.
7199 (target_terminal_ours): Likewise.
7200 * target.h: Include <vector>.
7201 (struct target_ops) <create_inferior>: Update prototype.
7202 (create_inferior): Update macro.
7203 * utils.c (gdb_flush_out_err): New function.
7204 * win32-low.c (win32_create_inferior): Adjust function prototype
7205 and code to reflect change on "target.h".
7206
7207 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7208
7209 * inferiors.c (switch_to_thread): New function.
7210
7211 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7212
7213 * Makefile.in (SFILE): Add "common/job-control.c".
7214 (OBS): Add "job-control.o".
7215
7216 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7217
7218 * Makefile: Remove "@host_makefile_frag@".
7219
7220 2017-05-05 Pedro Alves <palves@redhat.com>
7221
7222 * configure: Regenerate.
7223
7224 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7225
7226 * configure: Regenerate.
7227
7228 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7229
7230 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7231 software_single_step change of return type to
7232 std::vector<CORE_ADDR>.
7233 * linux-low.c (install_software_single_step_breakpoints):
7234 Likewise.
7235 * linux-low.h (install_software_single_step_breakpoints):
7236 Likewise.
7237
7238 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7239
7240 * remote-utils.c: Include "gdb_termios.h" instead of
7241 "terminal.h".
7242 * terminal.h: Delete file.
7243
7244 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7245
7246 * server.c: Include <vector>.
7247 <program_argv, wrapper_argv>: Convert to std::vector.
7248 (start_inferior): Rewrite function to use C++.
7249 (handle_v_run): Likewise. Update code that calculates the argv
7250 based on the vRun packet; use C++.
7251 (captured_main): Likewise.
7252
7253 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7254
7255 * server.c (handle_v_cont): Initialize thread_resume::thread
7256 with null_ptid.
7257
7258 2017-04-05 Pedro Alves <palves@redhat.com>
7259
7260 * configure: Regenerate.
7261
7262 2017-04-05 Pedro Alves <palves@redhat.com>
7263
7264 * gdbreplay.c (sync_error): Constify.
7265 * linux-x86-low.c (push_opcode): Constify.
7266
7267 2017-04-05 Pedro Alves <palves@redhat.com>
7268
7269 * win32-low.c (get_child_debug_event)
7270 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7271 Report TARGET_WAITKIND_SPURIOUS instead.
7272
7273 2017-04-05 Pedro Alves <palves@redhat.com>
7274
7275 * remote-utils.c (remote_prepare, remote_open): Constify.
7276 * remote-utils.h (remote_prepare, remote_open): Constify.
7277 * server.c (captured_main): Constify 'port' handling.
7278
7279 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7280
7281 * Makefile.in (clean): Clear .deps.
7282
7283 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7284
7285 * .gitignore: Remove generated files, replace with wildcard.
7286 * (clean): Replace removal of generated files with wildcard.
7287 (version.c): Replace with...
7288 (version-generated.c): ...this.
7289 (xml-builtin.c): Replace with...
7290 (xml-builtin-generated.c): ...this.
7291 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7292 (%.c: *regformats*): Replace with...
7293 (%-generated.c: *regformats*): ...this.
7294
7295 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7296
7297 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7298 (xtensa_fill_gregset): Call collect_register_by_name for
7299 threadptr register.
7300 (xtensa_store_gregset): Call supply_register_by_name for
7301 threadptr register.
7302
7303 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7304
7305 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7306 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7307 (xtensa_store_gregset): Call supply_register for all registers in
7308 a0_regnum..a0_regnum + C0_NREGS range.
7309
7310 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7311
7312 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7313 (ax-ipa.o: ax.c): Remove.
7314 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7315 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7316 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7317 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7318 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7319
7320 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7321
7322 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7323 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7324 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7325 (errors-ipa.o: ../common/errors.c): Remove.
7326 (format-ipa.o: ../common/format.c): Remove.
7327 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7328
7329 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7330
7331 * Makefile.in (%-ipa.o: %.c): New rule.
7332 (tracepoint-ipa.o: tracepoint.c): Remove.
7333 (utils-ipa.o: utils.c): Remove.
7334 (remote-utils-ipa.o: remote-utils.c): Remove.
7335 (regcache-ipa.o: regcache.c): Remove.
7336 (i386-linux-ipa.o: i386-linux.c): Remove.
7337 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7338 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7339 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7340 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7341 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7342 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7343 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7344 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7345 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7346 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7347 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7348 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7349 (aarch64-ipa.o: aarch64.c): Remove.
7350 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7351 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7352 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7353 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7354 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7355 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7356 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7357 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7358 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7359 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7360 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7361 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7362 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7363 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7364 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7365 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7366 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7367 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7368 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7369 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7370 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7371 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7372 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7373 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7374 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7375 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7376 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7377 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7378 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7379 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7380 (tdesc-ipa.o: tdesc.c): Remove.
7381 (x32-linux-ipa.o: x32-linux.c): Remove.
7382 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7383 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7384
7385 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7386
7387 * Makefile.in (%.o: ../arch/%.c): New rule.
7388 (arm.o: ../arch/arm.c): Remove.
7389 (arm-linux.o: ../arch/arm-linux.c): Remove.
7390 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7391 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7392
7393 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7394
7395 * Makefile.in (%.o: ../nat/%.c): New rule.
7396 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7397 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7398 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7399 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7400 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7401 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7402 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7403 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7404 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7405 (linux-personality.o: ../nat/linux-personality.c): Remove.
7406 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7407 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7408 (x86-linux.o: ../nat/x86-linux.c): Remove.
7409 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7410 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7411
7412 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7413
7414 * Makefile.in (%.o: ../common/%.c): New rule.
7415 (signals.o: ../common/signals.c): Remove.
7416 (print-utils.o: ../common/print-utils.c): Remove.
7417 (rsp-low.o: ../common/rsp-low.c): Remove.
7418 (common-utils.o: ../common/common-utils.c): Remove.
7419 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7420 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7421 (vec.o: ../common/vec.c): Remove.
7422 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7423 (xml-utils.o: ../common/xml-utils.c): Remove.
7424 (ptid.o: ../common/ptid.c): Remove.
7425 (buffer.o: ../common/buffer.c): Remove.
7426 (format.o: ../common/format.c): Remove.
7427 (filestuff.o: ../common/filestuff.c): Remove.
7428 (agent.o: ../common/agent.c): Remove.
7429 (errors.o: ../common/errors.c): Remove.
7430 (environ.o: ../common/environ.c): Remove.
7431 (common-debug.o: ../common/common-debug.c): Remove.
7432 (cleanups.o: ../common/cleanups.c): Remove.
7433 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7434 (fileio.o: ../common/fileio.c): Remove.
7435 (common-regcache.o: ../common/common-regcache.c): Remove.
7436 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7437 (new-op.o: ../common/new-op.c): Remove.
7438 (btrace-common.o: ../common/btrace-common.c): Remove.
7439
7440 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7441
7442 * Makefile.in (%.o: ../target/%.c): New rule.
7443 (waitstatus.o: ../target/waitstatus.c): Remove.
7444
7445 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7446
7447 * Makefile.in
7448 (%.c: ../regformats/%.dat,
7449 (%.c: ../regformats/arm/%.dat,
7450 (%.c: ../regformats/i386/%.dat,
7451 (%.c: ../regformats/rs6000/%.dat): New rules.
7452 (aarch64.c): Remove.
7453 (reg-arm.c): Remove.
7454 (arm-with-iwmmxt.c): Remove.
7455 (arm-with-vfpv2.c): Remove.
7456 (arm-with-vfpv3.c): Remove.
7457 (arm-with-neon.c): Remove.
7458 (reg-bfin.c): Remove.
7459 (reg-cris.c): Remove.
7460 (reg-crisv32.c): Remove.
7461 (i386.c): Remove.
7462 (i386-linux.c): Remove.
7463 (i386-avx.c): Remove.
7464 (i386-avx-linux.c): Remove.
7465 (i386-avx-avx512.c): Remove.
7466 (i386-avx-avx512-linux.c): Remove.
7467 (i386-mpx.c): Remove.
7468 (i386-mpx-linux.c): Remove.
7469 (i386-avx-mpx-avx512-pku.c): Remove.
7470 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7471 (i386-avx-mpx.c): Remove.
7472 (i386-avx-mpx-linux.c): Remove.
7473 (i386-mmx.c): Remove.
7474 (i386-mmx-linux.c): Remove.
7475 (reg-ia64.c): Remove.
7476 (reg-m32r.c): Remove.
7477 (reg-m68k.c): Remove.
7478 (reg-cf.c): Remove.
7479 (mips-linux.c): Remove.
7480 (mips-dsp-linux.c): Remove.
7481 (mips64-linux.c): Remove.
7482 (mips64-dsp-linux.c): Remove.
7483 (nios2-linux.c): Remove.
7484 (powerpc-32.c): Remove.
7485 (powerpc-32l.c): Remove.
7486 (powerpc-altivec32l.c): Remove.
7487 (powerpc-cell32l.c): Remove.
7488 (powerpc-vsx32l.c): Remove.
7489 (powerpc-isa205-32l.c): Remove.
7490 (powerpc-isa205-altivec32l.c): Remove.
7491 (powerpc-isa205-vsx32l.c): Remove.
7492 (powerpc-e500l.c): Remove.
7493 (powerpc-64l.c): Remove.
7494 (powerpc-altivec64l.c): Remove.
7495 (powerpc-cell64l.c): Remove.
7496 (powerpc-vsx64l.c): Remove.
7497 (powerpc-isa205-64l.c): Remove.
7498 (powerpc-isa205-altivec64l.c): Remove.
7499 (powerpc-isa205-vsx64l.c): Remove.
7500 (s390-linux32.c): Remove.
7501 (s390-linux32v1.c): Remove.
7502 (s390-linux32v2.c): Remove.
7503 (s390-linux64.c): Remove.
7504 (s390-linux64v1.c): Remove.
7505 (s390-linux64v2.c): Remove.
7506 (s390-te-linux64.c): Remove.
7507 (s390-vx-linux64.c): Remove.
7508 (s390-tevx-linux64.c): Remove.
7509 (s390x-linux64.c): Remove.
7510 (s390x-linux64v1.c): Remove.
7511 (s390x-linux64v2.c): Remove.
7512 (s390x-te-linux64.c): Remove.
7513 (s390x-vx-linux64.c): Remove.
7514 (s390x-tevx-linux64.c): Remove.
7515 (tic6x-c64xp-linux.c): Remove.
7516 (tic6x-c64x-linux.c): Remove.
7517 (tic6x-c62x-linux.c): Remove.
7518 (reg-sh.c): Remove.
7519 (reg-sparc64.c): Remove.
7520 (reg-spu.c): Remove.
7521 (amd64.c): Remove.
7522 (amd64-linux.c): Remove.
7523 (amd64-avx.c): Remove.
7524 (amd64-avx-linux.c): Remove.
7525 (amd64-avx-avx512.c): Remove.
7526 (amd64-avx-avx512-linux.c): Remove.
7527 (amd64-mpx.c): Remove.
7528 (amd64-mpx-linux.c): Remove.
7529 (amd64-avx-mpx-avx512-pku.c): Remove.
7530 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7531 (amd64-avx-mpx.c): Remove.
7532 (amd64-avx-mpx-linux.c): Remove.
7533 (x32.c): Remove.
7534 (x32-linux.c): Remove.
7535 (x32-avx.c): Remove.
7536 (x32-avx-linux.c): Remove.
7537 (x32-avx-avx512.c): Remove.
7538 (x32-avx-avx512-linux.c): Remove.
7539 (reg-xtensa.c): Remove.
7540 (reg-tilegx.c): Remove.
7541 (reg-tilegx32.c): Remove.
7542
7543 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7544
7545 * Makefile.in (SFILES): Add "common/environ.c".
7546 (OBJS): Add "common/environ.h".
7547
7548 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7549
7550 * configure.ac: Check if the fs_base and gs_base members of
7551 `struct user_regs_struct' exist.
7552 * config.in: Regenerated.
7553 * configure: Likewise.
7554
7555 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7556
7557 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7558 target_read_memory.
7559 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7560 (get_next_pcs_syscall_next_pc): Likewise.
7561
7562 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7563
7564 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7565 * nto-x86-low.c: Likewise.
7566
7567 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7568
7569 * Makefile.in: Include disable-implicit-rules.mk.
7570
7571 2016-11-23 Pedro Alves <palves@redhat.com>
7572
7573 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7574 (debug_vprintf): Use std::chrono::steady_clock instead of
7575 gettimeofday. Use '.' instead of ':'.
7576 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7577 (get_timestamp): Use std::chrono::steady_clock instead of
7578 gettimeofday.
7579
7580 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7581
7582 * Makefile.in: Fix whitespace formatting.
7583
7584 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7585
7586 * Makefile.in (SFILES, OBS): Flatten list and order
7587 alphabetically.
7588
7589 2016-11-23 Pedro Alves <palves@redhat.com>
7590
7591 * event-loop.c (handle_file_event): Use warning.
7592 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7593 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7594 Use warning.
7595
7596 2016-11-23 Pedro Alves <palves@redhat.com>
7597
7598 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7599 output.
7600 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7601 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7602 debug_printf and debug_flush for debug output.
7603 * server.c (handle_general_set): Likewise.
7604 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7605 output.
7606
7607 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7608
7609 * Makefile.in (.c.o): Replace rule with ...
7610 (%.o: %.c): ... this one.
7611
7612 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7613
7614 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7615 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7616 make.
7617 * configure.ac: Remove checks for the make program.
7618 * configure: Re-generate.
7619
7620 2016-10-28 Pedro Alves <palves@redhat.com>
7621
7622 * Makefile.in (CXX_DIALECT): Get from configure.
7623 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7624 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7625 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7626 * config.in: Regenerate.
7627 * configure: Regenerate.
7628
7629 2016-10-27 Yao Qi <yao.qi@linaro.org>
7630
7631 * linux-low.c (linux_supports_range_stepping): Return true if
7632 can_software_single_step return true.
7633
7634 2016-10-27 Yao Qi <yao.qi@linaro.org>
7635
7636 * inferiors.c (find_inferior_in_random): New function.
7637 * inferiors.h (find_inferior_in_random): Declare.
7638 * linux-low.c (linux_wait_for_event_filtered): Call
7639 find_inferior_in_random instead of find_inferior.
7640
7641 2016-10-27 Yao Qi <yao.qi@linaro.org>
7642
7643 * linux-low.c (linux_wait_1): If single-step breakpoints are
7644 inserted, remove them.
7645
7646 2016-10-26 Pedro Alves <palves@redhat.com>
7647
7648 * linux-low.c (handle_extended_wait): Link parent/child fork
7649 threads.
7650 (linux_wait_1): Unlink them.
7651 (linux_set_resume_request): Ignore resume requests for
7652 already-resumed and unhandled fork child threads.
7653 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7654 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7655 New functions.
7656 (handle_v_requests) <vCont>: Don't call require_running.
7657 * server.h (in_queued_stop_replies): New declaration.
7658
7659 2016-10-24 Yao Qi <yao.qi@linaro.org>
7660
7661 PR server/20733
7662 * linux-aarch64-low.c (append_insns): Cast the return value to
7663 'uint32_t *'.
7664
7665 2016-10-10 Yao Qi <yao.qi@linaro.org>
7666
7667 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7668
7669 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7670
7671 * target.c (target_supports_multi_process): New function, moved
7672 from...
7673 * target.h (target_supports_multi_process): ... here. Remove
7674 macro.
7675
7676 2016-10-05 Tom Tromey <tom@tromey.com>
7677
7678 PR remote/20655:
7679 * tracepoint.c (handle_tracepoint_bkpts): Check
7680 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7681
7682 2016-10-05 Yao Qi <yao.qi@linaro.org>
7683
7684 * configure.srv: Update the path of arm-*.xml files.
7685
7686 2016-10-05 Terry Guo <terry.guo@arm.com>
7687 Yao Qi <yao.qi@linaro.org>
7688
7689 * Makefile.in: Adjust the path of rules.
7690 * configure.srv: Update the path of xml files.
7691 * regformats/arm-with-iwmmxt.dat: Regenerated.
7692 * regformats/arm-with-neon.dat: Likewise.
7693 * regformats/arm-with-vfpv2.dat: Likewise.
7694 * regformats/arm-with-vfpv3.dat Likewise.
7695
7696 2016-09-30 Yao Qi <yao.qi@linaro.org>
7697
7698 PR gdbserver/20627
7699 * target.c (target_stop_and_wait): Don't call
7700 target_continue_no_signal, use resume_stop instead.
7701
7702 2016-09-26 Yao Qi <yao.qi@linaro.org>
7703
7704 * linux-low.c (linux_wait_1): Call debug_exit.
7705
7706 2016-09-23 Pedro Alves <palves@redhat.com>
7707
7708 * Makefile.in (SFILES): Add common/new-op.c.
7709 (OBS): Add common/new-op.o.
7710 (new-op.o): New rule.
7711
7712 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7713
7714 * .gitinore: Ignore more files.
7715
7716 2016-09-21 Yao Qi <yao.qi@linaro.org>
7717
7718 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7719 23.
7720
7721 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7722
7723 * server.c (start_inferior): Call target_mourn_inferior instead of
7724 mourn_inferior; pass ptid_t argument to it.
7725 (resume): Likewise.
7726 (handle_target_event): Likewise.
7727 * target.c (target_mourn_inferior): New function.
7728 * target.h (mourn_inferior): Delete macro.
7729
7730 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7731
7732 * linux-low.c (lwp_is_stepping): New function.
7733
7734 2016-09-06 Carl Love <cel@us.ibm.com>
7735
7736 * server.c (start_inferior): Fixed comment, requested comment change
7737 didn't get updated correctly. Removed reference to ptrace () call as
7738 it is only true on Linux systems.
7739
7740 2016-09-06 Carl Love <cel@us.ibm.com>
7741
7742 * server.c (start_inferior): Do not call
7743 function target_post_create_inferior () if the
7744 inferior process has already exited.
7745
7746 2016-09-05 Pedro Alves <palves@redhat.com>
7747
7748 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7749 (COMPILE.pre, CC_LD): Use CXX directly.
7750 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7751 * acinclude.m4: Don't include build-with-cxx.m4.
7752 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7753 * configure: Regenerate.
7754
7755 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7756
7757 PR gdb/19495
7758 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7759 call writing data to own_buf.
7760
7761 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7762
7763 * target.c (mywait): Call target_wait instead of
7764 the_target->wait.
7765 (target_wait): New function.
7766
7767 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7768
7769 * server.c (start_inferior): New variable 'ptid'. Replace calls
7770 to the_target->resume by target_continue{,_no_signal}, depending
7771 on the case.
7772 * target.c (target_stop_and_wait): Call target_continue_no_signal
7773 instead of the_target->resume.
7774 (target_continue): New function.
7775
7776 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7777
7778 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7779
7780 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7781
7782 PR server/20491
7783 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7784 ps_prochandle.
7785 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7786 * linux-arm-low.c (ps_get_thread_area): Likewise.
7787 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7788 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7789 * linux-mips-low.c (ps_get_thread_area): Likewise.
7790 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7791 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7792 * linux-x86-low.c (ps_get_thread_area): Likewise.
7793 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7794
7795 2016-08-19 Pedro Alves <palves@redhat.com>
7796
7797 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7798
7799 2016-08-19 Pedro Alves <palves@redhat.com>
7800
7801 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7802 comment. Use memcpy instead of casting through unsigned long.
7803
7804 2016-08-19 Pedro Alves <palves@redhat.com>
7805
7806 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7807 allocating around 0x80000000.
7808
7809 2016-08-19 Pedro Alves <palves@redhat.com>
7810
7811 PR gdb/20415
7812 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7813 (x32-avx512-linux-ipa.o): New rules.
7814 * configure.ac (x86_64-*-linux*): New x32 check.
7815 * configure.srv (ipa_x32_linux_regobj): New.
7816 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7817 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7818 descriptions.
7819 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7820 descriptions.
7821 * configure: Regenerate.
7822
7823 2016-08-09 Pedro Alves <palves@redhat.com>
7824
7825 PR gdb/18653
7826 * Makefile.in (OBS): Add signals-state-save-restore.o.
7827 (signals-state-save-restore.o): New rule.
7828 * config.in: Regenerate.
7829 * configure: Regenerate.
7830 * linux-low.c: Include "signals-state-save-restore.h".
7831 (linux_create_inferior): Call
7832 restore_original_signals_state.
7833 * server.c: Include "dispositions-save-restore.h".
7834 (captured_main): Call save_original_signals_state.
7835
7836 2016-08-05 Pedro Alves <palves@redhat.com>
7837
7838 * configure: Regenerate.
7839
7840 2016-08-04 Yao Qi <yao.qi@linaro.org>
7841
7842 * linux-low.c (regsets_fetch_inferior_registers): Check
7843 errno is ESRCH or not.
7844
7845 2016-08-02 Yao Qi <yao.qi@linaro.org>
7846
7847 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7848 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7849 (thread_db_load_search): Update.
7850 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7851 td_ta_set_event and td_ta_event_getmsg.
7852
7853 2016-07-26 Pedro Alves <palves@redhat.com>
7854
7855 PR server/20414
7856 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7857 of unsigned long for 64-bit registers and use uint32_t instead of
7858 unsigned int for 32-bit registers.
7859
7860 2016-07-26 Pedro Alves <palves@redhat.com>
7861
7862 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7863 to 'ptrace'.
7864
7865 2016-07-21 Tom Tromey <tom@tromey.com>
7866
7867 * configure: Rebuild.
7868
7869 2016-07-21 Yao Qi <yao.qi@linaro.org>
7870
7871 * mem-break.c (find_gdb_breakpoint): Cast bp to
7872 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7873
7874 2016-07-21 Yao Qi <yao.qi@linaro.org>
7875
7876 * server.c (handle_v_requests): Support s and S actions
7877 if target_supports_software_single_step return true.
7878
7879 2016-07-21 Yao Qi <yao.qi@linaro.org>
7880
7881 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7882 is resume_step, call maybe_hw_step.
7883 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7884 and unstop them.
7885 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7886 breakpoints or not.
7887 (proceed_one_lwp): If resume request is resume_step, install
7888 reinsert breakpoints and call maybe_hw_step.
7889
7890 2016-07-21 Yao Qi <yao.qi@linaro.org>
7891
7892 * linux-low.c (proceed_one_lwp): Declare.
7893 (linux_resume_one_thread): Remove local variable 'step'.
7894 Lift code enqueue signal. Call proceed_one_lwp instead of
7895 linux_resume_one_lwp.
7896
7897 2016-07-21 Yao Qi <yao.qi@linaro.org>
7898
7899 * linux-low.c (linux_resume_one_thread): Call
7900 enqueue_pending_signal.
7901
7902 2016-07-21 Yao Qi <yao.qi@linaro.org>
7903
7904 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7905 * inferiors.c (do_restore_current_thread_cleanup): New function.
7906 (make_cleanup_restore_current_thread): Likewise.
7907 * linux-low.c (install_software_single_step_breakpoints): Call
7908 make_cleanup_restore_current_thread. Switch current_thread to
7909 thread.
7910
7911 2016-07-21 Yao Qi <yao.qi@linaro.org>
7912
7913 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7914 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7915 (clone_one_breakpoint): Likewise.
7916 (delete_reinsert_breakpoints): Change parameter to thread.
7917 Callers updated.
7918 (has_reinsert_breakpoints): Likewise.
7919 (uninsert_reinsert_breakpoints): Likewise.
7920 (reinsert_reinsert_breakpoints): Likewise.
7921 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7922 (delete_reinsert_breakpoints): Likewise.
7923 (reinsert_reinsert_breakpoints): Likewise.
7924 (uninsert_reinsert_breakpoints): Likewise.
7925 (has_reinsert_breakpoints): Likewise.
7926
7927 2016-07-21 Yao Qi <yao.qi@linaro.org>
7928
7929 * inferiors.c (get_thread_process): Make parameter const.
7930 * inferiors.h (get_thread_process): Update declaration.
7931 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7932 Add new parameters child_thread and parent_thread. Callers
7933 updated.
7934 * mem-break.h (clone_all_breakpoints): Update declaration.
7935
7936 2016-07-21 Yao Qi <yao.qi@linaro.org>
7937
7938 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7939 <command_list, handler>: Remove.
7940 (struct gdb_breakpoint): New.
7941 (struct other_breakpoint): New.
7942 (struct reinsert_breakpoint): New.
7943 (is_gdb_breakpoint): New function.
7944 (any_persistent_commands): Update command_list if
7945 is_gdb_breakpoint returns true.
7946 (set_breakpoint): Create breakpoints according to their types.
7947 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7948 (set_gdb_breakpoint_1): Likewise.
7949 (set_gdb_breakpoint): Likewise.
7950 (clear_breakpoint_conditions): Change parameter type to
7951 'struct gdb_breakpoint *'.
7952 (clear_breakpoint_commands): Likewise.
7953 (clear_breakpoint_conditions_and_commands): Likewise.
7954 (add_condition_to_breakpoint): Likewise.
7955 (add_breakpoint_condition): Likewise.
7956 (add_commands_to_breakpoint): Likewise.
7957 (check_breakpoints): Check other_breakpoint.
7958 (clone_one_breakpoint): Clone breakpopint according to its type.
7959 * mem-break.h (struct gdb_breakpoint): Declare.
7960 (set_gdb_breakpoint): Update declaration.
7961 (clear_breakpoint_conditions_and_commands): Likewise.
7962 (add_breakpoint_condition): Likewise.
7963 (add_breakpoint_commands): Likewise.
7964 * server.c (process_point_options): Change parameter type to
7965 'struct gdb_breakpoint *'.
7966
7967 2016-07-21 Yao Qi <yao.qi@linaro.org>
7968
7969 * mem-break.c (set_breakpoint_at): Rename it to ...
7970 (set_breakpoint_type_at): ... it.
7971 (set_breakpoint_at): Call set_breakpoint_type_at.
7972 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7973 * mem-break.h (set_breakpoint_at): Update comments.
7974
7975 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7976
7977 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7978 to buf parameter.
7979 (nios2_store_gregset): Likewise.
7980
7981 2016-07-01 Pedro Alves <palves@redhat.com>
7982 Antoine Tremblay <antoine.tremblay@ericsson.com>
7983
7984 * linux-low.c: Change interface to take the target lwp_info
7985 pointer directly and return void. Handle detaching from a zombie
7986 thread.
7987 (linux_detach_lwp_callback): New function.
7988 (linux_detach): Detach from the leader thread after detaching from
7989 the clone threads.
7990
7991 2016-06-28 Yao Qi <yao.qi@linaro.org>
7992
7993 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7994 for variable new_offset.
7995 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7996 (aarch64_ftrace_insn_reloc_cb): Likewise.
7997 (aarch64_ftrace_insn_reloc_tb): Likewise.
7998 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7999 PRIx64 instead of PRIx32.
8000
8001 2016-06-28 Yao Qi <yao.qi@linaro.org>
8002
8003 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8004 (the_low_target): Install arm_get_syscall_trapinfo.
8005
8006 2016-06-28 Yao Qi <yao.qi@linaro.org>
8007
8008 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8009 function.
8010 (the_low_target): Install aarch64_get_syscall_trapinfo.
8011
8012 2016-06-28 Yao Qi <yao.qi@linaro.org>
8013
8014 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8015 Callers updated.
8016 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8017 Remove parameter sysno.
8018 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8019 sysret.
8020
8021 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8022
8023 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8024 (s390_emit_ne_goto): Likewise.
8025 (s390_emit_lt_goto): Likewise.
8026 (s390_emit_le_goto): Likewise.
8027 (s390_emit_gt_goto): Likewise.
8028 (s390_emit_ge_goto): Likewise.
8029 (s390x_emit_eq_goto): Likewise.
8030 (s390x_emit_ne_goto): Likewise.
8031 (s390x_emit_lt_goto): Likewise.
8032 (s390x_emit_le_goto): Likewise.
8033 (s390x_emit_gt_goto): Likewise.
8034 (s390x_emit_ge_goto): Likewise.
8035 (s390_emit_ops_impl): Mark variable static.
8036 (s390x_emit_ops): Likewise.
8037
8038 2016-06-17 Yao Qi <yao.qi@linaro.org>
8039
8040 * linux-low.c (handle_extended_wait): Call
8041 uninsert_reinsert_breakpoints for the parent process. Remove
8042 reinsert breakpoints from the child process. Reinsert them to
8043 the parent process when vfork is done.
8044 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8045 (reinsert_reinsert_breakpoints): New function.
8046 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8047 (reinsert_reinsert_breakpoints): Declare.
8048
8049 2016-06-17 Yao Qi <yao.qi@linaro.org>
8050
8051 * linux-low.c (handle_extended_wait): If the parent is doing
8052 step-over, remove the reinsert breakpoints from the forked child.
8053
8054 2016-06-17 Yao Qi <yao.qi@linaro.org>
8055
8056 * linux-low.c (unsuspend_all_lwps): Declare.
8057 (linux_low_filter_event): If thread exited, call finish_step_over.
8058 If step-over is finished, unsuspend other threads.
8059
8060 2016-06-17 Yao Qi <yao.qi@linaro.org>
8061
8062 * linux-low.c (linux_resume_one_lwp_throw): Assert
8063 has_reinsert_breakpoints returns false.
8064 * mem-break.c (delete_disabled_breakpoints): Assert
8065 bp type isn't reinsert_breakpoint.
8066
8067 2016-06-17 Yao Qi <yao.qi@linaro.org>
8068
8069 * linux-low.c (maybe_hw_step): New function.
8070 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8071 (finish_step_over): Switch current_thread to lwp temporarily,
8072 and assert has_reinsert_breakpoints returns true.
8073 (proceed_one_lwp): Call maybe_hw_step.
8074 * mem-break.c (has_reinsert_breakpoints): New function.
8075 * mem-break.h (has_reinsert_breakpoints): Declare.
8076
8077 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8078
8079 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8080
8081 2016-05-17 Yao Qi <yao.qi@linaro.org>
8082
8083 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8084 instead of find_inferior.
8085
8086 2016-05-05 Yao Qi <yao.qi@linaro.org>
8087
8088 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8089 Initialize res to zero.
8090
8091 2016-05-05 Yao Qi <yao.qi@linaro.org>
8092
8093 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8094 to uint32_t.
8095
8096 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8097
8098 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8099 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8100 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8101
8102 2016-04-28 Par Olsson <par.olsson@windriver.com>
8103 Simon Marchi <simon.marchi@ericsson.com>
8104
8105 * tracepoint.c (write_inferior_int8): New function.
8106 (cmd_qtenable_disable): Write enable flag using
8107 write_inferior_int8.
8108
8109 2016-04-25 Yao Qi <yao.qi@linaro.org>
8110
8111 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8112 (need_step_over_p): Return zero if the LWP has pending signals
8113 can be delivered on software single step target.
8114
8115 2016-04-25 Yao Qi <yao.qi@linaro.org>
8116
8117 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8118 return instead of error.
8119
8120 2016-04-22 Yao Qi <yao.qi@linaro.org>
8121
8122 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8123 to 23.
8124
8125 2016-04-22 Yao Qi <yao.qi@linaro.org>
8126
8127 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8128 signal when stepping over breakpoint with software single
8129 step.
8130
8131 2016-04-21 Pedro Alves <palves@redhat.com>
8132
8133 * linux-s390-low.c (s390_collect_ptrace_register)
8134 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8135 add casts.
8136 (s390_check_regset): Use void * instead of gdb_byte *.
8137
8138 2016-04-20 Pedro Alves <palves@redhat.com>
8139
8140 * configure: Renegerate.
8141
8142 2016-04-20 Yao Qi <yao.qi@linaro.org>
8143
8144 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8145 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8146 number 16.
8147 (arm_store_gregset): Likewise.
8148
8149 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8150
8151 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8152 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8153 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8154 (amd64-avx-mpx-linux.c): New rules.
8155 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8156 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8157 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8158 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8159 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8160 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8161 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8162 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8163 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8164 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8165 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8166 * linux-x86-low.c (x86_linux_read_description): Add case for
8167 X86_XSTATE_AVX_MPX_MASK.
8168 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8169 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8170 init_registers_i386_avx_mpx_linux.
8171 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8172 (initialize_low_tracepoint): Call
8173 init_registers_i386_avx_mpx_linux.
8174 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8175 (initialize_low_tracepoint): Call
8176 init_registers_amd64_avx_mpx_linux.
8177 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8178 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8179 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8180 declarations.
8181
8182 2016-04-18 Pedro Alves <palves@redhat.com>
8183
8184 * configure: Regenerate.
8185
8186 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8187
8188 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8189 (aarch64_emit_sub): Likewise.
8190
8191 2016-04-12 Pedro Alves <palves@redhat.com>
8192
8193 * utils.c (prepare_to_throw_exception): Delete.
8194
8195 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8196
8197 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8198
8199 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8200
8201 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8202
8203 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8204
8205 * linux-aarch64-ipa.c: Add <elf.h> include.
8206 * linux-ppc-ipa.c: Add <elf.h> include.
8207 * linux-s390-ipa.c: Add <elf.h> include.
8208
8209 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8210
8211 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8212 (get_raw_reg_ptr): Likewise.
8213 (get_trace_state_variable_value_ptr): Likewise.
8214 (set_trace_state_variable_value_ptr): Likewise.
8215 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8216 char *.
8217
8218 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8219 Marcin Kościelnicki <koriakin@0x04.net>
8220
8221 PR/17221
8222 * linux-ppc-low.c (emit_insns): New function.
8223 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8224 (ppc_emit_prologue): New function.
8225 (ppc_emit_epilogue): New function.
8226 (ppc_emit_add): New function.
8227 (ppc_emit_sub): New function.
8228 (ppc_emit_mul): New function.
8229 (ppc_emit_lsh): New function.
8230 (ppc_emit_rsh_signed): New function.
8231 (ppc_emit_rsh_unsigned): New function.
8232 (ppc_emit_ext): New function.
8233 (ppc_emit_zero_ext): New function.
8234 (ppc_emit_log_not): New function.
8235 (ppc_emit_bit_and): New function.
8236 (ppc_emit_bit_or): New function.
8237 (ppc_emit_bit_xor): New function.
8238 (ppc_emit_bit_not): New function.
8239 (ppc_emit_equal): New function.
8240 (ppc_emit_less_signed): New function.
8241 (ppc_emit_less_unsigned): New function.
8242 (ppc_emit_ref): New function.
8243 (ppc_emit_const): New function.
8244 (ppc_emit_reg): New function.
8245 (ppc_emit_pop): New function.
8246 (ppc_emit_stack_flush): New function.
8247 (ppc_emit_swap): New function.
8248 (ppc_emit_stack_adjust): New function.
8249 (ppc_emit_call): New function.
8250 (ppc_emit_int_call_1): New function.
8251 (ppc_emit_void_call_2): New function.
8252 (ppc_emit_if_goto): New function.
8253 (ppc_emit_goto): New function.
8254 (ppc_emit_eq_goto): New function.
8255 (ppc_emit_ne_goto): New function.
8256 (ppc_emit_lt_goto): New function.
8257 (ppc_emit_le_goto): New function.
8258 (ppc_emit_gt_goto): New function.
8259 (ppc_emit_ge_goto): New function.
8260 (ppc_write_goto_address): New function.
8261 (ppc_emit_ops_impl): New static variable.
8262 (ppc64v1_emit_prologue): New function.
8263 (ppc64v2_emit_prologue): New function.
8264 (ppc64_emit_epilogue): New function.
8265 (ppc64_emit_add): New function.
8266 (ppc64_emit_sub): New function.
8267 (ppc64_emit_mul): New function.
8268 (ppc64_emit_lsh): New function.
8269 (ppc64_emit_rsh_signed): New function.
8270 (ppc64_emit_rsh_unsigned): New function.
8271 (ppc64_emit_ext): New function.
8272 (ppc64_emit_zero_ext): New function.
8273 (ppc64_emit_log_not): New function.
8274 (ppc64_emit_bit_and): New function.
8275 (ppc64_emit_bit_or): New function.
8276 (ppc64_emit_bit_xor): New function.
8277 (ppc64_emit_bit_not): New function.
8278 (ppc64_emit_equal): New function.
8279 (ppc64_emit_less_signed): New function.
8280 (ppc64_emit_less_unsigned): New function.
8281 (ppc64_emit_ref): New function.
8282 (ppc64_emit_const): New function.
8283 (ppc64v1_emit_reg): New function.
8284 (ppc64v2_emit_reg): New function.
8285 (ppc64_emit_pop): New function.
8286 (ppc64_emit_stack_flush): New function.
8287 (ppc64_emit_swap): New function.
8288 (ppc64v1_emit_call): New function.
8289 (ppc64v2_emit_call): New function.
8290 (ppc64v1_emit_int_call_1): New function.
8291 (ppc64v2_emit_int_call_1): New function.
8292 (ppc64v1_emit_void_call_2): New function.
8293 (ppc64v2_emit_void_call_2): New function.
8294 (ppc64_emit_if_goto): New function.
8295 (ppc64_emit_eq_goto): New function.
8296 (ppc64_emit_ne_goto): New function.
8297 (ppc64_emit_lt_goto): New function.
8298 (ppc64_emit_le_goto): New function.
8299 (ppc64_emit_gt_goto): New function.
8300 (ppc64_emit_ge_goto): New function.
8301 (ppc64v1_emit_ops_impl): New static variable.
8302 (ppc64v2_emit_ops_impl): New static variable.
8303 (ppc_emit_ops): New function.
8304 (linux_low_target): Wire in ppc_emit_ops.
8305
8306 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8307 Marcin Kościelnicki <koriakin@0x04.net>
8308
8309 PR/17221
8310 * Makefile.in: Add powerpc-*-ipa.o
8311 * configure.srv: Add ipa_obj for powerpc*-linux.
8312 * linux-ppc-ipa.c: New file.
8313 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8314 includes.
8315 (PPC_FIELD): New macro.
8316 (PPC_SEXT): New macro.
8317 (PPC_OP6): New macro.
8318 (PPC_BO): New macro.
8319 (PPC_LI): New macro.
8320 (PPC_BD): New macro.
8321 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8322 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8323 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8324 (ppc_get_thread_area): New function.
8325 (is_elfv2_inferior): New function.
8326 (gen_ds_form): New function.
8327 (GEN_STD): New macro.
8328 (GEN_STDU): New macro.
8329 (GEN_LD): New macro.
8330 (GEN_LDU): New macro.
8331 (gen_d_form): New function.
8332 (GEN_ADDI): New macro.
8333 (GEN_ADDIS): New macro.
8334 (GEN_LI): New macro.
8335 (GEN_LIS): New macro.
8336 (GEN_ORI): New macro.
8337 (GEN_ORIS): New macro.
8338 (GEN_LWZ): New macro.
8339 (GEN_STW): New macro.
8340 (GEN_STWU): New macro.
8341 (gen_xfx_form): New function.
8342 (GEN_MFSPR): New macro.
8343 (GEN_MTSPR): New macro.
8344 (GEN_MFCR): New macro.
8345 (GEN_MTCR): New macro.
8346 (GEN_SYNC): New macro.
8347 (GEN_LWSYNC): New macro.
8348 (gen_x_form): New function.
8349 (GEN_OR): New macro.
8350 (GEN_MR): New macro.
8351 (GEN_LWARX): New macro.
8352 (GEN_STWCX): New macro.
8353 (GEN_CMPW): New macro.
8354 (gen_md_form): New function.
8355 (GEN_RLDICL): New macro.
8356 (GEN_RLDICR): New macro.
8357 (gen_i_form): New function.
8358 (GEN_B): New macro.
8359 (GEN_BL): New macro.
8360 (gen_b_form): New function.
8361 (GEN_BNE): New macro.
8362 (GEN_LOAD): New macro.
8363 (GEN_STORE): New macro.
8364 (gen_limm): New function.
8365 (gen_atomic_xchg): New function.
8366 (gen_call): New function.
8367 (ppc_relocate_instruction): New function.
8368 (ppc_install_fast_tracepoint_jump_pad): New function.
8369 (ppc_get_min_fast_tracepoint_insn_len): New function.
8370 (ppc_get_ipa_tdesc_idx): New function.
8371 (the_low_target): Wire in the new functions.
8372 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8373 tdescs.
8374 * linux-ppc-tdesc.h: New file.
8375
8376 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8377
8378 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8379 (alloc_jump_pad_buffer): New function.
8380 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8381 (alloc_jump_pad_buffer): New function.
8382 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8383 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8384 (alloc_jump_pad_buffer): New function.
8385 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8386 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8387 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8388 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8389
8390 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8391
8392 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8393 * linux-amd64-ipa.c: Likewise.
8394 * linux-i386-ipa.c: Likewise.
8395 * linux-s390-ipa.c: Likewise.
8396 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8397 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8398 set_trace_state_variable_value_ptr.
8399 (struct ipa_sym_addresses): Likewise.
8400 (symbol_list): Likewise.
8401 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8402 accessing gdb_collect directly.
8403 (gdb_collect_ptr_type): New typedef.
8404 (get_raw_reg_ptr_type): New typedef.
8405 (get_trace_state_variable_value_ptr_type): New typedef.
8406 (set_trace_state_variable_value_ptr_type): New typedef.
8407 (gdb_collect_ptr): New global.
8408 (get_raw_reg_ptr): New global.
8409 (get_trace_state_variable_value_ptr): New global.
8410 (set_trace_state_variable_value_ptr): New global.
8411 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8412 accessing get_raw_reg directly.
8413 (get_get_tsv_func_addr): Likewise for
8414 get_trace_state_variable_value_ptr.
8415 (get_set_tsv_func_addr): Likewise for
8416 set_trace_state_variable_value_ptr.
8417 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8418
8419 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8420
8421 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8422
8423 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8424
8425 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8426 packets.
8427 (relocate_instruction): Remove own_buf.
8428 * server.c (own_buf): Make global.
8429 (handle_v_requests): Make global.
8430 * server.h (own_buf): New declaration.
8431 (handle_v_requests): New prototype.
8432
8433 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8434
8435 PR 18377
8436 * linux-s390-low.c (add_insns): New function.
8437 (s390_emit_prologue): New function.
8438 (s390_emit_epilogue): New function.
8439 (s390_emit_add): New function.
8440 (s390_emit_sub): New function.
8441 (s390_emit_mul): New function.
8442 (s390_emit_lsh): New function.
8443 (s390_emit_rsh_signed): New function.
8444 (s390_emit_rsh_unsigned): New function.
8445 (s390_emit_ext): New function.
8446 (s390_emit_log_not): New function.
8447 (s390_emit_bit_and): New function.
8448 (s390_emit_bit_or): New function.
8449 (s390_emit_bit_xor): New function.
8450 (s390_emit_bit_not): New function.
8451 (s390_emit_equal): New function.
8452 (s390_emit_less_signed): New function.
8453 (s390_emit_less_unsigned): New function.
8454 (s390_emit_ref): New function.
8455 (s390_emit_if_goto): New function.
8456 (s390_emit_goto): New function.
8457 (s390_write_goto_address): New function.
8458 (s390_emit_litpool): New function.
8459 (s390_emit_const): New function.
8460 (s390_emit_call): New function.
8461 (s390_emit_reg): New function.
8462 (s390_emit_pop): New function.
8463 (s390_emit_stack_flush): New function.
8464 (s390_emit_zero_ext): New function.
8465 (s390_emit_swap): New function.
8466 (s390_emit_stack_adjust): New function.
8467 (s390_emit_set_r2): New function.
8468 (s390_emit_int_call_1): New function.
8469 (s390_emit_void_call_2): New function.
8470 (s390_emit_eq_goto): New function.
8471 (s390_emit_ne_goto): New function.
8472 (s390_emit_lt_goto): New function.
8473 (s390_emit_le_goto): New function.
8474 (s390_emit_gt_goto): New function.
8475 (s390_emit_ge_goto): New function.
8476 (s390x_emit_prologue): New function.
8477 (s390x_emit_epilogue): New function.
8478 (s390x_emit_add): New function.
8479 (s390x_emit_sub): New function.
8480 (s390x_emit_mul): New function.
8481 (s390x_emit_lsh): New function.
8482 (s390x_emit_rsh_signed): New function.
8483 (s390x_emit_rsh_unsigned): New function.
8484 (s390x_emit_ext): New function.
8485 (s390x_emit_log_not): New function.
8486 (s390x_emit_bit_and): New function.
8487 (s390x_emit_bit_or): New function.
8488 (s390x_emit_bit_xor): New function.
8489 (s390x_emit_bit_not): New function.
8490 (s390x_emit_equal): New function.
8491 (s390x_emit_less_signed): New function.
8492 (s390x_emit_less_unsigned): New function.
8493 (s390x_emit_ref): New function.
8494 (s390x_emit_if_goto): New function.
8495 (s390x_emit_const): New function.
8496 (s390x_emit_call): New function.
8497 (s390x_emit_reg): New function.
8498 (s390x_emit_pop): New function.
8499 (s390x_emit_stack_flush): New function.
8500 (s390x_emit_zero_ext): New function.
8501 (s390x_emit_swap): New function.
8502 (s390x_emit_stack_adjust): New function.
8503 (s390x_emit_int_call_1): New function.
8504 (s390x_emit_void_call_2): New function.
8505 (s390x_emit_eq_goto): New function.
8506 (s390x_emit_ne_goto): New function.
8507 (s390x_emit_lt_goto): New function.
8508 (s390x_emit_le_goto): New function.
8509 (s390x_emit_gt_goto): New function.
8510 (s390x_emit_ge_goto): New function.
8511 (s390_emit_ops): New function.
8512 (struct linux_target_ops): Fill in emit_ops hook.
8513
8514 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8515
8516 PR 18377
8517 * Makefile.in: Add s390 IPA files.
8518 * configure.srv: Build IPA for s390.
8519 * linux-s390-ipa.c: New file.
8520 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8521 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8522 (tdesc_s390_linux32): Likewise.
8523 (init_registers_s390_linux32v1): Likewise.
8524 (tdesc_s390_linux32v1): Likewise.
8525 (init_registers_s390_linux32v2): Likewise.
8526 (tdesc_s390_linux32v2): Likewise.
8527 (init_registers_s390_linux64): Likewise.
8528 (tdesc_s390_linux64): Likewise.
8529 (init_registers_s390_linux64v1): Likewise.
8530 (tdesc_s390_linux64v1): Likewise.
8531 (init_registers_s390_linux64v2): Likewise.
8532 (tdesc_s390_linux64v2): Likewise.
8533 (init_registers_s390_te_linux64): Likewise.
8534 (tdesc_s390_te_linux64): Likewise.
8535 (init_registers_s390_vx_linux64): Likewise.
8536 (tdesc_s390_vx_linux64): Likewise.
8537 (init_registers_s390_tevx_linux64): Likewise.
8538 (tdesc_s390_tevx_linux64): Likewise.
8539 (init_registers_s390x_linux64): Likewise.
8540 (tdesc_s390x_linux64): Likewise.
8541 (init_registers_s390x_linux64v1): Likewise.
8542 (tdesc_s390x_linux64v1): Likewise.
8543 (init_registers_s390x_linux64v2): Likewise.
8544 (tdesc_s390x_linux64v2): Likewise.
8545 (init_registers_s390x_te_linux64): Likewise.
8546 (tdesc_s390x_te_linux64): Likewise.
8547 (init_registers_s390x_vx_linux64): Likewise.
8548 (tdesc_s390x_vx_linux64): Likewise.
8549 (init_registers_s390x_tevx_linux64): Likewise.
8550 (tdesc_s390x_tevx_linux64): Likewise.
8551 (have_hwcap_s390_vx): New static variable.
8552 (s390_arch_setup): Fill have_hwcap_s390_vx.
8553 (s390_get_thread_area): New function.
8554 (s390_ft_entry_gpr_esa): New const.
8555 (s390_ft_entry_gpr_zarch): New const.
8556 (s390_ft_entry_misc): New const.
8557 (s390_ft_entry_fr): New const.
8558 (s390_ft_entry_vr): New const.
8559 (s390_ft_main_31): New const.
8560 (s390_ft_main_64): New const.
8561 (s390_ft_exit_fr): New const.
8562 (s390_ft_exit_vr): New const.
8563 (s390_ft_exit_misc): New const.
8564 (s390_ft_exit_gpr_esa): New const.
8565 (s390_ft_exit_gpr_zarch): New const.
8566 (append_insns): New function.
8567 (s390_relocate_instruction): New function.
8568 (s390_install_fast_tracepoint_jump_pad): New function.
8569 (s390_get_min_fast_tracepoint_insn_len): New function.
8570 (s390_get_ipa_tdesc_idx): New function.
8571 (struct linux_target_ops): Wire in the above functions.
8572 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8573 * linux-s390-tdesc.h: New file.
8574
8575 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8576
8577 * linux-s390-low.c (s390_supports_tracepoints): New function.
8578 (struct linux_target_ops): Fill supports_tracepoints hook.
8579
8580 2016-03-18 Yao Qi <yao.qi@linaro.org>
8581
8582 * linux-low.c (lwp_signal_can_be_delivered): New function.
8583 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8584
8585 2016-03-18 Yao Qi <yao.qi@linaro.org>
8586
8587 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8588 0 if signal is enqueued. Remove 'signal' from one debugging
8589 message. Move one debugging message to some lines below.
8590 Remove code setting 'signal' to 0.
8591
8592 2016-03-18 Yao Qi <yao.qi@linaro.org>
8593
8594 * linux-low.c (linux_low_filter_event): Remove redundant
8595 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8596
8597 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8598
8599 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8600 (struct linux_target_ops): Wire in the above.
8601
8602 2016-03-03 Yao Qi <yao.qi@linaro.org>
8603
8604 * linux-low.c: Update comments to start_step_over.
8605
8606 2016-03-03 Yao Qi <yao.qi@linaro.org>
8607
8608 PR server/19736
8609 * linux-low.c (handle_extended_wait): Set child suspended
8610 if event_lwp->bp_reinsert isn't zero.
8611
8612 2016-03-02 Yao Qi <yao.qi@linaro.org>
8613
8614 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8615 enqueue_pending_signal.
8616
8617 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8618
8619 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8620 is actually loaded.
8621
8622 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8623
8624 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8625 (s390_regmap_3264) [!__s390x__]: New global.
8626 (s390_collect_ptrace_register): Skip map entries containing -1.
8627 (s390_supply_ptrace_register): Ditto.
8628 (s390_fill_gprs_high): New function.
8629 (s390_store_gprs_high): New function.
8630 (s390_regsets): Add NT_S390_HIGH_GPRS.
8631 (s390_get_hwcap): Enable on 31-bit.
8632 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8633 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8634 Detect NT_S390_HIGH_GPRS.
8635 (s390_usrregs_info_3264): Enable on 31-bit.
8636 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8637 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8638
8639 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8640
8641 PR gdb/13808
8642 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8643 * configure.srv: Ditto.
8644 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8645 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8646 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8647 (init_registers_amd64_linux): Remove prototype.
8648 (tdesc_amd64_linux): Remove declaration.
8649 (get_ipa_tdesc): New function.
8650 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8651 initialize remaining tdescs.
8652 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8653 (init_registers_i386_linux): Remove prototype.
8654 (tdesc_i386_linux): Remove declaration.
8655 (get_ipa_tdesc): New function.
8656 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8657 initialize remaining tdescs.
8658 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8659 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8660 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8661 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8662 (x86_get_ipa_tdesc_idx): New function.
8663 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8664 * linux-x86-tdesc.h: New file.
8665 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8666 (target_get_ipa_tdesc_idx): New macro.
8667 * tracepoint.c (ipa_tdesc_idx): New macro.
8668 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8669 (symbol_list): Add ipa_tdesc_idx.
8670 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8671 (ipa_tdesc): Remove.
8672 (ipa_tdesc_idx): New variable.
8673 (get_context_regcache): Use get_ipa_tdesc.
8674 (gdb_collect): Ditto.
8675 (gdb_probe): Ditto.
8676 * tracepoint.h (get_ipa_tdesc): New prototype.
8677 (ipa_tdesc): Remove.
8678
8679 2016-02-24 Pedro Alves <palves@redhat.com>
8680
8681 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8682 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8683 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8684 Factor out common code between the USE_SIGTRAP_SIGINFO and
8685 !USE_SIGTRAP_SIGINFO blocks.
8686 (linux_low_filter_event): Call save_stop_reason instead of
8687 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8688 Update comments.
8689 (linux_wait_1): Update comments.
8690
8691 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8692
8693 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8694 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8695 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8696 ppc_insert_point, ppc_remove_point.
8697
8698 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8699
8700 * linux-s390-low.c (s390_supports_z_point_type): New function.
8701 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8702
8703 2016-02-16 Yao Qi <yao.qi@linaro.org>
8704
8705 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8706 PC. Get pc from regcache_read_pc.
8707
8708 2016-02-12 Yao Qi <yao.qi@linaro.org>
8709
8710 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8711 or linux_get_pc_32bit.
8712 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8713
8714 2016-02-12 Yao Qi <yao.qi@linaro.org>
8715
8716 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8717 arm_linux_get_next_pcs_fixup.
8718
8719 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8720
8721 * tracepoint.c (x_tracepoint_action_download): Change
8722 write_inferior_data_ptr to write_inferior_data_pointer.
8723 (cmd_qtstart): Likewise.
8724 (write_inferior_data_ptr): Remove.
8725 (download_agent_expr): Change write_inferior_data_ptr to
8726 write_inferior_data_pointer.
8727 (download_tracepoint_1): Likewise.
8728 (download_tracepoint): Likewise.
8729 (download_trace_state_variables): Likewise.
8730
8731 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8732 Marcin Kościelnicki <koriakin@0x04.net>
8733
8734 * tracepoint.c (struct tracepoint_action_ops): Remove.
8735 (struct tracepoint_action): Remove ops.
8736 (m_tracepoint_action_download, r_tracepoint_action_download)
8737 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8738 size and offset accordingly.
8739 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8740 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8741 (tracepoint_action_send, tracepoint_action_download): New functions.
8742 Helpers for trace action handlers.
8743 (add_tracepoint_action): Remove setup actions ops.
8744 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8745
8746 2016-02-10 Yao Qi <yao.qi@linaro.org>
8747
8748 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8749
8750 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8751
8752 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8753 to AC_OUTPUT.
8754 * configure: Regenerate.
8755
8756 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8757
8758 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8759 void * to gdb_byte *.
8760 * linux-low.c (siginfo_fixup): Likewise.
8761 (linux_xfer_siginfo): Likewise.
8762 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8763 Likewise.
8764 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8765
8766 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8767
8768 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8769 to srv_tgtobj.
8770 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8771 to srv_tgtobj.
8772 * linux-x86-low.c [__x86_64__]: Include
8773 "nat/amd64-linux-siginfo.h".
8774 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8775 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8776 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8777 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8778 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8779 (cpt_si_fd, si_timerid, si_overrun): Move from
8780 nat/amd64-linux-siginfo.c.
8781 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8782
8783 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8784
8785 * server.c (skip_to_semicolon): Remove.
8786 (process_point_options): Use strchrnul instead of
8787 skip_to_semicolon.
8788
8789 2016-01-26 Yao Qi <yao.qi@linaro.org>
8790
8791 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8792 * linux-low.c (install_software_single_step_breakpoints): Don't
8793 call regcache_read_pc.
8794 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8795 argument pc.
8796
8797 2016-01-26 Yao Qi <yao.qi@linaro.org>
8798
8799 * linux-low.c (install_software_single_step_breakpoints): Call
8800 regcache_read_pc instead of get_pc.
8801
8802 2016-01-26 Yao Qi <yao.qi@linaro.org>
8803
8804 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8805 (unblock_async_io): Rename to ...
8806 (block_unblock_async_io): ... it. New function.
8807 (enable_async_io): Don't install SIGIO handler. Unblock it
8808 instead.
8809 (disable_async_io): Don't ignore SIGIO. Block it instead.
8810 (initialize_async_io): Install SIGIO handler. Don't call
8811 unblock_async_io.
8812
8813 2016-01-26 Yao Qi <yao.qi@linaro.org>
8814
8815 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8816 first character is '\003', call *the_target->request_interrupt.
8817
8818 2016-01-25 Yao Qi <yao.qi@linaro.org>
8819
8820 * remote-utils.c (new_thread_notify): Remove.
8821 (dead_thread_notify): Likewise.
8822 * remote-utils.h (new_thread_notify): Remove declaration.
8823 (dead_thread_notify): Likewise.
8824
8825 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8826
8827 * gdb.trace/pending.exp: Fix expected message on continue.
8828
8829 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8830
8831 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8832 it works properly on big-endian machines where sizeof (CORE_ADDR)
8833 != sizeof (void *).
8834
8835 2016-01-21 Pedro Alves <palves@redhat.com>
8836
8837 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8838 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8839 * configure: Regenerate.
8840
8841 2016-01-21 Yao Qi <yao.qi@linaro.org>
8842
8843 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8844 is_thumb and set it according to CPSR saved on the stack.
8845 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8846 arm_sigreturn_next_pc.
8847
8848 2016-01-18 Yao Qi <yao.qi@linaro.org>
8849
8850 * linux-low.c (linux_set_pc_64bit): New function.
8851 (linux_get_pc_64bit): New function.
8852 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8853 Declare.
8854 * linux-sparc-low.c (debug_threads): Remove declaration.
8855 (sparc_get_pc): Remove.
8856 (the_low_target): Use linux_get_pc_64bit instead of
8857 sparc_get_pc.
8858 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8859 (the_low_target): Use linux_get_pc_64bit and
8860 linux_set_pc_64bit.
8861
8862 2016-01-18 Yao Qi <yao.qi@linaro.org>
8863
8864 * linux-arm-low.c (debug_threads): Remove declaration.
8865 (arm_get_pc, arm_set_pc): Remove.
8866 (the_low_target): Use linux_get_pc_32bit and
8867 linux_set_pc_32bit.
8868 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8869 (the_low_target): Use linux_get_pc_32bit and
8870 linux_set_pc_32bit.
8871 * linux-cris-low.c (debug_threads): Remove declaration.
8872 (cris_get_pc, cris_set_pc,): Remove.
8873 (the_low_target): Use linux_get_pc_32bit and
8874 linux_set_pc_32bit.
8875 * linux-crisv32-low.c (debug_threads): Remove declaration.
8876 (cris_get_pc, cris_set_pc): Remove.
8877 (the_low_target): Use linux_get_pc_32bit and
8878 linux_set_pc_32bit.
8879 * linux-low.c: Include inttypes.h.
8880 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8881 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8882 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8883 (the_low_target): Use linux_get_pc_32bit and
8884 linux_set_pc_32bit.
8885 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8886 (the_low_target): Use linux_get_pc_32bit and
8887 linux_set_pc_32bit.
8888 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8889 (the_low_target): Use linux_get_pc_32bit and
8890 linux_set_pc_32bit.
8891 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8892 (the_low_target): Use linux_get_pc_32bit and
8893 linux_set_pc_32bit.
8894 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8895 (the_low_target): Use linux_get_pc_32bit and
8896 linux_set_pc_32bit.
8897
8898 2016-01-18 Gary Benson <gbenson@redhat.com>
8899
8900 * configure.ac (AC_FUNC_FORK): New check.
8901 * config.in: Regenerate.
8902 * configure: Likewise.
8903
8904 2016-01-14 Yao Qi <yao.qi@linaro.org>
8905
8906 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8907 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8908 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8909 arm_get_next_pcs_ctor.
8910
8911 2016-01-12 Josh Stone <jistone@redhat.com>
8912 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8913
8914 * inferiors.h: Include "gdb_vecs.h".
8915 (struct process_info): Add syscalls_to_catch.
8916 * inferiors.c (remove_process): Free syscalls_to_catch.
8917 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8918 syscall_return stops.
8919 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8920 * server.c (handle_general_set): Handle QCatchSyscalls.
8921 (handle_query): Report support for QCatchSyscalls.
8922 * target.h (struct target_ops): Add supports_catch_syscall.
8923 (target_supports_catch_syscall): New macro.
8924 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8925 (struct lwp_info): Add syscall_state.
8926 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8927 Maintain syscall_state and syscalls_to_catch across exec.
8928 (get_syscall_trapinfo): New function, proxy to the_low_target.
8929 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8930 (linux_low_filter_event): Toggle syscall_state entry/return for
8931 syscall traps, and set it ignored for all others.
8932 (gdb_catching_syscalls_p): New function.
8933 (gdb_catch_this_syscall_p): New function.
8934 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8935 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8936 (linux_supports_catch_syscall): New function.
8937 (linux_target_ops): Install it.
8938 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8939 (the_low_target): Install it.
8940
8941 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8942
8943 * acinclude.m4: Include new ../warning.m4 file.
8944 * configure: Regenerated.
8945 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8946
8947 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8948
8949 * ax.c (is_goto_target): Mark static.
8950 * linux-low.c (register_addr): Likewise.
8951 (linux_fetch_registers, linux_store_registers): Likewise.
8952 * mem-break.c (any_persistent_commands): Fix old prototype.
8953 (add_commands_to_breakpoint): Mark static.
8954 * regcache.c (find_register_by_name): Delete unused func.
8955 * remote-utils.c (hex_or_minus_one): Mark static.
8956 * server.c (monitor_show_help): Mark static.
8957 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8958 handle_v_requests): Likewise.
8959
8960 2016-01-12 Pedro Alves <palves@redhat.com>
8961
8962 Remove use of the registered trademark symbol throughout.
8963
8964 2016-01-08 Yao Qi <yao.qi@linaro.org>
8965
8966 * remote-utils.c (getpkt): If c is '\003', call target hook
8967 request_interrupt.
8968
8969 2016-01-06 Yao Qi <yao.qi@linaro.org>
8970
8971 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8972 linux-aarch32-low.c.
8973 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8974 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8975 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8976 (thumb2_breakpoint): Declare.
8977 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8978 linux-aarch32-low.h.
8979 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8980 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8981 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8982
8983 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8984
8985 * gdbreplay.c (gdbreplay_version): Change copyright year in
8986 version message.
8987 * server.c (gdbserver_version): Likewise.
8988
8989 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8990
8991 * server.c (crc32_table): Delete.
8992 (crc32): Use libiberty's xcrc32 function.
8993
8994 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8995
8996 * lynx-low.c (lynx_delete_thread_callback): New function.
8997 (lynx_mourn): Properly delete our process and all of its
8998 threads. Remove call to clear_inferiors.
8999
9000 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9001
9002 * target.c (thread_search_callback): Add check that
9003 the thread_stopped target callback is not NULL before
9004 calling it.
9005
9006 2015-12-21 Yao Qi <yao.qi@linaro.org>
9007
9008 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9009 arm breakpoint.
9010
9011 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9012
9013 * server.c (handle_query): Call target_supports_software_single_step.
9014
9015 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9016
9017 * linux-low.c (single_step): New function.
9018 (linux_resume_one_lwp_throw): Call single_step.
9019 (start_step_over): Likewise.
9020
9021 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9022
9023 * Makefile.in (SFILES): Append arch/arm-linux.c,
9024 arch/arm-get-next-pcs.c.
9025 (arm-linux.o): New rule.
9026 (arm-get-next-pcs.o): New rule.
9027 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9028 arm-linux.o.
9029 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9030 to linux-aarch32-low.c.
9031 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9032 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9033 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9034 (thumb2_breakpoint_len): Likewise.
9035 (arm_is_thumb_mode): Make non-static.
9036 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9037 from linux-aarch32-low.c.
9038 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9039 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9040 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9041 (thumb2_breakpoint_len): Likewise.
9042 (arm_is_thumb_mode): New declaration.
9043 * linux-arm-low.c: Include arch/arm-linux.h
9044 aarch/arm-get-next-pcs.h, sys/syscall.h.
9045 (get_next_pcs_ops): New struct.
9046 (get_next_pcs_addr_bits_remove): New function.
9047 (get_next_pcs_is_thumb): New function.
9048 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9049 (arm_sigreturn_next_pc): Likewise.
9050 (get_next_pcs_syscall_next_pc): Likewise.
9051 (arm_gdbserver_get_next_pcs): Likewise.
9052 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9053 Initialize.
9054 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9055 * server.h: Include gdb_vecs.h.
9056
9057 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9058
9059 * Makefile.in (SFILES): Append common/common-regcache.c.
9060 (OBS): Append common-regcache.o.
9061 (common-regcache.o): New rule.
9062 * regcache.c (init_register_cache): Initialize cache to
9063 REG_UNAVAILABLE.
9064 (regcache_raw_read_unsigned): New function.
9065 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9066 register_status enum.
9067
9068 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9069
9070 * linux-aarch64-low.c (the_low_targets): Rename
9071 breakpoint_reinsert_addr to get_next_pcs.
9072 * linux-arm-low.c (the_low_targets): Likewise.
9073 * linux-bfin-low.c (the_low_targets): Likewise.
9074 * linux-cris-low.c (the_low_targets): Likewise.
9075 * linux-crisv32-low.c (the_low_targets): Likewise.
9076 * linux-low.c (can_software_single_step): Likewise.
9077 (install_software_single_step_breakpoints): New function.
9078 (start_step_over): Use install_software_single_step_breakpoints.
9079 * linux-low.h: New CORE_ADDR vector.
9080 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9081 get_next_pcs.
9082 * linux-mips-low.c (the_low_targets): Likewise.
9083 * linux-nios2-low.c (the_low_targets): Likewise.
9084 * linux-sparc-low.c (the_low_targets): Likewise.
9085
9086 2015-12-17 Pedro Alves <palves@redhat.com>
9087
9088 * linux-low.c (linux_kill_one_lwp): Remove references to
9089 LinuxThreads.
9090 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9091 to 'kill'.
9092 (linux_init_signals): Delete.
9093 (initialize_low): Adjust.
9094 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9095
9096 2015-12-16 Pedro Alves <palves@redhat.com>
9097
9098 * configure.ac (compiler warning flags): When testing a
9099 -Wno-foo option, check whether -Wfoo works instead.
9100 * configure: Regenerate.
9101
9102 2015-12-11 Don Breazeal <donb@codesourcery.com>
9103
9104 * server.c (process_serial_event): Don't exit from gdbserver
9105 in remote mode if there are still active inferiors.
9106
9107 2015-12-11 Yao Qi <yao.qi@linaro.org>
9108
9109 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9110 arm_breakpoint_at if the process is 32-bit.
9111
9112 2015-12-11 Yao Qi <yao.qi@linaro.org>
9113
9114 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9115 arm breakpoint.
9116
9117 2015-12-07 Yao Qi <yao.qi@linaro.org>
9118
9119 * configure.srv: Append arm.o to srv_tgtobj for
9120 aarch64*-*-linux* target.
9121 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9122 from linux-arm-low.c.
9123 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9124 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9125 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9126 (thumb2_breakpoint_len): Likewise.
9127 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9128 (arm_breakpoint_kinds): Likewise.
9129 (arm_breakpoint_kind_from_pc): Likewise.
9130 (arm_sw_breakpoint_from_kind): Likewise.
9131 (arm_breakpoint_kind_from_current_state): Likewise.
9132 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9133 (arm_sw_breakpoint_from_kind): Declare.
9134 (arm_breakpoint_kind_from_current_state): Declare.
9135 (arm_breakpoint_at): Declare.
9136 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9137 arm_sw_breakpoint_from_kind if process is 32-bit.
9138 (aarch64_breakpoint_kind_from_pc): New function.
9139 (aarch64_breakpoint_kind_from_current_state): New function.
9140 (the_low_target): Initialize fields breakpoint_kind_from_pc
9141 and breakpoint_kind_from_current_state.
9142 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9143 linux-aarch32-low.c.
9144 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9145 (arm_breakpoint, arm_breakpoint_len): Likewise.
9146 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9147 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9148 (arm_is_thumb_mode): Likewise.
9149 (arm_breakpoint_at): Likewise.
9150 (arm_breakpoint_kind_from_pc): Likewise.
9151 (arm_sw_breakpoint_from_kind): Likewise.
9152 (arm_breakpoint_kind_from_current_state): Likewise.
9153
9154 Revert:
9155 2015-08-04 Yao Qi <yao.qi@linaro.org>
9156
9157 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9158 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9159 * server.c (extended_protocol): Remove "static".
9160 * server.h (extended_protocol): Declare it.
9161
9162 2015-12-04 Josh Stone <jistone@redhat.com>
9163
9164 * target.h (struct target_ops) <arch_setup>: Rename to ...
9165 (struct target_ops) <post_create_inferior>: ... this.
9166 (target_arch_setup): Rename to ...
9167 (target_post_create_inferior): ... this, calling post_create_inferior.
9168 * server.c (start_inferior): Update target_arch_setup calls to
9169 target_post_create_inferior.
9170 * linux-low.c (linux_low_ptrace_options): Forward declare.
9171 (linux_arch_setup): Update its comment for general use.
9172 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9173 (struct linux_target_ops): Use linux_post_create_inferior.
9174 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9175 to post_create_inferior.
9176 * nto-low.c (struct nto_target_ops): Likewise.
9177 * spu-low.c (struct spu_target_ops): Likewise.
9178 * win32-low.c (struct win32_target_ops): Likewise.
9179
9180 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9181
9182 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9183
9184 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9185
9186 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9187 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9188 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9189 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9190 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9191 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9192 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9193 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9194 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9195 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9196 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9197 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9198
9199 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9200
9201 * linux-low.c (linux_look_up_symbols): Don't call
9202 linux_supports_traceclone.
9203 * linux-low.h (thread_db_init): Remove use_events argument.
9204 * thread-db.c (thread_db_use_event): Remove global variable.
9205 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9206 (struct thread_db) <td_create_bp>: Remove field.
9207 (thread_db_create_event): Remove function.
9208 (thread_db_enable_reporting): Likewise.
9209 (find_one_thread): Don't check for thread_db_use_events.
9210 (attach_thread): Likewise.
9211 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9212 (try_thread_db_load_1): Don't check for thread_db_use_events.
9213 (thread_db_init): Remove use_events argument and thread events
9214 handling.
9215 (remove_thread_event_breakpoints): Remove function.
9216 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9217
9218 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9219
9220 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9221 New function.
9222 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9223 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9224 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9225 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9226 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9227 Initialize.
9228 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9229 New function.
9230 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9231 * linux-low.c (can_hardware_single_step): Use
9232 supports_hardware_single_step.
9233 (can_software_single_step): New function.
9234 (start_step_over): Call can_software_single_step.
9235 (linux_supports_hardware_single_step): New function.
9236 (struct target_ops) <supports_software_single_step>: Initialize.
9237 * linux-low.h (struct linux_target_ops)
9238 <supports_hardware_single_step>: Initialize.
9239 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9240 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9241 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9242 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9243 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9244 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9245 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9246 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9247 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9248 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9249 Initialize.
9250 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9251 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9252 Initialize.
9253 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9254 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9255 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9256 New function.
9257 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9258 * target.h (struct target_ops): <supports_software_single_step>:
9259 New field.
9260 (target_supports_software_single_step): New macro.
9261
9262 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9263
9264 * linux-low.c (linux_wait_1): Fix pc advance condition.
9265 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9266 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9267
9268 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9269
9270 * linux-arm-low.c (arm_is_thumb_mode): New function.
9271 (arm_breakpoint_at): Use arm_is_thumb_mode.
9272 (arm_breakpoint_kind_from_current_state): New function.
9273 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9274 Initialize.
9275 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9276 (linux_breakpoint_kind_from_current_state): New function.
9277 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9278 * linux-low.h (struct linux_target_ops)
9279 <breakpoint_kind_from_current_state>: New field.
9280 * target.h (struct target_ops): Likewise.
9281 (target_breakpoint_kind_from_current_state): New macro.
9282
9283 2015-11-30 Pedro Alves <palves@redhat.com>
9284
9285 * linux-low.c (linux_resume): Wake up the event loop before
9286 returning.
9287
9288 2015-11-30 Pedro Alves <palves@redhat.com>
9289
9290 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9291 check.
9292 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9293 to -1.
9294 * target.c (struct thread_search): New structure.
9295 (thread_search_callback): New function.
9296 (prev_general_thread): New global.
9297 (prepare_to_access_memory, done_accessing_memory): New functions.
9298 * target.h (prepare_to_access_memory, done_accessing_memory):
9299 Replace macros with function declarations.
9300
9301 2015-11-30 Pedro Alves <palves@redhat.com>
9302
9303 PR 14618
9304 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9305 report TARGET_WAITKIND_NO_RESUMED.
9306 * remote-utils.c (prepare_resume_reply): Handle
9307 TARGET_WAITKIND_NO_RESUMED.
9308 * server.c (report_no_resumed): New global.
9309 (handle_query) <qSupported>: Handle "no-resumed+". Report
9310 "no-resumed+" support.
9311 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9312 return error if the client doesn't support no-resumed events.
9313 (push_stop_notification): New function.
9314 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9315 events if the client supports them.
9316
9317 2015-11-30 Pedro Alves <palves@redhat.com>
9318
9319 * linux-low.c (thread_still_has_status_pending_p): Don't check
9320 vCont;t here.
9321 (lwp_resumed): New function.
9322 (status_pending_p_callback): Return early if the LWP is not
9323 supposed to be resumed.
9324
9325 2015-11-30 Pedro Alves <palves@redhat.com>
9326
9327 * linux-low.c (handle_extended_wait): Assert that the LWP's
9328 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9329 thread create events, leave the new child's status pending.
9330 (linux_low_filter_event): If GDB wants to hear about thread exit
9331 events, leave the LWP marked dead and don't delete it.
9332 (linux_wait_for_event_filtered): Don't check for thread exit.
9333 (filter_exit_event): New function.
9334 (linux_wait_1): Use it, when returning an exit event.
9335 (linux_resume_one_lwp_throw): Assert that the LWP's
9336 waitstatus is TARGET_WAITKIND_IGNORE.
9337 * remote-utils.c (prepare_resume_reply): Handle
9338 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9339 * server.c (report_thread_events): New global.
9340 (handle_general_set): Handle QThreadEvents.
9341 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9342 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9343 TARGET_WAITKIND_THREAD_EXITED.
9344 * server.h (report_thread_events): Declare.
9345
9346 2015-11-30 Pedro Alves <palves@redhat.com>
9347
9348 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9349 the thread's last_resume_kind was resume_stop.
9350
9351 2015-11-30 Pedro Alves <palves@redhat.com>
9352
9353 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9354 before returning.
9355
9356 2015-11-30 Pedro Alves <palves@redhat.com>
9357
9358 * server.c (handle_v_requests): Handle vCtrlC.
9359
9360 2015-11-30 Pedro Alves <palves@redhat.com>
9361
9362 * gdbthread.h (find_any_thread_of_pid): Declare.
9363 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9364 functions.
9365 * server.c (handle_query): If current_thread is NULL, look for
9366 another thread of the selected process.
9367
9368 2015-11-26 Daniel Colascione <dancol@dancol.org>
9369 Simon Marchi <simon.marchi@ericsson.com>
9370
9371 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9372 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9373 name in reply.
9374 * target.h (struct target_ops) <thread_name>: New field.
9375 (target_thread_name): New macro.
9376
9377 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9378
9379 * regcache.h (regcache_invalidate_pid): Add declaration.
9380 * regcache.c (regcache_invalidate_pid): New function, extracted
9381 from regcache_invalidate.
9382 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9383 Add trivial documentation comment.
9384 * lynx-low.c: Use regcache_invalidate_pid instead of
9385 regcache_invalidate.
9386
9387 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9388
9389 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9390 and Elf64_auxv_t if the target is Android.
9391
9392 2015-11-22 Doug Evans <xdje42@gmail.com>
9393
9394 * target.h: #include <sys/types.h>.
9395
9396 2015-11-19 Pedro Alves <palves@redhat.com>
9397
9398 * linux-low.c (linux_process_qsupported): Change prototype.
9399 Adjust.
9400 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9401 Change prototype.
9402 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9403 and adjust to loop over all features.
9404 * server.c (handle_query) <qSupported>: Adjust to call
9405 target_process_qsupported once, passing it a vector of unprocessed
9406 features.
9407 * target.h (struct target_ops) <process_qsupported>: Change
9408 prototype.
9409 (target_process_qsupported): Adjust.
9410
9411 2015-11-19 Pedro Alves <palves@redhat.com>
9412
9413 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9414 mode.
9415 * configure: Regenerate.
9416
9417 2015-11-19 Pedro Alves <palves@redhat.com>
9418
9419 * configure: Regenerate.
9420
9421 2015-11-19 Yao Qi <yao.qi@linaro.org>
9422
9423 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9424 type to uint32_t.
9425
9426 2015-11-19 Yao Qi <yao.qi@linaro.org>
9427
9428 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9429 (struct aarch64_operand): Move enum out.
9430
9431 2015-11-19 Yao Qi <yao.qi@linaro.org>
9432
9433 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9434 struct user_fpsimd_state *.
9435 (aarch64_store_fpregset): Likewise.
9436
9437 2015-11-19 Yao Qi <yao.qi@linaro.org>
9438
9439 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9440 struct user_pt_regs *.
9441 (aarch64_store_gregset): Likewise.
9442
9443 2015-11-18 Pedro Alves <palves@redhat.com>
9444
9445 * Makefile.in (all_object_files): Add $IPA_OBJS.
9446
9447 2015-11-17 Pedro Alves <palves@redhat.com>
9448
9449 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9450 GDB_SIGNAL_0 and gdb_signal_to_string.
9451
9452 2015-11-17 Pedro Alves <palves@redhat.com>
9453
9454 * win32-low.c (handle_output_debug_string): Remove parameter.
9455 (win32_kill): Remove our_status local and adjust call to
9456 handle_output_debug_string.
9457 (get_child_debug_event): Adjust call to
9458 handle_output_debug_string.
9459
9460 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9461
9462 * linux-mips-low.c (mips_fill_gregset): Add cast.
9463 (mips_store_gregset): Likewise.
9464 (mips_fill_fpregset): Likewise.
9465 (mips_store_fpregset): Likewise.
9466
9467 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9468
9469 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9470 priv.
9471
9472 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9473
9474 * linux-mips-low.c (mips_linux_new_thread): Change type of
9475 watch_type to enum target_hw_bp_type.
9476
9477 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9478
9479 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9480 Change return type to arm_hwbp_type.
9481
9482 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9483
9484 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9485 (arm_store_gregset): Likewise.
9486 * linux-arm-low.c (arm_get_hwcap): Likewise.
9487 (arm_read_description): Likewise.
9488
9489 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9490
9491 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9492
9493 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9494
9495 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9496 (ppc_fill_vsxregset): Likewise.
9497 (ppc_store_vsxregset): Likewise.
9498 (ppc_fill_vrregset): Likewise.
9499 (ppc_store_vrregset): Likewise.
9500 (ppc_fill_evrregset): Likewise.
9501 (ppc_store_evrregset): Likewise.
9502
9503 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9504
9505 * linux-ppc-low.c (ppc_usrregs_info): Remove
9506 forward-declaration.
9507 (ppc_arch_setup): Move lower in file.
9508
9509 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9510
9511 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9512 (ps_pdwrite): Likewise.
9513
9514 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9515
9516 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9517 to after assert checks.
9518
9519 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9520
9521 * proc-service.c (ps_pdread): Add/adjust casts.
9522 (ps_pdwrite): Add/adjust casts.
9523
9524 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9525
9526 * server.c (handle_search_memory_1): Cast return value of
9527 memmem.
9528
9529 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9530
9531 * server.c (write_qxfer_response): Change type of data to
9532 gdb_byte *.
9533
9534 2015-10-29 Pedro Alves <palves@redhat.com>
9535
9536 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9537
9538 2015-10-29 Pedro Alves <palves@redhat.com>
9539
9540 * tracepoint.c (clear_installed_tracepoints): Add casts.
9541
9542 2015-10-29 Pedro Alves <palves@redhat.com>
9543
9544 * server.c (handle_v_cont, process_serial_event): Add enum
9545 gdb_signal casts to signal parsing code.
9546
9547 2015-10-29 Pedro Alves <palves@redhat.com>
9548
9549 * linux-low.h (NULL_REGSET): Define.
9550 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9551 * linux-arm-low.c (arm_regsets): Likewise.
9552 * linux-crisv32-low.c (cris_regsets): Likewise.
9553 * linux-m68k-low.c (m68k_regsets): Likewise.
9554 * linux-mips-low.c (mips_regsets): Likewise.
9555 * linux-nios2-low.c (nios2_regsets): Likewise.
9556 * linux-ppc-low.c (ppc_regsets): Likewise.
9557 * linux-s390-low.c (s390_regsets): Likewise.
9558 * linux-sh-low.c (sh_regsets): Likewise.
9559 * linux-sparc-low.c (sparc_regsets): Likewise.
9560 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9561 * linux-tile-low.c (tile_regsets): Likewise.
9562 * linux-x86-low.c (x86_regsets): Likewise.
9563 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9564
9565 2015-10-29 Pedro Alves <palves@redhat.com>
9566
9567 * linux-low.h (NULL_REGSET): Define.
9568 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9569 * linux-arm-low.c (arm_regsets): Likewise.
9570 * linux-crisv32-low.c (cris_regsets): Likewise.
9571 * linux-m68k-low.c (m68k_regsets): Likewise.
9572 * linux-mips-low.c (mips_regsets): Likewise.
9573 * linux-nios2-low.c (nios2_regsets): Likewise.
9574 * linux-ppc-low.c (ppc_regsets): Likewise.
9575 * linux-s390-low.c (s390_regsets): Likewise.
9576 * linux-sh-low.c (sh_regsets): Likewise.
9577 * linux-sparc-low.c (sparc_regsets): Likewise.
9578 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9579 * linux-tile-low.c (tile_regsets): Likewise.
9580 * linux-x86-low.c (x86_regsets): Likewise.
9581 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9582
9583 2015-10-26 Doug Evans <dje@google.com>
9584
9585 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9586
9587 2015-10-26 Doug Evans <dje@google.com>
9588
9589 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9590
9591 2015-10-26 Doug Evans <dje@google.com>
9592
9593 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9594 for debug_printf.
9595 (attach_thread, find_new_threads_callback): Ditto.
9596
9597 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9598
9599 * mem-break.h (set_breakpoint_data): Remove.
9600
9601 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9602
9603 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9604 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9605 (initialize_low): Remove set_breakpoint_data call.
9606 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9607 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9608 (initialize_low): Remove set_breakpoint_data call.
9609 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9610 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9611 (initialize_low): Remove set_breakpoint_data call.
9612
9613 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9614
9615 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9616 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9617 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9618 * target.h (target_breakpoint_kind_from_pc): New macro.
9619
9620 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9621
9622 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9623 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9624 the default breakpoint kind.
9625
9626 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9627
9628 * linux-arm-low.c (arm_supports_z_point_type): Add software
9629 breakpoint support.
9630
9631 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9632
9633 * linux-arm-low.c: Refactor breakpoint definitions.
9634 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9635 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9636
9637 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9638
9639 * Makefile.in: Add arm.c/o.
9640 * configure.srv: Likewise.
9641 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9642 (arm_breakpoint_kind_from_pc): New function.
9643 (arm_sw_breakpoint_from_kind): Return proper kind.
9644 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9645
9646 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9647
9648 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9649 removal.
9650 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9651 (struct raw_breakpoint) <size>: Remove.
9652 (struct raw_breakpoint) <kind>: Add.
9653 (bp_size): New function.
9654 (bp_opcode): Likewise.
9655 (find_raw_breakpoint_at): Adjust for kind.
9656 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9657 (remove_memory_breakpoint): Adjust for kind call bp_size.
9658 (set_raw_breakpoint_at): Adjust for kind.
9659 (set_breakpoint): Likewise.
9660 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9661 (delete_raw_breakpoint): Adjust for kind.
9662 (delete_breakpoint): Likewise.
9663 (find_gdb_breakpoint): Likewise.
9664 (set_gdb_breakpoint_1): Likewise.
9665 (set_gdb_breakpoint): Likewise.
9666 (delete_gdb_breakpoint_1): Likewise.
9667 (delete_gdb_breakpoint): Likewise.
9668 (uninsert_raw_breakpoint): Likewise.
9669 (reinsert_raw_breakpoint): Likewise.
9670 (set_breakpoint_data): Remove.
9671 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9672 (check_mem_read): Adjust for kind call bp_size.
9673 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9674 (clone_one_breakpoint): Adjust for kind.
9675 * mem-break.h (set_gdb_breakpoint): Likewise.
9676 (delete_gdb_breakpoint): Likewise.
9677 * server.c (process_serial_event): Likewise.
9678
9679 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9680
9681 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9682 (struct linux_target_ops) <breakpoint>: Remove.
9683 (struct linux_target_ops) <breakpoint_len>: Remove.
9684 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9685 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9686 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9687 (arm_sw_breakpoint_from_kind): New function.
9688 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9689 (struct linux_target_ops) <breakpoint>: Remove.
9690 (struct linux_target_ops) <breakpoint_len>: Remove.
9691 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9692 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9693 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9694 (struct linux_target_ops) <breakpoint>: Remove.
9695 (struct linux_target_ops) <breakpoint_len>: Remove.
9696 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9697 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9698 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9699 (struct linux_target_ops) <breakpoint>: Remove.
9700 (struct linux_target_ops) <breakpoint_len>: Remove.
9701 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9702 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9703 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9704 and sw_breakpoint_from_kind to increment the pc.
9705 (linux_breakpoint_kind_from_pc): New function.
9706 (linux_sw_breakpoint_from_kind): New function.
9707 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9708 (initialize_low): Call breakpoint_kind_from_pc and
9709 sw_breakpoint_from_kind to replace breakpoint_data/len.
9710 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9711 New field.
9712 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9713 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9714 (struct linux_target_ops) <breakpoint>: Remove.
9715 (struct linux_target_ops) <breakpoint_len>: Remove.
9716 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9717 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9718 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9719 (struct linux_target_ops) <breakpoint>: Remove.
9720 (struct linux_target_ops) <breakpoint_len>: Remove.
9721 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9722 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9723 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9724 (struct linux_target_ops) <breakpoint>: Remove.
9725 (struct linux_target_ops) <breakpoint_len>: Remove.
9726 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9727 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9728 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9729 (struct linux_target_ops) <breakpoint>: Remove.
9730 (struct linux_target_ops) <breakpoint_len>: Remove.
9731 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9732 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9733 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9734 (struct linux_target_ops) <breakpoint>: Remove.
9735 (struct linux_target_ops) <breakpoint_len>: Remove.
9736 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9737 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9738 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9739 (struct linux_target_ops) <breakpoint>: Remove.
9740 (struct linux_target_ops) <breakpoint_len>: Remove.
9741 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9742 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9743 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9744 (struct linux_target_ops) <breakpoint>: Remove.
9745 (struct linux_target_ops) <breakpoint_len>: Remove.
9746 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9747 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9748 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9749 (struct linux_target_ops) <breakpoint>: Remove.
9750 (struct linux_target_ops) <breakpoint_len>: Remove.
9751 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9753 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9754 (struct linux_target_ops) <breakpoint>: Remove.
9755 (struct linux_target_ops) <breakpoint_len>: Remove.
9756 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9757 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9758 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9759 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9760 (struct linux_target_ops) <breakpoint>: Remove.
9761 (struct linux_target_ops) <breakpoint_len>: Remove.
9762 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9763 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9764 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9765 (struct linux_target_ops) <breakpoint>: Remove.
9766 (struct linux_target_ops) <breakpoint_len>: Remove.
9767 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9768 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9769
9770 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9771
9772 * linux-cris-low.c (cris_get_pc): Remove void arg.
9773
9774 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9775
9776 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9777 variable name.
9778
9779 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9780
9781 * inferiors.c (thread_pid_matches_callback): New function.
9782 (find_thread_process): New function.
9783 (remove_thread): Reset current_thread.
9784 (remove_process): Assert threads have been removed first.
9785
9786 2015-10-15 Yao Qi <yao.qi@linaro.org>
9787
9788 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9789 if it is 3.
9790 (aarch64_remove_point): Likewise.
9791 * regcache.c (regcache_register_size): New function.
9792
9793 2015-10-12 Yao Qi <yao.qi@linaro.org>
9794
9795 * linux-aarch64-low.c: Update all callers as emit_load_store
9796 is renamed to aarch64_emit_load_store.
9797
9798 2015-10-12 Yao Qi <yao.qi@linaro.org>
9799
9800 * linux-aarch64-low.c: Update all callers of function renaming
9801 from emit_insn to aarch64_emit_insn.
9802
9803 2015-10-12 Yao Qi <yao.qi@linaro.org>
9804
9805 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9806 arch/aarch64-insn.h.
9807 (struct aarch64_memory_operand): Likewise.
9808 (ENCODE): Likewise.
9809 (emit_insn): Move to arch/aarch64-insn.c.
9810 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9811 (emit_load_store): Move to arch/aarch64-insn.c.
9812 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9813 (can_encode_int32): Remove.
9814
9815 2015-10-12 Yao Qi <yao.qi@linaro.org>
9816
9817 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9818 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9819 (aarch64_relocate_instruction): Likewise.
9820 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9821 (struct aarch64_insn_visitor): Likewise.
9822
9823 2015-10-12 Yao Qi <yao.qi@linaro.org>
9824
9825 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9826 (struct aarch64_insn_visitor): New.
9827 (struct aarch64_insn_relocation_data): New.
9828 (aarch64_ftrace_insn_reloc_b): New function.
9829 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9830 (aarch64_ftrace_insn_reloc_cb): Likewise.
9831 (aarch64_ftrace_insn_reloc_tb): Likewise.
9832 (aarch64_ftrace_insn_reloc_adr): Likewise.
9833 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9834 (aarch64_ftrace_insn_reloc_others): Likewise.
9835 (visitor): New.
9836 (aarch64_relocate_instruction): Use visitor.
9837
9838 2015-10-12 Yao Qi <yao.qi@linaro.org>
9839
9840 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9841 int. Add argument buf.
9842 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9843 aarch64_relocate_instruction.
9844
9845 2015-10-12 Yao Qi <yao.qi@linaro.org>
9846
9847 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9848 argument insn. Remove local variable insn. Don't call
9849 target_read_uint32.
9850 (aarch64_install_fast_tracepoint_jump_pad): Call
9851 target_read_uint32.
9852
9853 2015-09-30 Yao Qi <yao.qi@linaro.org>
9854
9855 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9856 (emit_load_store_pair): Likewise.
9857
9858 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9859
9860 * dll.c (match_dll): Add cast(s).
9861 (unloaded_dll): Likewise.
9862 * linux-low.c (second_thread_of_pid_p): Likewise.
9863 (delete_lwp_callback): Likewise.
9864 (count_events_callback): Likewise.
9865 (select_event_lwp_callback): Likewise.
9866 (linux_set_resume_request): Likewise.
9867 * server.c (accumulate_file_name_length): Likewise.
9868 (emit_dll_description): Likewise.
9869 (handle_qxfer_threads_worker): Likewise.
9870 (visit_actioned_threads): Likewise.
9871 * thread-db.c (any_thread_of): Likewise.
9872 * tracepoint.c (same_process_p): Likewise.
9873 (match_blocktype): Likewise.
9874 (build_traceframe_info_xml): Likewise.
9875
9876 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9877
9878 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9879 assignment.
9880 (gdb_unparse_agent_expr): Likewise.
9881 * hostio.c (require_data): Likewise.
9882 (handle_pread): Likewise.
9883 * linux-low.c (disable_regset): Likewise.
9884 (fetch_register): Likewise.
9885 (store_register): Likewise.
9886 (get_dynamic): Likewise.
9887 (linux_qxfer_libraries_svr4): Likewise.
9888 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9889 (set_fast_tracepoint_jump): Likewise.
9890 (uninsert_fast_tracepoint_jumps_at): Likewise.
9891 (reinsert_fast_tracepoint_jumps_at): Likewise.
9892 (validate_inserted_breakpoint): Likewise.
9893 (clone_agent_expr): Likewise.
9894 * regcache.c (init_register_cache): Likewise.
9895 * remote-utils.c (putpkt_binary_1): Likewise.
9896 (decode_M_packet): Likewise.
9897 (decode_X_packet): Likewise.
9898 (look_up_one_symbol): Likewise.
9899 (relocate_instruction): Likewise.
9900 (monitor_output): Likewise.
9901 * server.c (handle_search_memory): Likewise.
9902 (handle_qxfer_exec_file): Likewise.
9903 (handle_qxfer_libraries): Likewise.
9904 (handle_qxfer): Likewise.
9905 (handle_query): Likewise.
9906 (handle_v_cont): Likewise.
9907 (handle_v_run): Likewise.
9908 (captured_main): Likewise.
9909 * target.c (write_inferior_memory): Likewise.
9910 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9911 * tracepoint.c (init_trace_buffer): Likewise.
9912 (add_tracepoint_action): Likewise.
9913 (add_traceframe): Likewise.
9914 (add_traceframe_block): Likewise.
9915 (cmd_qtdpsrc): Likewise.
9916 (cmd_qtdv): Likewise.
9917 (cmd_qtstatus): Likewise.
9918 (response_source): Likewise.
9919 (response_tsv): Likewise.
9920 (cmd_qtnotes): Likewise.
9921 (gdb_collect): Likewise.
9922 (initialize_tracepoint): Likewise.
9923
9924 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9925
9926 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9927 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9928 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9929 <NOP>: New.
9930 (enum aarch64_condition_codes): New enum.
9931 (w0): New static global.
9932 (fp): Likewise.
9933 (lr): Likewise.
9934 (struct aarch64_memory_operand) <type>: New
9935 MEMORY_OPERAND_POSTINDEX type.
9936 (postindex_memory_operand): New helper function.
9937 (emit_ret): New function.
9938 (emit_load_store_pair): New function, factored out of emit_stp
9939 with support for MEMORY_OPERAND_POSTINDEX.
9940 (emit_stp): Rewrite using emit_load_store_pair.
9941 (emit_ldp): New function.
9942 (emit_load_store): Likewise.
9943 (emit_ldr): Mention post-index instruction in comment.
9944 (emit_ldrh): New function.
9945 (emit_ldrb): New function.
9946 (emit_ldrsw): Mention post-index instruction in comment.
9947 (emit_str): Likewise.
9948 (emit_subs): New function.
9949 (emit_cmp): Likewise.
9950 (emit_and): Likewise.
9951 (emit_orr): Likewise.
9952 (emit_orn): Likewise.
9953 (emit_eor): Likewise.
9954 (emit_mvn): Likewise.
9955 (emit_lslv): Likewise.
9956 (emit_lsrv): Likewise.
9957 (emit_asrv): Likewise.
9958 (emit_mul): Likewise.
9959 (emit_sbfm): Likewise.
9960 (emit_sbfx): Likewise.
9961 (emit_ubfm): Likewise.
9962 (emit_ubfx): Likewise.
9963 (emit_csinc): Likewise.
9964 (emit_cset): Likewise.
9965 (emit_nop): Likewise.
9966 (emit_ops_insns): New helper function.
9967 (emit_pop): Likewise.
9968 (emit_push): Likewise.
9969 (aarch64_emit_prologue): New function.
9970 (aarch64_emit_epilogue): Likewise.
9971 (aarch64_emit_add): Likewise.
9972 (aarch64_emit_sub): Likewise.
9973 (aarch64_emit_mul): Likewise.
9974 (aarch64_emit_lsh): Likewise.
9975 (aarch64_emit_rsh_signed): Likewise.
9976 (aarch64_emit_rsh_unsigned): Likewise.
9977 (aarch64_emit_ext): Likewise.
9978 (aarch64_emit_log_not): Likewise.
9979 (aarch64_emit_bit_and): Likewise.
9980 (aarch64_emit_bit_or): Likewise.
9981 (aarch64_emit_bit_xor): Likewise.
9982 (aarch64_emit_bit_not): Likewise.
9983 (aarch64_emit_equal): Likewise.
9984 (aarch64_emit_less_signed): Likewise.
9985 (aarch64_emit_less_unsigned): Likewise.
9986 (aarch64_emit_ref): Likewise.
9987 (aarch64_emit_if_goto): Likewise.
9988 (aarch64_emit_goto): Likewise.
9989 (aarch64_write_goto_address): Likewise.
9990 (aarch64_emit_const): Likewise.
9991 (aarch64_emit_call): Likewise.
9992 (aarch64_emit_reg): Likewise.
9993 (aarch64_emit_pop): Likewise.
9994 (aarch64_emit_stack_flush): Likewise.
9995 (aarch64_emit_zero_ext): Likewise.
9996 (aarch64_emit_swap): Likewise.
9997 (aarch64_emit_stack_adjust): Likewise.
9998 (aarch64_emit_int_call_1): Likewise.
9999 (aarch64_emit_void_call_2): Likewise.
10000 (aarch64_emit_eq_goto): Likewise.
10001 (aarch64_emit_ne_goto): Likewise.
10002 (aarch64_emit_lt_goto): Likewise.
10003 (aarch64_emit_le_goto): Likewise.
10004 (aarch64_emit_gt_goto): Likewise.
10005 (aarch64_emit_ge_got): Likewise.
10006 (aarch64_emit_ops_impl): New static global variable.
10007 (aarch64_emit_ops): New target function, return
10008 &aarch64_emit_ops_impl.
10009 (struct linux_target_ops): Install it.
10010
10011 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10012
10013 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10014 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10015 aarch64-ipa.o.
10016 * linux-aarch64-ipa.c: New file.
10017 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10018 and endian.h.
10019 (aarch64_get_thread_area): New target method.
10020 (extract_signed_bitfield): New helper function.
10021 (aarch64_decode_ldr_literal): New function.
10022 (enum aarch64_opcodes): New enum.
10023 (struct aarch64_register): New struct.
10024 (struct aarch64_operand): New struct.
10025 (x0): New static global.
10026 (x1): Likewise.
10027 (x2): Likewise.
10028 (x3): Likewise.
10029 (x4): Likewise.
10030 (w2): Likewise.
10031 (ip0): Likewise.
10032 (sp): Likewise.
10033 (xzr): Likewise.
10034 (aarch64_register): New helper function.
10035 (register_operand): Likewise.
10036 (immediate_operand): Likewise.
10037 (struct aarch64_memory_operand): New struct.
10038 (offset_memory_operand): New helper function.
10039 (preindex_memory_operand): Likewise.
10040 (enum aarch64_system_control_registers): New enum.
10041 (ENCODE): New macro.
10042 (emit_insn): New helper function.
10043 (emit_b): New function.
10044 (emit_bcond): Likewise.
10045 (emit_cb): Likewise.
10046 (emit_tb): Likewise.
10047 (emit_blr): Likewise.
10048 (emit_stp): Likewise.
10049 (emit_ldp_q_offset): Likewise.
10050 (emit_stp_q_offset): Likewise.
10051 (emit_load_store): Likewise.
10052 (emit_ldr): Likewise.
10053 (emit_ldrsw): Likewise.
10054 (emit_str): Likewise.
10055 (emit_ldaxr): Likewise.
10056 (emit_stxr): Likewise.
10057 (emit_stlr): Likewise.
10058 (emit_data_processing_reg): Likewise.
10059 (emit_data_processing): Likewise.
10060 (emit_add): Likewise.
10061 (emit_sub): Likewise.
10062 (emit_mov): Likewise.
10063 (emit_movk): Likewise.
10064 (emit_mov_addr): Likewise.
10065 (emit_mrs): Likewise.
10066 (emit_msr): Likewise.
10067 (emit_sevl): Likewise.
10068 (emit_wfe): Likewise.
10069 (append_insns): Likewise.
10070 (can_encode_int32_in): New helper function.
10071 (aarch64_relocate_instruction): New function.
10072 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10073 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10074 (struct linux_target_ops): Install aarch64_get_thread_area,
10075 aarch64_install_fast_tracepoint_jump_pad and
10076 aarch64_get_min_fast_tracepoint_insn_len.
10077
10078 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10079
10080 * Makefile.in (aarch64-insn.o): New rule.
10081 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10082
10083 2015-09-21 Yao Qi <yao.qi@linaro.org>
10084
10085 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10086
10087 2015-09-21 Yao Qi <yao.qi@linaro.org>
10088
10089 * tracepoint.c (max_jump_pad_size): Remove.
10090
10091 2015-09-18 Yao Qi <yao.qi@linaro.org>
10092
10093 * linux-aarch64-low.c: Don't include sys/uio.h.
10094 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10095
10096 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10097
10098 * tracepoint.c (eval_result_type): Change prototype.
10099 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10100
10101 2015-09-15 Pedro Alves <palves@redhat.com>
10102
10103 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10104 Check whether to report exec events instead of checking whether
10105 multiprocess is enabled.
10106
10107 2015-09-15 Pedro Alves <palves@redhat.com>
10108
10109 PR remote/18965
10110 * remote-utils.c (prepare_resume_reply): Merge
10111 TARGET_WAITKIND_VFORK_DONE switch case with the
10112 TARGET_WAITKIND_FORKED case.
10113
10114 2015-09-15 Yao Qi <yao.qi@linaro.org>
10115
10116 * server.c (handle_query): Check string comparison using
10117 "else if" instead of "if".
10118
10119 2015-09-15 Yao Qi <yao.qi@linaro.org>
10120
10121 * server.c (vCont_supported): New global variable.
10122 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10123 matches. Append ";vContSupported+" to own_buf.
10124 (handle_v_requests): Append ";s;S" to own_buf if target supports
10125 hardware single step or vCont_supported is false.
10126 (capture_main): Set vCont_supported to zero.
10127
10128 2015-09-15 Yao Qi <yao.qi@linaro.org>
10129
10130 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10131 it to ...
10132 (linux_supports_hardware_single_step): ... New function.
10133 (linux_target_ops): Update.
10134 * lynx-low.c (lynx_target_ops): Set field
10135 supports_hardware_single_step to target_can_do_hardware_single_step.
10136 * nto-low.c (nto_target_ops): Likewise.
10137 * spu-low.c (spu_target_ops): Likewise.
10138 * win32-low.c (win32_target_ops): Likewise.
10139 * target.c (target_can_do_hardware_single_step): New function.
10140 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10141 Remove. <supports_hardware_single_step>: New field.
10142 (target_supports_conditional_breakpoints): Remove.
10143 (target_supports_hardware_single_step): New macro.
10144 (target_can_do_hardware_single_step): Declare.
10145 * server.c (handle_query): Use target_supports_hardware_single_step
10146 instead of target_supports_conditional_breakpoints.
10147
10148 2015-09-15 Yao Qi <yao.qi@linaro.org>
10149
10150 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10151 function.
10152 (struct linux_target_ops the_low_target): Install
10153 aarch64_linux_siginfo_fixup.
10154
10155 2015-09-11 Don Breazeal <donb@codesourcery.com>
10156 Luis Machado <lgustavo@codesourcery.com>
10157
10158 * linux-low.c (linux_mourn): Static declaration.
10159 (linux_arch_setup): Move in front of
10160 handle_extended_wait.
10161 (linux_arch_setup_thread): New function.
10162 (handle_extended_wait): Handle exec events. Call
10163 linux_arch_setup_thread. Make event_lwp argument a
10164 pointer-to-a-pointer.
10165 (check_zombie_leaders): Do not check stopped threads.
10166 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10167 (linux_low_filter_event): Add lwp and thread for exec'ing
10168 non-leader thread if leader thread has been deleted.
10169 Refactor code into linux_arch_setup_thread and call it.
10170 Pass child lwp pointer by reference to handle_extended_wait.
10171 (linux_wait_for_event_filtered): Update comment.
10172 (linux_wait_1): Prevent clobbering exec event status.
10173 (linux_supports_exec_events): New function.
10174 (linux_target_ops) <supports_exec_events>: Initialize new member.
10175 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10176 new member.
10177 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10178 * server.c (report_exec_events): New global variable.
10179 (handle_query): Handle qSupported query for exec-events feature.
10180 (captured_main): Initialize report_exec_events.
10181 * server.h (report_exec_events): Declare new global variable.
10182 * target.h (struct target_ops) <supports_exec_events>: New
10183 member.
10184 (target_supports_exec_events): New macro.
10185 * win32-low.c (win32_target_ops) <supports_exec_events>:
10186 Initialize new member.
10187
10188 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10189
10190 * linux-low.c (linux_low_enable_btrace): Remove.
10191 (linux_target_ops): Replace linux_low_enable_btrace with
10192 linux_enable_btrace.
10193
10194 2015-09-03 Yao Qi <yao.qi@linaro.org>
10195
10196 * linux-aarch64-low.c (aarch64_insert_point): Call
10197 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10198 returns true.
10199
10200 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10201
10202 * linux-low.c (check_stopped_by_breakpoint): Use
10203 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10204
10205 2015-08-27 Pedro Alves <palves@redhat.com>
10206
10207 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10208
10209 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10210
10211 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10212 the XNEW-family equivalent.
10213 (compile_bytecodes): Likewise.
10214 * dll.c (loaded_dll): Likewise.
10215 * event-loop.c (append_callback_event): Likewise.
10216 (create_file_handler): Likewise.
10217 (create_file_event): Likewise.
10218 * hostio.c (handle_open): Likewise.
10219 * inferiors.c (add_thread): Likewise.
10220 (add_process): Likewise.
10221 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10222 * linux-arm-low.c (arm_new_process): Likewise.
10223 (arm_new_thread): Likewise.
10224 * linux-low.c (add_to_pid_list): Likewise.
10225 (linux_add_process): Likewise.
10226 (handle_extended_wait): Likewise.
10227 (add_lwp): Likewise.
10228 (enqueue_one_deferred_signal): Likewise.
10229 (enqueue_pending_signal): Likewise.
10230 (linux_resume_one_lwp_throw): Likewise.
10231 (linux_resume_one_thread): Likewise.
10232 (linux_read_memory): Likewise.
10233 (linux_write_memory): Likewise.
10234 * linux-mips-low.c (mips_linux_new_process): Likewise.
10235 (mips_linux_new_thread): Likewise.
10236 (mips_add_watchpoint): Likewise.
10237 * linux-x86-low.c (initialize_low_arch): Likewise.
10238 * lynx-low.c (lynx_add_process): Likewise.
10239 * mem-break.c (set_raw_breakpoint_at): Likewise.
10240 (set_breakpoint): Likewise.
10241 (add_condition_to_breakpoint): Likewise.
10242 (add_commands_to_breakpoint): Likewise.
10243 (clone_agent_expr): Likewise.
10244 (clone_one_breakpoint): Likewise.
10245 * regcache.c (new_register_cache): Likewise.
10246 * remote-utils.c (look_up_one_symbol): Likewise.
10247 * server.c (queue_stop_reply): Likewise.
10248 (start_inferior): Likewise.
10249 (queue_stop_reply_callback): Likewise.
10250 (handle_target_event): Likewise.
10251 * spu-low.c (fetch_ppc_memory): Likewise.
10252 (store_ppc_memory): Likewise.
10253 * target.c (set_target_ops): Likewise.
10254 * thread-db.c (thread_db_load_search): Likewise.
10255 (try_thread_db_load_1): Likewise.
10256 * tracepoint.c (add_tracepoint): Likewise.
10257 (add_tracepoint_action): Likewise.
10258 (create_trace_state_variable): Likewise.
10259 (cmd_qtdpsrc): Likewise.
10260 (cmd_qtro): Likewise.
10261 (add_while_stepping_state): Likewise.
10262 * win32-low.c (child_add_thread): Likewise.
10263 (get_image_name): Likewise.
10264
10265 2015-08-25 Yao Qi <yao.qi@linaro.org>
10266
10267 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10268
10269 2015-08-25 Yao Qi <yao.qi@linaro.org>
10270
10271 * Makefile.in (aarch64-linux.o): New rule.
10272 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10273 srv_tgtobj.
10274 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10275 (aarch64_init_debug_reg_state): Make it extern.
10276 (aarch64_linux_prepare_to_resume): Remove.
10277
10278 2015-08-25 Yao Qi <yao.qi@linaro.org>
10279
10280 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10281 lwp_arch_private_info and ptid_of_lwp.
10282
10283 2015-08-25 Yao Qi <yao.qi@linaro.org>
10284
10285 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10286 Find proc_info by find_process_pid. All callers updated.
10287
10288 2015-08-25 Yao Qi <yao.qi@linaro.org>
10289
10290 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10291 Remove.
10292 (debug_reg_change_callback): Remove.
10293 (aarch64_notify_debug_reg_change): Remove.
10294
10295 2015-08-25 Yao Qi <yao.qi@linaro.org>
10296
10297 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10298 Call current_lwp_ptid.
10299
10300 2015-08-25 Yao Qi <yao.qi@linaro.org>
10301
10302 * linux-aarch64-low.c (debug_reg_change_callback): Use
10303 debug_printf.
10304
10305 2015-08-25 Yao Qi <yao.qi@linaro.org>
10306
10307 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10308
10309 2015-08-25 Yao Qi <yao.qi@linaro.org>
10310
10311 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10312
10313 2015-08-25 Yao Qi <yao.qi@linaro.org>
10314
10315 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10316 the code.
10317
10318 2015-08-25 Yao Qi <yao.qi@linaro.org>
10319
10320 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10321 Remove.
10322 (debug_reg_change_callback): Remove argument entry and add argument
10323 lwp. Remove local variable thread. Don't print thread id in the
10324 debugging output. Don't check whether pid of thread equals to pid.
10325 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10326 iterate_over_lwps instead find_inferior.
10327
10328 2015-08-24 Pedro Alves <palves@redhat.com>
10329
10330 * inferiors.c (get_first_process): New function.
10331 * inferiors.h (get_first_process): New declaration.
10332 * remote-utils.c (read_ptid): Default to the first process in the
10333 list, instead of to the current thread's process.
10334
10335 2015-08-24 Pedro Alves <palves@redhat.com>
10336
10337 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10338 * event-loop.c: Likewise.
10339 * remote-utils.c: Likewise.
10340 * tracepoint.c: Likewise.
10341
10342 2015-08-24 Pedro Alves <palves@redhat.com>
10343
10344 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10345 ptid_get_lwp.
10346
10347 2015-08-21 Pedro Alves <palves@redhat.com>
10348
10349 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10350 instead of literal 1.
10351
10352 2015-08-21 Pedro Alves <palves@redhat.com>
10353
10354 * tdesc.c (default_description): Explicitly zero-initialize.
10355
10356 2015-08-21 Pedro Alves <palves@redhat.com>
10357
10358 PR gdb/18749
10359 * inferiors.c (remove_thread): Discard any pending stop reply for
10360 this thread.
10361 * server.c (remove_all_on_match_pid): Rename to ...
10362 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10363 instead of a pid.
10364 (discard_queued_stop_replies): Change parameter to a ptid. Now
10365 extern.
10366 (handle_v_kill, kill_inferior_callback, captured_main)
10367 (process_serial_event): Adjust.
10368 * server.h (discard_queued_stop_replies): Declare.
10369
10370 2015-08-21 Pedro Alves <palves@redhat.com>
10371
10372 * linux-low.c (wait_for_sigstop): Always switch to no thread
10373 selected if the previously current thread dies.
10374 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10375 process instead of the current thread's.
10376 * remote-utils.c (input_interrupt): Don't check if there's no
10377 current thread.
10378 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10379 current thread to the general thread fails, error out.
10380 (handle_qxfer_auxv, handle_qxfer_libraries)
10381 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10382 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10383 (handle_query): Check if there's a thread selected instead of
10384 checking whether there's any thread in the thread list.
10385 (handle_qxfer_threads, handle_qxfer_btrace)
10386 (handle_qxfer_btrace_conf): Don't error out early if there's no
10387 thread in the thread list.
10388 (handle_v_cont, myresume): Don't set the current thread to the
10389 continue thread.
10390 (process_serial_event) <Hg handling>: Also set thread_id if the
10391 previous general thread is still alive.
10392 (process_serial_event) <g/G handling>: If setting the current
10393 thread to the general thread fails, error out.
10394 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10395 thread's lwp instead of the current thread's.
10396 * target.c (set_desired_thread): If the desired thread was not
10397 found, leave the current thread pointing to NULL. Return an int
10398 (boolean) indicating success.
10399 * target.h (set_desired_thread): Change return type to int.
10400
10401 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10402
10403 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10404 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10405 #includes.
10406 (ps_get_thread_area): New function.
10407
10408 2015-08-19 Gary Benson <gbenson@redhat.com>
10409
10410 * hostio.c (handle_pread): Do not attempt to read more data
10411 than hostio_reply_with_data can fit in a packet.
10412
10413 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10414
10415 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10416
10417 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10418
10419 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10420
10421 2015-08-06 Pedro Alves <palves@redhat.com>
10422
10423 * tracepoint.c (expr_eval_result): Now an int.
10424
10425 2015-08-06 Pedro Alves <palves@redhat.com>
10426
10427 * gdbthread.h (struct regcache): Forward declare.
10428 (struct thread_info) <regcache_data>: Now a struct regcache
10429 pointer.
10430 * inferiors.c (inferior_regcache_data)
10431 (set_inferior_regcache_data): Now work with struct regcache
10432 pointers.
10433 * inferiors.h (struct regcache): Forward declare.
10434 (inferior_regcache_data, set_inferior_regcache_data): Now work
10435 with struct regcache pointers.
10436 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10437 (free_register_cache_thread): Remove struct regcache pointer
10438 casts.
10439
10440 2015-08-06 Pedro Alves <palves@redhat.com>
10441
10442 * server.c (captured_main): On error, print the exception message
10443 to stderr, and if run_once is set, throw a quit.
10444
10445 2015-08-06 Pedro Alves <palves@redhat.com>
10446
10447 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10448 the current thread.
10449
10450 2015-08-06 Pedro Alves <palves@redhat.com>
10451
10452 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10453 reading beyond the passed in buffer length.
10454
10455 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10456
10457 * tracepoint.c (symbol_list) <required>: Remove.
10458
10459 2015-08-06 Pedro Alves <palves@redhat.com>
10460
10461 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10462 count if stopping and suspending threads.
10463 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10464 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10465 (linux_detach): Complete an ongoing step-over.
10466 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10467 throughout.
10468 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10469 (linux_wait_1): If passing a signal to the inferior after
10470 finishing a step-over, unsuspend and re-resume all lwps. If we
10471 see a single-step event but the thread should be continuing, don't
10472 pass the trap to gdb.
10473 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10474 internal_error instead of gdb_assert.
10475 (enqueue_pending_signal): New function.
10476 (check_ptrace_stopped_lwp_gone): Add debug output.
10477 (start_step_over): Use internal_error instead of gdb_assert.
10478 (complete_ongoing_step_over): New function.
10479 (linux_resume_one_thread): Don't resume a suspended thread.
10480 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10481 it stepping.
10482
10483 2015-08-06 Pedro Alves <palves@redhat.com>
10484
10485 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10486 (linux_thread_alive): Use lwp_is_marked_dead.
10487 (extended_event_reported): Delete.
10488 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10489 instead of extended_event_reported.
10490 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10491 as well.
10492 (lwp_is_marked_dead): New function.
10493 (lwp_running): Use lwp_is_marked_dead.
10494 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10495 comment.
10496
10497 2015-08-06 Pedro Alves <palves@redhat.com>
10498
10499 * linux-low.c (linux_wait_1): Move fork event output out of the
10500 !report_to_gdb check. Pass event_child->waitstatus to
10501 target_waitstatus_to_string instead of ourstatus.
10502
10503 2015-08-04 Yao Qi <yao.qi@linaro.org>
10504
10505 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10506 if current_thread is 32 bit.
10507
10508 2015-08-04 Yao Qi <yao.qi@linaro.org>
10509
10510 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10511 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10512 * server.c (extended_protocol): Remove "static".
10513 * server.h (extended_protocol): Declare it.
10514
10515 2015-08-04 Yao Qi <yao.qi@linaro.org>
10516
10517 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10518 both aarch64 and aarch32.
10519 (aarch64_set_pc): Likewise.
10520
10521 2015-08-04 Yao Qi <yao.qi@linaro.org>
10522
10523 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10524 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10525 arm-with-neon.xml to srv_xmlfiles.
10526 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10527 (is_64bit_tdesc): New function.
10528 (aarch64_linux_read_description): New function.
10529 (aarch64_arch_setup): Call aarch64_linux_read_description.
10530 (regs_info): Rename to regs_info_aarch64.
10531 (aarch64_regs_info): Return right regs_info.
10532 (initialize_low_arch): Call initialize_low_arch_aarch32.
10533
10534 2015-08-04 Yao Qi <yao.qi@linaro.org>
10535
10536 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10537 * linux-aarch32-low.c: New file.
10538 * linux-aarch32-low.h: New file.
10539 * linux-arm-low.c (arm_fill_gregset): Move it to
10540 linux-aarch32-low.c.
10541 (arm_store_gregset): Likewise.
10542 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10543 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10544 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10545 (regs_info): Rename to regs_info_arm.
10546 (arm_regs_info): Return regs_info_aarch32 if
10547 have_ptrace_getregset is 1 and target description is
10548 arm_with_neon or arm_with_vfpv3.
10549 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10550 Call initialize_low_arch_aarch32 instead.
10551
10552 2015-08-04 Yao Qi <yao.qi@linaro.org>
10553
10554 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10555 * linux-low.c: ... here.
10556 * linux-low.h (have_ptrace_getregset): Declare it.
10557
10558 2015-08-04 Pedro Alves <palves@redhat.com>
10559
10560 * thread-db.c (struct thread_db): Use new typedefs.
10561 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10562 CHK calls.
10563 (disable_thread_event_reporting): Cast result of dlsym to
10564 destination function pointer type.
10565 (thread_db_mourn): Use td_ta_delete_ftype.
10566
10567 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10568
10569 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10570 arch variant.
10571 (CDX_BREAKPOINT): Define for R2.
10572 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10573 (the_low_target): Add comments.
10574
10575 2015-07-30 Yao Qi <yao.qi@linaro.org>
10576
10577 * linux-arm-low.c (arm_hwcap): Remove it.
10578 (arm_read_description): New local variable arm_hwcap. Don't
10579 set arm_hwcap to zero.
10580
10581 2015-07-30 Yao Qi <yao.qi@linaro.org>
10582
10583 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10584 Use regcache->tdesc instead.
10585 (arm_store_wmmxregset): Likewise.
10586 (arm_fill_vfpregset): Likewise.
10587 (arm_store_vfpregset): Likewise.
10588
10589 2015-07-30 Yao Qi <yao.qi@linaro.org>
10590
10591 * linux-arm-low.c: Include arch/arm.h.
10592 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10593 (arm_store_gregset): Likewise.
10594
10595 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10596
10597 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10598 ptrace's 4th parameter.
10599
10600 2015-07-27 Yao Qi <yao.qi@linaro.org>
10601
10602 * configure.srv (case aarch64*-*-linux*): Don't set
10603 srv_linux_usrregs.
10604
10605 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10606
10607 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10608 sys/ptrace.h.
10609 * linux-arm-low.c: Likewise.
10610 * linux-cris-low.c: Likewise.
10611 * linux-crisv32-low.c: Likewise.
10612 * linux-low.c: Likewise.
10613 * linux-m68k-low.c: Likewise.
10614 * linux-mips-low.c: Likewise.
10615 * linux-nios2-low.c: Likewise.
10616 * linux-s390-low.c: Likewise.
10617 * linux-sparc-low.c: Likewise.
10618 * linux-tic6x-low.c: Likewise.
10619 * linux-tile-low.c: Likewise.
10620 * linux-x86-low.c: Likewise.
10621
10622 2015-07-24 Pedro Alves <palves@redhat.com>
10623
10624 * config.in: Regenerate.
10625 * configure: Regenerate.
10626
10627 2015-07-24 Pedro Alves <palves@redhat.com>
10628
10629 * acinclude.m4: Include ../ptrace.m4.
10630 * configure.ac: Call GDB_AC_PTRACE.
10631 * config.in, configure: Regenerate.
10632
10633 2015-07-24 Yao Qi <yao.qi@linaro.org>
10634
10635 * linux-low.c (linux_create_inferior): Remove setting to
10636 proc->priv->new_inferior.
10637 (linux_attach): Likewise.
10638 (linux_low_filter_event): Likewise.
10639 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10640
10641 2015-07-24 Yao Qi <yao.qi@linaro.org>
10642
10643 * linux-low.c (linux_arch_setup): New function.
10644 (linux_low_filter_event): If proc->tdesc is NULL and
10645 proc->attached is true, call the_low_target.arch_setup.
10646 Otherwise, keep status pending, and return.
10647 (linux_resume_one_lwp_throw): Don't call get_pc if
10648 thread->while_stepping isn't NULL. Don't call
10649 get_thread_regcache if proc->tdesc is NULL.
10650 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10651 (linux_target_ops): Install arch_setup.
10652 * server.c (start_inferior): Call the_target->arch_setup.
10653 * target.h (struct target_ops) <arch_setup>: New field.
10654 (target_arch_setup): New marco.
10655 * lynx-low.c (lynx_target_ops): Update.
10656 * nto-low.c (nto_target_ops): Update.
10657 * spu-low.c (spu_target_ops): Update.
10658 * win32-low.c (win32_target_ops): Update.
10659
10660 2015-07-24 Yao Qi <yao.qi@linaro.org>
10661
10662 * linux-low.c (linux_add_process): Don't set
10663 proc->priv->new_inferior.
10664 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10665 (linux_attach): Likewise.
10666
10667 2015-07-24 Yao Qi <yao.qi@linaro.org>
10668
10669 * server.c (start_inferior): Code refactor.
10670
10671 2015-07-24 Yao Qi <yao.qi@linaro.org>
10672
10673 * server.c (process_serial_event): Set general_thread.
10674
10675 2015-07-21 Yao Qi <yao.qi@linaro.org>
10676
10677 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10678 aarch64_linux_get_debug_reg_capacity.
10679
10680 2015-07-17 Yao Qi <yao.qi@linaro.org>
10681
10682 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10683 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10684 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10685 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10686 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10687 (AARCH64_HWP_ALIGNMENT): Likewise.
10688 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10689 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10690 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10691 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10692 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10693 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10694 (struct aarch64_debug_reg_state): Likewise.
10695 (struct arch_lwp_info): Likewise.
10696 (aarch64_align_watchpoint): Likewise.
10697 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10698 (aarch64_watchpoint_length): Likewise.
10699 (aarch64_point_encode_ctrl_reg): Likewise
10700 (aarch64_point_is_aligned): Likewise.
10701 (aarch64_align_watchpoint): Likewise.
10702 (aarch64_linux_set_debug_regs):
10703 (aarch64_dr_state_insert_one_point): Likewise.
10704 (aarch64_dr_state_remove_one_point): Likewise.
10705 (aarch64_handle_breakpoint): Likewise.
10706 (aarch64_handle_aligned_watchpoint): Likewise.
10707 (aarch64_handle_unaligned_watchpoint): Likewise.
10708 (aarch64_handle_watchpoint): Likewise.
10709
10710 2015-07-17 Yao Qi <yao.qi@linaro.org>
10711
10712 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10713 and don't aarch64_get_debug_reg_state. All callers update.
10714 (aarch64_handle_aligned_watchpoint): Likewise.
10715 (aarch64_handle_unaligned_watchpoint): Likewise.
10716 (aarch64_handle_watchpoint): Likewise.
10717 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10718 (aarch64_remove_point): Likewise.
10719
10720 2015-07-17 Yao Qi <yao.qi@linaro.org>
10721
10722 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10723 debug_printf.
10724 (aarch64_handle_unaligned_watchpoint): Likewise.
10725
10726 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10727
10728 Revert the previous 3 commits:
10729 Move gdb_regex* to common/
10730 Move linux_find_memory_regions_full & co.
10731 gdbserver build-id attribute generator
10732
10733 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10734 Jan Kratochvil <jan.kratochvil@redhat.com>
10735
10736 gdbserver build-id attribute generator.
10737 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10738 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10739 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10740 (find_phdr): New.
10741 (get_dynamic): Use find_pdhr to traverse program headers.
10742 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10743 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10744 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10745 (get_hex_build_id): New.
10746 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10747 to reply XML document.
10748
10749 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10750 Jan Kratochvil <jan.kratochvil@redhat.com>
10751
10752 * target.c: Include target/target-utils.h and fcntl.h.
10753 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10754 (target_fileio_read_stralloc): New functions.
10755
10756 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10757
10758 * Makefile.in (OBS): Add gdb_regex.o.
10759 (gdb_regex.o): New.
10760 * config.in: Rebuilt.
10761 * configure: Rebuilt.
10762
10763 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10764 Jan Kratochvil <jan.kratochvil@redhat.com>
10765
10766 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10767 * Makefile.in (OBS): Add target-utils.o.
10768 (linux-maps.o, target-utils.o): New.
10769 * configure.srv (srv_linux_obj): Add linux-maps.o.
10770
10771 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10772
10773 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10774 function, return 1.
10775 (the_low_target): Install it.
10776
10777 2015-07-14 Pedro Alves <palves@redhat.com>
10778
10779 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10780 Instead, ignore ECHILD, and throw an error for other errnos.
10781
10782 2015-07-10 Pedro Alves <palves@redhat.com>
10783
10784 * event-loop.c (struct callback_event) <data>: Change type to
10785 gdb_client_data instance instead of gdb_client_data pointer.
10786 (append_callback_event): Adjust.
10787
10788 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10789
10790 * linux-aarch64-low.c: Add comments for each linux_target_ops
10791 method. Remove comments already covered in target_ops and
10792 linux_target_ops definitions.
10793 (the_low_target): Add comments for each unimplemented method.
10794
10795 2015-07-09 Yao Qi <yao.qi@linaro.org>
10796
10797 * linux-aarch64-low.c (aarch64_regmap): Remove.
10798 (aarch64_usrregs_info): Remove.
10799 (regs_info): Set field usrregs to NULL.
10800
10801 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10802
10803 * linux-low.c: Include "rsp-low.h"
10804 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10805 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10806 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10807 (handle_btrace_enable_pt): New.
10808 (handle_btrace_general_set): Support "pt".
10809 (handle_btrace_conf_general_set): Support "pt:size".
10810
10811 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10812
10813 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10814 Z_PACKET_SW_BP.
10815
10816 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10817
10818 * linux-aarch64-low.c: Remove comment about endianness.
10819 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10820 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10821 memcmp.
10822
10823 2015-06-24 Gary Benson <gbenson@redhat.com>
10824
10825 * linux-i386-ipa.c (stdint.h): Do not include.
10826 * lynx-i386-low.c (stdint.h): Likewise.
10827 * lynx-ppc-low.c (stdint.h): Likewise.
10828 * mem-break.c (stdint.h): Likewise.
10829 * thread-db.c (stdint.h): Likewise.
10830 * tracepoint.c (stdint.h): Likewise.
10831 * win32-low.c (stdint.h): Likewise.
10832
10833 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10834
10835 * server.c (write_qxfer_response): Update call to
10836 remote_escape_output.
10837
10838 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10839 Jan Kratochvil <jan.kratochvil@redhat.com>
10840
10841 Merge multiple hex conversions.
10842 * gdbreplay.c (tohex): Rename to 'fromhex'.
10843 (logchar): Use fromhex.
10844
10845 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10846
10847 * server.c (handle_qxfer_libraries): Set `version' attribute for
10848 <library-list>.
10849
10850 2015-06-10 Gary Benson <gbenson@redhat.com>
10851
10852 * target.h (struct target_ops) <multifs_open>: New field.
10853 <multifs_unlink>: Likewise.
10854 <multifs_readlink>: Likewise.
10855 * linux-low.c (nat/linux-namespaces.h): New include.
10856 (linux_target_ops): Initialize the_target->multifs_open,
10857 the_target->multifs_unlink and the_target->multifs_readlink.
10858 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10859 * hostio.c (hostio_fs_pid): New static variable.
10860 (hostio_handle_new_gdb_connection): New function.
10861 (handle_setfs): Likewise.
10862 (handle_open): Use the_target->multifs_open as appropriate.
10863 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10864 (handle_readlink): Use the_target->multifs_readlink as
10865 appropriate.
10866 (handle_vFile): Handle vFile:setfs packets.
10867 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10868 after target_handle_new_gdb_connection.
10869
10870 2015-06-10 Gary Benson <gbenson@redhat.com>
10871
10872 * configure.ac (AC_CHECK_FUNCS): Add setns.
10873 * config.in: Regenerate.
10874 * configure: Likewise.
10875 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10876 (linux-namespaces.o): New rule.
10877 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10878
10879 2015-06-09 Gary Benson <gbenson@redhat.com>
10880
10881 * hostio.c (handle_open): Process mode argument with
10882 fileio_to_host_mode.
10883
10884 2015-06-01 Yao Qi <yao.qi@linaro.org>
10885
10886 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10887 * linux-x86-low.c: Likewise.
10888
10889 2015-05-28 Don Breazeal <donb@codesourcery.com>
10890
10891 * linux-low.c (handle_extended_wait): Initialize
10892 thread_info.last_resume_kind for new fork children.
10893
10894 2015-05-15 Pedro Alves <palves@redhat.com>
10895
10896 * target.h (target_handle_new_gdb_connection): Rewrite using if
10897 wrapped in do/while.
10898
10899 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10900
10901 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10902 * configure, config.in: Regenerate.
10903 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10904 Declare typedef.
10905
10906 2015-05-12 Don Breazeal <donb@codesourcery.com>
10907
10908 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10909 PTRACE_EVENT_VFORK_DONE.
10910 (linux_low_ptrace_options, extended_event_reported): Add vfork
10911 events.
10912 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10913 and "vforkdone" for RSP 'T' Stop Reply Packet.
10914 * server.h (report_vfork_events): Declare
10915 global variable.
10916
10917 2015-05-12 Don Breazeal <donb@codesourcery.com>
10918
10919 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10920 (the_low_target) <new_fork>: Initialize new member.
10921 * linux-arm-low.c (arm_new_fork): New function.
10922 (the_low_target) <new_fork>: Initialize new member.
10923 * linux-low.c (handle_extended_wait): Call new target function
10924 new_fork.
10925 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10926 * linux-mips-low.c (mips_add_watchpoint): New function
10927 extracted from mips_insert_point.
10928 (the_low_target) <new_fork>: Initialize new member.
10929 (mips_linux_new_fork): New function.
10930 (mips_insert_point): Call mips_add_watchpoint.
10931 * linux-x86-low.c (x86_linux_new_fork): New function.
10932 (the_low_target) <new_fork>: Initialize new member.
10933
10934 2015-05-12 Don Breazeal <donb@codesourcery.com>
10935
10936 * linux-low.c (handle_extended_wait): Implement return value,
10937 rename argument 'event_child' to 'event_lwp', handle
10938 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10939 (linux_low_ptrace_options): New function.
10940 (linux_low_filter_event): Call linux_low_ptrace_options,
10941 use different argument fo linux_enable_event_reporting,
10942 use return value from handle_extended_wait.
10943 (extended_event_reported): New function.
10944 (linux_wait_1): Call extended_event_reported and set
10945 status to report fork events.
10946 (linux_write_memory): Add pid to debug message.
10947 (reset_lwp_ptrace_options_callback): New function.
10948 (linux_handle_new_gdb_connection): New function.
10949 (linux_target_ops): Initialize new structure member.
10950 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10951 * lynx-low.c: Initialize new structure member.
10952 * remote-utils.c (prepare_resume_reply): Implement stop reason
10953 "fork" for "T" stop message.
10954 * server.c (handle_query): Call handle_new_gdb_connection.
10955 * server.h (report_fork_events): Declare global flag.
10956 * target.h (struct target_ops) <handle_new_gdb_connection>:
10957 New member.
10958 (target_handle_new_gdb_connection): New macro.
10959 * win32-low.c: Initialize new structure member.
10960
10961 2015-05-12 Don Breazeal <donb@codesourcery.com>
10962
10963 * mem-break.c (APPEND_TO_LIST): Define macro.
10964 (clone_agent_expr): New function.
10965 (clone_one_breakpoint): New function.
10966 (clone_all_breakpoints): New function.
10967 * mem-break.h: Declare new functions.
10968
10969 2015-05-12 Don Breazeal <donb@codesourcery.com>
10970
10971 * linux-low.c (linux_supports_fork_events): New function.
10972 (linux_supports_vfork_events): New function.
10973 (linux_target_ops): Initialize new structure members.
10974 (initialize_low): Call linux_check_ptrace_features.
10975 * lynx-low.c (lynx_target_ops): Initialize new structure
10976 members.
10977 * server.c (report_fork_events, report_vfork_events):
10978 New global flags.
10979 (handle_query): Add new features to qSupported packet and
10980 response.
10981 (captured_main): Initialize new global variables.
10982 * target.h (struct target_ops) <supports_fork_events>:
10983 New member.
10984 <supports_vfork_events>: New member.
10985 (target_supports_fork_events): New macro.
10986 (target_supports_vfork_events): New macro.
10987 * win32-low.c (win32_target_ops): Initialize new structure
10988 members.
10989
10990 2015-05-12 Gary Benson <gbenson@redhat.com>
10991
10992 * server.c (handle_qxfer_exec_file): Use current process
10993 if annex is empty.
10994
10995 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10996
10997 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10998 Remove HAVE_PTRACE_GETREGS conditionals.
10999 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11000 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11001
11002 2015-05-08 Yao Qi <yao.qi@linaro.org>
11003
11004 * linux-low.c (linux_supports_conditional_breakpoints): New
11005 function.
11006 (linux_target_ops): Install new target method.
11007 * lynx-low.c (lynx_target_ops): Install NULL hook for
11008 supports_conditional_breakpoints.
11009 * nto-low.c (nto_target_ops): Likewise.
11010 * spu-low.c (spu_target_ops): Likewise.
11011 * win32-low.c (win32_target_ops): Likewise.
11012 * server.c (handle_query): Check
11013 target_supports_conditional_breakpoints.
11014 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11015 New field.
11016 (target_supports_conditional_breakpoints): New macro.
11017
11018 2015-05-06 Pedro Alves <palves@redhat.com>
11019
11020 PR server/18081
11021 * server.c (start_inferior): If the process exits, mourn it.
11022
11023 2015-04-21 Gary Benson <gbenson@redhat.com>
11024
11025 * hostio.c (fileio_open_flags_to_host): Factored out to
11026 fileio_to_host_openflags in common/fileio.c. Single use
11027 updated.
11028
11029 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11030
11031 * linux-xtensa-low.c (xtensa_fill_gregset)
11032 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11033 XCHAL_HAVE_LOOP.
11034
11035 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11036
11037 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11038 (regs_info): Replace usrregs pointer with NULL.
11039
11040 2015-04-17 Gary Benson <gbenson@redhat.com>
11041
11042 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11043 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11044 * server.c (handle_qxfer_exec_file): New function.
11045 (qxfer_packets): Add exec-file entry.
11046 (handle_query): Report qXfer:exec-file:read as supported packet.
11047
11048 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11049
11050 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11051
11052 2015-04-09 Gary Benson <gbenson@redhat.com>
11053
11054 * hostio-errno.c (errno_to_fileio_error): Remove function.
11055 Update caller to use remote_fileio_to_fio_error.
11056
11057 2015-04-09 Yao Qi <yao.qi@linaro.org>
11058
11059 * linux-low.c (linux_insert_point): Call
11060 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11061 (linux_remove_point): Call remove_memory_breakpoint if type is
11062 raw_bkpt_type_sw.
11063 * linux-x86-low.c (x86_insert_point): Don't call
11064 insert_memory_breakpoint.
11065 (x86_remove_point): Don't call remove_memory_breakpoint.
11066
11067 2015-04-01 Pedro Alves <palves@redhat.com>
11068 Cleber Rosa <crosa@redhat.com>
11069
11070 * server.c (gdbserver_usage): Reorganize and extend the usage
11071 message.
11072
11073 2015-03-24 Pedro Alves <palves@redhat.com>
11074
11075 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11076 output. Also dump TRAP_TRACE.
11077 (linux_low_filter_event): In debug output, distinguish a
11078 resume_stop SIGSTOP from a delayed SIGSTOP.
11079
11080 2015-03-24 Gary Benson <gbenson@redhat.com>
11081
11082 * linux-x86-low.c (x86_linux_new_thread): Moved to
11083 nat/x86-linux.c.
11084 (x86_linux_prepare_to_resume): Likewise.
11085
11086 2015-03-24 Gary Benson <gbenson@redhat.com>
11087
11088 * Makefile.in (x86-linux-dregs.o): New rule.
11089 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11090 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11091 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11092 (x86_linux_dr_get): Likewise.
11093 (x86_linux_dr_set): Likewise.
11094 (update_debug_registers_callback): Likewise.
11095 (x86_linux_dr_set_addr): Likewise.
11096 (x86_linux_dr_get_addr): Likewise.
11097 (x86_linux_dr_set_control): Likewise.
11098 (x86_linux_dr_get_control): Likewise.
11099 (x86_linux_dr_get_status): Likewise.
11100 (x86_linux_update_debug_registers): Likewise.
11101
11102 2015-03-24 Gary Benson <gbenson@redhat.com>
11103
11104 * linux-x86-low.c (x86_linux_update_debug_registers):
11105 New function, factored out from...
11106 (x86_linux_prepare_to_resume): ...this.
11107
11108 2015-03-24 Gary Benson <gbenson@redhat.com>
11109
11110 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11111 (x86_linux_dr_set): Likewise.
11112 (update_debug_registers_callback): Likewise.
11113 (x86_linux_dr_set_addr): Likewise.
11114 (x86_linux_dr_get_addr): Likewise.
11115 (x86_linux_dr_set_control): Likewise.
11116 (x86_linux_dr_get_control): Likewise.
11117 (x86_linux_dr_get_status): Likewise.
11118 (x86_linux_prepare_to_resume): Likewise.
11119
11120 2015-03-24 Gary Benson <gbenson@redhat.com>
11121
11122 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11123 Use perror_with_name. Pass string through gettext.
11124 (x86_linux_dr_set): Likewise.
11125
11126 2015-03-24 Gary Benson <gbenson@redhat.com>
11127
11128 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11129 (x86_linux_dr_set_addr): ...this.
11130 (x86_dr_low_get_addr): Rename to...
11131 (x86_linux_dr_get_addr): ...this.
11132 (x86_dr_low_set_control): Rename to...
11133 (x86_linux_dr_set_control): ...this.
11134 (x86_dr_low_get_control): Rename to...
11135 (x86_linux_dr_get_control): ...this.
11136 (x86_dr_low_get_status): Rename to...
11137 (x86_linux_dr_get_status): ...this.
11138 (x86_dr_low): Update with new function names.
11139
11140 2015-03-24 Gary Benson <gbenson@redhat.com>
11141
11142 * Makefile.in (x86-linux.o): New rule.
11143 * configure.srv: Add x86-linux.o to relevant targets.
11144 * linux-low.c (lwp_set_arch_private_info): New function.
11145 (lwp_arch_private_info): Likewise.
11146 * linux-x86-low.c: Include nat/x86-linux.h.
11147 (arch_lwp_info): Removed structure.
11148 (update_debug_registers_callback):
11149 Use lwp_set_debug_registers_changed.
11150 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11151 and lwp_set_debug_registers_changed.
11152 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11153
11154 2015-03-24 Gary Benson <gbenson@redhat.com>
11155
11156 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11157 * linux-arm-low.c (arm_new_thread): Likewise.
11158 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11159 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11160 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11161 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11162
11163 2015-03-24 Gary Benson <gbenson@redhat.com>
11164
11165 * linux-low.c (ptid_of_lwp): New function.
11166 (lwp_is_stopped): Likewise.
11167 (lwp_stop_reason): Likewise.
11168 * linux-x86-low.c (update_debug_registers_callback):
11169 Use lwp_is_stopped.
11170 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11171 lwp_stop_reason.
11172
11173 2015-03-24 Gary Benson <gbenson@redhat.com>
11174
11175 * linux-low.h (linux_stop_lwp): Remove declaration.
11176
11177 2015-03-24 Gary Benson <gbenson@redhat.com>
11178
11179 * linux-low.h: Include nat/linux-nat.h.
11180 * linux-low.c (iterate_over_lwps_args): New structure.
11181 (iterate_over_lwps_filter): New function.
11182 (iterate_over_lwps): Likewise.
11183 * linux-x86-low.c (update_debug_registers_callback):
11184 Update signature to what iterate_over_lwps expects.
11185 Remove PID check that iterate_over_lwps now performs.
11186 (x86_dr_low_set_addr): Use iterate_over_lwps.
11187 (x86_dr_low_set_control): Likewise.
11188
11189 2015-03-24 Gary Benson <gbenson@redhat.com>
11190
11191 * linux-x86-low.c (x86_debug_reg_state): New function.
11192 (x86_linux_prepare_to_resume): Use the above.
11193
11194 2015-03-24 Gary Benson <gbenson@redhat.com>
11195
11196 * linux-low.c (current_lwp_ptid): New function.
11197 * linux-x86-low.c: Include nat/linux-nat.h.
11198 (x86_dr_low_get_addr): Use current_lwp_ptid.
11199 (x86_dr_low_get_control): Likewise.
11200 (x86_dr_low_get_status): Likewise.
11201
11202 2015-03-20 Pedro Alves <palves@redhat.com>
11203
11204 * tracepoint.c (cmd_qtstatus): Make "str" const.
11205
11206 2015-03-20 Pedro Alves <palves@redhat.com>
11207
11208 * server.c (handle_general_set): Make "req_str" const.
11209
11210 2015-03-19 Pedro Alves <palves@redhat.com>
11211
11212 * linux-low.c (linux_resume_one_lwp): Rename to ...
11213 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11214 instead call perror_with_name.
11215 (check_ptrace_stopped_lwp_gone): New function.
11216 (linux_resume_one_lwp): Reimplement as wrapper around
11217 linux_resume_one_lwp_throw that swallows errors if the LWP is
11218 gone.
11219
11220 2015-03-19 Pedro Alves <palves@redhat.com>
11221
11222 * linux-low.c (count_events_callback, select_event_lwp_callback):
11223 No longer check whether the thread has resume_stop as last resume
11224 kind.
11225
11226 2015-03-19 Pedro Alves <palves@redhat.com>
11227
11228 * linux-low.c (count_events_callback, select_event_lwp_callback):
11229 Use the lwp's status_pending_p field, not the thread's.
11230
11231 2015-03-19 Pedro Alves <palves@redhat.com>
11232
11233 * linux-low.c (select_event_lwp_callback): Update comments to
11234 no longer mention SIGTRAP.
11235
11236 2015-03-18 Gary Benson <gbenson@redhat.com>
11237
11238 * server.c (handle_query): Do not report vFile:fstat as supported.
11239
11240 2015-03-11 Gary Benson <gbenson@redhat.com>
11241
11242 * hostio.c (sys/types.h): New include.
11243 (sys/stat.h): Likewise.
11244 (common-remote-fileio.h): Likewise.
11245 (handle_fstat): New function.
11246 (handle_vFile): Handle vFile:fstat packets.
11247
11248 2015-03-11 Gary Benson <gbenson@redhat.com>
11249
11250 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11251 struct stat.st_blocks and struct stat.st_blksize.
11252 * configure: Regenerate.
11253 * config.in: Likewise.
11254 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11255 (OBS): Add common-remote-fileio.o.
11256 (common-remote-fileio.o): New rule.
11257
11258 2015-03-09 Pedro Alves <palves@redhat.com>
11259
11260 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11261 'struct sockaddr' pointer in 'accept' call.
11262
11263 2015-03-09 Pedro Alves <palves@redhat.com>
11264
11265 Revert:
11266 2015-03-07 Pedro Alves <palves@redhat.com>
11267 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11268 or <winsock2.h> here. Instead include "gdb_socket.h".
11269 (remote_open): Use union gdb_sockaddr_u.
11270 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11271 or <winsock2.h> here. Instead include "gdb_socket.h".
11272 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11273 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11274 or <sys/un.h>.
11275 (init_named_socket, gdb_agent_helper_thread): Use union
11276 gdb_sockaddr_u.
11277
11278 2015-03-07 Pedro Alves <palves@redhat.com>
11279
11280 * configure.ac (build_warnings): Move
11281 -Wdeclaration-after-statement to the C-specific set.
11282 * configure: Regenerate.
11283
11284 2015-03-07 Pedro Alves <palves@redhat.com>
11285
11286 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11287 or <winsock2.h> here. Instead include "gdb_socket.h".
11288 (remote_open): Use union gdb_sockaddr_u.
11289 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11290 or <winsock2.h> here. Instead include "gdb_socket.h".
11291 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11292 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11293 or <sys/un.h>.
11294 (init_named_socket, gdb_agent_helper_thread): Use union
11295 gdb_sockaddr_u.
11296
11297 2015-03-07 Pedro Alves <palves@redhat.com>
11298
11299 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11300 instead.
11301
11302 2015-03-06 Yao Qi <yao.qi@linaro.org>
11303
11304 * linux-aarch64-low.c (aarch64_insert_point): Use
11305 show_debug_regs as a boolean.
11306 (aarch64_remove_point): Likewise.
11307
11308 2015-03-05 Pedro Alves <palves@redhat.com>
11309
11310 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11311 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11312 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11313 * nto-low.c (nto_target_ops): Likewise.
11314 * spu-low.c (spu_target_ops): Likewise.
11315 * win32-low.c (win32_target_ops): Likewise.
11316
11317 2015-03-04 Pedro Alves <palves@redhat.com>
11318
11319 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11320 Decide whether a breakpoint triggered based on the SIGTRAP's
11321 siginfo.si_code.
11322 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11323 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11324 (linux_low_filter_event): Check for breakpoints before checking
11325 watchpoints.
11326 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11327 siginfo.si_code.
11328 (linux_stopped_by_sw_breakpoint)
11329 (linux_supports_stopped_by_sw_breakpoint)
11330 (linux_stopped_by_hw_breakpoint)
11331 (linux_supports_stopped_by_hw_breakpoint): New functions.
11332 (linux_target_ops): Install new target methods.
11333
11334 2015-03-04 Pedro Alves <palves@redhat.com>
11335
11336 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11337 * server.c (swbreak_feature, hwbreak_feature): New globals.
11338 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11339 (captured_main): Clear swbreak_feature and hwbreak_feature.
11340 * server.h (swbreak_feature, hwbreak_feature): Declare.
11341 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11342 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11343 supports_stopped_by_hw_breakpoint>: New fields.
11344 (target_supports_stopped_by_sw_breakpoint)
11345 (target_stopped_by_sw_breakpoint)
11346 (target_supports_stopped_by_hw_breakpoint)
11347 (target_stopped_by_hw_breakpoint): Declare.
11348
11349 2015-03-04 Pedro Alves <palves@redhat.com>
11350
11351 enum lwp_stop_reason -> enum target_stop_reason
11352 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11353 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11354 (linux_wait_1, stuck_in_jump_pad_callback)
11355 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11356 (linux_stopped_by_watchpoint):
11357 * linux-low.h (enum lwp_stop_reason): Delete.
11358 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11359 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11360
11361 2015-03-04 Yao Qi <yao.qi@linaro.org>
11362
11363 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11364
11365 2015-03-03 Gary Benson <gbenson@redhat.com>
11366
11367 * hostio.c (handle_vFile): Fix prefix lengths.
11368
11369 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11370
11371 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11372 ptr_bits.
11373
11374 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11375
11376 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11377 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11378 (clean): Add "rm -f" for above C files.
11379 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11380 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11381 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11382 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11383 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11384 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11385 (init_registers_s390x_vx_linux64)
11386 (init_registers_s390x_tevx_linux64)
11387 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11388 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11389 declarations.
11390 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11391 (s390_store_vxrs_high): New functions.
11392 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11393 NT_S390_VXRS_HIGH.
11394 (s390_arch_setup): Add logic for selecting one of the new target
11395 descriptions. Activate the new vector regsets if applicable.
11396 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11397 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11398 and init_registers_s390x_tevx_linux64.
11399
11400 2015-03-01 Pedro Alves <palves@redhat.com>
11401
11402 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11403 parameter.
11404
11405 2015-02-27 Pedro Alves <palves@redhat.com>
11406
11407 * linux-x86-low.c (u_debugreg_offset): New function.
11408 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11409
11410 2015-02-27 Pedro Alves <palves@redhat.com>
11411
11412 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11413 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11414 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11415 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11416 (ps_lsetfpregs, ps_getpid)
11417 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11418 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11419 (ps_lsetxregs, ps_plog): Declare.
11420
11421 2015-02-27 Pedro Alves <palves@redhat.com>
11422
11423 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11424 IP_AGENT_EXPORT_FUNC.
11425 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11426 IP_AGENT_EXPORT_FUNC.
11427 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11428 (IP_AGENT_EXPORT): Delete.
11429 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11430 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11431 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11432 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11433 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11434 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11435 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11436 (traceframe_read_count, traceframe_write_count)
11437 (traceframes_created, trace_state_variables, get_raw_reg)
11438 (get_trace_state_variable_value, set_trace_state_variable_value)
11439 (ust_loaded, helper_thread_id, cmd_buf): Use
11440 IPA_SYM_EXPORTED_NAME.
11441 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11442 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11443 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11444 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11445 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11446 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11447 EXTERN_C_PUSH/EXTERN_C_POP.
11448 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11449 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11450 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11451 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11452 (traceframe_write_count, traceframe_read_count)
11453 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11454 (about_to_request_buffer_space, get_trace_state_variable_value)
11455 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11456 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11457 EXTERN_C_PUSH/EXTERN_C_POP.
11458 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11459 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11460 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11461 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
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): Use IP_AGENT_EXPORT_VAR.
11465 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11466 Define.
11467 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11468 (IP_AGENT_EXPORT_VAR_DECL): Define.
11469 (tracing): Declare.
11470 (gdb_agent_get_raw_reg): Declare.
11471
11472 2015-02-27 Tom Tromey <tromey@redhat.com>
11473 Pedro Alves <palves@redhat.com>
11474
11475 Rename symbols whose names are reserved C++ keywords throughout.
11476
11477 2015-02-27 Pedro Alves <palves@redhat.com>
11478
11479 * Makefile.in (COMPILER): New, get it from autoconf.
11480 (CXX): Get from autoconf instead.
11481 (COMPILE.pre): Use COMPILER.
11482 (CC-LD): Rename to ...
11483 (CC_LD): ... this. Use COMPILER.
11484 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11485 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11486 * acinclude.m4: Include build-with-cxx.m4.
11487 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11488 Disable -Werror by default if building in C++ mode.
11489 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11490 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11491 the C++ compiler. Save/restore CXXFLAGS too.
11492 * configure: Regenerate.
11493
11494 2015-02-27 Pedro Alves <palves@redhat.com>
11495
11496 * acinclude.m4: Include libiberty.m4.
11497 * configure.ac: Call libiberty_INIT.
11498 * config.in, configure: Regenerate.
11499
11500 2015-02-26 Pedro Alves <palves@redhat.com>
11501
11502 * linux-low.c (linux_wait_1): When incrementing the PC past a
11503 program breakpoint always use the_low_target.breakpoint_len as
11504 increment, rather than the maximum between that and
11505 the_low_target.decr_pc_after_break.
11506
11507 2015-02-23 Pedro Alves <palves@redhat.com>
11508
11509 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11510 thread was doing a step-over; always adjust the PC if
11511 we stepped over a permanent breakpoint.
11512 (linux_wait_1): If we stepped over breakpoint that was on top of a
11513 permanent breakpoint, manually advance the PC past it.
11514
11515 2015-02-23 Pedro Alves <palves@redhat.com>
11516
11517 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11518 modes.
11519 (x86_fill_gregset, x86_store_gregset): Use it when handling
11520 $orig_eax.
11521
11522 2015-02-20 Pedro Alves <palves@redhat.com>
11523
11524 * thread-db.c: Include "nat/linux-procfs.h".
11525 (thread_db_init): Skip listing new threads if the kernel supports
11526 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11527
11528 2015-02-20 Pedro Alves <palves@redhat.com>
11529
11530 * linux-low.c (status_pending_p_callback): Use ptid_match.
11531
11532 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11533
11534 PR breakpoints/16812
11535 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11536 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11537 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11538
11539 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11540
11541 PR breakpoints/15956
11542 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11543
11544 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11545
11546 * linux-low.c (linux_low_btrace_conf): Print size.
11547 * server.c (handle_btrace_conf_general_set): New.
11548 (hanle_general_set): Call handle_btrace_conf_general_set.
11549 (handle_query): Report Qbtrace-conf:bts:size as supported.
11550
11551 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11552
11553 * linux-low.c (linux_low_enable_btrace): Update parameters.
11554 (linux_low_btrace_conf): New.
11555 (linux_target_ops)<to_btrace_conf>: Initialize.
11556 * server.c (current_btrace_conf): New.
11557 (handle_btrace_enable): Rename to ...
11558 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11559 to target_enable_btrace. Update comment. Update users.
11560 (handle_qxfer_btrace_conf): New.
11561 (qxfer_packets): Add btrace-conf entry.
11562 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11563 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11564 (target_ops)<read_btrace_conf>: New.
11565 (target_enable_btrace): Update parameters.
11566 (target_read_btrace_conf): New.
11567
11568 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11569
11570 * server.c (handle_btrace_general_set): Remove call to
11571 target_supports_btrace.
11572 (supported_btrace_packets): New.
11573 (handle_query): Call supported_btrace_packets.
11574 * target.h: include btrace-common.h.
11575 (btrace_target_info): Removed.
11576 (supports_btrace, target_supports_btrace): Update parameters.
11577
11578 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11579
11580 * Makefile.in (SFILES): Add common/btrace-common.c.
11581 (OBS): Add common/btrace-common.o.
11582 (btrace-common.o): Add build rules.
11583 * linux-low: Include btrace-common.h.
11584 (linux_low_read_btrace): Use struct btrace_data. Call
11585 btrace_data_init and btrace_data_fini.
11586
11587 2015-02-06 Pedro Alves <palves@redhat.com>
11588
11589 * thread-db.c (find_new_threads_callback): Add debug output.
11590
11591 2015-02-04 Pedro Alves <palves@redhat.com>
11592
11593 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11594 (resume_stopped_resumed_lwps): New function.
11595 (linux_wait_for_event_filtered): Use it.
11596
11597 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11598
11599 * Makefile.in (SFILES): Add linux-personality.c.
11600 (linux-personality.o): New rule.
11601 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11602 list of objects to be built.
11603 * linux-low.c: Include nat/linux-personality.h.
11604 (linux_create_inferior): Remove code to disable address space
11605 randomization (moved to ../nat/linux-personality.c). Create
11606 cleanup to disable address space randomization.
11607
11608 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11609
11610 * Makefile.in (posix-strerror.o): New rule.
11611 (mingw-strerror.o): Likewise.
11612 * configure: Regenerated.
11613 * configure.ac: Source file ../common/common.host. Initialize new
11614 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11615
11616 2015-01-14 Yao Qi <yao@codesourcery.com>
11617
11618 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11619 (ppc-linux.o): New rule.
11620 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11621 * configure.ac: AC_CHECK_FUNCS(getauxval).
11622 * config.in: Re-generated.
11623 * configure: Re-generated.
11624 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11625 ppc64_64bit_inferior_p
11626
11627 2015-01-14 Yao Qi <yao@codesourcery.com>
11628
11629 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11630 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11631 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11632 (PT_ORIG_R3, PT_TRAP): Likewise.
11633 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11634 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11635 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11636
11637 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11638
11639 * i387-fp.c (i387_cache_to_xsave): In look over
11640 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11641 zmmh_low_space field by use of zmmh_high_space.
11642
11643 2015-01-09 Pedro Alves <palves@redhat.com>
11644
11645 * linux-low.c (step_over_bkpt): Move higher up in the file.
11646 (handle_extended_wait): Don't store the stop_pc here.
11647 (get_stop_pc): Adjust comments and rename to ...
11648 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11649 stopped for a software breakpoint or hardware breakpoint.
11650 (thread_still_has_status_pending_p): New function.
11651 (status_pending_p_callback): Use
11652 thread_still_has_status_pending_p. If the event is no longer
11653 interesting, resume the LWP.
11654 (handle_tracepoints): Add assert.
11655 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11656 (wstatus_maybe_breakpoint): New function.
11657 (cancel_breakpoint): Delete function.
11658 (check_stopped_by_watchpoint): New function, factored out from
11659 linux_low_filter_event.
11660 (lp_status_maybe_breakpoint): Delete function.
11661 (linux_low_filter_event): Remove filter_ptid argument.
11662 Leave thread group exits pending here. Store the LWP's stop PC.
11663 Always leave events pending.
11664 (linux_wait_for_event_filtered): Pull all events out of the
11665 kernel, and leave them all pending.
11666 (count_events_callback, select_event_lwp_callback): Consider all
11667 events.
11668 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11669 (select_event_lwp): Only give preference to the stepping LWP in
11670 all-stop mode. Adjust comments.
11671 (ignore_event): New function.
11672 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11673 references to cancel_breakpoints. Adjust to renames. Also give
11674 equal priority to all LWPs that have had events in non-stop mode.
11675 If reporting a software breakpoint event, unadjust the LWP's PC.
11676 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11677 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11678 Adjust.
11679 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11680 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11681 (linux_stopped_by_watchpoint): Adjust.
11682 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11683 * linux-low.h (enum lwp_stop_reason): New.
11684 (struct lwp_info) <stop_pc>: Adjust comment.
11685 <stopped_by_watchpoint>: Delete field.
11686 <stop_reason>: New field.
11687 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11688 * mem-break.c (software_breakpoint_inserted_here)
11689 (hardware_breakpoint_inserted_here): New function.
11690 * mem-break.h (software_breakpoint_inserted_here)
11691 (hardware_breakpoint_inserted_here): Declare.
11692 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11693 (cancel_breakpoints): Delete.
11694 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11695 (upload_fast_traceframes): Remove references to
11696 cancel_breakpoints.
11697
11698 2015-01-09 Pedro Alves <palves@redhat.com>
11699
11700 * thread-db.c (find_new_threads_callback): Ignore thread if the
11701 kernel thread ID is -1.
11702
11703 2015-01-09 Pedro Alves <palves@redhat.com>
11704
11705 * linux-low.c (linux_attach_fail_reason_string): Move to
11706 nat/linux-ptrace.c, and rename.
11707 (linux_attach_lwp): Update comment.
11708 (attach_proc_task_lwp_callback): New function.
11709 (linux_attach): Adjust to rename and use
11710 linux_proc_attach_tgid_threads.
11711 (linux_attach_fail_reason_string): Delete declaration.
11712
11713 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11714
11715 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11716 * server.c (gdbserver_version): Likewise.
11717
11718 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11719
11720 * remote-utils.c: Include ctype.h.
11721 (input_interrupt): Explicitly handle the case when the char
11722 received is the NUL byte. Improve the printing of non-ASCII
11723 characters.
11724
11725 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11726
11727 * linux-low.c (linux_low_filter_event): Update call to
11728 linux_enable_event_reporting following the addition of
11729 a new parameter to that function.
11730
11731 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11732
11733 PR server/17457
11734 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11735 (AARCH64_FPCR_REGNO): Likewise.
11736 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11737 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11738 (aarch64_store_fpregset): Likewise.
11739
11740 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11741
11742 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11743 Remove FIXME comment about assumption about N.
11744
11745 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11746
11747 * configure.ac: If large-file support is disabled in GDBserver,
11748 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11749 * configure: Regenerate.
11750
11751 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11752
11753 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11754 warning upon ENODATA from ptrace.
11755 * linux-s390-low.c (s390_store_tdb): New.
11756 (s390_regsets): Add regset for NT_S390_TDB.
11757
11758 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11759
11760 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11761 without a fill_function.
11762 * linux-s390-low.c (s390_fill_last_break): Remove.
11763 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11764 (s390_arch_setup): Use regset's size instead of fill_function for
11765 loop end condition.
11766
11767 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11768
11769 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11770 the regset's store function when ptrace returned an error.
11771 * regcache.c (get_thread_regcache): Invalidate register cache
11772 before fetching inferior's registers.
11773
11774 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11775
11776 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11777 while-loop as for-loop.
11778 (regsets_store_inferior_registers): Likewise.
11779
11780 2014-11-28 Yao Qi <yao@codesourcery.com>
11781
11782 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11783 * config.in, configure: Re-generate.
11784 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11785 is defined.
11786
11787 2014-11-21 Yao Qi <yao@codesourcery.com>
11788
11789 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11790 (AC_CHECK_HEADERS): Remove malloc.h.
11791 * configure: Re-generated.
11792 * config.in: Re-generated.
11793 * server.h: Don't include alloca.h and malloc.h.
11794 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11795 Don't include malloc.h.
11796
11797 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11798
11799 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11800 corresponding ERRNO check in same block.
11801
11802 2014-11-12 Pedro Alves <palves@redhat.com>
11803
11804 * server.c (cont_thread): Update comment.
11805 (start_inferior, attach_inferior): No longer clear cont_thread.
11806 (handle_v_cont): No longer set cont_thread.
11807 (captured_main): Clear cont_thread each time a GDB connects.
11808
11809 2014-11-12 Pedro Alves <palves@redhat.com>
11810
11811 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11812 thread, and don't resume all threads if the Hc thread has exited.
11813
11814 2014-11-12 Pedro Alves <palves@redhat.com>
11815
11816 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11817 the process group instead of to a specific LWP.
11818
11819 2014-10-15 Pedro Alves <palves@redhat.com>
11820
11821 PR server/17487
11822 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11823 parameter.
11824 (arm_set_thread_context): Delete.
11825 (the_low_target): Adjust.
11826 * win32-i386-low.c (debug_registers_changed)
11827 (debug_registers_used): Delete.
11828 (update_debug_registers_callback): New function.
11829 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11830 needing to update their debug registers.
11831 (win32_get_current_dr): New function.
11832 (x86_dr_low_get_addr, x86_dr_low_get_control)
11833 (x86_dr_low_get_status): Fetch the debug register from the thread
11834 record's context.
11835 (i386_initial_stuff): Adjust.
11836 (i386_get_thread_context): Remove current_event parameter. Don't
11837 clear debug_registers_changed nor copy DR values to
11838 debug_reg_state.
11839 (i386_set_thread_context): Delete.
11840 (i386_prepare_to_resume): New function.
11841 (i386_thread_added): Mark the thread as needing to update irs
11842 debug registers.
11843 (the_low_target): Remove i386_set_thread_context and install
11844 i386_prepare_to_resume.
11845 * win32-low.c (win32_get_thread_context): Adjust.
11846 (win32_set_thread_context): Use SetThreadContext
11847 directly.
11848 (win32_prepare_to_resume): New function.
11849 (win32_require_context): New function, factored out from ...
11850 (thread_rec): ... this.
11851 (continue_one_thread): Call win32_prepare_to_resume on each thread
11852 we're about to continue.
11853 (win32_resume): Call win32_prepare_to_resume on the event thread.
11854 * win32-low.h (struct win32_thread_info)
11855 <debug_registers_changed>: New field.
11856 (struct win32_target_ops): Change prototype of set_thread_context,
11857 delete set_thread_context and add prepare_to_resume.
11858 (win32_require_context): New declaration.
11859
11860 2014-10-08 Gary Benson <gbenson@redhat.com>
11861
11862 * server.h: Do not include common-exceptions.h.
11863
11864 2014-10-08 Gary Benson <gbenson@redhat.com>
11865
11866 * server.h: Do not include cleanups.h.
11867
11868 2014-09-30 James Hogan <james.hogan@imgtec.com>
11869
11870 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11871 mips64-dsp-linux.c.
11872
11873 2014-09-23 Yao Qi <yao@codesourcery.com>
11874
11875 * linux-low.c (lp_status_maybe_breakpoint): New function.
11876 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11877 (count_events_callback): Likewise.
11878 (select_event_lwp_callback): Likewise.
11879 (cancel_breakpoints_callback): Likewise.
11880
11881 2014-09-19 Don Breazeal <donb@codesourcery.com>
11882
11883 * linux-low.c (handle_extended_wait): Call
11884 linux_ptrace_get_extended_event.
11885 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11886 linux_is_extended_waitstatus.
11887
11888 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11889
11890 * Makefile.in (CPPFLAGS): Define.
11891 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11892 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11893
11894 2014-09-16 Gary Benson <gbenson@redhat.com>
11895
11896 * inferiors.h (current_inferior): Renamed as...
11897 (current_thread): New variable. All uses updated.
11898 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11899 (maybe_move_out_of_jump_pad): Likewise.
11900 (cancel_breakpoint): Likewise.
11901 (linux_low_filter_event): Likewise.
11902 (wait_for_sigstop): Likewise.
11903 (linux_resume_one_lwp): Likewise.
11904 (need_step_over_p): Likewise.
11905 (start_step_over): Likewise.
11906 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11907 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11908 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11909 and save_inferior as saved_thread.
11910 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11911 saved_thread.
11912 (regcache_invalidate_thread): Likewise.
11913 * remote-utils.c (prepare_resume_reply): Likewise.
11914 * thread-db.c (thread_db_get_tls_address): Likewise.
11915 (disable_thread_event_reporting): Likewise.
11916 (remove_thread_event_breakpoints): Likewise.
11917 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11918 as saved_thread.
11919 * target.h (set_desired_inferior): Renamed as...
11920 (set_desired_thread): New declaration. All uses updated.
11921 * server.c (myresume): Updated comment to reference thread instead
11922 of inferior.
11923 (handle_serial_event): Likewise.
11924 (handle_target_event): Likewise.
11925
11926 2014-09-12 Tom Tromey <tromey@redhat.com>
11927 Gary Benson <gbenson@redhat.com>
11928
11929 * regcache.h: Include common-regcache.h.
11930 (regcache_read_pc): Don't declare.
11931 * regcache.c (get_thread_regcache_for_ptid): New function.
11932
11933 2014-09-11 Tom Tromey <tromey@redhat.com>
11934 Gary Benson <gbenson@redhat.com>
11935
11936 * symbol.c: New file.
11937 * Makefile.in (SFILES): Add symbol.c.
11938 (OBS): Add symbol.o.
11939
11940 2014-09-11 Gary Benson <gbenson@redhat.com>
11941
11942 * target.c (target_stop_ptid, target_continue_ptid): New
11943 functions.
11944
11945 2014-09-11 Tom Tromey <tromey@redhat.com>
11946 Gary Benson <gbenson@redhat.com>
11947
11948 * target.h: Include target/target.h.
11949 * target.c (target_read_memory, target_read_uint32)
11950 (target_write_memory): New functions.
11951
11952 2014-09-11 Gary Benson <gbenson@redhat.com>
11953
11954 * server.h (debug_hw_points): Don't declare.
11955 * server.c (debug_hw_points): Don't define. Replace all uses
11956 with show_debug_regs.
11957 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11958 all uses with show_debug_regs.
11959
11960 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11961
11962 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11963 endianness into account.
11964 (ppc_supply_ptrace_register): Likewise.
11965
11966 2014-09-03 James Hogan <james.hogan@imgtec.com>
11967
11968 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11969 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11970
11971 2014-09-03 Gary Benson <gbenson@redhat.com>
11972
11973 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11974 ALL_DEBUG_ADDRESS_REGISTERS.
11975
11976 2014-09-02 Gary Benson <gbenson@redhat.com>
11977
11978 * i386-low.h: Renamed as...
11979 * x86-low.h: New file. All type, function and variable name
11980 prefixes changed from "i386_" to "x86_". All references updated.
11981 * i386-low.c: Renamed as...
11982 * x86-low.c: New file. All type, function and variable name
11983 prefixes changed from "i386_" to "x86_". All references updated.
11984
11985 2014-09-02 Gary Benson <gbenson@redhat.com>
11986
11987 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11988 (x86_linux_new_thread): Likewise.
11989
11990 2014-08-29 Gary Benson <gbenson@redhat.com>
11991
11992 * server.h (setjmp.h): Do not include.
11993 (toplevel): Do not declare.
11994 (common-exceptions.h): Include.
11995 (cleanups.h): Likewise.
11996 * server.c (toplevel): Do not define.
11997 (exit_code): New static global.
11998 (detach_or_kill_for_exit_cleanup): New function.
11999 (main): New function. Original main renamed to...
12000 (captured_main): New function.
12001 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12002
12003 2014-08-29 Gary Benson <gbenson@redhat.com>
12004
12005 * Makefile.in (SFILES): Add common/common-exceptions.c.
12006 (OBS): Add common-exceptions.o.
12007 (common-exceptions.o): New rule.
12008 * utils.c (prepare_to_throw_exception): New function.
12009
12010 2014-08-29 Gary Benson <gbenson@redhat.com>
12011
12012 * config.in: Regenerate.
12013 * configure: Likewise.
12014
12015 2014-08-29 Gary Benson <gbenson@redhat.com>
12016
12017 * Makefile.in (SFILES): Add common/cleanups.c.
12018 (OBS): cleanups.o.
12019 (cleanups.o): New rule.
12020
12021 2014-08-29 Gary Benson <gbenson@redhat.com>
12022
12023 * utils.c (internal_vwarning): New function.
12024
12025 2014-08-28 Gary Benson <gbenson@redhat.com>
12026
12027 * utils.h (fatal): Remove declaration.
12028 * utils.c (fatal): Remove function.
12029
12030 2014-08-28 Gary Benson <gbenson@redhat.com>
12031
12032 * tracepoint.c (gdb_agent_init): Replace fatal with
12033 perror_with_name.
12034 (initialize_tracepoint): Likewise.
12035
12036 2014-08-28 Gary Benson <gbenson@redhat.com>
12037
12038 * remote-utils.c (remote_prepare): Replace fatal with error.
12039
12040 2014-08-28 Gary Benson <gbenson@redhat.com>
12041
12042 * linux-low.c (linux_async): Replace fatal with warning.
12043 Tidy up and return.
12044 (linux_start_non_stop): Return -1 if linux_async failed.
12045
12046 2014-08-28 Gary Benson <gbenson@redhat.com>
12047
12048 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12049 gdb_assert.
12050 (i386_dr_low_get_addr): Remove vague comment.
12051 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12052 gdb_assert.
12053
12054 2014-08-28 Gary Benson <gbenson@redhat.com>
12055
12056 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12057 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12058 internal_error.
12059 (linux_resume_one_lwp): Likewise.
12060 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12061 gdb_assert.
12062 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12063 with internal_error.
12064 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12065 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12066 (find_register_by_name): Replace fatal with internal_error.
12067 (find_regno): Likewise.
12068 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12069 * thread-db.c (thread_db_create_event): Likewise.
12070 (thread_db_load_search): Likewise.
12071 (try_thread_db_load_1): Likewise.
12072 * tracepoint.c (get_jump_space_head): Replace fatal with
12073 internal_error.
12074 (claim_trampoline_space): Likewise.
12075 (have_fast_tracepoint_trampoline_buffer): Likewise.
12076 (cmd_qtstart): Likewise.
12077 (stop_tracing): Likewise.
12078 (fast_tracepoint_collecting): Likewise.
12079 (target_malloc): Likewise.
12080 (download_tracepoint): Likewise.
12081 (download_trace_state_variables): Replace check with gdb_assert.
12082 (upload_fast_traceframes): Replace fatal with internal_error.
12083
12084 2014-08-19 Tom Tromey <tromey@redhat.com>
12085 Gary Benson <gbenson@redhat.com>
12086
12087 * Makefile.in (SFILES): Add common/common-debug.c.
12088 (OBS): Add common-debug.o.
12089 (common-debug.o): New rule.
12090 * debug.h (debug_printf): Don't declare.
12091 * debug.c (debug_printf): Renamed and rewritten as...
12092 (debug_vprintf): New function.
12093
12094 2014-08-19 Gary Benson <gbenson@redhat.com>
12095
12096 * utils.h: Do not include print-utils.h.
12097
12098 2014-08-19 Tom Tromey <tromey@redhat.com>
12099 Gary Benson <gbenson@redhat.com>
12100
12101 * server.h: Add static assertion.
12102 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12103
12104 2014-08-19 Tom Tromey <tromey@redhat.com>
12105 Gary Benson <gbenson@redhat.com>
12106
12107 * Makefile.in (SFILES): Add common/errors.c.
12108 (OBS): Add errors.o.
12109 (IPA_OBS): Add errors-ipa.o.
12110 (errors.o): New rule.
12111 (errors-ipa.o): Likewise.
12112 * utils.h (perror_with_name, error, warning): Don't declare.
12113 * utils.c (warning): Renamed and rewritten as...
12114 (vwarning): New function.
12115 (error): Renamed and rewritten as...
12116 (verror): New function.
12117 (internal_error): Renamed and rewritten as...
12118 (internal_verror): New function.
12119
12120 2014-08-07 Gary Benson <gbenson@redhat.com>
12121
12122 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12123 * configure: Regenerate.
12124 * config.in: Likewise.
12125 * server.h: Do not include errno.h.
12126 * event-loop.c: Likewise.
12127 * hostio-errno.c: Likewise.
12128 * linux-low.c: Likewise.
12129 * remote-utils.c: Likewise.
12130 * spu-low.c: Likewise.
12131 * utils.c: Likewise.
12132 * gdbreplay.c: Unconditionally include errno.h.
12133
12134 2014-08-07 Gary Benson <gbenson@redhat.com>
12135
12136 * server.h: Do not include string.h.
12137 * event-loop.c: Likewise.
12138 * linux-low.c: Likewise.
12139 * regcache.c: Likewise.
12140 * remote-utils.c: Likewise.
12141 * spu-low.c: Likewise.
12142 * utils.c: Likewise.
12143
12144 2014-08-07 Gary Benson <gbenson@redhat.com>
12145
12146 * server.h: Do not include gdb_assert.h.
12147
12148 2014-08-07 Gary Benson <gbenson@redhat.com>
12149
12150 * server.h: Do not include common-utils.h.
12151
12152 2014-08-07 Gary Benson <gbenson@redhat.com>
12153
12154 * server.h: Do not include ptid.h.
12155 * notif.h: Likewise.
12156
12157 2014-08-07 Gary Benson <gbenson@redhat.com>
12158
12159 * server.h: Do not include gdb_locale.h.
12160
12161 2014-08-07 Gary Benson <gbenson@redhat.com>
12162
12163 * server.h: Do not include gdb/signals.h.
12164 * win32-low.c: Likewise.
12165
12166 2014-08-07 Gary Benson <gbenson@redhat.com>
12167
12168 * server.h: Do not include pathmax.h.
12169
12170 2014-08-07 Gary Benson <gbenson@redhat.com>
12171
12172 * server.h: Do not include libiberty.h.
12173 * linux-bfin-low.c: Likewise.
12174
12175 2014-08-07 Gary Benson <gbenson@redhat.com>
12176
12177 * server.h: Do not include ansidecl.h.
12178
12179 2014-08-07 Gary Benson <gbenson@redhat.com>
12180
12181 * linux-x86-low.c: Do not include stddef.h.
12182 * lynx-ppc-low.c: Likewise.
12183 * tracepoint.c: Likewise.
12184
12185 2014-08-07 Gary Benson <gbenson@redhat.com>
12186
12187 * server.h: Do not include stdarg.h.
12188 * nto-low.c: Likewise.
12189
12190 2014-08-07 Gary Benson <gbenson@redhat.com>
12191
12192 * server.h: Do not include stdlib.h.
12193 * inferiors.c: Likewise.
12194 * linux-low.c: Likewise.
12195 * regcache.c: Likewise.
12196 * spu-low.c: Likewise.
12197 * tracepoint.c: Likewise.
12198 * utils.c: Likewise.
12199
12200 2014-08-07 Gary Benson <gbenson@redhat.com>
12201
12202 * server.h: Do not include stdio.h.
12203 * linux-low.c: Likewise.
12204 * remote-utils.c: Likewise.
12205 * spu-low.c: Likewise.
12206 * utils.c: Likewise.
12207 * wincecompat.c: Likewise.
12208
12209 2014-08-06 Gary Benson <gbenson@redhat.com>
12210
12211 * regcache.c (init_register_cache): Move conditionals inside if.
12212
12213 2014-08-06 Gary Benson <gbenson@redhat.com>
12214
12215 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12216
12217 2014-07-31 Gary Benson <gbenson@redhat.com>
12218
12219 * ax.h: Do not include server.h.
12220 * gdbthread.h: Likewise.
12221 * lynx-low.h: Likewise.
12222 * notif.h: Likewise.
12223
12224 2014-07-30 Gary Benson <gbenson@redhat.com>
12225
12226 * server.h: Include common-defs.h.
12227 Do not include config.h or build-gnulib-gdbserver/config.h.
12228
12229 2014-07-30 Gary Benson <gbenson@redhat.com>
12230
12231 * hostio-errno.c: Move server.h to top of includes list.
12232 * inferiors.c: Likewise.
12233 * linux-x86-low.c: Likewise.
12234 * notif.c: Include server.h.
12235
12236 2014-07-24 Tom Tromey <tromey@redhat.com>
12237 Gary Benson <gbenson@redhat.com>
12238
12239 * server.h (CORE_ADDR): Now unsigned.
12240
12241 2014-07-16 Pedro Alves <palves@redhat.com>
12242
12243 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12244
12245 2014-07-15 Pedro Alves <palves@redhat.com>
12246
12247 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12248 copy.
12249
12250 2014-07-11 Pedro Alves <palves@redhat.com>
12251
12252 * linux-low.c (kill_wait_lwp): New function, based on
12253 kill_one_lwp_callback, but use my_waitpid directly.
12254 (kill_one_lwp_callback, linux_kill): Use it.
12255
12256 2014-06-23 Pedro Alves <palves@redhat.com>
12257
12258 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12259 before setting DR0..DR3.
12260
12261 2014-06-20 Gary Benson <gbenson@redhat.com>
12262
12263 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12264 * configure: Regenerated.
12265 * config.in: Likewise.
12266
12267 2014-06-20 Gary Benson <gbenson@redhat.com>
12268
12269 * Makefile.in (SFILES): Update locations for files moved
12270 from common to nat.
12271 (object file files): Reordered.
12272
12273 2014-06-20 Gary Benson <gbenson@redhat.com>
12274
12275 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12276 (i386_dr_low_set_addr): Likewise.
12277 (i386_dr_low_get_addr): Likewise.
12278 (i386_dr_low_can_set_control): Likewise.
12279 (i386_dr_low_set_control): Likewise.
12280 (i386_dr_low_get_control): Likewise.
12281 (i386_dr_low_get_status): Likewise.
12282 (i386_get_debug_register_length): Likewise.
12283 * linux-x86-low.c (i386_dr_low_set_addr):
12284 Changed signature. Made static.
12285 (i386_dr_low_get_addr): Likewise.
12286 (i386_dr_low_set_control): Likewise.
12287 (i386_dr_low_get_control): Likewise.
12288 (i386_dr_low_get_status): Likewise.
12289 (i386_dr_low): New global variable.
12290 * win32-i386-low.c (i386_dr_low_set_addr):
12291 Changed signature. Made static.
12292 (i386_dr_low_get_addr): Likewise.
12293 (i386_dr_low_set_control): Likewise.
12294 (i386_dr_low_get_control): Likewise.
12295 (i386_dr_low_get_status): Likewise.
12296 (i386_dr_low): New global variable.
12297
12298 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12299
12300 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12301 * Makefile.in (AR, AR_FLAGS): Define.
12302 * configure: Regenerate.
12303
12304 2014-06-19 Gary Benson <gbenson@redhat.com>
12305
12306 * Makefile.in (i386-dregs.o): New rule.
12307 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12308 * i386-low.c (target.h): Remove include.
12309 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12310 (DR_CONTROL_SHIFT): Likewise.
12311 (DR_CONTROL_SIZE): Likewise.
12312 (DR_RW_EXECUTE): Likewise.
12313 (DR_RW_WRITE): Likewise.
12314 (DR_RW_READ): Likewise.
12315 (DR_RW_IORW): Likewise.
12316 (DR_LEN_1): Likewise.
12317 (DR_LEN_2): Likewise.
12318 (DR_LEN_4): Likewise.
12319 (DR_LEN_8): Likewise.
12320 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12321 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12322 (DR_ENABLE_SIZE): Likewise.
12323 (DR_LOCAL_SLOWDOWN): Likewise.
12324 (DR_GLOBAL_SLOWDOWN): Likewise.
12325 (DR_CONTROL_RESERVED): Likewise.
12326 (I386_DR_CONTROL_MASK): Likewise.
12327 (I386_DR_VACANT): Likewise.
12328 (I386_DR_LOCAL_ENABLE): Likewise.
12329 (I386_DR_GLOBAL_ENABLE): Likewise.
12330 (I386_DR_DISABLE): Likewise.
12331 (I386_DR_SET_RW_LEN): Likewise.
12332 (I386_DR_GET_RW_LEN): Likewise.
12333 (I386_DR_WATCH_HIT): Likewise.
12334 (i386_wp_op_t): Likewise.
12335 (i386_show_dr): Likewise.
12336 (i386_length_and_rw_bits): Likewise.
12337 (i386_insert_aligned_watchpoint): Likewise.
12338 (i386_remove_aligned_watchpoint): Likewise.
12339 (i386_handle_nonaligned_watchpoint): Likewise.
12340 i386_update_inferior_debug_regs(): Likewise.
12341 (i386_dr_insert_watchpoint): Likewise.
12342 (i386_dr_remove_watchpoint): Likewise.
12343 (i386_dr_region_ok_for_watchpoint): Likewise.
12344 (i386_dr_stopped_data_address): Likewise.
12345 (i386_dr_stopped_by_watchpoint): Likewise.
12346
12347 2014-06-19 Gary Benson <gbenson@redhat.com>
12348
12349 * i386-low.c (i386_dr_show): Renamed to
12350 i386_show_dr and made static. All uses updated.
12351 (i386_dr_length_and_rw_bits): Renamed to
12352 i386_length_and_rw_bits and made static.
12353 All uses updated.
12354 (i386_dr_insert_aligned_watchpoint): Renamed to
12355 i386_insert_aligned_watchpoint and made static.
12356 All uses updated.
12357 (i386_dr_remove_aligned_watchpoint): Renamed to
12358 i386_remove_aligned_watchpoint and made static.
12359 All uses updated.
12360 (i386_dr_update_inferior_debug_regs): Renamed to
12361 i386_update_inferior_debug_regs and made static.
12362 All uses updated.
12363
12364 2014-06-18 Gary Benson <gbenson@redhat.com>
12365
12366 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12367 (i386_dr_low_can_set_control): Likewise.
12368 (i386_get_debug_register_length): Likewise.
12369 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12370 (i386_dr_low_can_set_control): Likewise.
12371 (i386_get_debug_register_length): Likewise.
12372
12373 2014-06-17 Gary Benson <gbenson@redhat.com>
12374
12375 * i386-low.h (i386-dregs.h): New include.
12376 (DR_FIRSTADDR): Now in i386-dregs.h.
12377 (DR_LASTADDR): Likewise.
12378 (DR_NADDR): Likewise.
12379 (DR_STATUS): Likewise.
12380 (DR_CONTROL): Likewise.
12381 (i386_debug_reg_state): Likewise.
12382 (i386_dr_insert_watchpoint): Likewise.
12383 (i386_dr_remove_watchpoint): Likewise.
12384 (i386_dr_region_ok_for_watchpoint): Likewise.
12385 (i386_dr_stopped_data_address): Likewise.
12386 (i386_dr_stopped_by_watchpoint): Likewise.
12387 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12388
12389 2014-06-18 Gary Benson <gbenson@redhat.com>
12390
12391 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12392 i386_dr_insert_watchpoint.
12393 (i386_low_remove_watchpoint): Renamed to
12394 i386_dr_remove_watchpoint.
12395 (i386_low_region_ok_for_watchpoint): Renamed to
12396 i386_dr_region_ok_for_watchpoint.
12397 (i386_low_stopped_data_address): Renamed to
12398 i386_dr_stopped_data_address.
12399 (i386_low_stopped_by_watchpoint): Renamed to
12400 i386_dr_stopped_by_watchpoint.
12401 * i386-low.c (i386_show_dr): Renamed to
12402 i386_dr_show and made nonstatic. All uses updated.
12403 (i386_length_and_rw_bits): Renamed to
12404 i386_dr_length_and_rw_bits and made nonstatic.
12405 All uses updated.
12406 (i386_insert_aligned_watchpoint): Renamed to
12407 i386_dr_insert_aligned_watchpoint and made nonstatic.
12408 All uses updated.
12409 (i386_remove_aligned_watchpoint): Renamed to
12410 i386_dr_remove_aligned_watchpoint and made nonstatic.
12411 All uses updated.
12412 (i386_update_inferior_debug_regs): Renamed to
12413 i386_dr_update_inferior_debug_regs and made nonstatic.
12414 All uses updated.
12415 (i386_low_insert_watchpoint): Renamed to
12416 i386_dr_insert_watchpoint. All uses updated.
12417 (i386_low_remove_watchpoint): Renamed to
12418 i386_dr_remove_watchpoint. All uses updated.
12419 (i386_low_region_ok_for_watchpoint): Renamed to
12420 i386_dr_region_ok_for_watchpoint. All uses updated.
12421 (i386_low_stopped_data_address): Renamed to
12422 i386_dr_stopped_data_address. All uses updated.
12423 (i386_low_stopped_by_watchpoint): Renamed to
12424 i386_dr_stopped_by_watchpoint. All uses updated.
12425
12426 2014-06-18 Gary Benson <gbenson@redhat.com>
12427
12428 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12429 (i386_dr_low_can_set_control): Likewise.
12430 (i386_insert_aligned_watchpoint): New check.
12431
12432 2014-06-18 Gary Benson <gbenson@redhat.com>
12433
12434 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12435 Renamed to state.
12436
12437 2014-06-18 Gary Benson <gbenson@redhat.com>
12438
12439 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12440 instead of fatal and error.
12441 (i386_handle_nonaligned_watchpoint): Likewise.
12442
12443 2014-06-18 Gary Benson <gbenson@redhat.com>
12444
12445 * i386-low.c (i386_get_debug_register_length): New macro.
12446 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12447 (i386_show_dr): Use debug_printf instead of fprintf. Use
12448 phex to format values.
12449
12450 2014-06-18 Gary Benson <gbenson@redhat.com>
12451
12452 * i386-low.h: Comment changes.
12453 * i386-low.c: Likewise.
12454
12455 2014-06-18 Gary Benson <gbenson@redhat.com>
12456
12457 * i386-low.c: Whitespace changes.
12458
12459 2014-06-12 Tom Tromey <tromey@redhat.com>
12460
12461 * utils.c (freeargv): Remove.
12462
12463 2014-06-12 Tom Tromey <tromey@redhat.com>
12464
12465 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12466 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12467 (parse_debug_format_options): Likewise.
12468 (gdbserver_usage): Likewise.
12469 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12470 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12471 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12472 against libiberty.
12473 ($(LIBGNU)): Depend on libiberty.
12474 (all-lib): Recurse into all subdirs.
12475 (install-only): Invoke "install" target in subdirs.
12476 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12477 targets.
12478 * configure: Rebuild.
12479 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12480 for vasprintf, vsnprintf, or gettimeofday.
12481 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12482 srv_tgtobj.
12483
12484 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12485
12486 * development.sh: Delete.
12487 * Makefile.in (config.status): Adjust dependency on development.sh.
12488 * configure.ac: Adjust development.sh source call.
12489 * configure: Regenerate.
12490
12491 2014-06-02 Pedro Alves <palves@redhat.com>
12492
12493 * ax.c (gdb_free_agent_expr): New function.
12494 * ax.h (gdb_free_agent_expr): New declaration.
12495 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12496 list.
12497 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12498 static.
12499 (clear_breakpoint_conditions_and_commands): New function.
12500 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12501 (clear_breakpoint_conditions_and_commands): New declaration.
12502
12503 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12504
12505 * linux-aarch64-low.c (asm/ptrace.h): Include.
12506
12507 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12508
12509 Fix TLS access for -static -pthread.
12510 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12511 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12512 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12513
12514 2014-05-20 Pedro Alves <palves@redhat.com>
12515
12516 * linux-aarch64-low.c (aarch64_insert_point)
12517 (aarch64_remove_point): No longer check whether the type is
12518 supported here. Adjust to new interface.
12519 (the_low_target): Install aarch64_supports_z_point_type as
12520 supports_z_point_type method.
12521 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12522 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12523 instead of a Z packet char. Adjust.
12524 (arm_supports_z_point_type): New function.
12525 (arm_insert_point, arm_remove_point): Adjust to new interface.
12526 (the_low_target): Install arm_supports_z_point_type.
12527 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12528 (cris_insert_point, cris_remove_point): Adjust to new interface.
12529 Don't check whether the type is supported here.
12530 (the_low_target): Install cris_supports_z_point_type.
12531 * linux-low.c (linux_supports_z_point_type): New function.
12532 (linux_insert_point, linux_remove_point): Adjust to new interface.
12533 * linux-low.h (struct linux_target_ops) <insert_point,
12534 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12535 raw_breakpoint pointer parameter.
12536 <supports_z_point_type>: New method.
12537 * linux-mips-low.c (mips_supports_z_point_type): New function.
12538 (mips_insert_point, mips_remove_point): Adjust to new interface.
12539 Use mips_supports_z_point_type.
12540 (the_low_target): Install mips_supports_z_point_type.
12541 * linux-ppc-low.c (the_low_target): Install NULL as
12542 supports_z_point_type method.
12543 * linux-s390-low.c (the_low_target): Install NULL as
12544 supports_z_point_type method.
12545 * linux-sparc-low.c (the_low_target): Install NULL as
12546 supports_z_point_type method.
12547 * linux-x86-low.c (x86_supports_z_point_type): New function.
12548 (x86_insert_point): Adjust to new insert_point interface. Use
12549 insert_memory_breakpoint. Adjust to new
12550 i386_low_insert_watchpoint interface.
12551 (x86_remove_point): Adjust to remove_point interface. Use
12552 remove_memory_breakpoint. Adjust to new
12553 i386_low_remove_watchpoint interface.
12554 (the_low_target): Install x86_supports_z_point_type.
12555 * lynx-low.c (lynx_target_ops): Install NULL as
12556 supports_z_point_type callback.
12557 * nto-low.c (nto_supports_z_point_type): New.
12558 (nto_insert_point, nto_remove_point): Adjust to new interface.
12559 (nto_target_ops): Install nto_supports_z_point_type.
12560 * mem-break.c: Adjust intro comment.
12561 (struct raw_breakpoint) <raw_type, size>: New fields.
12562 <inserted>: Update comment.
12563 <shlib_disabled>: Delete field.
12564 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12565 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12566 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12567 (raw_bkpt_type_to_target_hw_bp_type): New function.
12568 (find_enabled_raw_code_breakpoint_at): New function.
12569 (find_raw_breakpoint_at): New type and size parameters. Use them.
12570 (insert_memory_breakpoint): New function, based off
12571 set_raw_breakpoint_at.
12572 (remove_memory_breakpoint): New function.
12573 (set_raw_breakpoint_at): Reimplement.
12574 (set_breakpoint): New, based on set_breakpoint_at.
12575 (set_breakpoint_at): Reimplement.
12576 (delete_raw_breakpoint): Go through the_target->remove_point
12577 instead of assuming memory breakpoints.
12578 (find_gdb_breakpoint_at): Delete.
12579 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12580 (find_gdb_breakpoint): New function.
12581 (set_gdb_breakpoint_at): Delete.
12582 (z_type_supported): New function.
12583 (set_gdb_breakpoint_1): New function, loosely based off
12584 set_gdb_breakpoint_at.
12585 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12586 (delete_gdb_breakpoint_at): Delete.
12587 (delete_gdb_breakpoint_1): New function, loosely based off
12588 delete_gdb_breakpoint_at.
12589 (delete_gdb_breakpoint): New function.
12590 (clear_gdb_breakpoint_conditions): Rename to ...
12591 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12592 breakpoint.
12593 (add_condition_to_breakpoint): Make static.
12594 (add_breakpoint_condition): Take a struct breakpoint pointer
12595 instead of an address. Adjust.
12596 (gdb_condition_true_at_breakpoint): Rename to ...
12597 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12598 z_type parameter.
12599 (gdb_condition_true_at_breakpoint): Reimplement.
12600 (add_breakpoint_commands): Take a struct breakpoint pointer
12601 instead of an address. Adjust.
12602 (gdb_no_commands_at_breakpoint): Rename to ...
12603 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12604 parameter. Return true if no breakpoint was found. Change debug
12605 output.
12606 (gdb_no_commands_at_breakpoint): Reimplement.
12607 (run_breakpoint_commands): Rename to ...
12608 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12609 and change return type to boolean.
12610 (run_breakpoint_commands): New function.
12611 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12612 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12613 breakpoint. Go through the_target->remove_point instead of
12614 assuming memory breakpoint.
12615 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12616 software and hardware breakpoints.
12617 (reinsert_raw_breakpoint): Go through the_target->insert_point
12618 instead of assuming memory breakpoint.
12619 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12620 software and hardware breakpoints.
12621 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12622 Check both software and hardware breakpoints.
12623 (validate_inserted_breakpoint): Assert the breakpoint is a
12624 software breakpoint. Set the inserted flag to -1 instead of
12625 setting shlib_disabled.
12626 (delete_disabled_breakpoints): Adjust.
12627 (validate_breakpoints): Only validate software breakpoints.
12628 Adjust to inserted flag change.
12629 (check_mem_read, check_mem_write): Skip breakpoint types other
12630 than software breakpoints. Adjust to inserted flag change.
12631 * mem-break.h (enum raw_bkpt_type): New enum.
12632 (raw_breakpoint, struct process_info): Forward declare.
12633 (Z_packet_to_target_hw_bp_type): Delete declaration.
12634 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12635 (set_gdb_breakpoint, delete_gdb_breakpoint)
12636 (clear_breakpoint_conditions): New declarations.
12637 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12638 (breakpoint_inserted_here): Update comment.
12639 (add_breakpoint_condition, add_breakpoint_commands): Replace
12640 address parameter with a breakpoint pointer parameter.
12641 (gdb_breakpoint_here): Update comment.
12642 (delete_gdb_breakpoint_at): Delete.
12643 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12644 * server.c (process_point_options): Take a struct breakpoint
12645 pointer instead of an address. Adjust.
12646 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12647 delete_gdb_breakpoint.
12648 * spu-low.c (spu_target_ops): Install NULL as
12649 supports_z_point_type method.
12650 * target.h: Include mem-break.h.
12651 (struct target_ops) <prepare_to_access_memory>: Update comment.
12652 <supports_z_point_type>: New field.
12653 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12654 instead of a char. Also take a raw breakpoint pointer.
12655 * win32-arm-low.c (the_low_target): Install NULL as
12656 supports_z_point_type.
12657 * win32-i386-low.c (i386_supports_z_point_type): New function.
12658 (i386_insert_point, i386_remove_point): Adjust to new interface.
12659 (the_low_target): Install i386_supports_z_point_type.
12660 * win32-low.c (win32_supports_z_point_type): New function.
12661 (win32_insert_point, win32_remove_point): Adjust to new interface.
12662 (win32_target_ops): Install win32_supports_z_point_type.
12663 * win32-low.h (struct win32_target_ops):
12664 <supports_z_point_type>: New method.
12665 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12666 instead of a char. Also take a raw breakpoint pointer.
12667
12668 2014-05-20 Pedro Alves <palves@redhat.com>
12669
12670 * mem-break.h: Include break-common.h.
12671 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12672 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12673 (Z_packet_to_target_hw_bp_type): New declaration.
12674 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12675 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12676 (Z_PACKET_ACCESS_WP): Delete macros.
12677 (Z_packet_to_hw_type): Delete function.
12678 * i386-low.h: Don't include break-common.h here.
12679 (Z_packet_to_hw_type): Delete declaration.
12680 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12681 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12682 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12683 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12684 * linux-aarch64-low.c: Don't include break-common.h here.
12685 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12686 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12687 (Z_packet_to_target_hw_bp_type): Delete function.
12688 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12689 function.
12690 (mips_insert_point, mips_remove_point): Use
12691 Z_packet_to_target_hw_bp_type.
12692
12693 2014-05-20 Pedro Alves <palves@redhat.com>
12694
12695 * linux-aarch64-low.c: Include break-common.h.
12696 (enum target_point_type): Delete.
12697 (Z_packet_to_point_type): Rename to ...
12698 (Z_packet_to_target_hw_bp_type): ... this, and return a
12699 target_hw_bp_type instead.
12700 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12701 instead of an enum target_point_type.
12702 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12703 breakpoint type.
12704 (aarch64_dr_state_insert_one_point)
12705 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12706 (aarch64_handle_aligned_watchpoint)
12707 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12708 Take an enum target_hw_bp_type instead of an enum
12709 target_point_type.
12710 (aarch64_supports_z_point_type): New function.
12711 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12712 use Z_packet_to_target_hw_bp_type.
12713
12714 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12715
12716 * configure.ac: Only use -Werror by default when DEVELOPMENT
12717 is true.
12718 * configure: Regenerate.
12719
12720 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12721
12722 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12723 * linux-x86-low.c (X86_64_USER_REGS): New.
12724 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12725
12726 2014-04-28 Yao Qi <yao@codesourcery.com>
12727
12728 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12729 name.
12730
12731 2014-04-25 Pedro Alves <palves@redhat.com>
12732
12733 PR server/16255
12734 * linux-low.c (linux_attach_fail_reason_string): New function.
12735 (linux_attach_lwp): Delete.
12736 (linux_attach_lwp_1): Rename to ...
12737 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12738 argument. Remove "initial" parameter. Return int instead of
12739 void. Don't error or warn here.
12740 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12741 failure to attach to the tgid. Call warning when failing to
12742 attach to an lwp.
12743 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12744 argument. Remove "initial" parameter. Return int instead of
12745 void. Don't error or warn here.
12746 (linux_attach_fail_reason_string): New declaration.
12747 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12748 interface change. Use linux_attach_fail_reason_string.
12749
12750 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12751 Walfred Tedeschi <walfred.tedeschi@intel.com>
12752
12753 * Makefile.in: Added rules to handle new files
12754 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12755 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12756 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12757 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12758 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12759 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12760 x32-avx512-linux.o.
12761 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12762 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12763 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12764 i386/x32-avx512.xml.
12765 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12766 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12767 i386/x32-avx512-linux.xml.
12768 * i387-fp.c (num_avx512_k_registers): New constant for number
12769 of K registers.
12770 (num_avx512_zmmh_low_registers): New constant for number of
12771 lower ZMM registers (0-15).
12772 (num_avx512_zmmh_high_registers): New constant for number of
12773 higher ZMM registers (16-31).
12774 (num_avx512_ymmh_registers): New contant for number of higher
12775 YMM registers (ymm16-31 added by avx521 on x86_64).
12776 (num_avx512_xmm_registers): New constant for number of higher
12777 XMM registers (xmm16-31 added by AVX512 on x86_64).
12778 (struct i387_xsave): Add space for AVX512 registers.
12779 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12780 Add code to handle AVX512 registers.
12781 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12782 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12783 prototypei from generated file.
12784 (tdesc_amd64_avx512_linux): Likewise.
12785 (init_registers_x32_avx512_linux): Likewise.
12786 (tdesc_x32_avx512_linux): Likewise.
12787 (init_registers_i386_avx512_linux): Likewise.
12788 (tdesc_i386_avx512_linux): Likewise.
12789 (x86_64_regmap): Add AVX512 registers.
12790 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12791 mask.
12792 (initialize_low_arch): Add code to initialize AVX512 registers.
12793
12794 2014-04-23 Pedro Alves <palves@redhat.com>
12795
12796 * mem-break.c (find_gdb_breakpoint_at): Make static.
12797 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12798
12799 2014-04-23 Pedro Alves <palves@redhat.com>
12800
12801 * i386-low.c: Don't include break-common.h here.
12802 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12803 prototype to take target_hw_bp_type as argument instead of a Z
12804 packet char.
12805 * i386-low.h: Include break-common.h here.
12806 (Z_packet_to_hw_type): Declare.
12807 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12808 prototypes.
12809 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12810 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12811 (x86_remove_point): Convert the packet number to a
12812 target_hw_bp_type before calling i386_low_remove_watchpoint.
12813 * win32-i386-low.c (i386_insert_point): Convert the packet number
12814 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12815 (i386_remove_point): Convert the packet number to a
12816 target_hw_bp_type before calling i386_low_remove_watchpoint.
12817
12818 2014-04-23 Pedro Alves <palves@redhat.com>
12819
12820 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12821
12822 2014-04-10 Pedro Alves <palves@redhat.com>
12823
12824 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12825 Check if the condition or command is NULL before checking if the
12826 breakpoint is known. On success, return true.
12827 * mem-break.h (add_breakpoint_condition): Document return.
12828 (add_breakpoint_commands): Add describing comment.
12829 * server.c (skip_to_semicolon): New function.
12830 (process_point_options): Use it.
12831
12832 2014-04-09 Pedro Alves <palves@redhat.com>
12833
12834 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12835 to lwpid_of.
12836
12837 2014-02-27 Pedro Alves <palves@redhat.com>
12838
12839 PR 12702
12840 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12841 macros.
12842 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12843 output.
12844 (last_thread_of_process_p): Take a PID argument instead of a
12845 thread pointer.
12846 (linux_wait_for_lwp): Delete.
12847 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12848 functions.
12849 (linux_low_filter_event): New function, party factored out from
12850 linux_wait_for_event.
12851 (linux_wait_for_event): Rename to ...
12852 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12853 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12854 sigsuspend. Check for zombie leaders.
12855 (linux_wait_for_event): Reimplement as wrapper around
12856 linux_wait_for_event_filtered.
12857 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12858 a normal or signal exit is seen, it's the whole process exiting.
12859 (wait_for_sigstop): No longer a for_each_inferior callback.
12860 Rewrite on top of linux_wait_for_event_filtered.
12861 (stop_all_lwps): Call wait_for_sigstop directly.
12862 * server.c (resume, handle_target_event): Handle
12863 TARGET_WAITKIND_NO_RESUMED.
12864
12865 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12866
12867 * win32-low.c (psapi_get_dll_name,
12868 * win32_CreateToolhelp32Snapshot): Delete.
12869 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12870 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12871 Delete.
12872 (handle_load_dll): Add function description.
12873 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12874
12875 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12876
12877 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12878 Add comment.
12879 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12880 base address when calling win32_add_one_solib.
12881 (handle_load_dll): Delete local variable load_addr.
12882 Remove 0x1000 offset applied to DLL base address when calling
12883 win32_add_one_solib.
12884 (handle_unload_dll): Add comment.
12885
12886 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12887
12888 * win32-low.c (win32_add_all_dlls): Renames
12889 win32_ensure_ntdll_loaded. Rewrite function documentation.
12890 Adjust implementation to always load all DLLs.
12891 Add 0x1000 offset to DLL base address when calling
12892 win32_add_one_solib.
12893 (child_initialization_done): New static global.
12894 (do_initial_child_stuff): Set child_initialization_done to
12895 zero during child initialization, and 1 after. Replace call
12896 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12897 Add comment.
12898 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12899 (handle_unload_dll): Add function documentation.
12900 (get_child_debug_event): Ignore load and unload DLL events
12901 during child initialization.
12902
12903 2014-02-20 Doug Evans <dje@google.com>
12904
12905 Remove global all_lwps.
12906 * inferiors.h (ptid_of): Move here from linux-low.h.
12907 (pid_of, lwpid_of): Ditto.
12908 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12909 parameter is a struct thread_info * now.
12910 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12911 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12912 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12913 directly.
12914 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12915 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12916 * linux-arm-low.c (update_registers_callback): Update, "entry"
12917 parameter is a struct thread_info * now.
12918 Fetch lwpid from current_inferior directly.
12919 (arm_insert_point): Pass &all_threads to find_inferior instead of
12920 &all_lwps.
12921 (arm_remove_point): Ditto.
12922 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12923 (arm_prepare_to_resume): Fetch pid from thread.
12924 (arm_read_description): Fetch lwpid from current_inferior directly.
12925 * linux-low.c (all_lwps): Delete.
12926 (delete_lwp): Delete call to remove_inferior.
12927 (handle_extended_wait): Fetch lwpid from thread.
12928 (add_lwp): Don't set lwp->entry.id. Remove call to
12929 add_inferior_to_list.
12930 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12931 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12932 (kill_one_lwp_callback): Ditto.
12933 (linux_kill): Don't dereference NULL pointer.
12934 Fetch ptid,lwpid from thread.
12935 (get_detach_signal): Fetch ptid from thread.
12936 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12937 Simplify call to regcache_invalidate_thread.
12938 (delete_lwp_callback): Update, "entry" parameter is a
12939 struct thread_info * now. Fetch pid from thread.
12940 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12941 (status_pending_p_callback): Update, "entry" parameter is a
12942 struct thread_info * now. Fetch ptid from thread.
12943 (find_lwp_pid): Update, "entry" parameter is a
12944 struct thread_info * now.
12945 (linux_wait_for_lwp): Fetch pid from thread.
12946 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12947 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12948 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12949 (dequeue_one_deferred_signal): Ditto.
12950 (cancel_breakpoint): Fetch ptid from current_inferior.
12951 (linux_wait_for_event): Pass &all_threads to find_inferior,
12952 not &all_lwps. Fetch ptid, lwpid from thread.
12953 (count_events_callback): Update, "entry" parameter is a
12954 struct thread_info * now.
12955 (select_singlestep_lwp_callback): Ditto.
12956 (select_event_lwp_callback): Ditto.
12957 (cancel_breakpoints_callback): Ditto.
12958 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12959 not &all_lwps.
12960 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12961 (unsuspend_one_lwp): Update, "entry" parameter is a
12962 struct thread_info * now.
12963 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12964 not &all_lwps.
12965 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12966 Fetch lwpid from thread, not lwp.
12967 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12968 Pass &all_threads to find_inferior, not &all_lwps.
12969 (send_sigstop): Fetch lwpid from thread, not lwp.
12970 (send_sigstop_callback): Update, "entry" parameter is a
12971 struct thread_info * now.
12972 (suspend_and_send_sigstop_callback): Ditto.
12973 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12974 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12975 struct thread_info * now.
12976 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12977 from thread, lwp.
12978 (lwp_running): Update, "entry" parameter is a
12979 struct thread_info * now.
12980 (stop_all_lwps): Fetch ptid from thread.
12981 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12982 (linux_resume_one_lwp): Fetch lwpid from thread.
12983 (linux_set_resume_request): Update, "entry" parameter is a
12984 struct thread_info * now. Fetch pid, lwpid from thread.
12985 (resume_status_pending_p): Update, "entry" parameter is a
12986 struct thread_info * now.
12987 (need_step_over_p): Ditto. Fetch lwpid from thread.
12988 (start_step_over): Fetch lwpid from thread.
12989 (linux_resume_one_thread): Update, "entry" parameter is a
12990 struct thread_info * now. Fetch lwpid from thread.
12991 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12992 (proceed_one_lwp): Update, "entry" parameter is a
12993 struct thread_info * now. Fetch lwpid from thread.
12994 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12995 struct thread_info * now.
12996 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12997 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12998 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12999 directly.
13000 (regsets_store_inferior_registers): Ditto.
13001 (fetch_register, store_register): Ditto.
13002 (linux_read_memory, linux_write_memory): Ditto.
13003 (linux_request_interrupt): Ditto.
13004 (linux_read_auxv): Ditto.
13005 (linux_xfer_siginfo): Ditto.
13006 (linux_qxfer_spu): Ditto.
13007 (linux_qxfer_libraries_svr4): Ditto.
13008 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13009 moved to inferiors.h.
13010 (get_lwp): Delete.
13011 (get_thread_lwp): Update.
13012 (struct lwp_info): Delete member "entry". Simplify comment for
13013 member "thread".
13014 (all_lwps): Delete.
13015 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13016 current_inferior directly.
13017 (update_watch_registers_callback): Update, "entry" parameter is a
13018 struct thread_info * now. Fetch pid from thread.
13019 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13020 (mips_insert_point): Fetch lwpid from current_inferior.
13021 Pass &all_threads to find_inferior, not &all_lwps.
13022 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13023 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13024 directly.
13025 (mips_stopped_data_address): Ditto.
13026 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13027 directly.
13028 * linux-tile-low.c (tile_arch_setup): Ditto.
13029 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13030 (update_debug_registers_callback): Update, "entry" parameter is a
13031 struct thread_info * now. Fetch pid from thread.
13032 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13033 Pass &all_threads to find_inferior, not &all_lwps.
13034 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13035 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13036 Pass &all_threads to find_inferior, not &all_lwps.
13037 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13038 (i386_dr_low_get_status): Ditto.
13039 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13040 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13041 (x86_linux_read_description): Ditto.
13042 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13043
13044 2014-02-20 Doug Evans <dje@google.com>
13045
13046 * inferiors.c (get_first_inferior): Fix buglet.
13047
13048 2014-02-19 Doug Evans <dje@google.com>
13049
13050 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13051 * inferiors.c (add_thread): Change result type to struct thread_info *.
13052 All callers updated.
13053 (add_lwp): Call add_thread here instead of in callers.
13054 All callers updated.
13055 * linux-low.h (get_lwp_thread): Rewrite.
13056 (struct lwp_info): New member "thread".
13057
13058 2014-02-19 Doug Evans <dje@google.com>
13059
13060 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13061 All callers updated.
13062
13063 2014-02-19 Doug Evans <dje@google.com>
13064
13065 * inferiors.c (add_thread): Fix whitespace.
13066
13067 2014-02-19 Doug Evans <dje@google.com>
13068
13069 * dll.c (clear_dlls): Replace accessing list implemention details
13070 with API function.
13071 * gdbthread.h (get_first_thread): Declare.
13072 * inferiors.c (for_each_inferior_with_data): New function.
13073 (get_first_thread): New function.
13074 (find_thread_ptid): Simplify.
13075 (get_first_inferior): New function.
13076 (clear_list): Delete.
13077 (one_inferior_p): New function.
13078 (clear_inferior_list): New function.
13079 (clear_inferiors): Update.
13080 * inferiors.h (for_each_inferior_with_data): Declare.
13081 (clear_inferior_list): Declare.
13082 (one_inferior_p): Declare.
13083 (get_first_inferior): Declare.
13084 * linux-low.c (linux_wait_for_event): Replace accessing list
13085 implemention details with API function.
13086 * server.c (target_running): Ditto.
13087 (accumulate_file_name_length): New function.
13088 (emit_dll_description): New function.
13089 (handle_qxfer_libraries): Replace accessing list implemention
13090 details with API function.
13091 (handle_qxfer_threads_worker): New function.
13092 (handle_qxfer_threads_proper): Replace accessing list implemention
13093 details with API function.
13094 (handle_query): Ditto.
13095 (visit_actioned_threads_callback_ftype): New typedef.
13096 (visit_actioned_threads_data): New struct.
13097 (visit_actioned_threads): Rewrite to be find_inferior callback.
13098 (resume): Call find_inferior.
13099 (handle_status): Replace accessing list implemention
13100 details with API function.
13101 (process_serial_event): Replace accessing list implemention details
13102 with API function.
13103 * target.c (set_desired_inferior): Replace accessing list implemention
13104 details with API function.
13105 * tracepoint.c (same_process_p): New function.
13106 (gdb_agent_about_to_close): Replace accessing list implemention
13107 details with API function.
13108 * win32-low.c (child_delete_thread): Replace accessing list
13109 implemention details with API function.
13110 (match_dll_by_basename): New function.
13111 (dll_is_loaded_by_basename): New function.
13112 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13113 details call to dll_is_loaded_by_basename.
13114
13115 2014-02-19 Doug Evans <dje@google.com>
13116
13117 * dll.h (struct dll_info): Add comment.
13118 * gdbthread.h (struct thread_info): Add comment.
13119 (current_ptid): Simplify.
13120 * inferiors.c (add_process): Update.
13121 (remove_process): Update.
13122 * inferiors.h (struct process_info): Rename member "head" to "entry".
13123 * linux-low.c (delete_lwp): Update.
13124 (add_lwp): Update.
13125 (last_thread_of_process_p): Update.
13126 (kill_one_lwp_callback, linux_kill): Update.
13127 (status_pending_p_callback): Update.
13128 (wait_for_sigstop): Update. Simplify read of ptid.
13129 (start_step_over): Update.
13130 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13131 (get_lwp_thread): Update.
13132 (struct lwp_info): Rename member "head" to "entry".
13133 * regcache.h (inferior_list_entry): Delete.
13134 * server.c (kill_inferior_callback): Update.
13135 (detach_or_kill_inferior_callback): Update.
13136 (print_started_pid): Update.
13137 (print_attached_pid): Update.
13138 (process_serial_event): Simplify read of ptid.
13139 * thread-db.c (thread_db_create_event): Update.
13140 (thread_db_get_tls_address): Update.
13141 * win32-low.c (current_inferior_ptid): Simplify.
13142
13143 2014-02-19 Tom Tromey <tromey@redhat.com>
13144
13145 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13146 argument.
13147 (target_supports_btrace): Update.
13148
13149 2014-02-14 Yao Qi <yao@codesourcery.com>
13150
13151 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13152 (rsp-low-ipa.o): New target.
13153
13154 2014-02-12 Tom Tromey <tromey@redhat.com>
13155
13156 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13157 convert_ascii_to_int.
13158 * regcache.c (registers_to_string): Likewise.
13159 * remote-utils.c (decode_M_packet): Likewise.
13160 * server.c (process_serial_event): Likewise.
13161
13162 2014-02-12 Tom Tromey <tromey@redhat.com>
13163
13164 * server.c (handle_query, handle_v_run): Use hex2bin, not
13165 unhexify.
13166 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13167
13168 2014-02-12 Tom Tromey <tromey@redhat.com>
13169
13170 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13171 convert_int_to_ascii.
13172 * regcache.c (registers_to_string, collect_register_as_string):
13173 Likewise.
13174 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13175 Likewise.
13176 * server.c (process_serial_event): Likewise.
13177 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13178 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13179
13180 2014-02-12 Tom Tromey <tromey@redhat.com>
13181
13182 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13183 bin2hex, not hexify.
13184 * tracepoint.c (cmd_qtstatus): Likewise.
13185
13186 2014-02-12 Tom Tromey <tromey@redhat.com>
13187
13188 * remote-utils.c (monitor_output): Pass explicit length to
13189 hexify.
13190
13191 2014-02-12 Tom Tromey <tromey@redhat.com>
13192
13193 * tracepoint.c: Include rsp-low.h.
13194 * server.c: Include rsp-low.h.
13195 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13196 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13197 declare.
13198 * remote-utils.c: Include rsp-low.h.
13199 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13200 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13201 (convert_int_to_ascii, convert_ascii_to_int): Move to
13202 common/rsp-low.c.
13203 * regcache.c: Include rsp-low.h.
13204 * ax.c: Include rsp-low.h.
13205 * Makefile.in (SFILES): Add common/rsp-low.c.
13206 (OBS): Add rsp-low.o.
13207 (rsp-low.o): New target.
13208
13209 2014-02-12 Tom Tromey <tromey@redhat.com>
13210
13211 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13212 Include print-utils.h.
13213 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13214 (plongest, thirty_two, phex_nz): Remove.
13215 * Makefile.in (SFILES): Add common/print-utils.c.
13216 (OBS): Add print-utils.o.
13217 (print-utils-ipa.o): New target.
13218 (print-utils.o): New target.
13219 (IPA_OBJS): Add print-utils-ipa.o.
13220
13221 2014-02-06 Tom Tromey <tromey@redhat.com>
13222
13223 * Makefile.in (SFILES): Fix indentation.
13224
13225 2014-02-05 Doug Evans <dje@google.com>
13226
13227 * linux-low.c (linux_wait_for_event): Improve comment.
13228 (linux_wait_1): Keep current_inferior in sync with event_child.
13229
13230 2014-01-22 Doug Evans <dje@google.com>
13231
13232 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13233
13234 2014-01-22 Doug Evans <dje@google.com>
13235
13236 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13237 * configure: Regenerate.
13238 * config.in: Regenerate.
13239 * Makefile.in (SFILES): Add debug.c.
13240 (OBS): Add debug.o.
13241 * debug.c: New file.
13242 * debug.h: New file.
13243 * linux-aarch64-low.c (*): Update all debugging printfs to use
13244 debug_printf instead of fprintf.
13245 * linux-arm-low.c (*): Ditto.
13246 * linux-cris-low.c (*): Ditto.
13247 * linux-crisv32-low.c (*): Ditto.
13248 * linux-m32r-low.c (*): Ditto.
13249 * linux-sparc-low.c (*): Ditto.
13250 * linux-x86.c (*): Ditto.
13251 * linux-low.c (*): Ditto.
13252 (linux_wait_1): Add calls to debug_enter, debug_exit.
13253 (linux_wait): Remove redundant debugging printf.
13254 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13255 (linux_resume, unstop_all_lwps): Ditto.
13256 * mem-break.c (*): Update all debugging printfs to use
13257 debug_printf instead of fprintf.
13258 * remote-utils.c (*): Ditto.
13259 * thread-db.c (*): Ditto.
13260 * server.c #include <ctype.h>, "gdb_vecs.h".
13261 (debug_threads): Moved to debug.c.
13262 (*): Update all debugging printfs to use debug_printf instead of
13263 fprintf.
13264 (start_inferior): Replace call to fflush with call to debug_flush.
13265 (monitor_show_help): Mention set debug-format.
13266 (parse_debug_format_options): New function.
13267 (handle_monitor_command): Handle "monitor set debug-format".
13268 (gdbserver_usage): Mention --debug-format.
13269 (main): Parse --debug-format.
13270 * server.h (debug_threads): Declaration moved to debug.h.
13271 #include "debug.h".
13272 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13273 trace_debug_1 that uses debug_printf.
13274 (tracepoint_look_up_symbols): Update all debugging printfs to use
13275 debug_printf instead of fprintf.
13276
13277 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13278
13279 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13280 sys/ptrace.h.
13281
13282 2014-01-17 Pedro Alves <palves@redhat.com>
13283
13284 PR build/16445
13285 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13286 defined after including gdb_proc_service.h.
13287
13288 2014-01-16 Doug Evans <dje@google.com>
13289
13290 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13291 (match_dll): Use it.
13292
13293 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13294
13295 * target.h (target_ops) <read_btrace>: Change parameters and
13296 return type to allow error reporting.
13297 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13298 trace reading errors on.
13299 * linux-low.c (linux_low_read_btrace): Pass trace reading
13300 errors on.
13301 (linux_low_disable_btrace): New.
13302
13303 2014-01-15 Doug Evans <dje@google.com>
13304
13305 * inferiors.c (thread_id_to_gdb_id): Delete.
13306 * inferiors.h (thread_id_to_gdb_id): Delete.
13307
13308 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13309
13310 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13311 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13312 versions.
13313
13314 2014-01-08 Pedro Alves <palves@redhat.com>
13315
13316 * server.c (handle_status): Don't discard previous queued stop
13317 replies or thread's pending status here.
13318 (main) <disconnection>: Do it here instead.
13319
13320 2014-01-08 Pedro Alves <palves@redhat.com>
13321
13322 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13323 * server.c (visit_actioned_threads, handle_pending_status): New
13324 function.
13325 (handle_v_cont): Factor out parts to ...
13326 (resume): ... this new function. If in all-stop, and a thread
13327 being resumed has a pending status, report it without actually
13328 resuming.
13329 (myresume): Adjust to use the new 'resume' function.
13330 (clear_pending_status_callback, set_pending_status_callback)
13331 (find_status_pending_thread_callback): New functions.
13332 (handle_status): Handle the case of multiple threads having
13333 interesting statuses to report. Report threads' real last signal
13334 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13335 with an interesting thread to report the status for, instead of
13336 always reporting the status of the first thread.
13337
13338 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13339
13340 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13341 * gdbreplay.c (gdbreplay_version): Likewise.
13342
13343 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13344
13345 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13346 iov.iov_len with the real length in use.
13347
13348 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13349
13350 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13351 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13352 for all targets that use win32-low.c.
13353 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13354 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13355
13356 2013-12-13 Pedro Alves <palves@redhat.com>
13357
13358 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13359 if equal to TARGET_WAITKIND_LOADED.
13360 * win32-low.c (cached_status): New static global.
13361 (win32_wait): Add declaration.
13362 (do_initial_child_stuff): Flush all initial pending debug events
13363 up to the initial breakpoint.
13364 (win32_wait): If CACHED_STATUS was set, return that instead
13365 of doing a real wait. Remove the code resuming the execution
13366 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13367 during the initial phase. Also remove the code changing
13368 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13369 TARGET_WAITKIND_STOPPED.
13370
13371 2013-12-11 Yao Qi <yao@codesourcery.com>
13372
13373 * notif.c (handle_notif_ack): Return 0 if no notification
13374 matches.
13375
13376 2013-11-20 Doug Evans <dje@google.com>
13377
13378 * linux-low.c (linux_set_resume_request): Fix comment.
13379
13380 2013-11-20 Doug Evans <dje@google.com>
13381
13382 * linux-low.c (resume_status_pending_p): Tweak comment.
13383
13384 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13385
13386 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13387 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13388 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13389 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13390 (srv_amd64_regobj): Add amd64-mpx.o.
13391 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13392 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13393 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13394 * i387-fp.c (num_pl_bnd_register) Added constant.
13395 (num_pl_bnd_cfg_registers) Added constant.
13396 (struct i387_xsave) Added reserved area and MPX fields.
13397 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13398 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13399 function.
13400 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13401 (init_registers_amd64_mpx_linux): Declare new function.
13402 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13403 (x86_64_regmap): Add MPX registers.
13404 (x86_linux_read_description): Add MPX case.
13405 (initialize_low_arch): Initialize MPX targets.
13406
13407 2013-11-18 Tom Tromey <tromey@redhat.com>
13408
13409 * configure: Rebuild.
13410 * configure.ac: Don't check for stdlib.h.
13411 * gdbreplay.c: Unconditionally include stdlib.h.
13412
13413 2013-11-18 Tom Tromey <tromey@redhat.com>
13414
13415 * config.in: Rebuild.
13416 * configure: Rebuild.
13417 * configure.ac: Don't use AC_HEADER_DIRENT.
13418
13419 2013-11-18 Tom Tromey <tromey@redhat.com>
13420
13421 * server.h: Don't check HAVE_STRING_H.
13422 * gdbreplay.c: Don't check HAVE_STRING_H.
13423 * configure: Rebuild.
13424
13425 2013-11-18 Tom Tromey <tromey@redhat.com>
13426
13427 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13428 LIBGNU.
13429
13430 2013-11-08 Tom Tromey <tromey@redhat.com>
13431
13432 * configure, config.in: Rebuild.
13433 * configure.ac: Remove unused configury.
13434
13435 2013-11-08 Tom Tromey <tromey@redhat.com>
13436
13437 * acinclude.m4: Include common.m4, codeset.m4.
13438 * configure, config.in: Rebuild.
13439 * configure.ac: Use GDB_AC_COMMON.
13440
13441 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13442
13443 * linux-s390-low.c (HWCAP_S390_TE): New define.
13444 (s390_arch_setup): Consider the TE field in the HWCAP for
13445 determining 'have_regset_tdb'.
13446
13447 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13448
13449 PR gdb/16014
13450 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13451 call to sizeof.
13452
13453 2013-10-02 Pedro Alves <palves@redhat.com>
13454
13455 * server.c (process_serial_event): Don't output "GDBserver
13456 exiting" if GDB is connected through stdio.
13457 * target.c (mywait): Likewise, be silent if GDB is connected
13458 through stdio.
13459
13460 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13461
13462 * lynx-low.c (lynx_add_threads_after_attach): New function.
13463 (lynx_attach): Remove call to add_thread. Add call to
13464 lynx_add_threads_after_attach instead.
13465
13466 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13467
13468 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13469 * config.in, configure: Regenerated.
13470
13471 2013-09-18 Yao Qi <yao@codesourcery.com>
13472
13473 PR server/15959
13474 * server.c (start_inferior): Clear 'resume_info'.
13475
13476 2013-09-16 Jiong Wang <jiwang@tilera.com>
13477
13478 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13479 for each register.
13480
13481 2013-09-16 Jiong Wang <jiwang@tilera.com>
13482
13483 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13484 linux-tile-low.o to srv_tgtobj.
13485
13486 2013-09-16 Will Newton <will.newton@linaro.org>
13487
13488 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13489 out regs.
13490
13491 2013-09-06 Pedro Alves <palves@redhat.com>
13492
13493 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13494 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13495 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13496 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13497 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13498 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13499
13500 2013-09-06 Pedro Alves <palves@redhat.com>
13501
13502 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13503 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13504
13505 2013-09-06 Pedro Alves <palves@redhat.com>
13506
13507 * linux-amd64-ipa.c: Include tracepoint.h.
13508 * linux-i386-ipa.c: Include tracepoint.h.
13509
13510 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13511
13512 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13513 (ps_get_thread_area): New function.
13514
13515 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13516
13517 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13518 (initialize_low_arch): Call init_registers_crisv32 rather than
13519 init_register_crisv32.
13520
13521 2013-09-05 Pedro Alves <palves@redhat.com>
13522
13523 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13524 to ...
13525 * hostio.h: ... this new file.
13526 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13527 win32-low.c: Include hostio.h.
13528
13529 2013-09-05 Pedro Alves <palves@redhat.com>
13530
13531 * server.h (gdb_client_data, handler_func, callback_handler_func)
13532 (delete_file_handler, add_file_handler, append_callback_event)
13533 (delete_callback_event, start_event_loop, initialize_event_loop):
13534 Move to event-loop.h and include it.
13535 * event-loop.h: New file.
13536
13537 2013-09-05 Pedro Alves <palves@redhat.com>
13538
13539 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13540 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13541 (loaded_dll, unloaded_dll): Move to ...
13542 * dll.h: ... this new file.
13543 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13544
13545 2013-09-05 Pedro Alves <palves@redhat.com>
13546
13547 * server.h (current_process, get_thread_process, all_processes)
13548 (add_inferior_to_list, for_each_inferior, current_inferior)
13549 (remove_inferior, add_process, remove_process, find_process_pid)
13550 (have_started_inferiors_p, have_attached_inferiors_p)
13551 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13552 (clear_inferiors, find_inferior, find_inferior_id)
13553 (inferior_target_data, set_inferior_target_data)
13554 (inferior_regcache_data, set_inferior_regcache_data): Move to
13555 inferiors.h, and include it.
13556 * inferiors.h: New file.
13557
13558 2013-09-05 Pedro Alves <palves@redhat.com>
13559
13560 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13561 Move ...
13562 * ax.h: ... here.
13563
13564 2013-09-05 Pedro Alves <palves@redhat.com>
13565
13566 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13567 tracepoint.h.
13568 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13569 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13570 (handle_tracepoint_general_set, handle_tracepoint_query)
13571 (tracepoint_finished_step, tracepoint_was_hit)
13572 (release_while_stepping_state_list, current_traceframe)
13573 (in_readonly_region, traceframe_read_mem)
13574 (fetch_traceframe_registers, traceframe_read_sdata)
13575 (traceframe_read_info, struct fast_tpoint_collect_status)
13576 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13577 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13578 (supply_fast_tracepoint_registers)
13579 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13580 (ipa_tdesc, claim_trampoline_space)
13581 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13582 (agent_mem_read, agent_get_trace_state_variable_value)
13583 (agent_set_trace_state_variable_value, agent_tsv_read)
13584 (agent_mem_read_string, get_raw_reg_func_addr)
13585 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13586 * tracepoint.h: ... this new file.
13587
13588 2013-09-05 Pedro Alves <palves@redhat.com>
13589
13590 * server.h (perror_with_name, error, fatal, warning, paddress)
13591 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13592 include it.
13593 * utils.h: New file.
13594
13595 2013-09-05 Pedro Alves <palves@redhat.com>
13596
13597 * server.h (remote_debug, noack_mode, transport_is_reliable)
13598 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13599 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13600 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13601 (write_enn, initialize_async_io, enable_async_io)
13602 (disable_async_io, check_remote_input_interrupt_request)
13603 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13604 (dead_thread_notify, prepare_resume_reply)
13605 (decode_address_to_semicolon, decode_address, decode_m_packet)
13606 (decode_M_packet, decode_X_packet, decode_xfer_write)
13607 (decode_search_memory_packet, unhexify, hexify)
13608 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13609 (look_up_one_symbol, relocate_instruction)
13610 (monitor_output): Move to remote-utils.h, and include it.
13611 * remote-utils.h: New file.
13612
13613 2013-09-05 Pedro Alves <palves@redhat.com>
13614
13615 * server.h (_): Delete.
13616
13617 2013-09-02 Pedro Alves <palves@redhat.com>
13618
13619 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13620 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13621 allocated.
13622 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13623
13624 2013-09-02 Pierre Muller <muller@sourceware.org>
13625
13626 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13627 or WriteProcessMemory complete successfully and handle
13628 ERROR_PARTIAL_COPY error.
13629
13630 2013-09-02 Pedro Alves <palves@redhat.com>
13631
13632 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13633 error instead of EIO.
13634
13635 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13636
13637 PR server/15604
13638 * linux-low.c: Include filestuff.h.
13639 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13640 * lynx-low.c: Include filestuff.h.
13641 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13642 * server.c: Include filestuff.h.
13643 (main): Call notice_open_fds.
13644 * spu-low.c: Include filestuff.h.
13645 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13646
13647 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13648
13649 * Makefile.in: Explain why ../target and ../nat are not
13650 listed as include file search paths.
13651 (linux-waitpid.o): New object file rule.
13652 * configure.srv (srv_native_linux_obj): New variable.
13653 Replace all occurrences of linux native object files with
13654 $srv_native_linux_obj.
13655 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13656 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13657 (linux_enable_event_reporting): Remove declaration.
13658 (my_waitpid): Moved to common/linux-waitpid.c.
13659 (linux_wait_for_event): Pass ptid when calling
13660 linux_enable_event_reporting.
13661 (linux_supports_tracefork_flag): Remove.
13662 (linux_enable_event_reporting): Likewise.
13663 (linux_tracefork_grandchild): Remove.
13664 (STACK_SIZE): Moved to common/linux-ptrace.c.
13665 (linux_tracefork_child): Remove.
13666 (linux_test_for_tracefork): Remove.
13667 (linux_look_up_symbols): Call linux_supports_traceclone.
13668 (initialize_low): Remove call to linux_test_for_tracefork.
13669 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13670 common/linux-ptrace.h.
13671 (PTRACE_TYPE_ARG4): Likewise.
13672 Include linux-ptrace.h.
13673
13674 2013-08-21 Pedro Alves <palves@redhat.com>
13675
13676 * config.in: Renegerate.
13677
13678 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13679
13680 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13681 (SFILES): Remove $(srcdir)/common/target-common.c and
13682 add $(srcdir)/target/waitstatus.c.
13683 (OBS): Remove target-common.o and add waitstatus.o.
13684 (server_h): Remove $(srcdir)/../common/target-common.h and
13685 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13686 and $(srcdir)/../target/waitstatus.h.
13687 (target-common.o): Remove.
13688 (waitstatus.o): New target object file.
13689 * target.h: Do not include target-common.h and
13690 include target/resume.h, target/wait.h and
13691 target/waitstatus.h.
13692
13693 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13694
13695 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13696 to PTRACE_TYPE_ARG3.
13697 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13698 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13699 PTRACE_TYPE_ARG4.
13700 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13701 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13702
13703 2013-07-27 Jie Zhang <jie@codesourcery.com>
13704 Daniel Jacobowitz <dan@codesourcery.com>
13705 Yao Qi <yao@codesourcery.com>
13706
13707 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13708 (mips-linux-watch.o): New rule.
13709 (mips_linux_watch_h): New variable.
13710 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13711 srv_tgtobj.
13712 * linux-mips-low.c: Include mips-linux-watch.h.
13713 (struct arch_process_info, struct arch_lwp_info): New.
13714 (update_watch_registers_callback): New function.
13715 (mips_linux_new_process, mips_linux_new_thread) New functions.
13716 (mips_linux_prepare_to_resume, mips_insert_point): New
13717 functions.
13718 (mips_remove_point, mips_stopped_by_watchpoint): New
13719 functions.
13720 (rsp_bp_type_to_target_hw_bp_type): New function.
13721 (mips_stopped_data_address): New function.
13722 (the_low_target): Add watchpoint support functions.
13723
13724 2013-07-27 Yao Qi <yao@codesourcery.com>
13725
13726 * i386-low.c: Include break-common.h.
13727 (enum target_hw_bp_type): Remove.
13728
13729 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13730
13731 * Makefile.in (SFILES): /common/target-common.c.
13732 (OBS): Add target-common.o.
13733 (server_h): Add $(srcdir)/../common/target-common.h.
13734 (target-common.o): New target.
13735 * server.c (queue_stop_reply_callback): Free
13736 status string after use.
13737 * target.c (target_waitstatus_to_string): Remove.
13738 * target.h: Include target-common.h.
13739 (resume_kind): Likewise.
13740 (target_waitkind): Likewise.
13741 (target_waitstatus): Likewise.
13742 (TARGET_WNOHANG): Likewise.
13743
13744 2013-07-04 Yao Qi <yao@codesourcery.com>
13745
13746 * Makefile.in (host_alias): Use @host_noncanonical@.
13747 (target_alias): Use @target_noncanonical@.
13748 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13749 ACX_NONCANONICAL_HOST.
13750 * configure: Regenerated.
13751
13752 Revert:
13753 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13754
13755 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13756 * configure: Rebuild.
13757 * Makefile.in (version_host, version_target): Get from configure.
13758 (version.c): Use $(version_host) and $(version_target).
13759
13760 2013-07-03 Pedro Alves <palves@redhat.com>
13761
13762 * Makefile.in (config.status): Depend on development.sh.
13763 * acinclude.m4: Include libmcheck.m4.
13764 * configure: Regenerate.
13765
13766 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13767
13768 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13769 attribute inside the parentheses.
13770 (winapi_DebugSetProcessKillOnExit): Ditto.
13771 (winapi_DebugBreakProcess): Ditto.
13772 (winapi_GenerateConsoleCtrlEvent): Ditto.
13773
13774 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13775
13776 * notif.h (notif_event): Add a dummy member to avoid compiler
13777 errors.
13778
13779 2013-07-01 Pedro Alves <palves@redhat.com>
13780
13781 * hostio.c (HOSTIO_PATH_MAX): Define.
13782 (require_filename, handle_open, handle_unlink, handle_readlink):
13783 Use it.
13784
13785 2013-07-01 Pedro Alves <palves@redhat.com>
13786
13787 * server.h: Include "pathmax.h".
13788 * linux-low.c: Don't include sys/param.h.
13789 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13790 MAXPATHLEN.
13791 * win32-low.c: Don't include sys/param.h.
13792 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13793
13794 2013-07-01 Pedro Alves <palves@redhat.com>
13795
13796 * event-loop.c: Don't check HAVE_UNISTD_H before including
13797 <unistd.h>.
13798 * gdbreplay.c: Likewise.
13799 * remote-utils.c: Likewise.
13800 * server.c: Likewise.
13801 * configure.ac: Don't check for unistd.h.
13802 * configure: Regenerate.
13803
13804 2013-06-28 Tom Tromey <tromey@redhat.com>
13805
13806 * Makefile.in (version.c): Use version.in, not
13807 common/version.in.
13808
13809 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13810
13811 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13812 * configure: Rebuild.
13813 * Makefile.in (version_host, version_target): Get from configure.
13814 (version.c): Use $(version_host) and $(version_target).
13815
13816 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13817
13818 Fix trace-status to output user name without trailing colon.
13819 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13820
13821 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13822
13823 Fix trace-status to output proper start-time and stop-time.
13824 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13825 output start time and stop time in hex as gdb expects.
13826
13827 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13828
13829 * tracepoint.c (build_traceframe_info_xml): Output trace state
13830 variables present in the trace buffer.
13831
13832 2013-06-24 Tom Tromey <tromey@redhat.com>
13833
13834 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13835 create-version.sh.
13836 (version.o): Remove.
13837 * gdbreplay.c: Include version.h.
13838 (version, host_name): Don't declare.
13839 * server.h: Include version.h.
13840 (version, host_name): Don't declare.
13841
13842 2013-06-12 Pedro Alves <palves@redhat.com>
13843
13844 * linux-x86-low.c (linux_is_elf64): Delete global.
13845 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13846 with local linux_pid_exe_is_elf_64_file use.
13847
13848 2013-06-11 Pedro Alves <palves@redhat.com>
13849
13850 * linux-low.c (regset_disabled, disable_regset): New functions.
13851 (regsets_fetch_inferior_registers)
13852 (regsets_store_inferior_registers): Use them.
13853 (initialize_regsets_info); Don't allocate the disabled_regsets
13854 array here.
13855 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13856 comment.
13857
13858 2013-06-11 Pedro Alves <palves@redhat.com>
13859
13860 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13861 xmalloc.
13862
13863 2013-06-11 Pedro Alves <palves@redhat.com>
13864
13865 * linux-x86-low.c (initialize_low_arch): Call
13866 init_registers_x32_avx_linux.
13867
13868 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13869
13870 Fix compatibility with Android Bionic.
13871 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13872 it is not empty.
13873
13874 2013-06-07 Pedro Alves <palves@redhat.com>
13875
13876 PR server/14823
13877 * Makefile.in (OBS): Add tdesc.o.
13878 (IPA_OBJS): Add tdesc-ipa.o.
13879 (tdesc-ipa.o): New rule.
13880 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13881 interface.
13882 * linux-low.c (new_inferior): Delete.
13883 (disabled_regsets, num_regsets): Delete.
13884 (linux_add_process): Adjust to set the new per-process
13885 new_inferior flag.
13886 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13887 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13888 was a stop. When calling arch_setup, switch the current inferior
13889 to the thread that got an event.
13890 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13891 (regsets_fetch_inferior_registers)
13892 (regsets_store_inferior_registers): New regsets_info parameter.
13893 Adjust to use it.
13894 (linux_register_in_regsets): New regs_info parameter. Adjust to
13895 use it.
13896 (register_addr, fetch_register, store_register): New usrregs_info
13897 parameter. Adjust to use it.
13898 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13899 parameter regs_info. Adjust to use it.
13900 (linux_fetch_registers): Get the current inferior's regs_info, and
13901 adjust to use it.
13902 (linux_store_registers): Ditto.
13903 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13904 (initialize_low): Don't initialize the target_regsets here. Call
13905 initialize_low_arch.
13906 * linux-low.h (target_regsets): Delete declaration.
13907 (struct regsets_info): New.
13908 (struct usrregs_info): New.
13909 (struct regs_info): New.
13910 (struct process_info_private) <new_inferior>: New field.
13911 (struct linux_target_ops): Delete the num_regs, regmap, and
13912 regset_bitmap fields. New field regs_info.
13913 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13914 * i387-fp.c (num_xmm_registers): Delete.
13915 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13916 calls to new interface.
13917 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13918 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13919 Infer the number of xmm registers from the regcache's target
13920 description.
13921 * i387-fp.h (num_xmm_registers): Delete.
13922 * inferiors.c (add_thread): Don't install the thread's regcache
13923 here.
13924 * proc-service.c (gregset_info): Fetch the current inferior's
13925 regs_info. Adjust to use it.
13926 * regcache.c: Include tdesc.h.
13927 (register_bytes, reg_defs, num_registers)
13928 (gdbserver_expedite_regs): Delete.
13929 (get_thread_regcache): If the thread doesn't have a regcache yet,
13930 create one, instead of aborting gdbserver.
13931 (regcache_invalidate_one): Rename to ...
13932 (regcache_invalidate_thread): ... this.
13933 (regcache_invalidate_one): New.
13934 (regcache_invalidate): Only invalidate registers of the current
13935 process.
13936 (init_register_cache): Add target_desc parameter, and use it.
13937 (new_register_cache): Ditto. Assert the target description has a
13938 non zero registers_size.
13939 (regcache_cpy): Add assertions. Adjust.
13940 (realloc_register_cache, set_register_cache): Delete.
13941 (registers_to_string, registers_from_string): Adjust.
13942 (find_register_by_name, find_regno, find_register_by_number)
13943 (register_cache_size): Add target_desc parameter, and use it.
13944 (free_register_cache_thread, free_register_cache_thread_one)
13945 (regcache_release, register_cache_size): New.
13946 (register_size): Add target_desc parameter, and use it.
13947 (register_data, supply_register, supply_register_zeroed)
13948 (supply_regblock, supply_register_by_name, collect_register)
13949 (collect_register_as_string, collect_register_by_name): Adjust.
13950 * regcache.h (struct target_desc): Forward declare.
13951 (struct regcache) <tdesc>: New field.
13952 (init_register_cache, new_register_cache): Add target_desc
13953 parameter.
13954 (regcache_invalidate_thread): Declare.
13955 (regcache_invalidate_one): Delete declaration.
13956 (regcache_release): Declare.
13957 (find_register_by_number, register_cache_size, register_size)
13958 (find_regno): Add target_desc parameter.
13959 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13960 declarations.
13961 * remote-utils.c: Include tdesc.h.
13962 (outreg, prepare_resume_reply): Adjust.
13963 * server.c: Include tdesc.h.
13964 (gdbserver_xmltarget): Delete declaration.
13965 (get_features_xml, process_serial_event): Adjust.
13966 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13967 declare.
13968 (struct process_info) <tdesc>: New field.
13969 (ipa_tdesc): Declare.
13970 * tdesc.c: New file.
13971 * tdesc.h: New file.
13972 * tracepoint.c: Include tdesc.h.
13973 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13974 (get_context_regcache): Adjust to pass ipa_tdesc down.
13975 (do_action_at_tracepoint): Adjust to get the register cache size
13976 from the context regcache's description.
13977 (traceframe_walk_blocks): Adjust to get the register cache size
13978 from the current trace frame's description.
13979 (traceframe_get_pc): Adjust to get current trace frame's
13980 description and pass it down.
13981 (gdb_collect): Adjust to get the register cache size from the
13982 IPA's description.
13983 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13984 (gdbserver_xmltarget): Delete.
13985 (initialize_low_tracepoint): Set the ipa's target description.
13986 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13987 (initialize_low_tracepoint): Set the ipa's target description.
13988 * linux-x86-low.c: Include tdesc.h.
13989 [__x86_64__] (is_64bit_tdesc): New.
13990 (ps_get_thread_area, x86_get_thread_area): Use it.
13991 (i386_cannot_store_register): Rename to ...
13992 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13993 (i386_cannot_fetch_register): Rename to ...
13994 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13995 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13996 to new interface.
13997 (target_regsets): Rename to ...
13998 (x86_regsets): ... this.
13999 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14000 interface.
14001 (x86_siginfo_fixup): Use is_64bit_tdesc.
14002 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14003 (tdesc_x32_avx_linux, tdesc_x32_linux)
14004 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14005 Declare.
14006 (x86_linux_update_xmltarget): Delete.
14007 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14008 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14009 (AMD64_LINUX_USER64_CS): New.
14010 (x86_linux_read_description): New, based on
14011 x86_linux_update_xmltarget.
14012 (same_process_callback): New.
14013 (x86_arch_setup_process_callback): New.
14014 (x86_linux_update_xmltarget): New.
14015 (x86_regsets_info): New.
14016 (amd64_linux_regs_info): New.
14017 (i386_linux_usrregs_info): New.
14018 (i386_linux_regs_info): New.
14019 (x86_linux_regs_info): New.
14020 (x86_arch_setup): Reimplement.
14021 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14022 (x86_emit_ops): Ditto.
14023 (the_low_target): Adjust. Install x86_linux_regs_info,
14024 x86_cannot_fetch_register, and x86_cannot_store_register.
14025 (initialize_low_arch): New.
14026 * linux-ia64-low.c (tdesc_ia64): Declare.
14027 (ia64_fetch_register): Adjust.
14028 (ia64_usrregs_info, regs_info): New globals.
14029 (ia64_regs_info): New function.
14030 (the_low_target): Adjust.
14031 (initialize_low_arch): New function.
14032 * linux-sparc-low.c (tdesc_sparc64): Declare.
14033 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14034 Adjust.
14035 (sparc_arch_setup): New function.
14036 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14037 (the_low_target): Adjust.
14038 (initialize_low_arch): New function.
14039 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14040 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14041 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14042 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14043 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14044 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14045 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14046 (tdesc_powerpc_isa205_vsx64l): Declare.
14047 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14048 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14049 (ppc_set_pc, ppc_get_hwcap): Adjust.
14050 (ppc_usrregs_info): Forward declare.
14051 (!__powerpc64__) ppc_regmap_adjusted: New global.
14052 (ppc_arch_setup): Adjust to the current process'es target
14053 description.
14054 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14055 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14056 (ppc_store_evrregset): Adjust.
14057 (target_regsets): Rename to ...
14058 (ppc_regsets): ... this, and make static.
14059 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14060 (ppc_regs_info): New function.
14061 (the_low_target): Adjust.
14062 (initialize_low_arch): New function.
14063 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14064 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14065 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14066 (tdesc_s390x_linux64v2): Declare.
14067 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14068 (s390_fill_gregset, s390_store_last_break): Adjust.
14069 (target_regsets): Rename to ...
14070 (s390_regsets): ... this, and make static.
14071 (s390_get_pc, s390_set_pc): Adjust.
14072 (s390_get_hwcap): New target_desc parameter, and use it.
14073 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14074 (s390_arch_setup): Adjust to set the current process'es target
14075 description. Don't adjust the regmap.
14076 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14077 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14078 (regs_info_3264): New globals.
14079 (s390_regs_info): New function.
14080 (the_low_target): Adjust.
14081 (initialize_low_arch): New function.
14082 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14083 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14084 [__mips64] (init_registers_mips_linux)
14085 (init_registers_mips_dsp_linux): Delete defines.
14086 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14087 (have_dsp): New global.
14088 (mips_read_description): New, based on mips_arch_setup.
14089 (mips_arch_setup): Reimplement.
14090 (get_usrregs_info): New function.
14091 (mips_cannot_fetch_register, mips_cannot_store_register)
14092 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14093 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14094 (target_regsets): Rename to ...
14095 (mips_regsets): ... this, and make static.
14096 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14097 (dsp_regs_info, regs_info): New globals.
14098 (mips_regs_info): New function.
14099 (the_low_target): Adjust.
14100 (initialize_low_arch): New function.
14101 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14102 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14103 Declare.
14104 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14105 (arm_read_description): New, with bits factored from
14106 arm_arch_setup.
14107 (arm_arch_setup): Reimplement.
14108 (target_regsets): Rename to ...
14109 (arm_regsets): ... this, and make static.
14110 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14111 (arm_regs_info): New function.
14112 (the_low_target): Adjust.
14113 (initialize_low_arch): New function.
14114 * linux-m68k-low.c (tdesc_m68k): Declare.
14115 (target_regsets): Rename to ...
14116 (m68k_regsets): ... this, and make static.
14117 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14118 (m68k_regs_info): New function.
14119 (m68k_arch_setup): New function.
14120 (the_low_target): Adjust.
14121 (initialize_low_arch): New function.
14122 * linux-sh-low.c (tdesc_sharch): Declare.
14123 (target_regsets): Rename to ...
14124 (sh_regsets): ... this, and make static.
14125 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14126 (sh_regs_info, sh_arch_setup): New functions.
14127 (the_low_target): Adjust.
14128 (initialize_low_arch): New function.
14129 * linux-bfin-low.c (tdesc_bfin): Declare.
14130 (bfin_arch_setup): New function.
14131 (bfin_usrregs_info, regs_info): New globals.
14132 (bfin_regs_info): New function.
14133 (the_low_target): Adjust.
14134 (initialize_low_arch): New function.
14135 * linux-cris-low.c (tdesc_cris): Declare.
14136 (cris_arch_setup): New function.
14137 (cris_usrregs_info, regs_info): New globals.
14138 (cris_regs_info): New function.
14139 (the_low_target): Adjust.
14140 (initialize_low_arch): New function.
14141 * linux-cris-low.c (tdesc_crisv32): Declare.
14142 (cris_arch_setup): New function.
14143 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14144 (cris_regs_info): New function.
14145 (the_low_target): Adjust.
14146 (initialize_low_arch): New function.
14147 * linux-m32r-low.c (tdesc_m32r): Declare.
14148 (m32r_arch_setup): New function.
14149 (m32r_usrregs_info, regs_info): New globals.
14150 (m32r_regs_info): Adjust.
14151 (initialize_low_arch): New function.
14152 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14153 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14154 (tic6x_usrregs_info): Forward declare.
14155 (tic6x_read_description): New function, based on ...
14156 (tic6x_arch_setup): ... this. Reimplement.
14157 (target_regsets): Rename to ...
14158 (tic6x_regsets): ... this, and make static.
14159 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14160 (tic6x_regs_info): New function.
14161 (the_low_target): Adjust.
14162 (initialize_low_arch): New function.
14163 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14164 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14165 (target_regsets): Rename to ...
14166 (xtensa_regsets): ... this, and make static.
14167 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14168 globals.
14169 (xtensa_arch_setup, xtensa_regs_info): New functions.
14170 (the_low_target): Adjust.
14171 (initialize_low_arch): New function.
14172 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14173 (nios2_arch_setup): Set the current process'es tdesc.
14174 (target_regsets): Rename to ...
14175 (nios2_regsets): ... this.
14176 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14177 (nios2_regs_info): New function.
14178 (the_low_target): Adjust.
14179 (initialize_low_arch): New function.
14180 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14181 (aarch64_arch_setup): Set the current process'es tdesc.
14182 (target_regsets): Rename to ...
14183 (aarch64_regsets): ... this.
14184 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14185 (aarch64_regs_info): New function.
14186 (the_low_target): Adjust.
14187 (initialize_low_arch): New function.
14188 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14189 globals.
14190 (target_regsets): Rename to ...
14191 (tile_regsets): ... this.
14192 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14193 (tile_regs_info): New function.
14194 (tile_arch_setup): Set the current process'es tdesc.
14195 (the_low_target): Adjust.
14196 (initialize_low_arch): New function.
14197 * spu-low.c (tdesc_spu): Declare.
14198 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14199 * win32-arm-low.c (tdesc_arm): Declare.
14200 (arm_arch_setup): New function.
14201 (the_low_target): Install arm_arch_setup instead of
14202 init_registers_arm.
14203 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14204 (init_windows_x86): Rename to ...
14205 (i386_arch_setup): ... this. Set `win32_tdesc'.
14206 (the_low_target): Adjust.
14207 * win32-low.c (win32_tdesc): New global.
14208 (child_add_thread): Don't create the thread cache here.
14209 (do_initial_child_stuff): Set the new process'es tdesc.
14210 * win32-low.h (struct target_desc): Forward declare.
14211 (win32_tdesc): Declare.
14212 * lynx-i386-low.c (tdesc_i386): Declare global.
14213 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14214 * lynx-low.c (lynx_tdesc): New global.
14215 (lynx_add_process): Set the new process'es tdesc.
14216 * lynx-low.h (struct target_desc): Forward declare.
14217 (lynx_tdesc): Declare global.
14218 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14219 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14220 * nto-low.c (nto_tdesc): New global.
14221 (do_attach): Set the new process'es tdesc.
14222 * nto-low.h (struct target_desc): Forward declare.
14223 (nto_tdesc): Declare.
14224 * nto-x86-low.c (tdesc_i386): Declare.
14225 (nto_x86_arch_setup): Set `nto_tdesc'.
14226
14227 2013-06-04 Gary Benson <gbenson@redhat.com>
14228
14229 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14230 to qSupported response when appropriate.
14231 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14232 with nonzero-length annex.
14233 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14234 arguments supplied in annex.
14235
14236 2013-05-31 Doug Evans <dje@google.com>
14237
14238 PR server/15594
14239 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14240 64 bits in 64-cross-32 environment.
14241
14242 2013-05-28 Pedro Alves <palves@redhat.com>
14243
14244 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14245 (aarch64-without-fpu.c): Delete rule.
14246 * configure.srv (aarch64*-*-linux*): Remove references to
14247 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14248 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14249 declaration.
14250
14251 2013-05-24 Pedro Alves <palves@redhat.com>
14252
14253 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14254 instead of strchr/decode_address. Error if the range isn't split
14255 with a ','. Don't assume there's be a ':' in the action.
14256
14257 2013-05-23 Yao Qi <yao@codesourcery.com>
14258 Pedro Alves <palves@redhat.com>
14259
14260 * linux-low.c (lwp_in_step_range): New function.
14261 (linux_wait_1): If the thread was range stepping and stopped
14262 outside the stepping range, report the stop to GDB. Otherwise,
14263 continue stepping. Add range stepping debug output.
14264 (linux_set_resume_request): Copy the step range from the resume
14265 request to the lwp.
14266 (linux_supports_range_stepping): New.
14267 (linux_target_ops) <supports_range_stepping>: Set to
14268 linux_supports_range_stepping.
14269 * linux-low.h (struct linux_target_ops)
14270 <supports_range_stepping>: New field.
14271 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14272 * linux-x86-low.c (x86_supports_range_stepping): New.
14273 (the_low_target) <supports_range_stepping>: Set to
14274 x86_supports_range_stepping.
14275 * server.c (handle_v_cont): Handle 'r' action.
14276 (handle_v_requests): Append ";r" if the target supports range
14277 stepping.
14278 * target.h (struct thread_resume) <step_range_start,
14279 step_range_end>: New fields.
14280 (struct target_ops) <supports_range_stepping>:
14281 New field.
14282 (target_supports_range_stepping): New macro.
14283
14284 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14285
14286 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14287 confusion in comment.
14288
14289 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14290
14291 * lynx-low.c (struct process_info_private): New type.
14292 (lynx_add_process): New function.
14293 (lynx_create_inferior, lynx_attach): Replace calls to
14294 add_process by calls to lynx_add_process.
14295 (lynx_resume): If PTID is null, then try using
14296 current_process()->private->last_wait_event_ptid.
14297 Add comments.
14298 (lynx_clear_inferiors): Delete. The contents of that function
14299 has been inlined in lynx_mourn;
14300 (lynx_wait_1): Save the ptid in the process's private data.
14301 (lynx_mourn): Free the process' private data. Replace call
14302 to lynx_clear_inferiors by call to clear_inferiors.
14303
14304 2013-05-17 Yao Qi <yao@codesourcery.com>
14305
14306 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14307 the right place.
14308
14309 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14310
14311 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14312 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14313 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14314 PT_TEXT_END_ADDR guards. Update comments.
14315 (linux_target_op) <read_offsets>: Conditionally define to
14316 linux_read_offsets if the target is UCLIBC and if it defines
14317 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14318
14319 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14320 Andrew Jenner <andrew@codesourcery.com>
14321
14322 * Makefile.in (SFILES): Add linux-nios2-low.c.
14323 (clean): Add action to delete nios2-linux.c.
14324 (nios2-linux.c): New rule.
14325 * configure.srv: Add nios2*-*-linux*.
14326 * linux-nios2-low.c: New.
14327
14328 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14329
14330 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14331
14332 2013-04-25 Hui Zhu <hui@codesourcery.com>
14333
14334 PR gdb/15186
14335 * ax.c (ax_printf): Add fflush.
14336
14337 2013-04-22 Tom Tromey <tromey@redhat.com>
14338
14339 * Makefile.in (SFILES): Add filestuff.c.
14340 (OBS): Add filestuff.o.
14341 (filestuff.o): New target.
14342 * config.in, configure: Rebuild.
14343 * configure.ac: Check for fdwalk, pipe2.
14344
14345 2013-04-17 Pedro Alves <palves@redhat.com>
14346
14347 * configure.ac (USE_THREAD_DB): Delete variable.
14348 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14349 Don't AC_SUBST USE_THREAD_DB.
14350 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14351 * config.in, configure: Regenerate.
14352
14353 2013-04-16 Pedro Alves <palves@redhat.com>
14354
14355 * linux-low.h (struct lwp_info) <thread_known>: Move under
14356 the USE_THREAD_DB #ifdef.
14357
14358 2013-04-16 Pedro Alves <palves@redhat.com>
14359
14360 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14361 (linux-low.o): Delete rule.
14362 * linux-low.h: Always include "gdb_thread_db.h" instead of
14363 conditionally including thread_db.h.
14364 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14365 HAVE_THREAD_DB_H.
14366
14367 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14368
14369 * Makefile.in (install-only): Fix make install regression.
14370
14371 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14372
14373 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14374 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14375 installation.
14376 * gdbserver.1: Remove.
14377
14378 2013-03-22 Pedro Alves <palves@redhat.com>
14379
14380 * linux-low.c (handle_extended_wait): Don't call
14381 linux_enable_event_reporting.
14382
14383 2013-03-15 Tony Theodore <tonyt@logyst.com>
14384
14385 PR build/9098:
14386 * Makefile.in (SHELL): Use @SHELL@.
14387
14388 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14389
14390 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14391 compiler warning.
14392
14393 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14394
14395 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14396 Remove extraneous NULL element.
14397
14398 2013-03-13 Yao Qi <yao@codesourcery.com>
14399
14400 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14401 'V' block in trace frame.
14402
14403 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14404
14405 * target.h (struct target_ops): Add btrace ops.
14406 (target_supports_btrace): New macro.
14407 (target_enable_btrace): New macro.
14408 (target_disable_btrace): New macro.
14409 (target_read_btrace): New macro.
14410 * gdbthread.h (struct thread_info): Add btrace field.
14411 * server.c: Include btrace-common.h.
14412 (handle_btrace_general_set): New function.
14413 (handle_btrace_enable): New function.
14414 (handle_btrace_disable): New function.
14415 (handle_general_set): Call handle_btrace_general_set.
14416 (handle_qxfer_btrace): New function.
14417 (struct qxfer qxfer_packets[]): Add btrace entry.
14418 * inferiors.c (remove_thread): Disable btrace.
14419 * linux-low: Include linux-btrace.h.
14420 (linux_low_enable_btrace): New function.
14421 (linux_low_read_btrace): New function.
14422 (linux_target_ops): Add btrace ops.
14423 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14424 Add srv_linux_btrace=yes.
14425 (x86_64-*-linux*): Add linux-btrace.o.
14426 Add srv_linux_btrace=yes.
14427 * configure.ac: Define HAVE_LINUX_BTRACE.
14428 * config.in: Regenerated.
14429 * configure: Regenerated.
14430
14431 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14432
14433 * server.c (handle_qxfer): Preserve error message if -3 is
14434 returned.
14435 (qxfer): Document the -3 return value.
14436
14437 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14438
14439 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14440 (linux_btrace_h): New variable.
14441 (linux-btrace.o): New rule.
14442
14443 2013-03-08 Stan Shebs <stan@codesourcery.com>
14444 Hafiz Abid Qadeer <abidh@codesourcery.com>
14445
14446 * tracepoint.c (trace_buffer_size): New global.
14447 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14448 (init_trace_buffer): Change to one-argument function. Allocate
14449 trace buffer memory.
14450 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14451 handle QTBuffer:size packet.
14452 (cmd_bigqtbuffer_size): New function.
14453 (initialize_tracepoint): Call init_trace_buffer with
14454 DEFAULT_TRACE_BUFFER_SIZE.
14455 * server.c (handle_query): Add QTBuffer:size in the
14456 supported packets.
14457
14458 2013-03-07 Yao Qi <yao@codesourcery.com>
14459
14460 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14461 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14462 of -1.
14463 (cmd_qtsp): Adjust condition. Do post increment.
14464 Set cur_action and cur_step_action back to 0.
14465
14466 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14467
14468 PR server/15236
14469 * linux-low.c (linux_write_memory): Return early success if LEN is
14470 zero.
14471
14472 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14473
14474 * configure.srv: Add x86_64-*-cygwin* as target.
14475
14476 2013-02-28 Tom Tromey <tromey@redhat.com>
14477
14478 * configure.ac: Invoke AC_SYS_LARGEFILE.
14479 * configure, config.in: Rebuild.
14480
14481 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14482
14483 * win32-low.c: Throughout, fix format strings and casts of
14484 printf-like functions to avoid type related warnings on all
14485 platforms.
14486 (get_child_debug_event): Print dwDebugEventCode as hex since
14487 that's how it's usually documented.
14488
14489 2013-02-28 Yao Qi <yao@codesourcery.com>
14490
14491 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14492 pulongest.
14493
14494 2013-02-27 Jiong Wang <jiwang@tilera.com>
14495
14496 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14497 (reg-tilegx32.c): New rule.
14498 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14499 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14500 different register info initializer according to elf class.
14501 (init_registers_tilgx32): New function. The tilegx32 register info
14502 initializer.
14503 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14504 (tile_store_gregset): Likewise.
14505
14506 2013-02-27 Yao Qi <yao@codesourcery.com>
14507
14508 * server.c (process_point_options): Print debug message when
14509 debug_threads is true.
14510
14511 2013-02-26 Yao Qi <yao@codesourcery.com>
14512
14513 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14514
14515 2013-02-19 Pedro Alves <palves@redhat.com>
14516 Kai Tietz <ktietz@redhat.com>
14517
14518 PR gdb/15161
14519
14520 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14521 instead of strtoul to extract address from packet.
14522 (process_serial_event) <'z'>: Likewise.
14523
14524 2013-02-18 Yao Qi <yao@codesourcery.com>
14525
14526 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14527
14528 2013-02-14 Pedro Alves <palves@redhat.com>
14529
14530 Plug memory leak.
14531
14532 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14533 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14534
14535 2013-02-14 Pedro Alves <palves@redhat.com>
14536
14537 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14538
14539 2013-02-14 Pedro Alves <palves@redhat.com>
14540
14541 * tracepoint.c (save_string): Delete.
14542 (add_tracepoint_action): Use savestring instead of save_string.
14543
14544 2013-02-12 Pedro Alves <palves@redhat.com>
14545
14546 * linux-xtensa-low.c: Ditto.
14547 * xtensa-xtregs.c: Ditto.
14548
14549 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14550
14551 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14552 thread_db.
14553
14554 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14555
14556 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14557 aarch64_num_wp_regs and aarch64_num_bp_regs to
14558 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14559
14560 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14561
14562 * linux-aarch64-low.c (ps_get_thread_area): Replace
14563 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14564
14565 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14566 Marcus Shawcroft <marcus.shawcroft@arm.com>
14567 Nigel Stephens <nigel.stephens@arm.com>
14568 Yufeng Zhang <yufeng.zhang@arm.com>
14569
14570 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14571 (aarch64.c, aarch64-without-fpu.c): New targets.
14572 * configure.srv (aarch64*-*-linux*): New.
14573 * linux-aarch64-low.c: New file.
14574
14575 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14576
14577 * linux-low.c (handle_extended_wait, linux_create_inferior)
14578 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14579 (dequeue_one_deferred_signal, linux_resume_one_thread)
14580 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14581 (linux_tracefork_grandchild, linux_test_for_tracefork)
14582 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14583 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14584 where the argument is 0.
14585
14586 2013-01-25 Yao Qi <yao@codesourcery.com>
14587
14588 * event-loop.c: Include "queue.h".
14589 (gdb_event_p): New typedef.
14590 (struct gdb_event) <next_event>: Remove.
14591 (event_queue): Change to QUEUE(gdb_event_p).
14592 (async_queue_event): Remove.
14593 (gdb_event_xfree): New.
14594 (initialize_event_loop): New.
14595 (process_event): Use API from QUEUE.
14596 (wait_for_event): Likewise.
14597 * server.c (main): Call initialize_event_loop.
14598 * server.h (initialize_event_loop): Declare.
14599
14600 2013-01-18 Yao Qi <yao@codesourcery.com>
14601
14602 * ax.h (struct eval_agent_expr_context): New.
14603 (gdb_eval_agent_expr): Update declaration.
14604 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14605 TFRAME. Add new argument CTX.
14606 * server.h (struct eval_agent_expr_context): Declare.
14607 (agent_mem_read, agent_tsv_read): Update declaration.
14608 (agent_mem_read_string): Likewise.
14609 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14610 (add_traceframe_block): Add new argument TPOINT.
14611 Increase TPOINT->traceframe_usage.
14612 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14613 eval_tracepoint_agent_expr.
14614 (condition_true_at_tracepoint): Likewise.
14615 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14616 (agent_mem_read_string, agent_tsv_read): Likewise.
14617
14618 2013-01-16 Yao Qi <yao@codesourcery.com>
14619
14620 * linux-low.c (linux_resume_one_lwp): Don't check
14621 'lwp->bp_reinsert != 0'.
14622
14623 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14624 Pedro Alves <palves@redhat.com>
14625
14626 * lynx-low.c (ptrace_request_to_str): Define a temporary
14627 macro and use it to simplify this function's implementation.
14628
14629 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14630
14631 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14632 sets errno.
14633
14634 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14635
14636 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14637
14638 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14639
14640 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14641
14642 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14643
14644 * lynx-low.c (lynx_resume): Use the resume_info parameter
14645 to determine the ptid for the lynx_ptrace call, unless
14646 it is equal to minus_one_ptid, in which case we use the
14647 ptid of the current_inferior.
14648 (lynx_wait_1): After having received a thread create/exit
14649 event, resume the inferior's execution using the signaling
14650 thread's ptid, rather than the old ptid.
14651
14652 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14653
14654 * lynx-low.c (lynx_resume): Delete variable ret.
14655
14656 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14657
14658 * gdbreplay.c (gdbreplay_version): Update copyright year.
14659 * server.c (gdbserver_version): Likewise.
14660
14661 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14662
14663 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14664 new thread.
14665
14666 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14667
14668 * lynx-low.c (ptrace_request_to_str): Add handling for
14669 PTRACE_GETTRACESIG.
14670
14671 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14672
14673 * lynx-low.c (lynx_attach): Delete variable new_process.
14674
14675 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14676
14677 * lynx-low.c (lynx_create_inferior): Delete variable
14678 new_process.
14679
14680 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14681
14682 * lynx-low.c (ptrace_request_to_str): Do not handle
14683 PTRACE_GETTHREADLIST if this macro does not exist.
14684
14685 2012-12-15 Yao Qi <yao@codesourcery.com>
14686
14687 * Makefile.in (OBS): Add notif.o.
14688 * notif.c, notif.h: New.
14689 * server.c: Include "notif.h".
14690 (struct vstop_notif) <next>: Remove.
14691 <base>: New field.
14692 (queue_stop_reply): Update.
14693 (push_event, send_next_stop_reply): Remove.
14694 (discard_queued_stop_replies): Update.
14695 (notif_stop): New variable.
14696 (handle_v_stopped): Remove.
14697 (handle_v_requests): Don't call handle_v_stopped. Call
14698 handle_ack_notif instead.
14699 (queue_stop_reply_callback): Call notif_event_enque instead
14700 of queue_stop_reply.
14701 (handle_status): Don't call send_next_stop_reply, call
14702 notif_write_event instead.
14703 (kill_inferior_callback): Likewise.
14704 (detach_or_kill_inferior_callback): Likewise.
14705 (main): Call initialize_notif.
14706 (process_serial_event): Call QUEUE_is_empty.
14707 (handle_target_event): Call notif_push instead of push event.
14708 * server.h (push_event): Remove declaration.
14709
14710 2012-12-10 Tom Tromey <tromey@redhat.com>
14711
14712 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14713 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14714 macros.
14715 (.c.o): Rewrite.
14716 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14717 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14718 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14719 (amd64-linux-ipa.o, ax.o): Rewrite.
14720 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14721 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14722 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14723 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14724 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14725 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14726 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14727 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14728 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14729 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14730 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14731 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14732 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14733 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14734 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14735 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14736 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14737 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14738 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14739 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14740 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14741 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14742 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14743 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14744 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14745 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14746 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14747 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14748 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14749 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14750 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14751 (reg-tilegx.o): Remove.
14752 (all_object_files): New macro.
14753 Include .deps files.
14754 * aclocal.m4, configure: Rebuild.
14755 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14756 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14757 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14758
14759 2012-12-05 Tom Tromey <tromey@redhat.com>
14760
14761 PR gdb/14917:
14762 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14763
14764 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14765
14766 * configure.ac: Check for linux/perf_event.h.
14767 * config.in: Regenerated.
14768 * configure: Regenerated.
14769
14770 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14771
14772 * hostio.c (handle_readlink): Decrease buffer size
14773 parameter passed to readlink by one byte.
14774
14775 2012-11-26 Yao Qi <yao@codesourcery.com>
14776
14777 * configure.ac (build_warnings): Append '-Wempty-body'.
14778 * configure: Regenerated.
14779 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14780 body.
14781
14782 2012-11-15 Pierre Muller <muller@sourceware.org>
14783
14784 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14785 * config.in: Regenerate.
14786 * configure: Regenerate.
14787 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14788 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14789 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14790 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14791 header.
14792 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14793 instead of <sys/wait.h> header.
14794 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14795
14796 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14797
14798 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14799 (various make rules): Remove -DGDBSERVER
14800
14801 2012-11-09 Yao Qi <yao@codesourcery.com>
14802
14803 * spu-low.c (current_ptid): Move it to ..
14804 * gdbthread.h: ... here. New.
14805 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14806 * server.c (myresume, process_serial_event): Likewise.
14807 * thread-db.c (thread_db_find_new_threads): Likewise.
14808 * tracepoint.c (run_inferior_command): Likewise.
14809
14810 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14811
14812 * server.c (handle_search_memory_1): Include access length in
14813 warning message.
14814
14815 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14816
14817 * linux-crisv32-low.c: Fix compile errors.
14818
14819 2012-09-04 Yao Qi <yao@codesourcery.com>
14820
14821 * tracepoint.c (cmd_qtsv): Adjust debug message.
14822 Don't check CUR_TPOINT.
14823
14824 2012-08-28 Yao Qi <yao@codesourcery.com>
14825
14826 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14827 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14828 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14829 Remove declarations of xmalloc, xreallloc, xstrdup and
14830 freeargv.
14831 * Makefile.in (libiberty_h): New.
14832 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14833 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14834
14835 2012-08-23 Yao Qi <yao@codesourcery.com>
14836
14837 * server.h: Remove declaration of 'xsnprintf'.
14838
14839 2012-08-22 Keith Seitz <keiths@redhat.com>
14840
14841 * server.h: Include build-gnulib-gbserver/config.h.
14842 * gdbreplay.c: Likewise.
14843
14844 2012-08-08 Doug Evans <dje@google.com>
14845
14846 * Makefile.in (SFILES): Add gdb_vecs.c.
14847 (OBS): Add gdb_vecs.o.
14848 (gdb_vecs_h, host_defs_h): New variables.
14849 (thread-db.o): Add $(gdb_vecs_h) dependency.
14850 (gdb_vecs.o): New rule.
14851 * thread-db.c: #include "gdb_vecs.h".
14852 (thread_db_load_search): Use a vector to iterate over path elements.
14853 Handle text appearing after "$pdir".
14854
14855 * configure.ac: Add check for strstr.
14856 * config.in: Regenerate.
14857 * configure: Regenerate.
14858
14859 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14860
14861 * hostio.c (handle_pread): If pread fails, fall back to attempting
14862 lseek/read.
14863 (handle_pwrite): Likewise for pwrite.
14864
14865 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14866
14867 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14868 between unsupported TYPE and unimplementable ADDR/LEN combination.
14869 (arm_insert_point): Act on new return value.
14870
14871 2012-07-31 Pedro Alves <palves@redhat.com>
14872
14873 * server.c (process_point_options): Only skip tokens if we find
14874 one that is unrecognized. Don't treat 'X' specially while
14875 skipping unrecognized tokens.
14876
14877 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14878
14879 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14880 to 4-byte-align HW breakpoint addresses for Thumb.
14881
14882 2012-07-27 Yao Qi <yao@codesourcery.com>
14883
14884 PR remote/14161.
14885
14886 * server.h: Declare gdb_agent_about_to_close.
14887 * target.c (kill_inferior): Include "agent.h".
14888 New. Send command 'kill'.
14889 * target.h (kill_inferior): Removed macro.
14890 * tracepoint.c (gdb_agent_about_to_close): New.
14891 (gdb_agent_helper_thread): Handle command 'close'.
14892 Wait endlessly until the inferior stops.
14893 Install gdb_agent_remove_socket to atexit hook.
14894 (agent_socket_name): New static variable.
14895 (gdb_agent_socket_init): Replace local variable 'name' with
14896 'agent_socket_name'.
14897 (gdb_agent_remove_socket): New.
14898
14899 2012-07-27 Yao Qi <yao@codesourcery.com>
14900
14901 * server.c (process_point_options): Stop at 'X' when parsing.
14902
14903 2012-07-19 Michael Eager <eager@eagercon.com>
14904
14905 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14906 to hw_execute.
14907 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14908 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14909 hardware breakpoint.
14910
14911 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14912
14913 * gdbserver/linux-low.c (initialize_low): Call
14914 linux_ptrace_init_warnings.
14915
14916 2012-07-02 Doug Evans <dje@google.com>
14917
14918 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14919 pointer to int.
14920
14921 2012-07-02 Stan Shebs <stan@codesourcery.com>
14922
14923 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14924 (ax.o): Add it to build rule.
14925 (ax-ipa.o): Ditto.
14926 (OBS): Add format.o.
14927 (IPA_OBS): Add format.o.
14928 * server.c (handle_query): Claim support for breakpoint commands.
14929 (process_point_options): Add command case.
14930 (process_serial_event): Leave running if there are printfs in
14931 effect.
14932 * mem-break.h (any_persistent_commands): Declare.
14933 (add_breakpoint_commands): Declare.
14934 (gdb_no_commands_at_breakpoint): Declare.
14935 (run_breakpoint_commands): Declare.
14936 * mem-break.c (struct point_command_list): New struct.
14937 (struct breakpoint): New field command_list.
14938 (any_persistent_commands): New function.
14939 (add_commands_to_breakpoint): New function.
14940 (add_breakpoint_commands): New function.
14941 (gdb_no_commands_at_breakpoint): New function.
14942 (run_breakpoint_commands): New function.
14943 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14944 locally.
14945 * ax.c: Include format.h.
14946 (ax_printf): New function.
14947 (gdb_eval_agent_expr): Add printf opcode.
14948
14949 2012-06-13 Yao Qi <yao@codesourcery.com>
14950
14951 * server.c (start_inferior): Remove duplicated writes to fields
14952 'last_resume_kind' and 'last_status' of 'current_inferior'.
14953
14954 2012-06-12 Yao Qi <yao@codesourcery.com>
14955 Pedro Alves <palves@redhat.com>
14956
14957 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14958 comment.
14959 * server.c (handle_v_cont): Extend comment.
14960
14961 2012-06-11 Yao Qi <yao@codesourcery.com>
14962
14963 * linux-low.c (linux_attach): Add 'static'.
14964
14965 2012-06-06 Yao Qi <yao@codesourcery.com>
14966
14967 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14968
14969 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14970
14971 Fix gcc -flto compilation warning.
14972 * server.c (main): Make variable multi_mode and attach volatile.
14973
14974 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14975
14976 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14977 if the platform doesn't know about it.
14978
14979 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14980
14981 * Makefile.in (SFILES): Add linux-tile-low.c.
14982 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14983 * configure.srv: Handle tilegx-*-linux*.
14984 * linux-tile-low.c: New file.
14985
14986 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14987
14988 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14989
14990 2012-05-24 Pedro Alves <palves@redhat.com>
14991
14992 PR gdb/7205
14993
14994 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14995
14996 2012-05-24 Pedro Alves <palves@redhat.com>
14997
14998 PR gdb/7205
14999
15000 Replace target_signal with gdb_signal throughout.
15001
15002 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15003
15004 * linux-low.c (linux_store_registers): Avoid the copying sequence
15005 when no data has been retrieved by ptrace.
15006
15007 2012-05-22 Will Deacon <will.deacon@arm.com>
15008
15009 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15010 Include asm/ptrace.h.
15011 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15012 already defined.
15013
15014 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15015
15016 * linux-low.c (linux_store_registers): Don't re-retrieve data
15017 with ptrace that has already been obtained from /proc. Always
15018 copy any data retrieved with ptrace to the buffer supplied.
15019
15020 2012-05-11 Yao Qi <yao@codesourcery.com>
15021 Pedro Alves <palves@redhat.com>
15022
15023 * linux-low.c (enum stopping_threads_kind): New.
15024 (stopping_threads): Change type to `enum stopping_threads_kind'.
15025 (handle_extended_wait): If stopping and suspending threads, leave
15026 the new_lwp suspended too.
15027 (linux_wait_for_event): Adjust.
15028 (stop_all_lwps): Set `stopping_threads' to
15029 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15030 whether we're suspending threads or just stopping them. Assert no
15031 recursion happens.
15032
15033 2012-04-29 Yao Qi <yao@codesourcery.com>
15034
15035 * server.h: Move some code to ...
15036 * gdbthread.h: ... here. New.
15037 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15038 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15039 (nto-low.o, win32-low.o): Likewise.
15040 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15041 * regcache.c, remote-utils.c, server.c: Likewise.
15042 * target.c, tracepoint.c, win32-low.c: Likewise.
15043
15044 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15045
15046 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15047 (PTRACE_ARG4_TYPE): Likewise.
15048 (PTRACE_XFER_TYPE): Likewise.
15049 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15050 ptrace to PTRACE_ARG3_TYPE.
15051 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15052 (PTRACE_ARG4_TYPE): Likewise.
15053 (PTRACE_XFER_TYPE): Likewise.
15054 (linux_detach_one_lwp): Cast fourth argument of
15055 ptrace to long then PTRACE_ARG4_TYPE.
15056 (regsets_fetch_inferior_registers): Cast third argument of
15057 ptrace to long then PTRACE_ARG3_TYPE.
15058 (regsets_store_inferior_registers): Likewise.
15059
15060 2012-04-20 Pedro Alves <palves@redhat.com>
15061
15062 * configure: Regenerate.
15063
15064 2012-04-19 Pedro Alves <palves@redhat.com>
15065
15066 * Makefile.in (GNULIB_BUILDDIR): New.
15067 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15068 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15069 (all, install-only, uninstall, clean-info, all-lib, clean): No
15070 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15071 (maintainer-clean realclean distclean): Use subdir_do.
15072 (subdir_do): New.
15073 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15074 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15075 * acinclude.m4: Include acx_configure_dir.m4.
15076 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15077 calls. Call AC_PROG_RANLIB. Configure gnulib using
15078 ACX_CONFIGURE_DIR.
15079 (GNULIB): New.
15080 (GNULIB_STDINT_H): Adjust.
15081 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15082 * gdbreplay.c: Include build-gnulib/config.h.
15083 * server.h: Likewise.
15084 * aclocal.m4: Regenerate.
15085 * config.in: Regenerate.
15086 * configure: Regenerate.
15087
15088 2012-04-19 Pedro Alves <palves@redhat.com>
15089
15090 * Makefile.in (LIBGNU, INCGNU): Adjust.
15091 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15092 (all, install-only, uninstall, clean-info, all-lib, clean)
15093 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15094 * configure.ac: Adjust AC_OUTPUT output.
15095 * aclocal.m4: Regenerate.
15096 * configure: Regenerate.
15097
15098 2012-04-19 Pedro Alves <palves@redhat.com>
15099
15100 * Makefile.in (generated_files): New.
15101 (server_h): Remove the explicit dependency on config.h, and depend
15102 on $generated_files.
15103
15104 2012-04-19 Pedro Alves <palves@redhat.com>
15105
15106 * Makefile.in (INCGNU): Add -Ignulib.
15107
15108 2012-04-19 Pedro Alves <palves@redhat.com>
15109
15110 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15111 (INCGNU): ... this, and spell out -I here.
15112 (GNULIB_LIB): Rename to ...
15113 (LIBGNU): ... this.
15114 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15115
15116 2012-04-19 Pedro Alves <palves@redhat.com>
15117
15118 * config.in: Regenerate.
15119
15120 2012-04-19 Pedro Alves <palves@redhat.com>
15121
15122 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15123 * server.h (memmem): Remove declaration.
15124 * config.in: Regenerate.
15125 * configure: Regenerate.
15126
15127 2012-04-19 Yao Qi <yao@codesourcery.com>
15128
15129 * Makefile.in (SFILES): Add common/vec.c.
15130 (OBS): Add vec.o.
15131 (vec.o): New rule.
15132
15133 2012-04-19 Yao Qi <yao@codesourcery.com>
15134
15135 * remote-utils.c (prepare_resume_reply): Replace with macro
15136 target_core_of_thread.
15137 * server.c (handle_qxfer_threads_proper): Likewise.
15138 * target.h (traget_core_of_thread): New macro.
15139
15140 2012-04-18 Pedro Alves <palves@redhat.com>
15141
15142 * aclocal.m4: Regenerate.
15143 * configure: Regenerate.
15144
15145 2012-04-16 Yao Qi <yao@codesourcery.com>
15146
15147 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15148 duplicated on address.
15149
15150 2012-04-16 Yao Qi <yao@codesourcery.com>
15151
15152 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15153 (struct tracepoint_action_ops) <send>: New field.
15154 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15155 (agent_expr_send, x_tracepoint_action_send): New.
15156 (l_tracepoint_action_send): New.
15157 (cmd_qtdp): Download and install tracepoint
15158 according to `use_agent'.
15159 (run_inferior_command): Add one more parameter `len'.
15160 Update callers.
15161 (tracepoint_send_agent): New.
15162 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15163
15164 2012-04-16 Yao Qi <yao@codesourcery.com>
15165
15166 * tracepoint.c (download_tracepoints): Moved to ...
15167 (cmd_qtstart): ... here.
15168
15169 2012-04-14 Yao Qi <yao@codesourcery.com>
15170
15171 * tracepoint.c: Include inttypes.h.
15172 (struct collect_memory_action): Use sized types.
15173 (struct tracepoint): Likewise.
15174 (cmd_qtdp, stop_tracing): Update print specifiers.
15175 (cmd_qtp, response_tracepoint): Likewise.
15176 (collect_data_at_tracepoint): Likewise.
15177 (collect_data_at_step): Likewise.
15178
15179 2012-04-14 Yao Qi <yao@codesourcery.com>
15180
15181 Import gnulib module inttypes.
15182 * aclocal.m4, config.in, configure: Regenerated.
15183
15184 2012-04-14 Yao Qi <yao@codesourcery.com>
15185
15186 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15187 Makefile and config.status at last.
15188
15189 2012-04-13 Yao Qi <yao@codesourcery.com>
15190
15191 * tracepoint.c: Include stdint.h unconditionally.
15192
15193 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15194
15195 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15196 on BFD_HAVE_SYS_PROCFS_TYPE.
15197 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15198 * configure: Regenerate.
15199 * config.in: Likewise.
15200
15201 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15202
15203 * Makefile.in (clean): Also remove x32.c x32-linux.c
15204 x32-avx.c x32-avx-linux.c.
15205 (x32.o): New target.
15206 (x32.c): Likewise.
15207 (x32-linux.o): Likewise.
15208 (x32-linux.c): Likewise.
15209 (x32-avx.o): Likewise.
15210 (x32-avx.c): Likewise.
15211 (x32-avx-linux.o): Likewise.
15212 (x32-avx-linux.c): Likewise.
15213
15214 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15215 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15216 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15217 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15218 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15219 i386/x32-avx-linux.xml.
15220
15221 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15222 (init_registers_x32_avx_linux): Likwise.
15223 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15224 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15225
15226 2012-04-13 Pedro Alves <palves@redhat.com>
15227
15228 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15229 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15230 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15231 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15232 the sub-make.
15233
15234 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15235
15236 * linux-x86-low.c (compat_x32_clock_t): New.
15237 (compat_x32_siginfo_t): Likewise.
15238 (compat_x32_siginfo_from_siginfo): Likewise.
15239 (siginfo_from_compat_x32_siginfo): Likewise.
15240 (linux_is_elf64): Likewise.
15241 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15242 and siginfo_from_compat_x32_siginfo for x32.
15243 (x86_arch_setup): Set linux_is_elf64.
15244
15245 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15246
15247 PR gdb/13969
15248 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15249 e_machine field.
15250 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15251 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15252 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15253 compatible with process.
15254
15255 2012-04-12 Yao Qi <yao@codesourcery.com>
15256
15257 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15258 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15259 (install-only, install-info, clean): Handle sub dir gnulib.
15260 (all-lib, am--refresh): New targets.
15261 (memmem.o): Remove target.
15262 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15263 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15264 (AC_REPLACE_FUNCS): Remove memmem.
15265 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15266 (AC_OUTPUT): Generate Makefile in gnulib/.
15267 * aclocal.m4, config.in, configure: Regenerated.
15268
15269 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15270
15271 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15272
15273 2012-04-05 Pedro Alves <palves@redhat.com>
15274
15275 -Werror=strict-aliasing
15276
15277 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15278 pointer.
15279
15280 2012-04-04 Pedro Alves <palves@redhat.com>
15281
15282 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15283 (sparc_store_gregset_from_stack, sparc_store_gregset)
15284 (sparc_breakpoint_at): Fix formatting.
15285
15286 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15287
15288 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15289 are available.
15290 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15291 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15292 * config.in: Regenerate.
15293 * configure: Likewise.
15294
15295 2012-03-29 Pedro Alves <palves@redhat.com>
15296
15297 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15298 Correct ptrace arguments.
15299
15300 2012-03-28 Pedro Alves <palves@redhat.com>
15301
15302 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15303 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15304 (IA64_FR1_REGNUM): New defines.
15305 (ia64_fetch_register): New.
15306 (the_low_target): Install it.
15307 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15308 field.
15309 * linux-low.c (linux_fetch_registers): Try the
15310 the_low_target.fetch_register hook first.
15311
15312 * linux-arm-low.c (the_low_target): Adjust.
15313 * linux-bfin-low.c (the_low_target): Adjust.
15314 * linux-cris-low.c (the_low_target): Adjust.
15315 * linux-crisv32-low.c (the_low_target): Adjust.
15316 * linux-m32r-low.c (the_low_target): Adjust.
15317 * linux-m68k-low.c (the_low_target): Adjust.
15318 * linux-mips-low.c (the_low_target): Adjust.
15319 * linux-ppc-low.c (the_low_target): Adjust.
15320 * linux-s390-low.c (the_low_target): Adjust.
15321 * linux-sh-low.c (the_low_target): Adjust.
15322 * linux-sparc-low.c (the_low_target): Adjust.
15323 * linux-tic6x-low.c (the_low_target): Adjust.
15324 * linux-x86-low.c (the_low_target): Adjust.
15325 * linux-xtensa-low.c (the_low_target): Adjust.
15326
15327 2012-03-26 Pedro Alves <palves@redhat.com>
15328
15329 * server.c (handle_qxfer_libraries): Don't bail early if
15330 the_target->qxfer_libraries_svr4 is not NULL.
15331
15332 2012-03-26 Pedro Alves <palves@redhat.com>
15333
15334 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15335
15336 2012-03-23 Pedro Alves <palves@redhat.com>
15337
15338 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15339 "library-list-svr4" element's start tag when the the DSO list is
15340 empty.
15341
15342 2012-03-23 Pedro Alves <palves@redhat.com>
15343
15344 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15345 a variable whose type size is the same as the inferior's pointer
15346 size.
15347
15348 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15349
15350 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15351 struct siginfo.
15352 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15353 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15354 * linux-low.h: Include <signal.h>.
15355 (struct siginfo): Remove forward declaration.
15356 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15357 struct siginfo.
15358
15359 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15360
15361 * .gitignore: Ignore more files.
15362
15363 2012-03-19 Pedro Alves <palves@redhat.com>
15364 Jan Kratochvil <jan.kratochvil@redhat.com>
15365
15366 * server.c (cont_thread, general_thread): Add describing comments.
15367 (start_inferior): Clear `cont_thread'.
15368 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15369 of a process.
15370
15371 2012-03-15 Yao Qi <yao@codesourcery.com>
15372
15373 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15374 handling to ...
15375 (cmd_qtdp): ... here.
15376
15377 2012-03-15 Yao Qi <yao@codesourcery.com>
15378
15379 * tracepoint.c (struct tracepoint_action_ops): New.
15380 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15381 (m_tracepoint_action_download): New.
15382 (r_tracepoint_action_download): New.
15383 (x_tracepoint_action_download): New.
15384 (l_tracepoint_action_download): New.
15385 (add_tracepoint_action): Install `action->ops' according type.
15386 (download_tracepoint_1): Move code `download' function pointer
15387 of various tracepoint_action_ops.
15388
15389 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15390
15391 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15392 linux_ptrace_attach_warnings.
15393
15394 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15395
15396 * Makefile.in (linux-ptrace.o): New.
15397 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15398 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15399 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15400 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15401 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15402 of these targets.
15403 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15404
15405 2012-03-08 Yao Qi <yao@codesourcery.com>
15406 Pedro Alves <palves@redhat.com>
15407
15408 Fix PR server/13392.
15409 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15410 offset of JMP insn.
15411 * tracepoint.c (remove_tracepoint): New.
15412 (cmd_qtdp): Call remove_tracepoint when failed to install.
15413
15414 2012-03-07 Pedro Alves <palves@redhat.com>
15415
15416 * linux-low.c (get_detach_signal): New.
15417 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15418 Pass on pending signals to PTRACE_DETACH. Check the result of the
15419 ptrace call.
15420 * server.c (program_signals, program_signals_p): New.
15421 (handle_general_set): Handle QProgramSignals.
15422 * server.h (program_signals, program_signals_p): Declare.
15423
15424 2012-03-05 Pedro Alves <palves@redhat.com>
15425 Jan Kratochvil <jan.kratochvil@redhat.com>
15426
15427 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15428 New comment why.
15429
15430 2012-03-03 Yao Qi <yao@codesourcery.com>
15431
15432 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15433 agent_look_up_symbols.
15434
15435 2012-03-03 Yao Qi <yao@codesourcery.com>
15436
15437 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15438 (linux-x86-low.o): Likewise.
15439 * server.h: Remove in_process_agent_loaded.
15440 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15441 common/agent.c.
15442 Update callers.
15443
15444 2012-03-03 Yao Qi <yao@codesourcery.com>
15445
15446 * tracepoint.c (gdb_agent_capability): New global.
15447 (in_process_agent_loaded_ust): Renamed to
15448 `in_process_agent_supports_ust'.
15449 Update callers.
15450 (in_process_agent_supports_ust): Call agent_capability_check.
15451 (clear_installed_tracepoints): Assert that agent supports
15452 agent.
15453
15454 2012-03-03 Yao Qi <yao@codesourcery.com>
15455
15456 * linux-low.c (linux_supports_agent): New.
15457 (linux_target_ops): Initialize field `supports_agent' with
15458 linux_supports_agent.
15459 * target.h (struct target_ops) <supports_agent>: New.
15460 (target_supports_agent): New macro.
15461 * server.c (handle_general_set): Handle packet 'QAgent'.
15462 (handle_query): Send `QAgent+'.
15463 * Makefile.in (server.o): Depends on agent.h.
15464
15465 2012-03-03 Yao Qi <yao@codesourcery.com>
15466
15467 * Makefile.in (OBS): Add agent.o.
15468 Add new rule for agent.o.
15469 Track dependence of tracepoint.c on agent.h.
15470 * tracepoint.c (run_inferior_command_1):
15471 (run_inferior_command): Call agent_run_command.
15472 (gdb_ust_connect_sync_socket): Deleted. Move it to
15473 common/agent.c.
15474 (resume_thread, stop_thread): Likewise.
15475 (gdb_ust_socket_init): Renamed to ...
15476 (gdb_agent_socket_init): ... New.
15477 (gdb_ust_thread): Renamed to ...
15478 (gdb_agent_helper_thread): ... New.
15479 (gdb_ust_init): Move some code to ...
15480 (gdb_agent_init): ... here. New.
15481 [HAVE_UST]: Call gdb_ust_init.
15482 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15483 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15484 * config.in, configure: Regenerated.
15485
15486 2012-03-02 Pedro Alves <palves@redhat.com>
15487
15488 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15489 * linux-low.c (struct simple_pid_list): New.
15490 (stopped_pids): New a struct simple_pid_list pointer.
15491 (add_to_pid_list, pull_pid_from_list): New.
15492 (handle_extended_wait): Don't assume the first signal new children
15493 report is SIGSTOP. Adjust call to pull_pid_from_list.
15494 (linux_wait_for_lwp): Adjust.
15495
15496 2012-03-02 Yao Qi <yao@codesourcery.com>
15497
15498 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15499 debug log.
15500
15501 2012-03-02 Yao Qi <yao@codesourcery.com>
15502
15503 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15504 `stop_pc' and `tpoint'. Update caller.
15505
15506 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15507
15508 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15509 * linux-low.c (use_linux_regsets): New macro.
15510 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15511 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15512 (linux_register_in_regsets): New function.
15513 (usr_fetch_inferior_registers): Skip registers covered by
15514 regsets.
15515 (usr_store_inferior_registers): Likewise.
15516 (usr_fetch_inferior_registers): New macro.
15517 (usr_store_inferior_registers): Likewise.
15518 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15519 (linux_store_registers): Likewise.
15520 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15521 prototype.
15522 (init_registers_mips64_dsp_linux): Likewise.
15523 (init_registers_mips_linux): New macro.
15524 (init_registers_mips_dsp_linux): Likewise.
15525 (mips_dsp_num_regs): Likewise.
15526 (DSP_BASE, DSP_CONTROL): New fallback macros.
15527 (mips_base_regs): New macro.
15528 (mips_regmap): Use it. Fix the size.
15529 (mips_dsp_regmap): New variable.
15530 (mips_dsp_regset_bitmap): Likewise.
15531 (mips_arch_setup): New function.
15532 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15533 than mips_regmap.
15534 (mips_cannot_store_register): Likewise.
15535 (the_low_target): Update .arch_setup, .num_regs and .regmap
15536 initializers. Add .regset_bitmap initializer.
15537 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15538 initializer.
15539 * linux-bfin-low.c (the_low_target): Likewise.
15540 * linux-cris-low.c (the_low_target): Likewise.
15541 * linux-crisv32-low.c (the_low_target): Likewise.
15542 * linux-ia64-low.c (the_low_target): Likewise.
15543 * linux-m32r-low.c (the_low_target): Likewise.
15544 * linux-m68k-low.c (the_low_target): Likewise.
15545 * linux-ppc-low.c (the_low_target): Likewise.
15546 * linux-s390-low.c (the_low_target): Likewise.
15547 * linux-sh-low.c (the_low_target): Likewise.
15548 * linux-sparc-low.c (the_low_target): Likewise.
15549 * linux-tic6x-low.c (the_low_target): Likewise.
15550 * linux-x86-low.c (the_low_target): Likewise.
15551 * linux-xtensa-low.c (the_low_target): Likewise.
15552 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15553 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15554 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15555 srv_xmlfiles.
15556 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15557 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15558
15559 2012-02-29 Yao Qi <yao@codesourcery.com>
15560 Pedro Alves <palves@redhat.com>
15561
15562 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15563 `step_over_finished' is true.
15564
15565 2012-02-27 Pedro Alves <palves@redhat.com>
15566
15567 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15568 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15569
15570 2012-02-27 Pedro Alves <palves@redhat.com>
15571
15572 PR server/9684
15573 * linux-low.c (pid_is_stopped): New.
15574 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15575
15576 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15577
15578 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15579 of conditions.
15580
15581 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15582
15583 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15584
15585 2012-02-24 Luis Machado <lgustavo@codesourcery>
15586
15587 * server.c (handle_query): Advertise support for target-side
15588 breakpoint condition evaluation.
15589 (process_point_options): New function.
15590 (process_serial_event): When inserting a breakpoint, check for
15591 a target-side condition that should be evaluated.
15592
15593 * mem-break.c: Include regcache.h and ax.h.
15594 (point_cond_list_t): New data structure.
15595 (breakpoint) <cond_list>: New field.
15596 (find_gdb_breakpoint_at): Make non-static.
15597 (delete_gdb_breakpoint_at): Clear any target-side
15598 conditions.
15599 (clear_gdb_breakpoint_conditions): New function.
15600 (add_condition_to_breakpoint): Likewise.
15601 (add_breakpoint_condition): Likewise.
15602 (gdb_condition_true_at_breakpoint): Likewise.
15603 (gdb_breakpoint_here): Return result directly instead
15604 of going through a local variable.
15605
15606 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15607 (clear_gdb_breakpoint_conditions): Likewise.
15608 (add_breakpoint_condition): Likewise.
15609 (gdb_condition_true_at_breakpoint): Likewise.
15610
15611 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15612 (need_step_over_p): Take target-side breakpoint condition into
15613 consideration.
15614
15615 2012-02-24 Luis Machado <lgustavo@codesourcery>
15616
15617 * server.h: Include tracepoint.h.
15618 (agent_mem_read, agent_get_trace_state_variable_value,
15619 agent_set_trace_state_variable_value,
15620 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15621 get_set_tsv_func_addr): New prototypes.
15622
15623 * ax.h: New include file.
15624 * ax.c: New source file.
15625
15626 * tracepoint.c: Include ax.h.
15627 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15628 agent_expr, eval_result_type): Move to ax.h.
15629 (parse_agent_expr): Rename to ...
15630 (gdb_parse_agent_expr): ... this, make it non-static and move
15631 to ax.h.
15632 (unparse_agent_expr) Rename to ...
15633 (gdb_unparse_agent_expr): ... this, make it non-static and move
15634 to ax.h.
15635 (eval_agent_expr): Rename to ...
15636 (eval_tracepoint_agent_expr): ... this.
15637 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15638 forward declarations.
15639 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15640 (agent_get_trace_state_variable_value): New function.
15641 (agent_set_trace_state_variable_value): New function.
15642 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15643 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15644 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15645 (condition_true_at_tracepoint): Likewise.
15646 (parse_agent_expr): Rename to ...
15647 (gdb_parse_agent_expr): ... this and move to ax.c.
15648 (unparse_agent_expr): Rename to ...
15649 (gdb_unparse_agent_expr): ... this and move to ax.c.
15650 (gdb_agent_op_name): Move to ax.c.
15651 (eval_agent_expr): Rename to ...
15652 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15653 and move to ax.c.
15654 (eval_tracepoint_agent_expr): New function.
15655 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15656 non-static.
15657 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15658 ax.c.
15659 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15660 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15661 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15662 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15663 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15664 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15665 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15666 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15667 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15668 (compile_bytecodes): Remove forward declaration.
15669 (is_goto_target): Move to ax.c.
15670 (compile_bytecodes): Move to ax.c and call
15671 agent_get_trace_state_variable_value (...) and
15672 agent_set_trace_state_variable_value (...).
15673
15674 * Makefile.in: Update ax.c and IPA dependencies.
15675
15676 2012-02-24 Pedro Alves <palves@redhat.com>
15677
15678 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15679 (cmd_bigqtbuffer_circular): ... this. Only handle
15680 'QTBuffer:circular:'.
15681 (handle_tracepoint_general_set): Adjust.
15682
15683 2012-02-16 Yao Qi <yao@codesourcery.com>
15684
15685 * inferiors.c: Move code to ...
15686 * dll.c: .... here. New.
15687 * server.h: Declare clear_dlls.
15688 * Makefile.in (SFILES): Add dll.c.
15689 (OBS): Add dll.o
15690 (dll.o): New rule.
15691
15692 2012-02-11 Yao Qi <yao@codesourcery.com>
15693
15694 * server.c: (handle_monitor_command): Add a new parameter
15695 `own_buf'.
15696 (handle_query): Update caller.
15697
15698 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15699
15700 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15701 * configure, config.in: Regenerate.
15702 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15703 is not defined.
15704
15705 2012-02-02 Pedro Alves <palves@redhat.com>
15706
15707 Try SIGKILL first, then PTRACE_KILL.
15708 * linux-low.c (linux_kill_one_lwp): New.
15709 (linux_kill_one_lwp): Rename to ...
15710 (kill_one_lwp_callback): ... this. Use the new
15711 linux_kill_one_lwp.
15712
15713 2012-02-02 Pedro Alves <palves@redhat.com>
15714
15715 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15716 inferior.
15717
15718 2012-01-27 Pedro Alves <palves@redhat.com>
15719
15720 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15721 (elf_64_file_p): Make static.
15722 (linux_pid_exe_is_elf_64_file): New.
15723 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15724 Delete declarations.
15725 (linux_pid_exe_is_elf_64_file): Declare.
15726 * linux-x86-low.c (x86_arch_setup): Use
15727 linux_pid_exe_is_elf_64_file.
15728
15729 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15730
15731 * linux-low.c (linux_wait_for_event_1): Rename to ...
15732 (linux_wait_for_event): ... here and merge it with former
15733 linux_wait_for_event - new variable wait_ptid, use it.
15734 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15735
15736 2012-01-23 Pedro Alves <palves@redhat.com>
15737
15738 * server.c (main): Avoid yet another case of infinite loop while
15739 detaching/killing after a longjmp.
15740
15741 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15742
15743 Code cleanup.
15744 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15745
15746 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15747
15748 * hostio.c (handle_readlink): New function.
15749 (handle_vFile): Call it to handle "vFile:readlink" packets.
15750
15751 2012-01-20 Pedro Alves <palves@redhat.com>
15752 Ulrich Weigand <ulrich.weigand@linaro.org>
15753
15754 * server.c (handle_v_requests): Only support vAttach and vRun to
15755 start multiple processes when in extended protocol mode.
15756
15757 2012-01-17 Pedro Alves <palves@redhat.com>
15758
15759 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15760 memalign plus mprotect to allocate the scratch buffer.
15761
15762 2012-01-13 Pedro Alves <palves@redhat.com>
15763
15764 * server.c (attach_inferior): Clear `cont_thread'.
15765
15766 2012-01-13 Pedro Alves <palves@redhat.com>
15767
15768 * server.c (main): Avoid infinite loop while detaching/killing
15769 after a longjmp.
15770
15771 2012-01-09 Doug Evans <dje@google.com>
15772
15773 * server.c (start_inferior): Set last_ptid in --wrapper case.
15774
15775 2012-01-06 Yao Qi <yao@codesourcery.com>
15776
15777 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15778 defined.
15779 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15780
15781 2012-01-04 Yao Qi <yao@codesourcery.com>
15782
15783 * tracepoint.c (cmd_qtdp): Print debug message
15784 for static tracepoint.
15785
15786 2012-01-04 Yao Qi <yao@codesourcery.com>
15787
15788 * tracepoint.c (trace_vdebug): Differentiate debug message
15789 between gdbserver and IPA.
15790
15791 2012-01-03 Yao Qi <yao@codesourcery.com>
15792
15793 * tracepoint.c (tracepoint_was_hit): Don't collect for
15794 static tracepoint.
15795
15796 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15797
15798 * terminal.h: Reformat copyright header.
15799
15800 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15801
15802 * server.c (gdbserver_version): Update copyright year.
15803 * gdbreplay.c (gdbreplay_version): Likewise.
15804
15805 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15806
15807 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15808
15809 Revert:
15810 2011-12-18 Hui Zhu <teawater@gmail.com>
15811 * linux-low.c (linux_create_inferior): Save return value to ret.
15812
15813 2011-12-18 Hui Zhu <teawater@gmail.com>
15814
15815 * linux-low.c (linux_create_inferior): Save return value to ret.
15816
15817 2011-12-16 Doug Evans <dje@google.com>
15818
15819 * linux-low.c (linux_create_inferior): If stdio connection,
15820 redirect stdin from /dev/null, stdout to stderr.
15821 * remote-utils.c (remote_is_stdio): New static global.
15822 (remote_connection_is_stdio): New function.
15823 (remote_prepare): Handle stdio connection.
15824 (remote_open): Ditto.
15825 (remote_close): Don't close stdin for stdio connections.
15826 (read_prim,write_prim): New functions. Replace all calls to
15827 read/write to these.
15828 * server.c (main): Watch for "-" argument. Move call to
15829 remote_prepare before start_inferior.
15830 * server.h (STDIO_CONNECTION_NAME): New macro.
15831 (remote_connection_is_stdio): Declare.
15832
15833 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15834 in debugging output.
15835
15836 2011-12-15 Yao Qi <yao@codesourcery.com>
15837
15838 * tracepoint.c: Include sys/syscall.h.
15839 (gdb_ust_thread): Remove preprocessor conditional.
15840
15841 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15842
15843 * linux-low.c (linux_detach_one_lwp): Call
15844 the_low_target.prepare_to_resume before detaching.
15845
15846 2011-12-14 Yao Qi <yao@codesourcery.com>
15847
15848 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15849 of write.
15850
15851 2011-12-14 Yao Qi <yao@codesourcery.com>
15852
15853 * i386-low.c (i386_low_stopped_data_address): Initialize local
15854 variable `control'.
15855
15856 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15857
15858 PR remote/13492
15859
15860 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15861 DR_CONTROL unless necessary. Extend comments.
15862 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15863 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15864
15865 2011-12-13 Yao Qi <yao@codesourcery.com>
15866
15867 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15868 macros.
15869 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15870
15871 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15872
15873 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15874 Print new debug message for such case.
15875
15876 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15877
15878 Fix overlapping memcpy.
15879 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15880 the read_inferior_memory transfer.
15881 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15882 write_inferior_memory transfer.
15883 (set_fast_tracepoint_jump): New variable buf. Use it for the
15884 read_inferior_memory and write_inferior_memory transfers.
15885 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15886 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15887 Use it for the write_inferior_memory transfer.
15888 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15889 buffers.
15890
15891 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15892
15893 * linux-low.c (fetch_register, store_register): Make code
15894 consistent, fix formatting.
15895
15896 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15897
15898 * linux-low.c (usr_store_inferior_registers): Factor out code
15899 to handle individual registers into...
15900 (store_register): ... this new function.
15901
15902 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15903
15904 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15905 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15906 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15907 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15908 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15909 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15910 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15911 (srv_xmlfiles): Add new XML files.
15912
15913 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15914 and <sys/uio.h>.
15915 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15916 (init_registers_s390_linux32v1): Add prototype.
15917 (init_registers_s390_linux32v2): Likewise.
15918 (init_registers_s390_linux64v1): Likewise.
15919 (init_registers_s390_linux64v2): Likewise.
15920 (init_registers_s390x_linux64v1): Likewise.
15921 (init_registers_s390x_linux64v2): Likewise.
15922 (s390_num_regs): Increment to 52.
15923 (s390_regmap): Add orig_r2 register.
15924 (s390_num_regs_3264): Increment to 68.
15925 (s390_regmap_3264): Add orig_r2 register.
15926 (s390_collect_ptrace_register): Handle orig_r2 register.
15927 (s390_supply_ptrace_register): Likewise.
15928 (s390_fill_last_break): New function.
15929 (s390_store_last_break): Likewise.
15930 (s390_fill_system_call): New function.
15931 (s390_store_system_call): Likewise.
15932 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15933 register sets.
15934 (s390_check_regset): New function.
15935 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15936 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15937 Update target_regsets for available register sets.
15938
15939 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15940 Jan Kratochvil <jan.kratochvil@redhat.com>
15941
15942 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15943 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15944 New.
15945 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15946 * linux-low.h (struct process_info_private): New member r_debug.
15947 * server.c (handle_qxfer_libraries): Call
15948 the_target->qxfer_libraries_svr4.
15949 (handle_qxfer_libraries_svr4): New function.
15950 (qxfer_packets): New entry "libraries-svr4".
15951 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15952 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15953 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15954 PACKET_qXfer_libraries_svr4.
15955
15956 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15957
15958 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15959 PSW address/mask between 8-byte and 16-byte formats.
15960 (s390_supply_ptrace_register): Likewise.
15961 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15962 basic addressing mode bit.
15963
15964 2011-11-24 Stan Shebs <stan@codesourcery.com>
15965
15966 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15967
15968 2011-11-17 Stan Shebs <stan@codesourcery.com>
15969
15970 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15971 (tracing_start_time): New global.
15972 (tracing_stop_time): New global.
15973 (tracing_user_name): New global.
15974 (tracing_notes): New global.
15975 (tracing_stop_note): New global.
15976 (cmd_qtstart): Set traceframe_usage, start_time.
15977 (stop_tracing): Set stop_time.
15978 (cmd_qtstatus): Report additional status.
15979 (cmd_qtp): New function.
15980 (handle_tracepoint_query): Call it.
15981 (cmd_qtnotes): New function.
15982 (handle_tracepoint_general_set): Call it.
15983 (get_timestamp): Rename from tsv_get_timestamp.
15984
15985 2011-11-14 Stan Shebs <stan@codesourcery.com>
15986 Kwok Cheung Yeung <kcy@codesourcery.com>
15987
15988 * linux-x86-low.c (small_jump_insn): New.
15989 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15990 trampoline and error message, build a trampoline and issue a small
15991 jump instruction to it.
15992 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15993 trampoline and error message.
15994 (x86_get_min_fast_tracepoint_insn_len): New.
15995 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15996 * linux-low.h (struct linux_target_ops): Add arguments to
15997 install_fast_tracepoint_jump_pad operation, add new operation.
15998 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15999 arguments.
16000 (linux_get_min_fast_tracepoint_insn_len): New function.
16001 (linux_target_op): Add new operation.
16002 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16003 (gdb_trampoline_buffer_end): Ditto.
16004 (gdb_trampoline_buffer_error): Ditto.
16005 (struct ipa_sym_addresses): Add fields for new IPA variables.
16006 (symbol_list): Add entries for new IPA variables.
16007 (struct tracepoint): Add fields to hold the address range of the
16008 trampoline used by the tracepoint.
16009 (trampoline_buffer_head): New static variable.
16010 (trampoline_buffer_tail): Ditto.
16011 (claim_trampoline_space): New function.
16012 (have_fast_tracepoint_trampoline_buffer): New function.
16013 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16014 structure.
16015 (install_fast_tracepoint): Ditto, also add error buffer argument.
16016 (cmd_qtminftpilen): New function.
16017 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16018 (fast_tracepoint_from_trampoline_address): New function.
16019 (fast_tracepoint_collecting): Handle trampoline as part of jump
16020 pad space.
16021 (set_trampoline_buffer_space): New function.
16022 (initialize_tracepoint): Initialize new IPA variables.
16023 * target.h (struct target_ops): Add arguments to
16024 install_fast_tracepoint_jump_pad operation, add new
16025 get_min_fast_tracepoint_insn_len operation.
16026 (target_get_min_fast_tracepoint_insn_len): New.
16027 (install_fast_tracepoint_jump_pad): Add arguments.
16028 * server.h (IPA_BUFSIZ): Define.
16029 * linux-i386-ipa.c: Include extra header files.
16030 (initialize_fast_tracepoint_trampoline_buffer): New function.
16031 (initialize_low_tracepoint): Call it.
16032 * server.h (set_trampoline_buffer_space): Declare.
16033 (claim_trampoline_space): Ditto.
16034 (have_fast_tracepoint_trampoline_buffer): Ditto.
16035
16036 2011-11-14 Yao Qi <yao@codesourcery.com>
16037
16038 * server.c (handle_query): Handle InstallInTrace for qSupported.
16039 * tracepoint.c (add_tracepoint): Sort list.
16040 (install_tracepoint, download_tracepoint): New.
16041 (cmd_qtdp): Call them to install and download tracepoints.
16042 (sort_tracepoints): Removed.
16043 (cmd_qtstart): Update.
16044
16045 2011-11-14 Yao Qi <yao@codesourcery.com>
16046
16047 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16048 * mem-break.h: Declare.
16049 * tracepoint.c (cmd_qtstart): Move some code to ...
16050 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16051 New.
16052 (download_tracepoints): Move some code to ...
16053 (download_tracepoint_1): ... here. New.
16054
16055 2011-11-08 Yao Qi <yao@codesourcery.com>
16056
16057 * remote-utils.c (relocate_instruction): A comment fix.
16058
16059 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16060
16061 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16062 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16063 dr_status_mirror and dr_control_mirror from debug_reg_state.
16064 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16065 (i386_initial_stuff): Remove use of deleted globals.
16066 (i386_get_thread_context, i386_set_thread_context,
16067 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16068 from debug_reg_state.
16069
16070 2011-11-05 Yao Qi <yao@codesourcery.com>
16071
16072 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16073 address as TPOINT's.
16074
16075 2011-11-02 Stan Shebs <stan@codesourcery.com>
16076
16077 * tracepoint.c (agent_mem_read_string): New function.
16078 (eval_agent_expr): Call it for tracenz.
16079 * server.c (handle_query): Report support for tracenz.
16080
16081 2011-11-02 Yao Qi <yao@codesourcery.com>
16082
16083 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16084
16085 2011-11-02 Yao Qi <yao@codesourcery.com>
16086
16087 * target.h: Fix a typo in comment.
16088
16089 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16090
16091 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16092 clobber the breakpoints' shadows with fast tracepoint jumps.
16093 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16094 * target.c (write_inferior_memory): Also pass MYADDR down to
16095 check_mem_write.
16096
16097 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16098
16099 * configure.ac: Check support for personality routine.
16100 * configure: Regenerate.
16101 * config.in: Likewise.
16102 * linux-low.c: Include <sys/personality.h>.
16103 Define ADDR_NO_RANDOMIZE if necessary.
16104 (linux_create_inferior): Disable address space randomization when
16105 forking inferior, if requested.
16106 (linux_supports_disable_randomization): New function.
16107 (linux_target_ops): Install it.
16108 * server.h (disable_randomization): Declare.
16109 * server.c (disable_randomization): New global variable.
16110 (handle_general_set): Handle QDisableRandomization.
16111 (handle_query): Likewise for qSupported.
16112 (main): Support --disable-randomization and --no-disable-randomization
16113 command line arguments.
16114 * target.h (struct target_ops): Add supports_disable_randomization.
16115 (target_supports_disable_randomization): New macro.
16116
16117 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16118
16119 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16120 ifdef check.
16121 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16122 [!PT_GETDSBT] (target_loadmap): New definition.
16123 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16124 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16125 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16126 and PT_GETDSBT to LINUX_LOADMAP.
16127 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16128 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16129
16130 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16131
16132 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16133 (arm_linux_hwbp_cap): New static variable.
16134 (arm_linux_get_hwbp_cap): Replace by ...
16135 (arm_linux_init_hwbp_cap): ... this new function.
16136 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16137 (arm_linux_get_hw_watchpoint_count): Likewise.
16138 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16139 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16140 (arm_prepare_to_resume): Use perror_with_name instead of error.
16141
16142 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16143
16144 * linux-arm-low.c: Include <signal.h>.
16145 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16146 (struct arm_linux_hwbp_cap): New data type.
16147 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16148 (struct arm_linux_hw_breakpoint): New data type.
16149 (MAX_BPTS, MAX_WPTS): Define.
16150 (struct arch_process_info, struct arch_lwp_info): New data types.
16151 (arm_linux_get_hwbp_cap): New function.
16152 (arm_linux_get_hw_breakpoint_count): Likewise.
16153 (arm_linux_get_hw_watchpoint_count): Likewise.
16154 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16155 (arm_hwbp_control_initialize): Likewise.
16156 (arm_hwbp_control_is_enabled): Likewise.
16157 (arm_hwbp_control_is_initialized): Likewise.
16158 (arm_hwbp_control_disable): Likewise.
16159 (arm_linux_hw_breakpoint_equal): Likewise.
16160 (arm_linux_hw_point_initialize): Likewise.
16161 (struct update_registers_data): New data structure.
16162 (update_registers_callback: New function.
16163 (arm_insert_point): Likewise.
16164 (arm_remove_point): Likewise.
16165 (arm_stopped_by_watchpoint): Likewise.
16166 (arm_stopped_data_address): Likewise.
16167 (arm_new_process): Likewise.
16168 (arm_new_thread): Likewise.
16169 (arm_prepare_to_resume): Likewise.
16170 (the_low_target): Register arm_insert_point, arm_remove_point,
16171 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16172 arm_new_thread, and arm_prepare_to_resume.
16173
16174 2011-09-15 Stan Shebs <stan@codesourcery.com>
16175
16176 * server.h (struct emit_ops): Add compare-goto fields.
16177 * tracepoint.c (gdb_agent_op_sizes): New table.
16178 (emit_eq_goto): New function.
16179 (emit_ne_goto): New function.
16180 (emit_lt_goto): New function.
16181 (emit_le_goto): New function.
16182 (emit_gt_goto): New function.
16183 (emit_ge_goto): New function.
16184 (is_goto_target): New function.
16185 (compile_bytecodes): Recognize special cases of compare-goto
16186 combinations and call specialized emitters for them.
16187 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16188 (amd64_emit_ne_goto): New function.
16189 (amd64_emit_lt_goto): New function.
16190 (amd64_emit_le_goto): New function.
16191 (amd64_emit_gt_goto): New function.
16192 (amd64_emit_ge_goto): New function.
16193 (amd64_emit_ops): Add the new functions.
16194 (i386_emit_eq_goto): New function.
16195 (i386_emit_ne_goto): New function.
16196 (i386_emit_lt_goto): New function.
16197 (i386_emit_le_goto): New function.
16198 (i386_emit_gt_goto): New function.
16199 (i386_emit_ge_goto): New function.
16200 (i386_emit_ops): Add the new functions.
16201
16202 2011-09-08 Stan Shebs <stan@codesourcery.com>
16203
16204 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16205 (i386_emit_epilogue): Restore %ebx.
16206
16207 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16208
16209 * server.c (step_thread): Remove definition.
16210 (process_serial_event): Don't handle Hs.
16211 * server.h (step_thread): Remove declaration.
16212 * target.c (set_desired_inferior): Remove use of step_thread.
16213
16214 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16215
16216 * linux-low.c: Include linux-procfs.h.
16217 (linux_attach_lwp_1): Update comments.
16218 (linux_attach): Scan for existing threads when attaching to a
16219 process that is the tgid.
16220 * Makefile.in: Update dependencies.
16221
16222 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16223
16224 * configure.srv: Add linux-procfs.o dependencies.
16225
16226 2011-08-14 Yao Qi <yao@codesourcery.com>
16227
16228 * target.h (struct target_ops): Fix indent.
16229 * win32-low.c (win32_target_ops): Fix comment.
16230
16231 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16232 Yao Qi <yao@codesourcery.com>
16233
16234 * Makefile.in (clean): Remove tic6x-*.c files.
16235 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16236 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16237 (tic6x-c64xp-linux.c): Likewise.
16238 * configure.srv: Add support for tic6x-*-uclinux.
16239 * linux-tic6x-low.c: New.
16240 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16241
16242 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16243 Yao Qi <yao@codesourcery.com>
16244
16245 * target.h (struct target_ops): Add read_loadmap.
16246 * linux-low.c (struct target_loadseg): New type.
16247 (struct target_loadmap): New type.
16248 (linux_read_loadmap): New function.
16249 (linux_target_ops): Add linux_read_loadmap.
16250 * server.c (handle_query): Support qXfer:fdpic:read packet.
16251 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16252 to NULL.
16253
16254 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16255
16256 * win32-low.c: Include <stdint.h>.
16257
16258 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16259
16260 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16261 to the inferior here.
16262 (i386_remove_aligned_watchpoint): Ditto.
16263 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16264 fit part of the watchpoint in the debug registers.
16265 (i386_update_inferior_debug_regs): New.
16266 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16267 registers, and only update the inferior on success.
16268 (i386_low_remove_watchpoint): Ditto.
16269
16270 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16271
16272 * linux-low.c (compare_ints, unique, list_threads, show_process,
16273 linux_core_of_thread): Delete.
16274 (linux_target_ops): Change linux_core_of_thread to
16275 linux_common_core_of_thread.
16276 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16277 * utils.c (malloc_failure): Change type of argument.
16278 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16279 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16280 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16281 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16282 (IPA_OBJS): Add common-utils-ipa.o.
16283 (ptid_h, linux_osdata_h): New macros.
16284 (server_h): Add common/common-utils.h, common/xml-utils.h,
16285 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16286 common/ptid.h.
16287 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16288 ptid.o, buffer.o): New rules.
16289 (linux-low.o): Add common/linux-osdata.h as a dependency.
16290 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16291 * configure.ac: Add AC_HEADER_DIRENT check.
16292 * config.in: Regenerate.
16293 * configure: Regenerate.
16294 * remote-utils.c (xml_escape_text): Delete.
16295 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16296 buffer_xml_printf): Move to common/buffer.c.
16297 * server.c (main): Remove call to initialize_inferiors.
16298 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16299 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16300 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16301 internal_error, gdb_assert, gdb_assert_fail): Delete.
16302 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16303 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16304 common/buffer.h.
16305 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16306 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16307 initialize_inferiors): Delete.
16308
16309 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16310
16311 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16312 symbol error.
16313
16314 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16315
16316 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16317 assertion.
16318 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16319
16320 2011-05-26 Yao Qi <yao@codesourcery.com>
16321
16322 * Makefile.in (thread-db.o): Track dependence to
16323 common/gdb_thread_db.h.
16324 * thread-db.c: include gdb_thread_db.h from right place.
16325
16326 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16327
16328 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16329 __FILE__ and __LINE__ to internal_error.
16330
16331 2011-05-13 Doug Evans <dje@google.com>
16332
16333 * thread-db.c (try_thread_db_load_from_sdir): New function.
16334 (try_thread_db_load_from_dir): New function.
16335 (thread_db_load_search): Handle $sdir, ignore $pdir.
16336 Remove trying of system directories if search of
16337 libthread-db-search-path fails, that is now done via $sdir.
16338
16339 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16340
16341 * server.c (handle_query): Add EnableDisableTracepoints to the list
16342 of supported features.
16343 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16344 tracepoints.
16345 (cmd_qtenable_disable): New.
16346 (cmd_qtstart): Install tracepoints even if disabled.
16347 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16348 receiving a QTEnable or QTDisable packet.
16349 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16350 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16351 tracepoints.
16352 (gdb_probe): Skip data collection if static tracepoint is disabled.
16353
16354 2011-05-10 Doug Evans <dje@google.com>
16355
16356 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16357
16358 2011-05-04 Doug Evans <dje@google.com>
16359
16360 * linux-low.c (linux_join): Skip process lookup.
16361 * spu-low.c (spu_join): Ditto.
16362 * server.c (join_inferiors_callback): Delete.
16363 (process_serial_event): For 'D' packet (detach) call join_inferior
16364 directly.
16365
16366 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16367
16368 * README: Don't mention xscale*-*-linux*.
16369 * configure.srv (xscale*-*-linux*): Don't handle target.
16370
16371 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16372
16373 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16374 casting pointers.
16375 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16376 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16377 (i386_emit_void_call_2): Likewise.
16378
16379 2011-04-26 Yao Qi <yao@codesourcery.com>
16380
16381 * linux-low.c: Move common macros to linux-ptrace.h.
16382 Include linux-ptrace.h.
16383 * Makefile.in (linux_ptrace_h): New.
16384 (linux-low.o): Depends on linux-ptrace.h.
16385
16386 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16387
16388 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16389 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16390 (remote_prepare): New function with most of the TCP code from ...
16391 (remote_open): ... here. Detect PORT here unconditionally. Move also
16392 setting transport_is_reliable.
16393 * server.c (run_once): New variable.
16394 (gdbserver_usage): Document it.
16395 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16396 the first run if RUN_ONCE.
16397 * server.h (run_once, remote_prepare): New declarations.
16398
16399 2011-04-19 Tom Tromey <tromey@redhat.com>
16400
16401 * win32-low.c (handle_load_dll): Remove duplicate "the".
16402
16403 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16404
16405 Remove support for old Cygwin 1.5 versions.
16406 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16407 function to avoid warning.
16408 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16409 warning.
16410
16411 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16412
16413 * gdbserver/server.h (Macro _): Define it if not available.
16414
16415 2011-03-14 Michael Snyder <msnyder@vmware.com>
16416
16417 * hostio.c (handle_close): Remove unnecessary null test.
16418
16419 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16420
16421 * Makefile.in (maintainer-clean realclean distclean): Remove
16422 "make ... subdir_do" command.
16423
16424 2011-03-10 Michael Snyder <msnyder@vmware.com>
16425
16426 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16427
16428 * server.c (handle_v_run): Free alloced buffer on early return.
16429
16430 2011-03-09 Yao Qi <yao@codesourcery.com>
16431
16432 Revert:
16433 2011-03-04 Yao Qi <yao@codesourcery.com>
16434
16435 * Makefile.in: Remove GNU make feature --directory.
16436
16437 2011-03-05 Yao Qi <yao@codesourcery.com>
16438
16439 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16440 (subdir_do): New make target. Copied from gdb/Makefile.
16441 (maintainer-clean, realclean, distclean, clean): Call corresponding
16442 make targets in common/Makefile.
16443
16444 2011-02-11 Yao Qi <yao@codesourcery.com>
16445
16446 * configure.ac: Call AC_PROG_RANLIB.
16447 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16448 * configure: Regenerate.
16449
16450 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16451
16452 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16453
16454 2011-03-06 Yao Qi <yao@codesourcery.com>
16455
16456 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16457
16458 2011-03-05 Yao Qi <yao@codesourcery.com>
16459
16460 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16461 (subdir_do): New make target. Copied from gdb/Makefile.
16462 (maintainer-clean, realclean, distclean, clean): Call corresponding
16463 make targets in common/Makefile.
16464
16465 2011-03-04 Yao Qi <yao@codesourcery.com>
16466
16467 * Makefile.in: Remove GNU make feature --directory.
16468
16469 2011-03-04 Michael Snyder <msnyder@vmware.com>
16470
16471 * server.c (queue_stop_reply): Call xmalloc not malloc.
16472
16473 2011-03-02 Michael Snyder <msnyder@vmware.com>
16474
16475 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16476
16477 2011-02-28 Michael Snyder <msnyder@vmware.com>
16478
16479 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16480 (cmd_qtframe): Ditto.
16481 (cmd_qtbuffer): Ditto.
16482 (cmd_bigqtbuffer): Ditto.
16483
16484 * utils.c (decimal2str): Initialize 'width' to nine, then
16485 don't mess with it.
16486
16487 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16488
16489 * hostio.c (require_data): Free *data, not data.
16490
16491 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16492
16493 * hostio.c (require_data): Use free, not xfree.
16494
16495 2011-02-27 Michael Snyder <msnyder@vmware.com>
16496
16497 * server.c (handle_query): Discard unused value.
16498
16499 * hostio.c (require_data): Free malloc memory before returning
16500 error.
16501
16502 2011-02-26 Michael Snyder <msnyder@vmware.com>
16503
16504 * linux-low.c (list_threads): Call closedir for dirent.
16505
16506 2011-02-27 Michael Snyder <msnyder@vmware.com>
16507
16508 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16509 a case statement falls through.
16510
16511 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16512
16513 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16514 in comparison.
16515
16516 2011-02-26 Michael Snyder <msnyder@vmware.com>
16517
16518 * utils.c (decimal2str): Eliminate dead code and dead param.
16519 (pulongest): Drop dead param from call to decimal2str.
16520 (plongest): Ditto.
16521
16522 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16523
16524 Revert the following patch (not approved yet):
16525 2011-02-21 Hui Zhu <teawater@gmail.com>
16526 * tracepoint.c (tp_printf): New function.
16527 (eval_agent_expr): Handle gdb_agent_op_printf.
16528
16529 2011-02-21 Hui Zhu <teawater@gmail.com>
16530
16531 * tracepoint.c (tp_printf): New function.
16532 (eval_agent_expr): Handle gdb_agent_op_printf.
16533
16534 2011-02-18 Tom Tromey <tromey@redhat.com>
16535
16536 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16537 (tracepoint.o): Likewise.
16538 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16539 (gdb_agent_op_names): Likewise.
16540
16541 2011-02-18 Tom Tromey <tromey@redhat.com>
16542
16543 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16544 gdb_agent_op_rot>: New constants.
16545 (gdb_agent_op_names): Add pick and roll.
16546 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16547 cases.
16548
16549 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16550
16551 * aclocal.m4: Regenerated with aclocal-1.11.1.
16552
16553 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16554
16555 * server.c (handle_qxfer_traceframe_info): New.
16556 (qxfer_packets): Register "traceframe-info".
16557 (handle_query): Report support for qXfer:traceframe-info:read+.
16558 * tracepoint.c (match_blocktype): New.
16559 (traceframe_find_block_type): Rename to ...
16560 (traceframe_walk_blocks): ... this. Add callback filter argument,
16561 and use it.
16562 (traceframe_find_block_type): New, reimplemented on top of
16563 traceframe_walk_blocks.
16564 (build_traceframe_info_xml): New.
16565 (traceframe_read_info): New.
16566 * server.h (traceframe_read_info): Declare.
16567
16568 2011-02-11 Yao Qi <yao@codesourcery.com>
16569
16570 * configure.ac: Call AC_PROG_RANLIB.
16571 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16572 * configure: Regenerate.
16573
16574 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16575
16576 * server.c (gdb_read_memory): Change return semantics to allow
16577 partial transfers.
16578 (handle_search_memory_1): Adjust.
16579 (process_serial_event) <'m' packet>: Handle partial transfers.
16580 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16581
16582 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16583
16584 * regcache.c (init_register_cache): Initialize
16585 regcache->register_status.
16586 (free_register_cache): Release regcache->register_status.
16587 (regcache_cpy): Copy register_status.
16588 (registers_to_string): Print 'x's for unavailable registers.
16589 (supply_register): Mark the register's status valid or
16590 unavailable, depending on whether a buffer was passed in or not.
16591 (supply_register_zeroed): New.
16592 (supply_regblock): Mark the registers' status valid or
16593 unavailable, depending on whether a buffer was passed in or not.
16594 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16595 (struct regcache): New `register_status' field.
16596 (supply_register_zeroed): Declare.
16597 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16598 supply_register_zeroed, rather than passing a NULL buffer to
16599 supply_register.
16600 * tracepoint.c (fetch_traceframe_registers): Update comment.
16601
16602 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16603
16604 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16605 buffer explicit.
16606
16607 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16608
16609 * server.h (decode_xfer_write): Change prototype.
16610 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16611 and don't extract the annex here.
16612 * server.c (decode_xfer_read): Remove `annex' parameter,
16613 and don't extract the annex here.
16614 (decode_xfer): New.
16615 (struct qxfer): New.
16616 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16617 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16618 (handle_qxfer_statictrace): New functions, abstracted out from
16619 handle_query, and made to use the struct qxfer interface.
16620 (handle_threads_qxfer_proper): Rename to ...
16621 (handle_qxfer_threads_proper): ... this.
16622 (handle_threads_qxfer): Rename to ...
16623 (handle_qxfer_threads): ... this. Adjust.
16624 (qxfer_packets): New array.
16625 (handle_qxfer): New function.
16626 (handle_query): Use handle_qxfer.
16627
16628 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16629
16630 * gdbreplay.c: Shorten lines of >= 80 columns.
16631 * linux-low.c: Ditto.
16632 * linux-ppc-low.c: Ditto.
16633 * linux-s390-low.c: Ditto.
16634 * linux-sparc-low.c: Ditto.
16635 * linux-x86-low.c: Ditto.
16636 * linux-xtensa-low.c: Ditto.
16637 * mem-break.c: Ditto.
16638 * nto-low.c: Ditto.
16639 * regcache.h: Ditto.
16640 * remote-utils.c: Ditto.
16641 * server.c: Ditto.
16642 * server.h: Ditto.
16643 * thread-db.c: Ditto.
16644 * tracepoint.c: Ditto.
16645 * utils.c: Ditto.
16646 * win32-low.h: Ditto.
16647
16648 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16649
16650 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16651 update.
16652
16653 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16654
16655 * server.c (gdbserver_version): Update copyright year in version
16656 output.
16657 * gdbreplay.c (gdbreplay_version): Ditto.
16658
16659 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16660
16661 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16662 * linux-bfin-low.c: New file.
16663 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16664 PT_DATA_ADDR for BFIN targets.
16665 * Makefile.in (SFILES): Add linux-bfin-low.c.
16666 (clean): Remove reg-bfin.c.
16667 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16668 * README: Mention supported Blackfin targets.
16669
16670 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16671
16672 * .gitignore: New file.
16673
16674 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16675
16676 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16677
16678 2010-10-22 Jie Zhang <jie@codesourcery.com>
16679
16680 * Makefile.in: Add FLAGS_TO_PASS variable.
16681 (install): Remove dependency of install-only and recursively
16682 invoke make for install-only.
16683
16684 2010-10-04 Doug Evans <dje@google.com>
16685
16686 * Makefile.in (uninstall): Use $(DESTDIR).
16687
16688 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16689
16690 PR gdb/11842
16691
16692 * linux-x86-low.c (compat_siginfo_from_siginfo)
16693 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16694 si_code is < 0. Check for si_code == SI_TIMER before checking for
16695 si_code < 0.
16696
16697 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16698
16699 * lynx-i386-low.c: New file.
16700 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16701
16702 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16703
16704 * lynx-low.c (ptrace_request_to_str): Remove handling for
16705 request values that have been removed in LynxOS 5.x.
16706
16707 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16708
16709 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16710 <ptrace.h>
16711
16712 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16713
16714 * configure.ac: Add --enable-inprocess-agent option.
16715 * configure: Rebuilt.
16716
16717 2010-09-06 Yao Qi <yao@codesourcery.com>
16718
16719 * linux-low.c (linux_kill): Remove unused variable.
16720 (linux_stabilize_threads): Likewise.
16721 * server.c (start_inferior): Likewise.
16722 (queue_stop_reply_callback): Likewise.
16723 * tracepoint.c (do_action_at_tracepoint): Likewise.
16724
16725 2010-09-06 Yao Qi <yao@codesourcery.com>
16726
16727 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16728 on return.
16729
16730 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16731
16732 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16733
16734 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16735
16736 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16737 "$(IPA_DEPFILES)".
16738
16739 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16740
16741 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16742 gdbserver/lynx-ppc-low.c: New files.
16743 * Makefile.in (lynx_low_h): New variable.
16744 (lynx-low.o, lynx-ppc-low.o): New rules.
16745 * configure.ac: On LynxOS, link with -lnetinet.
16746 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16747 * configure: regenerate.
16748
16749 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16750
16751 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16752 * configure.ac: Add check for vasprintf and vsnprintf.
16753 * configure, config.in: Regenerate.
16754 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16755
16756 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16757
16758 * gdbreplay.c: Move include of alloca.h up, next to include of
16759 malloc.h.
16760 * server.h: Add include of malloc.h.
16761 * mem-break.c: Remove include of malloc.h.
16762 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16763
16764 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16765
16766 * Makefile.in (memmem.o): Build with -Wno-error.
16767
16768 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16769
16770 * utils.c (xsnprintf): Make non-static.
16771 * server.h: Add xsnprintf declaration.
16772 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16773 replace calls to snprintf by calls to xsnprintf throughout.
16774
16775 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16776
16777 * configure.ac: Add configure check for alloca.
16778 * configure, config.in: Regenerate.
16779 * server.h: Include alloca.h if it exists.
16780 * gdbreplay.c: Include alloca.h if it exists.
16781
16782 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16783
16784 * linux-low.c (__SIGRTMIN): Define if not already defined.
16785 (linux_create_inferior): Check for __ANDROID__ rather than
16786 __SIGRTMIN.
16787 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16788 are already deferred.
16789 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16790 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16791 stopped and already has a pending signal to report.
16792 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16793 a pending signal to report or is moving out of a jump pad.
16794 (linux_init_signals): Check for __ANDROID__ rather than
16795 __SIGRTMIN.
16796
16797 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16798
16799 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16800 debug_threads check. Avoid a linear search when not doing debug
16801 output.
16802
16803 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16804
16805 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16806 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16807 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16808 (process_event): Change local fd's type to gdb_fildes_t.
16809 (create_file_handler): Adjust prototype.
16810 (delete_file_handler): Adjust prototype.
16811 (handle_file_event): Adjust prototype. Use pfildes.
16812 (create_file_event): Adjsut prototype.
16813 * remote-utils.c (remote_desc, listen_desc): Change type to
16814 gdb_fildes_t.
16815 * server.h: New gdb_fildes_t typedef.
16816 [USE_WIN32API]: Include winsock2.h.
16817 (delete_file_handler, add_file_handler): Adjust prototypes.
16818 (pfildes): Declare.
16819 * utils.c (pfildes): New.
16820
16821 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16822
16823 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16824 * configure: Regenerate.
16825
16826 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16827
16828 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16829 (linux_done_accessing_memory): ... this.
16830 (linux_target_ops): Adjust.
16831 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16832 * nto-low.c (nto_target_ops): Adjust comment.
16833 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16834 * spu-low.c (spu_target_ops): Adjust comment.
16835 * target.h (target_ops): Rename unprepare_to_access_memory field
16836 to done_accessing_memory.
16837 (unprepare_to_access_memory): Rename to ...
16838 (done_accessing_memory): ... this.
16839
16840 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16841
16842 * linux-low.c (linux_prepare_to_access_memory): New.
16843 (linux_unprepare_to_access_memory): New.
16844 (linux_target_ops): Install them.
16845 * server.c (read_memory): Rename to ...
16846 (gdb_read_memory): ... this. Use
16847 prepare_to_access_memory/prepare_to_access_memory.
16848 (write_memory): Rename to ...
16849 (gdb_write_memory): ... this. Use
16850 prepare_to_access_memory/prepare_to_access_memory.
16851 (handle_search_memory_1): Adjust.
16852 (process_serial_event): Adjust.
16853 * target.h (struct target_ops): New fields
16854 prepare_to_access_memory and unprepare_to_access_memory.
16855 (prepare_to_access_memory, unprepare_to_access_memory): New.
16856 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16857 prepare_to_access_memory/prepare_to_access_memory.
16858 * nto-low.c (nto_target_ops): Adjust.
16859 * spu-low.c (spu_target_ops): Adjust.
16860 * win32-low.c (win32_target_ops): Adjust.
16861
16862 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16863
16864 * Makefile.in (WARN_CFLAGS): Get it from configure.
16865 (WERROR_CFLAGS): New.
16866 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16867 * configure.ac: Introduce --enable-werror, which adds -Werror to
16868 the compiler command line. Enabled by default. Disable with
16869 --disable-werror. Add -Wdeclaration-after-statement
16870 Wpointer-arith and -Wformat-nonliteral to warning flags.
16871 * configure: Regenerate.
16872
16873 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16874
16875 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16876
16877 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16878
16879 * gdbreplay.c (remote_error): New.
16880 (gdbchar): New.
16881 (expect): Use gdbchar. Check for error reading from GDB.
16882 Clarify sync error output.
16883 (play): Check for errors writing to GDB.
16884 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16885 * remote-utils.c (getpkt): Check for errors writing to the remote
16886 descriptor.
16887
16888 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16889
16890 * linux-low.c (linux_wait_1): Move non-debugging code out of
16891 `debug_threads' control.
16892
16893 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16894
16895 * linux-low.c (linux_wait_1): Don't set last_status here.
16896 * server.c (push_event, queue_stop_reply_callback): Assert we're
16897 not pushing a TARGET_WAITKIND_IGNORE event.
16898 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16899 (myresume, handle_target_event): Set the thread's last_resume_kind
16900 and last_status from the target returned status.
16901
16902 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16903
16904 PR threads/10729
16905
16906 * linux-x86-low.c (update_debug_registers_callback): New.
16907 (i386_dr_low_set_addr): Use it.
16908 (i386_dr_low_get_addr): New.
16909 (i386_dr_low_set_control): Use update_debug_registers_callback.
16910 (i386_dr_low_get_control): New.
16911 (i386_dr_low_get_status): Adjust.
16912 * linux-low.c (linux_stop_lwp): New.
16913 * linux-low.h (linux_stop_lwp): Declare.
16914
16915 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16916 argument instead of a i386_debug_reg_state.
16917 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16918 a i386_debug_reg_state.
16919 (i386_insert_aligned_watchpoint): Adjust.
16920 (i386_remove_aligned_watchpoint): Adjust.
16921 (i386_low_stopped_data_address): Read the debug registers from the
16922 inferior instead of from the mirrors.
16923 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16924 (i386_dr_low_get_addr): Declare.
16925 (i386_dr_low_get_control): Declare.
16926 (i386_dr_low_get_status): Change prototype.
16927
16928 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16929 (i386_dr_low_get_addr): New.
16930 (i386_dr_low_get_control): New.
16931 (i386_dr_low_get_status): Adjust prototype. Return
16932 dr_status_mirror.
16933 (i386_initial_stuff): Clear dr_status_mirror and
16934 dr_control_mirror.
16935 (i386_get_thread_context): Adjust.
16936 (i386_set_thread_context): Adjust.
16937 (i386_thread_added): Adjust.
16938
16939 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16940
16941 * linux-low.h (linux_thread_area): Delete declaration.
16942
16943 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16944
16945 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16946 after its termination.
16947
16948 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16949
16950 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16951 (gdb_wants_all_stopped): Delete.
16952 (linux_wait_1): Don't call them.
16953 * server.c (handle_v_cont): Tag all threads as want-stopped.
16954 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16955 stopped as "client-wants-stopped".
16956
16957 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16958
16959 * Makefile.in (signals_h): New.
16960 (server_h): Depend on it.
16961 (server.o): Don't depend on $(signals_def).
16962 (signals.o): Depend on $(signals_def).
16963
16964 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16965
16966 * Makefile.in (signals_def): New.
16967 (server_h): Append include/gdb/signals.h and signals_def.
16968 (server.o): Append signals_def.
16969
16970 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16971
16972 * server.c (handle_target_event): Use target_signal_to_host for
16973 resume_info.sig initialization.
16974 * target.h (struct thread_resume) <sig>: New comment.
16975
16976 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16977
16978 * server.c (handle_query): strcpy() the returned string from paddress()
16979 instead of sprintf().
16980 * utils.c (paddress): Return phex_nz().
16981
16982 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16983
16984 * server.c (handle_v_cont): Call mourn_inferior if process
16985 just exited.
16986 (myresume): Likewise.
16987
16988 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16989
16990 Static tracepoints, and integration with UST.
16991
16992 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16993 * mem-break.c (uninsert_all_breakpoints)
16994 (reinsert_all_breakpoints): New.
16995 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16996 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16997 (gdb_agent_ust_loaded, helper_thread_id)
16998 (gdb_agent_helper_thread_id): New macros.
16999 (struct ipa_sym_addresses): Add addr_ust_loaded,
17000 addr_helper_thread_id, addr_cmd_buf.
17001 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17002 (in_process_agent_loaded_ust): New.
17003 (write_e_ust_not_loaded): New.
17004 (maybe_write_ipa_ust_not_loaded): New.
17005 (struct collect_static_trace_data_action): New.
17006 (enum tracepoint_type) <static_tracepoint>: New.
17007 (struct tracepoint) <handle>: Mention static tracepoints.
17008 (struct static_tracepoint_ctx): New.
17009 (CMD_BUF_SIZE): New.
17010 (add_tracepoint_action): Handle static tracepoint actions.
17011 (unprobe_marker_at): New.
17012 (clear_installed_tracepoints): Handle static tracepoints.
17013 (cmd_qtdp): Handle static tracepoints.
17014 (probe_marker_at): New.
17015 (cmd_qtstart): Handle static tracepoints.
17016 (response_tracepoint): Handle static tracepoints.
17017 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17018 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17019 (get_context_regcache): Handle static tracepoints.
17020 (do_action_at_tracepoint): Handle static tracepoint actions.
17021 (traceframe_find_block_type): Handle static trace data blocks.
17022 (traceframe_read_sdata): New.
17023 (download_tracepoints): Download static tracepoint actions.
17024 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17025 (GDB_PROBE_NAME): New.
17026 (ust_ops): New.
17027 (GET_UST_SYM): New.
17028 (USTF): New.
17029 (dlsym_ust): New.
17030 (ust_marker_to_static_tracepoint): New.
17031 (gdb_probe): New.
17032 (collect_ust_data_at_tracepoint): New.
17033 (gdb_ust_probe): New.
17034 (UNIX_PATH_MAX, SOCK_DIR): New.
17035 (gdb_ust_connect_sync_socket): New.
17036 (resume_thread, stop_thread): New.
17037 (run_inferior_command): New.
17038 (init_named_socket): New.
17039 (gdb_ust_socket_init): New.
17040 (cstr_to_hexstr): New.
17041 (next_st): New.
17042 (first_marker, next_marker): New.
17043 (response_ust_marker): New.
17044 (cmd_qtfstm, cmd_qtsstm): New.
17045 (unprobe_marker_at, probe_marker_at): New.
17046 (cmd_qtstmat, gdb_ust_thread): New.
17047 (gdb_ust_init): New.
17048 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17049 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17050 (ST_REGENTRY): New.
17051 (x86_64_st_collect_regmap): New.
17052 (X86_64_NUM_ST_COLLECT_GREGS): New.
17053 (AMD64_RIP_REGNUM): New.
17054 (supply_static_tracepoint_registers): New.
17055 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17056 (ST_REGENTRY): New.
17057 (i386_st_collect_regmap): New.
17058 (i386_NUM_ST_COLLECT_GREGS): New.
17059 (supply_static_tracepoint_registers): New.
17060 * server.c (handle_query): Handle qXfer:statictrace:read.
17061 <qSupported>: Report support for StaticTracepoints, and
17062 qXfer:statictrace:read features.
17063 * server.h (traceframe_read_sdata)
17064 (supply_static_tracepoint_registers): Declare.
17065 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17066 (unpack_varlen_hex): Include in IPA build.
17067 * Makefile.in (ustlibs, ustinc): New.
17068 (IPA_OBJS): Add remote-utils-ipa.o.
17069 ($(IPA_LIB)): Link -ldl and -lpthread.
17070 (UST_CFLAGS): New.
17071 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17072 * config.in, configure: Regenerate.
17073
17074 2010-06-20 Ian Lance Taylor <iant@google.com>
17075 Pedro Alves <pedro@codesourcery.com>
17076
17077 * linux-x86-low.c (always_true): Delete.
17078 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17079 trying to fool the compiler with always_true.
17080
17081 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17082
17083 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17084 conditions in gdbserver.
17085
17086 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17087
17088 * spu-low.c (spu_read_memory): Wrap around local store limit.
17089 (spu_write_memory): Likewise.
17090
17091 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17092
17093 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17094 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17095 LONGEST uses.
17096 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17097 uses.
17098 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17099 uses with LONGEST uses.
17100
17101 2010-06-14 Stan Shebs <stan@codesourcery.com>
17102 Pedro Alves <pedro@codesourcery.com>
17103
17104 Bytecode compiler.
17105
17106 * linux-x86-low.c: Include limits.h.
17107 (add_insns): New.
17108 (always_true): New.
17109 (EMIT_ASM): New.
17110 (EMIT_ASM32): New.
17111 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17112 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17113 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17114 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17115 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17116 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17117 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17118 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17119 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17120 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17121 (amd64_emit_void_call_2): New.
17122 (amd64_emit_ops): New.
17123 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17124 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17125 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17126 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17127 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17128 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17129 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17130 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17131 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17132 (i386_emit_stack_adjust, i386_emit_int_call_1)
17133 (i386_emit_void_call_2): New.
17134 (i386_emit_ops): New.
17135 (x86_emit_ops): New.
17136 (the_low_target): Install x86_emit_ops.
17137 * server.h (struct emit_ops): New.
17138 (get_raw_reg_func_addr): Declare.
17139 (current_insn_ptr, emit_error): Declare.
17140 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17141 (set_trace_state_variable_value): New defines.
17142 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17143 addr_get_trace_state_variable_value and
17144 addr_set_trace_state_variable_value.
17145 (symbol_list): New fields for get_raw_reg,
17146 get_trace_state_variable_value and set_trace_state_variable_value.
17147 (condfn): New typedef.
17148 (struct tracepoint): New field `compiled_cond'.
17149 (do_action_at_tracepoint): Clear compiled_cond.
17150 (get_trace_state_variable_value, set_trace_state_variable_value):
17151 Export in the IPA.
17152 (condition_true_at_tracepoint): If there's a compiled condition,
17153 run that.
17154 (current_insn_ptr, emit_error): New globals.
17155 (struct bytecode_address): New.
17156 (get_raw_reg_func_addr): New.
17157 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17158 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17159 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17160 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17161 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17162 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17163 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17164 (compile_tracepoint_condition, compile_bytecodes): New.
17165 * target.h (emit_ops): Forward declare.
17166 (struct target_ops): New field emit_ops.
17167 (target_emit_ops): New.
17168 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17169 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17170 * linux-low.c (linux_emit_ops): New.
17171 (linux_target_ops): Install it.
17172 * linux-low.h (struct linux_target_ops): New field emit_ops.
17173
17174 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17175
17176 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17177 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17178
17179 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17180 Stan Shebs <stan@codesourcery.com>
17181
17182 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17183 (all): Depend on $(extra_libraries).
17184 (install-only): Install the IPA.
17185 (IPA_OBJS, IPA_LIB): New.
17186 (clean): Remove the IPA lib.
17187 (IPAGENT_CFLAGS): New.
17188 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17189 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17190 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17191 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17192 * configure.ac: Check for atomic builtins support in the compiler.
17193 (IPA_DEPFILES, extra_libraries): Define.
17194 * configure.srv (ipa_obj): Add description.
17195 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17196 (i[34567]86-*-linux*): Set ipa_obj.
17197 (x86_64-*-linux*): Set ipa_obj.
17198 * linux-low.c (stabilizing_threads): New.
17199 (supports_fast_tracepoints): New.
17200 (linux_detach): Stabilize threads before detaching.
17201 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17202 the lwp is either not stabilizing, or is moving out of a jump pad.
17203 (linux_fast_tracepoint_collecting): New.
17204 (maybe_move_out_of_jump_pad): New.
17205 (enqueue_one_deferred_signal): New.
17206 (dequeue_one_deferred_signal): New.
17207 (linux_wait_for_event_1): If moving out of a jump pad, defer
17208 pending signals to later.
17209 (linux_stabilize_threads): New.
17210 (linux_wait_1): Check if threads need moving out of jump pads, and
17211 do it if so.
17212 (stuck_in_jump_pad_callback): New.
17213 (move_out_of_jump_pad_callback): New.
17214 (lwp_running): New.
17215 (linux_resume_one_lwp): Handle moving out of jump pads.
17216 (linux_set_resume_request): Dequeue deferred signals.
17217 (need_step_over_p): Also step over fast tracepoint jumps.
17218 (start_step_over): Also uninsert fast tracepoint jumps.
17219 (finish_step_over): Also reinsert fast tracepoint jumps.
17220 (linux_install_fast_tracepoint_jump): New.
17221 (linux_target_ops): Install linux_stabilize_threads and
17222 linux_install_fast_tracepoint_jump_pad.
17223 * linux-low.h (linux_target_ops) <get_thread_area,
17224 install_fast_tracepoint_jump_pad>: New fields.
17225 (struct lwp_info) <collecting_fast_tracepoint,
17226 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17227 (linux_get_thread_area): Declare.
17228 * linux-x86-low.c (jump_insn): New.
17229 (x86_get_thread_area): New.
17230 (append_insns): New.
17231 (push_opcode): New.
17232 (amd64_install_fast_tracepoint_jump_pad): New.
17233 (i386_install_fast_tracepoint_jump_pad): New.
17234 (x86_install_fast_tracepoint_jump_pad): New.
17235 (the_low_target): Install x86_get_thread_area and
17236 x86_install_fast_tracepoint_jump_pad.
17237 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17238 (struct fast_tracepoint_jump): New.
17239 (fast_tracepoint_jump_insn): New.
17240 (fast_tracepoint_jump_shadow): New.
17241 (find_fast_tracepoint_jump_at): New.
17242 (fast_tracepoint_jump_here): New.
17243 (delete_fast_tracepoint_jump): New.
17244 (set_fast_tracepoint_jump): New.
17245 (uninsert_fast_tracepoint_jumps_at): New.
17246 (reinsert_fast_tracepoint_jumps_at): New.
17247 (set_breakpoint_at): Use write_inferior_memory.
17248 (uninsert_raw_breakpoint): Use write_inferior_memory.
17249 (check_mem_read): Mask out fast tracepoint jumps.
17250 (check_mem_write): Mask out fast tracepoint jumps.
17251 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17252 (set_fast_tracepoint_jump): Declare.
17253 (delete_fast_tracepoint_jump)
17254 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17255 (reinsert_fast_tracepoint_jumps_at): Declare.
17256 * regcache.c: Don't compile many functions when building the
17257 in-process agent library.
17258 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17259 the register buffer in the heap.
17260 (free_register_cache): If the register buffer isn't owned by the
17261 regcache, don't free it.
17262 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17263 pre-existing register caches.
17264 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17265 type.
17266 (convert_ascii_to_int): : Constify `from' parameter type.
17267 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17268 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17269 the needed buffer in-place.
17270 (relocate_instruction): New.
17271 * server.c (handle_query) <qSymbols>: If the target supports
17272 tracepoints, give it a chance of looking up symbols. Report
17273 support for fast tracepoints.
17274 (handle_status): Stabilize threads.
17275 (process_serial_event): Adjust.
17276 * server.h (struct fast_tracepoint_jump): Forward declare.
17277 (struct process_info) <fast_tracepoint_jumps>: New field.
17278 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17279 (decode_X_packet, decode_M_packet): Adjust.
17280 (relocate_instruction): Declare.
17281 (in_process_agent_loaded): Declare.
17282 (tracepoint_look_up_symbols): Declare.
17283 (struct fast_tpoint_collect_status): Declare.
17284 (fast_tracepoint_collecting): Declare.
17285 (force_unlock_trace_buffer): Declare.
17286 (handle_tracepoint_bkpts): Declare.
17287 (initialize_low_tracepoint)
17288 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17289 * target.h (struct target_ops) <stabilize_threads,
17290 install_fast_tracepoint_jump_pad>: New fields.
17291 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17292 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17293 [HAVE_STDINT_H]: Include stdint.h.
17294 (trace_debug_1): Rename to ...
17295 (trace_vdebug): ... this.
17296 (trace_debug): Rename to ...
17297 (trace_debug_1): ... this. Add `level' parameter.
17298 (trace_debug): New.
17299 (ATTR_USED, ATTR_NOINLINE): New.
17300 (IP_AGENT_EXPORT): New.
17301 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17302 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17303 (about_to_request_buffer_space, trace_buffer_is_full)
17304 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17305 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17306 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17307 (traceframe_write_count, traceframes_created)
17308 (trace_state_variables)
17309 New renaming defines.
17310 (struct ipa_sym_addresses): New.
17311 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17312 (symbol_list): New.
17313 (ipa_sym_addrs): New.
17314 (all_tracepoint_symbols_looked_up): New.
17315 (in_process_agent_loaded): New.
17316 (write_e_ipa_not_loaded): New.
17317 (maybe_write_ipa_not_loaded): New.
17318 (tracepoint_look_up_symbols): New.
17319 (debug_threads) [IN_PROCESS_AGENT]: New.
17320 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17321 (UNKNOWN_SIDE_EFFECTS): New.
17322 (stop_tracing): New.
17323 (flush_trace_buffer): New.
17324 (stop_tracing_bkpt): New.
17325 (flush_trace_buffer_bkpt): New.
17326 (read_inferior_integer): New.
17327 (read_inferior_uinteger): New.
17328 (read_inferior_data_pointer): New.
17329 (write_inferior_data_pointer): New.
17330 (write_inferior_integer): New.
17331 (write_inferior_uinteger): New.
17332 (struct collect_static_trace_data_action): Delete.
17333 (enum tracepoint_type): New.
17334 (struct tracepoint) <type>: New field `type'.
17335 <actions_str, step_actions, step_actions_str>: Only include in
17336 GDBserver.
17337 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17338 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17339 (tracepoints): Use IP_AGENT_EXPORT.
17340 (last_tracepoint): Don't include in the IPA.
17341 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17342 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17343 (alloced_trace_state_variables): New.
17344 (trace_state_variables): Use IP_AGENT_EXPORT.
17345 (traceframe_t): Delete unused variable.
17346 (circular_trace_buffer): Don't include in the IPA.
17347 (trace_buffer_start): Delete.
17348 (struct trace_buffer_control): New.
17349 (trace_buffer_free): Delete.
17350 (struct ipa_trace_buffer_control): New.
17351 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17352 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17353 New.
17354 (trace_buffer_ctrl): New.
17355 (TRACE_BUFFER_CTRL_CURR): New.
17356 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17357 Reimplement as macros.
17358 (trace_buffer_wrap): Delete.
17359 (traceframe_write_count, traceframe_read_count)
17360 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17361 (struct tracepoint_hit_ctx) <type>: New field.
17362 (struct fast_tracepoint_ctx): New.
17363 (memory_barrier): New.
17364 (cmpxchg): New.
17365 (record_tracepoint_error): Update atomically in the IPA.
17366 (clear_inferior_trace_buffer): New.
17367 (about_to_request_buffer_space): New.
17368 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17369 updating the same buffer.
17370 (add_tracepoint): Default the tracepoint's type to trap
17371 tracepoint, and orig_size to -1.
17372 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17373 internal variables.
17374 (create_trace_state_variable): New parameter `gdb'. Handle it.
17375 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17376 (cmd_qtdp): Handle fast tracepoints.
17377 (cmd_qtdv): Adjust.
17378 (max_jump_pad_size): New.
17379 (gdb_jump_pad_head): New.
17380 (get_jump_space_head): New.
17381 (claim_jump_space): New.
17382 (sort_tracepoints): New.
17383 (MAX_JUMP_SIZE): New.
17384 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17385 IPA.
17386 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17387 support. Upload fast traceframes, and delete internal IPA
17388 breakpoints.
17389 (stop_tracing_handler): New.
17390 (flush_trace_buffer_handler): New.
17391 (cmd_qtstop): Upload fast tracepoints.
17392 (response_tracepoint): Handle fast tracepoints.
17393 (tracepoint_finished_step): Upload fast traceframes. Set the
17394 tracepoint hit context's tracepoint type.
17395 (handle_tracepoint_bkpts): New.
17396 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17397 type. Add comment about fast tracepoints.
17398 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17399 non-existing action_str field.
17400 (get_context_regcache): Handle fast tracepoints.
17401 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17402 to the regcache.
17403 (fast_tracepoint_from_jump_pad_address): New.
17404 (fast_tracepoint_from_ipa_tpoint_address): New.
17405 (collecting_t): New.
17406 (force_unlock_trace_buffer): New.
17407 (fast_tracepoint_collecting): New.
17408 (collecting): New.
17409 (gdb_collect): New.
17410 (write_inferior_data_ptr): New.
17411 (target_tp_heap): New.
17412 (target_malloc): New.
17413 (download_agent_expr): New.
17414 (UALIGN): New.
17415 (download_tracepoints): New.
17416 (download_trace_state_variables): New.
17417 (upload_fast_traceframes): New.
17418 (IPA_FIRST_TRACEFRAME): New.
17419 (IPA_NEXT_TRACEFRAME_1): New.
17420 (IPA_NEXT_TRACEFRAME): New.
17421 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17422 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17423 (gdb_jump_pad_buffer_end): New.
17424 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17425 (initialize_tracepoint): Adjust.
17426 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17427 buffer. Initialize the low module.
17428 * utils.c (PREFIX, TOOLNAME): New.
17429 (malloc_failure): Use PREFIX.
17430 (error): In the IPA, an error causes an exit.
17431 (fatal, warning): Use PREFIX.
17432 (internal_error): Use TOOLNAME.
17433 (NUMCELLS): Increase to 10.
17434 * configure, config.in: Regenerate.
17435
17436 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17437
17438 * server.c (handle_query) <qSupported>: Do two passes over the
17439 qSupported string to avoid nesting strtok.
17440
17441 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17442
17443 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17444 (CDEPS): New.
17445 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17446 -Wl,--dynamic-list.
17447 * configure: Regenerate.
17448 * proc-service.list: New.
17449
17450 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17451
17452 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17453 New comment.
17454
17455 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17456
17457 * gdbreplay.c (remote_open): Check error return from socket() call by
17458 its equality to -1 not by it being negative.
17459 * remote-utils.c (remote_open): Likewise.
17460
17461 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17462
17463 * config.h: Regenerate.
17464
17465 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17466
17467 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17468 doesn't provide PTRACE_GET_THREAD_AREA.
17469
17470 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17471
17472 * linux-m68k-low.c: Include <asm/ptrace.h>
17473 (ps_get_thread_area): Implement.
17474
17475 2010-05-03 Doug Evans <dje@google.com>
17476
17477 * event-loop.c (struct callback_event): New struct.
17478 (callback_list): New global.
17479 (append_callback_event, delete_callback_event): New functions.
17480 (process_callback): New function.
17481 (start_event_loop): Call it.
17482 * remote-utils.c (NOT_SCHEDULED): Define.
17483 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17484 moved out of readchar.
17485 (readchar): Rewrite. Call reschedule before returning.
17486 (reset_readchar): New function.
17487 (remote_close): Call it.
17488 (process_remaining, reschedule): New functions.
17489 * server.h (callback_handler_func): New typedef.
17490 (append_callback_event, delete_callback_event): Declare.
17491
17492 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17493
17494 * proc-service.c (ps_pglobal_lookup): Use
17495 thread_db_look_up_one_symbol.
17496 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17497 parameter. Use it instead of all_symbols_looked_up.
17498 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17499 field.
17500 (all_symbols_looked_up): Don't declare.
17501 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17502 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17503 field.
17504 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17505 Set all_symbols_looked_up here.
17506 (thread_db_look_up_one_symbol): New.
17507 (thread_db_get_tls_address): Adjust.
17508 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17509 thread_db object on the heap, and tentatively set it in the
17510 process structure.
17511 (thread_db_init): Don't set all_symbols_looked_up here.
17512 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17513
17514 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17515
17516 * linux-low.c (linux_kill, linux_detach): Adjust.
17517 (status_pending_p_callback): Remove redundant statement. Check
17518 for !TARGET_WAITIKIND_IGNORE, instead of
17519 TARGET_WAITKIND_STOPPED.
17520 (handle_tracepoints): Make sure LWP is locked. Adjust.
17521 (linux_wait_for_event_1): Adjust.
17522 (linux_cancel_breakpoints): New.
17523 (unsuspend_one_lwp): New.
17524 (unsuspend_all_lwps): New.
17525 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17526 (send_sigstop_callback): Change return type to int, add new
17527 `except' parameter and handle it.
17528 (suspend_and_send_sigstop_callback): New.
17529 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17530 pass them down. If SUSPEND, also increment the lwp's suspend
17531 count.
17532 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17533 (need_step_over_p): Don't consider suspended LWPs.
17534 (start_step_over): Adjust.
17535 (proceed_one_lwp): Change return type to int, add new `except'
17536 parameter and handle it.
17537 (unsuspend_and_proceed_one_lwp): New.
17538 (proceed_all_lwps): Use find_inferior instead of
17539 for_each_inferior.
17540 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17541 also decrement the suspend count of LWPs. Pass `except' down,
17542 instead of hacking its suspend count.
17543 (linux_pause_all): Add `freeze' parameter. Adjust.
17544 (linux_unpause_all): New.
17545 (linux_target_ops): Install linux_unpause_all.
17546 * server.c (handle_status): Adjust.
17547 * target.h (struct target_ops): New fields `unpause_all' and
17548 `cancel_breakpoints'. Add new parameter to `pause_all'.
17549 (pause_all): Add new `freeze' parameter.
17550 (unpause_all): New.
17551 (cancel_breakpoints): New.
17552 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17553 cancel breakpoints.
17554 (cmd_qtstart): Pause threads.
17555 (stop_tracing): Pause threads, and cancel breakpoints.
17556 * win32-low.c (win32_target_ops): Adjust.
17557
17558 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17559
17560 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17561 the inferior right away from here...
17562 (linux_wait_1): ... to here, and adjust to check the thread's
17563 last_resume_kind instead of the lwp's step or stop_expected flags.
17564
17565 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17566
17567 * README: Use consistent `GDB' and `GDBserver' spellings.
17568
17569 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17570
17571 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17572 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17573 (linux_detach_one_lwp): Assume the lwp is stopped.
17574 (any_thread_of): Delete.
17575 (linux_detach): Stop all lwps here. Don't blindly delete all
17576 breakpoints.
17577 (delete_lwp_callback): New.
17578 (linux_mourn): Delete all lwps of the process that is gone.
17579 (linux_wait_1): Don't delete the last lwp of the process here.
17580 * mem-break.h (mark_breakpoints_out): Declare.
17581 * mem-break.c (mark_breakpoints_out): New.
17582 (free_all_breakpoints): Use it.
17583 * server.c (handle_target_event): If the process is gone, mark
17584 breakpoints out.
17585 * thread-db.c (struct thread_db) <create_bp>: New field.
17586 (thread_db_enable_reporting): Fix prototype. Store a thread event
17587 breakpoint reference in the thread_db struct.
17588 (thread_db_load_search): Clear the thread_db object.
17589 (try_thread_db_load_1): Ditto.
17590 (switch_to_process): New.
17591 (disable_thread_event_reporting): Use it.
17592 (remove_thread_event_breakpoints): New.
17593 (thread_db_detach, thread_db_mourn): Use it.
17594
17595 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17596
17597 * linux-low.c (linux_enable_event_reporting): New.
17598 (linux_wait_for_event_1, handle_extended_wait): Use it.
17599
17600 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17601
17602 * linux-low.c (linux_kill_one_lwp, linux_kill)
17603 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17604 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17605 SIGSTOP even if the LWP is stopped.
17606 (send_sigstop_callback): New.
17607 (stop_all_lwps): Use send_sigstop_callback instead.
17608 (linux_resume_one_thread): Adjust.
17609 (proceed_one_lwp): Still proceed an LWP that the client has
17610 requested to stop, if we haven't reported it as stopped yet. Make
17611 sure that LWPs the client want stopped, have a pending SIGSTOP.
17612
17613 2010-04-26 Doug Evans <dje@google.com>
17614
17615 * server.c (handle_general_set): Make static.
17616
17617 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17618 Print received char after testing for error/eof instead of before.
17619 (input_interrupt): Tweak comment.
17620
17621 2010-04-23 Doug Evans <dje@google.com>
17622
17623 * server.c (start_inferior): Print inferior argv if --debug.
17624
17625 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17626
17627 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17628 * nto-x86-low.c: Include server.h
17629
17630 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17631
17632 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17633 be consistent with other sources of this directory.
17634 (init_registers_amd64): Correct name of source file of this function
17635 in the comment.
17636
17637 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17638
17639 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17640 64-bit executables.
17641
17642 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17643
17644 * win32-i386-low.c: Add 64-bit support.
17645 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17646 (init_registers_amd64): Declare.
17647 (mappings): Add 64-bit version of array.
17648 (init_windows_x86): New function.
17649 (the_low_target): Change init_arch field to init_windows_x86.
17650
17651 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17652
17653 * win32-low.c: Adapt to support also 64-bit architecture.
17654 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17655 (get_image_name): Use SIZE_T type for local variable `done'.
17656 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17657 (toolhelp_get_dll_name): Idem.
17658 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17659 Use uintptr_t typecast to avoid warning.
17660 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17661 (handle_exception): Use phex_nz to avoid warning.
17662 (win32_wait): Remove unused local variable `process'.
17663
17664 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17665
17666 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17667 `amd64-avx.o'.
17668
17669 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17670
17671 * configure.ac: Use `ws2_32' library for srv_mingw.
17672 * configure: Regenerate.
17673 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17674 * remote-utils.c: Likewise.
17675
17676 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17677
17678 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17679 if __x86_64__ is defined.
17680
17681 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17682
17683 * configure: Regenerate.
17684
17685 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17686
17687 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17688 * target.h (target_ops): New get_tib_address field.
17689 * win32-low.h (win32_thread_info): Add thread_local_base field.
17690 * win32-low.c (child_add_thread): Add tlb argument.
17691 Set thread_local_base field to TLB.
17692 (get_child_debug_event): Adapt to child_add_thread change.
17693 (win32_get_tib_address): New function.
17694 (win32_target_ops): Set get_tib_address field to
17695 win32_get_tib_address.
17696 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17697
17698 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17699
17700 * linux-low.c (linux_mourn): Also remove the process.
17701 * server.c (handle_target_event): Don't remove the process here.
17702 * nto-low.c (nto_mourn): New.
17703 (nto_target_ops): Install it.
17704 * spu-low.c (spu_mourn): New.
17705 (spu_target_ops): Install it.
17706 * win32-low.c (win32_mourn): New.
17707 (win32_target_ops): Install it.
17708
17709 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17710
17711 * server.h (buffer_xml_printf): Remove redundant `;'.
17712
17713 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17714
17715 * regcache.c (set_register_cache): Invalidate regcaches before
17716 changing the register cache layout.
17717 (regcache_invalidate_one): Allow a NULL regcache.
17718 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17719 regcaches before changing the register cache layout or the target
17720 regsets.
17721
17722 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17723
17724 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17725 variable warning on Linux/x86-64.
17726
17727 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17728
17729 GDBserver disconnected tracing support.
17730
17731 * linux-low.c (linux_remove_process): Delete.
17732 (add_lwp): Don't set last_resume_kind here.
17733 (linux_kill): Use `mourn'.
17734 (linux_detach): Use `thread_db_detach', and `mourn'.
17735 (linux_mourn): New.
17736 (linux_attach_lwp_1): Adjust comment.
17737 (linux_attach): last_resume_kind moved the thread_info; adjust.
17738 (status_pending_p_callback): Adjust.
17739 (linux_wait_for_event_1): Adjust.
17740 (count_events_callback, select_singlestep_lwp_callback)
17741 (select_event_lwp_callback, cancel_breakpoints_callback)
17742 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17743 (proceed_one_lwp): Adjust.
17744 (linux_async): Add debug output.
17745 (linux_thread_stopped): New.
17746 (linux_pause_all): New.
17747 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17748 linux_pause_all.
17749 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17750 (thread_db_free): Delete declaration.
17751 (thread_db_detach, thread_db_mourn): Declare.
17752 * thread-db.c (thread_db_init): Use thread_db_mourn.
17753 (thread_db_free): Delete, split in two.
17754 (disable_thread_event_reporting): New.
17755 (thread_db_detach): New.
17756 (thread_db_mourn): New.
17757
17758 * server.h (struct thread_info) <last_resume_kind>: New field.
17759 <attached>: Add comment.
17760 <gdb_detached>: New field.
17761 (handler_func): Change return type to int.
17762 (handle_serial_event, handle_target_event): Ditto.
17763 (gdb_connected): Declare.
17764 (tracing): Delete.
17765 (disconnected_tracing): Declare.
17766 (stop_tracing): Declare.
17767
17768 * server.c (handle_query) <qSupported>: Report support for
17769 disconnected tracing.
17770 (queue_stop_reply_callback): Account for running threads.
17771 (gdb_wants_thread_stopped): New.
17772 (gdb_wants_all_threads_stopped): New.
17773 (gdb_reattached_process): New.
17774 (handle_status): Clear the `gdb_detached' flag of all processes.
17775 In all-stop, stop all threads.
17776 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17777 (process_serial_event): If the remote connection breaks, or if an
17778 exit was forced with "monitor exit", force an event loop exit.
17779 Handle disconnected tracing on detach.
17780 (handle_serial_event): Adjust.
17781 (handle_target_event): If GDB isn't connected, forward events back
17782 to the inferior, unless the last process exited, in which case,
17783 exit gdbserver. Adjust interface.
17784
17785 * remote-utils.c (remote_open): Don't block in accept. Instead
17786 register an event loop source on the listen socket file
17787 descriptor. Refactor bits into ...
17788 (listen_desc): ... this new global.
17789 (gdb_connected): ... this new function.
17790 (enable_async_notification): ... this new function.
17791 (handle_accept_event): ... this new function.
17792 (remote_close): Clear remote_desc.
17793
17794 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17795
17796 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17797 New fields.
17798 (mourn_inferior): Define.
17799 (target_process_qsupported): Avoid the dangling else problem.
17800 (thread_stopped): Define.
17801 (pause_all): Define.
17802 (target_waitstatus_to_string): Declare.
17803 * target.c (target_waitstatus_to_string): New.
17804
17805 * tracepoint.c (tracing): Make extern.
17806 (disconnected_tracing): New.
17807 (stop_tracing): Make extern. Handle tracing stops due to GDB
17808 disconnecting.
17809 (cmd_qtdisconnected): New.
17810 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17811 (handle_tracepoint_general_set): Handle QTDisconnected.
17812
17813 * event-loop.c (event_handler_func): Change return type to int.
17814 (process_event): Bail out if the event handler wants the event
17815 loop to stop.
17816 (handle_file_event): Ditto.
17817 (start_event_loop): Bail out if the event handler wants the event
17818 loop to stop.
17819
17820 * nto-low.c (nto_target_ops): Adjust.
17821 * spu-low.c (spu_wait): Don't remove the process here.
17822 (spu_target_ops): Adjust.
17823 * win32-low.c (win32_wait): Don't remove the process here.
17824 (win32_target_ops): Adjust.
17825
17826 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17827
17828 * regcache.c (realloc_register_cache): Invalidate inferior's
17829 regcache before recreating it.
17830
17831 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17832
17833 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17834
17835 2010-04-09 Stan Shebs <stan@codesourcery.com>
17836 Pedro Alves <pedro@codesourcery.com>
17837
17838 * server.h (LONGEST): New.
17839 (struct thread_info) <while_stepping>: New field.
17840 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17841 Declare.
17842 (initialize_tracepoint, handle_tracepoint_general_set)
17843 (handle_tracepoint_query, tracepoint_finished_step)
17844 (tracepoint_was_hit, release_while_stepping_state_list):
17845 (current_traceframe): Declare.
17846 * server.c (handle_general_set): Handle tracepoint packets.
17847 (read_memory): New.
17848 (write_memory): New.
17849 (handle_search_memory_1): Use read_memory.
17850 (handle_query): Report support for conditional tracepoints, trace
17851 state variables, and tracepoint sources. Handle tracepoint
17852 queries.
17853 (main): Initialize the tracepoints module.
17854 (process_serial_event): Handle traceframe reads/writes.
17855
17856 * linux-low.c (handle_tracepoints): New.
17857 (linux_wait_1): Call it.
17858 (linux_resume_one_lwp): Handle while-stepping.
17859 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17860 (linux_target_ops): Install them.
17861 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17862 New field.
17863 * linux-x86-low.c (x86_supports_tracepoints): New.
17864 (the_low_target). Install it.
17865
17866 * mem-break.h (delete_breakpoint): Declare.
17867 * mem-break.c (delete_breakpoint): Make external.
17868
17869 * target.h (struct target_ops): Add `supports_tracepoints',
17870 `read_pc', and `write_pc' fields.
17871 (target_supports_tracepoints): Define.
17872 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17873 (phex_nz): New.
17874
17875 * regcache.h (struct regcache) <registers_owned>: New field.
17876 (init_register_cache, regcache_cpy): Declare.
17877 (regcache_read_pc, regcache_write_pc): Declare.
17878 (register_cache_size): Declare.
17879 (supply_regblock): Declare.
17880 * regcache.c (init_register_cache): New.
17881 (new_register_cache): Use it.
17882 (regcache_cpy): New.
17883 (register_cache_size): New.
17884 (supply_regblock): New.
17885 (regcache_read_pc, regcache_write_pc): New.
17886
17887 * tracepoint.c: New.
17888
17889 * Makefile.in (OBS): Add tracepoint.o.
17890 (tracepoint.o): New rule.
17891
17892 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17893
17894 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17895 (i386-mmx.o): New.
17896 (i386-mmx.c): Likewise.
17897 (i386-mmx-linux.o): Likewise.
17898 (i386-mmx-linux.c): Likewise.
17899
17900 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17901 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17902 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17903 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17904
17905 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17906 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17907 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17908
17909 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17910
17911 * Makefile.in (clean): Updated.
17912 (i386-avx.o): New.
17913 (i386-avx.c): Likewise.
17914 (i386-avx-linux.o): Likewise.
17915 (i386-avx-linux.c): Likewise.
17916 (amd64-avx.o): Likewise.
17917 (amd64-avx.c): Likewise.
17918 (amd64-avx-linux.o): Likewise.
17919 (amd64-avx-linux.c): Likewise.
17920
17921 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17922 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17923 (srv_amd64_regobj): Add amd64-avx.o.
17924 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17925 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17926 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17927 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17928 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17929 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17930 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17931
17932 * i387-fp.c: Include "i386-xstate.h".
17933 (i387_xsave): New.
17934 (i387_cache_to_xsave): Likewise.
17935 (i387_xsave_to_cache): Likewise.
17936 (x86_xcr0): Likewise.
17937
17938 * i387-fp.h (i387_cache_to_xsave): Likewise.
17939 (i387_xsave_to_cache): Likewise.
17940 (x86_xcr0): Likewise.
17941
17942 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17943 * linux-crisv32-low.c (target_regsets): Likewise.
17944 * linux-m68k-low.c (target_regsets): Likewise.
17945 * linux-mips-low.c (target_regsets): Likewise.
17946 * linux-ppc-low.c (target_regsets): Likewise.
17947 * linux-s390-low.c (target_regsets): Likewise.
17948 * linux-sh-low.c (target_regsets): Likewise.
17949 * linux-sparc-low.c (target_regsets): Likewise.
17950 * linux-xtensa-low.c (target_regsets): Likewise.
17951
17952 * linux-low.c: Include <sys/uio.h>.
17953 (regsets_fetch_inferior_registers): Support nt_type.
17954 (regsets_store_inferior_registers): Likewise.
17955 (linux_process_qsupported): New.
17956 (linux_target_ops): Add linux_process_qsupported.
17957
17958 * linux-low.h (regset_info): Add nt_type.
17959 (linux_target_ops): Add process_qsupported.
17960
17961 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17962 and <sys/uio.h>.
17963 (init_registers_i386_avx_linux): New.
17964 (init_registers_amd64_avx_linux): Likewise.
17965 (xmltarget_i386_linux_no_xml): Likewise.
17966 (xmltarget_amd64_linux_no_xml): Likewise.
17967 (PTRACE_GETREGSET): Likewise.
17968 (PTRACE_SETREGSET): Likewise.
17969 (x86_fill_xstateregset): Likewise.
17970 (x86_store_xstateregset): Likewise.
17971 (use_xml): Likewise.
17972 (x86_linux_update_xmltarget): Likewise.
17973 (x86_linux_process_qsupported): Likewise.
17974 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17975 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17976 init_registers_i386_linux here. Call
17977 x86_linux_update_xmltarget.
17978 (the_low_target): Add x86_linux_process_qsupported.
17979
17980 * server.c (handle_query): Call target_process_qsupported.
17981
17982 * target.h (target_ops): Add process_qsupported.
17983 (target_process_qsupported): New.
17984
17985 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17986
17987 * inferiors.c (add_thread): Set last_status kind to
17988 TARGET_WAITKIND_IGNORE.
17989 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17990 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17991 (linux_wait_1): Move `thread' local definition to block that uses
17992 it. Don't NULL initialize `event_child'.
17993 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17994 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17995 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17996
17997 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17998
17999 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18000 an extended waitstatus, or by a watchpoint.
18001 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18002 thread was stepping or has been stopped by a watchpoint.
18003
18004 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18005
18006 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18007 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18008 of another, then delete the previous, and validate all
18009 breakpoints.
18010 (validate_inserted_breakpoint): New.
18011 (delete_disabled_breakpoints): New.
18012 (validate_breakpoints): New.
18013 (check_mem_read): Validate breakpoints before trusting their
18014 shadow. Delete disabled breakpoints.
18015 (check_mem_write): Validate breakpoints before trusting they
18016 should be inserted. Delete disabled breakpoints.
18017 * mem-break.h (validate_breakpoints):
18018 * server.c (handle_query): Validate breakpoints when we see a
18019 qSymbol query.
18020
18021 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18022
18023 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18024 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18025 if we could tell there's a GDB breakpoint at stop_pc.
18026 (need_step_over_p): Don't do a step over if we find a GDB
18027 breakpoint at the resume PC.
18028
18029 * mem-break.c (struct raw_breakpoint): New.
18030 (enum bkpt_type): New type `gdb_breakpoint'.
18031 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18032 fields. New field `raw'.
18033 (find_raw_breakpoint_at): New.
18034 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18035 breakpoint instead.
18036 (set_breakpoint_at): Adjust.
18037 (delete_raw_breakpoint): New.
18038 (release_breakpoint): New.
18039 (delete_breakpoint): Rename to...
18040 (delete_breakpoint_1): ... this. Add proc parameter. Use
18041 release_breakpoint. Return ENOENT.
18042 (delete_breakpoint): Reimplement.
18043 (find_breakpoint_at): Delete.
18044 (find_gdb_breakpoint_at): New.
18045 (delete_breakpoint_at): Delete.
18046 (set_gdb_breakpoint_at): New.
18047 (delete_gdb_breakpoint_at): New.
18048 (gdb_breakpoint_here): New.
18049 (set_reinsert_breakpoint): Use release_breakpoint.
18050 (uninsert_breakpoint): Rename to ...
18051 (uninsert_raw_breakpoint): ... this.
18052 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18053 (reinsert_raw_breakpoint): Change parameter type to
18054 raw_breakpoint.
18055 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18056 instead.
18057 (check_breakpoints): Adjust. Use release_breakpoint.
18058 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18059 (breakpoint_inserted_here): Ditto.
18060 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18061 Don't trust the breakpoint's shadow if it is not inserted.
18062 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18063 (delete_all_breakpoints): Adjust.
18064 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18065 use delete_breakpoint_1.
18066
18067 * mem-break.h (breakpoints_supported): Delete declaration.
18068 (set_gdb_breakpoint_at): Declare.
18069 (gdb_breakpoint_here): Declare.
18070 (delete_breakpoint_at): Delete.
18071 (delete_gdb_breakpoint_at): Declare.
18072
18073 * server.h (struct raw_breakpoint): Forward declare.
18074 (struct process_info): New field `raw_breakpoints'.
18075
18076 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18077 breakpoints.
18078
18079 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18080
18081 * linux-low.c (status_pending_p_callback): Fix comment.
18082 (linux_wait_for_event_1): Move most of the internal breakpoint
18083 handling from here...
18084 (linux_wait_1): ... to here.
18085 (count_events_callback): New.
18086 (select_singlestep_lwp_callback): New.
18087 (select_event_lwp_callback): New.
18088 (cancel_breakpoints_callback): New.
18089 (select_event_lwp): New.
18090 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18091 priority to all LWPs that have had events that should be reported
18092 to the client. Cancel breakpoints when about to reporting the
18093 event to the client, not while stopping lwps. No longer cancel
18094 finished single-steps here.
18095 (cancel_finished_single_step): Delete.
18096 (cancel_finished_single_steps): Delete.
18097
18098 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18099
18100 * mem-break.c (enum bkpt_type): New.
18101 (struct breakpoint): New field `type'.
18102 (set_breakpoint_at): Change return type to struct breakpoint
18103 pointer. Set type to `other_breakpoint' by default.
18104 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18105 in the breakpoint list.
18106 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18107 (reinsert_breakpoint): Rename to ...
18108 (reinsert_raw_breakpoint): ... this.
18109 (reinsert_breakpoints_at): Adjust.
18110 * mem-break.h (struct breakpoint): Declare.
18111 (set_breakpoint_at): Change return type to struct breakpoint
18112 pointer.
18113
18114 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18115
18116 * server.c (handle_query): Assign, not compare.
18117
18118 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18119
18120 Teach linux gdbserver to step-over-breakpoints.
18121
18122 * linux-low.c (can_hardware_single_step): New.
18123 (supports_breakpoints): New.
18124 (handle_extended_wait): If stopping threads, read the stop pc of
18125 the new cloned LWP.
18126 (get_pc): New.
18127 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18128 low target doesn't support retrieving the PC.
18129 (add_lwp): Set last_resume_kind to resume_continue.
18130 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18131 (linux_attach): Don't clear stop_expected. Set the lwp's
18132 last_resume_kind to resume_stop.
18133 (linux_detach_one_lwp): Don't check for removed breakpoints.
18134 (check_removed_breakpoint): Delete.
18135 (status_pending_p): Rename to ...
18136 (status_pending_p_callback): ... this. Don't check for removed
18137 breakpoints. Don't consider threads that are stopped from GDB's
18138 perspective.
18139 (linux_wait_for_lwp): Always read the stop_pc here.
18140 (cancel_breakpoint): New.
18141 (step_over_bkpt): New global.
18142 (linux_wait_for_event_1): Implement stepping over breakpoints.
18143 (gdb_wants_lwp_stopped): New.
18144 (gdb_wants_all_stopped): New.
18145 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18146 single-step traps here. Store the thread's last reported target
18147 wait status.
18148 (send_sigstop): Don't clear stop_expected. Always set it,
18149 instead.
18150 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18151 (cancel_finished_single_step): New.
18152 (cancel_finished_single_steps): New.
18153 (wait_for_sigstop): Don't cancel finished single-step traps here.
18154 (linux_resume_one_lwp): Don't check for removed breakpoints.
18155 Don't set `step' on non-hardware step archs.
18156 (linux_set_resume_request): Ignore resume_stop requests if already
18157 stopping or stopped. Set the lwp's last_resume_kind.
18158 (resume_status_pending_p): Don't check for removed breakpoints.
18159 (need_step_over_p): New.
18160 (start_step_over): New.
18161 (finish_step_over): New.
18162 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18163 requests. Clear the thread's last reported target waitstatus.
18164 Don't use the `suspended' flag. Don't consider pending breakpoints.
18165 (linux_resume): Start a step-over if necessary.
18166 (proceed_one_lwp): New.
18167 (proceed_all_lwps): New.
18168 (unstop_all_lwps): New.
18169 * linux-low.h (struct lwp_info): Rewrite comment for the
18170 `suspended' flag. Add the `stop_pc' field. Delete the
18171 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18172 Add `'last_resume_kind' and `need_step_over' fields.
18173 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18174 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18175 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18176 (set_raw_breakpoint_at): New.
18177 (set_breakpoint_at): Rewrite to use it.
18178 (reinsert_breakpoint_handler): Delete.
18179 (set_reinsert_breakpoint): New.
18180 (reinsert_breakpoint_by_bp): Delete.
18181 (delete_reinsert_breakpoints): New.
18182 (uninsert_breakpoint): Rewrite.
18183 (uninsert_breakpoints_at): New.
18184 (reinsert_breakpoint): Rewrite.
18185 (reinsert_breakpoints_at): New.
18186 (check_breakpoints): Rewrite.
18187 (breakpoint_here): New.
18188 (breakpoint_inserted_here): New.
18189 (check_mem_read): Adjust.
18190 * mem-break.h (breakpoints_supported, breakpoint_here)
18191 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18192 (reinsert_breakpoint_by_bp): Delete declaration.
18193 (delete_reinsert_breakpoints): Declare.
18194 (reinsert_breakpoint): Delete declaration.
18195 (reinsert_breakpoints_at): Declare.
18196 (uninsert_breakpoint): Delete declaration.
18197 (uninsert_breakpoints_at): Declare.
18198 (check_breakpoints): Adjust prototype.
18199 * server.h: Adjust include order.
18200 (struct thread_info): Declare here. Add a `last_status' field.
18201
18202 2010-03-23 Michael Snyder <msnyder@vmware.com>
18203
18204 * server.c (crc32): New function.
18205 (handle_query): Add handling for 'qCRC:' request.
18206
18207 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18208
18209 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18210 lwp had been stopped by a watchpoint.
18211
18212 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18213
18214 * server.h (internal_error): Declare.
18215 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18216 * utils.c (internal_error): New function.
18217
18218 2010-03-15 Andreas Schwab <schwab@redhat.com>
18219
18220 * configure.srv: Fix typo setting srv_regobj.
18221
18222 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18223
18224 * linux-low.c (fetch_register): Avoid passing a non string literal
18225 format to `error'.
18226 (usr_store_inferior_registers): Ditto.
18227
18228 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18229
18230 * linux-low.c (linux_write_memory): Bail out early if peeking
18231 memory failed.
18232
18233 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18234
18235 * linux-low.h (struct lwp_info): New fields
18236 `stopped_by_watchpoint' and `stopped_data_address'.
18237 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18238 here, and cache them in the lwp object.
18239 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18240 directly.
18241 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18242 field.
18243 (linux_stopped_by_watchpoint): Rewrite.
18244 (linux_stopped_data_address): Rewrite.
18245
18246 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18247
18248 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18249 switching the current inferior, not before.
18250
18251 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18252
18253 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18254 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18255 i386-linux.c and amd64-linux.c.
18256 (reg-i386.o): Removed.
18257 (reg-i386.c): Likewise.
18258 (reg-i386-linux.o): Likewise.
18259 (reg-i386-linux.c): Likewise.
18260 (reg-x86-64.o): Likewise.
18261 (reg-x86-64.c): Likewise.
18262 (reg-x86-64-linux.o): Likewise.
18263 (reg-x86-64-linux.c): Likewise.
18264 (i386.o): New.
18265 (i386.c): Likewise.
18266 (i386-linux.o): Likewise.
18267 (i386-linux.c): Likewise.
18268 (amd64.o): Likewise.
18269 (amd64.c): Likewise.
18270 (amd64-linux.o): Likewise.
18271 (amd64-linux.c): Likewise.
18272
18273 * configure.srv (srv_i386_regobj): New.
18274 (srv_i386_linux_regobj): Likewise.
18275 (srv_amd64_regobj): Likewise.
18276 (srv_amd64_linux_regobj): Likewise.
18277 (srv_i386_32bit_xmlfiles): Likewise.
18278 (srv_i386_64bit_xmlfiles): Likewise.
18279 (srv_i386_xmlfiles): Likewise.
18280 (srv_amd64_xmlfiles): Likewise.
18281 (srv_i386_linux_xmlfiles): Likewise.
18282 (srv_amd64_linux_xmlfiles): Likewise.
18283 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18284 srv_xmlfiles to $srv_i386_xmlfiles.
18285 (i[34567]86-*-mingw32ce*): Likewise.
18286 (i[34567]86-*-mingw*): Likewise.
18287 (i[34567]86-*-nto*): Likewise.
18288 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18289 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18290 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18291 (x86_64-*-linux*): Likewise.
18292
18293 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18294 (init_registers_amd64_linux): New.
18295 (x86_arch_setup): Replace init_registers_x86_64_linux with
18296 init_registers_amd64_linux.
18297
18298 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18299
18300 * configure.ac: Check for libdl. If it is not available link against
18301 static libthread_db.
18302 * configure: Regenerate.
18303
18304 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18305
18306 PR9605
18307
18308 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18309 handing a read watchpoint.
18310 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18311
18312 2010-02-12 Doug Evans <dje@google.com>
18313
18314 * linux-low.c (linux_supports_tracefork_flag): Document.
18315 (linux_look_up_symbols): Add comment.
18316
18317 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18318
18319 * regcache.c (supply_register): Clear regcache if buf is NULL.
18320
18321 2010-02-02 Nicolas Roche <roche@sourceware.org>
18322 Joel Brobecker <brobecker@adacore.com>
18323
18324 * inferiors.c (find_inferior): Add function documentation.
18325 (unloaded_dll): Handle the case where the unloaded dll has not
18326 been previously registered in the dll list.
18327
18328 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18329
18330 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18331 (thumb2_breakpoint): New.
18332 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18333
18334 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18335
18336 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18337 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18338 breakpoints.
18339
18340 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18341
18342 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18343
18344 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18345
18346 * linux-s390-low.c (s390_collect_ptrace_register)
18347 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18348
18349 2010-01-21 Doug Evans <dje@google.com>
18350
18351 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18352 (PTRACE_ARG4_TYPE): New macro.
18353 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18354 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18355 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18356 (usr_store_inferior_registers): Ditto.
18357 (linux_read_memory, linux_write_memory): Ditto.
18358 (linux_test_for_tracefork): Ditto.
18359
18360 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18361 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18362
18363 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18364
18365 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18366 target.
18367
18368 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18369
18370 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18371 prototype to take a regcache. Adjust.
18372
18373 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18374
18375 * regcache.h (struct thread_info): Forward declare.
18376 (struct regcache): New.
18377 (new_register_cache): Adjust prototype.
18378 (get_thread_regcache): Declare.
18379 (free_register_cache): Adjust prototype.
18380 (registers_to_string, registers_from_string): Ditto.
18381 (supply_register, supply_register_by_name, collect_register)
18382 (collect_register_as_string, collect_register_by_name): Ditto.
18383 * regcache.c (struct inferior_regcache_data): Delete.
18384 (get_regcache): Rename to ...
18385 (get_thread_regcache): ... this. Adjust. Switch inferior before
18386 fetching registers.
18387 (regcache_invalidate_one): Adjust.
18388 (regcache_invalidate): Fix prototype.
18389 (new_register_cache): Return the new register cache.
18390 (free_register_cache): Change prototype.
18391 (realloc_register_cache): Adjust.
18392 (registers_to_string): Change prototype to take a regcache. Adjust.
18393 (registers_from_string): Ditto.
18394 (register_data): Ditto.
18395 (supply_register): Ditto.
18396 (supply_register_by_name): Ditto.
18397 (collect_register): Ditto.
18398 (collect_register_as_string): Ditto.
18399 (collect_register_by_name): Ditto.
18400 * server.c (process_serial_event): Adjust.
18401 * linux-low.h (regset_fill_func, regset_store_func): Change
18402 prototype.
18403 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18404 Change prototype.
18405 * linux-low.c (get_stop_pc): Adjust.
18406 (check_removed_breakpoint): Adjust.
18407 (linux_wait_for_event): Adjust.
18408 (linux_resume_one_lwp): Adjust.
18409 (fetch_register): Add regcache parameter. Adjust.
18410 (usr_store_inferior_registers): Ditto.
18411 (regsets_fetch_inferior_registers): Ditto.
18412 (regsets_store_inferior_registers): Ditto.
18413 (linux_fetch_registers, linux_store_registers): Ditto.
18414 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18415 regcache. Adjust.
18416 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18417 Ditto.
18418 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18419 prototype to take a regcache.
18420 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18421 * remote-utils.c (convert_ascii_to_int, outreg)
18422 (prepare_resume_reply): Change prototype to take a regcache.
18423 Adjust.
18424 * target.h (struct target_ops) <fetch_registers, store_registers>:
18425 Change prototype to take a regcache.
18426 (fetch_inferior_registers, store_inferior_registers): Change
18427 prototype to take a regcache. Adjust.
18428 * proc-service.c (ps_lgetregs): Adjust.
18429 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18430 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18431 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18432 take a regcache. Adjust.
18433 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18434 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18435 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18436 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18437 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18438 (cris_cannot_fetch_register):
18439 (cris_breakpoint_at): Change prototype to take a regcache.
18440 Adjust.
18441 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18442 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18443 to take a regcache. Adjust.
18444 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18445 Adjust.
18446 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18447 take a regcache. Adjust.
18448 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18449 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18450 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18451 * linux-mips-low.c (mips_get_pc):
18452 (mips_set_pc): Change prototype to take a regcache. Adjust.
18453 (mips_reinsert_addr): Adjust.
18454 (mips_collect_register): Change prototype to take a regcache.
18455 Adjust.
18456 (mips_supply_register):
18457 (mips_collect_register_32bit, mips_supply_register_32bit)
18458 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18459 (mips_store_fpregset): Ditto.
18460 * linux-ppc-low.c (ppc_supply_ptrace_register)
18461 (ppc_supply_ptrace_register): Ditto.
18462 (parse_spufs_run): Adjust.
18463 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18464 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18465 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18466 take a regcache. Adjust.
18467 * linux-s390-low.c (s390_collect_ptrace_register)
18468 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18469 (s390_set_pc): Change prototype to take a regcache. Adjust.
18470 (s390_arch_setup): Adjust.
18471 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18472 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18473 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18474 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18475 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18476 regcache. Adjust.
18477 (sparc_breakpoint_at): Adjust.
18478 * linux-xtensa-low.c (xtensa_fill_gregset):
18479 (xtensa_store_gregset):
18480 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18481 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18482 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18483 prototype to take a regcache. Adjust.
18484 * win32-arm-low.c (arm_fetch_inferior_register)
18485 (arm_store_inferior_register): Change prototype to take a
18486 regcache. Adjust.
18487 * win32-i386-low.c (i386_fetch_inferior_register)
18488 (i386_store_inferior_register): Change prototype to take a
18489 regcache. Adjust.
18490 * win32-low.c (child_fetch_inferior_registers)
18491 (child_store_inferior_registers): Change prototype to take a
18492 regcache. Adjust.
18493 (win32_wait): Adjust.
18494 (win32_fetch_inferior_registers): Change prototype to take a
18495 regcache. Adjust.
18496 (win32_store_inferior_registers): Adjust.
18497 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18498 store_inferior_register>: Change prototype to take a regcache.
18499
18500 2010-01-20 Doug Evans <dje@google.com>
18501
18502 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18503 #ifdef.
18504 (linux_wait_for_event1, linux_init_signals): Ditto.
18505 (W_STOPCODE): Provide definition if missing.
18506
18507 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18508
18509 * linux-low.c (linux_core_of_thread): New.
18510 (compare_ints, show_process, list_threads): New.
18511 (linux_qxfer_osdata): Report threads and cores.
18512 (linux_target_op): Register linux_core_of_thread.
18513 * remote-utils.c (prepare_resume_reply): Report the core.
18514 (buffer_xml_printf): Support %d specifier.
18515 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18516 New.
18517 (handle_query): Handle qXfer:threads. Announce availability
18518 thereof.
18519 * target.h (struct target_ops): New field core_of_thread.
18520
18521 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18522
18523 * Makefile.in (clean): Remove new generated files.
18524 (reg-s390.o, reg-s390.c): Remove rules.
18525 (reg-s390x.o, reg-s390x.c): Likewise.
18526 (s390-linux32.o, s390-linux32.c): Add rules.
18527 (s390-linux64.o, s390-linux64.c): Likewise.
18528 (s390x-linux64.o, s390x-linux64.c): Likewise.
18529 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18530 * linux-s390-low.c: Include <elf.h>.
18531 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18532 (init_registers_s390): Remove prototype.
18533 (init_registers_s390x): Likewise.
18534 (init_registers_s390_linux32): Add prototype.
18535 (init_registers_s390_linux64): Likewise.
18536 (init_registers_s390x_linux64): Likewise.
18537 (s390_num_regs_3264): New define.
18538 (s390_regmap_3264): New global variable.
18539 (s390_cannot_fetch_register): Remove obsolete check.
18540 (s390_cannot_store_register): Likewise.
18541 (s390_collect_ptrace_register): Handle upper/lower register halves.
18542 (s390_supply_ptrace_register): Likewise.
18543 (s390_fill_gregset): Update to register number changes.
18544 (s390_get_hwcap): New routine.
18545 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18546 Install appropriate regmap and register set.
18547
18548 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18549
18550 * server.c (gdbserver_version): Update copyright year to 2010.
18551 * gdbreplay.c (gdbreplay_version): Likewise.
18552
18553 2009-12-28 Doug Evans <dje@google.com>
18554
18555 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18556 elf/external.h. Include <elf.h> instead but only if necessary.
18557
18558 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18559
18560 * linux-low.c (linux_remove_process): Remove `detaching'
18561 parameter. Don't release/detach from thread_db here.
18562 (linux_kill): Release/detach from thread_db here, ...
18563 (linux_detach): ... and here, before actually detaching.
18564 (linux_wait_1): ... and here, when a process exits.
18565 * thread-db.c (any_thread_of): New.
18566 (thread_db_free): Switch the current inferior to a thread of the
18567 passed in process.
18568
18569 2009-12-21 Doug Evans <dje@google.com>
18570
18571 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18572
18573 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18574 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18575 warning ifndef __NR_tkill. Move setting of errno there too.
18576 Delete unnecessary resetting of errno after syscall.
18577 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18578
18579 * configure.ac: Check for dladdr.
18580 * config.in: Regenerate.
18581 * configure: Regenerate.
18582 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18583 (try_thread_db_load): Update.
18584
18585 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18586
18587 2009-12-18 Doug Evans <dje@google.com>
18588
18589 * event-loop.c: Include unistd.h if it exists.
18590
18591 * linux-low.c (my_waitpid): Move definition away from being in
18592 between linux_tracefork_child/linux_test_for_tracefork.
18593
18594 * gdb_proc_service.h (psaddr_t): Fix type.
18595 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18596 signature to match glibc.
18597
18598 2009-12-16 Doug Evans <dje@google.com>
18599
18600 * linux-low.c (linux_read_memory): Fix argument to read.
18601
18602 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18603
18604 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18605 events, don't leave current_inferior pointing at null.
18606
18607 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18608
18609 * win32-low.c (LOG): Delete.
18610 (OUTMSG): Output to stderr.
18611 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18612 on compile time LOG macro.
18613 (win32_wait): Fix debug output.
18614
18615 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18616
18617 * win32-low.c (win32_add_one_solib): If the dll name is
18618 "ntdll.dll", prepend the system directory to the dll path.
18619
18620 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18621
18622 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18623
18624 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18625 Vladimir Prus <vladimir@codesourcery.com>
18626
18627 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18628 * configure.ac: Check for __mcoldfire__ and set
18629 gdb_cv_m68k_is_coldfire.
18630 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18631 reg-cf.o and reg-m68k.o.
18632 * configure: Regenerated.
18633
18634 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18635
18636 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18637 Pass it to thread_db_free.
18638 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18639 proper `detaching' argument to linux_remove_process.
18640 * linux-low.h (thread_db_free): Add `detaching' parameter.
18641 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18642 to thread_db_free.
18643 (thread_db_free): Add `detaching' parameter. Only
18644 call td_ta_clear_event if detaching from process.
18645
18646 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18647
18648 * thread-db.c (thread_db_free): Fix typo.
18649
18650 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18651
18652 PR gdb/10838
18653 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18654
18655 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18656
18657 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18658 with an i686 compiler.
18659 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18660 needed.
18661 * configure: Rebuilt.
18662
18663 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18664
18665 PR gdb/10783
18666
18667 * server.c (handle_search_memory_1): Correct read_addr initialization
18668 in loop for searching subsequent chunks.
18669
18670 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18671
18672 * configure.ac: New --with-libthread-db option.
18673 * thread-db.c: Allow direct dependence on libthread_db.
18674 (thread_db_free): Adjust.
18675 * config.in: Regenerate.
18676 * configure: Likewise.
18677
18678 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18679
18680 PR gdb/10757
18681 * thread-db.c (attach_thread): New function.
18682 (maybe_attach_thread): Return success/failure.
18683 (find_new_threads_callback): Adjust.
18684 (thread_db_find_new_threads): Loop until no new threads.
18685
18686 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18687
18688 * proc-service.c (ps_lgetregs): Formatting.
18689
18690 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18691
18692 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18693 * configure.ac: Adjust.
18694 * linux-low.h (struct process_info_private): Move members to struct
18695 thread_db.
18696 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18697 * linux-low.c (linux_remove_process): Adjust.
18698 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18699 * server.c (handle_query): Move code ...
18700 (handle_monitor_command): ... here. New function.
18701 * target.h (struct target_ops): New member.
18702 * thread-db.c (struct thread_db): New.
18703 (libthread_db_search_path): New variable.
18704 (thread_db_create_event, thread_db_enable_reporting)
18705 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18706 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18707 (try_thread_db_load_1, dladdr_to_soname): New functions.
18708 (try_thread_db_load, thread_db_load_search): New functions.
18709 (thread_db_init): Search for libthread_db.
18710 (thread_db_free): New function.
18711 (thread_db_handle_monitor_command): Likewise.
18712 * config.in: Regenerate.
18713 * configure: Regenerate.
18714
18715 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18716
18717 * spu-low.c (spu_kill): Wait for inferior to terminate.
18718 Call clear_inferiors.
18719 (spu_detach): Call clear_inferiors.
18720
18721 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18722
18723 * aclocal.m4: Regenerate.
18724 * config.in: Likewise.
18725 * configure: Likewise.
18726
18727 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18728
18729 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18730 (parse_spufs_run): New function.
18731 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18732 (ppc_breakpoint_at): Handle SPU breakpoints.
18733
18734 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18735
18736 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18737 (SPUFS_MAGIC): Define.
18738 (spu_enumerate_spu_ids): New function.
18739 (linux_qxfer_spu): New function.
18740 (linux_target_ops): Install linux_qxfer_spu.
18741
18742 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18743
18744 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18745 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18746 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18747 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18748 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18749 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18750 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18751 (init_registers_powerpc_cell32l): Add prototype.
18752 (init_registers_powerpc_cell64l): Likewise.
18753 (ppc_arch_setup): Detect Cell/B.E. architecture.
18754
18755 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18756
18757 * Makefile.in (datarootdir): New variable.
18758
18759 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18760
18761 * linux-low.c (linux_write_memory): Update debugging output.
18762 * Makefile.in (clean): Add new descriptions.
18763 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18764 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18765 * configure.srv: Add new files for arm*-*-linux*.
18766 * linux-arm-low.c: Add new declarations.
18767 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18768 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18769 (HWCAP_VFPv3D16): New.
18770 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18771 instead of __IWMMXT__.
18772 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18773 (arm_arch_setup): New.
18774 (target_regsets): Remove #ifdef. Add VFP regset.
18775 (the_low_target): Use arm_arch_setup.
18776
18777 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18778
18779 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18780 the main thread again.
18781
18782 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18783
18784 Adding Neutrino gdbserver.
18785 * configure: Regenerated.
18786 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18787 * configure.srv (i[34567]86-*-nto*): New target.
18788 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18789 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18790 (nto_comctrl) [__QNX__]: New function.
18791 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18792
18793 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18794
18795 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18796 srv_tgtobj.
18797
18798 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18799 Pedro Alves <pedro@codesourcery.com>
18800
18801 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18802 don't support CONTEXT_EXTENDED_REGISTERS.
18803 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18804 (the_low_target): Install them.
18805 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18806 failing with ERROR_PIPE_NOT_CONNECTED.
18807
18808 2009-06-30 Doug Evans <dje@google.com>
18809 Pierre Muller <muller@ics.u-strasbg.fr>
18810
18811 Add h/w watchpoint support to x86-linux, win32-i386.
18812 * Makefile.in (SFILES): Add i386-low.c
18813 (i386_low_h): Define.
18814 (i386-low.o): Add dependencies.
18815 (linux-x86-low.o): Add i386-low.h dependency.
18816 (win32-i386-low.o): Ditto.
18817 * i386-low.c: New file.
18818 * i386-low.h: New file.
18819 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18820 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18821 * linux-low.c (linux_add_process): Initialize arch_private.
18822 (linux_remove_process): Free arch_private.
18823 (add_lwp): Initialize arch_private.
18824 (delete_lwp): Free arch_private.
18825 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18826 provided.
18827 * linux-low.h (process_info_private): New member arch_private.
18828 (lwp_info): New member arch_private.
18829 (linux_target_ops): New members new_process, new_thread,
18830 prepare_to_resume.
18831 (ptid_of): New macro.
18832 * linux-x86-low.c: Include stddef.h, i386-low.h.
18833 (arch_process_info): New struct.
18834 (arch_lwp_info): New struct.
18835 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18836 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18837 (i386_dr_low_get_status): New function.
18838 (x86_insert_point, x86_remove_point): New functions.
18839 (x86_stopped_by_watchpoint): New function.
18840 (x86_stopped_data_address): New function.
18841 (x86_linux_new_process, x86_linux_new_thread): New functions.
18842 (x86_linux_prepare_to_resume): New function.
18843 (the_low_target): Add entries for insert_point, remove_point,
18844 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18845 prepare_to_resume.
18846 * server.c (debug_hw_points): New global.
18847 (monitor_show_help): Document set debug-hw-points.
18848 (handle_query): Process "set debug-hw-points".
18849 * server.h (debug_hw_points): Declare.
18850 (paddress): Declare.
18851 * utils.c (NUMCELLS, CELLSIZE): New macros.
18852 (get_sell, xsnprintf, paddress): New functions.
18853 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18854 remove_point, stopped_by_watchpoint, stopped_data_address.
18855 * win32-i386-low.c: Include i386-low.h.
18856 (debug_reg_state): Replaces dr.
18857 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18858 (i386_dr_low_get_status): New function.
18859 (i386_insert_point, i386_remove_point): New functions.
18860 (i386_stopped_by_watchpoint): New function.
18861 (i386_stopped_data_address): New function.
18862 (i386_initial_stuff): Update.
18863 (get_thread_context,set_thread_context,i386_thread_added): Update.
18864 (the_low_target): Add entries for insert_point,
18865 remove_point, stopped_by_watchpoint, stopped_data_address.
18866 * win32-low.c (win32_insert_watchpoint): New function.
18867 (win32_remove_watchpoint): New function.
18868 (win32_stopped_by_watchpoint): New function.
18869 (win32_stopped_data_address): New function.
18870 (win32_target_ops): Add entries for insert_watchpoint,
18871 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18872 * win32-low.h (win32_target_ops): New members insert_point,
18873 remove_point, stopped_by_watchpoint, stopped_data_address.
18874
18875 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18876
18877 * server.c (process_serial_event): Re-return unsupported, not
18878 error, if the type isn't recognized. Re-allow supporting only
18879 insert or remove packets. Also call require_running for
18880 breakpoints. Add missing break statement to default case. Tidy.
18881 * target.h (struct target_ops): Rename insert_watchpoint to
18882 insert_point, and remove_watchpoint to remove_point.
18883
18884 * linux-low.h (struct linux_target_ops): Likewise.
18885 * linux-low.c (linux_insert_watchpoint): Rename to ...
18886 (linux_insert_point): ... this. Adjust.
18887 (linux_remove_watchpoint): Rename to ...
18888 (linux_remove_point): ... this. Adjust.
18889 (linux_target_ops): Adjust.
18890 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18891 (cris_insert_point): ... this.
18892 (cris_remove_watchpoint): Rename to ...
18893 (cris_remove_point): ... this.
18894 (the_low_target): Adjust.
18895
18896 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18897
18898 * server.c (handle_v_kill): Pass signal_pid to
18899 kill_inferior if multi_process is zero.
18900
18901 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18902
18903 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18904 * target.h (target_ops): Comment for *_watchpoint to make it clear
18905 the functions can get types '0' and '1'.
18906
18907 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18908
18909 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18910 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18911 * regcache.c (get_regcache): Likewise.
18912 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18913 * win32-low.c (child_fetch_inferior_registers): Remove check for
18914 regno 0.
18915
18916 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18917 Pedro Alves <pedro@codesourcery.com>
18918
18919 * target.h (struct target_ops) <supports_multi_process>: New
18920 callback.
18921 (target_supports_multi_process): New.
18922 * server.c (handle_query): Even if GDB reports support, only
18923 enable multi-process if the target also supports it. Report
18924 multi-process support only if the target backend supports it.
18925 * linux-low.c (linux_supports_multi_process): New function.
18926 (linux_target_ops): Install it as target_supports_multi_process
18927 callback.
18928
18929 2009-05-24 Doug Evans <dje@google.com>
18930
18931 Global renaming of find_thread_pid to find_thread_ptid.
18932 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18933 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18934 All callers updated.
18935
18936 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18937 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18938 directly.
18939
18940 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18941 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18942 (linux_resume_one_lwp): Ditto.
18943
18944 2009-05-23 Doug Evans <dje@google.com>
18945
18946 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18947 from struct inferior_list_entry * to struct lwp_info *.
18948 All callers updated.
18949
18950 2009-05-13 Doug Evans <dje@google.com>
18951
18952 * linux-x86-low.c: Don't include assert.h.
18953 (x86_siginfo_fixup): Use fatal, not assert.
18954 (x86_arch_setup): Fix comment.
18955
18956 2009-05-12 Doug Evans <dje@google.com>
18957
18958 Biarch support for i386/amd64 gdbserver.
18959 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18960 Add linux-x86-low.c.
18961 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18962 (linux-x86-low.o): Add.
18963 * linux-x86-64-low.c: Delete.
18964 * linux-i386-low.c: Delete.
18965 * linux-x86-low.c: New file.
18966 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18967 linux-x86-low.o.
18968 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18969 linux-x86-low.o.
18970 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18971 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18972 (linux_child_pid_to_exec_file): New function.
18973 (elf_64_header_p, elf_64_file_p): New functions.
18974 (siginfo_fixup): New function.
18975 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18976 give target a chance to convert layout.
18977 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18978 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18979
18980 2009-05-07 Doug Evans <dje@google.com>
18981
18982 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18983 (regsets_store_inferior_registers): Ditto.
18984
18985 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18986
18987 PR server/10048
18988
18989 * linux-low.c (must_set_ptrace_flags): Delete.
18990 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18991 of the global.
18992 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18993 `lwp->must_set_ptrace_flags' instead.
18994 (linux_wait_for_event_1): Set ptrace options here.
18995 (linux_wait_1): ... not here.
18996
18997 2009-04-30 Doug Evans <dje@google.com>
18998
18999 * inferiors.c (started_inferior_callback): New function.
19000 (attached_inferior_callback): New function.
19001 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19002 * server.c (print_started_pid, print_attached_pid): New functions.
19003 (detach_or_kill_for_exit): New function.
19004 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19005 * server.h (have_started_inferiors_p): Declare.
19006 (have_attached_inferiors_p): Declare.
19007
19008 * inferiors.c (remove_process): Fix memory leak, free process.
19009 * linux-low.c (linux_remove_process): New function.
19010 (linux_kill): Call it instead of remove_process.
19011 (linux_detach, linux_wait_1): Ditto.
19012
19013 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19014
19015 * configure.srv: Add x86 Windows CE target.
19016
19017 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19018
19019 * inferiors.c (get_thread_process): Make global.
19020 * server.h (get_thread_process): Add prototype.
19021 * thread-db.c (find_one_thread): Use get_thread_process
19022 instead of current_process.
19023 (thread_db_get_tls_address): Do not crash if called when
19024 thread layer is not yet initialized.
19025
19026 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19027
19028 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19029 * spu-low.c (current_tid): Rename to ...
19030 (current_ptid): ... this.
19031 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19032 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19033 ptid_get_lwp (current_ptid) instead of current_tid.
19034 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19035 instead of current_tid. Use find_process_pid to verify pid
19036 argument is valid. Pass proper argument to remove_process.
19037 (spu_thread_alive): Compare current_ptid instead of current_tid.
19038 (spu_resume): Likewise.
19039
19040 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19041
19042 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19043 variable.
19044
19045 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19046
19047 Implement the multiprocess extensions, and add linux multiprocess
19048 support.
19049
19050 * server.h (ULONGEST): Declare.
19051 (struct ptid, ptid_t): New.
19052 (minus_one_ptid, null_ptid): Declare.
19053 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19054 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19055 (struct inferior_list_entry): Change `id' type from unsigned from
19056 to ptid_t.
19057 (struct sym_cache, struct breakpoint, struct
19058 process_info_private): Forward declare.
19059 (struct process_info): Declare.
19060 (current_process): Declare.
19061 (all_processes): Declare.
19062 (initialize_inferiors): Declare.
19063 (add_thread): Adjust to use ptid_t.
19064 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19065 (add_process, remove_process, find_thread_pid): Declare.
19066 (find_inferior_id): Adjust to use ptid_t.
19067 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19068 (multi_process): Declare.
19069 (push_event): Adjust to use ptid_t.
19070 (read_ptid, write_ptid): Declare.
19071 (prepare_resume_reply): Adjust to use ptid_t.
19072 (clear_symbol_cache): Declare.
19073 * inferiors.c (all_processes): New.
19074 (null_ptid, minus_one_ptid): New.
19075 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19076 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19077 (add_thread): Change unsigned long to ptid. Remove gdb_id
19078 parameter. Adjust.
19079 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19080 (gdb_id_to_thread): Rename to ...
19081 (find_thread_pid): ... this. Change unsigned long to ptid.
19082 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19083 (loaded_dll, pull_pid_from_list): Adjust.
19084 (add_process, remove_process, find_process_pid)
19085 (get_thread_process, current_process, initialize_inferiors): New.
19086 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19087 (struct target_waitstatus) <related_pid>: Ditto.
19088 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19089 return type to int.
19090 (struct target_ops) <join>: Add `pid' argument.
19091 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19092 (struct target_ops) <wait>: Add `ptid' field. Change return type
19093 to ptid.
19094 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19095 (mywait): Add `ptid' argument. Change return type to ptid_t.
19096 (target_pid_to_str): Declare.
19097 * target.c (set_desired_inferior): Adjust to use ptids.
19098 (mywait): Add new `ptid' argument. Adjust.
19099 (target_pid_to_str): New.
19100 * mem-break.h (free_all_breakpoints): Declare.
19101 * mem-break.c (breakpoints): Delelete.
19102 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19103 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19104 to use per-process breakpoint list.
19105 (free_all_breakpoints): New.
19106 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19107 (symbol_cache, all_symbols_looked_up): Delete.
19108 (hexchars): New.
19109 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19110 read_ptid): New.
19111 (prepare_resume_reply): Change ptid argument's type from unsigned
19112 long to ptid_t. Adjust. Implement W;process and X;process.
19113 (free_sym_cache, clear_symbol_cache): New.
19114 (look_up_one_symbol): Adjust to per-process symbol cache. *
19115 * server.c (cont_thread, general_thread, step_thread): Change type
19116 to ptid_t.
19117 (attached): Delete.
19118 (multi_process): New.
19119 (last_ptid): Change type to ptid_t.
19120 (struct vstop_notif) <ptid>: Change type to ptid_t.
19121 (queue_stop_reply, push_event): Change `ptid' argument's type to
19122 ptid_t.
19123 (discard_queued_stop_replies): Add `pid' argument.
19124 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19125 changes. Don't reference the `attached' global.
19126 (attach_inferior): Adjust to mywait interface changes.
19127 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19128 features. Handle and report "multiprocess+". Handle
19129 "qAttached:PID".
19130 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19131 changes.
19132 (handle_v_kill): New.
19133 (handle_v_stopped): Adjust to use target_pid_to_str.
19134 (handle_v_requests): Allow multiple attaches and runs when
19135 multiprocess extensions are in effect. Handle "vKill".
19136 (myresume): Adjust to use ptids.
19137 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19138 (handle_status): Adjust to discard_queued_stop_replies interface
19139 change.
19140 (first_thread_of, kill_inferior_callback)
19141 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19142 (main): Call initialize_inferiors. Adjust to use ptids, killing
19143 and detaching from all inferiors. Handle multiprocess packet
19144 variants.
19145 * linux-low.h: Include gdb_proc_service.h.
19146 (struct process_info_private): New.
19147 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19148 <lwpid_of>: Use ptid_get_lwp.
19149 (get_lwp_thread): Adjust.
19150 (struct lwp_info): Add `dead' member.
19151 (find_lwp_pid): Declare.
19152 * linux-low.c (thread_db_active): Delete.
19153 (new_inferior): Adjust comment.
19154 (inferior_pid): Delete.
19155 (linux_add_process): New.
19156 (handle_extended_wait): Adjust.
19157 (add_lwp): Change unsigned long to ptid.
19158 (linux_create_inferior): Add process to processes table. Adjust
19159 to use ptids. Don't set new_inferior here.
19160 (linux_attach_lwp): Rename to ...
19161 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19162 it. Adjust to use ptids.
19163 (linux_attach_lwp): New.
19164 (linux_attach): Add process to processes table. Don't set
19165 new_inferior here.
19166 (struct counter): New.
19167 (second_thread_of_pid_p, last_thread_of_process_p): New.
19168 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19169 multiple processes.
19170 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19171 processes. Remove process from process table.
19172 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19173 to multiple processes.
19174 (any_thread_of): New.
19175 (linux_detach): Add `pid' argument, and handle it. Remove process
19176 from processes table.
19177 (linux_join): Add `pid' argument. Handle it.
19178 (linux_thread_alive): Change unsighed long argument to ptid_t.
19179 Consider dead lwps as not being alive.
19180 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19181 threads we're not interested in.
19182 (same_lwp, find_lwp_pid): New.
19183 (linux_wait_for_lwp): Change `pid' argument's type from int to
19184 ptid_t. Adjust.
19185 (linux_wait_for_event): Rename to ...
19186 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19187 from int to ptid_t. Adjust.
19188 (linux_wait_for_event): New.
19189 (linux_wait_1): Add `ptid' argument. Change return type to
19190 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19191 that exit from the process table.
19192 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19193 Adjust.
19194 (mark_lwp_dead): New.
19195 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19196 stopping all threads, mark its main lwp as dead.
19197 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19198 ptids.
19199 (fetch_register, usr_store_inferior_registers)
19200 (regsets_fetch_inferior_registers)
19201 (regsets_store_inferior_registers, linux_read_memory)
19202 (linux_write_memory): Inline `inferior_pid'.
19203 (linux_look_up_symbols): Adjust to use per-process
19204 `thread_db_active'.
19205 (linux_request_interrupt): Adjust to use ptids.
19206 (linux_read_auxv): Inline `inferior_pid'.
19207 (initialize_low): Don't reference thread_db_active.
19208 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19209 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19210 (ps_getpid): Return the pid of the current inferior.
19211 * thread-db.c (proc_handle, thread_agent): Delete.
19212 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19213 per-process data.
19214 (find_one_thread): Change argument type to ptid_t. Adjust to
19215 per-process data.
19216 (maybe_attach_thread): Adjust to per-process data and ptids.
19217 (thread_db_find_new_threads): Ditto.
19218 (thread_db_init): Ditto.
19219 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19220 processes table. Adjust to use ptids.
19221 (spu_kill, spu_detach): Adjust interface. Remove process from
19222 processes table.
19223 (spu_join, spu_thread_alive): Adjust interface.
19224 (spu_wait): Adjust interface. Remove process from processes
19225 table. Adjust to use ptids.
19226 * win32-low.c (current_inferior_tid): Delete.
19227 (current_inferior_ptid): New.
19228 (debug_event_ptid): New.
19229 (thread_rec): Take a ptid. Adjust.
19230 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19231 (child_delete_thread): Ditto.
19232 (do_initial_child_stuff): Add `attached' argument. Add process to
19233 processes table.
19234 (child_fetch_inferior_registers, child_store_inferior_registers):
19235 Adjust.
19236 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19237 (win32_attach): Pass 1 to do_initial_child_stuff.
19238 (win32_kill): Adjust interface. Remove process from processes
19239 table.
19240 (win32_detach): Ditto.
19241 (win32_join): Adjust interface.
19242 (win32_thread_alive): Take a ptid.
19243 (win32_resume): Adjust to use ptids.
19244 (get_child_debug_event): Ditto.
19245 (win32_wait): Adjust interface. Remove exiting process from
19246 processes table.
19247
19248 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19249
19250 Non-stop mode support.
19251
19252 * server.h (non_stop): Declare.
19253 (gdb_client_data, handler_func): Declare.
19254 (delete_file_handler, add_file_handler, start_event_loop):
19255 Declare.
19256 (handle_serial_event, handle_target_event, push_event)
19257 (putpkt_notif): Declare.
19258 * target.h (enum resume_kind): New.
19259 (struct thread_resume): Replace `step' field by `kind' field.
19260 (TARGET_WNOHANG): Define.
19261 (struct target_ops) <wait>: Add `options' argument.
19262 <supports_non_stop, async, start_non_stop>: New fields.
19263 (target_supports_non_stop, target_async): New.
19264 (start_non_stop): Declare.
19265 (mywait): Add `options' argument.
19266 * target.c (mywait): Add `options' argument. Print child exit
19267 notifications here.
19268 (start_non_stop): New.
19269 * server.c (non_stop, own_buf, mem_buf): New globals.
19270 (struct vstop_notif): New.
19271 (notif_queue): New global.
19272 (queue_stop_reply, push_event, discard_queued_stop_replies)
19273 (send_next_stop_reply): New.
19274 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19275 interface changes.
19276 (attach_inferior): In non-stop mode, don't wait for the target
19277 here.
19278 (handle_general_set): Handle QNonStop.
19279 (handle_query): When handling qC, return the current general
19280 thread, instead of the first thread of the list.
19281 (handle_query): If the backend supports non-stop mode, include
19282 QNonStop+ in the qSupported query response.
19283 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19284 and non-stop mode.
19285 (handle_v_attach, handle_v_run): Handle non-stop mode.
19286 (handle_v_stopped): New.
19287 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19288 (myresume): Adjust to use resume_kind. Handle non-stop.
19289 (queue_stop_reply_callback): New.
19290 (handle_status): Handle non-stop mode.
19291 (main): Clear non_stop flag on reconnection. Use the event-loop.
19292 Refactor serial protocol handling from here ...
19293 (process_serial_event): ... to this new function. When GDB
19294 selects any thread, select one here. In non-stop mode, wait until
19295 GDB acks all pending events before exiting.
19296 (handle_serial_event, handle_target_event): New.
19297 * remote-utils.c (remote_open): Install remote_desc in the event
19298 loop.
19299 (remote_close): Remove remote_desc from the event loop.
19300 (putpkt_binary): Rename to...
19301 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19302 (putpkt_binary): New as wrapper around putpkt_binary_1.
19303 (putpkt_notif): New.
19304 (prepare_resume_reply): In non-stop mode, don't change the
19305 general_thread.
19306 * event-loop.c: New.
19307 * Makefile.in (OBJ): Add event-loop.o.
19308 (event-loop.o): New rule.
19309
19310 * linux-low.h (pid_of): Moved here.
19311 (lwpid_of): New.
19312 (get_lwp_thread): Use lwpid_of.
19313 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19314 * linux-low.c (pid_of): Delete.
19315 (inferior_pid): Use lwpid_of.
19316 (linux_event_pipe): New.
19317 (target_is_async_p): New.
19318 (delete_lwp): New.
19319 (handle_extended_wait): Use lwpid_of.
19320 (add_lwp): Don't set lwpid field.
19321 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19322 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19323 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19324 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19325 first. Adjust to linux_wait_for_event interface changes. Use
19326 lwpid_of.
19327 (linux_detach): Don't delete the main lwp here.
19328 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19329 (status_pending_p): Don't consider explicitly suspended lwps.
19330 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19331 pointer. Add OPTIONS argument. Change return type to int. Use
19332 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19333 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19334 pointer. Add status pointer argument. Return a pid instead of a
19335 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19336 changes. In non-stop mode, don't switch to a random thread.
19337 (linux_wait): Rename to...
19338 (linux_wait_1): ... this. Add target_options argument, and handle
19339 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19340 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19341 clean exit and signal exit code. Don't stop all threads in
19342 non-stop mode. In all-stop mode, only stop all threads when
19343 reporting a stop to GDB. Handle explicit thread stop requests.
19344 (async_file_flush, async_file_mark): New.
19345 (linux_wait): New.
19346 (send_sigstop): Use lwpid_of.
19347 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19348 interface changes. In non-stop mode, don't switch to a random
19349 thread.
19350 (linux_resume_one_lwp): Use lwpid_of.
19351 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19352 (linux_resume_one_thread): ... this. Handle resume_stop. In
19353 non-stop mode, don't look for pending flag in all threads.
19354 (resume_status_pending_p): Don't consider explicitly suspended
19355 threads.
19356 (my_waitpid): Reimplement. Emulate __WALL.
19357 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19358 Use lwpid_of.
19359 (sigchld_handler, linux_supports_non_stop, linux_async)
19360 (linux_start_non_stop): New.
19361 (linux_target_ops): Register linux_supports_non_stop, linux_async
19362 and linux_start_non_stop.
19363 (initialize_low): Install SIGCHLD handler.
19364 * thread-db.c (thread_db_create_event, find_one_thread)
19365 (thread_db_get_tls_address): Use lwpid_of.
19366 * win32-low.c (win32_detach): Adjust to use resume_kind.
19367 (win32_wait): Add `options' argument.
19368 * spu-low.c (spu_resume): Adjust to use resume_kind.
19369 (spu_wait): Add `options' argument.
19370
19371 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19372
19373 Decouple target code from remote protocol.
19374
19375 * target.h (enum target_waitkind): New.
19376 (struct target_waitstatus): New.
19377 (struct target_ops) <wait>: Return an unsigned long. Take a
19378 target_waitstatus pointer instead of a char pointer.
19379 (mywait): Likewise.
19380 * target.c (mywait): Change prototype to return an unsigned long.
19381 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19382 * server.h (thread_from_wait, old_thread_from_wait): Delete
19383 declarations.
19384 (prepare_resume_reply): Change prototype to take a
19385 target_waitstatus.
19386 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19387 (last_status, last_ptid): New.
19388 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19389 pid instead of a signal.
19390 (attach_inferior): Remove "status" and "signal" parameters.
19391 Adjust.
19392 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19393 not as an address.
19394 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19395 (handle_v_requests, myresume): Remove "status" and "signal"
19396 parameters. Adjust.
19397 (handle_status): New.
19398 (main): Delete local `status'. Adjust.
19399 * remote-utils.c: Include target.h.
19400 (prepare_resume_reply): Change prototype to take a
19401 target_waitstatus. Adjust.
19402
19403 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19404 interface.
19405 * spu-low.c (spu_wait): Adjust.
19406 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19407 Delete.
19408 (win32_wait): Adjust.
19409
19410 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19411
19412 * target.h (struct thread_resume): Delete leave_stopped member.
19413 (struct target_ops): Add a `n' argument to the `resume' callback.
19414 * server.c (start_inferior): Adjust.
19415 (handle_v_cont, myresume): Adjust.
19416 * linux-low.c (check_removed_breakpoint): Adjust to resume
19417 interface change, and to removed leave_stopped field.
19418 (resume_ptr): Delete.
19419 (struct thread_resume_array): New.
19420 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19421 resume interface change.
19422 (linux_continue_one_thread, linux_queue_one_thread)
19423 (resume_status_pending_p): Check if the resume field is NULL
19424 instead of checking the leave_stopped member.
19425 (linux_resume): Adjust to the target resume interface change.
19426 * spu-low.c (spu_resume): Adjust to the target resume interface
19427 change.
19428 * win32-low.c (win32_detach, win32_resume): Ditto.
19429
19430 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19431
19432 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19433 flag.
19434 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19435 pending.
19436 (linux_continue_one_thread): Only preserve the stepping flag if
19437 there's a pending breakpoint.
19438
19439 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19440
19441 * server.c (main): After the inferior having exited, call
19442 remote_close before exiting gdbserver.
19443
19444 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19445
19446 Fix size of FPSCR in Power 7 processors.
19447 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19448 (PPC_FEATURE_HAS_DFP): New #define.
19449 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19450 size of the FPSCR.
19451
19452 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19453
19454 * server.c (handle_query) Whitespace and formatting.
19455
19456 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19457
19458 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19459 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19460 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19461 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19462 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19463 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19464 Makefile.in, configure.ac: Fix whitespace throughout.
19465 * configure: Regenerate.
19466
19467 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19468
19469 * inferiors.c (find_inferior): Make it safe for the callback
19470 function to delete the currently iterated inferior.
19471
19472 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19473
19474 * Makefile.in (linuw_low_h): Move higher.
19475 (thread-db.o): Depend on $(linux_low_h).
19476
19477 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19478
19479 Rename "process" to "lwp" throughout.
19480
19481 * linux-low.c (all_processes): Rename to...
19482 (all_lwps): ... this.
19483 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19484 (add_process): Rename to ...
19485 (add_lwp): ... this. Adjust.
19486 (linux_create_inferior): Adjust.
19487 (linux_attach_lwp): Adjust.
19488 (linux_attach): Adjust.
19489 (linux_kill_one_process): Rename to ...
19490 (linux_kill_one_lwp): ... this. Adjust.
19491 (linux_kill): Adjust.
19492 (linux_detach_one_process): Rename to ...
19493 (linux_detach_one_lwp): ... this. Adjust.
19494 (linux_detach): Adjust.
19495 (check_removed_breakpoint): Adjust.
19496 (status_pending_p): Adjust.
19497 (linux_wait_for_process): Rename to ...
19498 (linux_wait_for_lwp): ... this. Adjust.
19499 (linux_wait_for_event): Adjust.
19500 (send_sigstop): Adjust.
19501 (wait_for_sigstop): Adjust.
19502 (stop_all_processes): Rename to ...
19503 (stop_all_lwps): ... this.
19504 (linux_resume_one_process): Rename to ...
19505 (linux_resume_one_lwp): ... this. Adjust.
19506 (linux_set_resume_request, linux_continue_one_thread)
19507 (linux_queue_one_thread, resume_status_pending_p)
19508 (usr_store_inferior_registers, regsets_store_inferior_registers)
19509 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19510 Adjust.
19511 * linux-low.h (get_process): Rename to ...
19512 (get_lwp): ... this. Adjust.
19513 (get_thread_process): Rename to ...
19514 (get_thread_lwp): ... this. Adjust.
19515 (get_process_thread): Rename to ...
19516 (get_lwp_thread): ... this. Adjust.
19517 (struct process_info): Rename to ...
19518 (struct lwp_info): ... this.
19519 (all_processes): Rename to ...
19520 (all_lwps): ... this.
19521 * proc-service.c (ps_lgetregs): Adjust.
19522 * thread-db.c (thread_db_create_event, find_one_thread)
19523 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19524
19525 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19526
19527 * server.c (handle_query): Handle "qAttached".
19528
19529 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19530
19531 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19532 GPLv3, update license URL.
19533
19534 2009-03-01 Doug Evans <dje@google.com>
19535
19536 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19537 (server_h): Add gdb_signals.h.
19538 (signals.o): Update.
19539 * server.h (target_signal_from_host,target_signal_to_host_p)
19540 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19541
19542 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19543
19544 * remote-utils.c (getpkt): Also generate remote-debug
19545 information if noack_mode is set.
19546
19547 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19548
19549 * server.c (handle_query): Report qXfer:siginfo:read and
19550 qXfer:siginfo:write as supported and handle them.
19551 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19552 * linux-low.c (linux_xfer_siginfo): New.
19553 (linux_target_ops): Set it.
19554
19555 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19556
19557 * server.c (gdbserver_usage): Mention --remote-debug.
19558 (main): Accept '--remote-debug' switch.
19559
19560 2009-01-18 Doug Evans <dje@google.com>
19561
19562 * regcache.c (new_register_cache): No need to check result of xcalloc.
19563 * server.c (handle_search_memory): Back out calls to xmalloc,
19564 result is checked and error is returned to user upon failure.
19565 (handle_query): Ditto. Add more checks for result of malloc.
19566 (handle_v_cont): Check result of malloc, report error back to
19567 user upon failure.
19568 (handle_v_run): Ditto. Call freeargv.
19569 * server.h (freeargv): Declare.
19570 * utils.c (freeargv): New fn.
19571
19572 2009-01-15 Doug Evans <dje@google.com>
19573
19574 * gdbreplay.c (perror_with_name): Make arg const char *.
19575 * server.h (target_signal_to_name): Make return type const char *.
19576 * thread-db.c (thread_db_err_str): Make return type const char *.
19577 * utils.c (perror_with_name): Make arg const char *.
19578
19579 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19580
19581 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19582 when handling a EXIT_PROCESS_DEBUG_EVENT.
19583
19584 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19585
19586 * gdbreplay.c (gdbreplay_version): Update copyright year.
19587 * server.c (gdbserver_version): Likewise.
19588
19589 2009-01-05 Doug Evans <dje@google.com>
19590
19591 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19592 (handle_extended_wait): Improve comment.
19593
19594 2008-12-13 Doug Evans <dje@google.com>
19595
19596 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19597 * server.h (ATTR_MALLOC): New macro.
19598 (xmalloc,xcalloc,xstrdup): Declare.
19599 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19600 * inferiors.c: Ditto.
19601 * linux-low.c: Ditto.
19602 * mem-break.c: Ditto.
19603 * regcache.c: Ditto.
19604 * remote-utils.c: Ditto.
19605 * server.c: Ditto.
19606 * target.c: Ditto.
19607 * win32-low.c: Ditto.
19608
19609 2008-12-12 Doug Evans <dje@google.com>
19610
19611 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19612 in debugging printf.
19613
19614 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19615
19616 2008-12-09 Doug Evans <dje@google.com>
19617
19618 * linux-low.h (struct process_info): Delete member tid, unused.
19619 * thread-db.c (find_one_thread): Update.
19620 (maybe_attach_thread): Update.
19621
19622 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19623
19624 * target.h (struct target_ops): Add qxfer_osdata member.
19625 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19626 and dirent.h.
19627 (linux_qxfer_osdata): New functions.
19628 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19629 callback.
19630 * server.c (handle_query): Handle "qXfer:osdata:read:".
19631 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19632 (buffer_xml_printf): New functions.
19633 * server.h (struct buffer): New.
19634 (buffer_grow_str, buffer_grow_str0): New macros.
19635 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19636 (buffer_xml_printf): Declare.
19637
19638 2008-11-24 Doug Evans <dje@google.com>
19639
19640 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19641
19642 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19643
19644 * server.c (handle_v_run): Always use the supplied argument list.
19645
19646 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19647
19648 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19649 (xtensa_regmap_table): Add entry for scompare1.
19650
19651 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19652
19653 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19654 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19655 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19656 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19657 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19658 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19659 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19660 XML target descriptions.
19661 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19662 when inferior is running on an ISA 2.05 or later processor. Add
19663 special case to return offset for full 64-bit slot of FPSCR when
19664 in 32-bits.
19665
19666 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19667
19668 * Makefile.in (SFILES, clean): Added sparc64 files.
19669 (reg-sparc64.o, reg-sparc64.c): New.
19670 * configure.srv (sparc*-*-linux*): New configuration.
19671 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19672 syscall arguments for SPARC.
19673 (regsets_store_inferior_registers): Likewise.
19674 * linux-sparc-low.c: New file.
19675
19676 2008-10-21 Doug Evans <dje@google.com>
19677
19678 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19679 (READLINE_DIR,READLINE_DEP): Delete.
19680 (INTERNAL_CFLAGS): Update.
19681 (LINTFLAGS): Update.
19682
19683 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19684
19685 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19686 whole argv from the last run, not just argv[0].
19687
19688 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19689
19690 * regcache.c (new_register_cache): Return NULL if the register
19691 cache size isn't known yet.
19692 (free_register_cache): Avoid dereferencing a NULL regcache.
19693
19694 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19695
19696 * configure.srv: Merge MIPS and MIPS64.
19697
19698 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19699
19700 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19701
19702 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19703
19704 * Makefile.in: Add required vsx dependencies.
19705
19706 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19707 Declare init_registers_powerpc_vsx32l.
19708 Declare init_registers_powerpc_vsx64l.
19709 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19710 (ppc_arch_setup): Check for VSX in hwcap.
19711 (ppc_fill_vsxregset): New function.
19712 (ppc_store_vsxregset): New function.
19713 Add new VSX entry in regset_info target_regsets.
19714
19715 * configure.srv: Add new VSX dependencies.
19716
19717 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19718
19719 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19720 (remote_open): Set or clear transport_is_reliable.
19721 (putpkt_binary): Don't expect acks in noack mode.
19722 (getpkt): Don't send ack/nac in noack mode.
19723 * server.c (handle_general_set): Handle QStartNoAckMode.
19724 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19725 qSupported.
19726 (main): Reset noack_mode on every connection.
19727 * server.h (noack_mode): Declare.
19728
19729 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19730
19731 * Makefile.in (GDBREPLAY_OBS): New variable.
19732 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19733
19734 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19735 Daniel Jacobowitz <dan@codesourcery.com>
19736
19737 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19738 (usr_store_inferior_registers): Likewise.
19739 (regsets_store_inferior_registers): Likewise.
19740
19741 2008-07-31 Rolf Jansen <rj@surtec.com>
19742 Pedro Alves <pedro@codesourcery.com>
19743
19744 * configure.ac: Check for memmem declaration.
19745 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19746 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19747 (disable_packet_qfThreadInfo): Unconditionally compile.
19748 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19749 * configure, config.in: Regenerate.
19750
19751 2008-07-28 Doug Kwan <dougkwan@google.com>
19752
19753 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19754 (linux_write_memory): Remove declaration of errno.
19755
19756 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19757
19758 * linux-low.c (handle_extended_wait): Do not use "status"
19759 variable uninitialized.
19760
19761 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19762
19763 * server.c (handle_v_attach): Inhibit reporting dll changes.
19764
19765 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19766
19767 * remote-utils.c (prepare_resume_reply): If requested, don't
19768 output "thread:TID" in the T stop reply.
19769
19770 * server.c (disable_packet_vCont, disable_packet_Tthread)
19771 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19772 (handle_query): If requested, disable support for qC, qfThreadInfo
19773 and qsThreadInfo.
19774 (handle_v_requests): If requested, disable support for vCont.
19775 (gdbserver_show_disableable): New.
19776 (main): Handle --disable-packet and --disable-packet=LIST.
19777
19778 * server.h (disable_packet_vCont, disable_packet_Tthread)
19779 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19780
19781 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19782
19783 * server.c (gdbserver_usage): Mention --version.
19784
19785 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19786
19787 * Makefile.in (gdbreplay.o): New rule.
19788
19789 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19790
19791 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19792 message, not gdbserver.
19793
19794 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19795 Nathan Sidwell <nathan@codesourcery.com>
19796 Joseph Myers <joseph@codesourcery.com>
19797
19798 * acinclude.m4: Include ../../config/acx.m4.
19799 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19800 * configure, config.in: Regenerate.
19801 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19802 * server.c (gdbserver_version): Print PKGVERSION.
19803 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19804 (main): Adjust gdbserver_usage calls.
19805 * gdbreplay.c (version, host_name): Add declarations.
19806 (gdbreplay_version, gdbreplay_usage): New.
19807 (main): Accept --version and --help options.
19808
19809 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19810
19811 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19812 (arm_breakpoint_at): Handle Thumb.
19813 (the_low_target): Add comment.
19814
19815 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19816
19817 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19818
19819 2008-05-09 Doug Evans <dje@google.com>
19820
19821 * server.h (decode_search_memory_packet): Declare.
19822 * remote-utils.c (decode_search_memory_packet): New fn.
19823 * server.c (handle_search_memory_1): New fn.
19824 (handle_search_memory): New fn.
19825 (handle_query): Process qSearch:memory packets.
19826
19827 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19828
19829 * regcache.c (registers_length): Remove.
19830 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19831 full register packet.
19832 * regcache.h (registers_length): Remove prototype.
19833 * server.h (PBUFSIZ): Define to 16384.
19834
19835 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19836
19837 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19838 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19839 powerpc-64l.o, and powerpc-altivec64l.o.
19840 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19841 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19842 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19843 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19844 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19845 to srv_xmlfiles.
19846
19847 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19848 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19849 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19850 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19851 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19852 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19853 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19854 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19855 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19856 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19857 (clean): Update.
19858
19859 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19860 (init_registers_powerpc_32l): ... this new prototype.
19861 (init_registers_powerpc_32): Remove, replace by ...
19862 (init_registers_powerpc_altivec32l): ... this new prototype.
19863 (init_registers_powerpc_e500): Remove, replace by ...
19864 (init_registers_powerpc_e500l): ... this new prototype.
19865 (init_registers_ppc64): Remove, replace by ...
19866 (init_registers_powerpc_64l): ... this new prototype.
19867 (init_registers_powerpc_64): Remove, replace by ...
19868 (init_registers_powerpc_altivec64l): ... this new prototype.
19869 (ppc_num_regs): Set to 73.
19870 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19871 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19872 (ppc_cannot_store_register): Handle orig_r3 and trap.
19873 (ppc_arch_setup): Update init_registers_... calls.
19874 (ppc_fill_gregset): Handle orig_r3 and trap.
19875
19876 * inferiors.c (clear_inferiors): Reset current_inferior.
19877
19878 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19879
19880 * acinclude.m4: Add override.m4.
19881 * configure: Regenerate.
19882
19883 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19884
19885 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19886 initial call to init_register_ppc64.
19887
19888 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19889
19890 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19891 single powerpc*-*-linux* case.
19892 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19893
19894 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19895
19896 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19897 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19898 from reg_xmlfiles.
19899 * linux-ppc-low.c: Include <elf.h>.
19900 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19901 (ppc_hwcap): New global variable.
19902 (ppc_regmap): Remove __SPE__ #ifdef sections.
19903 (ppc_regmap_e500): New global variable.
19904 (ppc_cannot_store_register): Update __SPE__ special case.
19905 (ppc_get_hwcap): New function.
19906 (ppc_arch_setup): Use it to determine whether inferior supports
19907 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19908 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19909 Do not access registers if target does not support AltiVec.
19910 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19911 Do not access registers if target does not support SPE.
19912 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19913
19914 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19915
19916 * linux-low.c (disabled_regsets, num_regsets): New.
19917 (use_regsets_p): Delete.
19918 (linux_wait_for_process): Clear disabled_regsets.
19919 (regsets_fetch_inferior_registers): Check and set it.
19920 (regsets_store_inferior_registers): Likewise.
19921 (linux_fetch_registers, linux_store_registers): Do not use
19922 use_regsets_p.
19923 (initialize_low): Allocate disabled_regsets.
19924
19925 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19926
19927 * Makefile.in (LIBOBJS): New.
19928 (OBS): Use LIBOBJS.
19929 (memmem.o): New rule.
19930 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19931 * configure: Regenerated.
19932
19933 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19934
19935 * server.c (handle_query): Never return "unsupported" for
19936 qXfer:features:read queries.
19937
19938 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19939
19940 * server.c (get_features_xml): Fix inverted condition.
19941 (handle_query): Always support qXfer:feature:read.
19942
19943 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19944
19945 * server.c (wrapper_argv): New.
19946 (start_inferior): Handle wrapper_argv. If set, expect an extra
19947 trap.
19948 (gdbserver_usage): Document --wrapper.
19949 (main): Parse --wrapper.
19950
19951 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19952
19953 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19954 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19955 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19956 (ppc_set_pc): Likewise.
19957 (ppc_arch_setup): New function.
19958 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19959 of collect_register.
19960 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19961
19962 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19963
19964 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19965 instead of linux-ppc64-low.o.
19966 * linux-ppc64-low.c: Remove file.
19967 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19968 (linux-ppc64-low.o): Remove rule.
19969
19970 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19971 (init_registers_powerpc_64): Likewise.
19972 (ppc_regmap): Conditionally define depending on __powerpc64__.
19973 (ppc_cannot_store_register): Do not special-case "fpscr" when
19974 compiled on __powerpc64__.
19975 (ppc_collect_ptrace_register): New function.
19976 (ppc_supply_ptrace_register): New function.
19977 (ppc_breakpoint): Change type to "unsigned int".
19978 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19979 (the_low_target): Conditionally provide initializers for the
19980 arch_setup member depending on __powerpc64__. Install
19981 collect_ptrace_register and supply_ptrace_register members.
19982
19983 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19984
19985 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19986 * server.c (gdbserver_xmltarget): Define.
19987 (get_features_xml): Use it to replace "target.xml" and arch_string.
19988
19989 * configure.srv: Remove srv_xmltarget. Add XML files that were
19990 mentioned there to srv_xmlfiles instead. Remove conditional tests
19991 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19992 srv_xmlfiles and srv_regobj to include all possible choices.
19993 * configure.ac (srv_xmltarget): Remove.
19994 (srv_xmlfiles): Do not add "target.xml".
19995 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19996 checks for supplementary target information.
19997 * configure: Regenerate.
19998 * Makefile.in (XML_TARGET): Remove.
19999 (target.xml): Remove rule.
20000 (clean): Do not clean up target.xml.
20001 (.PRECIOUS): Do not mention target.xml.
20002
20003 * target.h (struct target_ops): Remove arch_string member.
20004 * linux-low.c (linux_arch_string): Remove.
20005 (linux_target_ops): Remove arch_string initializer.
20006 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20007 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20008 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20009 * spu-low.c (spu_arch_string): Remove.
20010 (spu_target_ops): Remove arch_string initializer.
20011 * win32-low.c (win32_arch_string): Remove.
20012 (win32_target_ops): Remove arch_string initializer.
20013 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20014 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20015 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20016
20017 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20018
20019 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20020 by collect_ptrace_register and supply_ptrace_register hooks.
20021 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20022 instead of checking for the_low_target.left_pad_xfer.
20023 (usr_store_inferior_registers): Use collect_ptrace_register callback
20024 instead of checking for the_low_target.left_pad_xfer.
20025
20026 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20027 (s390_supply_ptrace_register): Likewise.
20028 (s390_fill_gregset): Call s390_collect_ptrace_register.
20029 (the_low_target): Update.
20030
20031 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20032 (ppc_supply_ptrace_register): Likewise.
20033 (the_low_target): Update.
20034
20035 * linux-i386-low.c (the_low_target): Update.
20036 * linux-x86-64-low.c (the_low_target): Update.
20037
20038 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20039
20040 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20041 reg-s390.o and reg-s390x.o.
20042
20043 * linux-low.c (new_inferior): New global variable.
20044 (linux_create_inferior, linux_attach): Set it.
20045 (linux_wait_for_process): Call the_low_target.arch_setup after the
20046 target has stopped for the first time.
20047 (initialize_low): Do not call the_low_target.arch_setup.
20048
20049 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20050 (s390_set_pc): Likewise.
20051 (s390_arch_setup): New function.
20052 (the_low_target): Use s390_arch_setup as arch_setup routine.
20053
20054 * regcache.c (realloc_register_cache): New function.
20055 (set_register_cache): Call it for each existing regcache.
20056
20057 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20058
20059 * server.h (init_registers): Remove prototype.
20060
20061 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20062 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20063 instead of init_registers ().
20064 * linux-arm-low.c (init_registers_arm): Add prototype.
20065 (init_registers_arm_with_iwmmxt): Likewise.
20066 (the_low_target): Add initializer for arch_setup field.
20067 * linux-cris-low.c (init_registers_cris): Add prototype.
20068 (the_low_target): Add initializer for arch_setup field.
20069 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20070 (the_low_target): Add initializer for arch_setup field.
20071 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20072 (the_low_target): Add initializer for arch_setup field.
20073 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20074 (the_low_target): Add initializer for arch_setup field.
20075 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20076 (the_low_target): Add initializer for arch_setup field.
20077 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20078 (the_low_target): Add initializer for arch_setup field.
20079 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20080 (init_registers_mips64_linux): Likewise.
20081 (the_low_target): Add initializer for arch_setup field.
20082 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20083 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20084 (the_low_target): Add initializer for arch_setup field.
20085 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20086 (init_registers_powerpc_64): Likewise.
20087 (the_low_target): Add initializer for arch_setup field.
20088 * linux-s390-low.c (init_registers_s390): Add prototype.
20089 (init_registers_s390x): Likewise.
20090 (the_low_target): Add initializer for arch_setup field.
20091 * linux-sh-low.c (init_registers_sh): Add prototype.
20092 (the_low_target): Add initializer for arch_setup field.
20093 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20094 (the_low_target): Add initializer for arch_setup field.
20095 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20096 (the_low_target): Add initializer for arch_setup field.
20097
20098 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20099 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20100 instead of init_registers ().
20101 * win32-arm-low.c (init_registers_arm): Add prototype.
20102 (the_low_target): Add initializer for arch_setup field.
20103 * win32-i386-low.c (init_registers_i386): Add prototype.
20104 (the_low_target): Add initializer for arch_setup field.
20105
20106 * spu-low.c (init_registers_spu): Add prototype.
20107 (initialize_low): Call initialie_registers_spu () instead of
20108 initialize_registers ().
20109
20110 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20111
20112 * server.c (handle_v_requests): When handling the vRun and vAttach
20113 packets, if already debugging a process, don't kill it. Return an
20114 error instead.
20115
20116 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20117
20118 * server.c (handle_query): Correct length check.
20119
20120 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20121
20122 * win32-low.c (do_initial_child_stuff): Add process handle
20123 parameter. Set current_process_handle and current_process_id from the
20124 parameters. Clear globals.
20125 (win32_create_inferior): Don't set current_process_handle and
20126 current_process_id here. Instead pass them on the call to
20127 do_initial_child_stuff.
20128 (win32_attach): Likewise.
20129 (win32_clear_inferiors): New.
20130 (win32_kill): Don't close the current process handle or the
20131 current thread handle here. Instead call win32_clear_inferiors.
20132 (win32_detach): Don't open a new handle to the process. Call
20133 win32_clear_inferiors.
20134 (win32_join): Don't rely on current_process_handle; open a new
20135 handle using the process id.
20136 (win32_wait): Call win32_clear_inferiors when the inferior process
20137 has exited.
20138
20139 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20140
20141 * server.c (monitor_show_help): Add "exit".
20142
20143 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20144
20145 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20146 (clean): Add reg-xtensa.c.
20147 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20148 * configure.srv (xtensa*-*-linux*) New target.
20149 * linux-xtensa-low.c: New.
20150 * xtensa-xtregs.c: New.
20151
20152 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20153
20154 * hostio.c: Don't include errno.h.
20155 (errno_to_fileio_errno): Move to hostio-errno.
20156 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20157 error number outputting to the target->hostio_last_error callback.
20158 (hostio_packet_error): Use FILEIO_EINVAL directly.
20159 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20160 calls to hostio_error.
20161 * hostio-errno.c: New.
20162 * server.h (hostio_last_error_from_errno): Declare.
20163 * target.h (target_ops): Add hostio_last_error member.
20164 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20165 as hostio_last_error handler.
20166 * spu-low.c (spu_target_ops): Likewise.
20167 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20168 (wince_hostio_last_error): New functions.
20169 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20170 as hostio_last_error handler.
20171 (win32_target_ops) [!_WIN32_WCE]: Register
20172 hostio_last_error_from_errno as hostio_last_error handler.
20173 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20174 (hostio-errno.o): New rule.
20175 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20176 * configure.srv (srv_hostio_err_objs): New variable. Default to
20177 hostio-errno.o.
20178 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20179 * configure: Regenerate.
20180
20181 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20182
20183 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20184 (linux_kill, linux_detach): Clean up the process list.
20185 * remote-utils.c (remote_open): Improve port number parsing.
20186 (putpkt_binary, input_interrupt): Only send interrupts if the target
20187 is running.
20188 * server.c (extended_protocol): Make static.
20189 (attached): Define earlier.
20190 (exit_requested, response_needed, program_argv): New variables.
20191 (target_running): New.
20192 (start_inferior): Clear attached here.
20193 (attach_inferior): Set attached here.
20194 (require_running): Define.
20195 (handle_query): Use require_running and target_running. Implement
20196 "monitor exit".
20197 (handle_v_attach, handle_v_run): New.
20198 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20199 (gdbserver_usage): Update.
20200 (main): Redo argument parsing. Handle --debug and --multi. Handle
20201 --attach along with other options or after the port. Save
20202 program_argv. Support no initial program. Resynchronize
20203 communication with GDB after an error. Handle "monitor exit".
20204 Use require_running and target_running. Always allow the extended
20205 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20206 restart in extended mode.
20207 * README: Refer to the GDB manual. Update --attach usage.
20208
20209 2007-12-20 Andreas Schwab <schwab@suse.de>
20210
20211 * linux-low.c (STACK_SIZE): Define.
20212 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20213 (linux_test_for_tracefork): Likewise.
20214
20215 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20216
20217 * linux-low.c (linux_wait_for_event): Update messages. Do not
20218 reinsert auto-delete breakpoints.
20219 * mem-break.c (struct breakpoint): Change return type of handler to
20220 int.
20221 (set_breakpoint_at): Update handler type.
20222 (reinsert_breakpoint_handler): Return 1 instead of calling
20223 delete_breakpoint.
20224 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20225 setting a new one.
20226 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20227 * mem-break.h (set_breakpoint_at): Update handler type.
20228 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20229 * win32-low.c (auto_delete_breakpoint): New.
20230 (get_child_debug_event): Use it.
20231
20232 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20233
20234 * configure.ac: Check for pread and pwrite.
20235 * hostio.c (handle_pread): Fall back to lseek and read.
20236 (handle_pwrite): Fall back to lseek and write.
20237 * config.in, configure: Regenerated.
20238
20239 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20240
20241 * server.c (myresume): Add own_buf argument.
20242 (main): Update calls.
20243
20244 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20245
20246 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20247 * remote-utils.c (remote_open): Do not call disable_async_io.
20248 (block_async_io): Delete.
20249 (unblock_async_io): Make static.
20250 (initialize_async_io): New.
20251 * server.c (handle_v_cont): Handle async I/O here.
20252 (myresume): Likewise. Move other common resume tasks here...
20253 (main): ... from here. Call initialize_async_io. Disable async
20254 I/O before the main loop.
20255 * server.h (initialize_async_io): Declare.
20256 (block_async_io, unblock_async_io): Delete prototypes.
20257 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20258
20259 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20260
20261 * remote-utils.c (readchar): Allow binary data in received messages.
20262
20263 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20264
20265 * win32-low.c (attaching): New global.
20266 (win32_create_inferior): Clear the `attaching' global.
20267 (win32_attach): Set the `attaching' global.
20268 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20269 attaching. Only set a breakpoint at the entry point if not
20270 attaching.
20271
20272 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20273
20274 * server.c (main): Don't report dll events on the initial
20275 connection on attaches.
20276
20277 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20278
20279 * server.c (main): Relax numerical bases supported for the pid of
20280 the --attach command line argument.
20281
20282 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20283
20284 * win32-low.c (win32_attach): Call OpenProcess before
20285 DebugActiveProcess, not after. Add last error output to error
20286 call.
20287
20288 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20289
20290 * win32-low.c (win32_get_thread_context)
20291 (win32_set_thread_context): New functions.
20292 (thread_rec): Use win32_get_thread_context.
20293 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20294 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20295 field.
20296
20297 2007-12-03 Leo Zayas
20298 Pedro Alves <pedro_alves@portugalmail.pt>
20299
20300 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20301 global variables.
20302 (child_add_thread): Minor cleanup.
20303 (child_continue): Resume artificially suspended threads before
20304 calling ContinueDebugEvent.
20305 (suspend_one_thread): New.
20306 (fake_breakpoint_event): New.
20307 (get_child_debug_event): Change return type to int. Check here if
20308 gdb sent an interrupt request. If a soft interrupt was requested,
20309 fake a breakpoint event. Return 0 if there is no event to handle,
20310 and 1 otherwise.
20311 (win32_wait): Don't check here if gdb sent an interrupt request.
20312 Ensure there is a valid event to handle.
20313 (win32_request_interrupt): Add soft interruption method as last
20314 resort.
20315
20316 2007-12-03 Leo Zayas
20317 Pedro Alves <pedro_alves@portugalmail.pt>
20318
20319 * win32-low.h (win32_thread_info): Add descriptions to the
20320 structure members. Replace `suspend_count' counter by a
20321 `suspended' flag.
20322 * win32-low.c (thread_rec): Update condition of when to get the
20323 context from the inferior. Rely on ContextFlags being set if it
20324 has already been retrieved. Only suspend the inferior thread if
20325 we haven't already. Warn if that fails.
20326 (continue_one_thread): s/suspend_count/suspended/. Only call
20327 ResumeThread once. Warn if that fails.
20328
20329 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20330
20331 * win32-low.c (win32_wait): Don't read from the inferior when it
20332 has already exited.
20333
20334 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20335
20336 * Makefile.in (win32_low_h): New variable.
20337 (win32-low.o): Add dependency on $(win32_low_h).
20338 (win32-arm-low.o, win32-i386-low.o): New rules.
20339
20340 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20341
20342 * hostio.c: Correct copyright year.
20343
20344 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20345
20346 * Makefile.in (OBS): Add hostio.o.
20347 (hostio.o): New rule.
20348 * server.h (handle_vFile): Declare.
20349 * hostio.c: New file.
20350 * server.c (handle_v_requests): Take packet_len and new_packet_len
20351 for binary packets. Call handle_vFile.
20352 (main): Update call to handle_v_requests.
20353
20354 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20355
20356 * linux-low.c: Include <sched.h>.
20357
20358 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20359
20360 * linux-low.c (linux_tracefork_grandchild): New.
20361 (linux_tracefork_child): Use clone.
20362 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20363
20364 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20365
20366 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20367
20368 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20369
20370 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20371
20372 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20373
20374 * inferiors.c (change_inferior_id): Delete.
20375 (add_pid_to_list, pull_pid_from_list): New.
20376 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20377 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20378 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20379 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20380 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20381 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20382 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20383 (using_threads): Always set to 1.
20384 (handle_extended_wait): New.
20385 (add_process): Do not set TID.
20386 (linux_create_inferior): Set must_set_ptrace_flags.
20387 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20388 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20389 (linux_thread_alive): Rename TID argument to LWPID.
20390 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20391 (linux_wait_for_event): Do not use TID or check using_threads. Update
20392 call to dead_thread_notify. Call handle_extended_wait.
20393 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20394 (send_sigstop): Delete sigstop_sent.
20395 (wait_for_sigstop): Avoid TID.
20396 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20397 (linux_test_for_tracefork): New.
20398 (linux_lookup_signals): Use thread_db_active and
20399 linux_supports_tracefork_flag.
20400 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20401 * linux-low.h (get_process_thread): Avoid TID.
20402 (struct process_ifo): Move thread_known and tid to the end. Remove
20403 sigstop_sent.
20404 (linux_attach_lwp, thread_db_init): Update prototypes.
20405 * server.h (change_inferior_id): Delete prototype.
20406 (add_pid_to_list, pull_pid_from_list): New prototypes.
20407 * thread-db.c (thread_db_use_events): New.
20408 (find_first_thread): Rename to...
20409 (find_one_thread): ...this. Update callers and messages. Do not
20410 call fatal. Check thread_db_use_events. Do not call
20411 change_inferior_id or new_thread_notify.
20412 (maybe_attach_thread): Update. Do not call new_thread_notify.
20413 (thread_db_init): Set thread_db_use_events. Check use_events.
20414 * utils.c (fatal, warning): Correct message prefix.
20415
20416 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20417
20418 * Makefile.in (clean): Remove new files.
20419 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20420 (powerpc-64.o, powerpc-64.c): New rules.
20421 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20422 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20423 with SPE.
20424 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20425 SPE targets.
20426 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20427 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20428 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20429 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20430 (target_regsets): Add AltiVec and SPE register sets.
20431 * configure.ac: Check for AltiVec and SPE.
20432 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20433 (ppc_fill_vrregset, ppc_store_vrregset): New.
20434 (target_regsets): Add AltiVec register set.
20435 * configure: Regenerated.
20436
20437 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20438
20439 * linux-low.c (O_LARGEFILE): Define.
20440 (linux_read_memory): Use /proc/PID/mem.
20441 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20442 * configure, config.in: Regenerated.
20443
20444 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20445
20446 * linux-low.c (linux_wait_for_event): Do not pass signals while
20447 single-stepping.
20448
20449 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20450
20451 * win32-low.c (create_process): New.
20452 (win32_create_inferior): Use create_process instead of
20453 CreateProcess. If create_process failed retry appending an ".exe"
20454 suffix. Store the GetLastError result immediatelly after
20455 create_process calls and use it on the call to error.
20456
20457 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20458
20459 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20460
20461 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20462
20463 * configure.ac: Switch license to GPLv3.
20464
20465 2007-08-01 Michael Snyder <msnyder@access-company.com>
20466
20467 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20468
20469 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20470
20471 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20472 typedef.
20473 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20474 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20475 CloseToolhelp32Snapshot.
20476 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20477 CloseToolhelp32Snapshot.
20478
20479 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20480
20481 * server.c (main): Check for inferior exit before main loop.
20482
20483 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20484
20485 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20486 instead of on tmp_desc.
20487
20488 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20489 Daniel Jacobowitz <dan@codesourcery.com>
20490
20491 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20492 (add_thread): Minor cleanups.
20493 (clear_inferiors): Move lower in the file. Clear the DLL
20494 list.
20495 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20496 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20497 (xml_escape_text): New.
20498 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20499 for qSupported.
20500 (handle_v_cont): Report errors.
20501 (gdbserver_version): Update.
20502 (main): Correct size of own_buf. Do not report initial DLL events.
20503 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20504 (unloaded_dll, xml_escape_text): New.
20505 * win32-low.c (enum target_waitkind): Update comments.
20506 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20507 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20508 (win32_EnumProcessModules, win32_GetModuleInformation)
20509 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20510 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20511 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20512 (win32_Module32First, win32_Module32Next, load_toolhelp)
20513 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20514 (get_child_debug_event): Handle DLL events.
20515 (win32_wait): Likewise.
20516
20517 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20518
20519 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20520 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20521
20522 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20523
20524 * win32-low.c (handle_output_debug_string): Ignore event if not
20525 waiting.
20526
20527 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20528
20529 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20530
20531 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20532
20533 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20534
20535 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20536
20537 * inferiors.c (change_inferior_id): Add comment.
20538 * linux-low.c (check_removed_breakpoint): Add an early
20539 prototype. Improve debug output.
20540 (linux_attach): Doc update.
20541 (linux_detach_one_process, linux_detach): Clean up before releasing
20542 each process.
20543 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20544 * linux-low.h (struct process_info): Doc improvement.
20545 * mem-break.c (delete_all_breakpoints): New.
20546 * mem-break.h (delete_all_breakpoints): New prototype.
20547 * thread-db.c (find_first_thread): New.
20548 (thread_db_create_event): Call it instead of
20549 thread_db_find_new_threads. Clean up unused variables.
20550 (maybe_attach_thread): Remove first thread handling.
20551 (thread_db_find_new_threads): Use find_first_thread.
20552 (thread_db_get_tls_address): Likewise.
20553
20554 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20555
20556 * thread-db.c (thread_db_find_new_threads): Add prototype.
20557 (thread_db_create_event): Check for the main thread before adding
20558 a new thread.
20559 (maybe_attach_thread): Only enable event reporting if TID == 0.
20560 (thread_db_get_tls_address): Check for new threads.
20561
20562 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20563
20564 * linux-low.c (linux_create_inferior): Try execv before execvp.
20565 * spu-low.c (spu_create_inferior): Likewise.
20566
20567 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20568
20569 * linux-low.c (linux_create_inferior): Change execv to execvp.
20570 * spu-low.c (spu_create_inferior): Likewies.
20571
20572 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20573
20574 * Makefile.in (clean): Clean new files instead of deleted ones.
20575 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20576 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20577 rules.
20578 * configure.srv: Specify XML files and new regformats for MIPS and
20579 MIPS64 GNU/Linux.
20580 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20581 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20582 an entry for the restart register.
20583 (mips_cannot_fetch_register, mips_cannot_store_register)
20584 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20585 register names to match the XML descriptions.
20586 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20587 restart register instead of $0.
20588
20589 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20590 Markus Deuling <deuling@de.ibm.com>
20591
20592 * remote-utils.c (decode_xfer_write): New function.
20593 * server.h (decode_xfer_write): Add prototype.
20594 * server.c (handle_query): Add PACKET_LEN argument. Support
20595 qXfer:spu:read and qXfer:spu:write packets.
20596 (main): Pass packet_len to handle_query.
20597 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20598 * target.h (target_ops): Add qxfer_spu.
20599
20600 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20601
20602 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20603 accessing non-seekable spufs files.
20604
20605 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20606
20607 * server.c (handle_query): Add reply for qC packet.
20608
20609 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20610 Leo Zayas <lerele@champenstudios@com>
20611
20612 * server.h (check_remote_input_interrupt_request): New function.
20613 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20614 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20615 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20616 (check_remote_input_interrupt_request): New function.
20617 * server.h (check_remote_input_interrupt_request): Declare.
20618 * win32-low.c (winapi_DebugBreakProcess,
20619 winapi_GenerateConsoleCtrlEvent): New typedefs.
20620 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20621 to 250 ms.
20622 (win32_wait): Check for remote interrupt request
20623 with check_remote_input_interrupt_request.
20624 (win32_request_interrupt): New function.
20625 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20626
20627 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20628
20629 * win32-low.c (debug_registers_changed,
20630 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20631 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20632 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20633 (thread_rec): Get context using the low target.
20634 (child_add_thread): Call thread_added on the low target,
20635 which does the same thing.
20636 (regptr): Delete.
20637 (do_initial_child_stuff): Remove debug registers references.
20638 Set context using the low target. Resume threads after
20639 setting the contexts.
20640 (child_continue): Remove dead variable. Remove debug
20641 registers references.
20642 (child_fetch_inferior_registers): Go through the low target.
20643 (do_child_store_inferior_registers): Remove.
20644 (child_store_inferior_registers): Go through the low target.
20645 (win32_resume): Remove debug registers references.
20646 Set context using the low target.
20647 (handle_exception): Change return type to void. Don't record
20648 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20649 first chance exception.
20650 (get_child_debug_event): Change return type to void. Remove
20651 goto loop. Always return after waiting for debug event.
20652 (win32_wait): Convert to switch statement. Handle spurious
20653 events.
20654
20655 * win32-i386-low.c (debug_registers_changed,
20656 debug_registers_used): New.
20657 (initial_stuff): Rename to ...
20658 (i386_initial_stuff): ... this. Clear debug registers
20659 state variables.
20660 (store_debug_registers): Delete.
20661 (i386_get_thread_context): New.
20662 (load_debug_registers): Delete.
20663 (i386_set_thread_context): New.
20664 (i386_thread_added): New.
20665 (single_step): Rename to ...
20666 (i386_single_step): ... this.
20667 (do_fetch_inferior_registers): Rename to ...
20668 (i386_fetch_inferior_register): ... this.
20669 (i386_store_inferior_register): New.
20670 (the_low_target): Adapt to new interface.
20671
20672 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20673 (arm_get_thread_context): New.
20674 (arm_set_thread_context): New.
20675 (regptr): New.
20676 (do_fetch_inferior_registers): Rename to ...
20677 (arm_fetch_inferior_register): ... this.
20678 (arm_store_inferior_register): New.
20679 (arm_wince_breakpoint): Reimplement as unsigned long.
20680 (arm_wince_breakpoint_len): Define.
20681 (the_low_target): Adapt to new interface.
20682
20683 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20684 load_debug_registers. Add get_thread_context, set_thread_context,
20685 thread_added and store_inferior_register. Rename
20686 fetch_inferior_registers to fetch_inferior_register.
20687 (regptr): Remove declaration.
20688
20689 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20690
20691 * linux-low.c (linux_detach): Change return type to int. Return 0.
20692 * spu-low.c (spu_detach): Likewise.
20693
20694 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20695
20696 * target.h (target_ops): Change return type of detach to int.
20697 Add join.
20698 (join_inferior): New.
20699 * server.c (main): Don't skip detach support on mingw32.
20700 If the inferior doesn't support detaching return error.
20701 Call join_inferior instead of using waitpid.
20702 * linux-low.c (linux_join): New.
20703 (linux_target_op): Add linux_join.
20704 * spu-low.c (spu_join): New.
20705 (spu_target_ops): Add spu_join.
20706 * win32-low.c (win32_detach): Adapt to new interface.
20707 Reopen current_process_handle before detaching. Issue a child
20708 resume before detaching.
20709 (win32_join): New.
20710 (win32_target_op): Add win32_join.
20711
20712 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20713
20714 * win32-low.c (win32-attach): Fix return value.
20715 * target.h (target_ops): Describe ATTACH return values.
20716
20717 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20718
20719 * win32-low.c (GETPROCADDRESS): Define.
20720 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20721 (winapi_DebugSetProcessKillOnExit): Likewise.
20722 (win32_create_inferior): Force usage of ansi CreateProcessA.
20723 (win32_attach): Use GETPROCADDRESS.
20724 (win32_detach): Likewise.
20725
20726 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20727
20728 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20729
20730 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20731
20732 * win32-low.c: Commit leftover changes from 2007-03-29.
20733
20734 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20735
20736 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20737 fields short instead of int. Add explicit padding.
20738 (i387_cache_to_fsave): Remove unnecessary casts.
20739 (i387_fsave_to_cache): Doc fix.
20740 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20741
20742 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20743
20744 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20745 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20746
20747 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20748
20749 * configure.srv (arm*-*-mingw32ce*): Move near the other
20750 arm targets.
20751
20752 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20753
20754 * configure.ac: Add errno checking.
20755 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20756 sys/file.h and malloc.h.
20757 (AC_CHECK_DECLS): Add perror.
20758 (srv_mingwce): Handle.
20759 * configure.srv (i[34567]86-*-cygwin*): Add
20760 win32-i386-low.o to srv_tgtobj.
20761 (i[34567]86-*-mingw*): Likewise.
20762 (arm*-*-mingw32ce*): Add case.
20763 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20764 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20765 [__MINGW32CE__] (strerror): New function.
20766 [__MINGW32CE__] (errno): Define to GetLastError.
20767 [__MINGW32CE__] (COUNTOF): New macro.
20768 (remote_open): Remove extra close call.
20769 * mem-break.c (delete_breakpoint_at): New function.
20770 * mem-break.h (delete_breakpoint_at): Declare.
20771 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20772 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20773 [USE_WIN32API] (read, write): Add char* casts.
20774 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20775 * server.h: Include wincecompat.h on Windows CE.
20776 [HAVE_ERRNO_H]: Check.
20777 (perror): Declare if not declared.
20778 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20779 (perror_with_name): Remove errno declaration.
20780 * wincecompat.h: New.
20781 * wincecompat.c: New.
20782 * win32-low.h: New.
20783 * win32-arm-low.c: New.
20784 * win32-i386-low.c: New.
20785 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20786 (OUTMSG2): Make it safe.
20787 (_T): New macro.
20788 (COUNTOF): New macro.
20789 (NUM_REGS): Get it from the low target.
20790 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20791 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20792 (thread_rec): Let low target handle debug registers.
20793 (child_add_thread): Likewise.
20794 (child_init_thread_list): Likewise.
20795 (continue_one_thread): Likewise.
20796 (regptr): New.
20797 (do_child_fetch_inferior_registers): Move to ...
20798 * win32-i386-low.c: ... here, and rename to ...
20799 (do_fetch_inferior_registers): ... this.
20800 * win32-low.c (child_fetch_inferior_registers):
20801 Go through the low target.
20802 (do_child_store_inferior_registers): Use regptr.
20803 (strwinerror): New function.
20804 (win32_create_inferior): Handle Windows CE.
20805 Use strwinerror instead of strerror on Windows error
20806 codes. Add program to the error output.
20807 Don't close the main thread handle on Windows CE.
20808 (win32_attach): Use coredll.dll on Windows CE.
20809 (win32_kill): Close current process and current
20810 thread handles.
20811 (win32_detach): Use coredll.dll on Windows CE.
20812 (win32_resume): Let low target handle debug registers, and
20813 step request.
20814 (handle_exception): Add/Remove initial breakpoint. Avoid
20815 non-existant WSTOPSIG on Windows CE.
20816 (win32_read_inferior_memory): Cast to remove warning.
20817 (win32_arch_string): Go through the low target.
20818 (initialize_low): Call set_breakpoint_data with the low
20819 target's breakpoint.
20820 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20821 FOP_REGNUM, mappings): Move to ...
20822 * win32-i386-low.c: ... here.
20823 * win32-low.c (win32_thread_info): Move to ...
20824 * win32-low.h: ... here.
20825 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20826 win32-arm-low.c and wincecompat.c.
20827 (all:): Add $EXEEXT.
20828 (install-only:): Likewise.
20829 (gdbserver:): Likewise.
20830 (gdbreplay:): Likewise.
20831 * config.in: Regenerate.
20832 * configure: Regenerate.
20833
20834 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20835
20836 * win32-low.c: Rename typedef thread_info to
20837 win32_thread_info throughout.
20838
20839 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20840
20841 * win32-i386-low.c: Rename to ...
20842 * win32-low.c: ... this.
20843 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20844 * Makefile.in: Likewise.
20845
20846 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20847
20848 * remote-utils.c (monitor_output): Constify msg parameter.
20849 * server.h (monitor_output): Likewise.
20850 * win32-i386-low.c (handle_output_debug_string): New.
20851 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20852 handle_output_debug_string.
20853 (get_child_debug_event): Likewise.
20854
20855 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20856
20857 * server.c (main): Correct strtoul check.
20858
20859 2007-03-27 Jon Ringle <jon@ringle.org>
20860
20861 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20862
20863 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20864
20865 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20866
20867 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20868
20869 * terminal.h: Check HAVE_SGTTY_H.
20870
20871 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20872
20873 * remote-utils.c (remote_open): Print out the assigned port number.
20874
20875 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20876
20877 * remote-utils.c (monitor_output): New function.
20878 * server.c (debug_threads): Define here.
20879 (monitor_show_help): New function.
20880 (handle_query): Handle qRcmd.
20881 (main): Do not handle 'd' packet.
20882 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20883 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20884 of debug_threads.
20885
20886 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20887
20888 * Makefile.in (EXEEXT): New.
20889 (clean): Use $(EXEEXT).
20890
20891 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20892
20893 * target.h (target_ops): Rename send_signal to request_interrupt,
20894 and remove enum target_signal parameter.
20895 * linux-low.c (linux_request_interrupt): Rename from
20896 linux_send_signal, and always send SIGINT.
20897 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20898 and always send SIGINT.
20899 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20900 of send_signal.
20901 (input_interrupt): Likewise.
20902
20903 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20904
20905 * server.c (get_features_xml): Check if target implemented
20906 arch_string.
20907 * win32-i386-low.c (win32_arch_string): New.
20908 (win32_target_ops): Add win32_arch_string as arch_string member.
20909
20910 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20911
20912 * spu-low.c (spu_arch_string): New.
20913 (spu_target_ops): Add spu_arch_string.
20914
20915 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20916
20917 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20918 * configure.ac: Do not check for terminal.h.
20919 * configure, config.in: Regenerated.
20920
20921 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20922
20923 * Makefile.in (OBS): Add $(XML_BUILTIN).
20924 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20925 (clean): Update.
20926 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20927 (arm-with-iwmmxt.c): New.
20928 * config.in, configure: Regenerate.
20929 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20930 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20931 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20932 (arm*-*-linux*): Add iWMMXt and regset support.
20933 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20934 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20935 (arm_store_wmmxregset, target_regsets): New.
20936 * server.c (get_features_xml): Take annex argument. Check builtin
20937 XML documents.
20938 (handle_query): Handle multiple annexes.
20939
20940 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20941
20942 * remote-utils.c [USE_WIN32API] (read, write): Define.
20943 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20944 write.
20945
20946 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20947
20948 * linux-i386-low.c (the_low_target): Set arch_string.
20949 * linux-x86-64-low.c (the_low_target): Likewise.
20950 * linux-low.c (linux_arch_string): New.
20951 (linux_target_ops): Add it.
20952 * linux-low.h (struct linux_target_ops): Add arch_string.
20953 * server.c (write_qxfer_response): Use const void * for DATA.
20954 (get_features_xml): New.
20955 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20956 * target.h (struct target_ops): Add arch_string method.
20957
20958 2007-01-03 Denis Pilat <denis.pilat@st.com>
20959 Daniel Jacobowitz <dan@codesourcery.com>
20960
20961 * linux-low.c (linux_kill): Handle being called with no threads.
20962 * win32-i386-low.c (win32_kill): Likewise.
20963 (get_child_debug_event): Clear current_process_handle.
20964
20965 2006-12-30 Denis PILAT <denis.pilat@st.com>
20966 Daniel Jacobowitz <dan@codesourcery.com>
20967
20968 * remote-utils.c (remote_open): Check the type of specified
20969 serial port devices before opening them.
20970 * server.c (main): Kill the inferior if an error occurs during
20971 the first remote_open.
20972
20973 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20974
20975 * README: Update supported targets.
20976
20977 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20978
20979 * Makefile.in (clean): Remove reg-mips64.c.
20980 (reg-mips64.c, reg-mips64.o): New rules.
20981 * configure.srv: Handle mips64. Include regset support for mips.
20982 * linux-mips-low.c (union mips_register): New.
20983 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20984 (mips_breakpoint, mips_breakpoint_at): Use int.
20985 (mips_collect_register, mips_supply_register)
20986 (mips_collect_register_32bit, mips_supply_register_32bit)
20987 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20988 (mips_store_fpregset, target_regsets): New.
20989 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20990
20991 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20992
20993 * configure.srv: Add target "spu*-*-*".
20994 * Makefile.in (clean): Remove reg-spu.c.
20995 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20996 * spu-low.c: New file.
20997
20998 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20999
21000 * configure.ac: Correct td_thr_tls_get_addr test.
21001 * configure: Regenerated.
21002
21003 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21004
21005 * linux-low.c (linux_wait_for_event): Reformat. Use the
21006 pass_signals array.
21007 * remote-utils.c (decode_address_to_semicolon): New.
21008 * server.c (pass_signals, handle_general_set): New.
21009 (handle_query): Mention QPassSignals for qSupported.
21010 (main): Call handle_general_set.
21011 * server.h (pass_signals, decode_address_to_semicolon): New.
21012
21013 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21014
21015 * server.c (handle_query): Correct error handling for read_auxv.
21016
21017 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21018
21019 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21020 and srv_linux_thread_db to yes.
21021 * linux-s390-low.c (s390_fill_gregset): New function.
21022 (target_regsets): Define data structure.
21023
21024 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21025
21026 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21027 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21028 * config.in, configure: Regenerated.
21029 * inferiors.c (gdb_id_to_thread): New function.
21030 (gdb_id_to_thread_id): Use it.
21031 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21032 * linux-low.h (struct process_info): Add th member.
21033 (thread_db_get_tls_address): New prototype.
21034 * remote-utils.c (decode_address): Make non-static.
21035 * server.c (handle_query): Handle qGetTLSAddr.
21036 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21037 * target.h (struct target_ops): Add get_tls_address.
21038 * thread-db.c (maybe_attach_thread): Save the thread handle.
21039 (thread_db_get_tls_address): New.
21040
21041 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21042
21043 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21044 (linux_resume_one_process): Take a siginfo_t *. Update all
21045 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21046 (struct pending_signals): Add a siginfo_t.
21047 (linux_wait_for_process): Always set last_status.
21048 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21049 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21050 * linux-low.h (struct process_info): Add last_status.
21051
21052 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21053
21054 * remote-utils.c (try_rle): New function.
21055 (putpkt_binary): Use it.
21056
21057 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21058
21059 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21060 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21061 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21062 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21063 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21064 point registers.
21065
21066 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21067
21068 * server.c (terminal_fd): New variable.
21069 (old_foreground_pgrp): Likewise.
21070 (restore_old_foreground_pgrp): New function.
21071 (start_inferior): Record the terminal file descriptor in terminal_fd
21072 and its original foreground group in old_foreground_pgrp. Register
21073 restore_old_foreground_pgrp with atexit().
21074
21075 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21076
21077 * server.c (handle_query): Correct qPart to qXfer.
21078
21079 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21080
21081 * configure.ac: Check for more headers which are missing on
21082 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21083 * configure.srv: Add Cygwin and mingw32.
21084 * remote-utils.c: Don't include headers unconditionally which
21085 are missing on mingw32. Include <winsock.h> for mingw32.
21086 (remote_open): Adjust for mingw32 support. Flush
21087 standard error after writing to it.
21088 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21089 (unblock_async_io, enable_async_io, disable_async_io)
21090 (readchar, getpkt): Update for Winsock support.
21091 (prepare_resume_reply): Expect a protocol signal number.
21092 * server.c: Disable <sys/wait.h> on mingw32.
21093 (start_inferior): Adjust for mingw32 support. Flush
21094 standard error after writing to it.
21095 (attach_inferior): Likewise. Use protocol signal
21096 numbers.
21097 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21098 and names.
21099 * win32-i386-low.c: New file.
21100 * Makefile.in (XM_CLIBS): Set.
21101 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21102 (win32-i386-low.o): New dependency rule.
21103 * linux-low.c (linux_wait): Use target signal numbers.
21104 * target.h (struct target_ops): Doc fix.
21105 * server.h (target_signal_to_name): New prototype.
21106 * gdbreplay.c: Don't include headers unconditionally which
21107 are missing on mingw32. Include <winsock.h> for mingw32.
21108 (remote_close, remote_open): Adjust for Winsock support.
21109 * configure, config.in: Regenerated.
21110
21111 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21112
21113 * server.c (decode_xfer_read, write_qxfer_response): New.
21114 (handle_query): Take a packet length argument. Handle
21115 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21116 the qSupported response.
21117 (main): Update call to handle_query.
21118
21119 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21120
21121 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21122 (putpkt_binary): Renamed from putpkt and adjusted for binary
21123 data.
21124 (putpkt): New wrapper for putpkt_binary.
21125 (readchar): Don't mask off the high bit.
21126 (decode_X_packet): New function.
21127 * server.c (main): Call putpkt_binary if a handler sets the packet
21128 length. Save the length of the incoming packet. Handle 'X'.
21129 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21130
21131 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21132
21133 * server.c (handle_query): Handle qSupported.
21134
21135 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21136
21137 * remote-utils.c (all_symbols_looked_up): New variable.
21138 (look_up_one_symbol): Check it.
21139 * server.h (look_up_one_symbol): New declaration.
21140 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21141
21142 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21143
21144 * Makefile.in (linux-arm-low.o): Update dependencies.
21145 * linux-arm-low.c: Include "gdb_proc_service.h".
21146 (PTRACE_GET_THREAD_AREA): Define.
21147 (ps_get_thread_area): New function.
21148
21149 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21150
21151 * configure.srv (m68k*-*-uclinux*): New target.
21152 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21153 (linux_resume_one_process): Remove extraneous cast.
21154 (linux_read_offsets): New.
21155 (linux_target_op): Add linux_read_offsets on mmuless systems.
21156 * server.c (handle_query): Add qOffsets logic.
21157 * target.h (struct target_ops): Add read_offsets.
21158
21159 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21160
21161 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21162 (PTRACE_GET_THREAD_AREA): Define.
21163 (ps_get_thread_area): New function.
21164 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21165 (linux-x86-64-low.o): Update.
21166
21167 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21168
21169 * configure.ac: Remove checks for prfpregset_t.
21170 * gdb_proc_service.h: New file.
21171 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21172 new "gdb_proc_service.h".
21173 * proc-service.c: Likewise.
21174 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21175 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21176 * Makefile.in (gdb_proc_service_h): Updated.
21177 * configure, config.in: Regenerated.
21178
21179 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21180
21181 * remote-utils.c (prepare_resume_reply): Move declaration
21182 of gdb_id_from_wait to the top of the block.
21183
21184 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21185
21186 * linux-low.c (regsets_store_inferior_registers): Read the regset
21187 from the target before filling it.
21188
21189 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21190
21191 * server.c (attach_inferior): Return SIGTRAP for a successful
21192 attach.
21193
21194 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21195
21196 * Makefile.in (OBS): Add version.o.
21197 (STAGESTUFF): Delete.
21198 (version.o): Add dependencies.
21199 (version.c): Replace rule.
21200 (clean): Remove version.c.
21201 * server.c (gdbserver_version): New.
21202 (gdbserver_usage): Use printf.
21203 (main): Handle --version and --help.
21204 * server.h (version, host_name): Add declarations.
21205
21206 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21207
21208 * linux-arm-low.c:
21209 * linux-arm-low.c:
21210 * inferiors.c:
21211 * i387-fp.h:
21212 * i387-fp.c:
21213 * gdbreplay.c:
21214 * regcache.c:
21215 * proc-service.c:
21216 * mem-break.h:
21217 * mem-break.c:
21218 * linux-x86-64-low.c:
21219 * linux-sh-low.c:
21220 * linux-s390-low.c:
21221 * linux-ppc64-low.c:
21222 * linux-ppc-low.c:
21223 * linux-mips-low.c:
21224 * linux-m68k-low.c:
21225 * linux-m32r-low.c:
21226 * linux-low.h:
21227 * linux-low.c:
21228 * linux-ia64-low.c:
21229 * linux-i386-low.c:
21230 * linux-crisv32-low.c:
21231 * thread-db.c:
21232 * terminal.h:
21233 * target.h:
21234 * target.c:
21235 * server.h:
21236 * server.c:
21237 * remote-utils.c:
21238 * regcache.h:
21239 * utils.c:
21240 * Makefile.in:
21241 * configure.ac:
21242 * gdbserver.1: Add (C) after Copyright. Update the FSF
21243 address.
21244
21245 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21246
21247 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21248 (arm_breakpoint_at): Recognize both breakpoints.
21249 (the_low_target): Use the correct breakpoint instruction.
21250
21251 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21252
21253 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21254 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21255 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21256 (the_low_target): Update.
21257
21258 2005-10-25 Andreas Schwab <schwab@suse.de>
21259
21260 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21261
21262 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21263 (ia64_num_regs): Reduce to 462.
21264
21265 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21266
21267 * acinclude.m4: Correct quoting.
21268 * aclocal.m4: Regenerated.
21269
21270 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21271 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21272 (thread_db_init): Call thread_db_err_str.
21273 * configure.ac: Check for TD_VERSION.
21274 * config.in, configure: Regenerated.
21275
21276 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21277
21278 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21279
21280 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21281
21282 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21283 is not available. Define HAVE_PTRACE_GETREGS if it is.
21284 * config.in, configure: Regenerated.
21285 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21286 * linux-i386-low.c, linux-m68k-low.c: Update to use
21287 HAVE_PTRACE_GETREGS.
21288 * linux-low.c (regsets_fetch_inferior_registers)
21289 (regsets_store_inferior_registers): Only return 0 if we processed
21290 GENERAL_REGS.
21291 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21292 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21293
21294 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21295
21296 * inferiors.c (struct thread_info): Add gdb_id.
21297 (add_thread): Add gdb_id argument.
21298 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21299 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21300 calls to add_thread.
21301 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21302 * server.c (handle_query): Use thread_to_gdb_id.
21303 (handle_v_cont, main): Use gdb_id_to_thread_id.
21304 * server.h (add_thread): Update prototype.
21305 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21306 prototypes.
21307
21308 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21309
21310 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21311 left-padded registers.
21312 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21313 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21314
21315 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21316
21317 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21318 * configure: Regenerate.
21319 * config.in: Regenerate.
21320 * server.h (NEED_DECLARATION_STRERROR):
21321 Replace with !HAVE_DECL_STRERROR.
21322
21323 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21324
21325 * linux-low.c (linux_wait, linux_send_signal): Don't test
21326 an unsigned long variable for > 0 if it could be MAX_ULONG.
21327 * server.c (myresume): Likewise.
21328 * target.c (set_desired_inferior): Likewise.
21329
21330 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21331
21332 * configure.ac: Simplify and improve check for socklen_t.
21333 * configure, config.in: Regenerate.
21334
21335 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21336
21337 * acconfig.h: Remove.
21338 * configure.ac: Add a test for socklen_t. Use three-argument
21339 AC_DEFINE throughout.
21340 * config.in: Regenerated using autoheader 2.59.
21341 * configure: Regenerated.
21342
21343 * gdbreplay.c (socklen_t): Provide a default.
21344 (remote_open): Use socklen_t.
21345 * remote-utils.c (socklen_t): Provide a default.
21346 (remote_open): Use socklen_t.
21347 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21348 unsigned char.
21349
21350 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21351 char for buffers.
21352 * linux-low.c (linux_read_memory, linux_write_memory)
21353 (linux_read_auxv): Likewise.
21354 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21355 (check_mem_write): Likewise.
21356 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21357 Likewise.
21358 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21359 (registers_from_string, register_data): Likewise.
21360 * server.c (handle_query, main): Likewise.
21361 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21362 (decode_M_packet): Likewise.
21363 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21364 * target.h (struct target_ops): Update read_memory, write_memory,
21365 and read_auxv.
21366 (read_inferior_memory, write_inferior_memory): Update.
21367 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21368 to unsigned char *.
21369 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21370 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21371 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21372 linux-s390-low.c, linux-sh-low.c: Update for changes in
21373 read_inferior_memory and the_low_target->breakpoint.
21374
21375 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21376
21377 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21378 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21379 * configure.srv: Add powerpc64-*-linux*.
21380 * linux-ppc64-low.c: New file.
21381
21382 2005-05-23 Orjan Friberg <orjanf@axis.com>
21383
21384 * linux-cris-low.c: New file with support for CRIS.
21385 * linux-crisv32-low.c: Ditto for CRISv32.
21386 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21387 (clean): Add reg-cris.c and reg-crisv32.c.
21388 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21389 reg-crisv32.o, and reg-crisv32.c to make rules.
21390 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21391 recognized targets.
21392
21393 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21394
21395 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21396 of sizeof (PTRACE_XFER_TYPE).
21397 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21398
21399 2005-05-12 Orjan Friberg <orjanf@axis.com>
21400
21401 * target.h (struct target_ops): Add insert_watchpoint,
21402 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21403 pointers for hardware watchpoint support.
21404 * linux-low.h (struct linux_target_ops): Ditto.
21405 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21406 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21407 to linux_target_ops.
21408 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21409 reply packet.
21410 * server.c (main): Recognize 'Z' and 'z' packets.
21411
21412 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21413
21414 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21415 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21416 (the_low_target): Add new members.
21417
21418 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21419
21420 * proc-service.c (ps_lgetregs): Search all_processes instead of
21421 all_threads.
21422
21423 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21424
21425 * server.c (start_inferior): Change return type to int.
21426 (attach_inferior): Change sigptr to int *.
21427 (handle_v_cont, handle_v_requests): Change signal to int *.
21428 (main): Change signal to int.
21429
21430 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21431
21432 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21433 * configure.srv: Add m32r*-*-linux*.
21434 * linux-m32r-low.c: New file.
21435
21436 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21437
21438 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21439
21440 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21441
21442 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21443 Take unsigned long arguments for PIDs.
21444 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21445 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21446 (wait_for_sigstop, linux_resume_one_process)
21447 (regsets_fetch_inferior_registers, linux_send_signal)
21448 (linux_read_auxv): Likewise. Update the types of variables holding
21449 PIDs. Update format string specifiers.
21450 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21451 * remote-utils.c (prepare_resume_reply): Likewise.
21452 * server.c (cont_thread, general_thread, step_thread)
21453 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21454 unsigned long.
21455 (handle_query): Update format specifiers.
21456 (handle_v_cont, main): Use strtoul for thread IDs.
21457 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21458 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21459 (general_thread, step_thread, thread_from_wait)
21460 (old_thread_from_wait): Update.
21461 * target.h (struct thread_resume): Use unsigned long for THREAD.
21462 (struct target_ops): Use unsigned long for arguments to attach and
21463 thread_alive.
21464
21465 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21466
21467 * acinclude.m4: Include bfd/bfd.m4 directly.
21468 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21469 <agriffis@toolchain.org>.
21470 * aclocal.m4, configure: Regenerated.
21471
21472 2005-01-07 Andrew Cagney <cagney@gnu.org>
21473
21474 * configure.ac: Rename configure.in, require autoconf 2.59.
21475 * configure: Re-generate.
21476
21477 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21478
21479 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21480 LIBS when finished.
21481 * aclocal.m4: Regenerated.
21482 * configure: Regenerated.
21483
21484 2004-11-21 Andreas Schwab <schwab@suse.de>
21485
21486 * linux-m68k-low.c (m68k_num_gregs): Define.
21487 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21488 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21489 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21490 (m68k_breakpoint_at): New. Add to the_low_target.
21491
21492 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21493 srv_linux_thread_db to yes.
21494
21495 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21496
21497 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21498 (ARCH_SET_FS): Likewise.
21499 (ARCH_GET_FS): Likewise.
21500 (ARCH_GET_GS): Likewise.
21501
21502 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21503
21504 * linux-i386-low.c (ps_get_thread_area): New.
21505 * linux-x86-64-low.c (ps_get_thread_area): New.
21506 * linux-low.c: Include <sys/syscall.h>.
21507 (linux_kill_one_process): Don't kill the first thread here.
21508 (linux_kill): Kill the first thread here.
21509 (kill_lwp): New function.
21510 (send_sigstop, linux_send_signal): Use it.
21511 * proc-service.c: Clean up #ifdefs.
21512 (fpregset_info): Delete.
21513 (ps_lgetregs): Update and enable implementation.
21514 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21515 implementations.
21516 * remote-utils.c (struct sym_cache, symbol_cache): New.
21517 (input_interrupt): Print a clearer message.
21518 (async_io_enabled): New variable.
21519 (enable_async_io, disable_async_io): Use it. Update comments.
21520 (look_up_one_symbol): Use the symbol cache.
21521 * thread-db.c (thread_db_look_up_symbols): New function.
21522 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21523
21524 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21525
21526 * configure.in: Test for -rdynamic.
21527 * configure: Regenerated.
21528 * Makefile (INTERNAL_LDFLAGS): New.
21529 (gdbserver, gdbreplay): Use it.
21530
21531 2004-09-02 Andrew Cagney <cagney@gnu.org>
21532
21533 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21534
21535 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21536
21537 * linux-low.c (linux_wait): Clear all_processes list also.
21538
21539 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21540
21541 * linux-low.c: Include <errno.h>. Remove extern declaration of
21542 errno.
21543
21544 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21545
21546 * gdbreplay.c, server.h, utils.c: Update copyright years.
21547
21548 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21549
21550 * server.c (main): Print child status or termination signal from
21551 variable 'signal', not 'sig'.
21552
21553 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21554
21555 * linux-low.c (linux_read_memory): Change return type to
21556 int. Check for and return error from ptrace().
21557 * target.c (read_inferior_memory): Change return type to int. Pass
21558 back return status from the_target->read_memory().
21559 * target.h (struct target_ops): Adapt *read_memory() prototype.
21560 Update comment.
21561 (read_inferior_memory): Adapt prototype.
21562 * server.c (main): Return an error packet if
21563 read_inferior_memory() returns an error.
21564
21565 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21566
21567 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21568 Unify with other clean targets.
21569
21570 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21571
21572 * server.c (handle_v_cont): Call set_desired_inferior.
21573
21574 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21575
21576 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21577
21578 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21579
21580 * linux-low.c (linux_wait): Unblock async I/O.
21581 (linux_resume): Block and enable async I/O.
21582 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21583 * server.h (block_async_io, unblock_async_io): Add prototypes.
21584
21585 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21586
21587 * remote-utils.c (remote_open): Print a status notice after
21588 opening a TCP port.
21589 * server.c (attach_inferior): Print a status notice after
21590 attaching.
21591
21592 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21593
21594 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21595
21596 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21597
21598 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21599 error packet.
21600 * server.c, target.h: Update copyright years.
21601
21602 2004-02-25 Roland McGrath <roland@redhat.com>
21603
21604 * target.h (struct target_ops): New member `read_auxv'.
21605 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21606 * linux-low.c (linux_read_auxv): New function.
21607 (linux_target_ops): Initialize `read_auxv' member to that.
21608
21609 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21610
21611 Committed by Jim Blandy <jimb@redhat.com>.
21612
21613 * linux-s390-low.c (s390_num_regs): Update.
21614 (s390_regmap): Remove control registers. Use __s390x__ predefine
21615 instead of GPR_SIZE to distiguish s390 and s390x targets.
21616
21617 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21618
21619 * linux-low.c: Update copyright year.
21620 (check_removed_breakpoint): Clear pending_is_breakpoint.
21621 (linux_set_resume_request, linux_queue_one_thread)
21622 (resume_status_pending_p): New functions.
21623 (linux_continue_one_thread): Use process->resume.
21624 (linux_resume): Only resume threads if there are no pending events.
21625 * linux-low.h (struct process_info): Add resume request
21626 pointer.
21627
21628 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21629
21630 * regcache.c (new_register_cache): Clear the allocated register
21631 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21632
21633 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21634
21635 * linux-low.c (linux_resume): Take a struct thread_resume *
21636 argument.
21637 (linux_wait): Update call.
21638 (resume_ptr): New static variable.
21639 (linux_continue_one_thread): Renamed from
21640 linux_continue_one_process. Use resume_ptr.
21641 (linux_resume): Use linux_continue_one_thread.
21642 * server.c (handle_v_cont, handle_v_requests): New functions.
21643 (myresume): New function.
21644 (main): Handle 'v' case.
21645 * target.h (struct thread_resume): New type.
21646 (struct target_ops): Change argument of "resume" to struct
21647 thread_resume *.
21648 (myresume): Delete macro.
21649
21650 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21651
21652 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21653 (uninstall): Support DESTDIR.
21654
21655 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21656
21657 * configure.srv: Add xscale*linux copy of arm*linux entry.
21658
21659 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21660
21661 * linux-arm-low.c (arm_reinsert_addr): New function.
21662 (the_low_target): Add arm_reinsert_addr.
21663
21664 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21665
21666 * mem-break.c: Remove whitespace at end of file.
21667
21668 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21669
21670 * configure.in: Check whether we need to prototype strerror.
21671 * server.h: Optionally prototype strerror.
21672 * gdbreplay.c (perror_with_name): Use strerror.
21673 * linux-low.c (linux_attach_lwp): Use strerror.
21674 * utils.c (perror_with_name): Use strerror.
21675 * config.in, configure: Regenerated.
21676
21677 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21678
21679 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21680 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21681
21682 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21683
21684 * Makefile.in (SFILES): Update.
21685 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21686 low-sun3.c: Remove files.
21687
21688 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21689
21690 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21691 (linux_detach_one_process, linux_detach): New functions.
21692 (linux_target_ops): Add linux_detach.
21693 * server.c (main): Handle 'D' packet.
21694 * target.h (struct target_ops): Add "detach" member.
21695 (detach_inferior): Define.
21696
21697 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21698
21699 From Kelley Cook <kelleycook@wideopenwest.com>:
21700 * configure.srv: Accept i[34567]86 variants.
21701
21702 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21703
21704 * linux-low.c (linux_wait_for_event): Correct comment typos.
21705 (linux_resume_one_process): Call check_removed_breakpoint.
21706 (linux_send_signal): New function.
21707 (linux_target_ops): Add linux_send_signal.
21708 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21709 of kill.
21710 * target.h (struct target_ops): Add send_signal.
21711
21712 2003-05-29 Jim Blandy <jimb@redhat.com>
21713
21714 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21715 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21716 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21717 away part of the register's value.
21718
21719 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21720
21721 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21722 (linux_wait_for_event, linux_init_signals): Likewise.
21723
21724 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21725
21726 * configure.in: Check for stdlib.h.
21727 * configure: Regenerated.
21728 * config.in: Regenerated.
21729
21730 2003-01-04 Andreas Schwab <schwab@suse.de>
21731
21732 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21733
21734 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21735
21736 * Makefile.in: Remove obsolete code.
21737
21738 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21739
21740 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21741 defined(PT_FPR0_HI).
21742
21743 2002-11-17 Stuart Hughes <seh@zee2.com>
21744
21745 * linux-arm-low.c (arm_num_regs): Increase.
21746 (arm_regmap): Include status register.
21747
21748 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21749
21750 * linux-low.c (register_addr): Remove incorrect -1 check.
21751
21752 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21753
21754 * linux-low.c (linux_create_inferior): Call setpgid. Return
21755 the new PID.
21756 (unstopped_p, linux_signal_pid): Remove.
21757 (linux_target_ops): Remove linux_signal_pid.
21758 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21759 global instead of target method.
21760 * target.h (struct target_ops): Remove signal_pid. Update comment
21761 for create_inferior.
21762 * server.c (signal_pid): New variable.
21763 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21764 gdbserver. Set the child to be the foreground process group.
21765 (attach_inferior): Set signal_pid.
21766
21767 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21768
21769 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21770
21771 2002-08-20 Jim Blandy <jimb@redhat.com>
21772
21773 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21774 default for this.
21775
21776 2002-08-01 Andrew Cagney <cagney@redhat.com>
21777
21778 * Makefile.in: Make chill references obsolete.
21779
21780 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21781
21782 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21783 * configure: Regenerate.
21784 * config.in: Regenerate.
21785
21786 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21787
21788 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21789 (perror_with_name, remote_close, remote_open, expect, play): Static.
21790
21791 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21792
21793 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21794 byte offsets instead of an array of indexes.
21795 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21796
21797 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21798
21799 * regcache.c: Add comment.
21800
21801 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21802
21803 * thread-db.c: New file.
21804 * proc-service.c: New file.
21805 * acinclude.m4: New file.
21806 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21807 proc-service.o, and thread-db.o.
21808 (linux-low.o): Add USE_THREAD_DB.
21809 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21810 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21811 * aclocal.m4: Regenerated.
21812 * config.in: Regenerated.
21813 * configure: Regenerated.
21814 * configure.in: Check for proc_service.h, sys/procfs.h,
21815 thread_db.h, and linux/elf.h headrs.
21816 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21817 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21818 Check for -lthread_db and thread support.
21819 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21820 PowerPC, and SuperH.
21821 * i387-fp.c: Constify arguments.
21822 * i387-fp.h: Likewise.
21823 * inferiors.c: (struct thread_info): Renamed from
21824 `struct inferior_info'. Remove PID member. Use generic inferior
21825 list header. All uses updated.
21826 (inferiors, signal_pid): Removed.
21827 (all_threads): New variable.
21828 (get_thread): Define.
21829 (add_inferior_to_list): New function.
21830 (for_each_inferior): New function.
21831 (change_inferior_id): New function.
21832 (add_inferior): Removed.
21833 (remove_inferior): New function.
21834 (add_thread): New function.
21835 (free_one_thread): New function.
21836 (remove_thread): New function.
21837 (clear_inferiors): Use for_each_inferior and free_one_thread.
21838 (find_inferior): New function.
21839 (find_inferior_id): New function.
21840 (inferior_target_data): Update argument type.
21841 (set_inferior_target_data): Likewise.
21842 (inferior_regcache_data): Likewise.
21843 (set_inferior_regcache_data): Likewise.
21844 * linux-low.c (linux_bp_reinsert): Remove.
21845 (all_processes, stopping_threads, using_thrads)
21846 (struct pending_signals, debug_threads, pid_of): New.
21847 (inferior_pid): Replace with macro.
21848 (struct inferior_linux_data): Remove.
21849 (get_stop_pc, add_process): New functions.
21850 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21851 Use add_process and add_thread.
21852 (linux_attach_lwp): New function, based on old linux_attach. Use
21853 add_process and add_thread. Set stop_expected for new threads.
21854 (linux_attach): New function.
21855 (linux_kill_one_process): New function.
21856 (linux_kill): Kill all LWPs.
21857 (linux_thread_alive): Use find_inferior_id.
21858 (check_removed_breakpoints, status_pending_p): New functions.
21859 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21860 Update. Use WNOHANG. Wait for cloned processes also. Update process
21861 struct for the found process.
21862 (linux_wait_for_event): New function.
21863 (linux_wait): Use it. Support LWPs.
21864 (send_sigstop, wait_for_sigstop, stop_all_processes)
21865 (linux_resume_one_process, linux_continue_one_process): New functions.
21866 (linux_resume): Support LWPs.
21867 (REGISTER_RAW_SIZE): Remove.
21868 (fetch_register): Use register_size instead. Call supply_register.
21869 (usr_store_inferior_registers): Likewise. Call collect_register.
21870 Fix recursive case.
21871 (regsets_fetch_inferior_registers): Improve error message.
21872 (regsets_store_inferior_registers): Add debugging.
21873 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21874 (unstopped_p, linux_signal_pid): New functions.
21875 (linux_target_ops): Add linux_signal_pid.
21876 (linux_init_signals): New function.
21877 (initialize_low): Call it. Initialize using_threads.
21878 * regcache.c (inferior_regcache_data): Add valid
21879 flag.
21880 (get_regcache): Fetch registers lazily. Add fetch argument
21881 and update all callers.
21882 (regcache_invalidate_one, regcache_invalidate): New
21883 functions.
21884 (new_register_cache): Renamed from create_register_cache.
21885 Return the new regcache.
21886 (free_register_cache): Change argument to a void *.
21887 (registers_to_string, registers_from_string): Call get_regcache
21888 with fetch flag set.
21889 (register_data): Make static. Pass fetch flag to get_regcache.
21890 (supply_register): Call get_regcache with fetch flag clear.
21891 (collect_register): Call get_regcache with fetch flag set.
21892 (collect_register_as_string): New function.
21893 * regcache.h: Update.
21894 * remote-utils.c (putpkt): Flush after debug output and use
21895 stderr.
21896 Handle input interrupts while waiting for an ACK.
21897 (input_interrupt): Use signal_pid method.
21898 (getpkt): Flush after debug output and use stderr.
21899 (outreg): Use collect_register_as_string.
21900 (new_thread_notify, dead_thread_notify): New functions.
21901 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21902 and general_thread.
21903 (look_up_one_symbol): Flush after debug output.
21904 * server.c (step_thread, server_waiting): New variables.
21905 (start_inferior): Don't use signal_pid. Update call to mywait.
21906 (attach_inferior): Update call to mywait.
21907 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21908 (main): Don't fetch/store registers explicitly. Use
21909 set_desired_inferior. Support proposed ``Hs'' packet. Update
21910 calls to mywait.
21911 * server.h: Update.
21912 (struct inferior_list, struct_inferior_list_entry): New.
21913 * target.c (set_desired_inferior): New.
21914 (write_inferior_memory): Constify.
21915 (mywait): New function.
21916 * target.h: Update.
21917 (struct target_ops): New signal_pid method.
21918 (mywait): Removed macro, added prototype.
21919
21920 * linux-low.h (regset_func): Removed.
21921 (regset_fill_func, regset_store_func): New.
21922 (enum regset_type): New.
21923 (struct regset_info): Add type field. Use new operation types.
21924 (struct linux_target_ops): stop_pc renamed to get_pc.
21925 Add decr_pc_after_break and breakpoint_at.
21926 (get_process, get_thread_proess, get_process_thread)
21927 (strut process_info, all_processes, linux_attach_lwp)
21928 (thread_db_init): New.
21929
21930 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21931 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21932 (the_low_target): Add new members.
21933 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21934 (i386_store_fpxregset): Constify.
21935 (target_regsets): Add new kind identifier.
21936 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21937 (i386_set_pc): Add debugging.
21938 (i386_breakpoint_at): New function.
21939 (the_low_target): Add new members.
21940 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21941 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21942 (mips_breakpoint_at): New.
21943 (the_low_target): Add new members.
21944 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21945 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21946 (the_low_target): Add new members.
21947 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21948 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21949 (the_low_target): Add new members.
21950 * linux-x86-64-low.c (target_regsets): Add new kind
21951 identifier.
21952
21953 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21954
21955 From Martin Pool <mbp@samba.org>:
21956 * server.c (gdbserver_usage): New function.
21957 (main): Call it.
21958
21959 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21960
21961 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21962 stop_at -> stop_pc.
21963
21964 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21965
21966 * Makefile.in: Remove obsolete code.
21967
21968 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21969
21970 * linux-low.c (regsets_fetch_inferior_registers),
21971 (regsets_store_inferior_registers): Removed cast to int from
21972 ptrace() calls.
21973 * regcache.h: Added declaration of struct inferior_info.
21974
21975 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21976
21977 * inferiors.c (struct inferior_info): Add regcache_data.
21978 (add_inferior): Call create_register_cache.
21979 (clear_inferiors): Call free_register_cache.
21980 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21981 * regcache.c (struct inferior_regcache_data): New.
21982 (registers): Remove.
21983 (get_regcache): New function.
21984 (create_register_cache, free_register_cache): New functions.
21985 (set_register_cache): Don't initialize the register cache here.
21986 (registers_to_string, registers_from_string, register_data): Call
21987 get_regcache.
21988 * regcache.h: Add prototypes.
21989 * server.h: Likewise.
21990
21991 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21992
21993 * mem-break.c: New file.
21994 * mem-break.h: New file.
21995 * Makefile.in: Add mem-break.o rule; update server.h
21996 dependencies.
21997 * inferiors.c (struct inferior_info): Add target_data
21998 member.
21999 (clear_inferiors): Free target_data member if set.
22000 (inferior_target_data, set_inferior_target_data): New functions.
22001 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22002 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22003 * linux-low.c (linux_bp_reinsert): New variable.
22004 (struct inferior_linux_data): New.
22005 (linux_create_inferior): Use set_inferior_target_data.
22006 (linux_attach): Likewise. Call add_inferior.
22007 (linux_wait_for_one_inferior): New function.
22008 (linux_wait): Call it.
22009 (linux_write_memory): Add const.
22010 (initialize_low): Call set_breakpoint_data.
22011 * linux-low.h (struct linux_target_ops): Add breakpoint
22012 handling members.
22013 * server.c (attach_inferior): Remove extra add_inferior
22014 call.
22015 * server.h: Include mem-break.h. Update inferior.c
22016 prototypes.
22017 * target.c (read_inferior_memory)
22018 (write_inferior_memory): New functions.
22019 * target.h (read_inferior_memory)
22020 (write_inferior_memory): Change macros to prototypes.
22021 (struct target_ops): Update comments. Add const to write_memory
22022 definition.
22023
22024 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22025
22026 * linux-low.c (usr_store_inferior_registers): Support
22027 registers which are allowed to fail to store.
22028 * linux-low.h (linux_target_ops): Likewise.
22029 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22030 (ppc_cannot_store_register): FPSCR may not be storable.
22031
22032 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22033
22034 * server.h: Include <string.h> if HAVE_STRING_H.
22035 * ChangeLog: Correct paths in last ChangeLog entry.
22036
22037 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22038
22039 * linux-low.h: Remove obsolete prototypes.
22040 (struct linux_target_ops): New.
22041 (extern the_low_target): New.
22042 * linux-low.c (num_regs, regmap): Remove declarations.
22043 (register_addr): Use the_low_target explicitly.
22044 (fetch_register): Likewise.
22045 (usr_fetch_inferior_registers): Likewise.
22046 (usr_store_inferior_registers): Likewise.
22047 * linux-arm-low.c (num_regs): Remove.
22048 (arm_num_regs): Define.
22049 (arm_regmap): Renamed from regmap, made static.
22050 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22051 made static.
22052 (arm_cannot_store_register): Renamed from cannot_store_register,
22053 made static.
22054 (the_low_target): New.
22055 * linux-i386-low.c (num_regs): Remove.
22056 (i386_num_regs): Define.
22057 (i386_regmap): Renamed from regmap, made static.
22058 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22059 made static.
22060 (i386_cannot_store_register): Renamed from cannot_store_register,
22061 made static.
22062 (the_low_target): New.
22063 * linux-ia64-low.c (num_regs): Remove.
22064 (ia64_num_regs): Define.
22065 (ia64_regmap): Renamed from regmap, made static.
22066 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22067 made static.
22068 (ia64_cannot_store_register): Renamed from cannot_store_register,
22069 made static.
22070 (the_low_target): New.
22071 * linux-m68k-low.c (num_regs): Remove.
22072 (m68k_num_regs): Define.
22073 (m68k_regmap): Renamed from regmap, made static.
22074 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22075 made static.
22076 (m68k_cannot_store_register): Renamed from cannot_store_register,
22077 made static.
22078 (the_low_target): New.
22079 * linux-mips-low.c (num_regs): Remove.
22080 (mips_num_regs): Define.
22081 (mips_regmap): Renamed from regmap, made static.
22082 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22083 made static.
22084 (mips_cannot_store_register): Renamed from cannot_store_register,
22085 made static.
22086 (the_low_target): New.
22087 * linux-ppc-low.c (num_regs): Remove.
22088 (ppc_num_regs): Define.
22089 (ppc_regmap): Renamed from regmap, made static.
22090 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22091 made static.
22092 (ppc_cannot_store_register): Renamed from cannot_store_register,
22093 made static.
22094 (the_low_target): New.
22095 * linux-s390-low.c (num_regs): Remove.
22096 (s390_num_regs): Define.
22097 (s390_regmap): Renamed from regmap, made static.
22098 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22099 made static.
22100 (s390_cannot_store_register): Renamed from cannot_store_register,
22101 made static.
22102 (the_low_target): New.
22103 * linux-sh-low.c (num_regs): Remove.
22104 (sh_num_regs): Define.
22105 (sh_regmap): Renamed from regmap, made static.
22106 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22107 made static.
22108 (sh_cannot_store_register): Renamed from cannot_store_register,
22109 made static.
22110 (the_low_target): New.
22111 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22112 (the_low_target): New.
22113
22114 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22115
22116 * Makefile.in: Add stamp-h target.
22117 * configure.in: Create stamp-h.
22118 * configure: Regenerated.
22119
22120 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22121
22122 * inferiors.c: New file.
22123 * target.c: New file.
22124 * target.h: New file.
22125 * Makefile.in: Add target.o and inferiors.o. Update
22126 dependencies.
22127 * linux-low.c (inferior_pid): New static variable,
22128 moved from server.c.
22129 (linux_create_inferior): Renamed from create_inferior.
22130 Call add_inferior. Return 0 on success instead of a PID.
22131 (linux_attach): Renamed from myattach.
22132 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22133 (linux_thread_alive): Renamed from mythread_alive.
22134 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22135 child dies.
22136 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22137 (regsets_store_inferior_registers): Correct error message.
22138 Add missing ``return 0''.
22139 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22140 (linux_store_registers): Renamed from store_inferior_registers.
22141 (linux_read_memory): Renamed from read_inferior_memory.
22142 (linux_write_memory): Renamed from write_inferior_memory.
22143 (linux_target_ops): New structure.
22144 (initialize_low): Call set_target_ops ().
22145 * remote-utils.c (unhexify): New function.
22146 (hexify): New function.
22147 (input_interrupt): Send signals to ``signal_pid''.
22148 * server.c (inferior_pid): Remove.
22149 (start_inferior): Update create_inferior call.
22150 (attach_inferior): Call add_inferior.
22151 (handle_query): New function.
22152 (main): Call handle_query for `q' packets.
22153 * server.h: Include "target.h". Remove obsolete prototypes.
22154 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22155
22156 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22157
22158 * Makefile.in: Add WARN_CFLAGS. Update configury
22159 dependencies.
22160 * configure.in: Check for <string.h>
22161 * configure: Regenerate.
22162 * config.in: Regenerate.
22163 * gdbreplay.c: Include needed system headers.
22164 (remote_open): Remove strchr prototype.
22165 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22166 * regcache.c (supply_register): Change buf argument to const void *.
22167 (supply_register_by_name): Likewise.
22168 (collect_register): Change buf argument to void *.
22169 (collect_register_by_name): Likewise.
22170 * regcache.h: Add missing prototypes.
22171 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22172 * server.c (handle_query): New function.
22173 (attached): New static variable, moved out of main.
22174 (main): Quiet longjmp clobber warnings.
22175 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22176 * utils.c (error): Remove NORETURN.
22177 (fatal): Likewise.
This page took 0.479464 seconds and 5 git commands to generate.