Switch gdbserver to gdbsupport event loop
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-13 Tom Tromey <tom@tromey.com>
2
3 * server.h (handle_serial_event, handle_target_event): Update.
4 * server.c: Don't call initialize_event_loop.
5 (keep_processing_events): New global.
6 (handle_serial_event): Return void. Set keep_processing_events.
7 (handle_target_event): Return void.
8 (start_event_loop): Move from event-loop.c. Rewrite.
9 * remote-utils.c (handle_accept_event): Return void.
10 (reset_readchar): Use delete_timer.
11 (process_remaining): Return void.
12 (reschedule): Use create_timer.
13 * event-loop.h: Remove.
14 * event-loop.cc: Remove.
15 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
16
17 2020-04-13 Tom Tromey <tom@tromey.com>
18
19 * server.c (invoke_async_signal_handlers)
20 (check_async_event_handlers, flush_streams, gdb_select): New
21 functions.
22
23 2020-04-13 Tom Tromey <tom@tromey.com>
24
25 * configure: Rebuild.
26 * config.in: Rebuild.
27
28 2020-04-08 Tom Tromey <tromey@adacore.com>
29
30 PR gdb/22992
31 * win32-low.c (child_continue): Call matching_pending_stop.
32 (get_child_debug_event): Call fetch_pending_stop. Push pending
33 stop when needed.
34
35 2020-04-08 Tom Tromey <tromey@adacore.com>
36
37 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
38 (win32_process_target::supports_stopped_by_sw_breakpoint):
39 Declare.
40 * win32-low.c (win32_supports_z_point_type): Always handle
41 Z_PACKET_SW_BP.
42 (win32_insert_point): Call insert_memory_breakpoint when needed.
43 (win32_remove_point): Call remove_memory_breakpoint when needed.
44 (win32_process_target::stopped_by_sw_breakpoint)
45 (win32_process_target::supports_stopped_by_sw_breakpoint): New
46 methods.
47 (win32_target_ops): Update.
48 (maybe_adjust_pc): New function.
49 (win32_wait): Call maybe_adjust_pc.
50
51 2020-04-08 Tom Tromey <tromey@adacore.com>
52
53 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
54 field.
55 * win32-i386-low.c (the_low_target): Update.
56 * win32-arm-low.c (the_low_target): Update.
57
58 2020-04-08 Tom Tromey <tromey@adacore.com>
59
60 * win32-low.h (win32_process_target::read_pc)
61 (win32_process_target::write_pc): Declare.
62 * win32-low.c (win32_process_target::read_pc)
63 (win32_process_target::write_pc): New methods.
64 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
65 functions.
66 (the_low_target): Update.
67 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
68 functions.
69 (the_low_target): Update.
70
71 2020-04-08 Tom Tromey <tromey@adacore.com>
72
73 * win32-low.c (win32_kill, get_child_debug_event): Use
74 wait_for_debug_event.
75
76 2020-04-08 Tom Tromey <tromey@adacore.com>
77
78 * win32-low.c (child_continue): Call continue_last_debug_event.
79
80 2020-04-08 Tom Tromey <tromey@adacore.com>
81
82 * win32-low.c (handle_exception): Remove.
83 (windows_nat::handle_ms_vc_exception): New function.
84 (get_child_debug_event): Add "continue_status" parameter.
85 Update.
86 (win32_wait): Update.
87
88 2020-04-08 Tom Tromey <tromey@adacore.com>
89
90 * win32-low.c (windows_nat::handle_load_dll): Rename from
91 handle_load_dll. No longer static.
92 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
93 No longer static.
94
95 2020-04-08 Tom Tromey <tromey@adacore.com>
96
97 * win32-low.c (handle_output_debug_string): Add parameter. Change
98 return type.
99 (win32_kill, get_child_debug_event): Update.
100
101 2020-04-08 Tom Tromey <tromey@adacore.com>
102
103 * win32-low.c (current_process_handle, current_process_id)
104 (main_thread_id, last_sig, current_event, siginfo_er): Move to
105 nat/windows-nat.c.
106
107 2020-04-08 Tom Tromey <tromey@adacore.com>
108
109 * win32-low.c (get_image_name): Remove.
110 (handle_load_dll): Update.
111
112 2020-04-08 Tom Tromey <tromey@adacore.com>
113
114 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
115 No longer static. Change parameters.
116 (child_add_thread, child_fetch_inferior_registers)
117 (child_store_inferior_registers, win32_resume)
118 (win32_get_tib_address): Update.
119
120 2020-04-08 Tom Tromey <tromey@adacore.com>
121
122 * win32-low.h (struct win32_target_ops): Use qualified names where
123 needed.
124 * win32-i386-low.c: Add "using namespace".
125 * win32-low.c: Add "using namespace".
126 * win32-arm-low.c: Add "using namespace".
127
128 2020-04-08 Tom Tromey <tromey@adacore.com>
129
130 * win32-low.c (delete_thread_info): Don't call CloseHandle.
131
132 2020-04-08 Tom Tromey <tromey@adacore.com>
133
134 * win32-low.c (win32_require_context, suspend_one_thread): Use
135 windows_thread_info::suspend.
136 (continue_one_thread): Use windows_thread_info::resume.
137 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
138
139 2020-04-08 Tom Tromey <tromey@adacore.com>
140
141 * win32-i386-low.c (update_debug_registers)
142 (i386_prepare_to_resume, i386_thread_added): Update.
143
144 2020-04-08 Tom Tromey <tromey@adacore.com>
145
146 * win32-low.c (child_add_thread): Use new.
147 (delete_thread_info): Use delete.
148
149 2020-04-08 Tom Tromey <tromey@adacore.com>
150
151 * win32-low.h (struct windows_thread_info): Remove.
152
153 2020-04-08 Tom Tromey <tromey@adacore.com>
154
155 * win32-low.h (struct windows_thread_info): Rename from
156 win32_thread_info. Remove typedef.
157 (struct win32_target_ops, win32_require_context): Update.
158 * win32-low.c (win32_get_thread_context)
159 (win32_set_thread_context, win32_prepare_to_resume)
160 (win32_require_context, thread_rec, child_add_thread)
161 (delete_thread_info, continue_one_thread)
162 (child_fetch_inferior_registers, child_store_inferior_registers)
163 (win32_resume, suspend_one_thread, win32_get_tib_address):
164 Update.
165 * win32-i386-low.c (update_debug_registers)
166 (win32_get_current_dr, i386_get_thread_context)
167 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
168 (i386_fetch_inferior_register, i386_store_inferior_register):
169 Update.
170 * win32-arm-low.c (arm_get_thread_context)
171 (arm_fetch_inferior_register, arm_store_inferior_register):
172 Update.
173
174 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
175
176 * linux-low.h (struct linux_target_ops): Remove.
177 (the_low_target): Remove.
178 * linux-x86-low.cc (the_low_target): Remove.
179 * linux-aarch64-low.cc (the_low_target): Ditto.
180 * linux-arm-low.cc (the_low_target): Ditto.
181 * linux-bfin-low.cc (the_low_target): Ditto.
182 * linux-cris-low.cc (the_low_target): Ditto.
183 * linux-crisv32-low.cc (the_low_target): Ditto.
184 * linux-ia64-low.cc (the_low_target): Ditto.
185 * linux-m32r-low.cc (the_low_target): Ditto.
186 * linux-m68k-low.cc (the_low_target): Ditto.
187 * linux-mips-low.cc (the_low_target): Ditto.
188 * linux-nios2-low.cc (the_low_target): Ditto.
189 * linux-ppc-low.cc (the_low_target): Ditto.
190 * linux-riscv-low.cc (the_low_target): Ditto.
191 * linux-s390-low.cc (the_low_target): Ditto.
192 * linux-sh-low.cc (the_low_target): Ditto.
193 * linux-sparc-low.cc (the_low_target): Ditto.
194 * linux-tic6x-low.cc (the_low_target): Ditto.
195 * linux-tile-low.cc (the_low_target): Ditto.
196 * linux-xtensa-low.cc (the_low_target): Ditto.
197
198 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
199
200 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
201 linux target define the op by overriding the declaration in
202 process_stratum_target.
203
204 * linux-low.h (struct linux_target_ops): Remove the op.
205 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
206 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
207 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
208 (x86_get_ipa_tdesc_idx): Turn into...
209 (x86_target::get_ipa_tdesc_idx): ...this.
210 (the_low_target): Remove the op field.
211 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
212 (ppc_get_ipa_tdesc_idx): Turn into...
213 (ppc_target::get_ipa_tdesc_idx): ...this.
214 (the_low_target): Remove the op field.
215 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
216 (s390_get_ipa_tdesc_idx): Turn into...
217 (s390_target::get_ipa_tdesc_idx): ...this.
218 (the_low_target): Remove the op field.
219
220 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
221
222 Turn the 'get_syscall_trapinfo' linux target op into a method
223 of process_stratum_target.
224
225 * linux-low.h (struct linux_target_ops): Remove the op.
226 (class linux_process_target) <get_syscall_trapinfo>
227 <gdb_catch_this_syscall>
228 <low_supports_catch_syscall>
229 <low_get_syscall_trapinfo>: Declare.
230 * linux-low.cc (get_syscall_trapinfo): Turn into...
231 (linux_process_target::get_syscall_trapinfo): ...this.
232 (linux_process_target::low_get_syscall_trapinfo): Define.
233 (gdb_catch_this_syscall_p): Turn into...
234 (linux_process_target::gdb_catch_this_syscall): ...this.
235 (linux_process_target::low_supports_catch_syscall): Define.
236
237 Update the callers below.
238
239 (linux_process_target::wait_1)
240 (linux_process_target::supports_catch_syscall)
241
242 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
243 <low_get_syscall_trapinfo>: Declare.
244 (x86_target::low_supports_catch_syscall): Define.
245 (x86_get_syscall_trapinfo): Turn into...
246 (x86_target::low_get_syscall_trapinfo): ...this.
247 (the_low_target): Remove the op field.
248 * linux-aarch64-low.cc (class aarch64_target)
249 <low_supports_catch_syscall>
250 <low_get_syscall_trapinfo>: Declare.
251 (aarch64_target::low_supports_catch_syscall): Define.
252 (aarch64_get_syscall_trapinfo): Turn into...
253 (aarch64_target::low_get_syscall_trapinfo): ...this.
254 (the_low_target): Remove the op field.
255 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
256 <low_get_syscall_trapinfo>: Declare.
257 (arm_target::low_supports_catch_syscall): Define.
258 (arm_get_syscall_trapinfo): Turn into...
259 (arm_target::low_get_syscall_trapinfo): ...this.
260 (the_low_target): Remove the op field.
261 * linux-ppc-low.cc (the_low_target): Remove the op field.
262 * linux-s390-low.cc (the_low_target): Remove the op field.
263
264 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
265
266 Remove the 'supports_hardware_single_step' linux target op and
267 override the process_stratum_target's op definition in
268 linux_process_target to return true.
269
270 * linux-low.h (struct linux_target_ops): Remove the op.
271 (class linux_process_target) <finish_step_over>
272 <maybe_hw_step>: Declare.
273 * linux-low.cc (can_hardware_single_step): Remove.
274 (maybe_hw_step): Turn into...
275 (linux_process_target::maybe_hw_step): ...this.
276 (finish_step_over): Turn into...
277 (linux_process_target::finish_step_over): ...this.
278 (linux_process_target::supports_hardware_single_step): Update
279 to return true.
280
281 Update the callers below.
282
283 (linux_process_target::single_step)
284 (linux_process_target::resume_one_lwp_throw)
285
286 * linux-arm-low.cc (class arm_target)
287 <supports_hardware_single_step>: Declare.
288 (arm_supports_hardware_single_step): Turn into...
289 (arm_target::supports_hardware_single_step): ...this.
290 (the_low_target): Remove the op field.
291 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
292 (the_low_target): Remove the op field.
293 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
294 Remove.
295 (the_low_target): Remove the op field.
296 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
297 (the_low_target): Remove the op field.
298 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
299 (the_low_target): Remove the op field.
300 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
301 (the_low_target): Remove the op field.
302 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
303 (the_low_target): Remove the op field.
304 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
305 (the_low_target): Remove the op field.
306 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
307 (the_low_target): Remove the op field.
308 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
309 (the_low_target): Remove the op field.
310 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
311 (the_low_target): Remove the op field.
312 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
313 (the_low_target): Remove the op field.
314 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
315 Remove.
316 (the_low_target): Remove the op field.
317
318 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
319
320 Turn the 'supports_range_stepping' linux target op into a method
321 of linux_process_target.
322
323 * linux-low.h (struct linux_target_ops): Remove the op.
324 (class linux_process_target) <low_supports_range_stepping>: Declare.
325 * linux-low.cc (linux_process_target::low_supports_range_stepping):
326 Define.
327 (linux_process_target::supports_range_stepping): Update the call
328 site.
329 * linux-x86-low.cc (class x86_target)
330 <low_supports_range_stepping>: Declare.
331 (x86_supports_range_stepping): Turn into...
332 (x86_target::low_supports_range_stepping): ...this.
333 (the_low_target): Remove the op field.
334 * linux-aarch64-low.cc (class aarch64_target)
335 <low_supports_range_stepping>: Declare.
336 (aarch64_supports_range_stepping): Turn into...
337 (aarch64_target::low_supports_range_stepping): ...this.
338 (the_low_target): Remove the op field.
339 * linux-arm-low.cc (the_low_target): Remove the op field.
340 * linux-bfin-low.cc (the_low_target): Ditto.
341 * linux-crisv32-low.cc (the_low_target): Ditto.
342 * linux-m32r-low.cc (the_low_target): Ditto.
343 * linux-m68k-low.cc (the_low_target): Ditto.
344 * linux-ppc-low.cc (the_low_target): Ditto.
345 * linux-s390-low.cc (the_low_target): Ditto.
346 * linux-sh-low.cc (the_low_target): Ditto.
347 * linux-tic6x-low.cc (the_low_target): Ditto.
348 * linux-tile-low.cc (the_low_target): Ditto.
349 * linux-xtensa-low.cc (the_low_target): Ditto.
350
351 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
352
353 Remove the 'emit_ops' linux target ops and let the concrete
354 linux target define the op by overriding the declaration of
355 process_stratum_target.
356
357 * linux-low.h (struct linux_target_ops): Remove the op.
358 (class linux_process_target) <emit_ops>: Remove.
359 * linux-low.cc (linux_process_target::emit_ops): Remove.
360 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
361 (x86_emit_ops): Turn into...
362 (x86_target::emit_ops): ...this.
363 (the_low_target): Remove the op field.
364 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
365 (aarch64_emit_ops): Turn into...
366 (aarch64_target::emit_ops): ...this.
367 (the_low_target): Remove the op field.
368 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
369 (ppc_emit_ops): Turn into...
370 (ppc_target::emit_ops): ...this.
371 (the_low_target): Remove the op field.
372 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
373 (s390_emit_ops): Turn into...
374 (s390_target::emit_ops): ...this.
375 (the_low_target): Remove the op field.
376 * linux-arm-low.cc (the_low_target): Remove the op field.
377 * linux-bfin-low.cc (the_low_target): Ditto.
378 * linux-crisv32-low.cc (the_low_target): Ditto.
379 * linux-m32r-low.cc (the_low_target): Ditto.
380 * linux-m68k-low.cc (the_low_target): Ditto.
381 * linux-sh-low.cc (the_low_target): Ditto.
382 * linux-tic6x-low.cc (the_low_target): Ditto.
383 * linux-tile-low.cc (the_low_target): Ditto.
384 * linux-xtensa-low.cc (the_low_target): Ditto.
385
386 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
387
388 Remove the 'install_fast_tracepoint_jump_pad' and
389 'get_min_fast_tracepoint_insn_len' linux target ops to let the
390 concrete linux target define the ops by overriding the declarations
391 of process_stratum_target.
392
393 * linux-low.h (struct linux_target_ops): Remove the ops.
394 (class linux_process_target) <supports_fast_tracepoints>
395 <install_fast_tracepoint_jump_pad>
396 <get_min_fast_tracepoint_insn_len>: Remove.
397 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
398 (linux_process_target::install_fast_tracepoint_jump_pad)
399 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
400 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
401 <install_fast_tracepoint_jump_pad>
402 <get_min_fast_tracepoint_insn_len>: Declare.
403 (x86_target::supports_fast_tracepoints): Define.
404 (x86_install_fast_tracepoint_jump_pad): Turn into...
405 (x86_target::install_fast_tracepoint_jump_pad): ...this.
406 (x86_get_min_fast_tracepoint_insn_len): Turn into...
407 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
408 (the_low_target): Remove the op fields.
409 * linux-aarch64-low.cc (class aarch64_target)
410 <supports_fast_tracepoints>
411 <install_fast_tracepoint_jump_pad>
412 <get_min_fast_tracepoint_insn_len>: Declare.
413 (aarch64_target::supports_fast_tracepoints): Define.
414 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
415 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
416 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
417 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
418 (the_low_target): Remove the op fields.
419 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
420 <install_fast_tracepoint_jump_pad>
421 <get_min_fast_tracepoint_insn_len>: Declare.
422 (ppc_target::supports_fast_tracepoints): Define.
423 (ppc_install_fast_tracepoint_jump_pad): Turn into...
424 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
425 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
426 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
427 (the_low_target): Remove the op fields.
428 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
429 <install_fast_tracepoint_jump_pad>
430 <get_min_fast_tracepoint_insn_len>: Declare.
431 (s390_target::supports_fast_tracepoints): Define.
432 (s390_install_fast_tracepoint_jump_pad): Turn into...
433 (s390_target::install_fast_tracepoint_jump_pad): ...this.
434 (s390_get_min_fast_tracepoint_insn_len): Turn into...
435 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
436 (the_low_target): Remove the op fields.
437 * linux-arm-low.cc (the_low_target): Remove the op fields.
438 * linux-bfin-low.cc (the_low_target): Ditto.
439 * linux-crisv32-low.cc (the_low_target): Ditto.
440 * linux-m32r-low.cc (the_low_target): Ditto.
441 * linux-m68k-low.cc (the_low_target): Ditto.
442 * linux-sh-low.cc (the_low_target): Ditto.
443 * linux-tic6x-low.cc (the_low_target): Ditto.
444 * linux-tile-low.cc (the_low_target): Ditto.
445 * linux-xtensa-low.cc (the_low_target): Ditto.
446
447 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
448
449 Turn the 'get_thread_area' linux target op into a method of
450 process_stratum_target.
451
452 * linux-low.h (struct linux_target_ops): Remove the op.
453 (class linux_process_target) <stuck_in_jump_pad>
454 <linux_fast_tracepoint_collecting>
455 <low_get_thread_area>: Declare.
456 * linux-low.cc (supports_fast_tracepoints): Remove.
457 (linux_fast_tracepoint_collecting): Turn into...
458 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
459 (linux_process_target::low_get_thread_area): Define.
460 (stuck_in_jump_pad_callback): Turn into...
461 (linux_process_target::stuck_in_jump_pad): ...this.
462
463 Update the caller below.
464
465 (linux_process_target::stabilize_threads)
466
467 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
468 Declare.
469 (x86_get_thread_area): Turn into...
470 (x86_target::low_get_thread_area): ...this.
471 (the_low_target): Remove the op field.
472 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
473 Declare.
474 (aarch64_get_thread_area): Turn into...
475 (aarch64_target::low_get_thread_area): ...this.
476 (the_low_target): Remove the op field.
477 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
478 Declare.
479 (ppc_get_thread_area): Turn into...
480 (ppc_target::low_get_thread_area): ...this.
481 (the_low_target): Remove the op field.
482 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
483 Declare.
484 (s390_get_thread_area): Turn into...
485 (s390_target::low_get_thread_area): ...this.
486 (the_low_target): Remove the op field.
487 * linux-arm-low.cc (the_low_target): Remove the op field.
488 * linux-bfin-low.cc (the_low_target): Ditto.
489 * linux-crisv32-low.cc (the_low_target): Ditto.
490 * linux-m32r-low.cc (the_low_target): Ditto.
491 * linux-m68k-low.cc (the_low_target): Ditto.
492 * linux-sh-low.cc (the_low_target): Ditto.
493 * linux-tic6x-low.cc (the_low_target): Ditto.
494 * linux-tile-low.cc (the_low_target): Ditto.
495 * linux-xtensa-low.cc (the_low_target): Ditto.
496
497 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
498
499 Remote the 'supports_tracepoints' linux target op and let the
500 concrete linux target define it by overriding the op declared in
501 process_stratum_target.
502
503 * linux-low.h (struct linux_target_ops): Remove the op.
504 (class linux_process_target) <supports_tracepoints>: Remove.
505 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
506 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
507 Declare.
508 (x86_supports_tracepoints): Turn into...
509 (x86_target::supports_tracepoints): ...this.
510 (the_low_target): Remove the op field.
511 * linux-aarch64-low.cc (class aarch64_target)
512 <supports_tracepoints>: Declare.
513 (aarch64_supports_tracepoints): Turn into...
514 (aarch64_target::supports_tracepoints): ...this.
515 (the_low_target): Remove the op field.
516 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
517 Declare.
518 (ppc_supports_tracepoints): Turn into...
519 (ppc_target::supports_tracepoints): ...this.
520 (the_low_target): Remove the op field.
521 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
522 Declare.
523 (s390_supports_tracepoints): Turn into...
524 (s390_target::supports_tracepoints): ...this.
525 (the_low_target): Remove the op field.
526 * linux-arm-low.cc (the_low_target): Remove the op field.
527 * linux-bfin-low.cc (the_low_target): Ditto.
528 * linux-crisv32-low.cc (the_low_target): Ditto.
529 * linux-m32r-low.cc (the_low_target): Ditto.
530 * linux-m68k-low.cc (the_low_target): Ditto.
531 * linux-sh-low.cc (the_low_target): Ditto.
532 * linux-tic6x-low.cc (the_low_target): Ditto.
533 * linux-tile-low.cc (the_low_target): Ditto.
534 * linux-xtensa-low.cc (the_low_target): Ditto.
535
536 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
537
538 Remove the 'process_qsupported' linux target op and let a concrete
539 linux target define the op by overriding the op declaration in
540 process_stratum_target.
541
542 * linux-low.h (struct linux_target_ops): Remove the op.
543 (class linux_process_target) <process_qsupported>: Remove.
544 * linux-low.cc (linux_process_target::process_qsupported): Remove.
545 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
546 (x86_linux_process_qsupported): Turn into...
547 (x86_target::process_qsupported): ...this.
548 (the_low_target): Remove the op field.
549 * linux-aarch64-low.cc (the_low_target): Remove the op
550 field.
551 * linux-arm-low.cc (the_low_target): Ditto.
552 * linux-bfin-low.cc (the_low_target): Ditto.
553 * linux-crisv32-low.cc (the_low_target): Ditto.
554 * linux-m32r-low.cc (the_low_target): Ditto.
555 * linux-m68k-low.cc (the_low_target): Ditto.
556 * linux-ppc-low.cc (the_low_target): Ditto.
557 * linux-s390-low.cc (the_low_target): Ditto.
558 * linux-sh-low.cc (the_low_target): Ditto.
559 * linux-tic6x-low.cc (the_low_target): Ditto.
560 * linux-tile-low.cc (the_low_target): Ditto.
561 * linux-xtensa-low.cc (the_low_target): Ditto.
562
563 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
564
565 Turn the 'prepare_to_resume' linux target op into a method of
566 linux_process_target.
567
568 * linux-low.h (struct linux_target_ops): Remove the op.
569 (class linux_process_target) <low_prepare_to_resume>: Declare.
570 * linux-low.cc (linux_process_target::low_prepare_to_resume):
571 Define.
572
573 Update the callers below:
574
575 (linux_process_target::resume_one_lwp_throw)
576 (linux_process_target::low_prepare_to_resume)
577
578 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
579 Declare.
580 (x86_target::low_prepare_to_resume): Define.
581 (the_low_target): Remove the op field.
582 * linux-aarch64-low.cc (class aarch64_target)
583 <low_prepare_to_resume>: Declare.
584 (aarch64_target::low_prepare_to_resume): Define.
585 (the_low_target): Remove the op field.
586 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
587 Declare.
588 (arm_prepare_to_resume): Turn into...
589 (arm_target::low_prepare_to_resume): ...this.
590 (the_low_target): Remove the op field.
591 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
592 Declare.
593 (mips_linux_prepare_to_resume): Turn into...
594 (mips_target::low_prepare_to_resume): ...this.
595 (the_low_target): Remove the op field.
596 * linux-bfin-low.cc (the_low_target): Remove the op field.
597 * linux-crisv32-low.cc (the_low_target): Ditto.
598 * linux-m32r-low.cc (the_low_target): Ditto.
599 * linux-m68k-low.cc (the_low_target): Ditto.
600 * linux-ppc-low.cc (the_low_target): Ditto.
601 * linux-s390-low.cc (the_low_target): Ditto.
602 * linux-sh-low.cc (the_low_target): Ditto.
603 * linux-tic6x-low.cc (the_low_target): Ditto.
604 * linux-tile-low.cc (the_low_target): Ditto.
605 * linux-xtensa-low.cc (the_low_target): Ditto.
606
607 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
608
609 Turn the 'new_process', 'delete_process', 'new_thread',
610 'delete_thread', and 'new_fork' linux target ops into methods
611 of linux_process_target.
612
613 * linux-low.h (struct linux_target_ops): Remove the ops.
614 (class linux_process_target) <add_linux_process>
615 <add_lwp>
616 <delete_lwp>
617 <attach_lwp>
618 <detach_one_lwp>
619 <check_zombie_leaders>
620 <filter_exit_event>
621 <low_new_process>
622 <low_delete_process>
623 <low_new_thread>
624 <low_delete_thread>
625 <low_new_fork>: Declare.
626 * linux-low.cc (delete_lwp): Turn into...
627 (linux_process_target::delete_lwp): ...this.
628 (linux_process_target::low_delete_thread): Define.
629 (linux_add_process): Turn into...
630 (linux_process_target::add_linux_process): ...this.
631 (linux_process_target::low_new_process): Define.
632 (linux_process_target::low_delete_process): Define.
633 (linux_process_target::low_new_fork): Define.
634 (add_lwp): Turn into...
635 (linux_process_target::add_lwp): ...this.
636 (linux_process_target::low_new_thread): Define.
637 (linux_attach_lwp): Turn into...
638 (linux_process_target::attach_lwp): ...this.
639 (linux_detach_one_lwp): Turn into...
640 (linux_process_target::detach_one_lwp): ...this.
641 (linux_detach_lwp_callback): Remove and inline...
642 (linux_process_target::detach): ...here.
643 (check_zombie_leaders): Turn into...
644 (linux_process_target::check_zombie_leaders): ...this.
645 (filter_exit_event): Turn into...
646 (linux_process_target::filter_exit_event): ...this.
647
648 Update the callers below.
649
650 (linux_process_target::handle_extended_wait)
651 (linux_process_target::create_inferior)
652 (attach_proc_task_lwp_callback)
653 (linux_process_target::attach)
654 (linux_process_target::detach)
655 (linux_process_target::mourn)
656 * thread-db.cc (attach_thread)
657
658 * linux-x86-low.cc (class x86_target) <low_new_process>
659 <low_delete_process>
660 <low_new_thread>
661 <low_delete_thread>
662 <low_new_fork>: Declare.
663 (x86_linux_new_process): Turn into...
664 (x86_target::low_new_process): ...this.
665 (x86_linux_delete_process): Turn into...
666 (x86_target::low_delete_process): ...this.
667 (x86_target::low_new_thread): Define.
668 (x86_target::low_delete_thread): Define.
669 (x86_linux_new_fork): Turn into...
670 (x86_target::low_new_fork): ...this.
671 (the_low_target): Remove the op fields.
672 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
673 <low_delete_process>
674 <low_new_thread>
675 <low_delete_thread>
676 <low_new_fork>: Declare.
677 (aarch64_linux_new_process): Turn into...
678 (aarch64_target::low_new_process): ...this.
679 (aarch64_linux_delete_process): Turn into...
680 (aarch64_target::low_delete_process): ...this.
681 (aarch64_target::low_new_thread): Define.
682 (aarch64_target::low_delete_thread): Define.
683 (aarch64_linux_new_fork): Turn into...
684 (aarch64_target::low_new_fork): ...this.
685 (the_low_target): Remove the op fields.
686 * linux-arm-low.cc (class arm_target) <low_new_process>
687 <low_delete_process>
688 <low_new_thread>
689 <low_delete_thread>
690 <low_new_fork>: Declare.
691 (arm_new_process): Turn into...
692 (arm_target::low_new_process): ...this.
693 (arm_delete_process): Turn into...
694 (arm_target::low_delete_process): ...this.
695 (arm_new_thread): Turn into...
696 (arm_target::low_new_thread): ...this.
697 (arm_delete_thread): Turn into...
698 (arm_target::low_delete_thread): ...this.
699 (arm_new_fork): Turn into...
700 (arm_target::low_new_fork): ...this.
701 (the_low_target): Remove the op fields.
702 * linux-mips-low.cc (class mips_target) <low_new_process>
703 <low_delete_process>
704 <low_new_thread>
705 <low_delete_thread>
706 <low_new_fork>: Declare.
707 (mips_linux_new_process): Turn into...
708 (mips_target::low_new_process): ...this.
709 (mips_linux_delete_process): Turn into...
710 (mips_target::low_delete_process): ...this.
711 (mips_linux_new_thread): Turn into...
712 (mips_target::low_new_thread): ...this.
713 (mips_linux_delete_thread): Turn into...
714 (mips_target::low_delete_thread): ...this.
715 (mips_linux_new_fork): Turn into...
716 (mips_target::low_new_fork): ...this.
717 (the_low_target): Remove the op fields.
718 * linux-bfin-low.cc (the_low_target): Remove the op fields.
719 * linux-crisv32-low.cc (the_low_target): Ditto.
720 * linux-m32r-low.cc (the_low_target): Ditto.
721 * linux-m68k-low.cc (the_low_target): Ditto.
722 * linux-ppc-low.cc (the_low_target): Ditto.
723 * linux-s390-low.cc (the_low_target): Ditto.
724 * linux-sh-low.cc (the_low_target): Ditto.
725 * linux-tic6x-low.cc (the_low_target): Ditto.
726 * linux-tile-low.cc (the_low_target): Ditto.
727 * linux-xtensa-low.cc (the_low_target): Ditto.
728
729 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
730
731 Turn the 'siginfo_fixup' linux target op into a method of
732 linux_process_target.
733
734 * linux-low.h (struct linux_target_ops): Remove the op.
735 (class linux_process_target) <siginfo_fixup>
736 <low_siginfo_fixup>: Declare.
737 * linux-low.cc (siginfo_fixup): Turn into...
738 (linux_process_target::siginfo_fixup): ...this.
739 (linux_process_target::low_siginfo_fixup): Define.
740 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
741 (x86_siginfo_fixup): Turn into...
742 (x86_target::low_siginfo_fixup): ...this.
743 (the_low_target): Remove the op field.
744 * linux-aarch64-low.cc (class aarch64_target):
745 <low_siginfo_fixup>: Declare.
746 (aarch64_linux_siginfo_fixup): Turn into...
747 (aarch64_target::low_siginfo_fixup): ...this.
748 (the_low_target): Remove the op field.
749 * linux-arm-low.cc (the_low_target): Remove the op field.
750 * linux-bfin-low.cc (the_low_target): Ditto.
751 * linux-crisv32-low.cc (the_low_target): Ditto.
752 * linux-m32r-low.cc (the_low_target): Ditto.
753 * linux-m68k-low.cc (the_low_target): Ditto.
754 * linux-mips-low.cc (the_low_target): Ditto.
755 * linux-ppc-low.cc (the_low_target): Ditto.
756 * linux-s390-low.cc (the_low_target): Ditto.
757 * linux-sh-low.cc (the_low_target): Ditto.
758 * linux-tic6x-low.cc (the_low_target): Ditto.
759 * linux-tile-low.cc (the_low_target): Ditto.
760 * linux-xtensa-low.cc (the_low_target): Ditto.
761
762 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
763
764 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
765 linux target ops into methods of linux_process_target.
766
767 * linux-low.h (struct linux_target_ops): Remove the ops.
768 (class linux_process_target) <low_collect_ptrace_register>
769 <low_store_ptrace_register>: Declare.
770 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
771 (linux_process_target::low_supply_ptrace_register): Define.
772
773 Update the callers below.
774
775 (linux_process_target::fetch_register)
776 (linux_process_target::store_register)
777
778 * linux-x86-low.cc (the_low_target): Remove the op fields.
779 * linux-aarch64-low.cc (the_low_target): Ditto.
780 * linux-arm-low.cc (the_low_target): Ditto.
781 * linux-bfin-low.cc (the_low_target): Ditto.
782 * linux-crisv32-low.cc (the_low_target): Ditto.
783 * linux-m32r-low.cc (the_low_target): Ditto.
784 * linux-m68k-low.cc (the_low_target): Ditto.
785 * linux-sh-low.cc (the_low_target): Ditto.
786 * linux-sparc-low.cc (the_low_target): Ditto.
787 * linux-tic6x-low.cc (the_low_target): Ditto.
788 * linux-tile-low.cc (the_low_target): Ditto.
789 * linux-xtensa-low.cc (the_low_target): Ditto.
790 * linux-mips-low.cc (class mips_target)
791 <low_collect_ptrace_register>
792 <low_supply_ptrace_register>: Declare.
793 (mips_collect_ptrace_register): Turn into ...
794 (mips_target::low_collect_ptrace_register): ...this.
795 (mips_supply_ptrace_register): Turn into...
796 (mips_target::low_supply_ptrace_register): ...this.
797 (the_low_target): Remove the op fields.
798 * linux-ppc-low.cc (class ppc_target)
799 <low_collect_ptrace_register>
800 <low_supply_ptrace_register>: Declare.
801 (ppc_collect_ptrace_register): Turn into ...
802 (ppc_target::low_collect_ptrace_register): ...this.
803 (ppc_supply_ptrace_register): Turn into ...
804 (ppc_target::low_supply_ptrace_register): ...this.
805 (ppc_fill_gregset): Update for the calls to
806 low_collect_ptrace_register.
807 (the_low_target): Remove the op fields.
808 * linux-s390-low.cc (class s390_target)
809 <low_collect_ptrace_register>
810 <low_supply_ptrace_register>: Declare.
811 (s390_collect_ptrace_register): Turn into ...
812 (s390_target::low_collect_ptrace_register): ...this.
813 (s390_supply_ptrace_register): Turn into ...
814 (s390_target::low_supply_ptrace_register): ...this.
815 (s390_fill_gregset): Update for the calls to
816 low_collect_ptrace_register.
817 (the_low_target): Remove the op fields.
818
819 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
820
821 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
822 target ops into methods of linux_process_target.
823
824 * linux-low.h (struct linux_target_ops): Remove the ops.
825 (class linux_process_target) <check_stopped_by_watchpoint>
826 <low_stopped_by_watchpoint>
827 <low_stopped_data_address>: Declare.
828 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
829 (linux_process_target::check_stopped_by_watchpoint): ...this.
830 (linux_process_target::low_stopped_by_watchpoint): Define.
831 (linux_process_target::low_stopped_data_address): Define.
832 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
833 <low_stopped_data_address>: Declare.
834 (x86_stopped_by_watchpoint): Turn into...
835 (x86_target::low_stopped_by_watchpoint): ...this.
836 (x86_stopped_data_address): Turn into...
837 (x86_target::low_stopped_data_address): ...this.
838 (the_low_target): Remove the op fields.
839 * linux-aarch64-low.cc (class aarch64_target)
840 <low_stopped_by_watchpoint>
841 <low_stopped_data_address>: Declare.
842 (aarch64_stopped_by_watchpoint): Turn into...
843 (aarch64_target::low_stopped_by_watchpoint): ...this.
844 (aarch64_stopped_data_address): Turn into...
845 (aarch64_target::low_stopped_data_address): ...this.
846 (the_low_target): Remove the op fields.
847 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
848 <low_stopped_data_address>: Declare.
849 (arm_stopped_by_watchpoint): Turn into...
850 (arm_target::low_stopped_by_watchpoint): ...this.
851 (arm_stopped_data_address): Turn into...
852 (arm_target::low_stopped_data_address): ...this.
853 (the_low_target): Remove the op fields.
854 * linux-crisv32-low.cc (class crisv32_target)
855 <low_stopped_by_watchpoint>
856 <low_stopped_data_address>: Declare.
857 (cris_stopped_by_watchpoint): Turn into...
858 (crisv32_target::low_stopped_by_watchpoint): ...this.
859 (cris_stopped_data_address): Turn into...
860 (crisv32_target::low_stopped_data_address): ...this.
861 (the_low_target): Remove the op fields.
862 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
863 <low_stopped_data_address>: Declare.
864 (mips_stopped_by_watchpoint): Turn into...
865 (mips_target::low_stopped_by_watchpoint): ...this.
866 (mips_stopped_data_address): Turn into...
867 (mips_target::low_stopped_data_address): ...this.
868 (the_low_target): Remove the op fields.
869 * linux-bfin-low.cc (the_low_target): Remove the op fields.
870 * linux-m32r-low.cc (the_low_target): Ditto.
871 * linux-m68k-low.cc (the_low_target): Ditto.
872 * linux-ppc-low.cc (the_low_target): Ditto.
873 * linux-s390-low.cc (the_low_target): Ditto.
874 * linux-sh-low.cc (the_low_target): Ditto.
875 * linux-sparc-low.cc (the_low_target): Ditto.
876 * linux-tic6x-low.cc (the_low_target): Ditto.
877 * linux-tile-low.cc (the_low_target): Ditto.
878 * linux-xtensa-low.cc (the_low_target): Ditto.
879
880 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
881
882 Turn the 'insert_point' and 'remove_point' linux target ops into
883 methods of linux_process_target.
884
885 * linux-low.h (struct linux_target_ops): Remove the ops.
886 (class linux_process_target) <low_insert_point>
887 <low_remove_point>: Declare.
888 * linux-low.cc (linux_process_target::low_insert_point)
889 (linux_process_target::low_remove_point): Define.
890 (linux_process_target::insert_point)
891 (linux_process_target::remove_point): Update for calls to
892 low_insert_point and low_remove_point.
893 * linux-x86-low.cc (class x86_target) <low_insert_point>
894 <low_remove_point>: Declare.
895 (x86_insert_point): Turn into...
896 (x86_target::low_insert_point): ...this.
897 (x86_remove_point): Turn into...
898 (x86_target::low_remove_point): ...this.
899 (the_low_target): Remove the op fields.
900 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
901 <low_remove_point>: Declare.
902 (aarch64_insert_point): Turn into...
903 (aarch64_target::low_insert_point): ...this.
904 (aarch64_remove_point): Turn into...
905 (aarch64_target::low_remove_point): ...this.
906 (the_low_target): Remove the op fields.
907 * linux-arm-low.cc (class arm_target) <low_insert_point>
908 <low_remove_point>: Declare.
909 (arm_insert_point): Turn into...
910 (arm_target::low_insert_point): ...this.
911 (arm_remove_point): Turn into...
912 (arm_target::low_remove_point): ...this.
913 (the_low_target): Remove the op fields.
914 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
915 <low_remove_point>: Declare.
916 (crisv32_insert_point): Turn into...
917 (crisv32_target::low_insert_point): ...this.
918 (crisv32_remove_point): Turn into...
919 (crisv32_target::low_remove_point): ...this.
920 (the_low_target): Remove the op fields.
921 * linux-mips-low.cc (class mips_target) <low_insert_point>
922 <low_remove_point>: Declare.
923 (mips_insert_point): Turn into...
924 (mips_target::low_insert_point): ...this.
925 (mips_remove_point): Turn into...
926 (mips_target::low_remove_point): ...this.
927 (the_low_target): Remove the op fields.
928 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
929 <low_remove_point>: Declare.
930 (ppc_insert_point): Turn into...
931 (ppc_target::low_insert_point): ...this.
932 (ppc_remove_point): Turn into...
933 (ppc_target::low_remove_point): ...this.
934 (the_low_target): Remove the op fields.
935 * linux-bfin-low.cc (the_low_target): Remove the op fields.
936 * linux-m32r-low.cc (the_low_target): Ditto.
937 * linux-m68k-low.cc (the_low_target): Ditto.
938 * linux-s390-low.cc (the_low_target): Ditto.
939 * linux-sh-low.cc (the_low_target): Ditto.
940 * linux-sparc-low.cc (the_low_target): Ditto.
941 * linux-tic6x-low.cc (the_low_target): Ditto.
942 * linux-tile-low.cc (the_low_target): Ditto.
943 * linux-xtensa-low.cc (the_low_target): Ditto.
944
945 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
946
947 Remove the 'supports_z_point_type' linux target op and let the
948 concrete linux target define it by overriding the op declared in
949 process_stratum_target.
950
951 * linux-low.cc (linux_process_target::supports_z_point_type):
952 Remove.
953 * linux-low.h (struct linux_target_ops): Remove the op.
954 (class linux_process_target) <supports_z_point_type>: Remove.
955 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
956 Declare.
957 (x86_supports_z_point_type): Turn into...
958 (x86_target::supports_z_point_type): ...this.
959 (the_low_target): Remove the op field.
960 * linux-aarch64-low.cc (class aarch64_target)
961 <supports_z_point_type>: Declare.
962 (aarch64_supports_z_point_type): Turn into...
963 (aarch64_target::supports_z_point_type): ...this.
964 (the_low_target): Remove the op field.
965 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
966 Declare.
967 (arm_supports_z_point_type): Turn into...
968 (arm_target::supports_z_point_type): ...this.
969 (the_low_target): Remove the op field.
970 * linux-crisv32-low.cc (class crisv32_target)
971 <supports_z_point_type>: Declare.
972 (cris_supports_z_point_type): Turn into...
973 (crisv32_target::supports_z_point_type): ...this.
974 (the_low_target): Remove the op field.
975 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
976 Declare.
977 (mips_supports_z_point_type): Turn into...
978 (mips_target::supports_z_point_type): ...this.
979 (the_low_target): Remove the op field.
980 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
981 Declare.
982 (ppc_supports_z_point_type): Turn into...
983 (ppc_target::supports_z_point_type): ...this.
984 (the_low_target): Remove the op field.
985 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
986 Declare.
987 (s390_supports_z_point_type): Turn into...
988 (s390_target::supports_z_point_type): ...this.
989 (the_low_target): Remove the op field.
990 * linux-bfin-low.cc (the_low_target): Remove the op field.
991 * linux-m32r-low.cc (the_low_target): Ditto.
992 * linux-m68k-low.cc (the_low_target): Ditto.
993 * linux-sh-low.cc (the_low_target): Ditto.
994 * linux-sparc-low.cc (the_low_target): Ditto.
995 * linux-tic6x-low.cc (the_low_target): Ditto.
996 * linux-tile-low.cc (the_low_target): Ditto.
997 * linux-xtensa-low.cc (the_low_target): Ditto.
998
999 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1000
1001 Turn the 'breakpoint_at' linux target op into a method of
1002 linux_process_target.
1003
1004 * linux-low.h (struct linux_target_ops): Remove the op.
1005 (class linux_process_target) <low_breakpoint_at>: Declare.
1006
1007 Update the callers below:
1008
1009 * linux-low.cc (linux_process_target::save_stop_reason)
1010 (linux_process_target::thread_still_has_status_pending)
1011 (linux_process_target::wait_1)
1012
1013 * linux-x86-low.cc (class x86_target)
1014 <low_breakpoint_at>: Declare.
1015 (x86_breakpoint_at): Turn into...
1016 (x86_target::low_breakpoint_at): ...this.
1017 (the_low_target): Remove the op field.
1018 * linux-aarch64-low.cc (class aarch64_target)
1019 <low_breakpoint_at>: Declare.
1020 (aarch64_breakpoint_at): Turn into...
1021 (aarch64_target::low_breakpoint_at): ...this.
1022 (the_low_target): Remove the op field.
1023 * linux-arm-low.cc (class arm_target)
1024 <low_breakpoint_at>: Declare.
1025 (arm_target::low_breakpoint_at): Define.
1026 (the_low_target): Remove the op field.
1027 * linux-bfin-low.cc (class bfin_target)
1028 <low_breakpoint_at>: Declare.
1029 (bfin_breakpoint_at): Turn into...
1030 (bfin_target::low_breakpoint_at): ...this.
1031 (the_low_target): Remove the op field.
1032 * linux-cris-low.cc (class cris_target)
1033 <low_breakpoint_at>: Declare.
1034 (cris_breakpoint_at): Turn into...
1035 (cris_target::low_breakpoint_at): ...this.
1036 (the_low_target): Remove the op field.
1037 * linux-crisv32-low.cc (class crisv32_target)
1038 <low_breakpoint_at>: Declare.
1039 (crisv32_breakpoint_at): Turn into...
1040 (crisv32_target::low_breakpoint_at): ...this.
1041 (the_low_target): Remove the op field.
1042 * linux-ia64-low.cc (class ia64_target)
1043 <low_breakpoint_at>: Declare.
1044 (ia64_target::low_breakpoint_at): Define.
1045 * linux-m32r-low.cc (class m32r_target)
1046 <low_breakpoint_at>: Declare.
1047 (m32r_breakpoint_at): Turn into...
1048 (m32r_target::low_breakpoint_at): ...this.
1049 (the_low_target): Remove the op field.
1050 * linux-m68k-low.cc (class m68k_target)
1051 <low_breakpoint_at>: Declare.
1052 (m68k_breakpoint_at): Turn into...
1053 (m68k_target::low_breakpoint_at): ...this.
1054 (the_low_target): Remove the op field.
1055 * linux-mips-low.cc (class mips_target)
1056 <low_breakpoint_at>: Declare.
1057 (mips_breakpoint_at): Turn into...
1058 (mips_target::low_breakpoint_at): ...this.
1059 (the_low_target): Remove the op field.
1060 * linux-nios2-low.cc (class nios2_target)
1061 <low_breakpoint_at>: Declare.
1062 (nios2_breakpoint_at): Turn into...
1063 (nios2_target::low_breakpoint_at): ...this.
1064 (the_low_target): Remove the op field.
1065 * linux-ppc-low.cc (class ppc_target)
1066 <low_breakpoint_at>: Declare.
1067 (ppc_breakpoint_at): Turn into...
1068 (ppc_target::low_breakpoint_at): ...this.
1069 (the_low_target): Remove the op field.
1070 * linux-riscv-low.cc (class riscv_target)
1071 <low_breakpoint_at>: Declare.
1072 (riscv_breakpoint_at): Turn into...
1073 (riscv_target::low_breakpoint_at): ...this.
1074 (the_low_target): Remove the op field.
1075 * linux-s390-low.cc (class s390_target)
1076 <low_breakpoint_at>: Declare.
1077 (s390_breakpoint_at): Turn into...
1078 (s390_target::low_breakpoint_at): ...this.
1079 (the_low_target): Remove the op field.
1080 * linux-sh-low.cc (class sh_target)
1081 <low_breakpoint_at>: Declare.
1082 (sh_breakpoint_at): Turn into...
1083 (sh_target::low_breakpoint_at): ...this.
1084 (the_low_target): Remove the op field.
1085 * linux-sparc-low.cc (class sparc_target)
1086 <low_breakpoint_at>: Declare.
1087 (sparc_breakpoint_at): Turn into...
1088 (sparc_target::low_breakpoint_at): ...this.
1089 (the_low_target): Remove the op field.
1090 * linux-tic6x-low.cc (class tic6x_target)
1091 <low_breakpoint_at>: Declare.
1092 (tic6x_breakpoint_at): Turn into...
1093 (tic6x_target::low_breakpoint_at): ...this.
1094 (the_low_target): Remove the op field.
1095 * linux-tile-low.cc (class tile_target)
1096 <low_breakpoint_at>: Declare.
1097 (tile_breakpoint_at): Turn into...
1098 (tile_target::low_breakpoint_at): ...this.
1099 (the_low_target): Remove the op field.
1100 * linux-xtensa-low.cc (class xtensa_target)
1101 <low_breakpoint_at>: Declare.
1102 (xtensa_breakpoint_at): Turn into...
1103 (xtensa_target::low_breakpoint_at): ...this.
1104 (the_low_target): Remove the op field.
1105
1106 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1107
1108 Turn the 'decr_pc_after_break' linux_target_ops field into
1109 a method of linux_process_target.
1110
1111 * linux-low.h (struct linux_target_ops)
1112 <decr_pc_after_break>: Remove.
1113 (class linux_process_target) <low_decr_pc_after_break>: New method
1114 declaration.
1115 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1116 New method implementation.
1117
1118 Update the users below.
1119
1120 (linux_process_target::save_stop_reason)
1121 (linux_process_target::wait_1)
1122 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1123 New declaration.
1124 (x86_target::low_decr_pc_after_break): New method implementation.
1125 (the_low_target): Remove the field.
1126 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1127 New declaration.
1128 (bfin_target::low_decr_pc_after_break): New method implementation.
1129 (the_low_target): Remove the field.
1130 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1131 New declaration.
1132 (m68k_target::low_decr_pc_after_break): New method implementation.
1133 (the_low_target): Remove the field.
1134 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1135 New declaration.
1136 (s390_target::low_decr_pc_after_break): New method implementation.
1137 (the_low_target): Remove the field.
1138 * linux-aarch64-low.cc (the_low_target): Remove the field.
1139 * linux-arm-low.cc (the_low_target): Remove the field.
1140 * linux-cris-low.cc (the_low_target): Remove the field.
1141 * linux-crisv32-low.cc (the_low_target): Remove the field.
1142 * linux-m32r-low.cc (the_low_target): Remove the field.
1143 * linux-mips-low.cc (the_low_target): Remove the field.
1144 * linux-nios2-low.cc (the_low_target): Remove the field.
1145 * linux-ppc-low.cc (the_low_target): Remove the field.
1146 * linux-riscv-low.cc (the_low_target): Remove the field.
1147 * linux-sh-low.cc (the_low_target): Remove the field.
1148 * linux-sparc-low.cc (the_low_target): Remove the field.
1149 * linux-tic6x-low.cc (the_low_target): Remove the field.
1150 * linux-tile-low.cc (the_low_target): Remove the field.
1151 * linux-xtensa-low.cc (the_low_target): Remove the field.
1152
1153 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1154
1155 Remove the 'supports_software_single_step' linux target op and let
1156 the concrete linux target define it by overriding the op in
1157 process_stratum_target.
1158 Turn the 'get_next_pcs' linux target op into a method of
1159 linux_process_target.
1160
1161 * linux-low.h (struct linux_target_ops): Remove the ops.
1162 (class linux_process_target) <supports_software_single_step>:
1163 Remove.
1164 <low_get_next_pcs>: Declare.
1165 * linux-low.cc (can_software_single_step): Remove.
1166 (linux_process_target::low_get_next_pcs): Define.
1167 (linux_process_target::supports_software_single_step): Remove.
1168
1169 Update the callers below.
1170
1171 (linux_process_target::handle_extended_wait)
1172 (linux_process_target::wait_1)
1173 (linux_process_target::install_software_single_step_breakpoints)
1174 (linux_process_target::single_step)
1175 (linux_process_target::thread_needs_step_over)
1176 (linux_process_target::proceed_one_lwp)
1177 (linux_process_target::supports_range_stepping)
1178
1179 * linux-x86-low.cc (the_low_target): Remove the op field.
1180 * linux-aarch64-low.cc (the_low_target): Ditto.
1181 * linux-bfin-low.cc (the_low_target): Ditto.
1182 * linux-cris-low.cc (the_low_target): Ditto.
1183 * linux-crisv32-low.cc (the_low_target): Ditto.
1184 * linux-m32r-low.cc (the_low_target): Ditto.
1185 * linux-m68k-low.cc (the_low_target): Ditto.
1186 * linux-mips-low.cc (the_low_target): Ditto.
1187 * linux-nios2-low.cc (the_low_target): Ditto.
1188 * linux-ppc-low.cc (the_low_target): Ditto.
1189 * linux-riscv-low.cc (the_low_target): Ditto.
1190 * linux-s390-low.cc (the_low_target): Ditto.
1191 * linux-sh-low.cc (the_low_target): Ditto.
1192 * linux-sparc-low.cc (the_low_target): Ditto.
1193 * linux-tic6x-low.cc (the_low_target): Ditto.
1194 * linux-tile-low.cc (the_low_target): Ditto.
1195 * linux-xtensa-low.cc (the_low_target): Ditto.
1196 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1197 <supports_software_single_step>: Declare.
1198 (arm_target::supports_software_single_step): Define.
1199 (arm_gdbserver_get_next_pcs): Turn into...
1200 (arm_target::low_get_next_pcs): ...this.
1201 (the_low_target): Remove the op field.
1202
1203 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1204
1205 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1206 the concrete linux target define it by overriding the op
1207 in process_stratum_target.
1208
1209 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1210 Remove.
1211 * linux-low.h (struct linux_target_ops): Remove the op.
1212 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1213 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1214 Declare.
1215 (x86_sw_breakpoint_from_kind): Turn into...
1216 (x86_target::sw_breakpoint_from_kind): ...this.
1217 (the_low_target): Remove the op field.
1218 * linux-aarch64-low.cc (class aarch64_target)
1219 <sw_breakpoint_from_kind>: Declare.
1220 (aarch64_sw_breakpoint_from_kind): Turn into...
1221 (aarch64_target::sw_breakpoint_from_kind): ...this.
1222 (the_low_target): Remove the op field.
1223 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1224 Declare.
1225 (arm_target::sw_breakpoint_from_kind): Define.
1226 (the_low_target): Remove the op field.
1227 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1228 Declare.
1229 (bfin_sw_breakpoint_from_kind): Turn into...
1230 (bfin_target::sw_breakpoint_from_kind): ...this.
1231 (the_low_target): Remove the op field.
1232 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1233 Declare.
1234 (cris_sw_breakpoint_from_kind): Turn into...
1235 (cris_target::sw_breakpoint_from_kind): ...this.
1236 (the_low_target): Remove the op field.
1237 * linux-crisv32-low.cc (class crisv32_target)
1238 <sw_breakpoint_from_kind>: Declare.
1239 (cris_sw_breakpoint_from_kind): Turn into...
1240 (crisv32_target::sw_breakpoint_from_kind): ...this.
1241 (the_low_target): Remove the op field.
1242 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1243 Declare.
1244 (ia64_target::sw_breakpoint_from_kind): Define.
1245 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1246 Declare.
1247 (m32r_sw_breakpoint_from_kind): Turn into...
1248 (m32r_target::sw_breakpoint_from_kind): ...this.
1249 (the_low_target): Remove the op field.
1250 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1251 Declare.
1252 (m68k_sw_breakpoint_from_kind): Turn into...
1253 (m68k_target::sw_breakpoint_from_kind): ...this.
1254 (the_low_target): Remove the op field.
1255 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1256 Declare.
1257 (mips_sw_breakpoint_from_kind): Turn into...
1258 (mips_target::sw_breakpoint_from_kind): ...this.
1259 (the_low_target): Remove the op field.
1260 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1261 Declare.
1262 (nios2_sw_breakpoint_from_kind): Turn into...
1263 (nios2_target::sw_breakpoint_from_kind): ...this.
1264 (the_low_target): Remove the op field.
1265 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1266 Declare.
1267 (ppc_sw_breakpoint_from_kind): Turn into...
1268 (ppc_target::sw_breakpoint_from_kind): ...this.
1269 (the_low_target): Remove the op field.
1270 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1271 Declare.
1272 (riscv_sw_breakpoint_from_kind): Turn into...
1273 (riscv_target::sw_breakpoint_from_kind): ...this.
1274 (the_low_target): Remove the op field.
1275 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1276 Declare.
1277 (s390_sw_breakpoint_from_kind): Turn into...
1278 (s390_target::sw_breakpoint_from_kind): ...this.
1279 (the_low_target): Remove the op field.
1280 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1281 Declare.
1282 (sh_sw_breakpoint_from_kind): Turn into...
1283 (sh_target::sw_breakpoint_from_kind): ...this.
1284 (the_low_target): Remove the op field.
1285 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1286 Declare.
1287 (sparc_sw_breakpoint_from_kind): Turn into...
1288 (sparc_target::sw_breakpoint_from_kind): ...this.
1289 (the_low_target): Remove the op field.
1290 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1291 Declare.
1292 (tic6x_sw_breakpoint_from_kind): Turn into...
1293 (tic6x_target::sw_breakpoint_from_kind): ...this.
1294 (the_low_target): Remove the op field.
1295 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1296 Declare.
1297 (tile_sw_breakpoint_from_kind): Turn into...
1298 (tile_target::sw_breakpoint_from_kind): ...this.
1299 (the_low_target): Remove the op field.
1300 * linux-xtensa-low.cc (class xtensa_target)
1301 <sw_breakpoint_from_kind>: Declare.
1302 (xtensa_sw_breakpoint_from_kind): Turn into...
1303 (xtensa_target::sw_breakpoint_from_kind): ...this.
1304 (the_low_target): Remove the op field.
1305
1306 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1307
1308 Remove the 'breakpoint_kind_from_pc' and
1309 'breakpoint_kind_from_current_state' linux target ops, and let the
1310 concrete linux target define them by overriding the ops of
1311 process_stratum_target.
1312
1313 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1314 Remove.
1315 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1316 * linux-low.h (struct linux_target_ops): Remove ops.
1317 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1318 <breakpoint_kind_from_current_state>: Remove.
1319 * linux-x86-low.cc (the_low_target): Remove the op fields.
1320 * linux-bfin-low.cc (the_low_target): Ditto.
1321 * linux-cris-low.cc (the_low_target): Ditto.
1322 * linux-crisv32-low.cc (the_low_target): Ditto.
1323 * linux-m32r-low.cc (the_low_target): Ditto.
1324 * linux-m68k-low.cc (the_low_target): Ditto.
1325 * linux-mips-low.cc (the_low_target): Ditto.
1326 * linux-nios2-low.cc (the_low_target): Ditto.
1327 * linux-ppc-low.cc (the_low_target): Ditto.
1328 * linux-s390-low.cc (the_low_target): Ditto.
1329 * linux-sh-low.cc (the_low_target): Ditto.
1330 * linux-sparc-low.cc (the_low_target): Ditto.
1331 * linux-tic6x-low.cc (the_low_target): Ditto.
1332 * linux-tile-low.cc (the_low_target): Ditto.
1333 * linux-xtensa-low.cc (the_low_target): Ditto.
1334 * linux-aarch64-low.cc (class aarch64_target)
1335 <breakpoint_kind_from_pc>
1336 <breakpoint_kind_from_current_state>: Declare.
1337 (aarch64_breakpoint_kind_from_pc): Turn into...
1338 (aarch64_target::breakpoint_kind_from_pc): ...this.
1339 (aarch64_breakpoint_kind_from_current_state): Turn into...
1340 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1341 (the_low_target): Remove the op fields.
1342 * linux-arm-low.cc (class arm_target):
1343 <breakpoint_kind_from_pc>
1344 <breakpoint_kind_from_current_state>: Declare.
1345 (arm_target::breakpoint_kind_from_pc): Define.
1346 (arm_target::breakpoint_kind_from_current_state): Define.
1347 (the_low_target): Remove the op fields.
1348 * linux-riscv-low.cc (class riscv_target):
1349 <breakpoint_kind_from_pc>: Declare.
1350 (riscv_breakpoint_kind_from_pc): Turn into...
1351 (riscv_target::breakpoint_kind_from_pc): ...this.
1352 (the_low_target): Remove the op fields.
1353
1354 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1355
1356 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1357 of linux_process_target.
1358
1359 * linux-low.h (struct linux_target_ops): Remove the ops.
1360 (class linux_process_target) <low_supports_breakpoints>
1361 <low_get_pc>
1362 <low_set_pc>: Declare.
1363 * linux-low.cc (supports_breakpoints): Turn into...
1364 (linux_process_target::low_supports_breakpoints): ...this.
1365 (linux_process_target::low_get_pc): Define.
1366 (linux_process_target::low_set_pc): Define.
1367
1368 Update the callers below.
1369
1370 (linux_process_target::get_pc)
1371 (linux_process_target::save_stop_reason)
1372 (linux_process_target::maybe_move_out_of_jump_pad)
1373 (linux_process_target::wait_1)
1374 (linux_process_target::resume_one_lwp_throw)
1375 (linux_process_target::resume)
1376 (linux_process_target::proceed_all_lwps)
1377 (linux_process_target::read_pc)
1378 (linux_process_target::write_pc)
1379
1380 * linux-x86-low.cc (class linux_process_target)
1381 <low_supports_breakpoints>
1382 <low_get_pc>
1383 <low_set_pc>: Declare.
1384 (x86_target::low_supports_breakpoints): Define.
1385 (x86_get_pc): Turn into...
1386 (x86_target::low_get_pc): ...this.
1387 (x86_set_pc): Turn into...
1388 (x86_target::low_set_pc): ...this.
1389 (the_low_target): Remove the op fields.
1390 * linux-arm-low.cc (class arm_target)
1391 <low_supports_breakpoints>
1392 <low_get_pc>
1393 <low_set_pc>: Declare.
1394 (arm_target::low_supports_breakpoints)
1395 (arm_target::low_get_pc)
1396 (arm_target::low_set_pc): Define.
1397 (the_low_target): Remove the op fields.
1398 * linux-bfin-low.cc (class bfin_target)
1399 <low_supports_breakpoints>
1400 <low_get_pc>
1401 <low_set_pc>: Declare.
1402 (bfin_target::low_supports_breakpoints)
1403 (bfin_target::low_get_pc)
1404 (bfin_target::low_set_pc): Define.
1405 (the_low_target): Remove the op fields.
1406 * linux-cris-low.cc (class cris_target)
1407 <low_supports_breakpoints>
1408 <low_get_pc>
1409 <low_set_pc>: Declare.
1410 (cris_target::low_supports_breakpoints)
1411 (cris_target::low_get_pc)
1412 (cris_target::low_set_pc): Define.
1413 (the_low_target): Remove the op fields.
1414 * linux-crisv32-low.cc (class crisv32_target)
1415 <low_supports_breakpoints>
1416 <low_get_pc>
1417 <low_set_pc>: Declare.
1418 (crisv32_target::low_supports_breakpoints)
1419 (crisv32_target::low_get_pc)
1420 (crisv32_target::low_set_pc): Define.
1421 (the_low_target): Remove the op fields.
1422 * linux-m32r-low.cc (class m32r_target)
1423 <low_supports_breakpoints>
1424 <low_get_pc>
1425 <low_set_pc>: Declare.
1426 (m32r_target::low_supports_breakpoints)
1427 (m32r_target::low_get_pc)
1428 (m32r_target::low_set_pc): Define.
1429 (the_low_target): Remove the op fields.
1430 * linux-m68k-low.cc (class m68k_target)
1431 <low_supports_breakpoints>
1432 <low_get_pc>
1433 <low_set_pc>: Declare.
1434 (m68k_target::low_supports_breakpoints)
1435 (m68k_target::low_get_pc)
1436 (m68k_target::low_set_pc): Define.
1437 (the_low_target): Remove the op fields.
1438 * linux-nios2-low.cc (class nios2_target)
1439 <low_supports_breakpoints>
1440 <low_get_pc>
1441 <low_set_pc>: Declare.
1442 (nios2_target::low_supports_breakpoints)
1443 (nios2_target::low_get_pc)
1444 (nios2_target::low_set_pc): Define.
1445 (the_low_target): Remove the op fields.
1446 * linux-sh-low.cc (class sh_target)
1447 <low_supports_breakpoints>
1448 <low_get_pc>
1449 <low_set_pc>: Declare.
1450 (sh_target::low_supports_breakpoints)
1451 (sh_target::low_get_pc)
1452 (sh_target::low_set_pc): Define.
1453 (the_low_target): Remove the op fields.
1454 * linux-xtensa-low.cc (class xtensa_target)
1455 <low_supports_breakpoints>
1456 <low_get_pc>
1457 <low_set_pc>: Declare.
1458 (xtensa_target::low_supports_breakpoints)
1459 (xtensa_target::low_get_pc)
1460 (xtensa_target::low_set_pc): Define.
1461 (the_low_target): Remove the op fields.
1462 * linux-sparc-low.cc (class sparc_target)
1463 <low_supports_breakpoints>
1464 <low_get_pc>: Declare.
1465 (sparc_target::low_supports_breakpoints)
1466 (sparc_target::low_get_pc): Define.
1467 (the_low_target): Remove the op fields.
1468 * linux-tile-low.cc (class tile_target)
1469 <low_supports_breakpoints>
1470 <low_get_pc>
1471 <low_set_pc>: Declare.
1472 (tile_target::low_supports_breakpoints)
1473 (tile_target::low_get_pc)
1474 (tile_target::low_set_pc): Define.
1475 (the_low_target): Remove the op fields.
1476 * linux-aarch64-low.cc (class aarch64_target)
1477 <low_supports_breakpoints>
1478 <low_get_pc>
1479 <low_set_pc>: Declare.
1480 (aarch64_target::low_supports_breakpoints): Define.
1481 (aarch64_get_pc): Turn into...
1482 (aarch64_target::low_get_pc): ...this.
1483 (aarch64_set_pc): Turn into...
1484 (aarch64_target::low_set_pc): ...this.
1485 (the_low_target): Remove the op fields.
1486 * linux-mips-low.cc (class mips_target)
1487 <low_supports_breakpoints>
1488 <low_get_pc>
1489 <low_set_pc>: Declare.
1490 (mips_target::low_supports_breakpoints): Define.
1491 (mips_get_pc): Turn into...
1492 (mips_target::low_get_pc): ...this.
1493 (mips_set_pc): Turn into...
1494 (mips_target::low_set_pc): ...this.
1495 (the_low_target): Remove the op fields.
1496 * linux-ppc-low.cc (class ppc_target)
1497 <low_supports_breakpoints>
1498 <low_get_pc>
1499 <low_set_pc>: Declare.
1500 (ppc_target::low_supports_breakpoints): Define.
1501 (ppc_get_pc): Turn into...
1502 (ppc_target::low_get_pc): ...this.
1503 (ppc_set_pc): Turn into...
1504 (ppc_target::low_set_pc): ...this.
1505 (the_low_target): Remove the op fields.
1506 * linux-riscv-low.cc (class riscv_target)
1507 <low_supports_breakpoints>
1508 <low_get_pc>
1509 <low_set_pc>: Declare.
1510 (riscv_target::low_supports_breakpoints): Define.
1511 (riscv_get_pc): Turn into...
1512 (riscv_target::low_get_pc): ...this.
1513 (riscv_set_pc): Turn into...
1514 (riscv_target::low_set_pc): ...this.
1515 (the_low_target): Remove the op fields.
1516 * linux-s390-low.cc (class s390_target)
1517 <low_supports_breakpoints>
1518 <low_get_pc>
1519 <low_set_pc>: Declare.
1520 (s390_target::low_supports_breakpoints): Define.
1521 (s390_get_pc): Turn into...
1522 (s390_target::low_get_pc): ...this.
1523 (s390_set_pc): Turn into...
1524 (s390_target::low_set_pc): ...this.
1525 (the_low_target): Remove the op fields.
1526 * linux-tic6x-low.cc (class tic6x_target)
1527 <low_supports_breakpoints>
1528 <low_get_pc>
1529 <low_set_pc>: Declare.
1530 (tic6x_target::low_supports_breakpoints): Define.
1531 (tic6x_get_pc): Turn into...
1532 (tic6x_target::low_get_pc): ...this.
1533 (tic6x_set_pc): Turn into...
1534 (tic6x_target::low_set_pc): ...this.
1535 (the_low_target): Remove the op fields.
1536
1537 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1538
1539 Turn some more static methods in linux-low into private methods
1540 of linux_process_target.
1541
1542 * linux-low.cc (get_pc): Turn into...
1543 (linux_process_target::get_pc): ...this.
1544 (save_stop_reason): Turn into...
1545 (linux_process_target::save_stop_reason): ...this.
1546 (thread_still_has_status_pending_p): Turn into...
1547 (linux_process_target::thread_still_has_status_pending): ...this.
1548 (status_pending_p_callback): Turn into...
1549 (linux_process_target::status_pending_p_callback): ...this.
1550 (resume_stopped_resumed_lwps): Turn into...
1551 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1552 (install_software_single_step_breakpoints): Turn into...
1553 (linux_process_target::install_software_single_step_breakpoints):
1554 ...this.
1555 (single_step): Turn into...
1556 (linux_process_target::single_step): ...this.
1557 (linux_resume_one_lwp_throw): Turn into...
1558 (linux_process_target::resume_one_lwp_throw): ...this.
1559 (linux_resume_one_lwp): Turn into...
1560 (linux_process_target::resume_one_lwp): ...this.
1561 (resume_status_pending_p): Turn into...
1562 (linux_process_target::resume_status_pending): ...this.
1563 (need_step_over_p): Turn into...
1564 (linux_process_target::thread_needs_step_over): ...this.
1565 (linux_resume_one_thread): Turn into...
1566 (linux_process_target::resume_one_thread): ...this.
1567 (proceed_one_lwp): Turn into...
1568 (linux_process_target::proceed_one_lwp): ...this.
1569 (unsuspend_and_proceed_one_lwp): Turn into...
1570 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1571
1572 Update the calls/references to the above functions below.
1573
1574 (linux_process_target::handle_extended_wait)
1575 (linux_process_target::filter_event)
1576 (linux_process_target::wait_for_event_filtered)
1577 (linux_process_target::wait_1)
1578 (linux_process_target::move_out_of_jump_pad)
1579 (linux_process_target::start_step_over)
1580 (linux_process_target::resume)
1581 (linux_process_target::proceed_all_lwps)
1582 (regsets_store_inferior_registers)
1583 (linux_process_target::store_register)
1584
1585 * linux-low.h (class linux_process_target)
1586 <get_pc>
1587 <save_stop_reason>
1588 <thread_still_has_status_pending>
1589 <status_pending_p_callback>
1590 <resume_stopped_resumed_lwps>
1591 <install_software_single_step_breakpoints>
1592 <single_step>
1593 <resume_one_lwp_throw>
1594 <resume_one_lwp>
1595 <resume_status_pending>
1596 <thread_needs_step_over>
1597 <resume_one_thread>
1598 <proceed_one_lwp>
1599 <unsuspend_and_proceed_one_lwp>: Declare.
1600
1601 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1602
1603 Turn the 'fetch_register' linux target op into a method of
1604 linux_process_target.
1605
1606 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1607 (class linux_process_target) <low_fetch_register>: Declare.
1608 * linux-x86-low.cc (the_low_target)
1609 * linux-aarch64-low.cc (the_low_target)
1610 * linux-arm-low.cc (the_low_target)
1611 * linux-bfin-low.cc (the_low_target)
1612 * linux-cris-low.cc (the_low_target)
1613 * linux-crisv32-low.cc (the_low_target)
1614 * linux-m32r-low.cc (the_low_target)
1615 * linux-m68k-low.cc (the_low_target)
1616 * linux-nios2-low.cc (the_low_target)
1617 * linux-ppc-low.cc (the_low_target)
1618 * linux-s390-low.cc (the_low_target)
1619 * linux-sh-low.cc (the_low_target)
1620 * linux-sparc-low.cc (the_low_target)
1621 * linux-tic6x-low.cc (the_low_target)
1622 * linux-tile-low.cc (the_low_target)
1623 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1624 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1625 Declare.
1626 (ia64_fetch_register): Turn into...
1627 (ia64_target::low_fetch_register): ...this.
1628 (the_low_target): Remove the op field.
1629 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1630 Declare.
1631 (mips_fetch_register): Turn into...
1632 (mips_target::low_fetch_register): ...this.
1633 (the_low_target): Remove the op field.
1634 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1635 Declare.
1636 (riscv_fetch_register): Turn into...
1637 (riscv_target::low_fetch_register): ...this.
1638 (the_low_target): Remove the op field.
1639
1640 Update the callers below.
1641
1642 * linux-low.cc (linux_process_target::fetch_registers)
1643 (linux_process_target::low_fetch_register)
1644
1645 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1646
1647 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1648 linux target ops into methods of linux_process_target.
1649
1650 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1651 (class linux_process_target) <fetch_register>
1652 <store_register>
1653 <usr_fetch_inferior_registers>
1654 <usr_store_inferior_registers>
1655 <low_cannot_fetch_register>
1656 <low_cannot_fetch_register> Declare.
1657 * linux-low.cc (fetch_register): Turn into...
1658 (linux_process_target::fetch_register): ...this.
1659 (store_register): Turn into ...
1660 (linux_process_target::store_register): ...this.
1661 (usr_fetch_inferior_registers): Turn into...
1662 (linux_process_target::usr_fetch_inferior_registers): ...this.
1663 (usr_store_inferior_registers): Turn into...
1664 (linux_process_target::usr_store_inferior_registers): ...this.
1665 * linux-x86-low.cc (class x86_target)
1666 <low_cannot_fetch_register>
1667 <low_cannot_store_register>: Declare.
1668 (x86_cannot_store_register): Turn into...
1669 (x86_target::low_cannot_store_register): ...this.
1670 (x86_cannot_fetch_register): Turn into...
1671 (x86_target::low_cannot_fetch_register): ...this.
1672 (the_low_target): Remove the target op fields.
1673 * linux-aarch64-low.cc (class aarch64_target)
1674 <low_cannot_fetch_register>
1675 <low_cannot_store_register>: Declare.
1676 (aarch64_target::low_cannot_fetch_register)
1677 (aarch64_target::low_cannot_store_register): Define.
1678 (the_low_target): Remove the op fields.
1679 * linux-arm-low.cc (class arm_target)
1680 <low_cannot_fetch_register>
1681 <low_cannot_store_register>: Declare.
1682 (arm_cannot_fetch_register): Turn into...
1683 (arm_target::low_cannot_fetch_register): ...this.
1684 (arm_cannot_store_register): Turn into...
1685 (arm_target::low_cannot_store_register): ...this.
1686 (the_low_target): Remove the op fields.
1687 * linux-bfin-low.cc (class bfin_target)
1688 <low_cannot_fetch_register>
1689 <low_cannot_store_register>: Declare.
1690 (bfin_cannot_fetch_register): Turn into...
1691 (bfin_target::low_cannot_fetch_register): ...this.
1692 (bfin_cannot_store_register): Turn into...
1693 (bfin_target::low_cannot_store_register): ...this.
1694 (the_low_target): Remove the op fields.
1695 * linux-cris-low.cc (class cris_target)
1696 <low_cannot_fetch_register>
1697 <low_cannot_store_register>: Declare.
1698 (cris_cannot_fetch_register): Turn into...
1699 (cris_target::low_cannot_fetch_register): ...this.
1700 (cris_cannot_store_register): Turn into...
1701 (cris_target::low_cannot_store_register): ...this.
1702 (the_low_target): Remove the op fields.
1703 * linux-crisv32-low.cc (class crisv32_target)
1704 <low_cannot_fetch_register>
1705 <low_cannot_store_register>: Declare.
1706 (crisv32_target::low_cannot_fetch_register)
1707 (crisv32_target::low_cannot_store_register): Define.
1708 (the_low_target): Remove the op fields.
1709 * linux-ia64-low.cc (class ia64_target)
1710 <low_cannot_fetch_register>
1711 <low_cannot_store_register>: Declare.
1712 (ia64_cannot_fetch_register): Turn into...
1713 (ia64_target::low_cannot_fetch_register): ...this.
1714 (ia64_cannot_store_register): Turn into...
1715 (ia64_target::low_cannot_store_register): ...this.
1716 (the_low_target): Remove the op fields.
1717 * linux-m32r-low.cc (class m32r_target)
1718 <low_cannot_fetch_register>
1719 <low_cannot_store_register>: Declare.
1720 (m32r_cannot_fetch_register): Turn into...
1721 (m32r_target::low_cannot_fetch_register): ...this.
1722 (m32r_cannot_store_register): Turn into...
1723 (m32r_target::low_cannot_store_register): ...this.
1724 (the_low_target): Remove the op fields.
1725 * linux-m68k-low.cc (class m68k_target)
1726 <low_cannot_fetch_register>
1727 <low_cannot_store_register>: Declare.
1728 (m68k_cannot_fetch_register): Turn into...
1729 (m68k_target::low_cannot_fetch_register): ...this.
1730 (m68k_cannot_store_register): Turn into...
1731 (m68k_target::low_cannot_store_register): ...this.
1732 (the_low_target): Remove the op fields.
1733 * linux-mips-low.cc (class mips_target)
1734 <low_cannot_fetch_register>
1735 <low_cannot_store_register>: Declare.
1736 (mips_cannot_fetch_register): Turn into...
1737 (mips_target::low_cannot_fetch_register): ...this.
1738 (mips_cannot_store_register): Turn into...
1739 (mips_target::low_cannot_store_register): ...this.
1740 (get_usrregs_info): Inline at the call sites in
1741 low_cannot_fetch_register and low_cannot_store_register,
1742 and remove.
1743 (the_low_target): Remove the op fields.
1744 * linux-nios2-low.cc (class nios2_target)
1745 <low_cannot_fetch_register>
1746 <low_cannot_store_register>: Declare.
1747 (nios2_cannot_fetch_register): Turn into...
1748 (nios2_target::low_cannot_fetch_register): ...this.
1749 (nios2_cannot_store_register): Turn into...
1750 (nios2_target::low_cannot_store_register): ...this.
1751 (the_low_target): Remove the op fields.
1752 * linux-ppc-low.cc (class ppc_target)
1753 <low_cannot_fetch_register>
1754 <low_cannot_store_register>: Declare.
1755 (ppc_cannot_fetch_register): Turn into...
1756 (ppc_target::low_cannot_fetch_register): ...this.
1757 (ppc_cannot_store_register): Turn into...
1758 (ppc_target::low_cannot_store_register): ...this.
1759 (the_low_target): Remove the op fields.
1760 * linux-riscv-low.cc (class riscv_target)
1761 <low_cannot_fetch_register>
1762 <low_cannot_store_register>: Declare.
1763 (riscv_target::low_cannot_fetch_register)
1764 (riscv_target::low_cannot_store_register): Define.
1765 (the_low_target): Remove the op fields.
1766 * linux-s390-low.cc (class s390_target)
1767 <low_cannot_fetch_register>
1768 <low_cannot_store_register>: Declare.
1769 (s390_cannot_fetch_register): Turn into...
1770 (s390_target::low_cannot_fetch_register): ...this.
1771 (s390_cannot_store_register): Turn into...
1772 (s390_target::low_cannot_store_register): ...this.
1773 (the_low_target): Remove the op fields.
1774 * linux-sh-low.cc (class sh_target)
1775 <low_cannot_fetch_register>
1776 <low_cannot_store_register>: Declare.
1777 (sh_cannot_fetch_register): Turn into...
1778 (sh_target::low_cannot_fetch_register): ...this.
1779 (sh_cannot_store_register): Turn into...
1780 (sh_target::low_cannot_store_register): ...this.
1781 (the_low_target): Remove the op fields.
1782 * linux-sparc-low.cc (class sparc_target)
1783 <low_cannot_fetch_register>
1784 <low_cannot_store_register>: Declare.
1785 (sparc_cannot_fetch_register): Turn into...
1786 (sparc_target::low_cannot_fetch_register): ...this.
1787 (sparc_cannot_store_register): Turn into...
1788 (sparc_target::low_cannot_store_register): ...this.
1789 (the_low_target): Remove the op fields.
1790 * linux-tic6x-low.cc (class tic6x_target)
1791 <low_cannot_fetch_register>
1792 <low_cannot_store_register>: Declare.
1793 (tic6x_cannot_fetch_register): Turn into...
1794 (tic6x_target::low_cannot_fetch_register): ...this.
1795 (tic6x_cannot_store_register): Turn into...
1796 (tic6x_target::low_cannot_store_register): ...this.
1797 (the_low_target): Remove the op fields.
1798 * linux-tile-low.cc (class tile_target)
1799 <low_cannot_fetch_register>
1800 <low_cannot_store_register>: Declare.
1801 (tile_cannot_fetch_register): Turn into...
1802 (tile_target::low_cannot_fetch_register): ...this.
1803 (tile_cannot_store_register): Turn into...
1804 (tile_target::low_cannot_store_register): ...this.
1805 (the_low_target): Remove the op fields.
1806 * linux-xtensa-low.cc (class xtensa_target)
1807 <low_cannot_fetch_register>
1808 <low_cannot_store_register>: Declare.
1809 (xtensa_target::low_cannot_fetch_register)
1810 (xtensa_target::low_cannot_store_register): Define.
1811 (the_low_target): Remove the op fields.
1812
1813 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1814
1815 Turn the 'regs_info' linux target op into a method of
1816 linux_process_target.
1817
1818 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1819 (class linux_process_target) <get_regs_info>: Define.
1820
1821 Update the callers below.
1822
1823 * linux-low.cc (linux_process_target::fetch_registers)
1824 (linux_process_target::store_registers)
1825 * proc-service.cc (gregset_info)
1826
1827 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1828 (x86_linux_regs_info): Turn into ...
1829 (x86_target::get_regs_info): ...this.
1830 (the_low_target): Remove the op field.
1831 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1832 Declare.
1833 (aarch64_regs_info): Turn into ...
1834 (aarch64_target::get_regs_info): ...this.
1835 (the_low_target): Remove the op field.
1836 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1837 (arm_regs_info): Turn into ...
1838 (arm_target::get_regs_info): ...this.
1839 (the_low_target): Remove the op field.
1840 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1841 (bfin_regs_info): Turn into ...
1842 (bfin_target::get_regs_info): ...this.
1843 (the_low_target): Remove the op field.
1844 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1845 (cris_regs_info): Turn into ...
1846 (cris_target::get_regs_info): ...this.
1847 (the_low_target): Remove the op field.
1848 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1849 Declare.
1850 (crisv32_regs_info): Turn into ...
1851 (crisv32_target::get_regs_info): ...this.
1852 (the_low_target): Remove the op field.
1853 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1854 (ia64_regs_info): Turn into ...
1855 (ia64_target::get_regs_info): ...this.
1856 (the_low_target): Remove the op field.
1857 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1858 (m32r_regs_info): Turn into ...
1859 (m32r_target::get_regs_info): ...this.
1860 (the_low_target): Remove the op field.
1861 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1862 (m68k_regs_info): Turn into ...
1863 (m68k_target::get_regs_info): ...this.
1864 (the_low_target): Remove the op field.
1865 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1866 (mips_regs_info): Turn into ...
1867 (mips_target::get_regs_info): ...this.
1868 (the_low_target): Remove the op field.
1869 (get_usrregs_info): Update the call to the op.
1870 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1871 (nios2_regs_info): Turn into ...
1872 (nios2_target::get_regs_info): ...this.
1873 (the_low_target): Remove the op field.
1874 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1875 (ppc_regs_info): Turn into ...
1876 (ppc_target::get_regs_info): ...this.
1877 (the_low_target): Remove the op field.
1878 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1879 (riscv_regs_info): Turn into ...
1880 (riscv_target::get_regs_info): ...this.
1881 (the_low_target): Remove the op field.
1882 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1883 (s390_regs_info): Turn into ...
1884 (s390_target::get_regs_info): ...this.
1885 (the_low_target): Remove the op field.
1886 (s390_collect_ptrace_register)
1887 (s390_supply_ptrace_register)
1888 (s390_fill_gregset): Update the call to the op.
1889 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1890 (sh_regs_info): Turn into ...
1891 (sh_target::get_regs_info): ...this.
1892 (the_low_target): Remove the op field.
1893 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1894 (sparc_regs_info): Turn into ...
1895 (sparc_target::get_regs_info): ...this.
1896 (the_low_target): Remove the op field.
1897 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1898 (tic6x_regs_info): Turn into ...
1899 (tic6x_target::get_regs_info): ...this.
1900 (the_low_target): Remove the op field.
1901 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1902 (tile_regs_info): Turn into ...
1903 (tile_target::get_regs_info): ...this.
1904 (the_low_target): Remove the op field.
1905 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1906 Declare.
1907 (xtensa_regs_info): Turn into ...
1908 (xtensa_target::get_regs_info): ...this.
1909 (the_low_target): Remove the op field.
1910
1911 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1912
1913 Turn the 'arch_setup' linux target op into a method of
1914 linux_process_target.
1915
1916 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1917 (class linux_process_target) <arch_setup_thread>
1918 <low_arch_setup>: New declarations.
1919 * linux-low.cc (linux_arch_setup): Delete.
1920 (linux_arch_setup_thread): Turn into...
1921 (linux_process_target::arch_setup_thread): ... this.
1922
1923 Update the callers below.
1924
1925 (linux_process_target::handle_extended_wait)
1926 (linux_process_target::post_create_inferior)
1927 (linux_process_target::filter_event)
1928
1929 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1930 declaration.
1931 (x86_linux_update_xmltarget): Turn into...
1932 (x86_target::update_xmltarget): ...this.
1933 (x86_linux_process_qsupported): Update the call to
1934 x86_linux_update_xmltarget.
1935 (x86_arch_setup): Turn into ...
1936 (x86_target::low_arch_setup): ...this.
1937 (the_low_target): Remove the op field.
1938 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1939 declaration.
1940 (aarch64_arch_setup): Turn into ...
1941 (aarch64_target::low_arch_setup): ...this.
1942 (the_low_target): Remove the op field.
1943 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1944 declaration.
1945 (arm_arch_setup): Turn into ...
1946 (arm_target::low_arch_setup): ...this.
1947 (the_low_target): Remove the op field.
1948 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1949 declaration.
1950 (bfin_arch_setup): Turn into ...
1951 (bfin_target::low_arch_setup): ...this.
1952 (the_low_target): Remove the op field.
1953 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1954 declaration.
1955 (cris_arch_setup): Turn into ...
1956 (cris_target::low_arch_setup): ...this.
1957 (the_low_target): Remove the op field.
1958 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1959 declaration.
1960 (crisv32_arch_setup): Turn into ...
1961 (crisv32_target::low_arch_setup): ...this.
1962 (the_low_target): Remove the op field.
1963 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1964 declaration.
1965 (ia64_arch_setup): Turn into ...
1966 (ia64_target::low_arch_setup): ...this.
1967 (the_low_target): Remove the op field.
1968 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1969 declaration.
1970 (m32r_arch_setup): Turn into ...
1971 (m32r_target::low_arch_setup): ...this.
1972 (the_low_target): Remove the op field.
1973 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1974 declaration.
1975 (m68k_arch_setup): Turn into ...
1976 (m68k_target::low_arch_setup): ...this.
1977 (the_low_target): Remove the op field.
1978 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1979 declaration.
1980 (mips_arch_setup): Turn into ...
1981 (mips_target::low_arch_setup): ...this.
1982 (the_low_target): Remove the op field.
1983 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1984 declaration.
1985 (nios2_arch_setup): Turn into ...
1986 (nios2_target::low_arch_setup): ...this.
1987 (the_low_target): Remove the op field.
1988 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1989 declaration.
1990 (ppc_arch_setup): Turn into ...
1991 (ppc_target::low_arch_setup): ...this.
1992 (the_low_target): Remove the op field.
1993 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
1994 declaration.
1995 (riscv_arch_setup): Turn into ...
1996 (riscv_target::low_arch_setup): ...this.
1997 (the_low_target): Remove the op field.
1998 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
1999 declaration.
2000 (s390_arch_setup): Turn into ...
2001 (s390_target::low_arch_setup): ...this.
2002 (the_low_target): Remove the op field.
2003 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2004 declaration.
2005 (sh_arch_setup): Turn into ...
2006 (sh_target::low_arch_setup): ...this.
2007 (the_low_target): Remove the op field.
2008 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2009 declaration.
2010 (sparc_arch_setup): Turn into ...
2011 (sparc_target::low_arch_setup): ...this.
2012 (the_low_target): Remove the op field.
2013 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2014 declaration.
2015 (tic6x_arch_setup): Turn into ...
2016 (tic6x_target::low_arch_setup): ...this.
2017 (the_low_target): Remove the op field.
2018 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2019 declaration.
2020 (tile_arch_setup): Turn into ...
2021 (tile_target::low_arch_setup): ...this.
2022 (the_low_target): Remove the op field.
2023 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2024 declaration.
2025 (xtensa_arch_setup): Turn into ...
2026 (xtensa_target::low_arch_setup): ...this.
2027 (the_low_target): Remove the op field.
2028
2029 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2030
2031 * linux-low.h (the_linux_target): New extern declaration.
2032 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2033 'the_target'.
2034 (the_linux_target): Remove.
2035 * linux-x86-low.cc (class x86_target): New class.
2036 (the_x86_target): New static object.
2037 (the_linux_target): Define as pointer to the_x86_target.
2038 * linux-aarch64-low.cc (class aarch64_target): New class.
2039 (the_aarch64_target): New static object.
2040 (the_linux_target): Define as pointer to the_aarch64_target.
2041 * linux-arm-low.cc (class arm_target): New class.
2042 (the_arm_target): New static object.
2043 (the_linux_target): Define as pointer to the_arm_target.
2044 * linux-bfin-low.cc (class bfin_target): New class.
2045 (the_bfin_target): New static object.
2046 (the_linux_target): Define as pointer to the_bfin_target.
2047 * linux-cris-low.cc (class cris_target): New class.
2048 (the_cris_target): New static object.
2049 (the_linux_target): Define as pointer to the_cris_target.
2050 * linux-crisv32-low.cc (class crisv32_target): New class.
2051 (the_crisv32_target): New static object.
2052 (the_linux_target): Define as pointer to the_crisv32_target.
2053 * linux-ia64-low.cc (class ia64_target): New class.
2054 (the_ia64_target): New static object.
2055 (the_linux_target): Define as pointer to the_ia64_target.
2056 * linux-m32r-low.cc (class m32r_target): New class.
2057 (the_m32r_target): New static object.
2058 (the_linux_target): Define as pointer to the_m32r_target.
2059 * linux-m68k-low.cc (class m68k_target): New class.
2060 (the_m68k_target): New static object.
2061 (the_linux_target): Define as pointer to the_m68k_target.
2062 * linux-mips-low.cc (class mips_target): New class.
2063 (the_mips_target): New static object.
2064 (the_linux_target): Define as pointer to the_mips_target.
2065 * linux-nios2-low.cc (class nios2_target): New class.
2066 (the_nios2_target): New static object.
2067 (the_linux_target): Define as pointer to the_nios2_target.
2068 * linux-ppc-low.cc (class ppc_target): New class.
2069 (the_ppc_target): New static object.
2070 (the_linux_target): Define as pointer to the_ppc_target.
2071 * linux-riscv-low.cc (class riscv_target): New class.
2072 (the_riscv_target): New static object.
2073 (the_linux_target): Define as pointer to the_riscv_target.
2074 * linux-s390-low.cc (class s390_target): New class.
2075 (the_s390_target): New static object.
2076 (the_linux_target): Define as pointer to the_s390_target.
2077 * linux-sh-low.cc (class sh_target): New class.
2078 (the_sh_target): New static object.
2079 (the_linux_target): Define as pointer to the_sh_target.
2080 * linux-sparc-low.cc (class sparc_target): New class.
2081 (the_sparc_target): New static object.
2082 (the_linux_target): Define as pointer to the_sparc_target.
2083 * linux-tic6x-low.cc (class tic6x_target): New class.
2084 (the_tic6x_target): New static object.
2085 (the_linux_target): Define as pointer to the_tic6x_target.
2086 * linux-tile-low.cc (class tile_target): New class.
2087 (the_tile_target): New static object.
2088 (the_linux_target): Define as pointer to the_tile_target.
2089 * linux-xtensa-low.cc (class xtensa_target): New class.
2090 (the_xtensa_target): New static object.
2091 (the_linux_target): Define as pointer to the_xtensa_target.
2092
2093 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2094
2095 Turn some static functions in linux-low.cc into private methods of
2096 linux_process_target.
2097
2098 * linux-low.cc (handle_extended_wait): Turn into ...
2099 (linux_process_target::handle_extended_wait): ...this. Call
2100 'mourn' on 'this' object instead of 'the_target'.
2101 (maybe_move_out_of_jump_pad): Turn into...
2102 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2103 (linux_low_filter_event): Turn into...
2104 (linux_process_target::filter_event): ...this.
2105 (linux_wait_for_event_filtered): Turn into...
2106 (linux_process_target::wait_for_event_filtered): ...this.
2107 (linux_wait_for_event): Turn into...
2108 (linux_process_target::wait_for_event): ...this.
2109 (linux_wait_1): Turn into...
2110 (linux_process_target::wait_1): ...this.
2111 (wait_for_sigstop): Turn into...
2112 (linux_process_target::wait_for_sigstop): ...this.
2113 (move_out_of_jump_pad_callback): Turn into...
2114 (linux_process_target::move_out_of_jump_pad): ...this.
2115 (stop_all_lwps): Turn into...
2116 (linux_process_target::stop_all_lwps): ...this.
2117 (start_step_over): Turn into...
2118 (linux_process_target::start_step_over): ...this.
2119 (complete_ongoing_step_over): Turn into...
2120 (linux_process_target::complete_ongoing_step_over): ...this.
2121 (proceed_all_lwps): Turn into...
2122 (linux_process_target::proceed_all_lwps): ...this.
2123 (unstop_all_lwps): Turn into...
2124 (linux_process_target::unstop_all_lwps): ...this.
2125
2126 * linux-low.h (class linux_process_target)
2127 <handle_extended_wait>
2128 <maybe_move_out_of_jump_pad>
2129 filter_event>
2130 <wait_for_event_filtered>
2131 <wait_for_event>
2132 <wait_1>
2133 <wait_for_sigstop>
2134 <move_out_of_jump_pad>
2135 <stop_all_lwps>
2136 <start_step_over>
2137 <complete_ongoing_step_over>
2138 <proceed_all_lwps>
2139 <unstop_all_lwps>: Declare.
2140
2141 Update the callers below.
2142
2143 * linux-low.cc (linux_process_target::attach): Update.
2144 (linux_process_target::stabilize_threads): Ditto.
2145 (linux_process_target::wait): Ditto.
2146
2147 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2148
2149 * linux-low.h (struct linux_target_ops): Update the comment for
2150 'cannot_store_register' to return 0 or 1.
2151 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2152 of 2.
2153
2154 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2155
2156 * config.in: Re-generate.
2157 * configure: Re-generate.
2158
2159 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2160
2161 * regcache.cc (find_register_by_number): Update.
2162 * tdesc.cc (init_target_desc): Likewise.
2163 * tdesc.h (target_desc::reg_defs): Likewise.
2164
2165 2020-03-12 Tom Tromey <tom@tromey.com>
2166
2167 * configure: Rebuild.
2168 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2169 (WIN32APILIBS): New subst.
2170 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2171 gdbsupport files.
2172 (gdbsupport/%.o): Remove target.
2173 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2174 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2175 (WIN32APILIBS): New variable.
2176 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2177 (gdbreplay$(EXEEXT)): Likewise.
2178
2179 2020-03-12 Tom Tromey <tom@tromey.com>
2180
2181 * config.in, configure: Rebuild.
2182 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2183 * acinclude.m4: Include gettext-sister.m4.
2184 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2185 variables.
2186 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2187 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2188
2189 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2190
2191 * acinclude.m4: Update path to selftest.m4.
2192
2193 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2194
2195 * configure.ac: Don't source bfd/development.sh, move
2196 GDB_AC_COMMON higher.
2197 * configure: Re-generate.
2198
2199 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2200
2201 * configure: Re-generate.
2202
2203 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2204
2205 * configure: Re-generate.
2206
2207 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2208
2209 * .dir-locals.el: New file.
2210
2211 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2212
2213 * .gitattributes: New file.
2214
2215 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2216
2217 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2218 reply into an S reply.
2219 * server.cc (disable_packet_T): New global.
2220 (captured_main): Set new global when appropriate.
2221 * server.h (disable_packet_T): Declare.
2222
2223 2020-02-21 Tom Tromey <tom@tromey.com>
2224
2225 * Makefile.in (mostlyclean): New target.
2226
2227 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2228
2229 * target.h (struct process_stratum_target): Remove.
2230 (class process_target): Rename to ...
2231 (class process_stratum_target): ... this.
2232 * linux-low.h (class linux_process_target): Derive from
2233 'process_stratum_target'.
2234 * linux-low.cc (linux_target_ops): Remove.
2235 (initialize_low): Set the_target to the singleton instance of
2236 linux_process_target.
2237 * lynx-low.h (class lynx_process_target): Derive from
2238 'process_stratum_target'.
2239 * lynx-low.cc (lynx_target_ops): Remove.
2240 (initialize_low): Set the_target to the singleton instance of
2241 lynx_process_target.
2242 * nto-low.h (class nto_process_target): Derive from
2243 'process_stratum_target'.
2244 * nto-low.cc (nto_target_ops): Remove.
2245 (initialize_low): Set the_target to the singleton instance of
2246 nto_process_target.
2247 * win32-low.h (class win32_process_target): Derive from
2248 'process_stratum_target'.
2249 * win32-low.cc (win32_target_ops): Remove.
2250 (initialize_low): Set the_target to the singleton instance of
2251 win32_process_target.
2252
2253 Replace 'the_target->pt' with 'the_target' in the uses below.
2254
2255 * hostio.cc (hostio_error)
2256 (handle_setfs)
2257 (handle_open)
2258 (handle_unlink)
2259 (handle_readlink)
2260 * linux-aarch32-low.cc (arm_breakpoint_at)
2261 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2262 * linux-arm-low.cc (arm_sigreturn_next_pc)
2263 (arm_get_hwcap)
2264 (arm_get_syscall_trapinfo)
2265 * linux-cris-low.cc (cris_breakpoint_at)
2266 * linux-crisv32-low.cc (cris_breakpoint_at)
2267 * linux-low.cc (handle_extended_wait)
2268 (linux_wait_1)
2269 (linux_read_memory)
2270 (linux_process_target::breakpoint_kind_from_pc)
2271 (linux_get_auxv)
2272 * linux-m32r-low.cc (m32r_breakpoint_at)
2273 * linux-mips-low.cc (mips_breakpoint_at)
2274 * linux-nios2-low.cc (nios2_breakpoint_at)
2275 * linux-ppc-low.cc (ppc_breakpoint_at)
2276 * linux-s390-low.cc (s390_get_hwcap)
2277 * linux-sh-low.cc (sh_breakpoint_at)
2278 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2279 (sparc_store_gregset_from_stack)
2280 (sparc_breakpoint_at)
2281 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2282 * linux-tile-low.cc (tile_breakpoint_at)
2283 * linux-x86-low.cc (x86_breakpoint_at)
2284 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2285 * mem-break.cc (bp_size)
2286 (bp_opcode)
2287 (insert_memory_breakpoint)
2288 (set_raw_breakpoint_at)
2289 (delete_raw_breakpoint)
2290 (z_type_supported)
2291 (uninsert_raw_breakpoint)
2292 (reinsert_raw_breakpoint)
2293 (validate_inserted_breakpoint)
2294 * regcache.cc (regcache_read_pc)
2295 (regcache_write_pc)
2296 * remote-utils.cc (putpkt_binary_1)
2297 (input_interrupt)
2298 (getpkt)
2299 (prepare_resume_reply)
2300 * server.cc (handle_general_set)
2301 (handle_detach)
2302 (handle_qxfer_auxv)
2303 (handle_qxfer_exec_file)
2304 (handle_qxfer_libraries_svr4)
2305 (handle_qxfer_osdata)
2306 (handle_qxfer_siginfo)
2307 (handle_qxfer_fdpic)
2308 (handle_query)
2309 (resume)
2310 (handle_v_requests)
2311 (queue_stop_reply_callback)
2312 (captured_main)
2313 * target.cc (prepare_to_access_memory)
2314 (done_accessing_memory)
2315 (read_inferior_memory)
2316 (target_write_memory)
2317 (target_stop_and_wait)
2318 (target_wait)
2319 (target_mourn_inferior)
2320 (target_continue_no_signal)
2321 (target_continue)
2322 (target_supports_multi_process)
2323 (kill_inferior)
2324 * target.h
2325 (target_create_inferior)
2326 (target_post_create_inferior)
2327 (myattach)
2328 (target_supports_fork_events)
2329 (target_supports_vfork_events)
2330 (target_supports_exec_events)
2331 (target_handle_new_gdb_connection)
2332 (detach_inferior)
2333 (mythread_alive)
2334 (fetch_inferior_registers)
2335 (store_inferior_registers)
2336 (join_inferior)
2337 (target_supports_non_stop)
2338 (target_async)
2339 (target_process_qsupported)
2340 (target_supports_catch_syscall)
2341 (target_get_ipa_tdesc_idx)
2342 (target_supports_tracepoints)
2343 (target_supports_fast_tracepoints)
2344 (target_get_min_fast_tracepoint_insn_len)
2345 (target_thread_stopped)
2346 (target_pause_all)
2347 (target_unpause_all)
2348 (target_stabilize_threads)
2349 (target_install_fast_tracepoint_jump_pad)
2350 (target_emit_ops)
2351 (target_supports_disable_randomization)
2352 (target_supports_agent)
2353 (target_enable_btrace)
2354 (target_disable_btrace)
2355 (target_read_btrace)
2356 (target_read_btrace_conf)
2357 (target_supports_range_stepping)
2358 (target_supports_stopped_by_sw_breakpoint)
2359 (target_stopped_by_sw_breakpoint)
2360 (target_supports_stopped_by_hw_breakpoint)
2361 (target_supports_hardware_single_step)
2362 (target_stopped_by_hw_breakpoint)
2363 (target_breakpoint_kind_from_pc)
2364 (target_breakpoint_kind_from_current_state)
2365 (target_supports_software_single_step)
2366 (target_core_of_thread)
2367 (target_thread_name)
2368 (target_thread_handle)
2369 * win32-low.cc (do_initial_child_stuff)
2370
2371 Rename target op default definitions listed below.
2372
2373 * target.cc (process_target::post_create_inferior): Rename as ...
2374 (process_stratum_target::post_create_inferior): ... this.
2375 (process_target::prepare_to_access_memory): Rename as ...
2376 (process_stratum_target::prepare_to_access_memory): ... this.
2377 (process_target::done_accessing_memory): Rename as ...
2378 (process_stratum_target::done_accessing_memory): ... this.
2379 (process_target::look_up_symbols): Rename as ...
2380 (process_stratum_target::look_up_symbols): ... this.
2381 (process_target::supports_read_auxv): Rename as ...
2382 (process_stratum_target::supports_read_auxv): ... this.
2383 (process_target::read_auxv): Rename as ...
2384 (process_stratum_target::read_auxv): ... this.
2385 (process_target::supports_z_point_type): Rename as ...
2386 (process_stratum_target::supports_z_point_type): ... this.
2387 (process_target::insert_point): Rename as ...
2388 (process_stratum_target::insert_point): ... this.
2389 (process_target::remove_point): Rename as ...
2390 (process_stratum_target::remove_point): ... this.
2391 (process_target::stopped_by_sw_breakpoint): Rename as ...
2392 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2393 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2394 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2395 (process_target::stopped_by_hw_breakpoint): Rename as ...
2396 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2397 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2398 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2399 (process_target::supports_hardware_single_step): Rename as ...
2400 (process_stratum_target::supports_hardware_single_step): ... this.
2401 (process_target::stopped_by_watchpoint): Rename as ...
2402 (process_stratum_target::stopped_by_watchpoint): ... this.
2403 (process_target::stopped_data_address): Rename as ...
2404 (process_stratum_target::stopped_data_address): ... this.
2405 (process_target::supports_read_offsets): Rename as ...
2406 (process_stratum_target::supports_read_offsets): ... this.
2407 (process_target::read_offsets): Rename as ...
2408 (process_stratum_target::read_offsets): ... this.
2409 (process_target::supports_get_tls_address): Rename as ...
2410 (process_stratum_target::supports_get_tls_address): ... this.
2411 (process_target::get_tls_address): Rename as ...
2412 (process_stratum_target::get_tls_address): ... this.
2413 (process_target::hostio_last_error): Rename as ...
2414 (process_stratum_target::hostio_last_error): ... this.
2415 (process_target::supports_qxfer_osdata): Rename as ...
2416 (process_stratum_target::supports_qxfer_osdata): ... this.
2417 (process_target::qxfer_osdata): Rename as ...
2418 (process_stratum_target::qxfer_osdata): ... this.
2419 (process_target::supports_qxfer_siginfo): Rename as ...
2420 (process_stratum_target::supports_qxfer_siginfo): ... this.
2421 (process_target::qxfer_siginfo): Rename as ...
2422 (process_stratum_target::qxfer_siginfo): ... this.
2423 (process_target::supports_non_stop): Rename as ...
2424 (process_stratum_target::supports_non_stop): ... this.
2425 (process_target::async): Rename as ...
2426 (process_stratum_target::async): ... this.
2427 (process_target::start_non_stop): Rename as ...
2428 (process_stratum_target::start_non_stop): ... this.
2429 (process_target::supports_multi_process): Rename as ...
2430 (process_stratum_target::supports_multi_process): ... this.
2431 (process_target::supports_fork_events): Rename as ...
2432 (process_stratum_target::supports_fork_events): ... this.
2433 (process_target::supports_vfork_events): Rename as ...
2434 (process_stratum_target::supports_vfork_events): ... this.
2435 (process_target::supports_exec_events): Rename as ...
2436 (process_stratum_target::supports_exec_events): ... this.
2437 (process_target::handle_new_gdb_connection): Rename as ...
2438 (process_stratum_target::handle_new_gdb_connection): ... this.
2439 (process_target::handle_monitor_command): Rename as ...
2440 (process_stratum_target::handle_monitor_command): ... this.
2441 (process_target::core_of_thread): Rename as ...
2442 (process_stratum_target::core_of_thread): ... this.
2443 (process_target::supports_read_loadmap): Rename as ...
2444 (process_stratum_target::supports_read_loadmap): ... this.
2445 (process_target::read_loadmap): Rename as ...
2446 (process_stratum_target::read_loadmap): ... this.
2447 (process_target::process_qsupported): Rename as ...
2448 (process_stratum_target::process_qsupported): ... this.
2449 (process_target::supports_tracepoints): Rename as ...
2450 (process_stratum_target::supports_tracepoints): ... this.
2451 (process_target::read_pc): Rename as ...
2452 (process_stratum_target::read_pc): ... this.
2453 (process_target::write_pc): Rename as ...
2454 (process_stratum_target::write_pc): ... this.
2455 (process_target::supports_thread_stopped): Rename as ...
2456 (process_stratum_target::supports_thread_stopped): ... this.
2457 (process_target::thread_stopped): Rename as ...
2458 (process_stratum_target::thread_stopped): ... this.
2459 (process_target::supports_get_tib_address): Rename as ...
2460 (process_stratum_target::supports_get_tib_address): ... this.
2461 (process_target::get_tib_address): Rename as ...
2462 (process_stratum_target::get_tib_address): ... this.
2463 (process_target::pause_all): Rename as ...
2464 (process_stratum_target::pause_all): ... this.
2465 (process_target::unpause_all): Rename as ...
2466 (process_stratum_target::unpause_all): ... this.
2467 (process_target::stabilize_threads): Rename as ...
2468 (process_stratum_target::stabilize_threads): ... this.
2469 (process_target::supports_fast_tracepoints): Rename as ...
2470 (process_stratum_target::supports_fast_tracepoints): ... this.
2471 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2472 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2473 (process_target::emit_ops): Rename as ...
2474 (process_stratum_target::emit_ops): ... this.
2475 (process_target::supports_disable_randomization): Rename as ...
2476 (process_stratum_target::supports_disable_randomization): ... this.
2477 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2478 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2479 (process_target::qxfer_libraries_svr4): Rename as ...
2480 (process_stratum_target::qxfer_libraries_svr4): ... this.
2481 (process_target::supports_agent): Rename as ...
2482 (process_stratum_target::supports_agent): ... this.
2483 (process_target::enable_btrace): Rename as ...
2484 (process_stratum_target::enable_btrace): ... this.
2485 (process_target::disable_btrace): Rename as ...
2486 (process_stratum_target::disable_btrace): ... this.
2487 (process_target::read_btrace): Rename as ...
2488 (process_stratum_target::read_btrace): ... this.
2489 (process_target::read_btrace_conf): Rename as ...
2490 (process_stratum_target::read_btrace_conf): ... this.
2491 (process_target::supports_range_stepping): Rename as ...
2492 (process_stratum_target::supports_range_stepping): ... this.
2493 (process_target::supports_pid_to_exec_file): Rename as ...
2494 (process_stratum_target::supports_pid_to_exec_file): ... this.
2495 (process_target::pid_to_exec_file): Rename as ...
2496 (process_stratum_target::pid_to_exec_file): ... this.
2497 (process_target::supports_multifs): Rename as ...
2498 (process_stratum_target::supports_multifs): ... this.
2499 (process_target::multifs_open): Rename as ...
2500 (process_stratum_target::multifs_open): ... this.
2501 (process_target::multifs_unlink): Rename as ...
2502 (process_stratum_target::multifs_unlink): ... this.
2503 (process_target::multifs_readlink): Rename as ...
2504 (process_stratum_target::multifs_readlink): ... this.
2505 (process_target::breakpoint_kind_from_pc): Rename as ...
2506 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2507 (process_target::breakpoint_kind_from_current_state): Rename as ...
2508 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2509 (process_target::thread_name): Rename as ...
2510 (process_stratum_target::thread_name): ... this.
2511 (process_target::thread_handle): Rename as ...
2512 (process_stratum_target::thread_handle): ... this.
2513 (process_target::supports_software_single_step): Rename as ...
2514 (process_stratum_target::supports_software_single_step): ... this.
2515 (process_target::supports_catch_syscall): Rename as ...
2516 (process_stratum_target::supports_catch_syscall): ... this.
2517 (process_target::get_ipa_tdesc_idx): Rename as ...
2518 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2519
2520 2020-02-20 Pedro Alves <palves@redhat.com>
2521
2522 * target.cc (set_target_ops): Simply copy the given target pointer
2523 instead of creating a copy of the pointed object.
2524
2525 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2526
2527 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2528 of process_target.
2529
2530 * target.h (struct process_stratum_target): Remove the target op.
2531 (class process_target): Add the target op.
2532 (target_get_ipa_tdesc_idx): Update the macro.
2533 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2534
2535 Update the derived classes and callers below.
2536
2537 * linux-low.cc (linux_target_ops): Update.
2538 (linux_get_ipa_tdesc_idx): Turn into ...
2539 (linux_process_target::get_ipa_tdesc_idx): ... this.
2540 * linux-low.h (class linux_process_target): Update.
2541 * lynx-low.cc (lynx_target_ops): Update.
2542 * nto-low.cc (nto_target_ops): Update.
2543 * win32-low.cc (win32_target_ops): Update.
2544
2545 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2546
2547 Turn process_stratum_target's supports_catch_syscall op into a
2548 method of process_target.
2549
2550 * target.h (struct process_stratum_target): Remove the target op.
2551 (class process_target): Add the target op.
2552 (target_supports_catch_syscall): Update the macro.
2553 * target.cc (process_target::supports_catch_syscall): Define.
2554
2555 Update the derived classes and callers below.
2556
2557 * linux-low.cc (linux_target_ops): Update.
2558 (linux_supports_catch_syscall): Turn into ...
2559 (linux_process_target::supports_catch_syscall): ... this.
2560 * linux-low.h (class linux_process_target): Update.
2561 * lynx-low.cc (lynx_target_ops): Update.
2562 * nto-low.cc (nto_target_ops): Update.
2563 * win32-low.cc (win32_target_ops): Update.
2564
2565 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2566
2567 Turn process_stratum_target's supports_software_single_step op
2568 into a method of process_target.
2569
2570 * target.h (struct process_stratum_target): Remove the target op.
2571 (class process_target): Add the target op.
2572 (target_supports_software_single_step): Update the macro.
2573 * target.cc (process_target::supports_software_single_step): Define.
2574
2575 Update the derived classes and callers below.
2576
2577 * linux-low.cc (linux_target_ops): Update.
2578 (linux_supports_software_single_step): Turn into ...
2579 (linux_process_target::supports_software_single_step): ... this.
2580 * linux-low.h (class linux_process_target): Update.
2581 * lynx-low.cc (lynx_target_ops): Update.
2582 * nto-low.cc (nto_target_ops): Update.
2583 * win32-low.cc (win32_target_ops): Update.
2584
2585 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2586
2587 Turn process_stratum_target's thread_name and thread_handle ops
2588 into methods of process_target.
2589
2590 * target.h (struct process_stratum_target): Remove the target ops.
2591 (class process_target): Add the target ops.
2592 (target_thread_name): Update the macro.
2593 (target_thread_handle): Update the macro.
2594 * target.cc (process_target::thread_name): Define.
2595 (process_target::thread_handle): Define.
2596
2597 Update the derived classes and callers below.
2598
2599 * linux-low.cc (linux_target_ops): Update.
2600 (linux_process_target::thread_name): Define.
2601 (linux_process_target::thread_handle): Define.
2602 * linux-low.h (class linux_process_target): Update.
2603 * lynx-low.cc (lynx_target_ops): Update.
2604 * nto-low.cc (nto_target_ops): Update.
2605 * win32-low.cc (win32_target_ops): Update.
2606
2607 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2608
2609 Turn process_stratum_target's breakpoint_kind_from_pc,
2610 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2611 ops into methods of process_target.
2612
2613 * target.h (struct process_stratum_target): Remove the target op.
2614 (class process_target): Add the target op.
2615 (target_breakpoint_kind_from_pc): Update the macro.
2616 (target_breakpoint_kind_from_current_state): Update the macro.
2617 (default_breakpoint_kind_from_pc): Remove declaration.
2618 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2619 (process_target::breakpoint_kind_from_pc): ... this.
2620 (process_target::breakpoint_kind_from_current_state): Define.
2621
2622 Update the derived classes and callers below.
2623
2624 * mem-break.cc (bp_size): Update.
2625 (bp_opcode): Update.
2626 * linux-low.cc (linux_target_ops): Update.
2627 (linux_wait_1): Update.
2628 (linux_breakpoint_kind_from_pc): Turn into ...
2629 (linux_process_target::breakpoint_kind_from_pc): ... this.
2630 (linux_sw_breakpoint_from_kind): Turn into ...
2631 (linux_process_target::sw_breakpoint_from_kind): ... this.
2632 (linux_breakpoint_kind_from_current_state): Turn into ...
2633 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2634 * linux-low.h (class linux_process_target): Update.
2635 * lynx-low.cc (lynx_target_ops): Update.
2636 (lynx_process_target::sw_breakpoint_from_kind): Define.
2637 * lynx-low.h (class lynx_process_target): Update.
2638 * nto-low.cc (nto_target_ops): Update.
2639 (nto_sw_breakpoint_from_kind): Turn into ...
2640 (nto_process_target::sw_breakpoint_from_kind): ... this.
2641 * nto-low.h (class nto_process_target): Update.
2642 * win32-low.cc (win32_target_ops): Update.
2643 (win32_sw_breakpoint_from_kind): Turn into ...
2644 (win32_process_target::sw_breakpoint_from_kind): ... this.
2645 * win32-low.h (class win32_process_target): Update.
2646
2647 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2648
2649 Turn process_stratum_target's multifs_open, multifs_readlink,
2650 multifs_unlink ops into methods of process_target.
2651
2652 * target.h (struct process_stratum_target): Remove the target ops.
2653 (class process_target): Add the target ops. Also add
2654 'supports_multifs'.
2655 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2656 "sys/stat.h".
2657 (process_target::supports_multifs): Define.
2658 (process_target::multifs_open): Define.
2659 (process_target::multifs_readlink): Define.
2660 (process_target::multifs_unlink): Define.
2661
2662 Update the derived classes and callers below.
2663
2664 * hostio.cc (handle_setfs): Update.
2665 (handle_open): Update.
2666 (handle_unlink): Update.
2667 (handle_readlink): Update.
2668 * linux-low.cc (linux_target_ops): Update.
2669 (linux_process_target::supports_multifs): Define.
2670 (linux_process_target::multifs_open): Define.
2671 (linux_process_target::multifs_readlink): Define.
2672 (linux_process_target::multifs_unlink): Define.
2673 * linux-low.h (class linux_process_target): Update.
2674 * lynx-low.cc (lynx_target_ops): Update.
2675 * nto-low.cc (nto_target_ops): Update.
2676 * win32-low.cc (win32_target_ops): Update.
2677
2678 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2679
2680 Turn process_stratum_target's pid_to_exec_file op into a method
2681 of process_target.
2682
2683 * target.h (struct process_stratum_target): Remove the target op.
2684 (class process_target): Add the target op. Also add
2685 'supports_pid_to_exec_file'.
2686 * target.cc (process_target::pid_to_exec_file): Define.
2687 (process_target::supports_pid_to_exec_file): Define.
2688
2689 Update the derived classes and callers below.
2690
2691 * server.cc (handle_qxfer_exec_file): Update.
2692 (handle_query): Update.
2693 * linux-low.cc (linux_target_ops): Update.
2694 (linux_process_target::supports_pid_to_exec_file): Define.
2695 (linux_process_target::pid_to_exec_file): Define.
2696 * linux-low.h (class linux_process_target): Update.
2697 * lynx-low.cc (lynx_target_ops): Update.
2698 * nto-low.cc (nto_target_ops): Update.
2699 * win32-low.cc (win32_target_ops): Update.
2700
2701 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2702
2703 Turn process_stratum_target's supports_range_stepping op into a
2704 method of process_target.
2705
2706 * target.h (struct process_stratum_target): Remove the target op.
2707 (class process_target): Add the target op.
2708 (target_supports_range_stepping): Update the macro.
2709 * target.cc (process_target::supports_range_stepping): Define.
2710
2711 Update the derived classes and callers below.
2712
2713 * linux-low.cc (linux_target_ops): Update.
2714 (linux_supports_range_stepping): Turn into ...
2715 (linux_process_target::supports_range_stepping): ... this.
2716 * linux-low.h (class linux_process_target): Update.
2717 * lynx-low.cc (lynx_target_ops): Update.
2718 * nto-low.cc (nto_target_ops): Update.
2719 * win32-low.cc (win32_target_ops): Update.
2720
2721 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2722
2723 Turn process_stratum_target's btrace-related ops (enable_btrace,
2724 disable_btrace, read_btrace, read_btrace_conf) into methods of
2725 process_target.
2726
2727 * target.h (struct process_stratum_target): Remove the target ops.
2728 (class process_target): Add the target ops.
2729 (target_enable_btrace): Update.
2730 (target_disable_btrace): Update.
2731 (target_read_btrace): Update.
2732 (target_read_btrace_conf): Update.
2733 * target.cc (process_target::enable_btrace): Define.
2734 (process_target::disable_btrace): Define.
2735 (process_target::read_btrace): Define.
2736 (process_target::read_btrace_conf): Define.
2737
2738 Update the derived classes and callers below.
2739
2740 * linux-low.cc (linux_target_ops): Update.
2741 (linux_process_target:enable_btrace): Define as a wrapper around
2742 linux_enable_btrace.
2743 (linux_low_disable_btrace): Turn into ...
2744 (linux_process_target::disable_btrace): ... this.
2745 (linux_low_read_btrace): Turn into ...
2746 (linux_process_target::read_btrace): ... this.
2747 (linux_low_btrace_conf): Turn into ...
2748 (linux_process_target::read_btrace_conf): ... this.
2749 * linux-low.h (class linux_process_target): Update.
2750 * lynx-low.cc (lynx_target_ops): Update.
2751 * nto-low.cc (nto_target_ops): Update.
2752 * win32-low.cc (win32_target_ops): Update.
2753
2754 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2755
2756 Turn process_stratum_target's supports_agent op into a method of
2757 process_target.
2758
2759 * target.h (struct process_stratum_target): Remove the target op.
2760 (class process_target): Add the target op.
2761 (target_supports_agent): Update the macro.
2762 * target.cc (process_target::supports_agent): Define.
2763
2764 Update the derived classes and callers below.
2765
2766 * linux-low.cc (linux_target_ops): Update.
2767 (linux_supports_agent): Turn into ...
2768 (linux_process_target::supports_agent): ... this.
2769 * linux-low.h (class linux_process_target): Update.
2770 * lynx-low.cc (lynx_target_ops): Update.
2771 * nto-low.cc (nto_target_ops): Update.
2772 * win32-low.cc (win32_target_ops): Update.
2773
2774 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2775
2776 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2777 method of process_target.
2778
2779 * target.h (struct process_stratum_target): Remove the target op.
2780 (class process_target): Add the target op. Also add
2781 'supports_qxfer_libraries_svr4'.
2782 * target.cc (process_target::qxfer_libraries_svr4): Define.
2783 (process_target::supports_qxfer_libraries_svr4): Define.
2784
2785 Update the derived classes and callers below.
2786
2787 * server.cc (handle_qxfer_libraries_svr4): Update.
2788 (handle_query): Update.
2789 * linux-low.cc (linux_target_ops): Update.
2790 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2791 (linux_qxfer_libraries_svr4): Turn into ...
2792 (linux_process_target::qxfer_libraries_svr4): ... this.
2793 * linux-low.h (class linux_process_target): Update.
2794 * lynx-low.cc (lynx_target_ops): Update.
2795 * nto-low.cc (nto_target_ops): Update.
2796 * win32-low.cc (win32_target_ops): Update.
2797
2798 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2799
2800 Turn process_stratum_target's supports_disable_randomization op
2801 into a method of process_target.
2802
2803 * target.h (struct process_stratum_target): Remove the target op.
2804 (class process_target): Add the target op.
2805 (target_supports_disable_randomization): Update the macro.
2806 * target.cc (process_target::supports_disable_randomization): Define.
2807
2808 Update the derived classes and callers below.
2809
2810 * linux-low.cc (linux_target_ops): Update.
2811 (linux_supports_disable_randomization): Turn into ...
2812 (linux_process_target::supports_disable_randomization): ... this.
2813 * linux-low.h (class linux_process_target): Update.
2814 * lynx-low.cc (lynx_target_ops): Update.
2815 * nto-low.cc (nto_target_ops): Update.
2816 * win32-low.cc (win32_target_ops): Update.
2817
2818 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2819
2820 Turn process_stratum_target's emit_ops op into a method of
2821 process_target.
2822
2823 * target.h (struct process_stratum_target): Remove the target op.
2824 (class process_target): Add the target op.
2825 (target_emit_ops): Update the macro.
2826 * target.cc (process_target::emit_ops): Define.
2827
2828 Update the derived classes and callers below.
2829
2830 * linux-low.cc (linux_target_ops): Update.
2831 (linux_emit_ops): Turn into ...
2832 (linux_process_target::emit_ops): ... this.
2833 * linux-low.h (class linux_process_target): Update.
2834 * lynx-low.cc (lynx_target_ops): Update.
2835 * nto-low.cc (nto_target_ops): Update.
2836 * win32-low.cc (win32_target_ops): Update.
2837
2838 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2839
2840 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2841 and get_min_fast_tracepoint_insn_len ops into methods of
2842 process_target.
2843
2844 * target.h (struct process_stratum_target): Remove the target ops.
2845 (class process_target): Add the target ops. Also add
2846 'supports_fast_tracepoints'.
2847 (target_supports_fast_tracepoints): Update the macro.
2848 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2849 (install_fast_tracepoint_jump_pad): Update and rename the macro
2850 to ...
2851 (target_install_fast_tracepoint_jump_pad): ... this.
2852 * target.cc (process_target::supports_fast_tracepoints): Define.
2853 (process_target::install_fast_tracepoint_jump_pad): Define.
2854 (process_target::get_min_fast_tracepoint_insn_len): Define.
2855
2856 Update the derived classes and callers below.
2857
2858 * tracepoint.cc (install_fast_tracepoint): Update.
2859 * linux-low.cc (linux_target_ops): Update.
2860 (linux_process_target::supports_fast_tracepoints): Define.
2861 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2862 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2863 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2864 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2865 * linux-low.h (class linux_process_target): Update.
2866 * lynx-low.cc (lynx_target_ops): Update.
2867 * nto-low.cc (nto_target_ops): Update.
2868 * win32-low.cc (win32_target_ops): Update.
2869
2870 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2871
2872 Turn process_stratum_target's stabilize_threads op into a
2873 method of process_target.
2874
2875 * target.h (struct process_stratum_target): Remove the target op.
2876 (class process_target): Add the target op.
2877 (target_stabilize_threads): Update the macro.
2878 * target.cc (process_target::stabilize_threads): Define.
2879
2880 Update the derived classes and callers below.
2881
2882 * server.cc (handle_status): Update.
2883 * tracepoint.cc (cmd_qtdp): Update.
2884 (cmd_qtstart): Update.
2885 * linux-low.cc (linux_target_ops): Update.
2886 (linux_stabilize_threads): Turn into ...
2887 (linux_process_target::stabilize_threads): ... this.
2888 (linux_wait_1): Update.
2889 * linux-low.h (class linux_process_target): Update.
2890 * lynx-low.cc (lynx_target_ops): Update.
2891 * nto-low.cc (nto_target_ops): Update.
2892 * win32-low.cc (win32_target_ops): Update.
2893
2894 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2895
2896 Turn process_stratum_target's pause_all and unpause_all ops
2897 into methods of process_target.
2898
2899 * target.h (struct process_stratum_target): Remove the target ops.
2900 (class process_target): Add the target ops.
2901 (pause_all): Update the macro and rename to...
2902 (target_pause_all): ... this.
2903 (unpause_all): Update the macro and rename to...
2904 (target_unpause_all): ... this.
2905 * target.cc (process_target::pause_all): Define.
2906 (process_target::unpause_all): Define.
2907
2908 Update the derived classes and callers below.
2909
2910 * server.cc (handle_status): Update.
2911 * tracepoint.cc (clear_installed_tracepoints): Update.
2912 (cmd_qtdp): Update.
2913 (cmd_qtstart): Update.
2914 (stop_tracing): Update.
2915 (cmd_qtstatus): Update.
2916 (upload_fast_traceframes): Update.
2917 (run_inferior_command): Update.
2918 * linux-low.cc (linux_target_ops): Update.
2919 (linux_pause_all): Turn into ...
2920 (linux_process_target::pause_all): ... this.
2921 (linux_unpause_all): Turn into ...
2922 (linux_process_target::unpause_all): ... this.
2923 (linux_process_target::prepare_to_access_memory): Update.
2924 (linux_process_target::done_accessing_memory): Update.
2925 * linux-low.h (class linux_process_target): Update.
2926 * lynx-low.cc (lynx_target_ops): Update.
2927 * nto-low.cc (nto_target_ops): Update.
2928 * win32-low.cc (win32_target_ops): Update.
2929
2930 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2931
2932 Turn process_stratum_target's get_tib_address op into a method of
2933 process_target.
2934
2935 * target.h (struct process_stratum_target): Remove the target op.
2936 (class process_target): Add the target op. Also add
2937 'supports_get_tib_address'.
2938 * target.cc (process_target::get_tib_address): Define.
2939 (process_target::supports_get_tib_address): Define.
2940
2941 Update the derived classes and callers below.
2942
2943 * server.cc (handle_query): Update.
2944 * linux-low.cc (win32_target_ops): Update.
2945 * lynx-low.cc (lynx_target_ops): Update.
2946 * nto-low.cc (nto_target_ops): Update.
2947 * win32-low.cc (win32_target_ops): Update.
2948 (win32_process_target::supports_get_tib_address): Define.
2949 (win32_get_tib_address): Turn into ...
2950 (win32_process_target::get_tib_address): ... this.
2951 * win32-low.h (class win32_process_target): Update.
2952
2953 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2954
2955 Turn process_stratum_target's thread_stopped op into a method of
2956 process_target.
2957
2958 * target.h (struct process_stratum_target): Remove the target op.
2959 (class process_target): Add the target op. Also add
2960 'supports_thread_stopped'.
2961 (target_thread_stopped): Update the macro.
2962 * target.cc (process_target::thread_stopped): Define.
2963 (process_target::supports_thread_stopped): Define.
2964 (prepare_to_access_memory): Update.
2965
2966 Update the derived classes and callers below.
2967
2968 * server.cc (queue_stop_reply_callback): Update.
2969 * linux-low.cc (linux_target_ops): Update.
2970 (linux_process_target::supports_thread_stopped): Define.
2971 (linux_thread_stopped): Turn into ...
2972 (linux_process_target::thread_stopped): ... this.
2973 * linux-low.h (class linux_process_target): Update.
2974 * lynx-low.cc (lynx_target_ops): Update.
2975 * nto-low.cc (nto_target_ops): Update.
2976 * win32-low.cc (win32_target_ops): Update.
2977
2978 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2979
2980 Turn process_stratum_target's read_pc and write_pc ops into
2981 methods of process_target.
2982
2983 * target.h (struct process_stratum_target): Remove the target ops.
2984 (class process_target): Add the target ops.
2985 * target.cc (process_target::read_pc): Define.
2986 (process_target::write_pc): Define.
2987
2988 Update the derived classes and callers below.
2989
2990 * regcache.cc (regcache_read_pc): Update.
2991 (regcache_write_pc): Update.
2992 * linux-low.cc (linux_target_ops): Update.
2993 (linux_read_pc): Turn into ...
2994 (linux_process_target::read_pc): ... this.
2995 (linux_write_pc): Turn into ...
2996 (linux_process_target::write_pc): ... this.
2997 * linux-low.h (class linux_process_target): Update.
2998 * lynx-low.cc (lynx_target_ops): Update.
2999 * nto-low.cc (nto_target_ops): Update.
3000 * win32-low.cc (win32_target_ops): Update.
3001
3002 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3003
3004 Turn process_stratum_target's supports_tracepoints op into a
3005 method of process_target.
3006
3007 * target.h (struct process_stratum_target): Remove the target op.
3008 (class process_target): Add the target op.
3009 (target_supports_tracepoints): Update the macro.
3010 * target.cc (process_target::supports_tracepoints): Define.
3011
3012 Update the derived classes and callers below.
3013
3014 * linux-low.cc (linux_target_ops): Update.
3015 (linux_supports_tracepoints): Turn into ...
3016 (linux_process_target::supports_tracepoints): ... this.
3017 * linux-low.h (class linux_process_target): Update.
3018 * lynx-low.cc (lynx_target_ops): Update.
3019 * nto-low.cc (nto_target_ops): Update.
3020 * win32-low.cc (win32_target_ops): Update.
3021
3022 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3023
3024 Turn process_stratum_target's process_qsupported op into a method
3025 of process_target.
3026
3027 * target.h (struct process_stratum_target): Remove the target op.
3028 (class process_target): Add the target op.
3029 (target_process_qsupported): Update the macro.
3030 * target.cc (process_target::process_qsupported): Define.
3031
3032 Update the derived classes and callers below.
3033
3034 * linux-low.cc (linux_target_ops): Update.
3035 (linux_process_qsupported): Turn into ...
3036 (linux_process_target::process_qsupported): ... this.
3037 * linux-low.h (class linux_process_target): Update.
3038 * lynx-low.cc (lynx_target_ops): Update.
3039 * nto-low.cc (nto_target_ops): Update.
3040 * win32-low.cc (win32_target_ops): Update.
3041
3042 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3043
3044 Turn process_stratum_target's read_loadmap op into a method of
3045 process_target.
3046
3047 * target.h (struct process_stratum_target): Remove the target op.
3048 (class process_target): Add the target op. Also add
3049 'supports_read_loadmap'.
3050 * target.cc (process_target::read_loadmap): Define.
3051 (process_target::supports_read_loadmap): Define.
3052
3053 Update the derived classes and callers below.
3054
3055 * server.cc (handle_qxfer_fdpic): Update.
3056 (handle_query): Update.
3057 * linux-low.cc (linux_target_ops): Update.
3058 (linux_process_target::supports_read_loadmap): Define.
3059 (linux_read_loadmap): Turn into ...
3060 (linux_process_target::read_loadmap): ... this.
3061 * linux-low.h (class linux_process_target): Update.
3062 * lynx-low.cc (lynx_target_ops): Update.
3063 * nto-low.cc (nto_target_ops): Update.
3064 * win32-low.cc (win32_target_ops): Update.
3065
3066 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3067
3068 Turn process_stratum_target's core_of_thread op into a method of
3069 process_target.
3070
3071 * target.h (struct process_stratum_target): Remove the target op.
3072 (class process_target): Add the target op.
3073 (target_core_of_thread): Update the macro.
3074 * target.cc (process_target::core_of_thread): Define.
3075
3076 Update the derived classes and callers below.
3077
3078 * linux-low.cc (linux_target_ops): Update.
3079 (linux_process_target::core_of_thread): Define.
3080 * linux-low.h (class linux_process_target): Update.
3081 * lynx-low.cc (lynx_target_ops): Update.
3082 * nto-low.cc (nto_target_ops): Update.
3083 * win32-low.cc (win32_target_ops): Update.
3084
3085 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3086
3087 Turn process_stratum_target's handle_monitor_command op into a
3088 method of process_target.
3089
3090 * target.h (struct process_stratum_target): Remove the target op.
3091 (class process_target): Add the target op.
3092 (target_handle_monitor_command): Update the macro.
3093 * target.cc (process_target::handle_monitor_command): Define.
3094
3095 Update the derived classes and callers below.
3096
3097 * server.cc (handle_query): Update.
3098 * linux-low.cc (linux_target_ops): Update.
3099 (linux_process_target::handle_monitor_command): Define.
3100 * linux-low.h (class linux_process_target): Update.
3101 * lynx-low.cc (lynx_target_ops): Update.
3102 * nto-low.cc (nto_target_ops): Update.
3103 * win32-low.cc (win32_target_ops): Update.
3104
3105 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3106
3107 Turn process_stratum_target's handle_new_gdb_connection op into a
3108 method of process_target.
3109
3110 * target.h (struct process_stratum_target): Remove the target op.
3111 (class process_target): Add the target op.
3112 (target_handle_new_gdb_connection): Update the macro.
3113 * target.cc (process_target::handle_new_gdb_connection): Define.
3114
3115 Update the derived classes and callers below.
3116
3117 * linux-low.cc (linux_target_ops): Update.
3118 (linux_handle_new_gdb_connection): Turn into ...
3119 (linux_process_target::handle_new_gdb_connection): ... this.
3120 * linux-low.h (class linux_process_target): Update.
3121 * lynx-low.cc (lynx_target_ops): Update.
3122 * nto-low.cc (nto_target_ops): Update.
3123 * win32-low.cc (win32_target_ops): Update.
3124
3125 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3126
3127 Turn process_stratum_target's supports_fork_events,
3128 supports_vfork_events, and supports_exec_events ops into methods
3129 of process_target.
3130
3131 * target.h (struct process_stratum_target): Remove the target ops.
3132 (class process_target): Add the target ops.
3133 (target_supports_fork_events): Update the macro.
3134 (target_supports_vfork_events): Update the macro.
3135 (target_supports_exec_events): Update the macro.
3136 * target.cc (process_target::supports_fork_events): Define.
3137 (process_target::supports_vfork_events): Define.
3138 (process_target::supports_exec_events): Define.
3139
3140 Update the derived classes and callers below.
3141
3142 * linux-low.cc (linux_target_ops): Update.
3143 (linux_supports_fork_events): Turn into ...
3144 (linux_process_target::supports_fork_events): ... this.
3145 (linux_supports_vfork_events): Turn into ...
3146 (linux_process_target::supports_vfork_events): ... this.
3147 (linux_supports_exec_events): Turn into ...
3148 (linux_process_target::supports_exec_events): ... this.
3149 * linux-low.h (class linux_process_target): Update.
3150 * lynx-low.cc (lynx_target_ops): Update.
3151 * nto-low.cc (nto_target_ops): Update.
3152 * win32-low.cc (win32_target_ops): Update.
3153
3154 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3155
3156 Turn process_stratum_target's supports_multi_process op into a
3157 method of process_target.
3158
3159 * target.h (struct process_stratum_target): Remove the target op.
3160 (class process_target): Add the target op.
3161 * target.cc (process_target::supports_multi_process): Define.
3162 (target_supports_multi_process): Update.
3163
3164 Update the derived classes and callers below.
3165
3166 * linux-low.cc (linux_target_ops): Update.
3167 (linux_supports_multi_process): Turn into ...
3168 (linux_process_target::supports_multi_process): ... this.
3169 * linux-low.h (class linux_process_target): Update.
3170 * lynx-low.cc (lynx_target_ops): Update.
3171 * nto-low.cc (nto_target_ops): Update.
3172 * win32-low.cc (win32_target_ops): Update.
3173
3174 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3175
3176 Turn process_stratum_target's supports_non_stop, async, and
3177 start_non_stop ops into methods of process_target.
3178
3179 * target.h (struct process_stratum_target): Remove the target ops.
3180 (class process_target): Add the target ops.
3181 (target_supports_non_stop): Update the macro.
3182 (target_async): Update the macro.
3183 (start_non_stop): Remove declaration.
3184 * target.cc (process_target::supports_non_stop): Define.
3185 (process_target::async): Define.
3186 (process_target::start_non_stop): Define.
3187 (start_non_stop): Remove.
3188
3189 Update the derived classes and callers below.
3190
3191 * server.cc (handle_qxfer_siginfo): Update.
3192 (handle_query): Update.
3193 * linux-low.cc (linux_target_ops): Update.
3194 (linux_supports_non_stop): Turn into ...
3195 (linux_process_target::supports_non_stop): ... this.
3196 (linux_async): Turn into ...
3197 (linux_process_target::async): ... this.
3198 (linux_start_non_stop): Turn into ...
3199 (linux_process_target::start_non_stop): ... this.
3200 * linux-low.h (class linux_process_target): Update.
3201 * lynx-low.cc (lynx_target_ops): Update.
3202 * nto-low.cc (nto_target_ops): Update.
3203 (nto_supports_non_stop): Remove; rely on the default behavior
3204 instead.
3205 * win32-low.cc (win32_target_ops): Update.
3206
3207 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3208
3209 Turn process_stratum_target's qxfer_siginfo op into a method of
3210 process_target.
3211
3212 * target.h (struct process_stratum_target): Remove the target op.
3213 (class process_target): Add the target op. Also add
3214 'supports_qxfer_siginfo'.
3215 * target.cc (process_target::qxfer_siginfo): Define.
3216 (process_target::supports_qxfer_siginfo): Define.
3217
3218 Update the derived classes and callers below.
3219
3220 * server.cc (handle_qxfer_siginfo): Update.
3221 (handle_query): Update.
3222 * linux-low.cc (linux_target_ops): Update.
3223 (linux_process_target::supports_qxfer_siginfo): Define.
3224 (linux_xfer_siginfo): Turn into ...
3225 (linux_process_target::qxfer_siginfo): ... this.
3226 * linux-low.h (class linux_process_target): Update.
3227 * lynx-low.cc (lynx_target_ops): Update.
3228 * nto-low.cc (nto_target_ops): Update.
3229 * win32-low.cc (win32_target_ops): Update.
3230
3231 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3232
3233 Turn process_stratum_target's qxfer_osdata op into a method of
3234 process_target.
3235
3236 * target.h (struct process_stratum_target): Remove the target op.
3237 (class process_target): Add the target op. Also add
3238 'supports_qxfer_osdata'.
3239 * target.cc (process_target::qxfer_osdata): Define.
3240 (process_target::supports_qxfer_osdata): Define.
3241
3242 Update the derived classes and callers below.
3243
3244 * server.cc (handle_qxfer_osdata): Update.
3245 (handle_query): Update.
3246 * linux-low.cc (linux_target_ops): Update.
3247 (linux_process_target::supports_qxfer_osdata): Define.
3248 (linux_qxfer_osdata): Turn into ...
3249 (linux_process_target::qxfer_osdata): ... this.
3250 * linux-low.h (class linux_process_target): Update.
3251 * lynx-low.cc (lynx_target_ops): Update.
3252 * nto-low.cc (nto_target_ops): Update.
3253 * win32-low.cc (win32_target_ops): Update.
3254
3255 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3256
3257 Turn process_stratum_target's hostio_last_error op into a
3258 method of process_target.
3259
3260 * target.h (struct process_stratum_target): Remove the target op.
3261 (class process_target): Add the target op.
3262 * target.cc: Add "hostio.h" to includes.
3263 (process_target::hostio_last_error): Define.
3264
3265 Update the derived classes and callers below.
3266
3267 * hostio.cc (hostio_error): Update.
3268 * linux-low.cc: Remove "hostio.h" from includes.
3269 (linux_target_ops): Update.
3270 * lynx-low.cc (lynx_target_ops): Update.
3271 * nto-low.cc (nto_target_ops): Update.
3272 * win32-low.h (class win32_process_target): Update.
3273 * win32-low.cc (win32_target_ops): Update.
3274 (wince_hostio_last_error): Turn into ...
3275 (win32_process_target::hostio_last_error): ... this.
3276
3277 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3278
3279 Turn process_stratum_target's get_tls_address op into a method of
3280 process_target.
3281
3282 * target.h (struct process_stratum_target): Remove the target op.
3283 (class process_target): Add the target op. Also add
3284 'supports_get_tls_address'.
3285 * target.cc (process_target::get_tls_address): Define.
3286 (process_target::supports_get_tls_address): Define.
3287
3288 Update the derived classes and callers below.
3289
3290 * server.cc (handle_query): Update.
3291 * linux-low.cc (linux_target_ops): Update.
3292 (linux_process_target::supports_get_tls_address): Define.
3293 (linux_process_target::get_tls_address): Define.
3294 * linux-low.h (class linux_process_target): Update.
3295 * lynx-low.cc (lynx_target_ops): Update.
3296 * nto-low.cc (nto_target_ops): Update.
3297 * win32-low.cc (win32_target_ops): Update.
3298
3299 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3300
3301 Turn process_stratum_target's read_offsets op into a method of
3302 process_target.
3303
3304 * target.h (struct process_stratum_target): Remove the target op.
3305 (class process_target): Add the target op. Also add
3306 'supports_read_offsets'.
3307 * target.cc (process_target::read_offsets): Define.
3308 (process_target::supports_read_offsets): Define.
3309
3310 Update the derived classes and callers below.
3311
3312 * server.cc (handle_query): Update.
3313 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3314 (linux_target_ops): Update.
3315 (linux_process_target::supports_read_offsets): Define.
3316 (linux_read_offsets): Turn into ...
3317 (linux_process_target::read_offsets): ... this.
3318 * linux-low.h (class linux_process_target): Update.
3319 * lynx-low.cc (lynx_target_ops): Update.
3320 * nto-low.cc (nto_target_ops): Update.
3321 * win32-low.cc (win32_target_ops): Update.
3322
3323 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3324
3325 Turn process_stratum_target's stopped_by_watchpoint and
3326 stopped_data_address ops into methods of process_target.
3327
3328 * target.h (struct process_stratum_target): Remove the target ops.
3329 (class process_target): Add the target ops.
3330 * target.cc (process_target::stopped_by_watchpoint): Define.
3331 (process_target::stopped_data_address): Define.
3332
3333 Update the derived classes and callers below.
3334
3335 * remote-utils.cc (prepare_resume_reply): Update.
3336 * linux-low.cc (linux_target_ops): Update.
3337 (linux_stopped_by_watchpoint): Turn into ...
3338 (linux_process_target::stopped_by_watchpoint): ... this.
3339 (linux_stopped_data_address): Turn into ...
3340 (linux_process_target::stopped_data_address): ... this.
3341 * linux-low.h (class linux_process_target): Update.
3342 * lynx-low.cc (lynx_target_ops): Update.
3343 * nto-low.cc (nto_target_ops): Update.
3344 (nto_stopped_by_watchpoint): Turn into ...
3345 (nto_process_target::stopped_by_watchpoint): ... this.
3346 (nto_stopped_data_address): Turn into ...
3347 (nto_process_target::stopped_data_address): ... this.
3348 * nto-low.h (class nto_process_target): Update.
3349 * win32-low.cc (win32_target_ops): Update.
3350 (win32_stopped_by_watchpoint): Turn into ...
3351 (win32_process_target::stopped_by_watchpoint): ... this.
3352 (win32_stopped_data_address): Turn into ...
3353 (win32_process_target::stopped_data_address): ... this.
3354 * win32-low.h (class win32_process_target): Update.
3355
3356 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3357
3358 Turn process_stratum_target's supports_hardware_single_step op into
3359 a method of process_target.
3360
3361 * target.h (struct process_stratum_target): Remove the target op.
3362 (class process_target): Add the target op.
3363 (target_supports_hardware_single_step): Update the macro.
3364 (target_can_do_hardware_single_step): Remove declaration.
3365 * target.cc (process_target::supports_hardware_single_step): Define.
3366 (target_can_do_hardware_single_step): Remove.
3367
3368 Update the derived classes and callers below.
3369
3370 * linux-low.h (class linux_process_target): Update.
3371 * linux-low.cc (linux_target_ops): Update.
3372 (linux_supports_hardware_single_step): Turn into ...
3373 (linux_process_target::supports_hardware_single_step): ... this.
3374 * lynx-low.h (class lynx_process_target): Update.
3375 * lynx-low.cc (lynx_target_ops): Update.
3376 (lynx_process_target::supports_hardware_single_step): Define.
3377 * nto-low.h (class nto_process_target): Update.
3378 * nto-low.cc (nto_target_ops): Update.
3379 (nto_process_target::supports_hardware_single_step): Define.
3380 * win32-low.h (class win32_process_target): Update.
3381 * win32-low.cc (win32_target_ops): Update.
3382 (win32_process_target::supports_hardware_single_step): Define.
3383
3384 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3385
3386 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3387 ops into methods of process_target.
3388
3389 * target.h (struct process_stratum_target): Remove the target ops.
3390 (class process_target): Add the target ops.
3391 (target_stopped_by_hw_breakpoint): Update the macro.
3392 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3393 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3394 (process_target::supports_stopped_by_hw_breakpoint): Define.
3395
3396 Update the derived classes and callers below.
3397
3398 * linux-low.cc (linux_target_ops): Update.
3399 (linux_stopped_by_hw_breakpoint): Turn into ...
3400 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3401 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3402 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3403 * linux-low.h (class linux_process_target): Update.
3404 * lynx-low.cc (lynx_target_ops): Update.
3405 * nto-low.cc (nto_target_ops): Update.
3406 * win32-low.cc (win32_target_ops): Update.
3407
3408 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3409
3410 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3411 ops into methods of process_target.
3412
3413 * target.h (struct process_stratum_target): Remove the target ops.
3414 (class process_target): Add the target ops.
3415 (target_stopped_by_sw_breakpoint): Update the macro.
3416 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3417 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3418 (process_target::supports_stopped_by_sw_breakpoint): Define.
3419
3420 Update the derived classes and callers below.
3421
3422 * linux-low.cc (linux_target_ops): Update.
3423 (linux_stopped_by_sw_breakpoint): Turn into ...
3424 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3425 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3426 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3427 * linux-low.h (class linux_process_target): Update.
3428 * lynx-low.cc (lynx_target_ops): Update.
3429 * nto-low.cc (nto_target_ops): Update.
3430 * win32-low.cc (win32_target_ops): Update.
3431
3432 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3433
3434 Turn process_stratum_target's insert_point and remove_point ops
3435 into methods of process_target.
3436
3437 * target.h (struct process_stratum_target): Remove the target ops.
3438 (class process_target): Add the target ops.
3439 * target.cc (process_target::insert_point): Define.
3440 (process_target::remove_point): Define.
3441
3442 Update the derived classes and callers below.
3443
3444 * mem-break.cc (set_raw_breakpoint_at): Update.
3445 (delete_raw_breakpoint): Update.
3446 (uninsert_raw_breakpoint): Update.
3447 (reinsert_raw_breakpoint): Update.
3448 * linux-low.cc (linux_target_ops): Update.
3449 (linux_insert_point): Turn into ...
3450 (linux_process_target::insert_point): ... this.
3451 (linux_remove_point): Turn into ...
3452 (linux_process_target::remove_point): ... this.
3453 * linux-low.h (class linux_process_target): Update.
3454 * lynx-low.cc (lynx_target_ops): Update.
3455 * nto-low.cc (nto_target_ops): Update.
3456 (nto_insert_point): Turn into ...
3457 (nto_process_target::insert_point): ... this.
3458 (nto_remove_point): Turn into ...
3459 (nto_process_target::remove_point): ... this.
3460 * nto-low.h (class nto_process_target): Update.
3461 * win32-low.cc (win32_target_ops): Update.
3462 (win32_insert_point): Turn into ...
3463 (win32_process_target::insert_point): ... this.
3464 (win32_remove_point): Turn into ...
3465 (win32_process_target::remove_point): ... this.
3466 * win32-low.h (class win32_process_target): Update.
3467
3468 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3469
3470 Turn process_stratum_target's supports_z_point_type op into a
3471 method of process_target.
3472
3473 * target.h (struct process_stratum_target): Remove the target op.
3474 (class process_target): Add the target op.
3475 * target.cc (process_target::supports_z_point_type): Define.
3476
3477 Update the derived classes and callers below.
3478
3479 * mem-break.cc (z_type_supported): Update.
3480 * linux-low.cc (linux_target_ops): Update.
3481 (linux_supports_z_point_type): Turn into ...
3482 (linux_process_target::supports_z_point_type): ... this.
3483 * linux-low.h (class linux_process_target): Update.
3484 * lynx-low.cc (lynx_target_ops): Update.
3485 * nto-low.cc (nto_target_ops): Update.
3486 (nto_supports_z_point_type): Turn into ...
3487 (nto_process_target::supports_z_point_type): ... this.
3488 * nto-low.h (class nto_process_target): Update.
3489 * win32-low.cc (win32_target_ops): Update.
3490 (win32_supports_z_point_type): Turn into ...
3491 (win32_process_target::supports_z_point_type): ... this.
3492 * win32-low.h (class win32_process_target): Update.
3493
3494 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3495
3496 Turn process_stratum_target's read_auxv op into a method of
3497 process_target.
3498
3499 * target.h (class process_stratum_target): Remove the target op.
3500 (struct process_target): Add the target op. Also add
3501 'supports_read_auxv'.
3502 * target.cc (process_target::read_auxv): Define.
3503 (process_target::supports_read_auxv): Define.
3504
3505 Update the derived classes and callers below.
3506
3507 * server.cc (handle_qxfer_auxv): Update.
3508 (handle_query): Update.
3509 * linux-low.cc (linux_target_ops): Update.
3510 (linux_process_target::supports_read_auxv): Define.
3511 (linux_read_auxv): Turn into ...
3512 (linux_process_target::read_auxv): ... this.
3513 * linux-low.h (class linux_process_target): Update.
3514 * lynx-low.cc (lynx_target_ops): Update.
3515 * nto-low.cc (nto_target_ops): Update.
3516 (nto_process_target::supports_read_auxv): Define.
3517 (nto_read_auxv): Turn into ...
3518 (nto_process_target::read_auxv): ... this.
3519 * nto-low.h (class nto_process_target): Update.
3520 * win32-low.cc (win32_target_ops): Update.
3521
3522 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3523
3524 Turn process_stratum_target's request_interrupt op into a method of
3525 process_target.
3526
3527 * target.h (struct process_stratum_target): Remove the target op.
3528 (class process_target): Add the target op.
3529
3530 Update the derived classes and callers below.
3531
3532 * remote-utils.cc (putpkt_binary_1): Update.
3533 (input_interrupt): Update.
3534 (getpkt): Update.
3535 * server.cc (handle_v_requests): Update.
3536 * linux-low.cc (linux_target_ops): Update.
3537 (linux_request_interrupt): Turn into ...
3538 (linux_process_target::request_interrupt): ... this.
3539 * linux-low.h (class linux_process_target): Update.
3540 * lynx-low.cc (lynx_target_ops): Update.
3541 (lynx_request_interrupt): Turn into ...
3542 (lynx_process_target::request_interrupt): ... this.
3543 * lynx-low.h (class lynx_process_target): Update.
3544 * nto-low.cc (nto_target_ops): Update.
3545 (nto_request_interrupt): Turn into ...
3546 (nto_process_target::request_interrupt): ... this.
3547 * nto-low.h (class nto_process_target): Update.
3548 * win32-low.cc (win32_target_ops): Update.
3549 (win32_request_interrupt): Turn into ...
3550 (win32_process_target::request_interrupt): ... this.
3551 * win32-low.h (class win32_process_target): Update.
3552
3553 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3554
3555 Turn process_stratum_target's look_up_symbols op into a method of
3556 process_target.
3557
3558 * target.h (struct process_stratum_target): Remove the target op.
3559 (class process_target): Add the target op.
3560 * target.cc (process_target::look_up_symbols): Define.
3561
3562 Update the derived classes and callers below.
3563
3564 * server.cc (handle_query): Update.
3565 * linux-low.cc (linux_target_ops): Update.
3566 (linux_look_up_symbols): Turn into ...
3567 (linux_process_target::look_up_symbols): ... this.
3568 * linux-low.h (class linux_process_target): Update.
3569 * lynx-low.cc (lynx_target_ops): Update.
3570 * nto-low.cc (nto_target_ops): Update.
3571 * win32-low.cc (win32_target_ops): Update.
3572
3573 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3574
3575 Turn process_stratum_target's read_memory and write_memory
3576 ops into methods of process_target.
3577
3578 * target.h (struct process_stratum_target): Remove the target ops.
3579 (class process_target): Add the target ops.
3580
3581 Update the derived classes and callers below.
3582
3583 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3584 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3585 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3586 (arm_get_syscall_trapinfo): Update.
3587 * linux-cris-low.cc (cris_breakpoint_at): Update.
3588 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3589 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3590 * linux-mips-low.cc (mips_breakpoint_at): Update.
3591 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3592 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3593 * linux-sh-low.cc (sh_breakpoint_at): Update.
3594 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3595 (sparc_store_gregset_from_stack): Update.
3596 (sparc_breakpoint_at): Update.
3597 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3598 * linux-tile-low.cc (tile_breakpoint_at): Update.
3599 * linux-x86-low.cc (x86_breakpoint_at): Update.
3600 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3601 * mem-brea.cc (insert_memory_breakpoint): Update.
3602 (validate_inserted_breakpoint): Update.
3603 * target.cc (read_inferior_memory): Update.
3604 (target_write_memory): Update.
3605 * linux-low.cc (linux_target_ops): Update.
3606 (linux_read_memory): Make a wrapper around the read_memory target
3607 op call.
3608 (linux_process_target::read_memory): Rename from linux_read_memory.
3609 (linux_write_memory): Turn into ...
3610 (linux_process_target::write_memory): ... this.
3611 * linux-low.h (class linux_process_target): Update.
3612 * lynx-low.cc (lynx_target_ops): Update.
3613 (lynx_read_memory): Turn into ...
3614 (lynx_process_target::read_memory): ... this.
3615 (lynx_write_memory): Turn into ...
3616 (lynx_process_target::write_memory): ... this.
3617 * lynx-low.h (class lynx_process_target): Update.
3618 * nto-low.cc (nto_target_ops): Update.
3619 (nto_read_memory): Turn into ...
3620 (nto_process_target::read_memory): ... this.
3621 (nto_write_memory): Turn into ...
3622 (nto_process_target::write_memory): ... this.
3623 * nto-low.h (class nto_process_target): Update.
3624 * win32-low.cc (win32_target_ops): Update.
3625 (win32_read_inferior_memory): Turn into ...
3626 (win32_process_target::read_memory): ... this.
3627 (win32_write_inferior_memory): Turn into ...
3628 (win32_process_target::write_memory): ... this.
3629 * win32-low.h (class win32_process_target): Update.
3630
3631 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3632
3633 Turn process_stratum_target's prepare_to_access_memory and
3634 done_accessing_memory ops into methods of process_target.
3635
3636 * target.h (struct process_stratum_target): Remove the target ops.
3637 (class process_target): Add the target ops.
3638 * target.cc (process_target::prepare_to_access_memory): Define.
3639 (process_target::done_accessing_memory): Define.
3640 (prepare_to_access_memory): Update.
3641 (done_accessing_memory): Update.
3642
3643 Update the derived classes and callers below.
3644
3645 * linux-low.cc (linux_target_ops): Update.
3646 (linux_prepare_to_access_memory): Turn into ...
3647 (linux_process_target::prepare_to_access_memory): ... this.
3648 (linux_done_accessing_memory): Turn into ...
3649 (linux_process_target::done_accessing_memory): ... this.
3650 * linux-low.h (class linux_process_target): Update.
3651 * lynx-low.cc (lynx_target_ops): Update.
3652 * nto-low.cc (nto_target_ops): Update.
3653 * win32-low.cc (win32_target_ops): Update.
3654
3655 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3656
3657 Turn process_stratum_target's fetch_registers and store_registers
3658 ops into methods of process_target.
3659
3660 * target.h (struct process_stratum_target): Remove the target ops.
3661 (class process_target): Add the target ops.
3662 (fetch_inferior_registers): Update the macro.
3663 (store_inferior_registers): Update the macro.
3664
3665 Update the derived classes and callers below.
3666
3667 * linux-low.cc (linux_target_ops): Update.
3668 (linux_fetch_registers): Turn into ...
3669 (linux_process_target::fetch_registers): ... this.
3670 (linux_store_registers): Turn into ...
3671 (linux_process_target::store_registers): ... this.
3672 * linux-low.h (class linux_process_target): Update.
3673 * lynx-low.cc (lynx_target_ops): Update.
3674 (lynx_fetch_registers): Turn into ...
3675 (lynx_process_target::fetch_registers): ... this.
3676 (lynx_store_registers): Turn into ...
3677 (lynx_process_target::store_registers): ... this.
3678 * lynx-low.h (class lynx_process_target): Update.
3679 * nto-low.cc (nto_target_ops): Update.
3680 (nto_fetch_registers): Turn into ...
3681 (nto_process_target::fetch_registers): ... this.
3682 (nto_store_registers): Turn into ...
3683 (nto_process_target::store_registers): ... this.
3684 * nto-low.h (class nto_process_target): Update.
3685 * win32-low.cc (win32_target_ops): Update.
3686 (win32_fetch_inferior_registers): Turn into ...
3687 (win32_process_target::fetch_registers): ... this.
3688 (win32_store_inferior_registers): Turn into ...
3689 (win32_process_target::store_registers): ... this.
3690 * win32-low.h (class win32_process_target): Update.
3691
3692 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3693
3694 Turn process_stratum_target's wait op into a method of
3695 process_target.
3696
3697 * target.h (struct process_stratum_target): Remove the target op.
3698 (class process_target): Add the target op.
3699
3700 Update the derived classes and callers below.
3701
3702 * target.cc (target_wait): Update.
3703 * linux-low.cc (linux_target_ops): Update.
3704 (linux_wait): Turn into ...
3705 (linux_process_target::wait): ... this.
3706 * linux-low.h (class linux_process_target): Update.
3707 * lynx-low.cc (lynx_target_ops): Update.
3708 (lynx_wait): Turn into ...
3709 (lynx_process_target::wait): ... this.
3710 * lynx-low.h (class lynx_process_target): Update.
3711 * nto-low.cc (nto_target_ops): Update.
3712 (nto_wait): Turn into ...
3713 (nto_process_target::wait): ... this.
3714 * nto-low.h (class nto_process_target): Update.
3715 * win32-low.cc (win32_target_ops): Update.
3716 (win32_wait): Turn into ...
3717 (win32_process_target::wait): ... this.
3718 (do_initial_child_stuff): Update.
3719 * win32-low.h (class win32_process_target): Update.
3720
3721 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3722
3723 Turn process_stratum_target's resume op into a method of
3724 process_target.
3725
3726 * target.h (struct process_stratum_target): Remove the target op.
3727 (class process_target): Add the target op.
3728
3729 Update the derived classes and callers below.
3730
3731 * server.cc (resume): Update.
3732 * target.cc (target_stop_and_wait): Update.
3733 (target_continue_no_signal): Update.
3734 (target_continue): Update.
3735 * linux-low.cc (linux_target_ops): Update.
3736 (linux_resume): Turn into ...
3737 (linux_process_target::resume): ... this.
3738 * linux-low.h (class linux_process_target): Update.
3739 * lynx-low.cc (lynx_target_ops): Update.
3740 (lynx_resume): Turn into ...
3741 (lynx_process_target::resume): ... this.
3742 * lynx-low.h (class lynx_process_target): Update.
3743 * nto-low.cc (nto_target_ops): Update.
3744 (nto_resume): Turn into ...
3745 (nto_process_target::resume): ... this.
3746 * nto-low.h (class nto_process_target): Update.
3747 * win32-low.cc (win32_target_ops): Update.
3748 (win32_resume): Turn into ...
3749 (win32_process_target::resume): ... this.
3750 (win32_process_target::detach): Update.
3751 (do_initial_child_stuff): Update.
3752 * win32-low.h (class win32_process_target): Update.
3753
3754 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3755
3756 Turn process_stratum_target's thread_alive op into a method of
3757 process_target.
3758
3759 * target.h (struct process_stratum_target): Remove the target op.
3760 (class process_target): Add the target op.
3761 (mythread_alive): Update the macro.
3762
3763 Update the derived classes and callers below.
3764
3765 * linux-low.cc (linux_target_ops): Update.
3766 (linux_thread_alive): Turn into ...
3767 (linux_process_target::thread_alive): ... this.
3768 (wait_for_sigstop): Update.
3769 * linux-low.h (class linux_process_target): Update.
3770 * lynx-low.cc (lynx_target_ops): Update.
3771 (lynx_thread_alive): Turn into ...
3772 (lynx_process_target::thread_alive): ... this.
3773 * lynx-low.h (class lynx_process_target): Update.
3774 * nto-low.cc (nto_target_ops): Update.
3775 (nto_thread_alive): Turn into ...
3776 (nto_process_target::thread_alive): ... this.
3777 * nto-low.h (class nto_process_target): Update.
3778 * win32-low.cc (win32_target_ops): Update.
3779 (win32_thread_alive): Turn into ...
3780 (win32_process_target::thread_alive): ... this.
3781 * win32-low.h (class win32_process_target): Update.
3782
3783 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3784
3785 Turn process_stratum_target's join op into a method of
3786 process_target.
3787
3788 * target.h (struct process_stratum_target): Remove the target op.
3789 (class process_target): Add the target op.
3790 (join_inferior): Update the macro.
3791
3792 Update the derived classes and callers below.
3793
3794 * linux-low.cc (linux_target_ops): Update.
3795 (linux_join): Turn into ...
3796 (linux_process_target::join): ... this.
3797 * linux-low.h (class linux_process_target): Update.
3798 * lynx-low.cc (lynx_target_ops): Update.
3799 (lynx_join): Turn into ...
3800 (lynx_process_target::join): ... this.
3801 * lynx-low.h (class lynx_process_target): Update.
3802 * nto-low.cc (nto_target_ops): Update.
3803 (nto_process_target::join): Define.
3804 * nto-low.h (class nto_process_target): Update.
3805 * win32-low.cc (win32_target_ops): Update.
3806 (win32_join): Turn into ...
3807 (win32_process_target::join): ... this.
3808 * win32-low.h (class win32_process_target): Update.
3809
3810 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3811
3812 Turn process_stratum_target's mourn op into a method of
3813 process_target.
3814
3815 * target.h (struct process_stratum_target): Remove the target op.
3816 (class process_target): Add the target op.
3817
3818 Update the derived classes and callers below.
3819
3820 * target.cc (target_mourn_inferior): Update.
3821 * linux-low.cc (linux_target_ops): Update.
3822 (linux_mourn): Turn into ...
3823 (linux_process_target::mourn): ... this.
3824 (handle_extended_wait): Update.
3825 (linux_process_target::kill): Update.
3826 (linux_process_target::detach): Update.
3827 * linux-low.h (class linux_process_target): Update.
3828 * lynx-low.cc (lynx_target_ops): Update.
3829 (lynx_mourn): Turn into ...
3830 (lynx_process_target::mourn): ... this.
3831 * lynx-low.h (class lynx_process_target): Update.
3832 * nto-low.cc (nto_target_ops): Update.
3833 (nto_mourn): Turn into ...
3834 (nto_process_target::mourn): ... this.
3835 * nto-low.h (class nto_process_target): Update.
3836 * win32-low.cc (win32_target_ops): Update.
3837 (win32_mourn): Turn into ...
3838 (win32_process_target::mourn): ... this.
3839 * win32-low.h (class win32_process_target): Update.
3840
3841 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3842
3843 Turn process_stratum_target's detach op into a method of
3844 process_target.
3845
3846 * target.h (struct process_stratum_target): Remove the target op.
3847 (class process_target): Add the target op.
3848 (detach_inferior): Update the macro.
3849
3850 Update the derived classes and callers below.
3851
3852 * linux-low.cc (linux_target_ops): Update.
3853 (linux_detach): Turn into ...
3854 (linux_process_target::detach): ... this.
3855 * linux-low.h (class linux_process_target): Update.
3856 * lynx-low.cc (lynx_target_ops): Update.
3857 (lynx_detach): Turn into ...
3858 (lynx_process_target::detach): ... this.
3859 * lynx-low.h (class lynx_process_target): Update.
3860 * nto-low.cc (nto_target_ops): Update.
3861 (nto_detach): Turn into ...
3862 (nto_process_target::detach): ... this.
3863 * nto-low.h (class nto_process_target): Update.
3864 * win32-low.cc (win32_target_ops): Update.
3865 (win32_detach): Turn into ...
3866 (win32_process_target::detach): ... this.
3867 * win32-low.h (class win32_process_target): Update.
3868
3869 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3870
3871 Turn process_stratum_target's kill op into a method of
3872 process_target.
3873
3874 * target.h (struct process_stratum_target): Remove the target op.
3875 (class process_target): Add the target op.
3876
3877 Update the derived classes and callers below.
3878
3879 * target.cc (kill_inferior): Update.
3880 * linux-low.cc (linux_target_ops): Update.
3881 (linux_kill): Turn into ...
3882 (linux_process_target::kill): ... this.
3883 * linux-low.h (class linux_process_target): Update.
3884 * lynx-low.cc (lynx_target_ops): Update.
3885 (lynx_kill): Turn into ...
3886 (lynx_process_target::kill): ... this.
3887 * lynx-low.h (class lynx_process_target): Update.
3888 * nto-low.cc (nto_target_ops): Update.
3889 (nto_kill): Turn into ...
3890 (nto_process_target::kill): ... this.
3891 * nto-low.h (class nto_process_target): Update.
3892 * win32-low.cc (win32_target_ops): Update.
3893 (win32_kill): Turn into ...
3894 (win32_process_target::kill): ... this.
3895 * win32-low.h (class win32_process_target): Update.
3896
3897 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3898
3899 Turn process_stratum_target's attach op into a method of
3900 process_target.
3901
3902 * target.h (struct process_stratum_target): Remove the target op.
3903 (class process_target): Add the target op.
3904 (myattach): Update the macro.
3905
3906 Update the derived classes and callers below.
3907
3908 * linux-low.cc (linux_target_ops): Update.
3909 (linux_attach): Turn into ...
3910 (linux_process_target::attach): ... this.
3911 * linux-low.h (class linux_process_target): Update.
3912 * lynx-low.cc (lynx_target_ops): Update.
3913 (lynx_attach): Turn into ...
3914 (lynx_process_target::attach): ... this.
3915 * lynx-low.h (class lynx_process_target): Update.
3916 * nto-low.cc (nto_target_ops): Update.
3917 (nto_attach): Turn into ...
3918 (nto_process_target::attach): ... this.
3919 * nto-low.h (class nto_process_target): Update.
3920 * win32-low.cc (win32_target_ops): Update.
3921 (win32_attach): Turn into ...
3922 (win32_process_target::attach): ... this.
3923 * win32-low.h (class win32_process_target): Update.
3924
3925 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3926
3927 Turn process_stratum_target's post_create_inferior op into a method
3928 of process_target.
3929
3930 * target.h (struct process_stratum_target): Remove the target op.
3931 (class process_target): Add the target op.
3932 (target_post_create_inferior): Update the macro.
3933 * target.cc (process_target::post_create_inferior): Define.
3934
3935 Update the derived classes and callers below.
3936
3937 * linux-low.cc (linux_target_ops): Update.
3938 (linux_post_create_inferior): Turn into ...
3939 (linux_process_target::post_create_inferior): ... this.
3940 * linux-low.h (class linux_process_target): Update.
3941 * lynx-low.cc (lynx_target_ops): Update.
3942 * nto-low.cc (nto_target_ops): Update.
3943 * win32-low.cc (win32_target_ops): Update.
3944
3945 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3946
3947 Turn process_stratum_target's create_inferior op into a method of
3948 process_target.
3949
3950 * target.h (struct process_stratum_target): Remove the target op.
3951 (class process_target): Add the target op.
3952 (create_inferior): Rename the macro to ...
3953 (target_create_inferior): ... this.
3954
3955 Update the derived classes and callers below.
3956
3957 * server.cc (handle_v_run): Update.
3958 (captured_main): Update.
3959 (process_serial_event): Update.
3960 * linux-low.cc (linux_target_ops): Update.
3961 (linux_create_inferior): Turn into ...
3962 (linux_process_target::create_inferior): ... this.
3963 * linux-low.h (class linux_process_target): Update.
3964 * lynx-low.cc (lynx_target_ops): Update.
3965 (lynx_create_inferior): Turn into ...
3966 (lynx_process_target::create_inferior): ... this.
3967 * lynx-low.h (class lynx_process_target): Update.
3968 * nto-low.cc (nto_target_ops): Update.
3969 (nto_create_inferior): Turn into ...
3970 (nto_process_target::create_inferior): ... this.
3971 * nto-low.h (class nto_process_target): Update.
3972 * win32-low.cc (win32_target_ops): Update.
3973 (win32_create_inferior): Turn into ...
3974 (win32_process_target::create_inferior): ... this.
3975 * win32-low.h (class win32_process_target): Update.
3976
3977 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3978
3979 * target.h (class process_target): New class definition.
3980 (struct process_stratum_target) <pt>: New field with type
3981 'process_target*'.
3982 * linux-low.h (class linux_process_target): Define as a derived
3983 class of 'process_target'.
3984 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3985 as the 'pt' field.
3986 * lynx-low.h (class lynx_process_target): Define as a derived
3987 class of 'process_target'.
3988 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3989 as the 'pt' field.
3990 * nto-low.h (class nto_process_target): Define as a derived
3991 class of 'process_target'.
3992 * nto-low.cc (nto_target_ops): Add an nto_process_target*
3993 as the 'pt' field.
3994 * win32-low.h (class win32_process_target): Define as a derived
3995 class of 'process_target'.
3996 * win32-low.cc (win32_target_ops): Add a win32_process_target*
3997 as the 'pt' field.
3998
3999 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4000
4001 * configure: Regenerate.
4002
4003 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4004 Andrew Burgess <andrew.burgess@embecosm.com>
4005
4006 * linux-riscv-low.cc: New file.
4007 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4008 and nat/riscv-linux-tdesc.c.
4009 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4010 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4011 Define.
4012
4013 2020-02-14 Tom Tromey <tom@tromey.com>
4014
4015 * acinclude.m4: Don't include acx_configure_dir.m4.
4016 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4017 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4018 (all, install-only, uninstall, clean-info, clean)
4019 (maintainer-clean): Don't recurse.
4020 (subdir_do, all-lib): Remove.
4021 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4022 (GNULIB_H): Remove.
4023 (generated_files): Update.
4024 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4025 * configure: Rebuild.
4026 * configure.ac: Don't configure gnulib or libiberty.
4027 (GNULIB): Update.
4028
4029 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4030
4031 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4032 preparing the command line for CreateProcess.
4033 (win32_create_inferior): Reflect the program name in debugging
4034 output that shows the process and its command line.
4035
4036 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4037
4038 * Makefile.in: Rename source files from .c to .cc.
4039 * %.c: Rename to %.cc.
4040 * configure.ac: Rename server.c to server.cc.
4041 * configure: Re-generate.
4042
4043 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4044
4045 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4046
4047 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4048
4049 * win32-low.c (win32_create_inferior): Set signal_pid.
4050
4051 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4052 Pedro Alves <palves@redhat.com>
4053
4054 Skip building gdbserver in a cross-configuration.
4055 * configure.srv: Set $gdbserver_host depending on whether $target
4056 is $host. Use $gdbserver_host instead of $host.
4057
4058 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4059
4060 * configure: Re-generate.
4061
4062 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4063
4064 * configure: Re-generate.
4065
4066 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4067
4068 * acinclude.m4: Update warning.m4 path.
4069
4070 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4071
4072 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4073 (handle_exception): Set siginfo_er.
4074 (win32_xfer_siginfo): New function.
4075
4076 2020-02-07 Tom Tromey <tom@tromey.com>
4077 Pedro Alves <palves@redhat.com>
4078
4079 * README: Update build documentation.
4080 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4081 host, not target.
4082 * configure.ac: Update paths.
4083 * configure: Rebuild.
4084 * acinclude.m4: Update paths.
4085 * Makefile.in: Update include paths.
4086 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4087 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4088 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4089 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4090 (%-generated.c): Update paths.
4091 * Move entire directory from ../gdb/gdbserver.
4092
4093 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4094
4095 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4096
4097 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4098
4099 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4100 assignment instead of srv_linux_obj.
4101
4102 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4103
4104 * server.c (handle_qxfer_libraries): Write segment-address with
4105 paddress.
4106
4107 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4108
4109 * Makefile.in (install-strip): New target.
4110 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4111 * aclocal.m4: Regenerate.
4112 * configure: Regenerate.
4113 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4114
4115 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4116
4117 * Makefile.in (SFILES): Adjust paths to point to real files.
4118 (OBS): Move waitstatus.o to target/waitstatus.o.
4119 (TAGS): Transform paths appropriately.
4120 (%.o): Rename to...
4121 (nat/%.o): ... this pattern rule.
4122 (%.o): Rename to...
4123 (target/%.o): ... this pattern rule.
4124 * configure.srv: Adjust paths throughout to include nat/ prefix
4125 with the revant files.
4126 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4127 * configure: Regenerate.
4128
4129 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4130
4131 * Makefile.in (TAGS): Remove config files from the recipe.
4132
4133 2020-01-14 Tom Tromey <tom@tromey.com>
4134
4135 * configure: Rebuild.
4136 * configure.ac: Remove any checks that were added to common.m4.
4137 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4138 lib-link.m4.
4139
4140 2020-01-14 Tom Tromey <tom@tromey.com>
4141
4142 * server.h: Include config.h.
4143 * gdbreplay.c: Include config.h.
4144 * configure: Rebuild.
4145 * configure.ac: Don't source common.host.
4146 * acinclude.m4: Update path.
4147 * Makefile.in (INCSUPPORT): New variable.
4148 (INCLUDE_CFLAGS): Add INCSUPPORT.
4149 (SFILES): Update paths.
4150 (version-generated.c): Update path to create-version.sh.
4151 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4152
4153 2020-01-14 Tom Tromey <tom@tromey.com>
4154
4155 * configure.ac (LIBS): Use WIN32APILIBS.
4156 (USE_WIN32API): Don't define.
4157 * configure: Rebuild.
4158
4159 2020-01-14 Tom Tromey <tom@tromey.com>
4160
4161 * configure: Rebuild.
4162
4163 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4164
4165 * Makefile.in (%-generated.c): Remove rule for files from
4166 regformats/i386.
4167
4168 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4169
4170 * configure: Re-generate.
4171
4172 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4173
4174 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4175 Define to static.
4176 * tracepoint.c (stop_tracing, flush_trace_buffer,
4177 about_to_request_buffer_space, get_trace_state_variable_value,
4178 set_trace_state_variable_value, gdb_collect): Add declaration.
4179
4180 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4181
4182 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4183 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4184 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4185 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4186 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4187 static.
4188
4189 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4190
4191 * inferiors.c: Include gdbsupport/common-inferior.h.
4192
4193 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4194
4195 * hostio-errno.c: Include hostio.h.
4196
4197 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4198
4199 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4200 prerequisite.
4201
4202 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4203
4204 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4205 * linux-arm-tdesc.h: Include arch/arm.h.
4206
4207 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4208
4209 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4210
4211 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4212
4213 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4214 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4215
4216 2020-01-10 Pedro Alves <palves@redhat.com>
4217
4218 * fork-child.c (post_fork_inferior): Pass target down to
4219 startup_inferior.
4220 * inferiors.c (switch_to_thread): Add process_stratum_target
4221 parameter.
4222 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4223 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4224 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4225 * remote-utils.c (prepare_resume_reply): Pass the target to
4226 switch_to_thread.
4227 * target.c (the_target): Now a process_stratum_target.
4228 (done_accessing_memory): Pass the target to switch_to_thread.
4229 (set_target_ops): Ajust to use process_stratum_target.
4230 * target.h (struct target_ops): Rename to ...
4231 (struct process_stratum_target): ... this.
4232 (the_target, set_target_ops): Adjust.
4233 (prepare_to_access_memory): Adjust comment.
4234 * win32-low.c (child_xfer_memory): Adjust to use
4235 process_stratum_target.
4236 (win32_target_ops): Now a process_stratum_target.
4237
4238 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4239 Pedro Alves <palves@redhat.com>
4240
4241 * win32-low.c (get_child_debug_event): Extract the fatal exception
4242 from the exit status and convert to the equivalent Posix signal
4243 number.
4244 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4245 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4246
4247 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4248
4249 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4250
4251 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4252
4253 * server.c (gdbserver_version): Change copyright year to 2020.
4254 * gdbreplay.c (gdbreplay_version): Likewise.
4255
4256 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4257
4258 * configure: Regenerate.
4259 * configure.ac: Quote variable arguments of test.
4260
4261 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4262
4263 * Makefile.in: Fix build with GNU Make 3.81
4264
4265 2019-12-16 Tom Tromey <tromey@adacore.com>
4266
4267 * server.c (get_exec_file): Constify result.
4268
4269 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4270
4271 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4272 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4273 * config.in: Regenerate.
4274 * configure: Regenerate.
4275 * configure.ac: Don't check for strerror.
4276 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4277 Call safe_strerror instead of strerror.
4278 * server.h (strerror): Remove this now-unnecessary declaration.
4279 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4280 strerror.
4281 (gdb_agent_helper_thread): Likewise.
4282 * utils.c (perror_with_name): Likewise.
4283
4284 2019-11-26 Tom Tromey <tom@tromey.com>
4285
4286 * configure, config.in: Rebuild.
4287
4288 2019-11-26 Tom Tromey <tom@tromey.com>
4289
4290 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4291 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4292 gdb_sigmask.
4293 * configure, config.in: Rebuild.
4294
4295 2019-11-26 Tom Tromey <tom@tromey.com>
4296
4297 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4298 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4299 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4300 * acinclude.m4: Include ax_pthread.m4.
4301 * config.in, configure: Rebuild.
4302
4303 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4304
4305 * debug.c (debug_set_output): Call safe_strerror instead of
4306 strerror.
4307 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4308 (linux_kill_one_lwp): Likewise.
4309 (linux_detach_one_lwp): Likewise.
4310 (linux_wait_for_event_filtered): Likewise.
4311 (store_register): Likewise.
4312 * lynx-low.c (lynx_attach): Likewise.
4313 * mem-break.c (insert_memory_breakpoint): Likewise.
4314 (remove_memory_breakpoint): Likewise.
4315 (delete_fast_tracepoint_jump): Likewise.
4316 (set_fast_tracepoint_jump): Likewise.
4317 (uninsert_fast_tracepoint_jumps_at): Likewise.
4318 (reinsert_fast_tracepoint_jumps_at): Likewise.
4319 * nto-low.c (nto_xfer_memory): Likewise.
4320 (nto_resume): Likewise.
4321
4322 2019-11-20 Luis Machado <luis.machado@linaro.org>
4323
4324 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4325 instead of register count.
4326 * tdesc.c (tdesc_contains_feature): New function.
4327 * tdesc.h (tdesc_contains_feature): New prototype.
4328
4329 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4330
4331 * Makefile.in: Add safe-strerror.c.
4332 * configure: Regenerate.
4333 * configure.ac: Don't source common.host.
4334
4335 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4336
4337 * config.in: Regenerate.
4338 * configure: Regenerate.
4339
4340 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4341
4342 * ax.c (ax_printf): Handle size_t_arg.
4343
4344 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4345
4346 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4347 * mi/mi-main.c (output_cores): Likewise.
4348 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4349 (linux_xfer_osdata_modules): Likewise.
4350 * remote.c (register_remote_support_xml): Likewise.
4351 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4352 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4353
4354 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4355
4356 * configure: Regenerate.
4357 * configure.ac: Remove check for strerror_r.
4358
4359 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4360
4361 * config.in: Regenerate.
4362 * configure: Regenerate.
4363 * configure.ac: Also check for strerror_r.
4364
4365 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4366
4367 * ax.h (debug_agent): Remove duplicate declaration.
4368
4369 2019-10-26 Tom de Vries <tdevries@suse.de>
4370
4371 * linux-aarch64-low.c: Fix typos in comments.
4372 * linux-arm-low.c: Same.
4373 * linux-low.c: Same.
4374 * linux-ppc-low.c: Same.
4375 * proc-service.c: Same.
4376 * regcache.h: Same.
4377 * server.c: Same.
4378 * tracepoint.c: Same.
4379 * win32-low.c: Same.
4380
4381 2019-10-25 Tom Tromey <tromey@adacore.com>
4382
4383 * utils.c (xstrdup): Remove.
4384
4385 2019-10-23 Tom Tromey <tom@tromey.com>
4386
4387 * configure, config.in: Rebuild.
4388
4389 2019-10-23 Tom Tromey <tom@tromey.com>
4390
4391 * configure: Rebuild.
4392 * acinclude.m4: Use m4_include, not sinclude.
4393
4394 2019-10-17 Tom Tromey <tromey@adacore.com>
4395
4396 * configure: Rebuild.
4397 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4398 in AC_CONFIG_FILES invocation.
4399 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4400 invocation.
4401
4402 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4403
4404 * server.c: Include xml-builtin.h.
4405 (get_xml_features): Don't declare xml_builtins here.
4406
4407 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4408
4409 * Makefile.in: Remove references to vec-ipa.o.
4410
4411 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4412
4413 * Makefile.in: Remove references to vec.c.
4414
4415 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4416
4417 * server.c (server_waiting): Change to bool.
4418 (extended_protocol): Likewise.
4419 (response_needed): Likewise.
4420 (exit_requested): Likewise.
4421 (run_once): Likewise.
4422 (report_no_resumed): Likewise.
4423 (non_stop): Likewise.
4424 (disable_packet_vCont): Likewise.
4425 (disable_packet_Tthread): Likewise.
4426 (disable_packet_qC): Likewise.
4427 (disable_packet_qfThreadInfo): Likewise.
4428 (handle_general_set): Update.
4429 (handle_detach): Update.
4430 (handle_monitor_command): Update.
4431 (handle_query): Update.
4432 (captured_main): Update.
4433 (process_serial_event): Update.
4434 * server.h (server_waiting): Change to bool.
4435 (disable_packet_vCont): Likewise.
4436 (disable_packet_Tthread): Likewise.
4437 (disable_packet_qC): Likewise.
4438 (disable_packet_qfThreadInfo): Likewise.
4439 (run_once): Likewise.
4440 (non_stop): Likewise.
4441 * target.c (target_stop_and_wait): Update.
4442
4443 2019-10-02 Tom Tromey <tromey@adacore.com>
4444
4445 * Makefile.in (SFILES): Add common-inferior.c.
4446 (OBS): Add common-inferior.o.
4447 * server.c (startup_with_shell): Don't define.
4448
4449 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4450
4451 * linux-low.c (linux_low_read_btrace): Update for change to
4452 std::vector.
4453
4454 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4455
4456 * debug.c (debug_threads): Remove comment in favor of the header.
4457 * debug.h (using_threads): Add declaration.
4458 (debug_threads): Add comment.
4459 * linux-aarch64-low.c: Include debug.h and remove declaration of
4460 debug_threads.
4461 * nto-low.c: Likewise.
4462 * remote-utils.c: Likewise.
4463 * thread-db.c: Likewise.
4464
4465 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4466
4467 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4468 and powerpc-cell64l-ipa.o.
4469 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4470 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4471 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4472 (spu*-*-*): Remove.
4473
4474 * spu-low.c: Remove file.
4475
4476 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4477 (parse_spufs_run): Remove.
4478 (ppc_get_pc): Remove Cell/B.E. support.
4479 (ppc_set_pc): Likewise.
4480 (ppc_breakpoint_at): Likewise.
4481 (ppc_arch_setup): Likewise.
4482 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4483 tdesc_powerpc_cell32l.
4484 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4485 or init_registers_powerpc_cell32l.
4486 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4487 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4488 or init_registers_powerpc_cell32l.
4489 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4490 (init_registers_powerpc_cell32l): Remove prototype.
4491 (init_registers_powerpc_cell64l): Likewise.
4492
4493 * target.h (struct target_ops): Remove qxfer_spu member.
4494 * server.c (handle_qxfer_spu): Remove.
4495 (qxfer_packets): Remove entry for "spu".
4496 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4497 * linux-low.c (SPUFS_MAGIC): Remove.
4498 (spu_enumerate_spu_ids): Remove.
4499 (linux_qxfer_spu): Remove.
4500 (linux_target_ops): Remove qxfer_spu member.
4501 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4502 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4503 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4504
4505 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4506
4507 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4508 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4509 * config.in: Regenerate.
4510 * configure: Regenerate.
4511
4512 2019-08-15 Tom Tromey <tromey@adacore.com>
4513
4514 * target.c (target_write_memory): Use gdb::byte_vector.
4515
4516 2019-08-15 Tom Tromey <tromey@adacore.com>
4517
4518 * tracepoint.c (write_inferior_data_pointer)
4519 (write_inferior_integer, write_inferior_int8)
4520 (write_inferior_uinteger, m_tracepoint_action_download)
4521 (r_tracepoint_action_download, x_tracepoint_action_download)
4522 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4523 (download_agent_expr, download_tracepoint_1)
4524 (download_trace_state_variables, upload_fast_traceframes): Update.
4525 * server.c (gdb_write_memory): Update.
4526 * remote-utils.c (relocate_instruction): Update.
4527 * proc-service.c (ps_pdwrite): Update.
4528 * mem-break.c (remove_memory_breakpoint)
4529 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4530 (uninsert_fast_tracepoint_jumps_at)
4531 (reinsert_fast_tracepoint_jumps_at): Update.
4532 * linux-x86-low.c (append_insns)
4533 (i386_install_fast_tracepoint_jump_pad)
4534 (amd64_write_goto_address, i386_write_goto_address): Update.
4535 * linux-s390-low.c (append_insns, s390_write_goto_address):
4536 Update.
4537 * linux-ppc-low.c (ppc_relocate_instruction)
4538 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4539 (ppc_write_goto_address): Update.
4540 * linux-aarch64-low.c (append_insns): Update.
4541 * target.h (struct target_ops): Update.
4542 (write_inferior_memory): Don't declare.
4543 * target.c (target_write_memory): Rename from
4544 write_inferior_memory. Remove old target_write_memory.
4545
4546 2019-08-15 Tom Tromey <tromey@adacore.com>
4547
4548 * target.c (write_inferior_memory): Use std::vector.
4549
4550 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4551
4552 PR build/24886
4553 * configure.ac: Drop enable-libmcheck support.
4554 * configure, config.in: Rebuild.
4555 * acinclude.m4: Don't include it.
4556
4557 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4558
4559 * configure.srv: Remove Arm xml files.
4560
4561 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4562
4563 * configure.srv: Add new files. Remove xml generated files.
4564 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4565 registers.
4566 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4567 * linux-aarch32-tdesc.c: New file.
4568 * linux-aarch32-tdesc.h: New file.
4569 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4570 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4571 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4572 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4573 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4574 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4575 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4576 (arm_read_description): Call arm_linux_read_description.
4577 (initialize_low_arch): Don't init registers.
4578 * linux-arm-tdesc.c: New file.
4579 * linux-arm-tdesc.h: New file.
4580
4581 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4582
4583 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4584 Move counter inside for.
4585 (arm_read_description): Check ptrace earlier.
4586 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4587
4588 2019-07-09 Tom Tromey <tom@tromey.com>
4589
4590 * configure: Rebuild.
4591 * configure.ac: Change common to gdbsupport.
4592 * acinclude.m4: Change common to gdbsupport.
4593 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4594 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4595 common to gdbsupport.
4596 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4597 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4598 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4599 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4600 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4601 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4602 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4603 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4604 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4605 common to gdbsupport.
4606
4607 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4608
4609 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4610 defines.
4611 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4612
4613 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4614
4615 * configure.srv: Remove legacy xml.
4616 * linux-aarch64-low.c (initialize_low_arch): Remove
4617 initialize_low_tdesc call.
4618 * linux-aarch64-tdesc-selftest.c: Remove file.
4619 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4620 * linux-x86-low.c (initialize_low_arch): Remove
4621 initialize_low_tdesc call.
4622 * linux-x86-tdesc-selftest.c: Remove file.
4623 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4624
4625 2019-06-20 Tom de Vries <tdevries@suse.de>
4626
4627 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4628 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4629
4630 2019-06-19 Tom de Vries <tdevries@suse.de>
4631
4632 * debug.h (debug_write): Change return type to ssize_t.
4633 * debug.c (debug_write): Same.
4634
4635 2019-06-14 Tom Tromey <tom@tromey.com>
4636
4637 * configure.ac: Use new path to gnulib.
4638 * configure: Rebuild.
4639 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4640 to gnulib.
4641
4642 2019-06-11 Tom Tromey <tom@tromey.com>
4643
4644 * Makefile.in (SFILES): Add alloc.c.
4645 (OBS): Add alloc.o.
4646 (IPA_OBJS): Add alloc-ipa.o.
4647 (alloc-ipa.o): New target.
4648 (%.o: ../%.c): New pattern rule.
4649
4650 2019-06-10 Tom Tromey <tromey@adacore.com>
4651
4652 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4653 end warning with a newline.
4654 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4655 newline.
4656 * thread-db.c (attach_thread): Don't end warning with a newline.
4657 (thread_db_notice_clone): Likewise.
4658 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4659 newline.
4660 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4661 end warning with a newline.
4662
4663 2019-06-04 Pedro Alves <palves@redhat.com>
4664
4665 * server.c (captured_main): Use make_unique_xstrdup.
4666
4667 2019-06-02 Tom Tromey <tom@tromey.com>
4668
4669 * gdbreplay.c (fromhex): Remove.
4670 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4671
4672 2019-05-29 Tom Tromey <tromey@adacore.com>
4673
4674 * configure: Rebuild.
4675
4676 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4677
4678 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4679 sign extension code on 32-bit builds.
4680
4681 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4682
4683 * remote-utils.c:
4684 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4685
4686 2019-04-19 Tom Tromey <tom@tromey.com>
4687
4688 * server.c (struct vstop_notif): Derive from notif_event.
4689 <base>: Remove.
4690 (queue_stop_reply): Update.
4691 (remove_all_on_match_ptid): Change type. Rewrite.
4692 (discard_queued_stop_replies): Rewrite.
4693 (in_queued_stop_replies_ptid): Change type.
4694 (in_queued_stop_replies): Rewrite.
4695 (notif_stop): Update.
4696 (queue_stop_reply_callback): Update.
4697 (captured_main): Don't call initialize_notif.
4698 (push_stop_notification): Update.
4699 * notif.c (notif_write_event, handle_notif_ack)
4700 (notif_event_enque, notif_push): Update.
4701 (notif_event_xfree, initialize_notif): Remove.
4702 * notif.h (struct notif_event): Include <list>, not
4703 "common/queue.h".
4704 (struct notif_server) <queue>: Now a std::list.
4705 (notif_event_p): Remove typedef.
4706 (initialize_notif): Don't declare.
4707 (struct notif_event): Add virtual destructor.
4708
4709 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4710
4711 * ax.c (ax_vdebug): Call debug_printf.
4712 * debug.c (debug_write): New function.
4713 * debug.h (debug_write): New declaration.
4714 * linux-low.c (sigchld_handler): Call debug_write.
4715
4716 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4717
4718 * debug.c (debug_set_output): New function.
4719 (debug_vprintf): Send output to debug_file.
4720 (debug_flush): Likewise.
4721 * debug.h (debug_set_output): New declaration.
4722 * server.c (handle_monitor_command): Add debug-file option.
4723 (captured_main): Likewise.
4724
4725 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4726
4727 * debug.c (remote_debug): Add definition.
4728 * debug.h (remote_debug): Add declaration.
4729 * hostio.c (remote_debug): Remove declaration.
4730 * remote-utils.c (struct ui_file): Likewise.
4731 (remote_debug): Likewise.
4732 * remote-utils.h (remote_debug): Likewise,
4733 * server.c (remote_debug): Remove definition.
4734
4735 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4736
4737 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4738 when using a 64-bit gdbserver.
4739
4740 2019-04-09 Tom Tromey <tromey@adacore.com>
4741
4742 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4743
4744 2019-04-08 Tom Tromey <tom@tromey.com>
4745
4746 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4747 throw.
4748 (linux_resume_one_lwp): Likewise.
4749
4750 2019-04-08 Tom Tromey <tom@tromey.com>
4751
4752 * gdbreplay.c: Update.
4753 * linux-low.c: Update.
4754 * server.c: Update.
4755
4756 2019-04-08 Tom Tromey <tom@tromey.com>
4757
4758 * server.c: Use C++ exception handling.
4759 * linux-low.c: Use C++ exception handling.
4760 * gdbreplay.c: Use C++ exception handling.
4761
4762 2019-04-08 Tom Tromey <tom@tromey.com>
4763
4764 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4765 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4766 (captured_main, main): Update.
4767 * gdbreplay.c (main): Update.
4768
4769 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4770
4771 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4772 value in argument pointer, return 1 if the entry is found and 0
4773 otherwise. Move comment.
4774 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4775 * linux-low.h (linux_get_auxv): Declare.
4776 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4777
4778 2019-04-05 Tom Tromey <tromey@adacore.com>
4779
4780 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4781 variables.
4782
4783 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4784
4785 * linux-low.c (AT_HWCAP2): Add define if not already included.
4786
4787 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4788
4789 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4790 (aarch64_arch_setup): Call linux_get_hwcap.
4791 * linux-arm-low.c (arm_get_hwcap): Remove function.
4792 (arm_read_description): Call linux_get_hwcap.
4793 * linux-low.c (linux_get_auxv): New function.
4794 (linux_get_hwcap): Likewise.
4795 (linux_get_hwcap2): Likewise.
4796 * linux-low.h (linux_get_hwcap): New declaration.
4797 (linux_get_hwcap2): Likewise.
4798 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4799 (ppc_arch_setup): Call linux_get_hwcap.
4800 * linux-s390-low.c (s390_get_hwcap): Remove function.
4801 (s390_arch_setup): Call linux_get_hwcap.
4802
4803 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4804 Jiong Wang <jiong.wang@arm.com>
4805
4806 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4807 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4808 to fail.
4809 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4810
4811 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4812 Jiong Wang <jiong.wang@arm.com>
4813
4814 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4815 (aarch64_get_hwcap): New function.
4816 (aarch64_arch_setup): Read APIA hwcap.
4817
4818 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4819 Jiong Wang <jiong.wang@arm.com>
4820
4821 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4822 (initialize_low_tracepoint): Likewise.
4823 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4824 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4825 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4826 (aarch64_linux_read_description): Likewise.
4827 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4828
4829 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4830
4831 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4832 i386_create_target_description for 'segments' parameter.
4833 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4834 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4835 * win32-i386-low.c (i386_arch_setup): Likewise.
4836
4837 2019-03-12 Tom Tromey <tromey@adacore.com>
4838
4839 * linux-low.c (iterate_over_lwps): Update.
4840
4841 2019-03-06 Tom Tromey <tom@tromey.com>
4842
4843 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4844 (captured_main): Use SCOPE_EXIT.
4845
4846 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4847
4848 * configure.srv: Use '$enable_unittest' instead of '$development'
4849 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4850 case.
4851
4852 2019-02-27 Tom Tromey <tromey@adacore.com>
4853
4854 * gdbreplay.c (logchar): Handle \r\n.
4855
4856 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4857
4858 * linux-low.c (linux_attach): Add process before lwp.
4859 * server.c (attach_inferior): Check if already attached.
4860
4861 2019-02-07 Tom Tromey <tom@tromey.com>
4862
4863 * x86-tdesc.h: Rename include guard.
4864 * x86-low.h: Add include guard.
4865 * wincecompat.h: Rename include guard.
4866 * win32-low.h: Add include guard.
4867 * utils.h: Rename include guard.
4868 * tracepoint.h: Rename include guard.
4869 * tdesc.h: Rename include guard.
4870 * target.h: Rename include guard.
4871 * server.h: Rename include guard.
4872 * remote-utils.h: Rename include guard.
4873 * regcache.h: Rename include guard.
4874 * nto-low.h: Rename include guard.
4875 * notif.h: Add include guard.
4876 * mem-break.h: Rename include guard.
4877 * lynx-low.h: Add include guard.
4878 * linux-x86-tdesc.h: Add include guard.
4879 * linux-s390-tdesc.h: Add include guard.
4880 * linux-ppc-tdesc-init.h: Add include guard.
4881 * linux-low.h: Add include guard.
4882 * linux-aarch64-tdesc.h: Add include guard.
4883 * linux-aarch32-low.h: Add include guard.
4884 * inferiors.h: Rename include guard.
4885 * i387-fp.h: Rename include guard.
4886 * hostio.h: Rename include guard.
4887 * gdbthread.h: Rename include guard.
4888 * gdb_proc_service.h: Rename include guard.
4889 * event-loop.h: Rename include guard.
4890 * dll.h: Rename include guard.
4891 * debug.h: Rename include guard.
4892 * ax.h: Rename include guard.
4893
4894 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4895
4896 PR gdb/23985
4897 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4898 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4899
4900 2019-01-25 Tom Tromey <tom@tromey.com>
4901
4902 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4903
4904 2019-01-25 Tom Tromey <tom@tromey.com>
4905
4906 * win32-low.c: Fix common/ includes.
4907 * win32-i386-low.c: Fix common/ includes.
4908 * tracepoint.c: Fix common/ includes.
4909 * thread-db.c: Fix common/ includes.
4910 * target.h: Fix common/ includes.
4911 * symbol.c: Fix common/ includes.
4912 * spu-low.c: Fix common/ includes.
4913 * server.h: Fix common/ includes.
4914 * server.c: Fix common/ includes.
4915 * remote-utils.c: Fix common/ includes.
4916 * regcache.h: Fix common/ includes.
4917 * regcache.c: Fix common/ includes.
4918 * nto-x86-low.c: Fix common/ includes.
4919 * notif.h: Fix common/ includes.
4920 * mem-break.h: Fix common/ includes.
4921 * lynx-low.c: Fix common/ includes.
4922 * lynx-i386-low.c: Fix common/ includes.
4923 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4924 * linux-x86-low.c: Fix common/ includes.
4925 * linux-low.c: Fix common/ includes.
4926 * inferiors.h: Fix common/ includes.
4927 * i387-fp.c: Fix common/ includes.
4928 * hostio.c: Fix common/ includes.
4929 * hostio-errno.c: Fix common/ includes.
4930 * gdbthread.h: Fix common/ includes.
4931 * gdbreplay.c: Fix common/ includes.
4932 * fork-child.c: Fix common/ includes.
4933 * event-loop.c: Fix common/ includes.
4934 * ax.c:
4935 (enum gdb_agent_op): Fix common/ includes.
4936
4937 2019-01-21 Tom Tromey <tom@tromey.com>
4938
4939 * tracepoint.c: Fix includes.
4940 * remote-utils.c: Fix includes.
4941 * linux-x86-low.c: Fix includes.
4942
4943 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4944
4945 * gdbreplay.c (gdbreplay_version): Update copyright year in
4946 version message.
4947 * server.c (gdbserver_version): Likewise.
4948
4949 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4950
4951 * linux-low.c (add_lwp): Switch ordering.
4952
4953 2018-11-29 Tom Tromey <tom@tromey.com>
4954
4955 * win32-low.c (win32_join): Take pid, not process.
4956 * target.h (struct target_ops) <join>: Change argument type.
4957 (join_inferior): Change argument name.
4958 * spu-low.c (spu_join): Take pid, not process.
4959 * server.c (handle_detach): Preserve pid before destroying
4960 process.
4961 * lynx-low.c (lynx_join): Take pid, not process.
4962 * linux-low.c (linux_join): Take pid, not process.
4963
4964 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4965
4966 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4967 (aarch64_cannot_fetch_register): Likewise.
4968 (struct linux_target_ops): Update references.
4969
4970 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4971
4972 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4973
4974 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4975
4976 * configure.srv (ipa_ppc_linux_regobj): Add
4977 powerpc-isa207-htm-vsx32l-ipa.o and
4978 powerpc-isa207-htm-vsx64l-ipa.o.
4979 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4980 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4981 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4982 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4983 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4984 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4985 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4986 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4987 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4988 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4989 (init_registers_powerpc_isa207_htm_vsx32l)
4990 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
4991 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
4992 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
4993 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
4994 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
4995 (ppc_store_tm_ctarregset): New functions.
4996 (ppc_regsets): Add entries for HTM regsets.
4997 (ppc_arch_setup): Set htm in features struct when needed. Set
4998 sizes for the HTM regsets.
4999 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5000 (initialize_low_arch): Call
5001 init_registers_powerpc_isa207_htm_vsx32l and
5002 init_registers_powerpc_isa207_htm_vsx64l.
5003 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5004 PPC_TDESC_ISA207_HTM_VSX.
5005 (initialize_low_tracepoint): Call
5006 init_registers_powerpc_isa207_htm_vsx32l and
5007 init_registers_powerpc_isa207_htm_vsx64l.
5008
5009 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5010
5011 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5012 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5013 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5014 (ppc_store_pmuregset): New functions.
5015 (ppc_regsets): Add entries for ebb and pmu regsets.
5016 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5017 pmu regsets are available. Set sizes for these regsets.
5018
5019 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5020
5021 * configure.srv (ipa_ppc_linux_regobj): Add
5022 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5023 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5024 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5025 rs6000/powerpc-isa207-vsx32l.xml, and
5026 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5027 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5028 <PPC_TDESC_ISA207_VSX>: New enum value.
5029 (init_registers_powerpc_isa207_vsx32l): Declare.
5030 (init_registers_powerpc_isa207_vsx64l): Declare.
5031 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5032 (ppc_store_tarregset): New function.
5033 (ppc_regsets): Add entry for the TAR regset.
5034 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5035 size for the TAR regsets.
5036 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5037 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5038 and init_registers_powerpc_isa207_vsx64l.
5039 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5040 (initialize_low_tracepoint): Call
5041 init_registers_powerpc_isa207_vsx32l and
5042 init_registers_powerpc_isa207_vsx64l.
5043
5044 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5045 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5046
5047 * configure.srv (ipa_ppc_linux_regobj): Add
5048 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5049 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5050 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5051 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5052 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5053 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5054 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5055 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5056 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5057 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5058 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5059 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5060 (ppc_hwcap): Add comment.
5061 (ppc_hwcap2): New global.
5062 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5063 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5064 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5065 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5066 when needed. Set sizes for the the DSCR and PPR regsets.
5067 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5068 (initialize_low_arch): Call
5069 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5070 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5071 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5072 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5073 (initialize_low_tracepoint): Call
5074 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5075 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5076
5077 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5078
5079 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5080
5081 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5082 Simon Marchi <simark@simark.ca>
5083
5084 * acinclude.m4: Include "../selftest.m4".
5085 * configure: Regenerate.
5086 * configure.ac: Use "GDB_AC_SELFTEST".
5087 * configure.srv: Use "$enable_unittests" instead of
5088 "$development" when checking whether unit tests have been
5089 enabled.
5090 * server.c (captured_main): Update message informing that
5091 selftests have been disabled.
5092
5093 2018-10-04 Tom Tromey <tom@tromey.com>
5094
5095 * configure: Rebuild.
5096
5097 2018-10-04 Tom Tromey <tom@tromey.com>
5098
5099 * server.c (handle_status): Rename inner "thread".
5100 (process_serial_event): Declare "res" in 'm' case.
5101 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5102 (iterate_over_lwps): Rename inner "thread".
5103 (linux_qxfer_libraries_svr4): Rename inner "len".
5104 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5105
5106 2018-10-01 Gary Benson <gbenson@redhat.com>
5107
5108 * gdb_proc_service.h: Moved common code to
5109 common/gdb_proc_service.h.
5110
5111 2018-10-01 Gary Benson <gbenson@redhat.com>
5112
5113 * gdb_proc_service.h: Synchronize comments and whitespace with
5114 GDB's version of this file.
5115
5116 2018-09-25 Tom Tromey <tom@tromey.com>
5117
5118 * configure: Rebuild.
5119 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5120
5121 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5122
5123 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5124 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5125 ($(IPA_LIB)): Sort IPA_OBJS.
5126
5127 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5128
5129 * Makefile.in: Remove references to $(ADD_DEPS).
5130
5131 2018-09-16 Tom Tromey <tom@tromey.com>
5132
5133 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5134 variables.
5135 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5136 variables.
5137
5138 2018-09-05 Tom Tromey <tom@tromey.com>
5139
5140 * configure: Rebuild.
5141
5142 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5143
5144 PR build/23399
5145 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5146
5147 2018-08-27 Tom Tromey <tom@tromey.com>
5148
5149 PR build/23087:
5150 * configure: Rebuild.
5151
5152 2018-08-27 Tom Tromey <tom@tromey.com>
5153
5154 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5155 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5156 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5157 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5158 (s390x_emit_stack_adjust): Add casts to unsigned char.
5159
5160 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5161
5162 PR gdb/23374
5163 PR gdb/23375
5164 * server.h (struct client_state) <disable_randomization>:
5165 Initialize to 1.
5166
5167 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5168
5169 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5170 variable.
5171 (mips_supply_ptrace_register): Likewise.
5172
5173 2018-07-22 Tom Tromey <tom@tromey.com>
5174
5175 * configure: Rebuild.
5176
5177 2018-07-22 Tom Tromey <tom@tromey.com>
5178
5179 * win32-low.c (win32_create_inferior): Remove unused variables.
5180 * gdbreplay.c (remote_open): Remove unused variable.
5181 * remote-utils.c (remote_prepare): Remove unused variable.
5182 * x86-tdesc.h (X86_TDESC_H): Define.
5183 (amd64_expedite_regs): Define conditionally.
5184 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5185 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5186 * remote-utils.c (readchar): Remove unused variable.
5187
5188 2018-07-13 Pedro Alves <palves@redhat.com>
5189
5190 * linux-low.c (linux_kill): Change parameter to process_info
5191 pointer instead of pid. Adjust.
5192 * lynx-low.c (lynx_kill): Likewise.
5193 * nto-low.c (nto_kill): Likewise.
5194 * spu-low.c (spu_kill): Likewise.
5195 * win32-low.c (win32_kill): Likewise.
5196 * server.c (handle_v_kill, kill_inferior_callback)
5197 (detach_or_kill_for_exit): Adjust.
5198 * target.c (kill_inferior): Change parameter to process_info
5199 pointer instead of pid. Adjust.
5200 * target.h (struct target_ops) <kill>: Change parameter to
5201 process_info pointer instead of pid. Adjust all implementations
5202 and callers.
5203 (kill_inferior): Likewise.
5204
5205 2018-07-13 Pedro Alves <palves@redhat.com>
5206
5207 * linux-low.c (linux_detach, linux_join): Change parameter to
5208 process_info pointer instead of pid. Adjust.
5209 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5210 * nto-low.c (nto_detach): Likewise.
5211 * spu-low.c (spu_detach, spu_join): Likewise.
5212 * win32-low.c (win32_detach, win32_join): Likewise.
5213 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5214 * target.h (struct target_ops) <detach, join>: Change parameter to
5215 process_info pointer instead of pid. Adjust all implementations
5216 and callers.
5217 (detach_inferior, join_inferior): Rename 'pid' parameter to
5218 'proc'.
5219
5220 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5221 Jan Kratochvil <jan.kratochvil@redhat.com>
5222 Paul Fertser <fercerpav@gmail.com>
5223 Tsutomu Seki <sekiriki@gmail.com>
5224
5225 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5226 (OBS): Add 'common/netstuff.o'.
5227 (GDBREPLAY_OBS): Likewise.
5228 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5229 (remote_open): Implement support for IPv6
5230 connections.
5231 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5232 and 'wspiapi.h'.
5233 (handle_accept_event): Accept connections from IPv6 sources.
5234 (remote_prepare): Handle IPv6-style hostnames; implement
5235 support for IPv6 connections.
5236 (remote_open): Implement support for printing connections from
5237 IPv6 sources.
5238
5239 2018-07-11 Pedro Alves <palves@redhat.com>
5240
5241 PR gdb/23377
5242 * mem-break.c (any_persistent_commands): Add process_info
5243 parameter and use it instead of relying on the current process.
5244 Change return type to bool.
5245 * mem-break.h (any_persistent_commands): Add process_info
5246 parameter and change return type to bool.
5247 * server.c (handle_detach): Remove require_running_or_return call.
5248 Look up the process_info for the process we're about to detach.
5249 If not found, return back error to GDB. Adjust
5250 any_persistent_commands call to pass down a process pointer.
5251
5252 2018-07-11 Pedro Alves <palves@redhat.com>
5253
5254 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5255 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5256 instead of collect_register_by_name.
5257 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5258 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5259
5260 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5261 Pedro Alves <palves@redhat.com>
5262
5263 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5264
5265 2018-07-03 Tom Tromey <tom@tromey.com>
5266
5267 * linux-low.c: Update.
5268 * lynx-low.c: Update.
5269 * mem-break.c: Update.
5270 * nto-low.c: Update.
5271 * remote-utils.c: Update.
5272 * server.c: Update.
5273 * spu-low.c: Update.
5274 * target.c: Update.
5275 * win32-low.c: Update.
5276
5277 2018-07-03 Tom Tromey <tom@tromey.com>
5278
5279 * server.c: Update.
5280
5281 2018-07-03 Tom Tromey <tom@tromey.com>
5282
5283 * linux-low.c: Update.
5284
5285 2018-07-03 Tom Tromey <tom@tromey.com>
5286
5287 * target.c: Update.
5288
5289 2018-07-03 Tom Tromey <tom@tromey.com>
5290
5291 * linux-low.c: Update.
5292 * linux-mips-low.c: Update.
5293 * lynx-low.c: Update.
5294 * nto-low.c: Update.
5295 * remote-utils.c: Update.
5296 * server.c: Update.
5297 * spu-low.c: Update.
5298 * target.c: Update.
5299 * thread-db.c: Update.
5300
5301 2018-07-03 Tom Tromey <tom@tromey.com>
5302
5303 * linux-low.c: Update.
5304 * linux-mips-low.c: Update.
5305 * lynx-low.c: Update.
5306 * mem-break.c: Update.
5307 * nto-low.c: Update.
5308 * remote-utils.c: Update.
5309 * server.c: Update.
5310 * spu-low.c: Update.
5311 * target.c: Update.
5312 * tracepoint.c: Update.
5313
5314 2018-07-03 Tom Tromey <tom@tromey.com>
5315
5316 * linux-low.c: Update.
5317 * linux-ppc-low.c: Update.
5318 * linux-x86-low.c: Update.
5319 * proc-service.c: Update.
5320 * server.c: Update.
5321 * spu-low.c: Update.
5322 * thread-db.c: Update.
5323 * win32-low.c: Update.
5324
5325 2018-07-03 Tom Tromey <tom@tromey.com>
5326
5327 * linux-low.c: Update.
5328 * lynx-low.c: Update.
5329 * nto-low.c: Update.
5330 * remote-utils.c: Update.
5331 * spu-low.c: Update.
5332 * thread-db.c: Update.
5333 * win32-low.c: Update.
5334
5335 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5336
5337 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5338 parameter in call to 'amd64_create_target_description'.
5339
5340 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5341
5342 * x86-tdesc.h: Remove executable permission flag.
5343
5344 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5345
5346 * configure.ac: Remove AC_PREREQ, add missing quoting.
5347 * configure: Re-generate.
5348 * config.in: Re-generate.
5349 * aclocal.m4: Re-generate.
5350
5351 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5352
5353 * tracepoint.h (current_traceframe): Remove declaration.
5354
5355 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5356
5357 * linux-aarch64-low.c (is_sve_tdesc): New function.
5358 (aarch64_sve_regs_copy_to_regcache): Likewise.
5359 (aarch64_sve_regs_copy_from_regcache): Likewise.
5360 (aarch64_regs_info): Add SVE checks.
5361 (initialize_low_arch): Initialize SVE.
5362
5363 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5364
5365 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5366
5367 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5368
5369 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5370 (initialize_low_tracepoint): Likewise
5371 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5372 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5373 param.
5374 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5375 checks.
5376 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5377
5378 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5379
5380 * server.h (PBUFSIZ): Increase size
5381
5382 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5383
5384 * regcache.c (regcache::raw_compare): New function.
5385 * regcache.h (regcache::raw_compare): New declaration.
5386
5387 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5388
5389 * regcache.c (new_register_cache): Use new.
5390 (free_register_cache): Use delete.
5391 (register_data): Use const.
5392 (supply_register): Move body inside regcache.
5393 (regcache::raw_supply): New override function.
5394 (collect_register): Move body inside regcache.
5395 (regcache::raw_collect): New override function.
5396 (regcache::get_register_status): New override function.
5397 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5398
5399 2018-06-09 Tom Tromey <tom@tromey.com>
5400
5401 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5402 declare queue.
5403 (event_queue): Use std::queue.
5404 (gdb_event_xfree): Remove.
5405 (initialize_event_loop, process_event, wait_for_event): Update.
5406
5407 2018-06-08 Stan Cox <scox@redhat.com>
5408
5409 * win32-low.c (win32_create_inferior): last_ptid and last_status
5410 moved to client_state.
5411
5412 2018-06-08 Pedro Alves <palves@redhat.com>
5413
5414 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5415 common/common-exceptions.o, common/common-utils.o,
5416 common/errors.o, common/print-utils.o and utils.o.
5417 * gdbreplay.c: Include "common-defs.h" instead of the two
5418 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5419 string.h or alloca.h.
5420 (perror_with_name): Delete.
5421 (remote_open): Use xstrdup instead of strdup.
5422 (main): Rename to ...
5423 (captured_main): ... this.
5424 (main): New.
5425
5426 2018-06-08 Tom Tromey <tom@tromey.com>
5427
5428 * linux-low.c (linux_low_read_btrace): Update.
5429
5430 2018-06-04 Stan Cox <scox@redhat.com>
5431
5432 * server.h (struct client_state): New.
5433 * server.c (cont_thread, general_thread, multi_process)
5434 (report_fork_events, report_vfork_events, report_exec_events)
5435 (report_thread_events, swbreak_feature, hwbreak_feature)
5436 (vCont_supported, disable_randomization, pass_signals)
5437 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5438 Moved to client_state.
5439 * remote-utils.c (remote_debug, noack_mode)
5440 (transport_is_reliable): Moved to client_state.
5441 * tracepoint.c (current_traceframe): Moved to client_state.
5442
5443 Update all callers.
5444 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5445 linux-low.c, remote-utils.h, target.c: Use client_state.
5446
5447 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5448
5449 * configure.srv: Add new c/h file.
5450
5451 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5452
5453 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5454 null VQ.
5455
5456 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5457
5458 * gdb.arch/mips-fpregset-core.exp: New test.
5459 * gdb.arch/mips-fpregset-core.c: New test source.
5460
5461 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5462
5463 PR server/23198
5464 * hostio.c (require_int): Do not report overflow for integers
5465 between 0xfffffff and 0x7fffffff.
5466
5467 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5468
5469 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5470 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5471 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5472 functions.
5473 (the_low_target): Wire them.
5474
5475 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5476
5477 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5478 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5479 mode. Call collect_register_by_name with vscr using
5480 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5481 (ppc_store_vrregset): Add and set vscr_offset variable as in
5482 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5483 vscr_offset.
5484
5485 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5486
5487 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5488 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5489 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5490
5491 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5492
5493 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5494 (ppc_store_vsxregset): Likewise.
5495 (ppc_fill_vrregset): Likewise.
5496 (ppc_store_vrregset): Likewise.
5497 (ppc_fill_evrregset): Likewise.
5498 (ppc_store_evrregset): Likewise.
5499 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5500 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5501 needed.
5502
5503 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5504
5505 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5506 wordsize of the inferior. Call ppc_linux_target_wordsize.
5507
5508 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5509
5510 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5511 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5512 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5513 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5514 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5515 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5516 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5517 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5518 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5519 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5520 (tdesc_powerpc_e500l): Remove.
5521 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5522 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5523 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5524 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5525 linux-ppc-tdesc.h.
5526 (ppc_arch_setup): Remove target description matching code. Fill a
5527 ppc_linux_features struct and call ppc_linux_match_description
5528 with it.
5529
5530 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5531
5532 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5533 width of the requested register exceeds the width of the
5534 `ptrace' data type.
5535 (mips_cannot_store_register): Likewise.
5536
5537 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5538
5539 * linux-mips-low.c (mips_fetch_register): New function. Update
5540 preceding comment.
5541 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5542 (the_low_target): Wire `mips_fetch_register'.
5543
5544 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5545
5546 * lynx-i386-low.c (LYNXOS_178): New macro.
5547 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5548 the layout on LynxOS-178.
5549 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5550 handle floating point registers that are not supported by
5551 LynxOS-178.
5552
5553 2018-05-10 Tom Tromey <tom@tromey.com>
5554
5555 * configure: Rebuild.
5556
5557 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5558
5559 PR server/23158:
5560 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5561 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5562 Use it to set the expedite_regs field in the given tdesc.
5563 * x86-tdesc.h: New file.
5564 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5565 Adjust following the addition of the new expedite_regs parameter
5566 to init_target_desc.
5567 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5568 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5569 (i386_linux_read_description, amd64_linux_read_description):
5570 Adjust following the addition of the new expedite_regs parameter
5571 to init_target_desc.
5572 * lynx-i386-low.c: #include "x86-tdesc.h".
5573 (lynx_i386_arch_setup): Adjust following the addition of the new
5574 expedite_regs parameter to init_target_desc.
5575 * nto-x86-low.c: #include "x86-tdesc.h".
5576 (nto_x86_arch_setup): Adjust following the addition of the new
5577 expedite_regs parameter to init_target_desc.
5578 * win32-i386-low.c: #include "x86-tdesc.h".
5579 (i386_arch_setup): Adjust following the addition of the new
5580 expedite_regs parameter to init_target_desc.
5581
5582 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5583
5584 PR server/23158:
5585 * win32-low.c (win32_create_inferior): Add call to my_wait
5586 setting last_status global.
5587
5588 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5589
5590 PR server/23158:
5591 * win32-low.c (create_process): Only call gdb_tilde_expand if
5592 inferior_cwd is not NULL.
5593
5594 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5595
5596 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5597 registers to the cache if their values have changed.
5598 (i387_xsave_to_cache): Provide default values for x87 control
5599 registers when these features are available, but disabled.
5600 * regcache.c (supply_register_by_name_zeroed): New function.
5601 * regcache.h (supply_register_by_name_zeroed): Declare new
5602 function.
5603
5604 2018-05-07 Tom Tromey <tom@tromey.com>
5605
5606 * configure: Rebuild.
5607
5608 2018-05-04 Tom Tromey <tom@tromey.com>
5609
5610 * configure: Rebuild.
5611
5612 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5613 Pedro Alves <palves@redhat.com>
5614
5615 * linux-aarch64-low.c (aarch64_stopped_data_address):
5616 Likewise.
5617
5618 2018-04-27 Tom Tromey <tom@tromey.com>
5619
5620 * configure: Rebuild.
5621
5622 2018-04-23 Tom Tromey <tom@tromey.com>
5623
5624 * configure: Rebuild.
5625
5626 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5627
5628 * Makefile.in (depcomp): Add "..".
5629 (all_deps_files): New and use it.
5630
5631 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5632
5633 * configure.srv (aarch64*-*-linux*): Don't include xml.
5634 (i[34567]86-*-cygwin*): Likewise.
5635 (i[34567]86-*-linux*): Likewise.
5636 (i[34567]86-*-lynxos*): Likewise.
5637 (i[34567]86-*-mingw32ce*): Likewise.
5638 (i[34567]86-*-mingw*): Likewise.
5639 (i[34567]86-*-nto*): Likewise.
5640 (tic6x-*-uclinux): Likewise.
5641 (x86_64-*-linux*): Likewise.
5642 (x86_64-*-mingw*): Likewise.
5643 (x86_64-*-cygwin*): Likewise.
5644
5645 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5646
5647 * tdesc.c: Remove xml parameter.
5648
5649 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5650
5651 * server.c (get_features_xml): Remove cast.
5652 * tdesc.c (void target_desc::accept): Fill in function.
5653 (tdesc_get_features_xml): Remove old xml creation.
5654 (print_xml_feature::visit_pre): Add xml vistor.
5655 * tdesc.h (struct target_desc): Make xmltarget mutable.
5656 (tdesc_get_features_xml): Remove declaration.
5657
5658 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5659
5660 * tdesc.c (tdesc_architecture_name): Add new function.
5661 (tdesc_osabi_name): Likewise.
5662 (tdesc_get_features_xml): Use new functions.
5663
5664 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5665
5666 * tdesc.c (tdesc_create_flags): Remove.
5667 (tdesc_add_flag): Likewise.
5668 (tdesc_named_type): Likewise.
5669 (tdesc_create_union): Likewise.
5670 (tdesc_create_struct): Likewise.
5671 (tdesc_create_vector): Likewise.
5672 (tdesc_add_bitfield): Likewise.
5673 (tdesc_add_field): Likewise.
5674 (tdesc_set_struct_size): Likewise.
5675
5676 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5677
5678 * tdesc.c (~target_desc): Remove implictly deleted items.
5679 (init_target_desc): Iterate all features.
5680 (tdesc_get_features_xml): Use vector.
5681 (tdesc_create_feature): Create feature.
5682 * tdesc.h (tdesc_feature) Remove
5683 (target_desc): Add features.
5684
5685 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5686
5687 * Makefile.in: Add common/tdesc.c
5688 * tdesc.c (init_target_desc): init all reg_defs from register
5689 vector.
5690 (tdesc_create_reg): Create tdesc_reg.
5691 * tdesc.h (tdesc_feature): Add register vector.
5692
5693 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5694
5695 * tdesc.h (struct target_desc) <features>: Change type to
5696 std::vector<std::string>.
5697 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5698 changes.
5699 (tdesc_get_features_xml): Likewise.
5700 (tdesc_create_feature): Likewise.
5701
5702 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5703
5704 * regcache.c (find_register_by_number): Return a ref.
5705 (find_regno): Use references.
5706 (register_size): Likewise.
5707 (register_data): Likewise.
5708 * tdesc.c (target_desc::~target_desc): Remove free calls.
5709 (target_desc::operator==): Use std::vector compare.
5710 (init_target_desc): Use reference.
5711 (tdesc_create_reg): Use reg constructors.
5712 * tdesc.h (struct target_desc): Replace pointer with object.
5713
5714 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5715
5716 * regcache.c (find_register_by_number): Make static.
5717 (find_regno): Use find_register_by_number
5718 * regcache.h (struct reg): Remove declaration.
5719
5720 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5721
5722 * tdesc.c (target_desc::~target_desc): Move to here.
5723 (target_desc::operator==): Likewise.
5724 * tdesc.h (target_desc::~target_desc): Move from here.
5725 (target_desc::operator==): Likewise.
5726
5727 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5728
5729 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5730
5731 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5732
5733 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5734 S390_TDESC_GS.
5735 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5736 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5737 and init_registers_s390_gs_linux64.
5738
5739 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5740
5741 * linux-s390-low.c (s390_fill_gs): Remove function.
5742 (s390_fill_gsbc): Remove function.
5743 (s390_regsets): Set fill functions for the guarded storage regsets
5744 to NULL.
5745
5746 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5747
5748 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5749 the word size. Add comment.
5750 (s390_get_wordsize): New function.
5751 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5752 pswm with it. Instead, use s390_get_wordsize to determine the
5753 word size first and derive the correct tdesc from that directly.
5754
5755 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5756
5757 * Makefile.in: Include silent-rules.mk.
5758 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5759 (COMPILE): Add ECHO_CXX.
5760 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5761 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5762 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5763 (version-generated.c): Add ECHO_GEN.
5764 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5765 (IPAGENT_COMPILE): Add ECHO_CXX.
5766 (%-generated.c): Add ECHO_REGDAT.
5767
5768 2018-03-14 Tom Tromey <tom@tromey.com>
5769
5770 PR cli/14977:
5771 * ax.c (ax_printf): Special case for NULL.
5772
5773 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5774
5775 * linux-low.c (linux_qxfer_libraries_svr4): Use
5776 xml_escape_text_append.
5777
5778 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5779
5780 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5781
5782 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5783
5784 * server.c (handle_general_set): Remove unnecessary xstrdup.
5785
5786 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5787
5788 * server.c (parse_debug_format_options): Adjust to
5789 delim_string_to_char_ptr_vec changes.
5790 * thread-db.c (thread_db_load_search): Adjust to
5791 dirnames_to_char_ptr_vec changes.
5792
5793 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5794
5795 * target.h (target_enable_btrace, target_disable_btrace)
5796 (target_read_btrace, target_read_btrace_conf): Turn macro into
5797 inline function. Throw error if target method is not defined.
5798 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5799 check for btrace target method. Be prepared to handle exceptions
5800 from btrace target methods.
5801
5802 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5803
5804 * server.c (captured_main): Change order of error message printed
5805 when the current working directory cannot be found.
5806
5807 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5808
5809 * server.c: Include "filenames.h" and "pathstuff.h".
5810 (program_name): Delete variable.
5811 (program_path): New anonymous class.
5812 (get_exec_wrapper): Use "program_path" instead of
5813 "program_name".
5814 (handle_v_run): Likewise.
5815 (captured_main): Likewise.
5816 (process_serial_event): Likewise.
5817
5818 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5819
5820 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5821 (OBJS): Add "pathstuff.o".
5822 * server.c (current_directory): New global variable.
5823 (captured_main): Initialize "current_directory".
5824
5825 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5826
5827 * tdesc.c: Use common/tdesc.h.
5828 * tdesc.h: Likewise.
5829
5830 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5831 Simon Marchi <simon.marchi@ericsson.com>
5832
5833 * Makefile.in: Switch order of make rules.
5834
5835 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5836
5837 * Makefile.in: Add common directory in build.
5838 * configure.ac: Add common reference.
5839 * configure: Regenerate.
5840
5841 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5842
5843 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5844 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5845 * spu-low.c (spu_target_ops): Likewise.
5846 * win32-low.c (win32_target_ops): Likewise.
5847 * server.c (supported_btrace_packets): Report packets unconditionally.
5848 * target.h (target_ops) <supports_btrace>: Remove.
5849 (target_supports_btrace): Remove.
5850
5851 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5852
5853 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5854 (handle_btrace_disable): Change return type to void. Use exceptions
5855 to report errors.
5856 (handle_btrace_general_set): Catch exception and copy message to
5857 return message.
5858
5859 2018-02-08 Tom Tromey <tom@tromey.com>
5860
5861 * linux-low.c (install_software_single_step_breakpoints): Use
5862 make_scoped_restore.
5863 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5864 (do_restore_current_thread_cleanup): Remove.
5865 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5866 declare.
5867
5868 2018-02-08 Tom Tromey <tom@tromey.com>
5869
5870 * mem-break.c (set_raw_breakpoint_at): Use
5871 gdb::unique_xmalloc_ptr.
5872
5873 2018-01-30 Pedro Alves <palves@redhat.com>
5874
5875 PR gdb/13211
5876 * target.c (target_terminal::terminal_state): Rename to ...
5877 (target_terminal::m_terminal_state): ... this.
5878
5879 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5880
5881 * linux-low.c (handle_extended_wait): Surround call to
5882 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5883
5884 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5885
5886 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5887 linux_ptrace_attach_fail_reason_string now returning an
5888 std::string.
5889 (linux_attach): Likewise.
5890 * thread-db.c (attach_thread): Likewise.
5891
5892 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5893
5894 PR gdb/21559
5895 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5896 checking for fs_base/gs_base fields in struct user_regs_struct.
5897 * configure: Regenerate.
5898
5899 2018-01-16 Yao Qi <yao.qi@linaro.org>
5900
5901 PR gdb/18749
5902 * linux-low.c (fetch_register): Call supply_register instead of
5903 error.
5904
5905 2018-01-08 Yao Qi <yao.qi@linaro.org>
5906 Simon Marchi <simon.marchi@ericsson.com>
5907
5908 * Makefile.in (OBS): Remove selftest.o.
5909 * configure.ac: Set srv_selftest_objs if $development is true.
5910 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5911 * configure: Re-generated.
5912 * server.c (captured_main): Wrap variable selftest_filter with
5913 GDB_SELF_TEST.
5914
5915 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5916
5917 * server.c (parse_debug_format_options): Return std::string.
5918 (handle_monitor_command, captured_main): Adjust.
5919
5920 2018-01-05 Pedro Alves <palves@redhat.com>
5921
5922 PR gdb/18653
5923 * server.c (captured_main): Pass quiet=false to
5924 save_original_signals_state.
5925
5926 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5927
5928 * gdbreplay.c (gdbreplay_version): Update copyright year in
5929 version message.
5930 * server.c (gdbserver_version): Likewise.
5931
5932 2017-12-08 Tom Tromey <tom@tromey.com>
5933
5934 * ax.c (ax_printf): Update.
5935
5936 2017-12-07 Yao Qi <yao.qi@linaro.org>
5937
5938 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5939 aarch64_linux_read_description.
5940 * linux-amd64-ipa.c (idx2mask): New array.
5941 (get_ipa_tdesc): Move idx2mask out.
5942 (initialize_low_tracepoint): Initialize target descriptions.
5943 * linux-i386-ipa.c (idx2mask): New array.
5944 (get_ipa_tdesc): Move idx2mask out.
5945 (initialize_low_tracepoint): Initialize target descriptions.
5946
5947 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5948
5949 * tdesc.c (struct tdesc_type): Change return type.
5950 (tdesc_add_flag): Change parameter type.
5951 (tdesc_add_bitfield): Likewise.
5952 (tdesc_add_field): Likewise.
5953 (tdesc_set_struct_size): Likewise.
5954
5955 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5956
5957 * regcache.c (registers_to_string): Remove unused variable.
5958
5959 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5960
5961 * inferiors.c (for_each_inferior_with_data): Remove.
5962 * inferiors.h (for_each_inferior_with_data): Remove.
5963 * server.c (handle_qxfer_threads_worker): Change parameter type.
5964 (handle_qxfer_threads_proper): Use for_each_thread.
5965
5966 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5967
5968 * inferiors.c (for_each_inferior): Remove.
5969 (clear_inferiors): Use for_each_thread.
5970 * inferiors.h (for_each_inferior): Remove.
5971 * linux-low.c (linux_wait_for_event_filtered): Use
5972 for_each_thread.
5973 (linux_stabilize_threads): Likewise.
5974 * regcache.c (regcache_release): Likewise.
5975 * server.c (gdb_wants_all_threads_stopped): Likewise.
5976 (clear_pending_status_callback): Remove.
5977 (handle_status): Use for_each_thread.
5978 (captured_main): Likewise.
5979 * win32-low.c (child_init_thread_list): Likewise.
5980 (win32_clear_inferiors): Likewise.
5981 (fake_breakpoint_event): Likewise.
5982
5983 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5984
5985 * inferiors.h (find_inferior): Remove.
5986 * inferiors.c (find_inferior): Remove.
5987
5988 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5989
5990 * linux-low.c (resume_status_pending_p): Update comment.
5991 (need_step_over_p): Update comment.
5992
5993 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5994
5995 * linux-low.c (proceed_one_lwp): Return void, change parameter
5996 type.
5997 (unsuspend_and_proceed_one_lwp): Likewise.
5998 (proceed_all_lwps): Use for_each_thread.
5999 (unstop_all_lwps): Likewise.
6000
6001 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6002
6003 * linux-low.c (linux_resume_one_thread): Return void, take
6004 parameter directly.
6005 (linux_resume): Use for_each_thread.
6006
6007 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6008
6009 * linux-low.c (send_sigstop_callback): Return void, change
6010 parameter type. Rename to...
6011 (send_sigstop): ... this.
6012 (suspend_and_send_sigstop_callback): Return void, change parameter
6013 type. Rename to...
6014 (suspend_and_send_sigstop): ... this.
6015 (stop_all_lwps): Use for_each_thread.
6016
6017 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6018
6019 * linux-low.c (lwp_running): Return bool, remove unused
6020 argument.
6021 (linux_stabilize_threads): Use find_thread.
6022
6023 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6024
6025 * linux-low.c (select_singlestep_lwp_callback): Remove.
6026 (count_events_callback): Remove.
6027 (select_event_lwp_callback): Remove.
6028 (select_event_lwp): Use find_thread/for_each_thread.
6029
6030 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6031
6032 * linux-low.c (not_stopped_callback): Return bool, take filter
6033 argument directly.
6034 (linux_wait_for_event_filtered): Use find_thread.
6035 (linux_wait_1): Likewise.
6036
6037 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6038
6039 * linux-low.c (same_lwp): Remove.
6040 (find_lwp_pid): Use find_thread.
6041
6042 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6043
6044 * linux-low.c (delete_lwp_callback): Remove.
6045 (linux_mourn): Use for_each_thread.
6046
6047 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6048
6049 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6050 args parameter, don't check for pid.
6051 (linux_detach): Use for_each_thread.
6052
6053 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6054
6055 * linux-low.c (struct counter): Remove.
6056 (second_thread_of_pid_p): Remove.
6057 (last_thread_of_process_p): Use find_thread.
6058
6059 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6060
6061 * inferiors.c (find_inferior_in_random): Remove.
6062 * inferiors.h (find_inferior_in_random): Remove.
6063 * linux-low.c (status_pending_p_callback): Return bool, accept
6064 parameter ptid directly.
6065 (linux_wait_for_event_filtered): Use find_thread_in_random.
6066 (linux_wait_1): Likewise.
6067
6068 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6069
6070 * inferiors.c (find_inferior_id): Remove.
6071 (find_thread_ptid): Move implemention from find_inferior_id to
6072 here.
6073 * inferiors.h (find_inferior_id): Remove.
6074 * server.c (handle_status): Use find_thread_ptid.
6075 (process_serial_event): Likewise.
6076 * thread-db.c (find_one_thread): Likewise.
6077 (thread_db_thread_handle): Likewise.
6078 * win32-low.c (thread_rec): Likewise.
6079 (child_delete_thread): Likewise.
6080 (win32_thread_alive): Likewise.
6081 (get_child_debug_event): Likewise.
6082
6083 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6084
6085 * linux-mips-low.c (update_watch_registers_callback): Return
6086 void, remove pid_p parameter, don't check for pid.
6087 (mips_insert_point, mips_remove_point): Use for_each_thread.
6088
6089 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6090
6091 * lynx.low (lynx_delete_thread_callback): Remove.
6092 (lynx_mourn): Use for_each_thread.
6093
6094 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6095
6096 * regcache.c (regcache_invalidate_one): Remove.
6097 (regcache_invalidate_pid): use for_each_thread.
6098
6099 2017-11-26 Tom Tromey <tom@tromey.com>
6100
6101 * linux-low.c (linux_create_inferior): Update.
6102
6103 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6104
6105 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6106
6107 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6108
6109 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6110 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6111 * linux-aarch64-tdesc-selftest.c: New file.
6112 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6113
6114 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6115
6116 * configure.srv: Add new file.
6117 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6118 * linux-aarch64-tdesc-selftest.c: New file.
6119 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6120
6121 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6122
6123 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6124 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6125 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6126
6127 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6128
6129 * configure.srv: Add new files.
6130 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6131 aarch64_linux_read_description.
6132 * linux-aarch64-low.c (aarch64_linux_read_description):
6133 Merge with aarch64_arch_setup.
6134 (aarch64_arch_setup): Call aarch64_linux_read_description.
6135 * linux-aarch64-tdesc.c: New file.
6136 * linux-aarch64-tdesc.h: New file.
6137
6138 2017-11-24 Yao Qi <yao.qi@linaro.org>
6139
6140 * configure.srv: Set $srv_regobj for tic6x-linux.
6141 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6142 (tic6x_read_description): Move some code to tic6x_arch_setup.
6143 (tic6x_tdesc_test): New function.
6144 (initialize_low_arch): Call selftests::register_test.
6145
6146 2017-11-22 Yao Qi <yao.qi@linaro.org>
6147
6148 * remote-utils.c (prepare_resume_reply): Use memcpy.
6149
6150 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6151
6152 * linux-low.c (kill_one_lwp_callback): Return void, take
6153 argument directly, don't filter on pid.
6154 (linux_kill): Use for_each_thread.
6155
6156 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6157
6158 * linux-low.c (need_step_over_p): Return bool, remove dummy
6159 argument.
6160 (linux_resume, proceed_all_lwps): Use find_thread.
6161
6162 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6163
6164 * linux-low.c (resume_status_pending_p): Return bool, remove
6165 flag_p argument.
6166 (linux_resume): Use find_thread.
6167
6168 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6169
6170 * linux-low.c (struct thread_resume_array): Remove.
6171 (linux_set_resume_request): Return void, take arguments
6172 directly.
6173 (linux_resume): Use for_each_thread.
6174
6175 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6176
6177 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6178 return bool, remove data argument.
6179 (linux_stabilize_threads): Use find_thread.
6180
6181 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6182
6183 * linux-low.c (unsuspend_one_lwp): Remove.
6184 (unsuspend_all_lwps): Use for_each_thread, inline code from
6185 unsuspend_one_lwp.
6186
6187 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6188
6189 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6190 * linux-low.c (struct iterate_over_lwps_args): Remove.
6191 (iterate_over_lwps_filter): Remove.
6192 (iterate_over_lwps): Use find_thread.
6193
6194 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6195
6196 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6197 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6198 code from reset_lwp_ptrace_options_callback.
6199
6200 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6201
6202 * linux-arm-low.c (struct update_registers_data): Remove.
6203 (update_registers_callback): Return void, take arguments
6204 directly, don't check thread's pid.
6205 (arm_insert_point, arm_remove_point): Use for_each_thread.
6206
6207 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6208
6209 * win32-low.c (continue_one_thread): Return void, take argument
6210 directly.
6211 (child_continue): Use for_each_thread.
6212
6213 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6214
6215 * win32-i386-low.c (update_debug_registers_callback): Rename
6216 to ...
6217 (update_debug_registers): ... this, return void, remove pid_p arg.
6218 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6219
6220 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6221
6222 * inferiors.h (struct process_info): Add constructor, initialize
6223 fields..
6224 <syscalls_to_catch>: Change type to std::vector<int>.
6225 * inferiors.c (add_process): Allocate process_info with new.
6226 (remove_process): Free process_info with delete.
6227 * linux-low.c (handle_extended_wait): Adjust.
6228 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6229 * server.c (handle_general_set): Adjust.
6230
6231 2017-11-16 Pedro Alves <palves@redhat.com>
6232
6233 * remote-utils.c (remote_close): Block SIGIO signals instead of
6234 uninstalling the SIGIO handler.
6235
6236 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6237
6238 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6239
6240 2017-11-16 Yao Qi <yao.qi@linaro.org>
6241
6242 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6243 (tic6x_store_gregset): Likewise.
6244 (tic6x_usrregs_info): Move it up.
6245
6246 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6247
6248 * Makefile.in: Update arch rules.
6249 * configure.srv: Explicitly mark arch/ files.
6250
6251 2017-11-13 Andreas Schwab <schwab@suse.de>
6252
6253 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6254 function.
6255 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6256
6257 2017-11-06 Pedro Alves <palves@redhat.com>
6258
6259 * config.in, configure: Regenerate.
6260
6261 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6262
6263 * target.c (struct thread_search): Remove.
6264 (thread_search_callback): Remove.
6265 (prepare_to_access_memory): Use for_each_thread instead of
6266 find_inferior. Inline code from thread_search_callback.
6267
6268 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6269
6270 * server.c (struct visit_actioned_threads_data): Remove.
6271 (visit_actioned_threads): Change prototype to take arguments
6272 directly.
6273 (resume): Use find_thread instead of find_inferior.
6274
6275 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6276
6277 * server.c (queue_stop_reply_callback): Change prototype, return
6278 void.
6279 (find_status_pending_thread_callback): Remove.
6280 (handle_status): Replace find_inferior with find_thread and
6281 for_each_thread.
6282
6283 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6284
6285 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6286 with REGNO.
6287 (aarch64_store_gregset): Likewise.
6288 (aarch64_fill_fpregset): Likewise.
6289 (aarch64_store_fpregset): Likewise.
6290
6291 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6292
6293 * gdbthread.h (find_thread, for_each_thread): New functions.
6294 * inferiors.c (thread_of_pid): Remove.
6295 (find_any_thread_of_pid): Use find_thread.
6296 * linux-low.c (num_lwps): Use for_each_thread.
6297
6298 2017-10-17 Yao Qi <yao.qi@linaro.org>
6299
6300 * Makefile.in: Remove one rule.
6301 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6302
6303 2017-10-17 Yao Qi <yao.qi@linaro.org>
6304
6305 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6306 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6307
6308 2017-10-17 Yao Qi <yao.qi@linaro.org>
6309
6310 * configure.srv: Rename arm.o with arch/arm.o.
6311
6312 2017-10-17 Yao Qi <yao.qi@linaro.org>
6313
6314 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6315 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6316 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6317 (arch-i386.o, arch-amd64.o): Remove rules.
6318 (arch/%.o): New rule.
6319 Update POSTCOMPILE and COMPILE.pre.
6320 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6321 * configure: Re-generated.
6322 * configure.srv: Replace arch-i386.o with arch/i386.o.
6323 Replace arch-amd64.o with arch/amd64.o.
6324
6325 2017-10-16 Yao Qi <yao.qi@linaro.org>
6326
6327 * configure: Regenerated.
6328
6329 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6330
6331 * inferiors.h: (struct inferior_list): Remove.
6332 (struct inferior_list_entry); Remove.
6333 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6334 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6335 get_first_inferior): Remove.
6336 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6337 find_inferior_id, find_inferior_in_random): Change signature.
6338 * inferiors.c (all_threads): Change type to
6339 std::list<thread_info *>.
6340 (get_thread): Remove macro.
6341 (find_inferior, find_inferior_id): Change signature, implement
6342 using find_thread.
6343 (find_inferior_in_random): Change signature, implement using
6344 find_thread_in_random.
6345 (for_each_inferior, for_each_inferior_with_data): Change
6346 signature, implement using for_each_thread.
6347 (add_inferior_to_list, remove_inferior): Remove.
6348 (add_thread, get_first_thread, thread_of_pid,
6349 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6350 (get_first_inferior, one_inferior_p, clear_inferior_list):
6351 Remove.
6352 (clear_inferiors, get_thread_process): Update.
6353 * gdbthread.h: Include <list>.
6354 (struct thread_info) <entry>: Remove field.
6355 <id>: New field.
6356 (all_threads): Change type to std::list<thread_info *>.
6357 (get_first_inferior): Add doc.
6358 (find_thread, for_each_thread, find_thread_in_random): New
6359 functions.
6360 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6361 * linux-arm-low.c (update_registers_callback): Update.
6362 * linux-low.c (second_thread_of_pid_p): Update.
6363 (kill_one_lwp_callback, linux_detach_lwp_callback,
6364 delete_lwp_callback, status_pending_p_callback, same_lwp,
6365 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6366 iterate_over_lwps, not_stopped_callback,
6367 resume_stopped_resumed_lwps, count_events_callback,
6368 select_singlestep_lwp_callback, select_event_lwp_callback,
6369 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6370 suspend_and_send_sigstop_callback, wait_for_sigstop,
6371 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6372 lwp_running, linux_set_resume_request, resume_status_pending_p,
6373 need_step_over_p, start_step_over, linux_resume_one_thread,
6374 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6375 reset_lwp_ptrace_options_callback): Update.
6376 * linux-mips-low.c (update_watch_registers_callback): Update.
6377 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6378 Update.
6379 (free_register_cache_thread_one): Remove.
6380 (regcache_release): Update.
6381 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6382 handle_qxfer_threads_worker): Update.
6383 (handle_query): Update, use list iterator.
6384 (visit_actioned_threads, handle_pending_status,
6385 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6386 clear_pending_status_callback, set_pending_status_callback,
6387 find_status_pending_thread_callback, handle_status,
6388 process_serial_event): Update.
6389 * target.c (thread_search_callback): Update.
6390 * thread-db.c (thread_db_get_tls_address): Update.
6391 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6392 Update.
6393 * win32-i386-low.c (update_debug_registers_callback): Update.
6394 * win32-low.c (delete_thread_info, child_delete_thread,
6395 continue_one_thread, suspend_one_thread,
6396 get_child_debug_event): Adjust.
6397
6398 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6399
6400 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6401 * inferiors.h: Include <list>.
6402 (struct process_info) <entry>: Remove field.
6403 <pid>: New field.
6404 (pid_of): Change macro to function.
6405 (ptid_of, lwpid_of): Remove macro.
6406 (all_processes): Change type to std::list<process_info *>.
6407 (ALL_PROCESSES): Remove macro.
6408 (for_each_process, find_process): New function.
6409 * inferiors.c (all_processes): Change type to
6410 std::list<process_info *>.
6411 (find_thread_process): Adjust.
6412 (add_process): Likewise.
6413 (remove_process): Likewise.
6414 (find_process_pid): Likewise.
6415 (get_first_process): Likewise.
6416 (started_inferior_callback): Remove.
6417 (have_started_inferiors_p): Adjust.
6418 (attached_inferior_callback): Remove.
6419 (have_attached_inferiors_p): Adjust.
6420 * linux-low.c (check_zombie_leaders): Likewise.
6421 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6422 (x86_linux_update_xmltarget): Adjust.
6423 * server.c (handle_query): Likewise.
6424 (gdb_reattached_process): Remove.
6425 (handle_status): Adjust.
6426 (kill_inferior_callback): Likewise.
6427 (detach_or_kill_inferior): Remove.
6428 (print_started_pid): Likewise.
6429 (print_attached_pid): Likewise.
6430 (detach_or_kill_for_exit): Update.
6431 (process_serial_event): Likewise.
6432 * linux-arm-low.c (arm_new_fork): Likewise.
6433
6434 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6435
6436 * dll.h: Include <list>.
6437 (struct dll_info): Add constructor.
6438 <entry>: Remove field.
6439 (all_dlls): Change type to std::list<dll_info>.
6440 * dll.c: Include <algorithm>.
6441 (get_dll): Remove macro.
6442 (all_dlls): Change type to std::list<dll_info *>.
6443 (free_one_dll): Remove.
6444 (match_dll): Likewise.
6445 (loaded_dll): Adjust.
6446 (unloaded_dll): Adjust to all_dlls type change, use
6447 std::find_if. Inline code from match_dll.
6448 (clear_dlls): Adjust to all_dlls type change.
6449 * server.c (emit_dll_description): Remove.
6450 (handle_qxfer_libraries): Adjust to all_dlls type change,
6451 integrate emit_dll_description's functionality.
6452
6453 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6454
6455 * linux-low.h (struct linux_target_ops) <delete_process>: New
6456 field.
6457 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6458 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6459 (struct linux_target_ops): Add delete_process callback.
6460 * linux-arm-low.c (arm_delete_process): New.
6461 (struct linux_target_ops): Add delete_process callback.
6462 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6463 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6464 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6465 * linux-mips-low.c (mips_linux_delete_process): New.
6466 (struct linux_target_ops): Add delete_process callback.
6467 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6468 * linux-s390-low.c (struct linux_target_ops): Likewise.
6469 * linux-sh-low.c (struct linux_target_ops): Likewise.
6470 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6471 * linux-tile-low.c (struct linux_target_ops): Likewise.
6472 * linux-x86-low.c (x86_linux_delete_process): New.
6473 (struct linux_target_ops): Add delete_process callback.
6474 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6475
6476 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6477
6478 * linux-aarch64-low.c (the_low_target): Add thread delete
6479 callback.
6480 * linux-arm-low.c (arm_delete_thread): New function.
6481 (the_low_target): Add thread delete callback.
6482 * linux-bfin-low.c (the_low_target): Likewise.
6483 * linux-crisv32-low.c (the_low_target): Likewise.
6484 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6485 set.
6486 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6487 field.
6488 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6489 * linux-mips-low.c (mips_linux_delete_thread): New function.
6490 (the_low_target): Add thread delete callback.
6491 * linux-ppc-low.c (the_low_target): Likewise.
6492 * linux-s390-low.c (the_low_target): Likewise.
6493 * linux-sh-low.c (the_low_target): Likewise.
6494 * linux-tic6x-low.c (the_low_target): Likewise.
6495 * linux-tile-low.c (the_low_target): Likewise.
6496 * linux-x86-low.c (the_low_target): Likewise.
6497 * linux-xtensa-low.c (the_low_target): Likewise.
6498
6499 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6500
6501 * win32-low.c: Include "common-inferior.h".
6502
6503 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6504
6505 * inferiors.c (set_inferior_cwd): New function.
6506 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6507 (handle_query): Inform that QSetWorkingDir is supported.
6508 * win32-low.c (create_process): Pass the inferior's cwd to
6509 CreateProcess.
6510
6511 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6512
6513 * inferiors.c (current_inferior_cwd): New global variable.
6514 (get_inferior_cwd): New function.
6515 * inferiors.h (struct process_info) <cwd>: New field.
6516
6517 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6518
6519 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6520 (OBS): Add gdb_tilde_expand.o.
6521
6522 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6523
6524 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6525 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6526
6527 2017-09-29 Pedro Alves <palves@redhat.com>
6528
6529 * ax.c (gdb_parse_agent_expr): Constify.
6530 * ax.h (gdb_parse_agent_expr): Constify.
6531 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6532 Constify.
6533 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6534 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6535 * remote-utils.h (read_ptid): Constify.
6536 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6537 (process_point_options, process_serial_event): Constify.
6538 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6539 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6540 (cmd_qtbuffer): Constify.
6541
6542 2017-09-29 Pedro Alves <palves@redhat.com>
6543
6544 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6545 fails.
6546
6547 2017-09-29 Pedro Alves <palves@redhat.com>
6548
6549 * linux-low.c (handle_extended_wait): Pass parent thread instead
6550 of process to thread_db_notice_clone.
6551 * linux-low.h (thread_db_notice_clone): Replace parent process
6552 parameter with parent thread parameter.
6553 * thread-db.c (find_one_thread): Add comment.
6554 (thread_db_notice_clone): Replace parent process parameter with
6555 parent thread parameter. Temporarily switch to the parent thread.
6556
6557 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6558
6559 * gdbthread.h: Include "common-gdbthread.h".
6560 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6561 "if" when validating the ptid.
6562 * remote-utils.c: Include "gdbthread.h".
6563 (prepare_resume_reply): Use "switch_to_thread".
6564 * target.c (done_accessing_memory): Likewise.
6565
6566 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6567
6568 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6569 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6570 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6571 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6572 s390x-gs-linux64-ipa.o to ipa_obj.
6573 * linux-s390-low.c (HWCAP_S390_GS): New define.
6574 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6575 New functions.
6576 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6577 (s390_arch_setup): Check for guarded-storage support and choose
6578 appropriate tdesc.
6579 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6580 init_registers_s390x_gs_linux64.
6581 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6582 enum value.
6583 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6584 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6585
6586 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6587
6588 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6589
6590 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6591
6592 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6593 (thread_db_thread_handle): Declare.
6594 * linux-low.c (linux_target_ops): Initialize thread_handle.
6595 * server.c (handle_qxfer_threads_worker): Add support for
6596 "handle" attribute.
6597 * target.h (struct target_ops): Add new function pointer,
6598 thread_handle.
6599 (target_thread_handle): Define.
6600 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6601 field in lwp.
6602 (thread_db_thread_handle): New function.
6603
6604 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6605
6606 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6607 * linux-low.h (thread_db_notice_clone): Declare.
6608 * thread-db.c (thread_db_notice_clone): New function.
6609
6610 2017-09-21 Pedro Alves <palves@redhat.com>
6611
6612 * server.c (gdb_read_memory, handle_status, process_serial_event)
6613 (handle_serial_event, handle_target_event): Adjust to
6614 set_desired_thread prototype change.
6615 * target.c (set_desired_thread): Remove 'use_general' parameter
6616 and adjust.
6617 * target.h (set_desired_thread): Remove 'use_general' parameter.
6618
6619 2017-09-20 Tom Tromey <tom@tromey.com>
6620
6621 * target.c (target_terminal::terminal_state): Define.
6622 (target_terminal::init): Rename from target_terminal_init.
6623 (target_terminal::inferior): Rename from
6624 target_terminal_inferior.
6625 (target_terminal::ours): Rename from target_terminal_ours.
6626 (target_terminal::ours_for_output, target_terminal::info): New.
6627
6628 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6629
6630 * server.c (accumulate_file_name_length): Remove.
6631 (emit_dll_description): Adjust to std::string change.
6632 (handle_qxfer_libraries): Use std::string to hold document.
6633
6634 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6635
6636 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6637 return type of xml_escape_text.
6638 * server.c (emit_dll_description): Likewise.
6639
6640 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6641
6642 * server.c (captured_main): Accept argument for --selftest.
6643 Update run_tests call.
6644 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6645 when registering selftests.
6646
6647 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6648
6649 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6650 instead of "VEC" for "target_desc.reg_defs".
6651 (regcache_cpy): Likewise.
6652 (registers_to_string): Likewise.
6653 (registers_from_string): Likewise.
6654 (find_regno): Likewise.
6655 (supply_regblock): Likewise.
6656 (regcache_raw_read_unsigned): Likewise.
6657 * tdesc.c (init_target_desc): Likewise.
6658 (tdesc_create_reg): Likewise.
6659 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6660 (struct target_desc) <reg_defs>: Convert to "std::vector".
6661 (target_desc): Do not initialize "reg_defs".
6662 (~target_desc): Update code to use "std::vector" instead of "VEC"
6663 for "target_desc.reg_defs".
6664 (operator==): Likewise.
6665
6666 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6667
6668 * inferiors.h (thread_to_gdb_id): Remove.
6669 * inferiors.c (thread_to_gdb_id): Remove.
6670 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6671 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6672 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6673 Likewise.
6674 * nto-low.c (nto_fetch_registers, nto_store_registers,
6675 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6676
6677 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6678
6679 * inferiors.h (gdb_id_to_thread_id): Remove.
6680 * inferiors.c (gdb_id_to_thread_id): Remove.
6681 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6682 removal. Move pid declaration closer to where it's used.
6683
6684 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6685
6686 * server.c (handle_detach): New function.
6687 (process_serial_event): Move code out, call handle_detach.
6688
6689 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6690
6691 * server.c (require_running): Rename to ...
6692 (require_running_or_return): ... this ...
6693 (require_running_or_break): ... and this.
6694 (handle_query, process_serial_event): Adjust.
6695
6696 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6697
6698 * linux-low.c (linux_set_resume_request): Remove unused
6699 variables.
6700
6701 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6702
6703 * server.c (first_thread_of): Remove.
6704 (process_serial_event): Replace usage of first_thread_of with
6705 find_any_thread_of_pid.
6706 * tracepoint.c (same_process_p): Remove.
6707 (gdb_agent_about_to_close): Replace usage of same_process_p with
6708 find_any_thread_of_pid.
6709 * linux-x86-low.c (same_process_callback): Remove.
6710 (x86_arch_setup_process_callback): Replace usage of
6711 same_process_callback with find_any_thread_of_pid.
6712 * thread-db.c (any_thread_of): Remove.
6713 (switch_to_process): Replace usage of any_thread_of with
6714 find_any_thread_of_pid.
6715 * inferiors.c (thread_pid_matches_callback): Remove.
6716 (find_thread_process): Adjust to use find_any_thread_of_pid.
6717
6718 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6719
6720 * regcache.c (get_thread_regcache): Guard calls to "memset"
6721 with "!VEC_empty".
6722
6723 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6724
6725 * linux-low.c (handle_extended_wait): Use
6726 "allocate_target_description" instead of "XNEW".
6727 * linux-x86-low.c (initialize_low_arch): Likewise.
6728
6729 2017-09-05 Yao Qi <yao.qi@linaro.org>
6730
6731 * configure.srv (srv_i386_regobj): Remove.
6732 (srv_amd64_regobj): Remove.
6733 (srv_regobj): Set it to "" for x86 non-linux targets.
6734 * linux-x86-tdesc.c (i386_linux_read_description):
6735 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6736 (init_registers_i386): Remove the declaration.
6737 (tdesc_i386): Remove the declaration.
6738 (lynx_i386_arch_setup): Call i386_create_target_description.
6739 * nto-x86-low.c: Likewise.
6740 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6741 [!__x86_64__]: include arch/i386.h.
6742 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6743
6744 2017-09-05 Yao Qi <yao.qi@linaro.org>
6745
6746 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6747 i386/amd64-XXX-linux from it.
6748
6749 2017-09-05 Yao Qi <yao.qi@linaro.org>
6750
6751 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6752 false.
6753 (ipa_amd64_linux_regobj): Remove.
6754 (ipa_x32_linux_regobj): Remove.
6755
6756 2017-09-05 Yao Qi <yao.qi@linaro.org>
6757
6758 * Makefile.in (arch-amd64.o): New rule.
6759 * configure.srv: Append arch-amd64.o.
6760 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6761 (get_ipa_tdesc): Call amd64_linux_read_description.
6762 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6763 and init_registers_amd64_XXX.
6764 * linux-x86-low.c (x86_linux_read_description): Call
6765 amd64_linux_read_description.
6766 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6767 (initialize_low_arch): Don't call init_registers_x32_XXX and
6768 init_registers_amd64_XXX.
6769 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6770 and tdesc_amd64_XXX.
6771 [__x86_64__] (amd64_tdesc_test): New function.
6772 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6773 and init_registers_amd64_XXX.
6774 * linux-x86-tdesc.c: Include arch/amd64.h.
6775 (xcr0_to_tdesc_idx): New function.
6776 (i386_linux_read_description): New function.
6777 (amd64_get_ipa_tdesc_idx): New function.
6778 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6779 (amd64_get_ipa_tdesc): Declare.
6780
6781 2017-09-05 Yao Qi <yao.qi@linaro.org>
6782
6783 * configure.srv (srv_i386_linux_xmlfiles): Remove
6784 i386/i386-XXX-linux.xml from it.
6785
6786 2017-09-05 Yao Qi <yao.qi@linaro.org>
6787
6788 * configure.srv: Set srv_i386_linux_regobj empty if $development
6789 is false.
6790 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6791 initialize_low_tdesc.
6792 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6793 with #if initialize_low_tdesc.
6794 * linux-x86-tdesc-selftest.c: New file.
6795 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6796
6797 2017-09-05 Yao Qi <yao.qi@linaro.org>
6798
6799 * Makefile.in (arch-i386.o): New rule.
6800 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6801 (x86_64-*-linux*): Likewise.
6802 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6803 include arch/i386.h.
6804 (i386_linux_read_description): Remove code and call
6805 i386_create_target_description.
6806 * tdesc.c (allocate_target_description): New function.
6807 * tdesc.h (set_tdesc_architecture): Remove declaration.
6808 (set_tdesc_osabi): Likewise.
6809
6810 2017-09-05 Yao Qi <yao.qi@linaro.org>
6811
6812 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6813 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6814 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6815 .xmltarget.
6816 * server.c (get_features_xml): Call tdesc_get_features_xml.
6817 * tdesc.c (set_tdesc_architecture): New function.
6818 (set_tdesc_osabi): New function.
6819 (tdesc_get_features_xml): New function.
6820 (tdesc_create_feature): Add an argument.
6821 * tdesc.h (struct target_desc) <features>: New field.
6822 <arch, osabi>: New field.
6823 (~target_desc): xfree features, arch, and osabi.
6824 (target_desc::oerator==): Don't compare .xmltarget.
6825 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6826 (set_tdesc_osabi): Likewise.
6827 (tdesc_get_features_xml): Likewise.
6828
6829 2017-09-05 Yao Qi <yao.qi@linaro.org>
6830
6831 * linux-x86-tdesc.c: Include selftest.h.
6832 (i386_tdesc_test): New function.
6833 (initialize_low_tdesc): Call selftests::register_test.
6834 * tdesc.h: Include regdef.h.
6835 (target_desc): Override operator == and !=.
6836
6837 2017-09-05 Yao Qi <yao.qi@linaro.org>
6838
6839 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6840 (ipa_obj): Likewise.
6841 * linux-i386-ipa.c: Include common/x86-xstate.h
6842 (get_ipa_tdesc): Call i386_linux_read_description.
6843 (initialize_low_tracepoint): Don't call init_registers_XXX
6844 functions, call initialize_low_tdesc instead.
6845 * linux-x86-low.c (x86_linux_read_description): Call
6846 i386_linux_read_description.
6847 (initialize_low_arch): Don't call init_registers_i386_XXX
6848 functions, call initialize_low_tdesc.
6849 * linux-x86-tdesc.c: New file.
6850 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6851 (i386_get_ipa_tdesc_idx): Declare.
6852 (i386_get_ipa_tdesc): Declare.
6853 (initialize_low_tdesc): Declare.
6854
6855 2017-09-05 Yao Qi <yao.qi@linaro.org>
6856
6857 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6858 instead of 0.
6859
6860 2017-09-05 Yao Qi <yao.qi@linaro.org>
6861
6862 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6863 * regcache.c (get_thread_regcache): Use VEC_length.
6864 (init_register_cache): Likewise.
6865 (regcache_cpy): Likewise.
6866 (registers_to_string): Iterate reg_defs via VEC_iterate.
6867 (find_regno): Likewise.
6868 (find_register_by_number): Use VEC_index.
6869 (register_size): Call find_register_by_number.
6870 (register_data): Call find_register_by_number.
6871 (supply_regblock): Use VEC_length.
6872 (regcache_raw_read_unsigned): Likewise.
6873 * tdesc.c (init_target_desc): Iterate reg_defs via
6874 VEC_iterate.
6875 (default_description): Update initializer.
6876 (copy_target_description): Don't update field num_registers.
6877 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6878 <num_registers>: Remove.
6879
6880 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6881
6882 * Makefile.in (.SECONDARY): Define target.
6883
6884 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6885
6886 * linux-low.c (linux_wait_1): Adjust.
6887 * server.c (queue_stop_reply_callback): Adjust.
6888
6889 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6890
6891 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6892 QEnvironmentUnset and QEnvironmentReset packets.
6893 (handle_query): Inform remote that QEnvironmentHexEncoded,
6894 QEnvironmentUnset and QEnvironmentReset are supported.
6895
6896 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6897
6898 * inferiors.h (inferior_target_data): Rename to ...
6899 (thread_target_data): ... this.
6900 (inferior_regcache_data): Rename to ...
6901 (thread_regcache_data): ... this.
6902 (set_inferior_regcache_data): Rename to ...
6903 (set_thread_regcache_data): ... this.
6904 * inferiors.c (inferior_target_data): Rename to ...
6905 (thread_target_data): ... this.
6906 (inferior_regcache_data): Rename to ...
6907 (thread_regcache_data): ... this.
6908 (set_inferior_regcache_data): Rename to ...
6909 (set_thread_regcache_data): ... this.
6910 (free_one_thread): Update.
6911 * linux-low.h (get_thread_lwp): Update.
6912 * regcache.c (get_thread_regcache): Update.
6913 (regcache_invalidate_thread): Update.
6914 (free_register_cache_thread): Update.
6915 * win32-i386-low.c (update_debug_registers_callback): Update.
6916 (win32_get_current_dr): Update.
6917 * win32-low.c (thread_rec): Update.
6918 (delete_thread_info): Update.
6919 (continue_one_thread): Update.
6920 (suspend_one_thread): Update.
6921
6922 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6923
6924 * inferiors.c (set_inferior_target_data): Remove.
6925 * inferiors.h (set_inferior_target_data): Remove.
6926
6927 2017-08-18 Yao Qi <yao.qi@linaro.org>
6928
6929 * Makefile.in (OBS): Add selftest.o.
6930 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6931 * configure, config.in: Re-generated.
6932 * server.c: Include common/sefltest.h.
6933 (captured_main): Handle option --selftest.
6934
6935 2017-08-09 Yao Qi <yao.qi@linaro.org>
6936
6937 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6938 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6939 i386-avx-mpx.o and i386-mmx.o.
6940 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6941 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6942 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6943 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6944 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6945 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6946 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6947 i386/amd64-avx-mpx.xml.
6948
6949 2017-08-09 Yao Qi <yao.qi@linaro.org>
6950
6951 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6952 and x32-avx-avx512.o.
6953 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6954 i386/x32-avx-avx512.xml.
6955
6956 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6957
6958 * tracepoint.h (enum class fast_tpoint_collect_result): New
6959 enumeration.
6960 (fast_tracepoint_collecting): Change return type to
6961 fast_tpoint_collect_result.
6962 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6963 * linux-low.h: Include tracepoint.h.
6964 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6965 fast_tpoint_collect_result.
6966 * linux-low.c (handle_tracepoints): Adjust.
6967 (linux_fast_tracepoint_collecting): Change return type to
6968 fast_tpoint_collect_result.
6969 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6970 linux_wait_1, stuck_in_jump_pad_callback,
6971 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6972 proceed_one_lwp): Adjust to type change.
6973
6974 2017-07-10 Yao Qi <yao.qi@linaro.org>
6975
6976 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6977
6978 2017-06-29 Yao Qi <yao.qi@linaro.org>
6979
6980 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6981 Remove.
6982 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6983
6984 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6985
6986 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6987
6988 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6989
6990 * linux-low.c (linux_create_inferior): Adjust code to access the
6991 environment information via 'gdb_environ' class.
6992 * lynx-low.c (lynx_create_inferior): Likewise.
6993 * server.c (our_environ): Make it an instance of 'gdb_environ'.
6994 (get_environ): Return a pointer to 'our_environ'.
6995 (captured_main): Initialize 'our_environ'.
6996 * server.h (get_environ): Adjust prototype.
6997 * spu-low.c (spu_create_inferior): Adjust code to access the
6998 environment information via 'gdb_environ' class.
6999
7000 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7001
7002 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7003 usage of "register" keyword.
7004
7005 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7006
7007 * configure: Re-generate.
7008
7009 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7010
7011 * configure: Re-generate.
7012
7013 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7014
7015 * Makefile.in (COMPILE.pre): Add "-x c++".
7016
7017 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7018
7019 * fork-child.c: Conditionally include <signal.h>.
7020
7021 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7022
7023 * server.c (handle_general_set): Handle new packet
7024 "QStartupWithShell".
7025 (handle_query): Add "QStartupWithShell" to the list of supported
7026 packets.
7027 (gdbserver_usage): Add help text explaining the
7028 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7029 options.
7030 (captured_main): Recognize and act upon the presence of the new
7031 CLI options.
7032
7033 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7034 Pedro Alves <palves@redhat.com>
7035
7036 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7037 * configure: Regenerate.
7038 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7039 "fork-inferior.o".
7040 (i[34567]86-*-lynxos*): Likewise.
7041 (spu*-*-*): Likewise.
7042 * fork-child.c: New file.
7043 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7044 and "environ.h".
7045 (linux_ptrace_fun): New function.
7046 (linux_create_inferior): Adjust function prototype to reflect
7047 change on "target.h". Adjust function code to use
7048 "fork_inferior".
7049 (linux_request_interrupt): Delete "signal_pid".
7050 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7051 (lynx_ptrace_fun): New function.
7052 (lynx_create_inferior): Adjust function prototype to reflect
7053 change on "target.h". Adjust function code to use
7054 "fork_inferior".
7055 * nto-low.c (nto_create_inferior): Adjust function prototype and
7056 code to reflect change on "target.h". Update comments.
7057 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7058 "common-terminal.h" and "environ.h".
7059 (terminal_fd): Moved to fork-child.c.
7060 (old_foreground_pgrp): Likewise.
7061 (restore_old_foreground_pgrp): Likewise.
7062 (last_status): Make it global.
7063 (last_ptid): Likewise.
7064 (our_environ): New variable.
7065 (startup_with_shell): Likewise.
7066 (program_name): Likewise.
7067 (program_argv): Rename to...
7068 (program_args): ...this.
7069 (wrapper_argv): New variable.
7070 (start_inferior): Delete function.
7071 (get_exec_wrapper): New function.
7072 (get_exec_file): Likewise.
7073 (get_environ): Likewise.
7074 (prefork_hook): Likewise.
7075 (post_fork_inferior): Likewise.
7076 (postfork_hook): Likewise.
7077 (postfork_child_hook): Likewise.
7078 (handle_v_run): Update code to deal with arguments coming from the
7079 remote host. Update calls from "start_inferior" to
7080 "create_inferior".
7081 (captured_main): Likewise. Initialize environment variable. Call
7082 "have_job_control".
7083 * server.h (post_fork_inferior): New prototype.
7084 (get_environ): Likewise.
7085 (last_status): Declare.
7086 (last_ptid): Likewise.
7087 (signal_pid): Likewise.
7088 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7089 (spu_ptrace_fun): New function.
7090 (spu_create_inferior): Adjust function prototype to reflect change
7091 on "target.h". Adjust function code to use "fork_inferior".
7092 * target.c (target_terminal_init): New function.
7093 (target_terminal_inferior): Likewise.
7094 (target_terminal_ours): Likewise.
7095 * target.h: Include <vector>.
7096 (struct target_ops) <create_inferior>: Update prototype.
7097 (create_inferior): Update macro.
7098 * utils.c (gdb_flush_out_err): New function.
7099 * win32-low.c (win32_create_inferior): Adjust function prototype
7100 and code to reflect change on "target.h".
7101
7102 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7103
7104 * inferiors.c (switch_to_thread): New function.
7105
7106 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7107
7108 * Makefile.in (SFILE): Add "common/job-control.c".
7109 (OBS): Add "job-control.o".
7110
7111 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7112
7113 * Makefile: Remove "@host_makefile_frag@".
7114
7115 2017-05-05 Pedro Alves <palves@redhat.com>
7116
7117 * configure: Regenerate.
7118
7119 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7120
7121 * configure: Regenerate.
7122
7123 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7124
7125 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7126 software_single_step change of return type to
7127 std::vector<CORE_ADDR>.
7128 * linux-low.c (install_software_single_step_breakpoints):
7129 Likewise.
7130 * linux-low.h (install_software_single_step_breakpoints):
7131 Likewise.
7132
7133 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7134
7135 * remote-utils.c: Include "gdb_termios.h" instead of
7136 "terminal.h".
7137 * terminal.h: Delete file.
7138
7139 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7140
7141 * server.c: Include <vector>.
7142 <program_argv, wrapper_argv>: Convert to std::vector.
7143 (start_inferior): Rewrite function to use C++.
7144 (handle_v_run): Likewise. Update code that calculates the argv
7145 based on the vRun packet; use C++.
7146 (captured_main): Likewise.
7147
7148 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7149
7150 * server.c (handle_v_cont): Initialize thread_resume::thread
7151 with null_ptid.
7152
7153 2017-04-05 Pedro Alves <palves@redhat.com>
7154
7155 * configure: Regenerate.
7156
7157 2017-04-05 Pedro Alves <palves@redhat.com>
7158
7159 * gdbreplay.c (sync_error): Constify.
7160 * linux-x86-low.c (push_opcode): Constify.
7161
7162 2017-04-05 Pedro Alves <palves@redhat.com>
7163
7164 * win32-low.c (get_child_debug_event)
7165 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7166 Report TARGET_WAITKIND_SPURIOUS instead.
7167
7168 2017-04-05 Pedro Alves <palves@redhat.com>
7169
7170 * remote-utils.c (remote_prepare, remote_open): Constify.
7171 * remote-utils.h (remote_prepare, remote_open): Constify.
7172 * server.c (captured_main): Constify 'port' handling.
7173
7174 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7175
7176 * Makefile.in (clean): Clear .deps.
7177
7178 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7179
7180 * .gitignore: Remove generated files, replace with wildcard.
7181 * (clean): Replace removal of generated files with wildcard.
7182 (version.c): Replace with...
7183 (version-generated.c): ...this.
7184 (xml-builtin.c): Replace with...
7185 (xml-builtin-generated.c): ...this.
7186 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7187 (%.c: *regformats*): Replace with...
7188 (%-generated.c: *regformats*): ...this.
7189
7190 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7191
7192 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7193 (xtensa_fill_gregset): Call collect_register_by_name for
7194 threadptr register.
7195 (xtensa_store_gregset): Call supply_register_by_name for
7196 threadptr register.
7197
7198 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7199
7200 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7201 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7202 (xtensa_store_gregset): Call supply_register for all registers in
7203 a0_regnum..a0_regnum + C0_NREGS range.
7204
7205 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7206
7207 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7208 (ax-ipa.o: ax.c): Remove.
7209 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7210 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7211 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7212 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7213 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7214
7215 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7216
7217 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7218 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7219 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7220 (errors-ipa.o: ../common/errors.c): Remove.
7221 (format-ipa.o: ../common/format.c): Remove.
7222 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7223
7224 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7225
7226 * Makefile.in (%-ipa.o: %.c): New rule.
7227 (tracepoint-ipa.o: tracepoint.c): Remove.
7228 (utils-ipa.o: utils.c): Remove.
7229 (remote-utils-ipa.o: remote-utils.c): Remove.
7230 (regcache-ipa.o: regcache.c): Remove.
7231 (i386-linux-ipa.o: i386-linux.c): Remove.
7232 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7233 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7234 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7235 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7236 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7237 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7238 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7239 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7240 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7241 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7242 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7243 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7244 (aarch64-ipa.o: aarch64.c): Remove.
7245 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7246 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7247 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7248 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7249 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7250 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7251 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7252 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7253 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7254 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7255 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7256 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7257 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7258 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7259 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7260 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7261 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7262 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7263 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7264 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7265 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7266 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7267 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7268 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7269 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7270 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7271 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7272 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7273 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7274 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7275 (tdesc-ipa.o: tdesc.c): Remove.
7276 (x32-linux-ipa.o: x32-linux.c): Remove.
7277 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7278 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7279
7280 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7281
7282 * Makefile.in (%.o: ../arch/%.c): New rule.
7283 (arm.o: ../arch/arm.c): Remove.
7284 (arm-linux.o: ../arch/arm-linux.c): Remove.
7285 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7286 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7287
7288 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7289
7290 * Makefile.in (%.o: ../nat/%.c): New rule.
7291 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7292 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7293 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7294 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7295 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7296 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7297 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7298 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7299 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7300 (linux-personality.o: ../nat/linux-personality.c): Remove.
7301 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7302 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7303 (x86-linux.o: ../nat/x86-linux.c): Remove.
7304 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7305 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7306
7307 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7308
7309 * Makefile.in (%.o: ../common/%.c): New rule.
7310 (signals.o: ../common/signals.c): Remove.
7311 (print-utils.o: ../common/print-utils.c): Remove.
7312 (rsp-low.o: ../common/rsp-low.c): Remove.
7313 (common-utils.o: ../common/common-utils.c): Remove.
7314 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7315 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7316 (vec.o: ../common/vec.c): Remove.
7317 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7318 (xml-utils.o: ../common/xml-utils.c): Remove.
7319 (ptid.o: ../common/ptid.c): Remove.
7320 (buffer.o: ../common/buffer.c): Remove.
7321 (format.o: ../common/format.c): Remove.
7322 (filestuff.o: ../common/filestuff.c): Remove.
7323 (agent.o: ../common/agent.c): Remove.
7324 (errors.o: ../common/errors.c): Remove.
7325 (environ.o: ../common/environ.c): Remove.
7326 (common-debug.o: ../common/common-debug.c): Remove.
7327 (cleanups.o: ../common/cleanups.c): Remove.
7328 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7329 (fileio.o: ../common/fileio.c): Remove.
7330 (common-regcache.o: ../common/common-regcache.c): Remove.
7331 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7332 (new-op.o: ../common/new-op.c): Remove.
7333 (btrace-common.o: ../common/btrace-common.c): Remove.
7334
7335 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7336
7337 * Makefile.in (%.o: ../target/%.c): New rule.
7338 (waitstatus.o: ../target/waitstatus.c): Remove.
7339
7340 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7341
7342 * Makefile.in
7343 (%.c: ../regformats/%.dat,
7344 (%.c: ../regformats/arm/%.dat,
7345 (%.c: ../regformats/i386/%.dat,
7346 (%.c: ../regformats/rs6000/%.dat): New rules.
7347 (aarch64.c): Remove.
7348 (reg-arm.c): Remove.
7349 (arm-with-iwmmxt.c): Remove.
7350 (arm-with-vfpv2.c): Remove.
7351 (arm-with-vfpv3.c): Remove.
7352 (arm-with-neon.c): Remove.
7353 (reg-bfin.c): Remove.
7354 (reg-cris.c): Remove.
7355 (reg-crisv32.c): Remove.
7356 (i386.c): Remove.
7357 (i386-linux.c): Remove.
7358 (i386-avx.c): Remove.
7359 (i386-avx-linux.c): Remove.
7360 (i386-avx-avx512.c): Remove.
7361 (i386-avx-avx512-linux.c): Remove.
7362 (i386-mpx.c): Remove.
7363 (i386-mpx-linux.c): Remove.
7364 (i386-avx-mpx-avx512-pku.c): Remove.
7365 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7366 (i386-avx-mpx.c): Remove.
7367 (i386-avx-mpx-linux.c): Remove.
7368 (i386-mmx.c): Remove.
7369 (i386-mmx-linux.c): Remove.
7370 (reg-ia64.c): Remove.
7371 (reg-m32r.c): Remove.
7372 (reg-m68k.c): Remove.
7373 (reg-cf.c): Remove.
7374 (mips-linux.c): Remove.
7375 (mips-dsp-linux.c): Remove.
7376 (mips64-linux.c): Remove.
7377 (mips64-dsp-linux.c): Remove.
7378 (nios2-linux.c): Remove.
7379 (powerpc-32.c): Remove.
7380 (powerpc-32l.c): Remove.
7381 (powerpc-altivec32l.c): Remove.
7382 (powerpc-cell32l.c): Remove.
7383 (powerpc-vsx32l.c): Remove.
7384 (powerpc-isa205-32l.c): Remove.
7385 (powerpc-isa205-altivec32l.c): Remove.
7386 (powerpc-isa205-vsx32l.c): Remove.
7387 (powerpc-e500l.c): Remove.
7388 (powerpc-64l.c): Remove.
7389 (powerpc-altivec64l.c): Remove.
7390 (powerpc-cell64l.c): Remove.
7391 (powerpc-vsx64l.c): Remove.
7392 (powerpc-isa205-64l.c): Remove.
7393 (powerpc-isa205-altivec64l.c): Remove.
7394 (powerpc-isa205-vsx64l.c): Remove.
7395 (s390-linux32.c): Remove.
7396 (s390-linux32v1.c): Remove.
7397 (s390-linux32v2.c): Remove.
7398 (s390-linux64.c): Remove.
7399 (s390-linux64v1.c): Remove.
7400 (s390-linux64v2.c): Remove.
7401 (s390-te-linux64.c): Remove.
7402 (s390-vx-linux64.c): Remove.
7403 (s390-tevx-linux64.c): Remove.
7404 (s390x-linux64.c): Remove.
7405 (s390x-linux64v1.c): Remove.
7406 (s390x-linux64v2.c): Remove.
7407 (s390x-te-linux64.c): Remove.
7408 (s390x-vx-linux64.c): Remove.
7409 (s390x-tevx-linux64.c): Remove.
7410 (tic6x-c64xp-linux.c): Remove.
7411 (tic6x-c64x-linux.c): Remove.
7412 (tic6x-c62x-linux.c): Remove.
7413 (reg-sh.c): Remove.
7414 (reg-sparc64.c): Remove.
7415 (reg-spu.c): Remove.
7416 (amd64.c): Remove.
7417 (amd64-linux.c): Remove.
7418 (amd64-avx.c): Remove.
7419 (amd64-avx-linux.c): Remove.
7420 (amd64-avx-avx512.c): Remove.
7421 (amd64-avx-avx512-linux.c): Remove.
7422 (amd64-mpx.c): Remove.
7423 (amd64-mpx-linux.c): Remove.
7424 (amd64-avx-mpx-avx512-pku.c): Remove.
7425 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7426 (amd64-avx-mpx.c): Remove.
7427 (amd64-avx-mpx-linux.c): Remove.
7428 (x32.c): Remove.
7429 (x32-linux.c): Remove.
7430 (x32-avx.c): Remove.
7431 (x32-avx-linux.c): Remove.
7432 (x32-avx-avx512.c): Remove.
7433 (x32-avx-avx512-linux.c): Remove.
7434 (reg-xtensa.c): Remove.
7435 (reg-tilegx.c): Remove.
7436 (reg-tilegx32.c): Remove.
7437
7438 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7439
7440 * Makefile.in (SFILES): Add "common/environ.c".
7441 (OBJS): Add "common/environ.h".
7442
7443 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7444
7445 * configure.ac: Check if the fs_base and gs_base members of
7446 `struct user_regs_struct' exist.
7447 * config.in: Regenerated.
7448 * configure: Likewise.
7449
7450 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7451
7452 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7453 target_read_memory.
7454 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7455 (get_next_pcs_syscall_next_pc): Likewise.
7456
7457 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7458
7459 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7460 * nto-x86-low.c: Likewise.
7461
7462 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7463
7464 * Makefile.in: Include disable-implicit-rules.mk.
7465
7466 2016-11-23 Pedro Alves <palves@redhat.com>
7467
7468 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7469 (debug_vprintf): Use std::chrono::steady_clock instead of
7470 gettimeofday. Use '.' instead of ':'.
7471 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7472 (get_timestamp): Use std::chrono::steady_clock instead of
7473 gettimeofday.
7474
7475 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7476
7477 * Makefile.in: Fix whitespace formatting.
7478
7479 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7480
7481 * Makefile.in (SFILES, OBS): Flatten list and order
7482 alphabetically.
7483
7484 2016-11-23 Pedro Alves <palves@redhat.com>
7485
7486 * event-loop.c (handle_file_event): Use warning.
7487 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7488 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7489 Use warning.
7490
7491 2016-11-23 Pedro Alves <palves@redhat.com>
7492
7493 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7494 output.
7495 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7496 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7497 debug_printf and debug_flush for debug output.
7498 * server.c (handle_general_set): Likewise.
7499 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7500 output.
7501
7502 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7503
7504 * Makefile.in (.c.o): Replace rule with ...
7505 (%.o: %.c): ... this one.
7506
7507 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7508
7509 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7510 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7511 make.
7512 * configure.ac: Remove checks for the make program.
7513 * configure: Re-generate.
7514
7515 2016-10-28 Pedro Alves <palves@redhat.com>
7516
7517 * Makefile.in (CXX_DIALECT): Get from configure.
7518 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7519 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7520 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7521 * config.in: Regenerate.
7522 * configure: Regenerate.
7523
7524 2016-10-27 Yao Qi <yao.qi@linaro.org>
7525
7526 * linux-low.c (linux_supports_range_stepping): Return true if
7527 can_software_single_step return true.
7528
7529 2016-10-27 Yao Qi <yao.qi@linaro.org>
7530
7531 * inferiors.c (find_inferior_in_random): New function.
7532 * inferiors.h (find_inferior_in_random): Declare.
7533 * linux-low.c (linux_wait_for_event_filtered): Call
7534 find_inferior_in_random instead of find_inferior.
7535
7536 2016-10-27 Yao Qi <yao.qi@linaro.org>
7537
7538 * linux-low.c (linux_wait_1): If single-step breakpoints are
7539 inserted, remove them.
7540
7541 2016-10-26 Pedro Alves <palves@redhat.com>
7542
7543 * linux-low.c (handle_extended_wait): Link parent/child fork
7544 threads.
7545 (linux_wait_1): Unlink them.
7546 (linux_set_resume_request): Ignore resume requests for
7547 already-resumed and unhandled fork child threads.
7548 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7549 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7550 New functions.
7551 (handle_v_requests) <vCont>: Don't call require_running.
7552 * server.h (in_queued_stop_replies): New declaration.
7553
7554 2016-10-24 Yao Qi <yao.qi@linaro.org>
7555
7556 PR server/20733
7557 * linux-aarch64-low.c (append_insns): Cast the return value to
7558 'uint32_t *'.
7559
7560 2016-10-10 Yao Qi <yao.qi@linaro.org>
7561
7562 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7563
7564 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7565
7566 * target.c (target_supports_multi_process): New function, moved
7567 from...
7568 * target.h (target_supports_multi_process): ... here. Remove
7569 macro.
7570
7571 2016-10-05 Tom Tromey <tom@tromey.com>
7572
7573 PR remote/20655:
7574 * tracepoint.c (handle_tracepoint_bkpts): Check
7575 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7576
7577 2016-10-05 Yao Qi <yao.qi@linaro.org>
7578
7579 * configure.srv: Update the path of arm-*.xml files.
7580
7581 2016-10-05 Terry Guo <terry.guo@arm.com>
7582 Yao Qi <yao.qi@linaro.org>
7583
7584 * Makefile.in: Adjust the path of rules.
7585 * configure.srv: Update the path of xml files.
7586 * regformats/arm-with-iwmmxt.dat: Regenerated.
7587 * regformats/arm-with-neon.dat: Likewise.
7588 * regformats/arm-with-vfpv2.dat: Likewise.
7589 * regformats/arm-with-vfpv3.dat Likewise.
7590
7591 2016-09-30 Yao Qi <yao.qi@linaro.org>
7592
7593 PR gdbserver/20627
7594 * target.c (target_stop_and_wait): Don't call
7595 target_continue_no_signal, use resume_stop instead.
7596
7597 2016-09-26 Yao Qi <yao.qi@linaro.org>
7598
7599 * linux-low.c (linux_wait_1): Call debug_exit.
7600
7601 2016-09-23 Pedro Alves <palves@redhat.com>
7602
7603 * Makefile.in (SFILES): Add common/new-op.c.
7604 (OBS): Add common/new-op.o.
7605 (new-op.o): New rule.
7606
7607 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7608
7609 * .gitinore: Ignore more files.
7610
7611 2016-09-21 Yao Qi <yao.qi@linaro.org>
7612
7613 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7614 23.
7615
7616 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7617
7618 * server.c (start_inferior): Call target_mourn_inferior instead of
7619 mourn_inferior; pass ptid_t argument to it.
7620 (resume): Likewise.
7621 (handle_target_event): Likewise.
7622 * target.c (target_mourn_inferior): New function.
7623 * target.h (mourn_inferior): Delete macro.
7624
7625 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7626
7627 * linux-low.c (lwp_is_stepping): New function.
7628
7629 2016-09-06 Carl Love <cel@us.ibm.com>
7630
7631 * server.c (start_inferior): Fixed comment, requested comment change
7632 didn't get updated correctly. Removed reference to ptrace () call as
7633 it is only true on Linux systems.
7634
7635 2016-09-06 Carl Love <cel@us.ibm.com>
7636
7637 * server.c (start_inferior): Do not call
7638 function target_post_create_inferior () if the
7639 inferior process has already exited.
7640
7641 2016-09-05 Pedro Alves <palves@redhat.com>
7642
7643 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7644 (COMPILE.pre, CC_LD): Use CXX directly.
7645 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7646 * acinclude.m4: Don't include build-with-cxx.m4.
7647 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7648 * configure: Regenerate.
7649
7650 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7651
7652 PR gdb/19495
7653 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7654 call writing data to own_buf.
7655
7656 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7657
7658 * target.c (mywait): Call target_wait instead of
7659 the_target->wait.
7660 (target_wait): New function.
7661
7662 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7663
7664 * server.c (start_inferior): New variable 'ptid'. Replace calls
7665 to the_target->resume by target_continue{,_no_signal}, depending
7666 on the case.
7667 * target.c (target_stop_and_wait): Call target_continue_no_signal
7668 instead of the_target->resume.
7669 (target_continue): New function.
7670
7671 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7672
7673 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7674
7675 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7676
7677 PR server/20491
7678 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7679 ps_prochandle.
7680 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7681 * linux-arm-low.c (ps_get_thread_area): Likewise.
7682 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7683 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7684 * linux-mips-low.c (ps_get_thread_area): Likewise.
7685 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7686 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7687 * linux-x86-low.c (ps_get_thread_area): Likewise.
7688 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7689
7690 2016-08-19 Pedro Alves <palves@redhat.com>
7691
7692 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7693
7694 2016-08-19 Pedro Alves <palves@redhat.com>
7695
7696 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7697 comment. Use memcpy instead of casting through unsigned long.
7698
7699 2016-08-19 Pedro Alves <palves@redhat.com>
7700
7701 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7702 allocating around 0x80000000.
7703
7704 2016-08-19 Pedro Alves <palves@redhat.com>
7705
7706 PR gdb/20415
7707 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7708 (x32-avx512-linux-ipa.o): New rules.
7709 * configure.ac (x86_64-*-linux*): New x32 check.
7710 * configure.srv (ipa_x32_linux_regobj): New.
7711 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7712 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7713 descriptions.
7714 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7715 descriptions.
7716 * configure: Regenerate.
7717
7718 2016-08-09 Pedro Alves <palves@redhat.com>
7719
7720 PR gdb/18653
7721 * Makefile.in (OBS): Add signals-state-save-restore.o.
7722 (signals-state-save-restore.o): New rule.
7723 * config.in: Regenerate.
7724 * configure: Regenerate.
7725 * linux-low.c: Include "signals-state-save-restore.h".
7726 (linux_create_inferior): Call
7727 restore_original_signals_state.
7728 * server.c: Include "dispositions-save-restore.h".
7729 (captured_main): Call save_original_signals_state.
7730
7731 2016-08-05 Pedro Alves <palves@redhat.com>
7732
7733 * configure: Regenerate.
7734
7735 2016-08-04 Yao Qi <yao.qi@linaro.org>
7736
7737 * linux-low.c (regsets_fetch_inferior_registers): Check
7738 errno is ESRCH or not.
7739
7740 2016-08-02 Yao Qi <yao.qi@linaro.org>
7741
7742 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7743 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7744 (thread_db_load_search): Update.
7745 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7746 td_ta_set_event and td_ta_event_getmsg.
7747
7748 2016-07-26 Pedro Alves <palves@redhat.com>
7749
7750 PR server/20414
7751 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7752 of unsigned long for 64-bit registers and use uint32_t instead of
7753 unsigned int for 32-bit registers.
7754
7755 2016-07-26 Pedro Alves <palves@redhat.com>
7756
7757 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7758 to 'ptrace'.
7759
7760 2016-07-21 Tom Tromey <tom@tromey.com>
7761
7762 * configure: Rebuild.
7763
7764 2016-07-21 Yao Qi <yao.qi@linaro.org>
7765
7766 * mem-break.c (find_gdb_breakpoint): Cast bp to
7767 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7768
7769 2016-07-21 Yao Qi <yao.qi@linaro.org>
7770
7771 * server.c (handle_v_requests): Support s and S actions
7772 if target_supports_software_single_step return true.
7773
7774 2016-07-21 Yao Qi <yao.qi@linaro.org>
7775
7776 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7777 is resume_step, call maybe_hw_step.
7778 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7779 and unstop them.
7780 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7781 breakpoints or not.
7782 (proceed_one_lwp): If resume request is resume_step, install
7783 reinsert breakpoints and call maybe_hw_step.
7784
7785 2016-07-21 Yao Qi <yao.qi@linaro.org>
7786
7787 * linux-low.c (proceed_one_lwp): Declare.
7788 (linux_resume_one_thread): Remove local variable 'step'.
7789 Lift code enqueue signal. Call proceed_one_lwp instead of
7790 linux_resume_one_lwp.
7791
7792 2016-07-21 Yao Qi <yao.qi@linaro.org>
7793
7794 * linux-low.c (linux_resume_one_thread): Call
7795 enqueue_pending_signal.
7796
7797 2016-07-21 Yao Qi <yao.qi@linaro.org>
7798
7799 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7800 * inferiors.c (do_restore_current_thread_cleanup): New function.
7801 (make_cleanup_restore_current_thread): Likewise.
7802 * linux-low.c (install_software_single_step_breakpoints): Call
7803 make_cleanup_restore_current_thread. Switch current_thread to
7804 thread.
7805
7806 2016-07-21 Yao Qi <yao.qi@linaro.org>
7807
7808 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7809 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7810 (clone_one_breakpoint): Likewise.
7811 (delete_reinsert_breakpoints): Change parameter to thread.
7812 Callers updated.
7813 (has_reinsert_breakpoints): Likewise.
7814 (uninsert_reinsert_breakpoints): Likewise.
7815 (reinsert_reinsert_breakpoints): Likewise.
7816 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7817 (delete_reinsert_breakpoints): Likewise.
7818 (reinsert_reinsert_breakpoints): Likewise.
7819 (uninsert_reinsert_breakpoints): Likewise.
7820 (has_reinsert_breakpoints): Likewise.
7821
7822 2016-07-21 Yao Qi <yao.qi@linaro.org>
7823
7824 * inferiors.c (get_thread_process): Make parameter const.
7825 * inferiors.h (get_thread_process): Update declaration.
7826 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7827 Add new parameters child_thread and parent_thread. Callers
7828 updated.
7829 * mem-break.h (clone_all_breakpoints): Update declaration.
7830
7831 2016-07-21 Yao Qi <yao.qi@linaro.org>
7832
7833 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7834 <command_list, handler>: Remove.
7835 (struct gdb_breakpoint): New.
7836 (struct other_breakpoint): New.
7837 (struct reinsert_breakpoint): New.
7838 (is_gdb_breakpoint): New function.
7839 (any_persistent_commands): Update command_list if
7840 is_gdb_breakpoint returns true.
7841 (set_breakpoint): Create breakpoints according to their types.
7842 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7843 (set_gdb_breakpoint_1): Likewise.
7844 (set_gdb_breakpoint): Likewise.
7845 (clear_breakpoint_conditions): Change parameter type to
7846 'struct gdb_breakpoint *'.
7847 (clear_breakpoint_commands): Likewise.
7848 (clear_breakpoint_conditions_and_commands): Likewise.
7849 (add_condition_to_breakpoint): Likewise.
7850 (add_breakpoint_condition): Likewise.
7851 (add_commands_to_breakpoint): Likewise.
7852 (check_breakpoints): Check other_breakpoint.
7853 (clone_one_breakpoint): Clone breakpopint according to its type.
7854 * mem-break.h (struct gdb_breakpoint): Declare.
7855 (set_gdb_breakpoint): Update declaration.
7856 (clear_breakpoint_conditions_and_commands): Likewise.
7857 (add_breakpoint_condition): Likewise.
7858 (add_breakpoint_commands): Likewise.
7859 * server.c (process_point_options): Change parameter type to
7860 'struct gdb_breakpoint *'.
7861
7862 2016-07-21 Yao Qi <yao.qi@linaro.org>
7863
7864 * mem-break.c (set_breakpoint_at): Rename it to ...
7865 (set_breakpoint_type_at): ... it.
7866 (set_breakpoint_at): Call set_breakpoint_type_at.
7867 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7868 * mem-break.h (set_breakpoint_at): Update comments.
7869
7870 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7871
7872 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7873 to buf parameter.
7874 (nios2_store_gregset): Likewise.
7875
7876 2016-07-01 Pedro Alves <palves@redhat.com>
7877 Antoine Tremblay <antoine.tremblay@ericsson.com>
7878
7879 * linux-low.c: Change interface to take the target lwp_info
7880 pointer directly and return void. Handle detaching from a zombie
7881 thread.
7882 (linux_detach_lwp_callback): New function.
7883 (linux_detach): Detach from the leader thread after detaching from
7884 the clone threads.
7885
7886 2016-06-28 Yao Qi <yao.qi@linaro.org>
7887
7888 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7889 for variable new_offset.
7890 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7891 (aarch64_ftrace_insn_reloc_cb): Likewise.
7892 (aarch64_ftrace_insn_reloc_tb): Likewise.
7893 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7894 PRIx64 instead of PRIx32.
7895
7896 2016-06-28 Yao Qi <yao.qi@linaro.org>
7897
7898 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7899 (the_low_target): Install arm_get_syscall_trapinfo.
7900
7901 2016-06-28 Yao Qi <yao.qi@linaro.org>
7902
7903 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7904 function.
7905 (the_low_target): Install aarch64_get_syscall_trapinfo.
7906
7907 2016-06-28 Yao Qi <yao.qi@linaro.org>
7908
7909 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7910 Callers updated.
7911 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7912 Remove parameter sysno.
7913 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7914 sysret.
7915
7916 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7917
7918 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7919 (s390_emit_ne_goto): Likewise.
7920 (s390_emit_lt_goto): Likewise.
7921 (s390_emit_le_goto): Likewise.
7922 (s390_emit_gt_goto): Likewise.
7923 (s390_emit_ge_goto): Likewise.
7924 (s390x_emit_eq_goto): Likewise.
7925 (s390x_emit_ne_goto): Likewise.
7926 (s390x_emit_lt_goto): Likewise.
7927 (s390x_emit_le_goto): Likewise.
7928 (s390x_emit_gt_goto): Likewise.
7929 (s390x_emit_ge_goto): Likewise.
7930 (s390_emit_ops_impl): Mark variable static.
7931 (s390x_emit_ops): Likewise.
7932
7933 2016-06-17 Yao Qi <yao.qi@linaro.org>
7934
7935 * linux-low.c (handle_extended_wait): Call
7936 uninsert_reinsert_breakpoints for the parent process. Remove
7937 reinsert breakpoints from the child process. Reinsert them to
7938 the parent process when vfork is done.
7939 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7940 (reinsert_reinsert_breakpoints): New function.
7941 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7942 (reinsert_reinsert_breakpoints): Declare.
7943
7944 2016-06-17 Yao Qi <yao.qi@linaro.org>
7945
7946 * linux-low.c (handle_extended_wait): If the parent is doing
7947 step-over, remove the reinsert breakpoints from the forked child.
7948
7949 2016-06-17 Yao Qi <yao.qi@linaro.org>
7950
7951 * linux-low.c (unsuspend_all_lwps): Declare.
7952 (linux_low_filter_event): If thread exited, call finish_step_over.
7953 If step-over is finished, unsuspend other threads.
7954
7955 2016-06-17 Yao Qi <yao.qi@linaro.org>
7956
7957 * linux-low.c (linux_resume_one_lwp_throw): Assert
7958 has_reinsert_breakpoints returns false.
7959 * mem-break.c (delete_disabled_breakpoints): Assert
7960 bp type isn't reinsert_breakpoint.
7961
7962 2016-06-17 Yao Qi <yao.qi@linaro.org>
7963
7964 * linux-low.c (maybe_hw_step): New function.
7965 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7966 (finish_step_over): Switch current_thread to lwp temporarily,
7967 and assert has_reinsert_breakpoints returns true.
7968 (proceed_one_lwp): Call maybe_hw_step.
7969 * mem-break.c (has_reinsert_breakpoints): New function.
7970 * mem-break.h (has_reinsert_breakpoints): Declare.
7971
7972 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7973
7974 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7975
7976 2016-05-17 Yao Qi <yao.qi@linaro.org>
7977
7978 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7979 instead of find_inferior.
7980
7981 2016-05-05 Yao Qi <yao.qi@linaro.org>
7982
7983 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7984 Initialize res to zero.
7985
7986 2016-05-05 Yao Qi <yao.qi@linaro.org>
7987
7988 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7989 to uint32_t.
7990
7991 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7992
7993 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
7994 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
7995 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
7996
7997 2016-04-28 Par Olsson <par.olsson@windriver.com>
7998 Simon Marchi <simon.marchi@ericsson.com>
7999
8000 * tracepoint.c (write_inferior_int8): New function.
8001 (cmd_qtenable_disable): Write enable flag using
8002 write_inferior_int8.
8003
8004 2016-04-25 Yao Qi <yao.qi@linaro.org>
8005
8006 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8007 (need_step_over_p): Return zero if the LWP has pending signals
8008 can be delivered on software single step target.
8009
8010 2016-04-25 Yao Qi <yao.qi@linaro.org>
8011
8012 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8013 return instead of error.
8014
8015 2016-04-22 Yao Qi <yao.qi@linaro.org>
8016
8017 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8018 to 23.
8019
8020 2016-04-22 Yao Qi <yao.qi@linaro.org>
8021
8022 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8023 signal when stepping over breakpoint with software single
8024 step.
8025
8026 2016-04-21 Pedro Alves <palves@redhat.com>
8027
8028 * linux-s390-low.c (s390_collect_ptrace_register)
8029 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8030 add casts.
8031 (s390_check_regset): Use void * instead of gdb_byte *.
8032
8033 2016-04-20 Pedro Alves <palves@redhat.com>
8034
8035 * configure: Renegerate.
8036
8037 2016-04-20 Yao Qi <yao.qi@linaro.org>
8038
8039 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8040 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8041 number 16.
8042 (arm_store_gregset): Likewise.
8043
8044 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8045
8046 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8047 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8048 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8049 (amd64-avx-mpx-linux.c): New rules.
8050 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8051 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8052 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8053 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8054 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8055 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8056 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8057 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8058 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8059 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8060 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8061 * linux-x86-low.c (x86_linux_read_description): Add case for
8062 X86_XSTATE_AVX_MPX_MASK.
8063 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8064 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8065 init_registers_i386_avx_mpx_linux.
8066 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8067 (initialize_low_tracepoint): Call
8068 init_registers_i386_avx_mpx_linux.
8069 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8070 (initialize_low_tracepoint): Call
8071 init_registers_amd64_avx_mpx_linux.
8072 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8073 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8074 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8075 declarations.
8076
8077 2016-04-18 Pedro Alves <palves@redhat.com>
8078
8079 * configure: Regenerate.
8080
8081 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8082
8083 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8084 (aarch64_emit_sub): Likewise.
8085
8086 2016-04-12 Pedro Alves <palves@redhat.com>
8087
8088 * utils.c (prepare_to_throw_exception): Delete.
8089
8090 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8091
8092 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8093
8094 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8095
8096 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8097
8098 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8099
8100 * linux-aarch64-ipa.c: Add <elf.h> include.
8101 * linux-ppc-ipa.c: Add <elf.h> include.
8102 * linux-s390-ipa.c: Add <elf.h> include.
8103
8104 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8105
8106 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8107 (get_raw_reg_ptr): Likewise.
8108 (get_trace_state_variable_value_ptr): Likewise.
8109 (set_trace_state_variable_value_ptr): Likewise.
8110 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8111 char *.
8112
8113 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8114 Marcin Kościelnicki <koriakin@0x04.net>
8115
8116 PR/17221
8117 * linux-ppc-low.c (emit_insns): New function.
8118 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8119 (ppc_emit_prologue): New function.
8120 (ppc_emit_epilogue): New function.
8121 (ppc_emit_add): New function.
8122 (ppc_emit_sub): New function.
8123 (ppc_emit_mul): New function.
8124 (ppc_emit_lsh): New function.
8125 (ppc_emit_rsh_signed): New function.
8126 (ppc_emit_rsh_unsigned): New function.
8127 (ppc_emit_ext): New function.
8128 (ppc_emit_zero_ext): New function.
8129 (ppc_emit_log_not): New function.
8130 (ppc_emit_bit_and): New function.
8131 (ppc_emit_bit_or): New function.
8132 (ppc_emit_bit_xor): New function.
8133 (ppc_emit_bit_not): New function.
8134 (ppc_emit_equal): New function.
8135 (ppc_emit_less_signed): New function.
8136 (ppc_emit_less_unsigned): New function.
8137 (ppc_emit_ref): New function.
8138 (ppc_emit_const): New function.
8139 (ppc_emit_reg): New function.
8140 (ppc_emit_pop): New function.
8141 (ppc_emit_stack_flush): New function.
8142 (ppc_emit_swap): New function.
8143 (ppc_emit_stack_adjust): New function.
8144 (ppc_emit_call): New function.
8145 (ppc_emit_int_call_1): New function.
8146 (ppc_emit_void_call_2): New function.
8147 (ppc_emit_if_goto): New function.
8148 (ppc_emit_goto): New function.
8149 (ppc_emit_eq_goto): New function.
8150 (ppc_emit_ne_goto): New function.
8151 (ppc_emit_lt_goto): New function.
8152 (ppc_emit_le_goto): New function.
8153 (ppc_emit_gt_goto): New function.
8154 (ppc_emit_ge_goto): New function.
8155 (ppc_write_goto_address): New function.
8156 (ppc_emit_ops_impl): New static variable.
8157 (ppc64v1_emit_prologue): New function.
8158 (ppc64v2_emit_prologue): New function.
8159 (ppc64_emit_epilogue): New function.
8160 (ppc64_emit_add): New function.
8161 (ppc64_emit_sub): New function.
8162 (ppc64_emit_mul): New function.
8163 (ppc64_emit_lsh): New function.
8164 (ppc64_emit_rsh_signed): New function.
8165 (ppc64_emit_rsh_unsigned): New function.
8166 (ppc64_emit_ext): New function.
8167 (ppc64_emit_zero_ext): New function.
8168 (ppc64_emit_log_not): New function.
8169 (ppc64_emit_bit_and): New function.
8170 (ppc64_emit_bit_or): New function.
8171 (ppc64_emit_bit_xor): New function.
8172 (ppc64_emit_bit_not): New function.
8173 (ppc64_emit_equal): New function.
8174 (ppc64_emit_less_signed): New function.
8175 (ppc64_emit_less_unsigned): New function.
8176 (ppc64_emit_ref): New function.
8177 (ppc64_emit_const): New function.
8178 (ppc64v1_emit_reg): New function.
8179 (ppc64v2_emit_reg): New function.
8180 (ppc64_emit_pop): New function.
8181 (ppc64_emit_stack_flush): New function.
8182 (ppc64_emit_swap): New function.
8183 (ppc64v1_emit_call): New function.
8184 (ppc64v2_emit_call): New function.
8185 (ppc64v1_emit_int_call_1): New function.
8186 (ppc64v2_emit_int_call_1): New function.
8187 (ppc64v1_emit_void_call_2): New function.
8188 (ppc64v2_emit_void_call_2): New function.
8189 (ppc64_emit_if_goto): New function.
8190 (ppc64_emit_eq_goto): New function.
8191 (ppc64_emit_ne_goto): New function.
8192 (ppc64_emit_lt_goto): New function.
8193 (ppc64_emit_le_goto): New function.
8194 (ppc64_emit_gt_goto): New function.
8195 (ppc64_emit_ge_goto): New function.
8196 (ppc64v1_emit_ops_impl): New static variable.
8197 (ppc64v2_emit_ops_impl): New static variable.
8198 (ppc_emit_ops): New function.
8199 (linux_low_target): Wire in ppc_emit_ops.
8200
8201 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8202 Marcin Kościelnicki <koriakin@0x04.net>
8203
8204 PR/17221
8205 * Makefile.in: Add powerpc-*-ipa.o
8206 * configure.srv: Add ipa_obj for powerpc*-linux.
8207 * linux-ppc-ipa.c: New file.
8208 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8209 includes.
8210 (PPC_FIELD): New macro.
8211 (PPC_SEXT): New macro.
8212 (PPC_OP6): New macro.
8213 (PPC_BO): New macro.
8214 (PPC_LI): New macro.
8215 (PPC_BD): New macro.
8216 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8217 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8218 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8219 (ppc_get_thread_area): New function.
8220 (is_elfv2_inferior): New function.
8221 (gen_ds_form): New function.
8222 (GEN_STD): New macro.
8223 (GEN_STDU): New macro.
8224 (GEN_LD): New macro.
8225 (GEN_LDU): New macro.
8226 (gen_d_form): New function.
8227 (GEN_ADDI): New macro.
8228 (GEN_ADDIS): New macro.
8229 (GEN_LI): New macro.
8230 (GEN_LIS): New macro.
8231 (GEN_ORI): New macro.
8232 (GEN_ORIS): New macro.
8233 (GEN_LWZ): New macro.
8234 (GEN_STW): New macro.
8235 (GEN_STWU): New macro.
8236 (gen_xfx_form): New function.
8237 (GEN_MFSPR): New macro.
8238 (GEN_MTSPR): New macro.
8239 (GEN_MFCR): New macro.
8240 (GEN_MTCR): New macro.
8241 (GEN_SYNC): New macro.
8242 (GEN_LWSYNC): New macro.
8243 (gen_x_form): New function.
8244 (GEN_OR): New macro.
8245 (GEN_MR): New macro.
8246 (GEN_LWARX): New macro.
8247 (GEN_STWCX): New macro.
8248 (GEN_CMPW): New macro.
8249 (gen_md_form): New function.
8250 (GEN_RLDICL): New macro.
8251 (GEN_RLDICR): New macro.
8252 (gen_i_form): New function.
8253 (GEN_B): New macro.
8254 (GEN_BL): New macro.
8255 (gen_b_form): New function.
8256 (GEN_BNE): New macro.
8257 (GEN_LOAD): New macro.
8258 (GEN_STORE): New macro.
8259 (gen_limm): New function.
8260 (gen_atomic_xchg): New function.
8261 (gen_call): New function.
8262 (ppc_relocate_instruction): New function.
8263 (ppc_install_fast_tracepoint_jump_pad): New function.
8264 (ppc_get_min_fast_tracepoint_insn_len): New function.
8265 (ppc_get_ipa_tdesc_idx): New function.
8266 (the_low_target): Wire in the new functions.
8267 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8268 tdescs.
8269 * linux-ppc-tdesc.h: New file.
8270
8271 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8272
8273 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8274 (alloc_jump_pad_buffer): New function.
8275 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8276 (alloc_jump_pad_buffer): New function.
8277 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8278 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8279 (alloc_jump_pad_buffer): New function.
8280 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8281 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8282 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8283 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8284
8285 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8286
8287 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8288 * linux-amd64-ipa.c: Likewise.
8289 * linux-i386-ipa.c: Likewise.
8290 * linux-s390-ipa.c: Likewise.
8291 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8292 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8293 set_trace_state_variable_value_ptr.
8294 (struct ipa_sym_addresses): Likewise.
8295 (symbol_list): Likewise.
8296 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8297 accessing gdb_collect directly.
8298 (gdb_collect_ptr_type): New typedef.
8299 (get_raw_reg_ptr_type): New typedef.
8300 (get_trace_state_variable_value_ptr_type): New typedef.
8301 (set_trace_state_variable_value_ptr_type): New typedef.
8302 (gdb_collect_ptr): New global.
8303 (get_raw_reg_ptr): New global.
8304 (get_trace_state_variable_value_ptr): New global.
8305 (set_trace_state_variable_value_ptr): New global.
8306 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8307 accessing get_raw_reg directly.
8308 (get_get_tsv_func_addr): Likewise for
8309 get_trace_state_variable_value_ptr.
8310 (get_set_tsv_func_addr): Likewise for
8311 set_trace_state_variable_value_ptr.
8312 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8313
8314 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8315
8316 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8317
8318 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8319
8320 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8321 packets.
8322 (relocate_instruction): Remove own_buf.
8323 * server.c (own_buf): Make global.
8324 (handle_v_requests): Make global.
8325 * server.h (own_buf): New declaration.
8326 (handle_v_requests): New prototype.
8327
8328 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8329
8330 PR 18377
8331 * linux-s390-low.c (add_insns): New function.
8332 (s390_emit_prologue): New function.
8333 (s390_emit_epilogue): New function.
8334 (s390_emit_add): New function.
8335 (s390_emit_sub): New function.
8336 (s390_emit_mul): New function.
8337 (s390_emit_lsh): New function.
8338 (s390_emit_rsh_signed): New function.
8339 (s390_emit_rsh_unsigned): New function.
8340 (s390_emit_ext): New function.
8341 (s390_emit_log_not): New function.
8342 (s390_emit_bit_and): New function.
8343 (s390_emit_bit_or): New function.
8344 (s390_emit_bit_xor): New function.
8345 (s390_emit_bit_not): New function.
8346 (s390_emit_equal): New function.
8347 (s390_emit_less_signed): New function.
8348 (s390_emit_less_unsigned): New function.
8349 (s390_emit_ref): New function.
8350 (s390_emit_if_goto): New function.
8351 (s390_emit_goto): New function.
8352 (s390_write_goto_address): New function.
8353 (s390_emit_litpool): New function.
8354 (s390_emit_const): New function.
8355 (s390_emit_call): New function.
8356 (s390_emit_reg): New function.
8357 (s390_emit_pop): New function.
8358 (s390_emit_stack_flush): New function.
8359 (s390_emit_zero_ext): New function.
8360 (s390_emit_swap): New function.
8361 (s390_emit_stack_adjust): New function.
8362 (s390_emit_set_r2): New function.
8363 (s390_emit_int_call_1): New function.
8364 (s390_emit_void_call_2): New function.
8365 (s390_emit_eq_goto): New function.
8366 (s390_emit_ne_goto): New function.
8367 (s390_emit_lt_goto): New function.
8368 (s390_emit_le_goto): New function.
8369 (s390_emit_gt_goto): New function.
8370 (s390_emit_ge_goto): New function.
8371 (s390x_emit_prologue): New function.
8372 (s390x_emit_epilogue): New function.
8373 (s390x_emit_add): New function.
8374 (s390x_emit_sub): New function.
8375 (s390x_emit_mul): New function.
8376 (s390x_emit_lsh): New function.
8377 (s390x_emit_rsh_signed): New function.
8378 (s390x_emit_rsh_unsigned): New function.
8379 (s390x_emit_ext): New function.
8380 (s390x_emit_log_not): New function.
8381 (s390x_emit_bit_and): New function.
8382 (s390x_emit_bit_or): New function.
8383 (s390x_emit_bit_xor): New function.
8384 (s390x_emit_bit_not): New function.
8385 (s390x_emit_equal): New function.
8386 (s390x_emit_less_signed): New function.
8387 (s390x_emit_less_unsigned): New function.
8388 (s390x_emit_ref): New function.
8389 (s390x_emit_if_goto): New function.
8390 (s390x_emit_const): New function.
8391 (s390x_emit_call): New function.
8392 (s390x_emit_reg): New function.
8393 (s390x_emit_pop): New function.
8394 (s390x_emit_stack_flush): New function.
8395 (s390x_emit_zero_ext): New function.
8396 (s390x_emit_swap): New function.
8397 (s390x_emit_stack_adjust): New function.
8398 (s390x_emit_int_call_1): New function.
8399 (s390x_emit_void_call_2): New function.
8400 (s390x_emit_eq_goto): New function.
8401 (s390x_emit_ne_goto): New function.
8402 (s390x_emit_lt_goto): New function.
8403 (s390x_emit_le_goto): New function.
8404 (s390x_emit_gt_goto): New function.
8405 (s390x_emit_ge_goto): New function.
8406 (s390_emit_ops): New function.
8407 (struct linux_target_ops): Fill in emit_ops hook.
8408
8409 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8410
8411 PR 18377
8412 * Makefile.in: Add s390 IPA files.
8413 * configure.srv: Build IPA for s390.
8414 * linux-s390-ipa.c: New file.
8415 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8416 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8417 (tdesc_s390_linux32): Likewise.
8418 (init_registers_s390_linux32v1): Likewise.
8419 (tdesc_s390_linux32v1): Likewise.
8420 (init_registers_s390_linux32v2): Likewise.
8421 (tdesc_s390_linux32v2): Likewise.
8422 (init_registers_s390_linux64): Likewise.
8423 (tdesc_s390_linux64): Likewise.
8424 (init_registers_s390_linux64v1): Likewise.
8425 (tdesc_s390_linux64v1): Likewise.
8426 (init_registers_s390_linux64v2): Likewise.
8427 (tdesc_s390_linux64v2): Likewise.
8428 (init_registers_s390_te_linux64): Likewise.
8429 (tdesc_s390_te_linux64): Likewise.
8430 (init_registers_s390_vx_linux64): Likewise.
8431 (tdesc_s390_vx_linux64): Likewise.
8432 (init_registers_s390_tevx_linux64): Likewise.
8433 (tdesc_s390_tevx_linux64): Likewise.
8434 (init_registers_s390x_linux64): Likewise.
8435 (tdesc_s390x_linux64): Likewise.
8436 (init_registers_s390x_linux64v1): Likewise.
8437 (tdesc_s390x_linux64v1): Likewise.
8438 (init_registers_s390x_linux64v2): Likewise.
8439 (tdesc_s390x_linux64v2): Likewise.
8440 (init_registers_s390x_te_linux64): Likewise.
8441 (tdesc_s390x_te_linux64): Likewise.
8442 (init_registers_s390x_vx_linux64): Likewise.
8443 (tdesc_s390x_vx_linux64): Likewise.
8444 (init_registers_s390x_tevx_linux64): Likewise.
8445 (tdesc_s390x_tevx_linux64): Likewise.
8446 (have_hwcap_s390_vx): New static variable.
8447 (s390_arch_setup): Fill have_hwcap_s390_vx.
8448 (s390_get_thread_area): New function.
8449 (s390_ft_entry_gpr_esa): New const.
8450 (s390_ft_entry_gpr_zarch): New const.
8451 (s390_ft_entry_misc): New const.
8452 (s390_ft_entry_fr): New const.
8453 (s390_ft_entry_vr): New const.
8454 (s390_ft_main_31): New const.
8455 (s390_ft_main_64): New const.
8456 (s390_ft_exit_fr): New const.
8457 (s390_ft_exit_vr): New const.
8458 (s390_ft_exit_misc): New const.
8459 (s390_ft_exit_gpr_esa): New const.
8460 (s390_ft_exit_gpr_zarch): New const.
8461 (append_insns): New function.
8462 (s390_relocate_instruction): New function.
8463 (s390_install_fast_tracepoint_jump_pad): New function.
8464 (s390_get_min_fast_tracepoint_insn_len): New function.
8465 (s390_get_ipa_tdesc_idx): New function.
8466 (struct linux_target_ops): Wire in the above functions.
8467 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8468 * linux-s390-tdesc.h: New file.
8469
8470 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8471
8472 * linux-s390-low.c (s390_supports_tracepoints): New function.
8473 (struct linux_target_ops): Fill supports_tracepoints hook.
8474
8475 2016-03-18 Yao Qi <yao.qi@linaro.org>
8476
8477 * linux-low.c (lwp_signal_can_be_delivered): New function.
8478 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8479
8480 2016-03-18 Yao Qi <yao.qi@linaro.org>
8481
8482 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8483 0 if signal is enqueued. Remove 'signal' from one debugging
8484 message. Move one debugging message to some lines below.
8485 Remove code setting 'signal' to 0.
8486
8487 2016-03-18 Yao Qi <yao.qi@linaro.org>
8488
8489 * linux-low.c (linux_low_filter_event): Remove redundant
8490 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8491
8492 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8493
8494 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8495 (struct linux_target_ops): Wire in the above.
8496
8497 2016-03-03 Yao Qi <yao.qi@linaro.org>
8498
8499 * linux-low.c: Update comments to start_step_over.
8500
8501 2016-03-03 Yao Qi <yao.qi@linaro.org>
8502
8503 PR server/19736
8504 * linux-low.c (handle_extended_wait): Set child suspended
8505 if event_lwp->bp_reinsert isn't zero.
8506
8507 2016-03-02 Yao Qi <yao.qi@linaro.org>
8508
8509 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8510 enqueue_pending_signal.
8511
8512 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8513
8514 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8515 is actually loaded.
8516
8517 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8518
8519 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8520 (s390_regmap_3264) [!__s390x__]: New global.
8521 (s390_collect_ptrace_register): Skip map entries containing -1.
8522 (s390_supply_ptrace_register): Ditto.
8523 (s390_fill_gprs_high): New function.
8524 (s390_store_gprs_high): New function.
8525 (s390_regsets): Add NT_S390_HIGH_GPRS.
8526 (s390_get_hwcap): Enable on 31-bit.
8527 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8528 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8529 Detect NT_S390_HIGH_GPRS.
8530 (s390_usrregs_info_3264): Enable on 31-bit.
8531 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8532 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8533
8534 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8535
8536 PR gdb/13808
8537 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8538 * configure.srv: Ditto.
8539 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8540 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8541 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8542 (init_registers_amd64_linux): Remove prototype.
8543 (tdesc_amd64_linux): Remove declaration.
8544 (get_ipa_tdesc): New function.
8545 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8546 initialize remaining tdescs.
8547 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8548 (init_registers_i386_linux): Remove prototype.
8549 (tdesc_i386_linux): Remove declaration.
8550 (get_ipa_tdesc): New function.
8551 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8552 initialize remaining tdescs.
8553 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8554 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8555 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8556 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8557 (x86_get_ipa_tdesc_idx): New function.
8558 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8559 * linux-x86-tdesc.h: New file.
8560 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8561 (target_get_ipa_tdesc_idx): New macro.
8562 * tracepoint.c (ipa_tdesc_idx): New macro.
8563 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8564 (symbol_list): Add ipa_tdesc_idx.
8565 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8566 (ipa_tdesc): Remove.
8567 (ipa_tdesc_idx): New variable.
8568 (get_context_regcache): Use get_ipa_tdesc.
8569 (gdb_collect): Ditto.
8570 (gdb_probe): Ditto.
8571 * tracepoint.h (get_ipa_tdesc): New prototype.
8572 (ipa_tdesc): Remove.
8573
8574 2016-02-24 Pedro Alves <palves@redhat.com>
8575
8576 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8577 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8578 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8579 Factor out common code between the USE_SIGTRAP_SIGINFO and
8580 !USE_SIGTRAP_SIGINFO blocks.
8581 (linux_low_filter_event): Call save_stop_reason instead of
8582 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8583 Update comments.
8584 (linux_wait_1): Update comments.
8585
8586 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8587
8588 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8589 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8590 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8591 ppc_insert_point, ppc_remove_point.
8592
8593 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8594
8595 * linux-s390-low.c (s390_supports_z_point_type): New function.
8596 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8597
8598 2016-02-16 Yao Qi <yao.qi@linaro.org>
8599
8600 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8601 PC. Get pc from regcache_read_pc.
8602
8603 2016-02-12 Yao Qi <yao.qi@linaro.org>
8604
8605 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8606 or linux_get_pc_32bit.
8607 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8608
8609 2016-02-12 Yao Qi <yao.qi@linaro.org>
8610
8611 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8612 arm_linux_get_next_pcs_fixup.
8613
8614 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8615
8616 * tracepoint.c (x_tracepoint_action_download): Change
8617 write_inferior_data_ptr to write_inferior_data_pointer.
8618 (cmd_qtstart): Likewise.
8619 (write_inferior_data_ptr): Remove.
8620 (download_agent_expr): Change write_inferior_data_ptr to
8621 write_inferior_data_pointer.
8622 (download_tracepoint_1): Likewise.
8623 (download_tracepoint): Likewise.
8624 (download_trace_state_variables): Likewise.
8625
8626 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8627 Marcin Kościelnicki <koriakin@0x04.net>
8628
8629 * tracepoint.c (struct tracepoint_action_ops): Remove.
8630 (struct tracepoint_action): Remove ops.
8631 (m_tracepoint_action_download, r_tracepoint_action_download)
8632 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8633 size and offset accordingly.
8634 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8635 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8636 (tracepoint_action_send, tracepoint_action_download): New functions.
8637 Helpers for trace action handlers.
8638 (add_tracepoint_action): Remove setup actions ops.
8639 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8640
8641 2016-02-10 Yao Qi <yao.qi@linaro.org>
8642
8643 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8644
8645 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8646
8647 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8648 to AC_OUTPUT.
8649 * configure: Regenerate.
8650
8651 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8652
8653 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8654 void * to gdb_byte *.
8655 * linux-low.c (siginfo_fixup): Likewise.
8656 (linux_xfer_siginfo): Likewise.
8657 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8658 Likewise.
8659 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8660
8661 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8662
8663 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8664 to srv_tgtobj.
8665 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8666 to srv_tgtobj.
8667 * linux-x86-low.c [__x86_64__]: Include
8668 "nat/amd64-linux-siginfo.h".
8669 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8670 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8671 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8672 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8673 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8674 (cpt_si_fd, si_timerid, si_overrun): Move from
8675 nat/amd64-linux-siginfo.c.
8676 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8677
8678 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8679
8680 * server.c (skip_to_semicolon): Remove.
8681 (process_point_options): Use strchrnul instead of
8682 skip_to_semicolon.
8683
8684 2016-01-26 Yao Qi <yao.qi@linaro.org>
8685
8686 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8687 * linux-low.c (install_software_single_step_breakpoints): Don't
8688 call regcache_read_pc.
8689 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8690 argument pc.
8691
8692 2016-01-26 Yao Qi <yao.qi@linaro.org>
8693
8694 * linux-low.c (install_software_single_step_breakpoints): Call
8695 regcache_read_pc instead of get_pc.
8696
8697 2016-01-26 Yao Qi <yao.qi@linaro.org>
8698
8699 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8700 (unblock_async_io): Rename to ...
8701 (block_unblock_async_io): ... it. New function.
8702 (enable_async_io): Don't install SIGIO handler. Unblock it
8703 instead.
8704 (disable_async_io): Don't ignore SIGIO. Block it instead.
8705 (initialize_async_io): Install SIGIO handler. Don't call
8706 unblock_async_io.
8707
8708 2016-01-26 Yao Qi <yao.qi@linaro.org>
8709
8710 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8711 first character is '\003', call *the_target->request_interrupt.
8712
8713 2016-01-25 Yao Qi <yao.qi@linaro.org>
8714
8715 * remote-utils.c (new_thread_notify): Remove.
8716 (dead_thread_notify): Likewise.
8717 * remote-utils.h (new_thread_notify): Remove declaration.
8718 (dead_thread_notify): Likewise.
8719
8720 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8721
8722 * gdb.trace/pending.exp: Fix expected message on continue.
8723
8724 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8725
8726 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8727 it works properly on big-endian machines where sizeof (CORE_ADDR)
8728 != sizeof (void *).
8729
8730 2016-01-21 Pedro Alves <palves@redhat.com>
8731
8732 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8733 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8734 * configure: Regenerate.
8735
8736 2016-01-21 Yao Qi <yao.qi@linaro.org>
8737
8738 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8739 is_thumb and set it according to CPSR saved on the stack.
8740 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8741 arm_sigreturn_next_pc.
8742
8743 2016-01-18 Yao Qi <yao.qi@linaro.org>
8744
8745 * linux-low.c (linux_set_pc_64bit): New function.
8746 (linux_get_pc_64bit): New function.
8747 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8748 Declare.
8749 * linux-sparc-low.c (debug_threads): Remove declaration.
8750 (sparc_get_pc): Remove.
8751 (the_low_target): Use linux_get_pc_64bit instead of
8752 sparc_get_pc.
8753 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8754 (the_low_target): Use linux_get_pc_64bit and
8755 linux_set_pc_64bit.
8756
8757 2016-01-18 Yao Qi <yao.qi@linaro.org>
8758
8759 * linux-arm-low.c (debug_threads): Remove declaration.
8760 (arm_get_pc, arm_set_pc): Remove.
8761 (the_low_target): Use linux_get_pc_32bit and
8762 linux_set_pc_32bit.
8763 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8764 (the_low_target): Use linux_get_pc_32bit and
8765 linux_set_pc_32bit.
8766 * linux-cris-low.c (debug_threads): Remove declaration.
8767 (cris_get_pc, cris_set_pc,): Remove.
8768 (the_low_target): Use linux_get_pc_32bit and
8769 linux_set_pc_32bit.
8770 * linux-crisv32-low.c (debug_threads): Remove declaration.
8771 (cris_get_pc, cris_set_pc): Remove.
8772 (the_low_target): Use linux_get_pc_32bit and
8773 linux_set_pc_32bit.
8774 * linux-low.c: Include inttypes.h.
8775 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8776 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8777 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8778 (the_low_target): Use linux_get_pc_32bit and
8779 linux_set_pc_32bit.
8780 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8781 (the_low_target): Use linux_get_pc_32bit and
8782 linux_set_pc_32bit.
8783 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8784 (the_low_target): Use linux_get_pc_32bit and
8785 linux_set_pc_32bit.
8786 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8787 (the_low_target): Use linux_get_pc_32bit and
8788 linux_set_pc_32bit.
8789 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8790 (the_low_target): Use linux_get_pc_32bit and
8791 linux_set_pc_32bit.
8792
8793 2016-01-18 Gary Benson <gbenson@redhat.com>
8794
8795 * configure.ac (AC_FUNC_FORK): New check.
8796 * config.in: Regenerate.
8797 * configure: Likewise.
8798
8799 2016-01-14 Yao Qi <yao.qi@linaro.org>
8800
8801 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8802 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8803 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8804 arm_get_next_pcs_ctor.
8805
8806 2016-01-12 Josh Stone <jistone@redhat.com>
8807 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8808
8809 * inferiors.h: Include "gdb_vecs.h".
8810 (struct process_info): Add syscalls_to_catch.
8811 * inferiors.c (remove_process): Free syscalls_to_catch.
8812 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8813 syscall_return stops.
8814 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8815 * server.c (handle_general_set): Handle QCatchSyscalls.
8816 (handle_query): Report support for QCatchSyscalls.
8817 * target.h (struct target_ops): Add supports_catch_syscall.
8818 (target_supports_catch_syscall): New macro.
8819 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8820 (struct lwp_info): Add syscall_state.
8821 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8822 Maintain syscall_state and syscalls_to_catch across exec.
8823 (get_syscall_trapinfo): New function, proxy to the_low_target.
8824 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8825 (linux_low_filter_event): Toggle syscall_state entry/return for
8826 syscall traps, and set it ignored for all others.
8827 (gdb_catching_syscalls_p): New function.
8828 (gdb_catch_this_syscall_p): New function.
8829 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8830 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8831 (linux_supports_catch_syscall): New function.
8832 (linux_target_ops): Install it.
8833 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8834 (the_low_target): Install it.
8835
8836 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8837
8838 * acinclude.m4: Include new ../warning.m4 file.
8839 * configure: Regenerated.
8840 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8841
8842 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8843
8844 * ax.c (is_goto_target): Mark static.
8845 * linux-low.c (register_addr): Likewise.
8846 (linux_fetch_registers, linux_store_registers): Likewise.
8847 * mem-break.c (any_persistent_commands): Fix old prototype.
8848 (add_commands_to_breakpoint): Mark static.
8849 * regcache.c (find_register_by_name): Delete unused func.
8850 * remote-utils.c (hex_or_minus_one): Mark static.
8851 * server.c (monitor_show_help): Mark static.
8852 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8853 handle_v_requests): Likewise.
8854
8855 2016-01-12 Pedro Alves <palves@redhat.com>
8856
8857 Remove use of the registered trademark symbol throughout.
8858
8859 2016-01-08 Yao Qi <yao.qi@linaro.org>
8860
8861 * remote-utils.c (getpkt): If c is '\003', call target hook
8862 request_interrupt.
8863
8864 2016-01-06 Yao Qi <yao.qi@linaro.org>
8865
8866 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8867 linux-aarch32-low.c.
8868 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8869 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8870 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8871 (thumb2_breakpoint): Declare.
8872 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8873 linux-aarch32-low.h.
8874 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8875 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8876 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8877
8878 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8879
8880 * gdbreplay.c (gdbreplay_version): Change copyright year in
8881 version message.
8882 * server.c (gdbserver_version): Likewise.
8883
8884 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8885
8886 * server.c (crc32_table): Delete.
8887 (crc32): Use libiberty's xcrc32 function.
8888
8889 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8890
8891 * lynx-low.c (lynx_delete_thread_callback): New function.
8892 (lynx_mourn): Properly delete our process and all of its
8893 threads. Remove call to clear_inferiors.
8894
8895 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8896
8897 * target.c (thread_search_callback): Add check that
8898 the thread_stopped target callback is not NULL before
8899 calling it.
8900
8901 2015-12-21 Yao Qi <yao.qi@linaro.org>
8902
8903 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8904 arm breakpoint.
8905
8906 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8907
8908 * server.c (handle_query): Call target_supports_software_single_step.
8909
8910 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8911
8912 * linux-low.c (single_step): New function.
8913 (linux_resume_one_lwp_throw): Call single_step.
8914 (start_step_over): Likewise.
8915
8916 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8917
8918 * Makefile.in (SFILES): Append arch/arm-linux.c,
8919 arch/arm-get-next-pcs.c.
8920 (arm-linux.o): New rule.
8921 (arm-get-next-pcs.o): New rule.
8922 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8923 arm-linux.o.
8924 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8925 to linux-aarch32-low.c.
8926 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8927 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8928 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8929 (thumb2_breakpoint_len): Likewise.
8930 (arm_is_thumb_mode): Make non-static.
8931 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8932 from linux-aarch32-low.c.
8933 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8934 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8935 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8936 (thumb2_breakpoint_len): Likewise.
8937 (arm_is_thumb_mode): New declaration.
8938 * linux-arm-low.c: Include arch/arm-linux.h
8939 aarch/arm-get-next-pcs.h, sys/syscall.h.
8940 (get_next_pcs_ops): New struct.
8941 (get_next_pcs_addr_bits_remove): New function.
8942 (get_next_pcs_is_thumb): New function.
8943 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8944 (arm_sigreturn_next_pc): Likewise.
8945 (get_next_pcs_syscall_next_pc): Likewise.
8946 (arm_gdbserver_get_next_pcs): Likewise.
8947 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8948 Initialize.
8949 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8950 * server.h: Include gdb_vecs.h.
8951
8952 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8953
8954 * Makefile.in (SFILES): Append common/common-regcache.c.
8955 (OBS): Append common-regcache.o.
8956 (common-regcache.o): New rule.
8957 * regcache.c (init_register_cache): Initialize cache to
8958 REG_UNAVAILABLE.
8959 (regcache_raw_read_unsigned): New function.
8960 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8961 register_status enum.
8962
8963 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8964
8965 * linux-aarch64-low.c (the_low_targets): Rename
8966 breakpoint_reinsert_addr to get_next_pcs.
8967 * linux-arm-low.c (the_low_targets): Likewise.
8968 * linux-bfin-low.c (the_low_targets): Likewise.
8969 * linux-cris-low.c (the_low_targets): Likewise.
8970 * linux-crisv32-low.c (the_low_targets): Likewise.
8971 * linux-low.c (can_software_single_step): Likewise.
8972 (install_software_single_step_breakpoints): New function.
8973 (start_step_over): Use install_software_single_step_breakpoints.
8974 * linux-low.h: New CORE_ADDR vector.
8975 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8976 get_next_pcs.
8977 * linux-mips-low.c (the_low_targets): Likewise.
8978 * linux-nios2-low.c (the_low_targets): Likewise.
8979 * linux-sparc-low.c (the_low_targets): Likewise.
8980
8981 2015-12-17 Pedro Alves <palves@redhat.com>
8982
8983 * linux-low.c (linux_kill_one_lwp): Remove references to
8984 LinuxThreads.
8985 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8986 to 'kill'.
8987 (linux_init_signals): Delete.
8988 (initialize_low): Adjust.
8989 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
8990
8991 2015-12-16 Pedro Alves <palves@redhat.com>
8992
8993 * configure.ac (compiler warning flags): When testing a
8994 -Wno-foo option, check whether -Wfoo works instead.
8995 * configure: Regenerate.
8996
8997 2015-12-11 Don Breazeal <donb@codesourcery.com>
8998
8999 * server.c (process_serial_event): Don't exit from gdbserver
9000 in remote mode if there are still active inferiors.
9001
9002 2015-12-11 Yao Qi <yao.qi@linaro.org>
9003
9004 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9005 arm_breakpoint_at if the process is 32-bit.
9006
9007 2015-12-11 Yao Qi <yao.qi@linaro.org>
9008
9009 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9010 arm breakpoint.
9011
9012 2015-12-07 Yao Qi <yao.qi@linaro.org>
9013
9014 * configure.srv: Append arm.o to srv_tgtobj for
9015 aarch64*-*-linux* target.
9016 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9017 from linux-arm-low.c.
9018 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9019 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9020 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9021 (thumb2_breakpoint_len): Likewise.
9022 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9023 (arm_breakpoint_kinds): Likewise.
9024 (arm_breakpoint_kind_from_pc): Likewise.
9025 (arm_sw_breakpoint_from_kind): Likewise.
9026 (arm_breakpoint_kind_from_current_state): Likewise.
9027 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9028 (arm_sw_breakpoint_from_kind): Declare.
9029 (arm_breakpoint_kind_from_current_state): Declare.
9030 (arm_breakpoint_at): Declare.
9031 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9032 arm_sw_breakpoint_from_kind if process is 32-bit.
9033 (aarch64_breakpoint_kind_from_pc): New function.
9034 (aarch64_breakpoint_kind_from_current_state): New function.
9035 (the_low_target): Initialize fields breakpoint_kind_from_pc
9036 and breakpoint_kind_from_current_state.
9037 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9038 linux-aarch32-low.c.
9039 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9040 (arm_breakpoint, arm_breakpoint_len): Likewise.
9041 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9042 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9043 (arm_is_thumb_mode): Likewise.
9044 (arm_breakpoint_at): Likewise.
9045 (arm_breakpoint_kind_from_pc): Likewise.
9046 (arm_sw_breakpoint_from_kind): Likewise.
9047 (arm_breakpoint_kind_from_current_state): Likewise.
9048
9049 Revert:
9050 2015-08-04 Yao Qi <yao.qi@linaro.org>
9051
9052 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9053 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9054 * server.c (extended_protocol): Remove "static".
9055 * server.h (extended_protocol): Declare it.
9056
9057 2015-12-04 Josh Stone <jistone@redhat.com>
9058
9059 * target.h (struct target_ops) <arch_setup>: Rename to ...
9060 (struct target_ops) <post_create_inferior>: ... this.
9061 (target_arch_setup): Rename to ...
9062 (target_post_create_inferior): ... this, calling post_create_inferior.
9063 * server.c (start_inferior): Update target_arch_setup calls to
9064 target_post_create_inferior.
9065 * linux-low.c (linux_low_ptrace_options): Forward declare.
9066 (linux_arch_setup): Update its comment for general use.
9067 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9068 (struct linux_target_ops): Use linux_post_create_inferior.
9069 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9070 to post_create_inferior.
9071 * nto-low.c (struct nto_target_ops): Likewise.
9072 * spu-low.c (struct spu_target_ops): Likewise.
9073 * win32-low.c (struct win32_target_ops): Likewise.
9074
9075 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9076
9077 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9078
9079 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9080
9081 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9082 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9083 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9084 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9085 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9086 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9087 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9088 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9089 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9090 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9091 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9092 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9093
9094 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9095
9096 * linux-low.c (linux_look_up_symbols): Don't call
9097 linux_supports_traceclone.
9098 * linux-low.h (thread_db_init): Remove use_events argument.
9099 * thread-db.c (thread_db_use_event): Remove global variable.
9100 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9101 (struct thread_db) <td_create_bp>: Remove field.
9102 (thread_db_create_event): Remove function.
9103 (thread_db_enable_reporting): Likewise.
9104 (find_one_thread): Don't check for thread_db_use_events.
9105 (attach_thread): Likewise.
9106 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9107 (try_thread_db_load_1): Don't check for thread_db_use_events.
9108 (thread_db_init): Remove use_events argument and thread events
9109 handling.
9110 (remove_thread_event_breakpoints): Remove function.
9111 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9112
9113 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9114
9115 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9116 New function.
9117 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9118 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9119 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9120 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9121 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9122 Initialize.
9123 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9124 New function.
9125 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9126 * linux-low.c (can_hardware_single_step): Use
9127 supports_hardware_single_step.
9128 (can_software_single_step): New function.
9129 (start_step_over): Call can_software_single_step.
9130 (linux_supports_hardware_single_step): New function.
9131 (struct target_ops) <supports_software_single_step>: Initialize.
9132 * linux-low.h (struct linux_target_ops)
9133 <supports_hardware_single_step>: Initialize.
9134 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9135 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9136 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9137 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9138 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9139 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9140 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9141 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9142 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9143 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9144 Initialize.
9145 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9146 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9147 Initialize.
9148 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9149 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9150 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9151 New function.
9152 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9153 * target.h (struct target_ops): <supports_software_single_step>:
9154 New field.
9155 (target_supports_software_single_step): New macro.
9156
9157 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9158
9159 * linux-low.c (linux_wait_1): Fix pc advance condition.
9160 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9161 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9162
9163 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9164
9165 * linux-arm-low.c (arm_is_thumb_mode): New function.
9166 (arm_breakpoint_at): Use arm_is_thumb_mode.
9167 (arm_breakpoint_kind_from_current_state): New function.
9168 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9169 Initialize.
9170 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9171 (linux_breakpoint_kind_from_current_state): New function.
9172 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9173 * linux-low.h (struct linux_target_ops)
9174 <breakpoint_kind_from_current_state>: New field.
9175 * target.h (struct target_ops): Likewise.
9176 (target_breakpoint_kind_from_current_state): New macro.
9177
9178 2015-11-30 Pedro Alves <palves@redhat.com>
9179
9180 * linux-low.c (linux_resume): Wake up the event loop before
9181 returning.
9182
9183 2015-11-30 Pedro Alves <palves@redhat.com>
9184
9185 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9186 check.
9187 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9188 to -1.
9189 * target.c (struct thread_search): New structure.
9190 (thread_search_callback): New function.
9191 (prev_general_thread): New global.
9192 (prepare_to_access_memory, done_accessing_memory): New functions.
9193 * target.h (prepare_to_access_memory, done_accessing_memory):
9194 Replace macros with function declarations.
9195
9196 2015-11-30 Pedro Alves <palves@redhat.com>
9197
9198 PR 14618
9199 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9200 report TARGET_WAITKIND_NO_RESUMED.
9201 * remote-utils.c (prepare_resume_reply): Handle
9202 TARGET_WAITKIND_NO_RESUMED.
9203 * server.c (report_no_resumed): New global.
9204 (handle_query) <qSupported>: Handle "no-resumed+". Report
9205 "no-resumed+" support.
9206 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9207 return error if the client doesn't support no-resumed events.
9208 (push_stop_notification): New function.
9209 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9210 events if the client supports them.
9211
9212 2015-11-30 Pedro Alves <palves@redhat.com>
9213
9214 * linux-low.c (thread_still_has_status_pending_p): Don't check
9215 vCont;t here.
9216 (lwp_resumed): New function.
9217 (status_pending_p_callback): Return early if the LWP is not
9218 supposed to be resumed.
9219
9220 2015-11-30 Pedro Alves <palves@redhat.com>
9221
9222 * linux-low.c (handle_extended_wait): Assert that the LWP's
9223 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9224 thread create events, leave the new child's status pending.
9225 (linux_low_filter_event): If GDB wants to hear about thread exit
9226 events, leave the LWP marked dead and don't delete it.
9227 (linux_wait_for_event_filtered): Don't check for thread exit.
9228 (filter_exit_event): New function.
9229 (linux_wait_1): Use it, when returning an exit event.
9230 (linux_resume_one_lwp_throw): Assert that the LWP's
9231 waitstatus is TARGET_WAITKIND_IGNORE.
9232 * remote-utils.c (prepare_resume_reply): Handle
9233 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9234 * server.c (report_thread_events): New global.
9235 (handle_general_set): Handle QThreadEvents.
9236 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9237 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9238 TARGET_WAITKIND_THREAD_EXITED.
9239 * server.h (report_thread_events): Declare.
9240
9241 2015-11-30 Pedro Alves <palves@redhat.com>
9242
9243 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9244 the thread's last_resume_kind was resume_stop.
9245
9246 2015-11-30 Pedro Alves <palves@redhat.com>
9247
9248 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9249 before returning.
9250
9251 2015-11-30 Pedro Alves <palves@redhat.com>
9252
9253 * server.c (handle_v_requests): Handle vCtrlC.
9254
9255 2015-11-30 Pedro Alves <palves@redhat.com>
9256
9257 * gdbthread.h (find_any_thread_of_pid): Declare.
9258 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9259 functions.
9260 * server.c (handle_query): If current_thread is NULL, look for
9261 another thread of the selected process.
9262
9263 2015-11-26 Daniel Colascione <dancol@dancol.org>
9264 Simon Marchi <simon.marchi@ericsson.com>
9265
9266 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9267 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9268 name in reply.
9269 * target.h (struct target_ops) <thread_name>: New field.
9270 (target_thread_name): New macro.
9271
9272 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9273
9274 * regcache.h (regcache_invalidate_pid): Add declaration.
9275 * regcache.c (regcache_invalidate_pid): New function, extracted
9276 from regcache_invalidate.
9277 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9278 Add trivial documentation comment.
9279 * lynx-low.c: Use regcache_invalidate_pid instead of
9280 regcache_invalidate.
9281
9282 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9283
9284 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9285 and Elf64_auxv_t if the target is Android.
9286
9287 2015-11-22 Doug Evans <xdje42@gmail.com>
9288
9289 * target.h: #include <sys/types.h>.
9290
9291 2015-11-19 Pedro Alves <palves@redhat.com>
9292
9293 * linux-low.c (linux_process_qsupported): Change prototype.
9294 Adjust.
9295 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9296 Change prototype.
9297 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9298 and adjust to loop over all features.
9299 * server.c (handle_query) <qSupported>: Adjust to call
9300 target_process_qsupported once, passing it a vector of unprocessed
9301 features.
9302 * target.h (struct target_ops) <process_qsupported>: Change
9303 prototype.
9304 (target_process_qsupported): Adjust.
9305
9306 2015-11-19 Pedro Alves <palves@redhat.com>
9307
9308 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9309 mode.
9310 * configure: Regenerate.
9311
9312 2015-11-19 Pedro Alves <palves@redhat.com>
9313
9314 * configure: Regenerate.
9315
9316 2015-11-19 Yao Qi <yao.qi@linaro.org>
9317
9318 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9319 type to uint32_t.
9320
9321 2015-11-19 Yao Qi <yao.qi@linaro.org>
9322
9323 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9324 (struct aarch64_operand): Move enum out.
9325
9326 2015-11-19 Yao Qi <yao.qi@linaro.org>
9327
9328 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9329 struct user_fpsimd_state *.
9330 (aarch64_store_fpregset): Likewise.
9331
9332 2015-11-19 Yao Qi <yao.qi@linaro.org>
9333
9334 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9335 struct user_pt_regs *.
9336 (aarch64_store_gregset): Likewise.
9337
9338 2015-11-18 Pedro Alves <palves@redhat.com>
9339
9340 * Makefile.in (all_object_files): Add $IPA_OBJS.
9341
9342 2015-11-17 Pedro Alves <palves@redhat.com>
9343
9344 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9345 GDB_SIGNAL_0 and gdb_signal_to_string.
9346
9347 2015-11-17 Pedro Alves <palves@redhat.com>
9348
9349 * win32-low.c (handle_output_debug_string): Remove parameter.
9350 (win32_kill): Remove our_status local and adjust call to
9351 handle_output_debug_string.
9352 (get_child_debug_event): Adjust call to
9353 handle_output_debug_string.
9354
9355 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9356
9357 * linux-mips-low.c (mips_fill_gregset): Add cast.
9358 (mips_store_gregset): Likewise.
9359 (mips_fill_fpregset): Likewise.
9360 (mips_store_fpregset): Likewise.
9361
9362 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9363
9364 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9365 priv.
9366
9367 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9368
9369 * linux-mips-low.c (mips_linux_new_thread): Change type of
9370 watch_type to enum target_hw_bp_type.
9371
9372 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9373
9374 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9375 Change return type to arm_hwbp_type.
9376
9377 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9378
9379 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9380 (arm_store_gregset): Likewise.
9381 * linux-arm-low.c (arm_get_hwcap): Likewise.
9382 (arm_read_description): Likewise.
9383
9384 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9385
9386 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9387
9388 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9389
9390 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9391 (ppc_fill_vsxregset): Likewise.
9392 (ppc_store_vsxregset): Likewise.
9393 (ppc_fill_vrregset): Likewise.
9394 (ppc_store_vrregset): Likewise.
9395 (ppc_fill_evrregset): Likewise.
9396 (ppc_store_evrregset): Likewise.
9397
9398 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9399
9400 * linux-ppc-low.c (ppc_usrregs_info): Remove
9401 forward-declaration.
9402 (ppc_arch_setup): Move lower in file.
9403
9404 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9405
9406 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9407 (ps_pdwrite): Likewise.
9408
9409 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9410
9411 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9412 to after assert checks.
9413
9414 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9415
9416 * proc-service.c (ps_pdread): Add/adjust casts.
9417 (ps_pdwrite): Add/adjust casts.
9418
9419 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9420
9421 * server.c (handle_search_memory_1): Cast return value of
9422 memmem.
9423
9424 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9425
9426 * server.c (write_qxfer_response): Change type of data to
9427 gdb_byte *.
9428
9429 2015-10-29 Pedro Alves <palves@redhat.com>
9430
9431 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9432
9433 2015-10-29 Pedro Alves <palves@redhat.com>
9434
9435 * tracepoint.c (clear_installed_tracepoints): Add casts.
9436
9437 2015-10-29 Pedro Alves <palves@redhat.com>
9438
9439 * server.c (handle_v_cont, process_serial_event): Add enum
9440 gdb_signal casts to signal parsing code.
9441
9442 2015-10-29 Pedro Alves <palves@redhat.com>
9443
9444 * linux-low.h (NULL_REGSET): Define.
9445 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9446 * linux-arm-low.c (arm_regsets): Likewise.
9447 * linux-crisv32-low.c (cris_regsets): Likewise.
9448 * linux-m68k-low.c (m68k_regsets): Likewise.
9449 * linux-mips-low.c (mips_regsets): Likewise.
9450 * linux-nios2-low.c (nios2_regsets): Likewise.
9451 * linux-ppc-low.c (ppc_regsets): Likewise.
9452 * linux-s390-low.c (s390_regsets): Likewise.
9453 * linux-sh-low.c (sh_regsets): Likewise.
9454 * linux-sparc-low.c (sparc_regsets): Likewise.
9455 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9456 * linux-tile-low.c (tile_regsets): Likewise.
9457 * linux-x86-low.c (x86_regsets): Likewise.
9458 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9459
9460 2015-10-29 Pedro Alves <palves@redhat.com>
9461
9462 * linux-low.h (NULL_REGSET): Define.
9463 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9464 * linux-arm-low.c (arm_regsets): Likewise.
9465 * linux-crisv32-low.c (cris_regsets): Likewise.
9466 * linux-m68k-low.c (m68k_regsets): Likewise.
9467 * linux-mips-low.c (mips_regsets): Likewise.
9468 * linux-nios2-low.c (nios2_regsets): Likewise.
9469 * linux-ppc-low.c (ppc_regsets): Likewise.
9470 * linux-s390-low.c (s390_regsets): Likewise.
9471 * linux-sh-low.c (sh_regsets): Likewise.
9472 * linux-sparc-low.c (sparc_regsets): Likewise.
9473 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9474 * linux-tile-low.c (tile_regsets): Likewise.
9475 * linux-x86-low.c (x86_regsets): Likewise.
9476 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9477
9478 2015-10-26 Doug Evans <dje@google.com>
9479
9480 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9481
9482 2015-10-26 Doug Evans <dje@google.com>
9483
9484 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9485
9486 2015-10-26 Doug Evans <dje@google.com>
9487
9488 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9489 for debug_printf.
9490 (attach_thread, find_new_threads_callback): Ditto.
9491
9492 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9493
9494 * mem-break.h (set_breakpoint_data): Remove.
9495
9496 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9497
9498 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9499 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9500 (initialize_low): Remove set_breakpoint_data call.
9501 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9502 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9503 (initialize_low): Remove set_breakpoint_data call.
9504 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9505 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9506 (initialize_low): Remove set_breakpoint_data call.
9507
9508 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9509
9510 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9511 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9512 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9513 * target.h (target_breakpoint_kind_from_pc): New macro.
9514
9515 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9516
9517 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9518 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9519 the default breakpoint kind.
9520
9521 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9522
9523 * linux-arm-low.c (arm_supports_z_point_type): Add software
9524 breakpoint support.
9525
9526 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9527
9528 * linux-arm-low.c: Refactor breakpoint definitions.
9529 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9530 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9531
9532 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9533
9534 * Makefile.in: Add arm.c/o.
9535 * configure.srv: Likewise.
9536 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9537 (arm_breakpoint_kind_from_pc): New function.
9538 (arm_sw_breakpoint_from_kind): Return proper kind.
9539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9540
9541 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9542
9543 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9544 removal.
9545 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9546 (struct raw_breakpoint) <size>: Remove.
9547 (struct raw_breakpoint) <kind>: Add.
9548 (bp_size): New function.
9549 (bp_opcode): Likewise.
9550 (find_raw_breakpoint_at): Adjust for kind.
9551 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9552 (remove_memory_breakpoint): Adjust for kind call bp_size.
9553 (set_raw_breakpoint_at): Adjust for kind.
9554 (set_breakpoint): Likewise.
9555 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9556 (delete_raw_breakpoint): Adjust for kind.
9557 (delete_breakpoint): Likewise.
9558 (find_gdb_breakpoint): Likewise.
9559 (set_gdb_breakpoint_1): Likewise.
9560 (set_gdb_breakpoint): Likewise.
9561 (delete_gdb_breakpoint_1): Likewise.
9562 (delete_gdb_breakpoint): Likewise.
9563 (uninsert_raw_breakpoint): Likewise.
9564 (reinsert_raw_breakpoint): Likewise.
9565 (set_breakpoint_data): Remove.
9566 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9567 (check_mem_read): Adjust for kind call bp_size.
9568 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9569 (clone_one_breakpoint): Adjust for kind.
9570 * mem-break.h (set_gdb_breakpoint): Likewise.
9571 (delete_gdb_breakpoint): Likewise.
9572 * server.c (process_serial_event): Likewise.
9573
9574 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9575
9576 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9577 (struct linux_target_ops) <breakpoint>: Remove.
9578 (struct linux_target_ops) <breakpoint_len>: Remove.
9579 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9580 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9581 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9582 (arm_sw_breakpoint_from_kind): New function.
9583 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9584 (struct linux_target_ops) <breakpoint>: Remove.
9585 (struct linux_target_ops) <breakpoint_len>: Remove.
9586 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9587 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9588 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9589 (struct linux_target_ops) <breakpoint>: Remove.
9590 (struct linux_target_ops) <breakpoint_len>: Remove.
9591 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9592 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9593 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9594 (struct linux_target_ops) <breakpoint>: Remove.
9595 (struct linux_target_ops) <breakpoint_len>: Remove.
9596 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9597 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9598 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9599 and sw_breakpoint_from_kind to increment the pc.
9600 (linux_breakpoint_kind_from_pc): New function.
9601 (linux_sw_breakpoint_from_kind): New function.
9602 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9603 (initialize_low): Call breakpoint_kind_from_pc and
9604 sw_breakpoint_from_kind to replace breakpoint_data/len.
9605 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9606 New field.
9607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9608 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9609 (struct linux_target_ops) <breakpoint>: Remove.
9610 (struct linux_target_ops) <breakpoint_len>: Remove.
9611 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9612 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9613 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9614 (struct linux_target_ops) <breakpoint>: Remove.
9615 (struct linux_target_ops) <breakpoint_len>: Remove.
9616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9618 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9619 (struct linux_target_ops) <breakpoint>: Remove.
9620 (struct linux_target_ops) <breakpoint_len>: Remove.
9621 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9622 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9623 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9624 (struct linux_target_ops) <breakpoint>: Remove.
9625 (struct linux_target_ops) <breakpoint_len>: Remove.
9626 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9627 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9628 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9629 (struct linux_target_ops) <breakpoint>: Remove.
9630 (struct linux_target_ops) <breakpoint_len>: Remove.
9631 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9632 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9633 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9634 (struct linux_target_ops) <breakpoint>: Remove.
9635 (struct linux_target_ops) <breakpoint_len>: Remove.
9636 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9637 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9638 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9639 (struct linux_target_ops) <breakpoint>: Remove.
9640 (struct linux_target_ops) <breakpoint_len>: Remove.
9641 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9642 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9643 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9644 (struct linux_target_ops) <breakpoint>: Remove.
9645 (struct linux_target_ops) <breakpoint_len>: Remove.
9646 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9647 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9648 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9649 (struct linux_target_ops) <breakpoint>: Remove.
9650 (struct linux_target_ops) <breakpoint_len>: Remove.
9651 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9652 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9653 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9654 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9655 (struct linux_target_ops) <breakpoint>: Remove.
9656 (struct linux_target_ops) <breakpoint_len>: Remove.
9657 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9658 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9659 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9660 (struct linux_target_ops) <breakpoint>: Remove.
9661 (struct linux_target_ops) <breakpoint_len>: Remove.
9662 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9663 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9664
9665 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9666
9667 * linux-cris-low.c (cris_get_pc): Remove void arg.
9668
9669 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9670
9671 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9672 variable name.
9673
9674 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9675
9676 * inferiors.c (thread_pid_matches_callback): New function.
9677 (find_thread_process): New function.
9678 (remove_thread): Reset current_thread.
9679 (remove_process): Assert threads have been removed first.
9680
9681 2015-10-15 Yao Qi <yao.qi@linaro.org>
9682
9683 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9684 if it is 3.
9685 (aarch64_remove_point): Likewise.
9686 * regcache.c (regcache_register_size): New function.
9687
9688 2015-10-12 Yao Qi <yao.qi@linaro.org>
9689
9690 * linux-aarch64-low.c: Update all callers as emit_load_store
9691 is renamed to aarch64_emit_load_store.
9692
9693 2015-10-12 Yao Qi <yao.qi@linaro.org>
9694
9695 * linux-aarch64-low.c: Update all callers of function renaming
9696 from emit_insn to aarch64_emit_insn.
9697
9698 2015-10-12 Yao Qi <yao.qi@linaro.org>
9699
9700 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9701 arch/aarch64-insn.h.
9702 (struct aarch64_memory_operand): Likewise.
9703 (ENCODE): Likewise.
9704 (emit_insn): Move to arch/aarch64-insn.c.
9705 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9706 (emit_load_store): Move to arch/aarch64-insn.c.
9707 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9708 (can_encode_int32): Remove.
9709
9710 2015-10-12 Yao Qi <yao.qi@linaro.org>
9711
9712 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9713 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9714 (aarch64_relocate_instruction): Likewise.
9715 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9716 (struct aarch64_insn_visitor): Likewise.
9717
9718 2015-10-12 Yao Qi <yao.qi@linaro.org>
9719
9720 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9721 (struct aarch64_insn_visitor): New.
9722 (struct aarch64_insn_relocation_data): New.
9723 (aarch64_ftrace_insn_reloc_b): New function.
9724 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9725 (aarch64_ftrace_insn_reloc_cb): Likewise.
9726 (aarch64_ftrace_insn_reloc_tb): Likewise.
9727 (aarch64_ftrace_insn_reloc_adr): Likewise.
9728 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9729 (aarch64_ftrace_insn_reloc_others): Likewise.
9730 (visitor): New.
9731 (aarch64_relocate_instruction): Use visitor.
9732
9733 2015-10-12 Yao Qi <yao.qi@linaro.org>
9734
9735 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9736 int. Add argument buf.
9737 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9738 aarch64_relocate_instruction.
9739
9740 2015-10-12 Yao Qi <yao.qi@linaro.org>
9741
9742 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9743 argument insn. Remove local variable insn. Don't call
9744 target_read_uint32.
9745 (aarch64_install_fast_tracepoint_jump_pad): Call
9746 target_read_uint32.
9747
9748 2015-09-30 Yao Qi <yao.qi@linaro.org>
9749
9750 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9751 (emit_load_store_pair): Likewise.
9752
9753 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9754
9755 * dll.c (match_dll): Add cast(s).
9756 (unloaded_dll): Likewise.
9757 * linux-low.c (second_thread_of_pid_p): Likewise.
9758 (delete_lwp_callback): Likewise.
9759 (count_events_callback): Likewise.
9760 (select_event_lwp_callback): Likewise.
9761 (linux_set_resume_request): Likewise.
9762 * server.c (accumulate_file_name_length): Likewise.
9763 (emit_dll_description): Likewise.
9764 (handle_qxfer_threads_worker): Likewise.
9765 (visit_actioned_threads): Likewise.
9766 * thread-db.c (any_thread_of): Likewise.
9767 * tracepoint.c (same_process_p): Likewise.
9768 (match_blocktype): Likewise.
9769 (build_traceframe_info_xml): Likewise.
9770
9771 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9772
9773 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9774 assignment.
9775 (gdb_unparse_agent_expr): Likewise.
9776 * hostio.c (require_data): Likewise.
9777 (handle_pread): Likewise.
9778 * linux-low.c (disable_regset): Likewise.
9779 (fetch_register): Likewise.
9780 (store_register): Likewise.
9781 (get_dynamic): Likewise.
9782 (linux_qxfer_libraries_svr4): Likewise.
9783 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9784 (set_fast_tracepoint_jump): Likewise.
9785 (uninsert_fast_tracepoint_jumps_at): Likewise.
9786 (reinsert_fast_tracepoint_jumps_at): Likewise.
9787 (validate_inserted_breakpoint): Likewise.
9788 (clone_agent_expr): Likewise.
9789 * regcache.c (init_register_cache): Likewise.
9790 * remote-utils.c (putpkt_binary_1): Likewise.
9791 (decode_M_packet): Likewise.
9792 (decode_X_packet): Likewise.
9793 (look_up_one_symbol): Likewise.
9794 (relocate_instruction): Likewise.
9795 (monitor_output): Likewise.
9796 * server.c (handle_search_memory): Likewise.
9797 (handle_qxfer_exec_file): Likewise.
9798 (handle_qxfer_libraries): Likewise.
9799 (handle_qxfer): Likewise.
9800 (handle_query): Likewise.
9801 (handle_v_cont): Likewise.
9802 (handle_v_run): Likewise.
9803 (captured_main): Likewise.
9804 * target.c (write_inferior_memory): Likewise.
9805 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9806 * tracepoint.c (init_trace_buffer): Likewise.
9807 (add_tracepoint_action): Likewise.
9808 (add_traceframe): Likewise.
9809 (add_traceframe_block): Likewise.
9810 (cmd_qtdpsrc): Likewise.
9811 (cmd_qtdv): Likewise.
9812 (cmd_qtstatus): Likewise.
9813 (response_source): Likewise.
9814 (response_tsv): Likewise.
9815 (cmd_qtnotes): Likewise.
9816 (gdb_collect): Likewise.
9817 (initialize_tracepoint): Likewise.
9818
9819 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9820
9821 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9822 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9823 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9824 <NOP>: New.
9825 (enum aarch64_condition_codes): New enum.
9826 (w0): New static global.
9827 (fp): Likewise.
9828 (lr): Likewise.
9829 (struct aarch64_memory_operand) <type>: New
9830 MEMORY_OPERAND_POSTINDEX type.
9831 (postindex_memory_operand): New helper function.
9832 (emit_ret): New function.
9833 (emit_load_store_pair): New function, factored out of emit_stp
9834 with support for MEMORY_OPERAND_POSTINDEX.
9835 (emit_stp): Rewrite using emit_load_store_pair.
9836 (emit_ldp): New function.
9837 (emit_load_store): Likewise.
9838 (emit_ldr): Mention post-index instruction in comment.
9839 (emit_ldrh): New function.
9840 (emit_ldrb): New function.
9841 (emit_ldrsw): Mention post-index instruction in comment.
9842 (emit_str): Likewise.
9843 (emit_subs): New function.
9844 (emit_cmp): Likewise.
9845 (emit_and): Likewise.
9846 (emit_orr): Likewise.
9847 (emit_orn): Likewise.
9848 (emit_eor): Likewise.
9849 (emit_mvn): Likewise.
9850 (emit_lslv): Likewise.
9851 (emit_lsrv): Likewise.
9852 (emit_asrv): Likewise.
9853 (emit_mul): Likewise.
9854 (emit_sbfm): Likewise.
9855 (emit_sbfx): Likewise.
9856 (emit_ubfm): Likewise.
9857 (emit_ubfx): Likewise.
9858 (emit_csinc): Likewise.
9859 (emit_cset): Likewise.
9860 (emit_nop): Likewise.
9861 (emit_ops_insns): New helper function.
9862 (emit_pop): Likewise.
9863 (emit_push): Likewise.
9864 (aarch64_emit_prologue): New function.
9865 (aarch64_emit_epilogue): Likewise.
9866 (aarch64_emit_add): Likewise.
9867 (aarch64_emit_sub): Likewise.
9868 (aarch64_emit_mul): Likewise.
9869 (aarch64_emit_lsh): Likewise.
9870 (aarch64_emit_rsh_signed): Likewise.
9871 (aarch64_emit_rsh_unsigned): Likewise.
9872 (aarch64_emit_ext): Likewise.
9873 (aarch64_emit_log_not): Likewise.
9874 (aarch64_emit_bit_and): Likewise.
9875 (aarch64_emit_bit_or): Likewise.
9876 (aarch64_emit_bit_xor): Likewise.
9877 (aarch64_emit_bit_not): Likewise.
9878 (aarch64_emit_equal): Likewise.
9879 (aarch64_emit_less_signed): Likewise.
9880 (aarch64_emit_less_unsigned): Likewise.
9881 (aarch64_emit_ref): Likewise.
9882 (aarch64_emit_if_goto): Likewise.
9883 (aarch64_emit_goto): Likewise.
9884 (aarch64_write_goto_address): Likewise.
9885 (aarch64_emit_const): Likewise.
9886 (aarch64_emit_call): Likewise.
9887 (aarch64_emit_reg): Likewise.
9888 (aarch64_emit_pop): Likewise.
9889 (aarch64_emit_stack_flush): Likewise.
9890 (aarch64_emit_zero_ext): Likewise.
9891 (aarch64_emit_swap): Likewise.
9892 (aarch64_emit_stack_adjust): Likewise.
9893 (aarch64_emit_int_call_1): Likewise.
9894 (aarch64_emit_void_call_2): Likewise.
9895 (aarch64_emit_eq_goto): Likewise.
9896 (aarch64_emit_ne_goto): Likewise.
9897 (aarch64_emit_lt_goto): Likewise.
9898 (aarch64_emit_le_goto): Likewise.
9899 (aarch64_emit_gt_goto): Likewise.
9900 (aarch64_emit_ge_got): Likewise.
9901 (aarch64_emit_ops_impl): New static global variable.
9902 (aarch64_emit_ops): New target function, return
9903 &aarch64_emit_ops_impl.
9904 (struct linux_target_ops): Install it.
9905
9906 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9907
9908 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9909 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9910 aarch64-ipa.o.
9911 * linux-aarch64-ipa.c: New file.
9912 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9913 and endian.h.
9914 (aarch64_get_thread_area): New target method.
9915 (extract_signed_bitfield): New helper function.
9916 (aarch64_decode_ldr_literal): New function.
9917 (enum aarch64_opcodes): New enum.
9918 (struct aarch64_register): New struct.
9919 (struct aarch64_operand): New struct.
9920 (x0): New static global.
9921 (x1): Likewise.
9922 (x2): Likewise.
9923 (x3): Likewise.
9924 (x4): Likewise.
9925 (w2): Likewise.
9926 (ip0): Likewise.
9927 (sp): Likewise.
9928 (xzr): Likewise.
9929 (aarch64_register): New helper function.
9930 (register_operand): Likewise.
9931 (immediate_operand): Likewise.
9932 (struct aarch64_memory_operand): New struct.
9933 (offset_memory_operand): New helper function.
9934 (preindex_memory_operand): Likewise.
9935 (enum aarch64_system_control_registers): New enum.
9936 (ENCODE): New macro.
9937 (emit_insn): New helper function.
9938 (emit_b): New function.
9939 (emit_bcond): Likewise.
9940 (emit_cb): Likewise.
9941 (emit_tb): Likewise.
9942 (emit_blr): Likewise.
9943 (emit_stp): Likewise.
9944 (emit_ldp_q_offset): Likewise.
9945 (emit_stp_q_offset): Likewise.
9946 (emit_load_store): Likewise.
9947 (emit_ldr): Likewise.
9948 (emit_ldrsw): Likewise.
9949 (emit_str): Likewise.
9950 (emit_ldaxr): Likewise.
9951 (emit_stxr): Likewise.
9952 (emit_stlr): Likewise.
9953 (emit_data_processing_reg): Likewise.
9954 (emit_data_processing): Likewise.
9955 (emit_add): Likewise.
9956 (emit_sub): Likewise.
9957 (emit_mov): Likewise.
9958 (emit_movk): Likewise.
9959 (emit_mov_addr): Likewise.
9960 (emit_mrs): Likewise.
9961 (emit_msr): Likewise.
9962 (emit_sevl): Likewise.
9963 (emit_wfe): Likewise.
9964 (append_insns): Likewise.
9965 (can_encode_int32_in): New helper function.
9966 (aarch64_relocate_instruction): New function.
9967 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9968 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9969 (struct linux_target_ops): Install aarch64_get_thread_area,
9970 aarch64_install_fast_tracepoint_jump_pad and
9971 aarch64_get_min_fast_tracepoint_insn_len.
9972
9973 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9974
9975 * Makefile.in (aarch64-insn.o): New rule.
9976 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9977
9978 2015-09-21 Yao Qi <yao.qi@linaro.org>
9979
9980 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9981
9982 2015-09-21 Yao Qi <yao.qi@linaro.org>
9983
9984 * tracepoint.c (max_jump_pad_size): Remove.
9985
9986 2015-09-18 Yao Qi <yao.qi@linaro.org>
9987
9988 * linux-aarch64-low.c: Don't include sys/uio.h.
9989 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
9990
9991 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
9992
9993 * tracepoint.c (eval_result_type): Change prototype.
9994 (condition_true_at_tracepoint): Fix argument to compiled_cond.
9995
9996 2015-09-15 Pedro Alves <palves@redhat.com>
9997
9998 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
9999 Check whether to report exec events instead of checking whether
10000 multiprocess is enabled.
10001
10002 2015-09-15 Pedro Alves <palves@redhat.com>
10003
10004 PR remote/18965
10005 * remote-utils.c (prepare_resume_reply): Merge
10006 TARGET_WAITKIND_VFORK_DONE switch case with the
10007 TARGET_WAITKIND_FORKED case.
10008
10009 2015-09-15 Yao Qi <yao.qi@linaro.org>
10010
10011 * server.c (handle_query): Check string comparison using
10012 "else if" instead of "if".
10013
10014 2015-09-15 Yao Qi <yao.qi@linaro.org>
10015
10016 * server.c (vCont_supported): New global variable.
10017 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10018 matches. Append ";vContSupported+" to own_buf.
10019 (handle_v_requests): Append ";s;S" to own_buf if target supports
10020 hardware single step or vCont_supported is false.
10021 (capture_main): Set vCont_supported to zero.
10022
10023 2015-09-15 Yao Qi <yao.qi@linaro.org>
10024
10025 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10026 it to ...
10027 (linux_supports_hardware_single_step): ... New function.
10028 (linux_target_ops): Update.
10029 * lynx-low.c (lynx_target_ops): Set field
10030 supports_hardware_single_step to target_can_do_hardware_single_step.
10031 * nto-low.c (nto_target_ops): Likewise.
10032 * spu-low.c (spu_target_ops): Likewise.
10033 * win32-low.c (win32_target_ops): Likewise.
10034 * target.c (target_can_do_hardware_single_step): New function.
10035 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10036 Remove. <supports_hardware_single_step>: New field.
10037 (target_supports_conditional_breakpoints): Remove.
10038 (target_supports_hardware_single_step): New macro.
10039 (target_can_do_hardware_single_step): Declare.
10040 * server.c (handle_query): Use target_supports_hardware_single_step
10041 instead of target_supports_conditional_breakpoints.
10042
10043 2015-09-15 Yao Qi <yao.qi@linaro.org>
10044
10045 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10046 function.
10047 (struct linux_target_ops the_low_target): Install
10048 aarch64_linux_siginfo_fixup.
10049
10050 2015-09-11 Don Breazeal <donb@codesourcery.com>
10051 Luis Machado <lgustavo@codesourcery.com>
10052
10053 * linux-low.c (linux_mourn): Static declaration.
10054 (linux_arch_setup): Move in front of
10055 handle_extended_wait.
10056 (linux_arch_setup_thread): New function.
10057 (handle_extended_wait): Handle exec events. Call
10058 linux_arch_setup_thread. Make event_lwp argument a
10059 pointer-to-a-pointer.
10060 (check_zombie_leaders): Do not check stopped threads.
10061 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10062 (linux_low_filter_event): Add lwp and thread for exec'ing
10063 non-leader thread if leader thread has been deleted.
10064 Refactor code into linux_arch_setup_thread and call it.
10065 Pass child lwp pointer by reference to handle_extended_wait.
10066 (linux_wait_for_event_filtered): Update comment.
10067 (linux_wait_1): Prevent clobbering exec event status.
10068 (linux_supports_exec_events): New function.
10069 (linux_target_ops) <supports_exec_events>: Initialize new member.
10070 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10071 new member.
10072 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10073 * server.c (report_exec_events): New global variable.
10074 (handle_query): Handle qSupported query for exec-events feature.
10075 (captured_main): Initialize report_exec_events.
10076 * server.h (report_exec_events): Declare new global variable.
10077 * target.h (struct target_ops) <supports_exec_events>: New
10078 member.
10079 (target_supports_exec_events): New macro.
10080 * win32-low.c (win32_target_ops) <supports_exec_events>:
10081 Initialize new member.
10082
10083 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10084
10085 * linux-low.c (linux_low_enable_btrace): Remove.
10086 (linux_target_ops): Replace linux_low_enable_btrace with
10087 linux_enable_btrace.
10088
10089 2015-09-03 Yao Qi <yao.qi@linaro.org>
10090
10091 * linux-aarch64-low.c (aarch64_insert_point): Call
10092 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10093 returns true.
10094
10095 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10096
10097 * linux-low.c (check_stopped_by_breakpoint): Use
10098 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10099
10100 2015-08-27 Pedro Alves <palves@redhat.com>
10101
10102 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10103
10104 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10105
10106 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10107 the XNEW-family equivalent.
10108 (compile_bytecodes): Likewise.
10109 * dll.c (loaded_dll): Likewise.
10110 * event-loop.c (append_callback_event): Likewise.
10111 (create_file_handler): Likewise.
10112 (create_file_event): Likewise.
10113 * hostio.c (handle_open): Likewise.
10114 * inferiors.c (add_thread): Likewise.
10115 (add_process): Likewise.
10116 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10117 * linux-arm-low.c (arm_new_process): Likewise.
10118 (arm_new_thread): Likewise.
10119 * linux-low.c (add_to_pid_list): Likewise.
10120 (linux_add_process): Likewise.
10121 (handle_extended_wait): Likewise.
10122 (add_lwp): Likewise.
10123 (enqueue_one_deferred_signal): Likewise.
10124 (enqueue_pending_signal): Likewise.
10125 (linux_resume_one_lwp_throw): Likewise.
10126 (linux_resume_one_thread): Likewise.
10127 (linux_read_memory): Likewise.
10128 (linux_write_memory): Likewise.
10129 * linux-mips-low.c (mips_linux_new_process): Likewise.
10130 (mips_linux_new_thread): Likewise.
10131 (mips_add_watchpoint): Likewise.
10132 * linux-x86-low.c (initialize_low_arch): Likewise.
10133 * lynx-low.c (lynx_add_process): Likewise.
10134 * mem-break.c (set_raw_breakpoint_at): Likewise.
10135 (set_breakpoint): Likewise.
10136 (add_condition_to_breakpoint): Likewise.
10137 (add_commands_to_breakpoint): Likewise.
10138 (clone_agent_expr): Likewise.
10139 (clone_one_breakpoint): Likewise.
10140 * regcache.c (new_register_cache): Likewise.
10141 * remote-utils.c (look_up_one_symbol): Likewise.
10142 * server.c (queue_stop_reply): Likewise.
10143 (start_inferior): Likewise.
10144 (queue_stop_reply_callback): Likewise.
10145 (handle_target_event): Likewise.
10146 * spu-low.c (fetch_ppc_memory): Likewise.
10147 (store_ppc_memory): Likewise.
10148 * target.c (set_target_ops): Likewise.
10149 * thread-db.c (thread_db_load_search): Likewise.
10150 (try_thread_db_load_1): Likewise.
10151 * tracepoint.c (add_tracepoint): Likewise.
10152 (add_tracepoint_action): Likewise.
10153 (create_trace_state_variable): Likewise.
10154 (cmd_qtdpsrc): Likewise.
10155 (cmd_qtro): Likewise.
10156 (add_while_stepping_state): Likewise.
10157 * win32-low.c (child_add_thread): Likewise.
10158 (get_image_name): Likewise.
10159
10160 2015-08-25 Yao Qi <yao.qi@linaro.org>
10161
10162 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10163
10164 2015-08-25 Yao Qi <yao.qi@linaro.org>
10165
10166 * Makefile.in (aarch64-linux.o): New rule.
10167 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10168 srv_tgtobj.
10169 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10170 (aarch64_init_debug_reg_state): Make it extern.
10171 (aarch64_linux_prepare_to_resume): Remove.
10172
10173 2015-08-25 Yao Qi <yao.qi@linaro.org>
10174
10175 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10176 lwp_arch_private_info and ptid_of_lwp.
10177
10178 2015-08-25 Yao Qi <yao.qi@linaro.org>
10179
10180 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10181 Find proc_info by find_process_pid. All callers updated.
10182
10183 2015-08-25 Yao Qi <yao.qi@linaro.org>
10184
10185 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10186 Remove.
10187 (debug_reg_change_callback): Remove.
10188 (aarch64_notify_debug_reg_change): Remove.
10189
10190 2015-08-25 Yao Qi <yao.qi@linaro.org>
10191
10192 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10193 Call current_lwp_ptid.
10194
10195 2015-08-25 Yao Qi <yao.qi@linaro.org>
10196
10197 * linux-aarch64-low.c (debug_reg_change_callback): Use
10198 debug_printf.
10199
10200 2015-08-25 Yao Qi <yao.qi@linaro.org>
10201
10202 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10203
10204 2015-08-25 Yao Qi <yao.qi@linaro.org>
10205
10206 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10207
10208 2015-08-25 Yao Qi <yao.qi@linaro.org>
10209
10210 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10211 the code.
10212
10213 2015-08-25 Yao Qi <yao.qi@linaro.org>
10214
10215 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10216 Remove.
10217 (debug_reg_change_callback): Remove argument entry and add argument
10218 lwp. Remove local variable thread. Don't print thread id in the
10219 debugging output. Don't check whether pid of thread equals to pid.
10220 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10221 iterate_over_lwps instead find_inferior.
10222
10223 2015-08-24 Pedro Alves <palves@redhat.com>
10224
10225 * inferiors.c (get_first_process): New function.
10226 * inferiors.h (get_first_process): New declaration.
10227 * remote-utils.c (read_ptid): Default to the first process in the
10228 list, instead of to the current thread's process.
10229
10230 2015-08-24 Pedro Alves <palves@redhat.com>
10231
10232 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10233 * event-loop.c: Likewise.
10234 * remote-utils.c: Likewise.
10235 * tracepoint.c: Likewise.
10236
10237 2015-08-24 Pedro Alves <palves@redhat.com>
10238
10239 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10240 ptid_get_lwp.
10241
10242 2015-08-21 Pedro Alves <palves@redhat.com>
10243
10244 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10245 instead of literal 1.
10246
10247 2015-08-21 Pedro Alves <palves@redhat.com>
10248
10249 * tdesc.c (default_description): Explicitly zero-initialize.
10250
10251 2015-08-21 Pedro Alves <palves@redhat.com>
10252
10253 PR gdb/18749
10254 * inferiors.c (remove_thread): Discard any pending stop reply for
10255 this thread.
10256 * server.c (remove_all_on_match_pid): Rename to ...
10257 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10258 instead of a pid.
10259 (discard_queued_stop_replies): Change parameter to a ptid. Now
10260 extern.
10261 (handle_v_kill, kill_inferior_callback, captured_main)
10262 (process_serial_event): Adjust.
10263 * server.h (discard_queued_stop_replies): Declare.
10264
10265 2015-08-21 Pedro Alves <palves@redhat.com>
10266
10267 * linux-low.c (wait_for_sigstop): Always switch to no thread
10268 selected if the previously current thread dies.
10269 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10270 process instead of the current thread's.
10271 * remote-utils.c (input_interrupt): Don't check if there's no
10272 current thread.
10273 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10274 current thread to the general thread fails, error out.
10275 (handle_qxfer_auxv, handle_qxfer_libraries)
10276 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10277 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10278 (handle_query): Check if there's a thread selected instead of
10279 checking whether there's any thread in the thread list.
10280 (handle_qxfer_threads, handle_qxfer_btrace)
10281 (handle_qxfer_btrace_conf): Don't error out early if there's no
10282 thread in the thread list.
10283 (handle_v_cont, myresume): Don't set the current thread to the
10284 continue thread.
10285 (process_serial_event) <Hg handling>: Also set thread_id if the
10286 previous general thread is still alive.
10287 (process_serial_event) <g/G handling>: If setting the current
10288 thread to the general thread fails, error out.
10289 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10290 thread's lwp instead of the current thread's.
10291 * target.c (set_desired_thread): If the desired thread was not
10292 found, leave the current thread pointing to NULL. Return an int
10293 (boolean) indicating success.
10294 * target.h (set_desired_thread): Change return type to int.
10295
10296 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10297
10298 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10299 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10300 #includes.
10301 (ps_get_thread_area): New function.
10302
10303 2015-08-19 Gary Benson <gbenson@redhat.com>
10304
10305 * hostio.c (handle_pread): Do not attempt to read more data
10306 than hostio_reply_with_data can fit in a packet.
10307
10308 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10309
10310 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10311
10312 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10313
10314 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10315
10316 2015-08-06 Pedro Alves <palves@redhat.com>
10317
10318 * tracepoint.c (expr_eval_result): Now an int.
10319
10320 2015-08-06 Pedro Alves <palves@redhat.com>
10321
10322 * gdbthread.h (struct regcache): Forward declare.
10323 (struct thread_info) <regcache_data>: Now a struct regcache
10324 pointer.
10325 * inferiors.c (inferior_regcache_data)
10326 (set_inferior_regcache_data): Now work with struct regcache
10327 pointers.
10328 * inferiors.h (struct regcache): Forward declare.
10329 (inferior_regcache_data, set_inferior_regcache_data): Now work
10330 with struct regcache pointers.
10331 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10332 (free_register_cache_thread): Remove struct regcache pointer
10333 casts.
10334
10335 2015-08-06 Pedro Alves <palves@redhat.com>
10336
10337 * server.c (captured_main): On error, print the exception message
10338 to stderr, and if run_once is set, throw a quit.
10339
10340 2015-08-06 Pedro Alves <palves@redhat.com>
10341
10342 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10343 the current thread.
10344
10345 2015-08-06 Pedro Alves <palves@redhat.com>
10346
10347 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10348 reading beyond the passed in buffer length.
10349
10350 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10351
10352 * tracepoint.c (symbol_list) <required>: Remove.
10353
10354 2015-08-06 Pedro Alves <palves@redhat.com>
10355
10356 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10357 count if stopping and suspending threads.
10358 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10359 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10360 (linux_detach): Complete an ongoing step-over.
10361 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10362 throughout.
10363 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10364 (linux_wait_1): If passing a signal to the inferior after
10365 finishing a step-over, unsuspend and re-resume all lwps. If we
10366 see a single-step event but the thread should be continuing, don't
10367 pass the trap to gdb.
10368 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10369 internal_error instead of gdb_assert.
10370 (enqueue_pending_signal): New function.
10371 (check_ptrace_stopped_lwp_gone): Add debug output.
10372 (start_step_over): Use internal_error instead of gdb_assert.
10373 (complete_ongoing_step_over): New function.
10374 (linux_resume_one_thread): Don't resume a suspended thread.
10375 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10376 it stepping.
10377
10378 2015-08-06 Pedro Alves <palves@redhat.com>
10379
10380 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10381 (linux_thread_alive): Use lwp_is_marked_dead.
10382 (extended_event_reported): Delete.
10383 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10384 instead of extended_event_reported.
10385 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10386 as well.
10387 (lwp_is_marked_dead): New function.
10388 (lwp_running): Use lwp_is_marked_dead.
10389 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10390 comment.
10391
10392 2015-08-06 Pedro Alves <palves@redhat.com>
10393
10394 * linux-low.c (linux_wait_1): Move fork event output out of the
10395 !report_to_gdb check. Pass event_child->waitstatus to
10396 target_waitstatus_to_string instead of ourstatus.
10397
10398 2015-08-04 Yao Qi <yao.qi@linaro.org>
10399
10400 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10401 if current_thread is 32 bit.
10402
10403 2015-08-04 Yao Qi <yao.qi@linaro.org>
10404
10405 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10406 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10407 * server.c (extended_protocol): Remove "static".
10408 * server.h (extended_protocol): Declare it.
10409
10410 2015-08-04 Yao Qi <yao.qi@linaro.org>
10411
10412 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10413 both aarch64 and aarch32.
10414 (aarch64_set_pc): Likewise.
10415
10416 2015-08-04 Yao Qi <yao.qi@linaro.org>
10417
10418 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10419 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10420 arm-with-neon.xml to srv_xmlfiles.
10421 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10422 (is_64bit_tdesc): New function.
10423 (aarch64_linux_read_description): New function.
10424 (aarch64_arch_setup): Call aarch64_linux_read_description.
10425 (regs_info): Rename to regs_info_aarch64.
10426 (aarch64_regs_info): Return right regs_info.
10427 (initialize_low_arch): Call initialize_low_arch_aarch32.
10428
10429 2015-08-04 Yao Qi <yao.qi@linaro.org>
10430
10431 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10432 * linux-aarch32-low.c: New file.
10433 * linux-aarch32-low.h: New file.
10434 * linux-arm-low.c (arm_fill_gregset): Move it to
10435 linux-aarch32-low.c.
10436 (arm_store_gregset): Likewise.
10437 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10438 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10439 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10440 (regs_info): Rename to regs_info_arm.
10441 (arm_regs_info): Return regs_info_aarch32 if
10442 have_ptrace_getregset is 1 and target description is
10443 arm_with_neon or arm_with_vfpv3.
10444 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10445 Call initialize_low_arch_aarch32 instead.
10446
10447 2015-08-04 Yao Qi <yao.qi@linaro.org>
10448
10449 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10450 * linux-low.c: ... here.
10451 * linux-low.h (have_ptrace_getregset): Declare it.
10452
10453 2015-08-04 Pedro Alves <palves@redhat.com>
10454
10455 * thread-db.c (struct thread_db): Use new typedefs.
10456 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10457 CHK calls.
10458 (disable_thread_event_reporting): Cast result of dlsym to
10459 destination function pointer type.
10460 (thread_db_mourn): Use td_ta_delete_ftype.
10461
10462 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10463
10464 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10465 arch variant.
10466 (CDX_BREAKPOINT): Define for R2.
10467 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10468 (the_low_target): Add comments.
10469
10470 2015-07-30 Yao Qi <yao.qi@linaro.org>
10471
10472 * linux-arm-low.c (arm_hwcap): Remove it.
10473 (arm_read_description): New local variable arm_hwcap. Don't
10474 set arm_hwcap to zero.
10475
10476 2015-07-30 Yao Qi <yao.qi@linaro.org>
10477
10478 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10479 Use regcache->tdesc instead.
10480 (arm_store_wmmxregset): Likewise.
10481 (arm_fill_vfpregset): Likewise.
10482 (arm_store_vfpregset): Likewise.
10483
10484 2015-07-30 Yao Qi <yao.qi@linaro.org>
10485
10486 * linux-arm-low.c: Include arch/arm.h.
10487 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10488 (arm_store_gregset): Likewise.
10489
10490 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10491
10492 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10493 ptrace's 4th parameter.
10494
10495 2015-07-27 Yao Qi <yao.qi@linaro.org>
10496
10497 * configure.srv (case aarch64*-*-linux*): Don't set
10498 srv_linux_usrregs.
10499
10500 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10501
10502 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10503 sys/ptrace.h.
10504 * linux-arm-low.c: Likewise.
10505 * linux-cris-low.c: Likewise.
10506 * linux-crisv32-low.c: Likewise.
10507 * linux-low.c: Likewise.
10508 * linux-m68k-low.c: Likewise.
10509 * linux-mips-low.c: Likewise.
10510 * linux-nios2-low.c: Likewise.
10511 * linux-s390-low.c: Likewise.
10512 * linux-sparc-low.c: Likewise.
10513 * linux-tic6x-low.c: Likewise.
10514 * linux-tile-low.c: Likewise.
10515 * linux-x86-low.c: Likewise.
10516
10517 2015-07-24 Pedro Alves <palves@redhat.com>
10518
10519 * config.in: Regenerate.
10520 * configure: Regenerate.
10521
10522 2015-07-24 Pedro Alves <palves@redhat.com>
10523
10524 * acinclude.m4: Include ../ptrace.m4.
10525 * configure.ac: Call GDB_AC_PTRACE.
10526 * config.in, configure: Regenerate.
10527
10528 2015-07-24 Yao Qi <yao.qi@linaro.org>
10529
10530 * linux-low.c (linux_create_inferior): Remove setting to
10531 proc->priv->new_inferior.
10532 (linux_attach): Likewise.
10533 (linux_low_filter_event): Likewise.
10534 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10535
10536 2015-07-24 Yao Qi <yao.qi@linaro.org>
10537
10538 * linux-low.c (linux_arch_setup): New function.
10539 (linux_low_filter_event): If proc->tdesc is NULL and
10540 proc->attached is true, call the_low_target.arch_setup.
10541 Otherwise, keep status pending, and return.
10542 (linux_resume_one_lwp_throw): Don't call get_pc if
10543 thread->while_stepping isn't NULL. Don't call
10544 get_thread_regcache if proc->tdesc is NULL.
10545 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10546 (linux_target_ops): Install arch_setup.
10547 * server.c (start_inferior): Call the_target->arch_setup.
10548 * target.h (struct target_ops) <arch_setup>: New field.
10549 (target_arch_setup): New marco.
10550 * lynx-low.c (lynx_target_ops): Update.
10551 * nto-low.c (nto_target_ops): Update.
10552 * spu-low.c (spu_target_ops): Update.
10553 * win32-low.c (win32_target_ops): Update.
10554
10555 2015-07-24 Yao Qi <yao.qi@linaro.org>
10556
10557 * linux-low.c (linux_add_process): Don't set
10558 proc->priv->new_inferior.
10559 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10560 (linux_attach): Likewise.
10561
10562 2015-07-24 Yao Qi <yao.qi@linaro.org>
10563
10564 * server.c (start_inferior): Code refactor.
10565
10566 2015-07-24 Yao Qi <yao.qi@linaro.org>
10567
10568 * server.c (process_serial_event): Set general_thread.
10569
10570 2015-07-21 Yao Qi <yao.qi@linaro.org>
10571
10572 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10573 aarch64_linux_get_debug_reg_capacity.
10574
10575 2015-07-17 Yao Qi <yao.qi@linaro.org>
10576
10577 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10578 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10579 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10580 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10581 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10582 (AARCH64_HWP_ALIGNMENT): Likewise.
10583 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10584 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10585 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10586 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10587 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10588 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10589 (struct aarch64_debug_reg_state): Likewise.
10590 (struct arch_lwp_info): Likewise.
10591 (aarch64_align_watchpoint): Likewise.
10592 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10593 (aarch64_watchpoint_length): Likewise.
10594 (aarch64_point_encode_ctrl_reg): Likewise
10595 (aarch64_point_is_aligned): Likewise.
10596 (aarch64_align_watchpoint): Likewise.
10597 (aarch64_linux_set_debug_regs):
10598 (aarch64_dr_state_insert_one_point): Likewise.
10599 (aarch64_dr_state_remove_one_point): Likewise.
10600 (aarch64_handle_breakpoint): Likewise.
10601 (aarch64_handle_aligned_watchpoint): Likewise.
10602 (aarch64_handle_unaligned_watchpoint): Likewise.
10603 (aarch64_handle_watchpoint): Likewise.
10604
10605 2015-07-17 Yao Qi <yao.qi@linaro.org>
10606
10607 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10608 and don't aarch64_get_debug_reg_state. All callers update.
10609 (aarch64_handle_aligned_watchpoint): Likewise.
10610 (aarch64_handle_unaligned_watchpoint): Likewise.
10611 (aarch64_handle_watchpoint): Likewise.
10612 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10613 (aarch64_remove_point): Likewise.
10614
10615 2015-07-17 Yao Qi <yao.qi@linaro.org>
10616
10617 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10618 debug_printf.
10619 (aarch64_handle_unaligned_watchpoint): Likewise.
10620
10621 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10622
10623 Revert the previous 3 commits:
10624 Move gdb_regex* to common/
10625 Move linux_find_memory_regions_full & co.
10626 gdbserver build-id attribute generator
10627
10628 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10629 Jan Kratochvil <jan.kratochvil@redhat.com>
10630
10631 gdbserver build-id attribute generator.
10632 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10633 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10634 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10635 (find_phdr): New.
10636 (get_dynamic): Use find_pdhr to traverse program headers.
10637 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10638 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10639 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10640 (get_hex_build_id): New.
10641 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10642 to reply XML document.
10643
10644 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10645 Jan Kratochvil <jan.kratochvil@redhat.com>
10646
10647 * target.c: Include target/target-utils.h and fcntl.h.
10648 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10649 (target_fileio_read_stralloc): New functions.
10650
10651 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10652
10653 * Makefile.in (OBS): Add gdb_regex.o.
10654 (gdb_regex.o): New.
10655 * config.in: Rebuilt.
10656 * configure: Rebuilt.
10657
10658 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10659 Jan Kratochvil <jan.kratochvil@redhat.com>
10660
10661 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10662 * Makefile.in (OBS): Add target-utils.o.
10663 (linux-maps.o, target-utils.o): New.
10664 * configure.srv (srv_linux_obj): Add linux-maps.o.
10665
10666 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10667
10668 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10669 function, return 1.
10670 (the_low_target): Install it.
10671
10672 2015-07-14 Pedro Alves <palves@redhat.com>
10673
10674 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10675 Instead, ignore ECHILD, and throw an error for other errnos.
10676
10677 2015-07-10 Pedro Alves <palves@redhat.com>
10678
10679 * event-loop.c (struct callback_event) <data>: Change type to
10680 gdb_client_data instance instead of gdb_client_data pointer.
10681 (append_callback_event): Adjust.
10682
10683 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10684
10685 * linux-aarch64-low.c: Add comments for each linux_target_ops
10686 method. Remove comments already covered in target_ops and
10687 linux_target_ops definitions.
10688 (the_low_target): Add comments for each unimplemented method.
10689
10690 2015-07-09 Yao Qi <yao.qi@linaro.org>
10691
10692 * linux-aarch64-low.c (aarch64_regmap): Remove.
10693 (aarch64_usrregs_info): Remove.
10694 (regs_info): Set field usrregs to NULL.
10695
10696 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10697
10698 * linux-low.c: Include "rsp-low.h"
10699 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10700 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10701 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10702 (handle_btrace_enable_pt): New.
10703 (handle_btrace_general_set): Support "pt".
10704 (handle_btrace_conf_general_set): Support "pt:size".
10705
10706 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10707
10708 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10709 Z_PACKET_SW_BP.
10710
10711 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10712
10713 * linux-aarch64-low.c: Remove comment about endianness.
10714 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10715 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10716 memcmp.
10717
10718 2015-06-24 Gary Benson <gbenson@redhat.com>
10719
10720 * linux-i386-ipa.c (stdint.h): Do not include.
10721 * lynx-i386-low.c (stdint.h): Likewise.
10722 * lynx-ppc-low.c (stdint.h): Likewise.
10723 * mem-break.c (stdint.h): Likewise.
10724 * thread-db.c (stdint.h): Likewise.
10725 * tracepoint.c (stdint.h): Likewise.
10726 * win32-low.c (stdint.h): Likewise.
10727
10728 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10729
10730 * server.c (write_qxfer_response): Update call to
10731 remote_escape_output.
10732
10733 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10734 Jan Kratochvil <jan.kratochvil@redhat.com>
10735
10736 Merge multiple hex conversions.
10737 * gdbreplay.c (tohex): Rename to 'fromhex'.
10738 (logchar): Use fromhex.
10739
10740 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10741
10742 * server.c (handle_qxfer_libraries): Set `version' attribute for
10743 <library-list>.
10744
10745 2015-06-10 Gary Benson <gbenson@redhat.com>
10746
10747 * target.h (struct target_ops) <multifs_open>: New field.
10748 <multifs_unlink>: Likewise.
10749 <multifs_readlink>: Likewise.
10750 * linux-low.c (nat/linux-namespaces.h): New include.
10751 (linux_target_ops): Initialize the_target->multifs_open,
10752 the_target->multifs_unlink and the_target->multifs_readlink.
10753 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10754 * hostio.c (hostio_fs_pid): New static variable.
10755 (hostio_handle_new_gdb_connection): New function.
10756 (handle_setfs): Likewise.
10757 (handle_open): Use the_target->multifs_open as appropriate.
10758 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10759 (handle_readlink): Use the_target->multifs_readlink as
10760 appropriate.
10761 (handle_vFile): Handle vFile:setfs packets.
10762 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10763 after target_handle_new_gdb_connection.
10764
10765 2015-06-10 Gary Benson <gbenson@redhat.com>
10766
10767 * configure.ac (AC_CHECK_FUNCS): Add setns.
10768 * config.in: Regenerate.
10769 * configure: Likewise.
10770 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10771 (linux-namespaces.o): New rule.
10772 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10773
10774 2015-06-09 Gary Benson <gbenson@redhat.com>
10775
10776 * hostio.c (handle_open): Process mode argument with
10777 fileio_to_host_mode.
10778
10779 2015-06-01 Yao Qi <yao.qi@linaro.org>
10780
10781 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10782 * linux-x86-low.c: Likewise.
10783
10784 2015-05-28 Don Breazeal <donb@codesourcery.com>
10785
10786 * linux-low.c (handle_extended_wait): Initialize
10787 thread_info.last_resume_kind for new fork children.
10788
10789 2015-05-15 Pedro Alves <palves@redhat.com>
10790
10791 * target.h (target_handle_new_gdb_connection): Rewrite using if
10792 wrapped in do/while.
10793
10794 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10795
10796 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10797 * configure, config.in: Regenerate.
10798 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10799 Declare typedef.
10800
10801 2015-05-12 Don Breazeal <donb@codesourcery.com>
10802
10803 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10804 PTRACE_EVENT_VFORK_DONE.
10805 (linux_low_ptrace_options, extended_event_reported): Add vfork
10806 events.
10807 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10808 and "vforkdone" for RSP 'T' Stop Reply Packet.
10809 * server.h (report_vfork_events): Declare
10810 global variable.
10811
10812 2015-05-12 Don Breazeal <donb@codesourcery.com>
10813
10814 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10815 (the_low_target) <new_fork>: Initialize new member.
10816 * linux-arm-low.c (arm_new_fork): New function.
10817 (the_low_target) <new_fork>: Initialize new member.
10818 * linux-low.c (handle_extended_wait): Call new target function
10819 new_fork.
10820 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10821 * linux-mips-low.c (mips_add_watchpoint): New function
10822 extracted from mips_insert_point.
10823 (the_low_target) <new_fork>: Initialize new member.
10824 (mips_linux_new_fork): New function.
10825 (mips_insert_point): Call mips_add_watchpoint.
10826 * linux-x86-low.c (x86_linux_new_fork): New function.
10827 (the_low_target) <new_fork>: Initialize new member.
10828
10829 2015-05-12 Don Breazeal <donb@codesourcery.com>
10830
10831 * linux-low.c (handle_extended_wait): Implement return value,
10832 rename argument 'event_child' to 'event_lwp', handle
10833 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10834 (linux_low_ptrace_options): New function.
10835 (linux_low_filter_event): Call linux_low_ptrace_options,
10836 use different argument fo linux_enable_event_reporting,
10837 use return value from handle_extended_wait.
10838 (extended_event_reported): New function.
10839 (linux_wait_1): Call extended_event_reported and set
10840 status to report fork events.
10841 (linux_write_memory): Add pid to debug message.
10842 (reset_lwp_ptrace_options_callback): New function.
10843 (linux_handle_new_gdb_connection): New function.
10844 (linux_target_ops): Initialize new structure member.
10845 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10846 * lynx-low.c: Initialize new structure member.
10847 * remote-utils.c (prepare_resume_reply): Implement stop reason
10848 "fork" for "T" stop message.
10849 * server.c (handle_query): Call handle_new_gdb_connection.
10850 * server.h (report_fork_events): Declare global flag.
10851 * target.h (struct target_ops) <handle_new_gdb_connection>:
10852 New member.
10853 (target_handle_new_gdb_connection): New macro.
10854 * win32-low.c: Initialize new structure member.
10855
10856 2015-05-12 Don Breazeal <donb@codesourcery.com>
10857
10858 * mem-break.c (APPEND_TO_LIST): Define macro.
10859 (clone_agent_expr): New function.
10860 (clone_one_breakpoint): New function.
10861 (clone_all_breakpoints): New function.
10862 * mem-break.h: Declare new functions.
10863
10864 2015-05-12 Don Breazeal <donb@codesourcery.com>
10865
10866 * linux-low.c (linux_supports_fork_events): New function.
10867 (linux_supports_vfork_events): New function.
10868 (linux_target_ops): Initialize new structure members.
10869 (initialize_low): Call linux_check_ptrace_features.
10870 * lynx-low.c (lynx_target_ops): Initialize new structure
10871 members.
10872 * server.c (report_fork_events, report_vfork_events):
10873 New global flags.
10874 (handle_query): Add new features to qSupported packet and
10875 response.
10876 (captured_main): Initialize new global variables.
10877 * target.h (struct target_ops) <supports_fork_events>:
10878 New member.
10879 <supports_vfork_events>: New member.
10880 (target_supports_fork_events): New macro.
10881 (target_supports_vfork_events): New macro.
10882 * win32-low.c (win32_target_ops): Initialize new structure
10883 members.
10884
10885 2015-05-12 Gary Benson <gbenson@redhat.com>
10886
10887 * server.c (handle_qxfer_exec_file): Use current process
10888 if annex is empty.
10889
10890 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10891
10892 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10893 Remove HAVE_PTRACE_GETREGS conditionals.
10894 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10895 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10896
10897 2015-05-08 Yao Qi <yao.qi@linaro.org>
10898
10899 * linux-low.c (linux_supports_conditional_breakpoints): New
10900 function.
10901 (linux_target_ops): Install new target method.
10902 * lynx-low.c (lynx_target_ops): Install NULL hook for
10903 supports_conditional_breakpoints.
10904 * nto-low.c (nto_target_ops): Likewise.
10905 * spu-low.c (spu_target_ops): Likewise.
10906 * win32-low.c (win32_target_ops): Likewise.
10907 * server.c (handle_query): Check
10908 target_supports_conditional_breakpoints.
10909 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10910 New field.
10911 (target_supports_conditional_breakpoints): New macro.
10912
10913 2015-05-06 Pedro Alves <palves@redhat.com>
10914
10915 PR server/18081
10916 * server.c (start_inferior): If the process exits, mourn it.
10917
10918 2015-04-21 Gary Benson <gbenson@redhat.com>
10919
10920 * hostio.c (fileio_open_flags_to_host): Factored out to
10921 fileio_to_host_openflags in common/fileio.c. Single use
10922 updated.
10923
10924 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10925
10926 * linux-xtensa-low.c (xtensa_fill_gregset)
10927 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10928 XCHAL_HAVE_LOOP.
10929
10930 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10931
10932 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10933 (regs_info): Replace usrregs pointer with NULL.
10934
10935 2015-04-17 Gary Benson <gbenson@redhat.com>
10936
10937 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10938 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10939 * server.c (handle_qxfer_exec_file): New function.
10940 (qxfer_packets): Add exec-file entry.
10941 (handle_query): Report qXfer:exec-file:read as supported packet.
10942
10943 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10944
10945 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10946
10947 2015-04-09 Gary Benson <gbenson@redhat.com>
10948
10949 * hostio-errno.c (errno_to_fileio_error): Remove function.
10950 Update caller to use remote_fileio_to_fio_error.
10951
10952 2015-04-09 Yao Qi <yao.qi@linaro.org>
10953
10954 * linux-low.c (linux_insert_point): Call
10955 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10956 (linux_remove_point): Call remove_memory_breakpoint if type is
10957 raw_bkpt_type_sw.
10958 * linux-x86-low.c (x86_insert_point): Don't call
10959 insert_memory_breakpoint.
10960 (x86_remove_point): Don't call remove_memory_breakpoint.
10961
10962 2015-04-01 Pedro Alves <palves@redhat.com>
10963 Cleber Rosa <crosa@redhat.com>
10964
10965 * server.c (gdbserver_usage): Reorganize and extend the usage
10966 message.
10967
10968 2015-03-24 Pedro Alves <palves@redhat.com>
10969
10970 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10971 output. Also dump TRAP_TRACE.
10972 (linux_low_filter_event): In debug output, distinguish a
10973 resume_stop SIGSTOP from a delayed SIGSTOP.
10974
10975 2015-03-24 Gary Benson <gbenson@redhat.com>
10976
10977 * linux-x86-low.c (x86_linux_new_thread): Moved to
10978 nat/x86-linux.c.
10979 (x86_linux_prepare_to_resume): Likewise.
10980
10981 2015-03-24 Gary Benson <gbenson@redhat.com>
10982
10983 * Makefile.in (x86-linux-dregs.o): New rule.
10984 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10985 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10986 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10987 (x86_linux_dr_get): Likewise.
10988 (x86_linux_dr_set): Likewise.
10989 (update_debug_registers_callback): Likewise.
10990 (x86_linux_dr_set_addr): Likewise.
10991 (x86_linux_dr_get_addr): Likewise.
10992 (x86_linux_dr_set_control): Likewise.
10993 (x86_linux_dr_get_control): Likewise.
10994 (x86_linux_dr_get_status): Likewise.
10995 (x86_linux_update_debug_registers): Likewise.
10996
10997 2015-03-24 Gary Benson <gbenson@redhat.com>
10998
10999 * linux-x86-low.c (x86_linux_update_debug_registers):
11000 New function, factored out from...
11001 (x86_linux_prepare_to_resume): ...this.
11002
11003 2015-03-24 Gary Benson <gbenson@redhat.com>
11004
11005 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11006 (x86_linux_dr_set): Likewise.
11007 (update_debug_registers_callback): Likewise.
11008 (x86_linux_dr_set_addr): Likewise.
11009 (x86_linux_dr_get_addr): Likewise.
11010 (x86_linux_dr_set_control): Likewise.
11011 (x86_linux_dr_get_control): Likewise.
11012 (x86_linux_dr_get_status): Likewise.
11013 (x86_linux_prepare_to_resume): Likewise.
11014
11015 2015-03-24 Gary Benson <gbenson@redhat.com>
11016
11017 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11018 Use perror_with_name. Pass string through gettext.
11019 (x86_linux_dr_set): Likewise.
11020
11021 2015-03-24 Gary Benson <gbenson@redhat.com>
11022
11023 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11024 (x86_linux_dr_set_addr): ...this.
11025 (x86_dr_low_get_addr): Rename to...
11026 (x86_linux_dr_get_addr): ...this.
11027 (x86_dr_low_set_control): Rename to...
11028 (x86_linux_dr_set_control): ...this.
11029 (x86_dr_low_get_control): Rename to...
11030 (x86_linux_dr_get_control): ...this.
11031 (x86_dr_low_get_status): Rename to...
11032 (x86_linux_dr_get_status): ...this.
11033 (x86_dr_low): Update with new function names.
11034
11035 2015-03-24 Gary Benson <gbenson@redhat.com>
11036
11037 * Makefile.in (x86-linux.o): New rule.
11038 * configure.srv: Add x86-linux.o to relevant targets.
11039 * linux-low.c (lwp_set_arch_private_info): New function.
11040 (lwp_arch_private_info): Likewise.
11041 * linux-x86-low.c: Include nat/x86-linux.h.
11042 (arch_lwp_info): Removed structure.
11043 (update_debug_registers_callback):
11044 Use lwp_set_debug_registers_changed.
11045 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11046 and lwp_set_debug_registers_changed.
11047 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11048
11049 2015-03-24 Gary Benson <gbenson@redhat.com>
11050
11051 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11052 * linux-arm-low.c (arm_new_thread): Likewise.
11053 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11054 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11055 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11056 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11057
11058 2015-03-24 Gary Benson <gbenson@redhat.com>
11059
11060 * linux-low.c (ptid_of_lwp): New function.
11061 (lwp_is_stopped): Likewise.
11062 (lwp_stop_reason): Likewise.
11063 * linux-x86-low.c (update_debug_registers_callback):
11064 Use lwp_is_stopped.
11065 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11066 lwp_stop_reason.
11067
11068 2015-03-24 Gary Benson <gbenson@redhat.com>
11069
11070 * linux-low.h (linux_stop_lwp): Remove declaration.
11071
11072 2015-03-24 Gary Benson <gbenson@redhat.com>
11073
11074 * linux-low.h: Include nat/linux-nat.h.
11075 * linux-low.c (iterate_over_lwps_args): New structure.
11076 (iterate_over_lwps_filter): New function.
11077 (iterate_over_lwps): Likewise.
11078 * linux-x86-low.c (update_debug_registers_callback):
11079 Update signature to what iterate_over_lwps expects.
11080 Remove PID check that iterate_over_lwps now performs.
11081 (x86_dr_low_set_addr): Use iterate_over_lwps.
11082 (x86_dr_low_set_control): Likewise.
11083
11084 2015-03-24 Gary Benson <gbenson@redhat.com>
11085
11086 * linux-x86-low.c (x86_debug_reg_state): New function.
11087 (x86_linux_prepare_to_resume): Use the above.
11088
11089 2015-03-24 Gary Benson <gbenson@redhat.com>
11090
11091 * linux-low.c (current_lwp_ptid): New function.
11092 * linux-x86-low.c: Include nat/linux-nat.h.
11093 (x86_dr_low_get_addr): Use current_lwp_ptid.
11094 (x86_dr_low_get_control): Likewise.
11095 (x86_dr_low_get_status): Likewise.
11096
11097 2015-03-20 Pedro Alves <palves@redhat.com>
11098
11099 * tracepoint.c (cmd_qtstatus): Make "str" const.
11100
11101 2015-03-20 Pedro Alves <palves@redhat.com>
11102
11103 * server.c (handle_general_set): Make "req_str" const.
11104
11105 2015-03-19 Pedro Alves <palves@redhat.com>
11106
11107 * linux-low.c (linux_resume_one_lwp): Rename to ...
11108 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11109 instead call perror_with_name.
11110 (check_ptrace_stopped_lwp_gone): New function.
11111 (linux_resume_one_lwp): Reimplement as wrapper around
11112 linux_resume_one_lwp_throw that swallows errors if the LWP is
11113 gone.
11114
11115 2015-03-19 Pedro Alves <palves@redhat.com>
11116
11117 * linux-low.c (count_events_callback, select_event_lwp_callback):
11118 No longer check whether the thread has resume_stop as last resume
11119 kind.
11120
11121 2015-03-19 Pedro Alves <palves@redhat.com>
11122
11123 * linux-low.c (count_events_callback, select_event_lwp_callback):
11124 Use the lwp's status_pending_p field, not the thread's.
11125
11126 2015-03-19 Pedro Alves <palves@redhat.com>
11127
11128 * linux-low.c (select_event_lwp_callback): Update comments to
11129 no longer mention SIGTRAP.
11130
11131 2015-03-18 Gary Benson <gbenson@redhat.com>
11132
11133 * server.c (handle_query): Do not report vFile:fstat as supported.
11134
11135 2015-03-11 Gary Benson <gbenson@redhat.com>
11136
11137 * hostio.c (sys/types.h): New include.
11138 (sys/stat.h): Likewise.
11139 (common-remote-fileio.h): Likewise.
11140 (handle_fstat): New function.
11141 (handle_vFile): Handle vFile:fstat packets.
11142
11143 2015-03-11 Gary Benson <gbenson@redhat.com>
11144
11145 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11146 struct stat.st_blocks and struct stat.st_blksize.
11147 * configure: Regenerate.
11148 * config.in: Likewise.
11149 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11150 (OBS): Add common-remote-fileio.o.
11151 (common-remote-fileio.o): New rule.
11152
11153 2015-03-09 Pedro Alves <palves@redhat.com>
11154
11155 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11156 'struct sockaddr' pointer in 'accept' call.
11157
11158 2015-03-09 Pedro Alves <palves@redhat.com>
11159
11160 Revert:
11161 2015-03-07 Pedro Alves <palves@redhat.com>
11162 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11163 or <winsock2.h> here. Instead include "gdb_socket.h".
11164 (remote_open): Use union gdb_sockaddr_u.
11165 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11166 or <winsock2.h> here. Instead include "gdb_socket.h".
11167 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11168 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11169 or <sys/un.h>.
11170 (init_named_socket, gdb_agent_helper_thread): Use union
11171 gdb_sockaddr_u.
11172
11173 2015-03-07 Pedro Alves <palves@redhat.com>
11174
11175 * configure.ac (build_warnings): Move
11176 -Wdeclaration-after-statement to the C-specific set.
11177 * configure: Regenerate.
11178
11179 2015-03-07 Pedro Alves <palves@redhat.com>
11180
11181 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11182 or <winsock2.h> here. Instead include "gdb_socket.h".
11183 (remote_open): Use union gdb_sockaddr_u.
11184 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11185 or <winsock2.h> here. Instead include "gdb_socket.h".
11186 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11187 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11188 or <sys/un.h>.
11189 (init_named_socket, gdb_agent_helper_thread): Use union
11190 gdb_sockaddr_u.
11191
11192 2015-03-07 Pedro Alves <palves@redhat.com>
11193
11194 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11195 instead.
11196
11197 2015-03-06 Yao Qi <yao.qi@linaro.org>
11198
11199 * linux-aarch64-low.c (aarch64_insert_point): Use
11200 show_debug_regs as a boolean.
11201 (aarch64_remove_point): Likewise.
11202
11203 2015-03-05 Pedro Alves <palves@redhat.com>
11204
11205 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11206 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11207 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11208 * nto-low.c (nto_target_ops): Likewise.
11209 * spu-low.c (spu_target_ops): Likewise.
11210 * win32-low.c (win32_target_ops): Likewise.
11211
11212 2015-03-04 Pedro Alves <palves@redhat.com>
11213
11214 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11215 Decide whether a breakpoint triggered based on the SIGTRAP's
11216 siginfo.si_code.
11217 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11218 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11219 (linux_low_filter_event): Check for breakpoints before checking
11220 watchpoints.
11221 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11222 siginfo.si_code.
11223 (linux_stopped_by_sw_breakpoint)
11224 (linux_supports_stopped_by_sw_breakpoint)
11225 (linux_stopped_by_hw_breakpoint)
11226 (linux_supports_stopped_by_hw_breakpoint): New functions.
11227 (linux_target_ops): Install new target methods.
11228
11229 2015-03-04 Pedro Alves <palves@redhat.com>
11230
11231 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11232 * server.c (swbreak_feature, hwbreak_feature): New globals.
11233 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11234 (captured_main): Clear swbreak_feature and hwbreak_feature.
11235 * server.h (swbreak_feature, hwbreak_feature): Declare.
11236 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11237 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11238 supports_stopped_by_hw_breakpoint>: New fields.
11239 (target_supports_stopped_by_sw_breakpoint)
11240 (target_stopped_by_sw_breakpoint)
11241 (target_supports_stopped_by_hw_breakpoint)
11242 (target_stopped_by_hw_breakpoint): Declare.
11243
11244 2015-03-04 Pedro Alves <palves@redhat.com>
11245
11246 enum lwp_stop_reason -> enum target_stop_reason
11247 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11248 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11249 (linux_wait_1, stuck_in_jump_pad_callback)
11250 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11251 (linux_stopped_by_watchpoint):
11252 * linux-low.h (enum lwp_stop_reason): Delete.
11253 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11254 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11255
11256 2015-03-04 Yao Qi <yao.qi@linaro.org>
11257
11258 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11259
11260 2015-03-03 Gary Benson <gbenson@redhat.com>
11261
11262 * hostio.c (handle_vFile): Fix prefix lengths.
11263
11264 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11265
11266 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11267 ptr_bits.
11268
11269 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11270
11271 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11272 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11273 (clean): Add "rm -f" for above C files.
11274 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11275 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11276 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11277 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11278 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11279 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11280 (init_registers_s390x_vx_linux64)
11281 (init_registers_s390x_tevx_linux64)
11282 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11283 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11284 declarations.
11285 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11286 (s390_store_vxrs_high): New functions.
11287 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11288 NT_S390_VXRS_HIGH.
11289 (s390_arch_setup): Add logic for selecting one of the new target
11290 descriptions. Activate the new vector regsets if applicable.
11291 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11292 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11293 and init_registers_s390x_tevx_linux64.
11294
11295 2015-03-01 Pedro Alves <palves@redhat.com>
11296
11297 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11298 parameter.
11299
11300 2015-02-27 Pedro Alves <palves@redhat.com>
11301
11302 * linux-x86-low.c (u_debugreg_offset): New function.
11303 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11304
11305 2015-02-27 Pedro Alves <palves@redhat.com>
11306
11307 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11308 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11309 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11310 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11311 (ps_lsetfpregs, ps_getpid)
11312 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11313 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11314 (ps_lsetxregs, ps_plog): Declare.
11315
11316 2015-02-27 Pedro Alves <palves@redhat.com>
11317
11318 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11319 IP_AGENT_EXPORT_FUNC.
11320 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11321 IP_AGENT_EXPORT_FUNC.
11322 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11323 (IP_AGENT_EXPORT): Delete.
11324 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11325 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11326 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11327 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11328 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11329 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11330 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11331 (traceframe_read_count, traceframe_write_count)
11332 (traceframes_created, trace_state_variables, get_raw_reg)
11333 (get_trace_state_variable_value, set_trace_state_variable_value)
11334 (ust_loaded, helper_thread_id, cmd_buf): Use
11335 IPA_SYM_EXPORTED_NAME.
11336 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11337 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11338 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11339 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11340 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11341 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11342 EXTERN_C_PUSH/EXTERN_C_POP.
11343 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11344 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11345 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11346 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11347 (traceframe_write_count, traceframe_read_count)
11348 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11349 (about_to_request_buffer_space, get_trace_state_variable_value)
11350 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11351 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11352 EXTERN_C_PUSH/EXTERN_C_POP.
11353 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11354 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11355 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11356 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11357 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11358 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11359 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11360 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11361 Define.
11362 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11363 (IP_AGENT_EXPORT_VAR_DECL): Define.
11364 (tracing): Declare.
11365 (gdb_agent_get_raw_reg): Declare.
11366
11367 2015-02-27 Tom Tromey <tromey@redhat.com>
11368 Pedro Alves <palves@redhat.com>
11369
11370 Rename symbols whose names are reserved C++ keywords throughout.
11371
11372 2015-02-27 Pedro Alves <palves@redhat.com>
11373
11374 * Makefile.in (COMPILER): New, get it from autoconf.
11375 (CXX): Get from autoconf instead.
11376 (COMPILE.pre): Use COMPILER.
11377 (CC-LD): Rename to ...
11378 (CC_LD): ... this. Use COMPILER.
11379 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11380 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11381 * acinclude.m4: Include build-with-cxx.m4.
11382 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11383 Disable -Werror by default if building in C++ mode.
11384 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11385 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11386 the C++ compiler. Save/restore CXXFLAGS too.
11387 * configure: Regenerate.
11388
11389 2015-02-27 Pedro Alves <palves@redhat.com>
11390
11391 * acinclude.m4: Include libiberty.m4.
11392 * configure.ac: Call libiberty_INIT.
11393 * config.in, configure: Regenerate.
11394
11395 2015-02-26 Pedro Alves <palves@redhat.com>
11396
11397 * linux-low.c (linux_wait_1): When incrementing the PC past a
11398 program breakpoint always use the_low_target.breakpoint_len as
11399 increment, rather than the maximum between that and
11400 the_low_target.decr_pc_after_break.
11401
11402 2015-02-23 Pedro Alves <palves@redhat.com>
11403
11404 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11405 thread was doing a step-over; always adjust the PC if
11406 we stepped over a permanent breakpoint.
11407 (linux_wait_1): If we stepped over breakpoint that was on top of a
11408 permanent breakpoint, manually advance the PC past it.
11409
11410 2015-02-23 Pedro Alves <palves@redhat.com>
11411
11412 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11413 modes.
11414 (x86_fill_gregset, x86_store_gregset): Use it when handling
11415 $orig_eax.
11416
11417 2015-02-20 Pedro Alves <palves@redhat.com>
11418
11419 * thread-db.c: Include "nat/linux-procfs.h".
11420 (thread_db_init): Skip listing new threads if the kernel supports
11421 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11422
11423 2015-02-20 Pedro Alves <palves@redhat.com>
11424
11425 * linux-low.c (status_pending_p_callback): Use ptid_match.
11426
11427 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11428
11429 PR breakpoints/16812
11430 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11431 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11432 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11433
11434 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11435
11436 PR breakpoints/15956
11437 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11438
11439 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11440
11441 * linux-low.c (linux_low_btrace_conf): Print size.
11442 * server.c (handle_btrace_conf_general_set): New.
11443 (hanle_general_set): Call handle_btrace_conf_general_set.
11444 (handle_query): Report Qbtrace-conf:bts:size as supported.
11445
11446 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11447
11448 * linux-low.c (linux_low_enable_btrace): Update parameters.
11449 (linux_low_btrace_conf): New.
11450 (linux_target_ops)<to_btrace_conf>: Initialize.
11451 * server.c (current_btrace_conf): New.
11452 (handle_btrace_enable): Rename to ...
11453 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11454 to target_enable_btrace. Update comment. Update users.
11455 (handle_qxfer_btrace_conf): New.
11456 (qxfer_packets): Add btrace-conf entry.
11457 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11458 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11459 (target_ops)<read_btrace_conf>: New.
11460 (target_enable_btrace): Update parameters.
11461 (target_read_btrace_conf): New.
11462
11463 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11464
11465 * server.c (handle_btrace_general_set): Remove call to
11466 target_supports_btrace.
11467 (supported_btrace_packets): New.
11468 (handle_query): Call supported_btrace_packets.
11469 * target.h: include btrace-common.h.
11470 (btrace_target_info): Removed.
11471 (supports_btrace, target_supports_btrace): Update parameters.
11472
11473 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11474
11475 * Makefile.in (SFILES): Add common/btrace-common.c.
11476 (OBS): Add common/btrace-common.o.
11477 (btrace-common.o): Add build rules.
11478 * linux-low: Include btrace-common.h.
11479 (linux_low_read_btrace): Use struct btrace_data. Call
11480 btrace_data_init and btrace_data_fini.
11481
11482 2015-02-06 Pedro Alves <palves@redhat.com>
11483
11484 * thread-db.c (find_new_threads_callback): Add debug output.
11485
11486 2015-02-04 Pedro Alves <palves@redhat.com>
11487
11488 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11489 (resume_stopped_resumed_lwps): New function.
11490 (linux_wait_for_event_filtered): Use it.
11491
11492 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11493
11494 * Makefile.in (SFILES): Add linux-personality.c.
11495 (linux-personality.o): New rule.
11496 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11497 list of objects to be built.
11498 * linux-low.c: Include nat/linux-personality.h.
11499 (linux_create_inferior): Remove code to disable address space
11500 randomization (moved to ../nat/linux-personality.c). Create
11501 cleanup to disable address space randomization.
11502
11503 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11504
11505 * Makefile.in (posix-strerror.o): New rule.
11506 (mingw-strerror.o): Likewise.
11507 * configure: Regenerated.
11508 * configure.ac: Source file ../common/common.host. Initialize new
11509 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11510
11511 2015-01-14 Yao Qi <yao@codesourcery.com>
11512
11513 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11514 (ppc-linux.o): New rule.
11515 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11516 * configure.ac: AC_CHECK_FUNCS(getauxval).
11517 * config.in: Re-generated.
11518 * configure: Re-generated.
11519 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11520 ppc64_64bit_inferior_p
11521
11522 2015-01-14 Yao Qi <yao@codesourcery.com>
11523
11524 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11525 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11526 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11527 (PT_ORIG_R3, PT_TRAP): Likewise.
11528 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11529 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11530 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11531
11532 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11533
11534 * i387-fp.c (i387_cache_to_xsave): In look over
11535 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11536 zmmh_low_space field by use of zmmh_high_space.
11537
11538 2015-01-09 Pedro Alves <palves@redhat.com>
11539
11540 * linux-low.c (step_over_bkpt): Move higher up in the file.
11541 (handle_extended_wait): Don't store the stop_pc here.
11542 (get_stop_pc): Adjust comments and rename to ...
11543 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11544 stopped for a software breakpoint or hardware breakpoint.
11545 (thread_still_has_status_pending_p): New function.
11546 (status_pending_p_callback): Use
11547 thread_still_has_status_pending_p. If the event is no longer
11548 interesting, resume the LWP.
11549 (handle_tracepoints): Add assert.
11550 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11551 (wstatus_maybe_breakpoint): New function.
11552 (cancel_breakpoint): Delete function.
11553 (check_stopped_by_watchpoint): New function, factored out from
11554 linux_low_filter_event.
11555 (lp_status_maybe_breakpoint): Delete function.
11556 (linux_low_filter_event): Remove filter_ptid argument.
11557 Leave thread group exits pending here. Store the LWP's stop PC.
11558 Always leave events pending.
11559 (linux_wait_for_event_filtered): Pull all events out of the
11560 kernel, and leave them all pending.
11561 (count_events_callback, select_event_lwp_callback): Consider all
11562 events.
11563 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11564 (select_event_lwp): Only give preference to the stepping LWP in
11565 all-stop mode. Adjust comments.
11566 (ignore_event): New function.
11567 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11568 references to cancel_breakpoints. Adjust to renames. Also give
11569 equal priority to all LWPs that have had events in non-stop mode.
11570 If reporting a software breakpoint event, unadjust the LWP's PC.
11571 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11572 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11573 Adjust.
11574 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11575 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11576 (linux_stopped_by_watchpoint): Adjust.
11577 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11578 * linux-low.h (enum lwp_stop_reason): New.
11579 (struct lwp_info) <stop_pc>: Adjust comment.
11580 <stopped_by_watchpoint>: Delete field.
11581 <stop_reason>: New field.
11582 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11583 * mem-break.c (software_breakpoint_inserted_here)
11584 (hardware_breakpoint_inserted_here): New function.
11585 * mem-break.h (software_breakpoint_inserted_here)
11586 (hardware_breakpoint_inserted_here): Declare.
11587 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11588 (cancel_breakpoints): Delete.
11589 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11590 (upload_fast_traceframes): Remove references to
11591 cancel_breakpoints.
11592
11593 2015-01-09 Pedro Alves <palves@redhat.com>
11594
11595 * thread-db.c (find_new_threads_callback): Ignore thread if the
11596 kernel thread ID is -1.
11597
11598 2015-01-09 Pedro Alves <palves@redhat.com>
11599
11600 * linux-low.c (linux_attach_fail_reason_string): Move to
11601 nat/linux-ptrace.c, and rename.
11602 (linux_attach_lwp): Update comment.
11603 (attach_proc_task_lwp_callback): New function.
11604 (linux_attach): Adjust to rename and use
11605 linux_proc_attach_tgid_threads.
11606 (linux_attach_fail_reason_string): Delete declaration.
11607
11608 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11609
11610 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11611 * server.c (gdbserver_version): Likewise.
11612
11613 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11614
11615 * remote-utils.c: Include ctype.h.
11616 (input_interrupt): Explicitly handle the case when the char
11617 received is the NUL byte. Improve the printing of non-ASCII
11618 characters.
11619
11620 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11621
11622 * linux-low.c (linux_low_filter_event): Update call to
11623 linux_enable_event_reporting following the addition of
11624 a new parameter to that function.
11625
11626 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11627
11628 PR server/17457
11629 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11630 (AARCH64_FPCR_REGNO): Likewise.
11631 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11632 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11633 (aarch64_store_fpregset): Likewise.
11634
11635 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11636
11637 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11638 Remove FIXME comment about assumption about N.
11639
11640 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11641
11642 * configure.ac: If large-file support is disabled in GDBserver,
11643 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11644 * configure: Regenerate.
11645
11646 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11647
11648 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11649 warning upon ENODATA from ptrace.
11650 * linux-s390-low.c (s390_store_tdb): New.
11651 (s390_regsets): Add regset for NT_S390_TDB.
11652
11653 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11654
11655 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11656 without a fill_function.
11657 * linux-s390-low.c (s390_fill_last_break): Remove.
11658 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11659 (s390_arch_setup): Use regset's size instead of fill_function for
11660 loop end condition.
11661
11662 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11663
11664 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11665 the regset's store function when ptrace returned an error.
11666 * regcache.c (get_thread_regcache): Invalidate register cache
11667 before fetching inferior's registers.
11668
11669 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11670
11671 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11672 while-loop as for-loop.
11673 (regsets_store_inferior_registers): Likewise.
11674
11675 2014-11-28 Yao Qi <yao@codesourcery.com>
11676
11677 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11678 * config.in, configure: Re-generate.
11679 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11680 is defined.
11681
11682 2014-11-21 Yao Qi <yao@codesourcery.com>
11683
11684 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11685 (AC_CHECK_HEADERS): Remove malloc.h.
11686 * configure: Re-generated.
11687 * config.in: Re-generated.
11688 * server.h: Don't include alloca.h and malloc.h.
11689 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11690 Don't include malloc.h.
11691
11692 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11693
11694 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11695 corresponding ERRNO check in same block.
11696
11697 2014-11-12 Pedro Alves <palves@redhat.com>
11698
11699 * server.c (cont_thread): Update comment.
11700 (start_inferior, attach_inferior): No longer clear cont_thread.
11701 (handle_v_cont): No longer set cont_thread.
11702 (captured_main): Clear cont_thread each time a GDB connects.
11703
11704 2014-11-12 Pedro Alves <palves@redhat.com>
11705
11706 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11707 thread, and don't resume all threads if the Hc thread has exited.
11708
11709 2014-11-12 Pedro Alves <palves@redhat.com>
11710
11711 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11712 the process group instead of to a specific LWP.
11713
11714 2014-10-15 Pedro Alves <palves@redhat.com>
11715
11716 PR server/17487
11717 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11718 parameter.
11719 (arm_set_thread_context): Delete.
11720 (the_low_target): Adjust.
11721 * win32-i386-low.c (debug_registers_changed)
11722 (debug_registers_used): Delete.
11723 (update_debug_registers_callback): New function.
11724 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11725 needing to update their debug registers.
11726 (win32_get_current_dr): New function.
11727 (x86_dr_low_get_addr, x86_dr_low_get_control)
11728 (x86_dr_low_get_status): Fetch the debug register from the thread
11729 record's context.
11730 (i386_initial_stuff): Adjust.
11731 (i386_get_thread_context): Remove current_event parameter. Don't
11732 clear debug_registers_changed nor copy DR values to
11733 debug_reg_state.
11734 (i386_set_thread_context): Delete.
11735 (i386_prepare_to_resume): New function.
11736 (i386_thread_added): Mark the thread as needing to update irs
11737 debug registers.
11738 (the_low_target): Remove i386_set_thread_context and install
11739 i386_prepare_to_resume.
11740 * win32-low.c (win32_get_thread_context): Adjust.
11741 (win32_set_thread_context): Use SetThreadContext
11742 directly.
11743 (win32_prepare_to_resume): New function.
11744 (win32_require_context): New function, factored out from ...
11745 (thread_rec): ... this.
11746 (continue_one_thread): Call win32_prepare_to_resume on each thread
11747 we're about to continue.
11748 (win32_resume): Call win32_prepare_to_resume on the event thread.
11749 * win32-low.h (struct win32_thread_info)
11750 <debug_registers_changed>: New field.
11751 (struct win32_target_ops): Change prototype of set_thread_context,
11752 delete set_thread_context and add prepare_to_resume.
11753 (win32_require_context): New declaration.
11754
11755 2014-10-08 Gary Benson <gbenson@redhat.com>
11756
11757 * server.h: Do not include common-exceptions.h.
11758
11759 2014-10-08 Gary Benson <gbenson@redhat.com>
11760
11761 * server.h: Do not include cleanups.h.
11762
11763 2014-09-30 James Hogan <james.hogan@imgtec.com>
11764
11765 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11766 mips64-dsp-linux.c.
11767
11768 2014-09-23 Yao Qi <yao@codesourcery.com>
11769
11770 * linux-low.c (lp_status_maybe_breakpoint): New function.
11771 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11772 (count_events_callback): Likewise.
11773 (select_event_lwp_callback): Likewise.
11774 (cancel_breakpoints_callback): Likewise.
11775
11776 2014-09-19 Don Breazeal <donb@codesourcery.com>
11777
11778 * linux-low.c (handle_extended_wait): Call
11779 linux_ptrace_get_extended_event.
11780 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11781 linux_is_extended_waitstatus.
11782
11783 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11784
11785 * Makefile.in (CPPFLAGS): Define.
11786 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11787 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11788
11789 2014-09-16 Gary Benson <gbenson@redhat.com>
11790
11791 * inferiors.h (current_inferior): Renamed as...
11792 (current_thread): New variable. All uses updated.
11793 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11794 (maybe_move_out_of_jump_pad): Likewise.
11795 (cancel_breakpoint): Likewise.
11796 (linux_low_filter_event): Likewise.
11797 (wait_for_sigstop): Likewise.
11798 (linux_resume_one_lwp): Likewise.
11799 (need_step_over_p): Likewise.
11800 (start_step_over): Likewise.
11801 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11802 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11803 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11804 and save_inferior as saved_thread.
11805 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11806 saved_thread.
11807 (regcache_invalidate_thread): Likewise.
11808 * remote-utils.c (prepare_resume_reply): Likewise.
11809 * thread-db.c (thread_db_get_tls_address): Likewise.
11810 (disable_thread_event_reporting): Likewise.
11811 (remove_thread_event_breakpoints): Likewise.
11812 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11813 as saved_thread.
11814 * target.h (set_desired_inferior): Renamed as...
11815 (set_desired_thread): New declaration. All uses updated.
11816 * server.c (myresume): Updated comment to reference thread instead
11817 of inferior.
11818 (handle_serial_event): Likewise.
11819 (handle_target_event): Likewise.
11820
11821 2014-09-12 Tom Tromey <tromey@redhat.com>
11822 Gary Benson <gbenson@redhat.com>
11823
11824 * regcache.h: Include common-regcache.h.
11825 (regcache_read_pc): Don't declare.
11826 * regcache.c (get_thread_regcache_for_ptid): New function.
11827
11828 2014-09-11 Tom Tromey <tromey@redhat.com>
11829 Gary Benson <gbenson@redhat.com>
11830
11831 * symbol.c: New file.
11832 * Makefile.in (SFILES): Add symbol.c.
11833 (OBS): Add symbol.o.
11834
11835 2014-09-11 Gary Benson <gbenson@redhat.com>
11836
11837 * target.c (target_stop_ptid, target_continue_ptid): New
11838 functions.
11839
11840 2014-09-11 Tom Tromey <tromey@redhat.com>
11841 Gary Benson <gbenson@redhat.com>
11842
11843 * target.h: Include target/target.h.
11844 * target.c (target_read_memory, target_read_uint32)
11845 (target_write_memory): New functions.
11846
11847 2014-09-11 Gary Benson <gbenson@redhat.com>
11848
11849 * server.h (debug_hw_points): Don't declare.
11850 * server.c (debug_hw_points): Don't define. Replace all uses
11851 with show_debug_regs.
11852 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11853 all uses with show_debug_regs.
11854
11855 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11856
11857 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11858 endianness into account.
11859 (ppc_supply_ptrace_register): Likewise.
11860
11861 2014-09-03 James Hogan <james.hogan@imgtec.com>
11862
11863 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11864 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11865
11866 2014-09-03 Gary Benson <gbenson@redhat.com>
11867
11868 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11869 ALL_DEBUG_ADDRESS_REGISTERS.
11870
11871 2014-09-02 Gary Benson <gbenson@redhat.com>
11872
11873 * i386-low.h: Renamed as...
11874 * x86-low.h: New file. All type, function and variable name
11875 prefixes changed from "i386_" to "x86_". All references updated.
11876 * i386-low.c: Renamed as...
11877 * x86-low.c: New file. All type, function and variable name
11878 prefixes changed from "i386_" to "x86_". All references updated.
11879
11880 2014-09-02 Gary Benson <gbenson@redhat.com>
11881
11882 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11883 (x86_linux_new_thread): Likewise.
11884
11885 2014-08-29 Gary Benson <gbenson@redhat.com>
11886
11887 * server.h (setjmp.h): Do not include.
11888 (toplevel): Do not declare.
11889 (common-exceptions.h): Include.
11890 (cleanups.h): Likewise.
11891 * server.c (toplevel): Do not define.
11892 (exit_code): New static global.
11893 (detach_or_kill_for_exit_cleanup): New function.
11894 (main): New function. Original main renamed to...
11895 (captured_main): New function.
11896 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11897
11898 2014-08-29 Gary Benson <gbenson@redhat.com>
11899
11900 * Makefile.in (SFILES): Add common/common-exceptions.c.
11901 (OBS): Add common-exceptions.o.
11902 (common-exceptions.o): New rule.
11903 * utils.c (prepare_to_throw_exception): New function.
11904
11905 2014-08-29 Gary Benson <gbenson@redhat.com>
11906
11907 * config.in: Regenerate.
11908 * configure: Likewise.
11909
11910 2014-08-29 Gary Benson <gbenson@redhat.com>
11911
11912 * Makefile.in (SFILES): Add common/cleanups.c.
11913 (OBS): cleanups.o.
11914 (cleanups.o): New rule.
11915
11916 2014-08-29 Gary Benson <gbenson@redhat.com>
11917
11918 * utils.c (internal_vwarning): New function.
11919
11920 2014-08-28 Gary Benson <gbenson@redhat.com>
11921
11922 * utils.h (fatal): Remove declaration.
11923 * utils.c (fatal): Remove function.
11924
11925 2014-08-28 Gary Benson <gbenson@redhat.com>
11926
11927 * tracepoint.c (gdb_agent_init): Replace fatal with
11928 perror_with_name.
11929 (initialize_tracepoint): Likewise.
11930
11931 2014-08-28 Gary Benson <gbenson@redhat.com>
11932
11933 * remote-utils.c (remote_prepare): Replace fatal with error.
11934
11935 2014-08-28 Gary Benson <gbenson@redhat.com>
11936
11937 * linux-low.c (linux_async): Replace fatal with warning.
11938 Tidy up and return.
11939 (linux_start_non_stop): Return -1 if linux_async failed.
11940
11941 2014-08-28 Gary Benson <gbenson@redhat.com>
11942
11943 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11944 gdb_assert.
11945 (i386_dr_low_get_addr): Remove vague comment.
11946 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11947 gdb_assert.
11948
11949 2014-08-28 Gary Benson <gbenson@redhat.com>
11950
11951 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11952 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11953 internal_error.
11954 (linux_resume_one_lwp): Likewise.
11955 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11956 gdb_assert.
11957 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11958 with internal_error.
11959 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11960 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11961 (find_register_by_name): Replace fatal with internal_error.
11962 (find_regno): Likewise.
11963 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11964 * thread-db.c (thread_db_create_event): Likewise.
11965 (thread_db_load_search): Likewise.
11966 (try_thread_db_load_1): Likewise.
11967 * tracepoint.c (get_jump_space_head): Replace fatal with
11968 internal_error.
11969 (claim_trampoline_space): Likewise.
11970 (have_fast_tracepoint_trampoline_buffer): Likewise.
11971 (cmd_qtstart): Likewise.
11972 (stop_tracing): Likewise.
11973 (fast_tracepoint_collecting): Likewise.
11974 (target_malloc): Likewise.
11975 (download_tracepoint): Likewise.
11976 (download_trace_state_variables): Replace check with gdb_assert.
11977 (upload_fast_traceframes): Replace fatal with internal_error.
11978
11979 2014-08-19 Tom Tromey <tromey@redhat.com>
11980 Gary Benson <gbenson@redhat.com>
11981
11982 * Makefile.in (SFILES): Add common/common-debug.c.
11983 (OBS): Add common-debug.o.
11984 (common-debug.o): New rule.
11985 * debug.h (debug_printf): Don't declare.
11986 * debug.c (debug_printf): Renamed and rewritten as...
11987 (debug_vprintf): New function.
11988
11989 2014-08-19 Gary Benson <gbenson@redhat.com>
11990
11991 * utils.h: Do not include print-utils.h.
11992
11993 2014-08-19 Tom Tromey <tromey@redhat.com>
11994 Gary Benson <gbenson@redhat.com>
11995
11996 * server.h: Add static assertion.
11997 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
11998
11999 2014-08-19 Tom Tromey <tromey@redhat.com>
12000 Gary Benson <gbenson@redhat.com>
12001
12002 * Makefile.in (SFILES): Add common/errors.c.
12003 (OBS): Add errors.o.
12004 (IPA_OBS): Add errors-ipa.o.
12005 (errors.o): New rule.
12006 (errors-ipa.o): Likewise.
12007 * utils.h (perror_with_name, error, warning): Don't declare.
12008 * utils.c (warning): Renamed and rewritten as...
12009 (vwarning): New function.
12010 (error): Renamed and rewritten as...
12011 (verror): New function.
12012 (internal_error): Renamed and rewritten as...
12013 (internal_verror): New function.
12014
12015 2014-08-07 Gary Benson <gbenson@redhat.com>
12016
12017 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12018 * configure: Regenerate.
12019 * config.in: Likewise.
12020 * server.h: Do not include errno.h.
12021 * event-loop.c: Likewise.
12022 * hostio-errno.c: Likewise.
12023 * linux-low.c: Likewise.
12024 * remote-utils.c: Likewise.
12025 * spu-low.c: Likewise.
12026 * utils.c: Likewise.
12027 * gdbreplay.c: Unconditionally include errno.h.
12028
12029 2014-08-07 Gary Benson <gbenson@redhat.com>
12030
12031 * server.h: Do not include string.h.
12032 * event-loop.c: Likewise.
12033 * linux-low.c: Likewise.
12034 * regcache.c: Likewise.
12035 * remote-utils.c: Likewise.
12036 * spu-low.c: Likewise.
12037 * utils.c: Likewise.
12038
12039 2014-08-07 Gary Benson <gbenson@redhat.com>
12040
12041 * server.h: Do not include gdb_assert.h.
12042
12043 2014-08-07 Gary Benson <gbenson@redhat.com>
12044
12045 * server.h: Do not include common-utils.h.
12046
12047 2014-08-07 Gary Benson <gbenson@redhat.com>
12048
12049 * server.h: Do not include ptid.h.
12050 * notif.h: Likewise.
12051
12052 2014-08-07 Gary Benson <gbenson@redhat.com>
12053
12054 * server.h: Do not include gdb_locale.h.
12055
12056 2014-08-07 Gary Benson <gbenson@redhat.com>
12057
12058 * server.h: Do not include gdb/signals.h.
12059 * win32-low.c: Likewise.
12060
12061 2014-08-07 Gary Benson <gbenson@redhat.com>
12062
12063 * server.h: Do not include pathmax.h.
12064
12065 2014-08-07 Gary Benson <gbenson@redhat.com>
12066
12067 * server.h: Do not include libiberty.h.
12068 * linux-bfin-low.c: Likewise.
12069
12070 2014-08-07 Gary Benson <gbenson@redhat.com>
12071
12072 * server.h: Do not include ansidecl.h.
12073
12074 2014-08-07 Gary Benson <gbenson@redhat.com>
12075
12076 * linux-x86-low.c: Do not include stddef.h.
12077 * lynx-ppc-low.c: Likewise.
12078 * tracepoint.c: Likewise.
12079
12080 2014-08-07 Gary Benson <gbenson@redhat.com>
12081
12082 * server.h: Do not include stdarg.h.
12083 * nto-low.c: Likewise.
12084
12085 2014-08-07 Gary Benson <gbenson@redhat.com>
12086
12087 * server.h: Do not include stdlib.h.
12088 * inferiors.c: Likewise.
12089 * linux-low.c: Likewise.
12090 * regcache.c: Likewise.
12091 * spu-low.c: Likewise.
12092 * tracepoint.c: Likewise.
12093 * utils.c: Likewise.
12094
12095 2014-08-07 Gary Benson <gbenson@redhat.com>
12096
12097 * server.h: Do not include stdio.h.
12098 * linux-low.c: Likewise.
12099 * remote-utils.c: Likewise.
12100 * spu-low.c: Likewise.
12101 * utils.c: Likewise.
12102 * wincecompat.c: Likewise.
12103
12104 2014-08-06 Gary Benson <gbenson@redhat.com>
12105
12106 * regcache.c (init_register_cache): Move conditionals inside if.
12107
12108 2014-08-06 Gary Benson <gbenson@redhat.com>
12109
12110 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12111
12112 2014-07-31 Gary Benson <gbenson@redhat.com>
12113
12114 * ax.h: Do not include server.h.
12115 * gdbthread.h: Likewise.
12116 * lynx-low.h: Likewise.
12117 * notif.h: Likewise.
12118
12119 2014-07-30 Gary Benson <gbenson@redhat.com>
12120
12121 * server.h: Include common-defs.h.
12122 Do not include config.h or build-gnulib-gdbserver/config.h.
12123
12124 2014-07-30 Gary Benson <gbenson@redhat.com>
12125
12126 * hostio-errno.c: Move server.h to top of includes list.
12127 * inferiors.c: Likewise.
12128 * linux-x86-low.c: Likewise.
12129 * notif.c: Include server.h.
12130
12131 2014-07-24 Tom Tromey <tromey@redhat.com>
12132 Gary Benson <gbenson@redhat.com>
12133
12134 * server.h (CORE_ADDR): Now unsigned.
12135
12136 2014-07-16 Pedro Alves <palves@redhat.com>
12137
12138 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12139
12140 2014-07-15 Pedro Alves <palves@redhat.com>
12141
12142 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12143 copy.
12144
12145 2014-07-11 Pedro Alves <palves@redhat.com>
12146
12147 * linux-low.c (kill_wait_lwp): New function, based on
12148 kill_one_lwp_callback, but use my_waitpid directly.
12149 (kill_one_lwp_callback, linux_kill): Use it.
12150
12151 2014-06-23 Pedro Alves <palves@redhat.com>
12152
12153 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12154 before setting DR0..DR3.
12155
12156 2014-06-20 Gary Benson <gbenson@redhat.com>
12157
12158 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12159 * configure: Regenerated.
12160 * config.in: Likewise.
12161
12162 2014-06-20 Gary Benson <gbenson@redhat.com>
12163
12164 * Makefile.in (SFILES): Update locations for files moved
12165 from common to nat.
12166 (object file files): Reordered.
12167
12168 2014-06-20 Gary Benson <gbenson@redhat.com>
12169
12170 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12171 (i386_dr_low_set_addr): Likewise.
12172 (i386_dr_low_get_addr): Likewise.
12173 (i386_dr_low_can_set_control): Likewise.
12174 (i386_dr_low_set_control): Likewise.
12175 (i386_dr_low_get_control): Likewise.
12176 (i386_dr_low_get_status): Likewise.
12177 (i386_get_debug_register_length): Likewise.
12178 * linux-x86-low.c (i386_dr_low_set_addr):
12179 Changed signature. Made static.
12180 (i386_dr_low_get_addr): Likewise.
12181 (i386_dr_low_set_control): Likewise.
12182 (i386_dr_low_get_control): Likewise.
12183 (i386_dr_low_get_status): Likewise.
12184 (i386_dr_low): New global variable.
12185 * win32-i386-low.c (i386_dr_low_set_addr):
12186 Changed signature. Made static.
12187 (i386_dr_low_get_addr): Likewise.
12188 (i386_dr_low_set_control): Likewise.
12189 (i386_dr_low_get_control): Likewise.
12190 (i386_dr_low_get_status): Likewise.
12191 (i386_dr_low): New global variable.
12192
12193 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12194
12195 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12196 * Makefile.in (AR, AR_FLAGS): Define.
12197 * configure: Regenerate.
12198
12199 2014-06-19 Gary Benson <gbenson@redhat.com>
12200
12201 * Makefile.in (i386-dregs.o): New rule.
12202 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12203 * i386-low.c (target.h): Remove include.
12204 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12205 (DR_CONTROL_SHIFT): Likewise.
12206 (DR_CONTROL_SIZE): Likewise.
12207 (DR_RW_EXECUTE): Likewise.
12208 (DR_RW_WRITE): Likewise.
12209 (DR_RW_READ): Likewise.
12210 (DR_RW_IORW): Likewise.
12211 (DR_LEN_1): Likewise.
12212 (DR_LEN_2): Likewise.
12213 (DR_LEN_4): Likewise.
12214 (DR_LEN_8): Likewise.
12215 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12216 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12217 (DR_ENABLE_SIZE): Likewise.
12218 (DR_LOCAL_SLOWDOWN): Likewise.
12219 (DR_GLOBAL_SLOWDOWN): Likewise.
12220 (DR_CONTROL_RESERVED): Likewise.
12221 (I386_DR_CONTROL_MASK): Likewise.
12222 (I386_DR_VACANT): Likewise.
12223 (I386_DR_LOCAL_ENABLE): Likewise.
12224 (I386_DR_GLOBAL_ENABLE): Likewise.
12225 (I386_DR_DISABLE): Likewise.
12226 (I386_DR_SET_RW_LEN): Likewise.
12227 (I386_DR_GET_RW_LEN): Likewise.
12228 (I386_DR_WATCH_HIT): Likewise.
12229 (i386_wp_op_t): Likewise.
12230 (i386_show_dr): Likewise.
12231 (i386_length_and_rw_bits): Likewise.
12232 (i386_insert_aligned_watchpoint): Likewise.
12233 (i386_remove_aligned_watchpoint): Likewise.
12234 (i386_handle_nonaligned_watchpoint): Likewise.
12235 i386_update_inferior_debug_regs(): Likewise.
12236 (i386_dr_insert_watchpoint): Likewise.
12237 (i386_dr_remove_watchpoint): Likewise.
12238 (i386_dr_region_ok_for_watchpoint): Likewise.
12239 (i386_dr_stopped_data_address): Likewise.
12240 (i386_dr_stopped_by_watchpoint): Likewise.
12241
12242 2014-06-19 Gary Benson <gbenson@redhat.com>
12243
12244 * i386-low.c (i386_dr_show): Renamed to
12245 i386_show_dr and made static. All uses updated.
12246 (i386_dr_length_and_rw_bits): Renamed to
12247 i386_length_and_rw_bits and made static.
12248 All uses updated.
12249 (i386_dr_insert_aligned_watchpoint): Renamed to
12250 i386_insert_aligned_watchpoint and made static.
12251 All uses updated.
12252 (i386_dr_remove_aligned_watchpoint): Renamed to
12253 i386_remove_aligned_watchpoint and made static.
12254 All uses updated.
12255 (i386_dr_update_inferior_debug_regs): Renamed to
12256 i386_update_inferior_debug_regs and made static.
12257 All uses updated.
12258
12259 2014-06-18 Gary Benson <gbenson@redhat.com>
12260
12261 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12262 (i386_dr_low_can_set_control): Likewise.
12263 (i386_get_debug_register_length): Likewise.
12264 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12265 (i386_dr_low_can_set_control): Likewise.
12266 (i386_get_debug_register_length): Likewise.
12267
12268 2014-06-17 Gary Benson <gbenson@redhat.com>
12269
12270 * i386-low.h (i386-dregs.h): New include.
12271 (DR_FIRSTADDR): Now in i386-dregs.h.
12272 (DR_LASTADDR): Likewise.
12273 (DR_NADDR): Likewise.
12274 (DR_STATUS): Likewise.
12275 (DR_CONTROL): Likewise.
12276 (i386_debug_reg_state): Likewise.
12277 (i386_dr_insert_watchpoint): Likewise.
12278 (i386_dr_remove_watchpoint): Likewise.
12279 (i386_dr_region_ok_for_watchpoint): Likewise.
12280 (i386_dr_stopped_data_address): Likewise.
12281 (i386_dr_stopped_by_watchpoint): Likewise.
12282 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12283
12284 2014-06-18 Gary Benson <gbenson@redhat.com>
12285
12286 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12287 i386_dr_insert_watchpoint.
12288 (i386_low_remove_watchpoint): Renamed to
12289 i386_dr_remove_watchpoint.
12290 (i386_low_region_ok_for_watchpoint): Renamed to
12291 i386_dr_region_ok_for_watchpoint.
12292 (i386_low_stopped_data_address): Renamed to
12293 i386_dr_stopped_data_address.
12294 (i386_low_stopped_by_watchpoint): Renamed to
12295 i386_dr_stopped_by_watchpoint.
12296 * i386-low.c (i386_show_dr): Renamed to
12297 i386_dr_show and made nonstatic. All uses updated.
12298 (i386_length_and_rw_bits): Renamed to
12299 i386_dr_length_and_rw_bits and made nonstatic.
12300 All uses updated.
12301 (i386_insert_aligned_watchpoint): Renamed to
12302 i386_dr_insert_aligned_watchpoint and made nonstatic.
12303 All uses updated.
12304 (i386_remove_aligned_watchpoint): Renamed to
12305 i386_dr_remove_aligned_watchpoint and made nonstatic.
12306 All uses updated.
12307 (i386_update_inferior_debug_regs): Renamed to
12308 i386_dr_update_inferior_debug_regs and made nonstatic.
12309 All uses updated.
12310 (i386_low_insert_watchpoint): Renamed to
12311 i386_dr_insert_watchpoint. All uses updated.
12312 (i386_low_remove_watchpoint): Renamed to
12313 i386_dr_remove_watchpoint. All uses updated.
12314 (i386_low_region_ok_for_watchpoint): Renamed to
12315 i386_dr_region_ok_for_watchpoint. All uses updated.
12316 (i386_low_stopped_data_address): Renamed to
12317 i386_dr_stopped_data_address. All uses updated.
12318 (i386_low_stopped_by_watchpoint): Renamed to
12319 i386_dr_stopped_by_watchpoint. All uses updated.
12320
12321 2014-06-18 Gary Benson <gbenson@redhat.com>
12322
12323 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12324 (i386_dr_low_can_set_control): Likewise.
12325 (i386_insert_aligned_watchpoint): New check.
12326
12327 2014-06-18 Gary Benson <gbenson@redhat.com>
12328
12329 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12330 Renamed to state.
12331
12332 2014-06-18 Gary Benson <gbenson@redhat.com>
12333
12334 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12335 instead of fatal and error.
12336 (i386_handle_nonaligned_watchpoint): Likewise.
12337
12338 2014-06-18 Gary Benson <gbenson@redhat.com>
12339
12340 * i386-low.c (i386_get_debug_register_length): New macro.
12341 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12342 (i386_show_dr): Use debug_printf instead of fprintf. Use
12343 phex to format values.
12344
12345 2014-06-18 Gary Benson <gbenson@redhat.com>
12346
12347 * i386-low.h: Comment changes.
12348 * i386-low.c: Likewise.
12349
12350 2014-06-18 Gary Benson <gbenson@redhat.com>
12351
12352 * i386-low.c: Whitespace changes.
12353
12354 2014-06-12 Tom Tromey <tromey@redhat.com>
12355
12356 * utils.c (freeargv): Remove.
12357
12358 2014-06-12 Tom Tromey <tromey@redhat.com>
12359
12360 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12361 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12362 (parse_debug_format_options): Likewise.
12363 (gdbserver_usage): Likewise.
12364 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12365 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12366 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12367 against libiberty.
12368 ($(LIBGNU)): Depend on libiberty.
12369 (all-lib): Recurse into all subdirs.
12370 (install-only): Invoke "install" target in subdirs.
12371 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12372 targets.
12373 * configure: Rebuild.
12374 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12375 for vasprintf, vsnprintf, or gettimeofday.
12376 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12377 srv_tgtobj.
12378
12379 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12380
12381 * development.sh: Delete.
12382 * Makefile.in (config.status): Adjust dependency on development.sh.
12383 * configure.ac: Adjust development.sh source call.
12384 * configure: Regenerate.
12385
12386 2014-06-02 Pedro Alves <palves@redhat.com>
12387
12388 * ax.c (gdb_free_agent_expr): New function.
12389 * ax.h (gdb_free_agent_expr): New declaration.
12390 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12391 list.
12392 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12393 static.
12394 (clear_breakpoint_conditions_and_commands): New function.
12395 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12396 (clear_breakpoint_conditions_and_commands): New declaration.
12397
12398 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12399
12400 * linux-aarch64-low.c (asm/ptrace.h): Include.
12401
12402 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12403
12404 Fix TLS access for -static -pthread.
12405 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12406 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12407 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12408
12409 2014-05-20 Pedro Alves <palves@redhat.com>
12410
12411 * linux-aarch64-low.c (aarch64_insert_point)
12412 (aarch64_remove_point): No longer check whether the type is
12413 supported here. Adjust to new interface.
12414 (the_low_target): Install aarch64_supports_z_point_type as
12415 supports_z_point_type method.
12416 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12417 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12418 instead of a Z packet char. Adjust.
12419 (arm_supports_z_point_type): New function.
12420 (arm_insert_point, arm_remove_point): Adjust to new interface.
12421 (the_low_target): Install arm_supports_z_point_type.
12422 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12423 (cris_insert_point, cris_remove_point): Adjust to new interface.
12424 Don't check whether the type is supported here.
12425 (the_low_target): Install cris_supports_z_point_type.
12426 * linux-low.c (linux_supports_z_point_type): New function.
12427 (linux_insert_point, linux_remove_point): Adjust to new interface.
12428 * linux-low.h (struct linux_target_ops) <insert_point,
12429 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12430 raw_breakpoint pointer parameter.
12431 <supports_z_point_type>: New method.
12432 * linux-mips-low.c (mips_supports_z_point_type): New function.
12433 (mips_insert_point, mips_remove_point): Adjust to new interface.
12434 Use mips_supports_z_point_type.
12435 (the_low_target): Install mips_supports_z_point_type.
12436 * linux-ppc-low.c (the_low_target): Install NULL as
12437 supports_z_point_type method.
12438 * linux-s390-low.c (the_low_target): Install NULL as
12439 supports_z_point_type method.
12440 * linux-sparc-low.c (the_low_target): Install NULL as
12441 supports_z_point_type method.
12442 * linux-x86-low.c (x86_supports_z_point_type): New function.
12443 (x86_insert_point): Adjust to new insert_point interface. Use
12444 insert_memory_breakpoint. Adjust to new
12445 i386_low_insert_watchpoint interface.
12446 (x86_remove_point): Adjust to remove_point interface. Use
12447 remove_memory_breakpoint. Adjust to new
12448 i386_low_remove_watchpoint interface.
12449 (the_low_target): Install x86_supports_z_point_type.
12450 * lynx-low.c (lynx_target_ops): Install NULL as
12451 supports_z_point_type callback.
12452 * nto-low.c (nto_supports_z_point_type): New.
12453 (nto_insert_point, nto_remove_point): Adjust to new interface.
12454 (nto_target_ops): Install nto_supports_z_point_type.
12455 * mem-break.c: Adjust intro comment.
12456 (struct raw_breakpoint) <raw_type, size>: New fields.
12457 <inserted>: Update comment.
12458 <shlib_disabled>: Delete field.
12459 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12460 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12461 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12462 (raw_bkpt_type_to_target_hw_bp_type): New function.
12463 (find_enabled_raw_code_breakpoint_at): New function.
12464 (find_raw_breakpoint_at): New type and size parameters. Use them.
12465 (insert_memory_breakpoint): New function, based off
12466 set_raw_breakpoint_at.
12467 (remove_memory_breakpoint): New function.
12468 (set_raw_breakpoint_at): Reimplement.
12469 (set_breakpoint): New, based on set_breakpoint_at.
12470 (set_breakpoint_at): Reimplement.
12471 (delete_raw_breakpoint): Go through the_target->remove_point
12472 instead of assuming memory breakpoints.
12473 (find_gdb_breakpoint_at): Delete.
12474 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12475 (find_gdb_breakpoint): New function.
12476 (set_gdb_breakpoint_at): Delete.
12477 (z_type_supported): New function.
12478 (set_gdb_breakpoint_1): New function, loosely based off
12479 set_gdb_breakpoint_at.
12480 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12481 (delete_gdb_breakpoint_at): Delete.
12482 (delete_gdb_breakpoint_1): New function, loosely based off
12483 delete_gdb_breakpoint_at.
12484 (delete_gdb_breakpoint): New function.
12485 (clear_gdb_breakpoint_conditions): Rename to ...
12486 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12487 breakpoint.
12488 (add_condition_to_breakpoint): Make static.
12489 (add_breakpoint_condition): Take a struct breakpoint pointer
12490 instead of an address. Adjust.
12491 (gdb_condition_true_at_breakpoint): Rename to ...
12492 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12493 z_type parameter.
12494 (gdb_condition_true_at_breakpoint): Reimplement.
12495 (add_breakpoint_commands): Take a struct breakpoint pointer
12496 instead of an address. Adjust.
12497 (gdb_no_commands_at_breakpoint): Rename to ...
12498 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12499 parameter. Return true if no breakpoint was found. Change debug
12500 output.
12501 (gdb_no_commands_at_breakpoint): Reimplement.
12502 (run_breakpoint_commands): Rename to ...
12503 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12504 and change return type to boolean.
12505 (run_breakpoint_commands): New function.
12506 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12507 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12508 breakpoint. Go through the_target->remove_point instead of
12509 assuming memory breakpoint.
12510 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12511 software and hardware breakpoints.
12512 (reinsert_raw_breakpoint): Go through the_target->insert_point
12513 instead of assuming memory breakpoint.
12514 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12515 software and hardware breakpoints.
12516 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12517 Check both software and hardware breakpoints.
12518 (validate_inserted_breakpoint): Assert the breakpoint is a
12519 software breakpoint. Set the inserted flag to -1 instead of
12520 setting shlib_disabled.
12521 (delete_disabled_breakpoints): Adjust.
12522 (validate_breakpoints): Only validate software breakpoints.
12523 Adjust to inserted flag change.
12524 (check_mem_read, check_mem_write): Skip breakpoint types other
12525 than software breakpoints. Adjust to inserted flag change.
12526 * mem-break.h (enum raw_bkpt_type): New enum.
12527 (raw_breakpoint, struct process_info): Forward declare.
12528 (Z_packet_to_target_hw_bp_type): Delete declaration.
12529 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12530 (set_gdb_breakpoint, delete_gdb_breakpoint)
12531 (clear_breakpoint_conditions): New declarations.
12532 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12533 (breakpoint_inserted_here): Update comment.
12534 (add_breakpoint_condition, add_breakpoint_commands): Replace
12535 address parameter with a breakpoint pointer parameter.
12536 (gdb_breakpoint_here): Update comment.
12537 (delete_gdb_breakpoint_at): Delete.
12538 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12539 * server.c (process_point_options): Take a struct breakpoint
12540 pointer instead of an address. Adjust.
12541 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12542 delete_gdb_breakpoint.
12543 * spu-low.c (spu_target_ops): Install NULL as
12544 supports_z_point_type method.
12545 * target.h: Include mem-break.h.
12546 (struct target_ops) <prepare_to_access_memory>: Update comment.
12547 <supports_z_point_type>: New field.
12548 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12549 instead of a char. Also take a raw breakpoint pointer.
12550 * win32-arm-low.c (the_low_target): Install NULL as
12551 supports_z_point_type.
12552 * win32-i386-low.c (i386_supports_z_point_type): New function.
12553 (i386_insert_point, i386_remove_point): Adjust to new interface.
12554 (the_low_target): Install i386_supports_z_point_type.
12555 * win32-low.c (win32_supports_z_point_type): New function.
12556 (win32_insert_point, win32_remove_point): Adjust to new interface.
12557 (win32_target_ops): Install win32_supports_z_point_type.
12558 * win32-low.h (struct win32_target_ops):
12559 <supports_z_point_type>: New method.
12560 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12561 instead of a char. Also take a raw breakpoint pointer.
12562
12563 2014-05-20 Pedro Alves <palves@redhat.com>
12564
12565 * mem-break.h: Include break-common.h.
12566 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12567 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12568 (Z_packet_to_target_hw_bp_type): New declaration.
12569 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12570 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12571 (Z_PACKET_ACCESS_WP): Delete macros.
12572 (Z_packet_to_hw_type): Delete function.
12573 * i386-low.h: Don't include break-common.h here.
12574 (Z_packet_to_hw_type): Delete declaration.
12575 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12576 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12577 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12578 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12579 * linux-aarch64-low.c: Don't include break-common.h here.
12580 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12581 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12582 (Z_packet_to_target_hw_bp_type): Delete function.
12583 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12584 function.
12585 (mips_insert_point, mips_remove_point): Use
12586 Z_packet_to_target_hw_bp_type.
12587
12588 2014-05-20 Pedro Alves <palves@redhat.com>
12589
12590 * linux-aarch64-low.c: Include break-common.h.
12591 (enum target_point_type): Delete.
12592 (Z_packet_to_point_type): Rename to ...
12593 (Z_packet_to_target_hw_bp_type): ... this, and return a
12594 target_hw_bp_type instead.
12595 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12596 instead of an enum target_point_type.
12597 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12598 breakpoint type.
12599 (aarch64_dr_state_insert_one_point)
12600 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12601 (aarch64_handle_aligned_watchpoint)
12602 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12603 Take an enum target_hw_bp_type instead of an enum
12604 target_point_type.
12605 (aarch64_supports_z_point_type): New function.
12606 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12607 use Z_packet_to_target_hw_bp_type.
12608
12609 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12610
12611 * configure.ac: Only use -Werror by default when DEVELOPMENT
12612 is true.
12613 * configure: Regenerate.
12614
12615 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12616
12617 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12618 * linux-x86-low.c (X86_64_USER_REGS): New.
12619 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12620
12621 2014-04-28 Yao Qi <yao@codesourcery.com>
12622
12623 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12624 name.
12625
12626 2014-04-25 Pedro Alves <palves@redhat.com>
12627
12628 PR server/16255
12629 * linux-low.c (linux_attach_fail_reason_string): New function.
12630 (linux_attach_lwp): Delete.
12631 (linux_attach_lwp_1): Rename to ...
12632 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12633 argument. Remove "initial" parameter. Return int instead of
12634 void. Don't error or warn here.
12635 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12636 failure to attach to the tgid. Call warning when failing to
12637 attach to an lwp.
12638 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12639 argument. Remove "initial" parameter. Return int instead of
12640 void. Don't error or warn here.
12641 (linux_attach_fail_reason_string): New declaration.
12642 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12643 interface change. Use linux_attach_fail_reason_string.
12644
12645 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12646 Walfred Tedeschi <walfred.tedeschi@intel.com>
12647
12648 * Makefile.in: Added rules to handle new files
12649 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12650 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12651 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12652 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12653 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12654 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12655 x32-avx512-linux.o.
12656 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12657 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12658 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12659 i386/x32-avx512.xml.
12660 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12661 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12662 i386/x32-avx512-linux.xml.
12663 * i387-fp.c (num_avx512_k_registers): New constant for number
12664 of K registers.
12665 (num_avx512_zmmh_low_registers): New constant for number of
12666 lower ZMM registers (0-15).
12667 (num_avx512_zmmh_high_registers): New constant for number of
12668 higher ZMM registers (16-31).
12669 (num_avx512_ymmh_registers): New contant for number of higher
12670 YMM registers (ymm16-31 added by avx521 on x86_64).
12671 (num_avx512_xmm_registers): New constant for number of higher
12672 XMM registers (xmm16-31 added by AVX512 on x86_64).
12673 (struct i387_xsave): Add space for AVX512 registers.
12674 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12675 Add code to handle AVX512 registers.
12676 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12677 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12678 prototypei from generated file.
12679 (tdesc_amd64_avx512_linux): Likewise.
12680 (init_registers_x32_avx512_linux): Likewise.
12681 (tdesc_x32_avx512_linux): Likewise.
12682 (init_registers_i386_avx512_linux): Likewise.
12683 (tdesc_i386_avx512_linux): Likewise.
12684 (x86_64_regmap): Add AVX512 registers.
12685 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12686 mask.
12687 (initialize_low_arch): Add code to initialize AVX512 registers.
12688
12689 2014-04-23 Pedro Alves <palves@redhat.com>
12690
12691 * mem-break.c (find_gdb_breakpoint_at): Make static.
12692 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12693
12694 2014-04-23 Pedro Alves <palves@redhat.com>
12695
12696 * i386-low.c: Don't include break-common.h here.
12697 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12698 prototype to take target_hw_bp_type as argument instead of a Z
12699 packet char.
12700 * i386-low.h: Include break-common.h here.
12701 (Z_packet_to_hw_type): Declare.
12702 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12703 prototypes.
12704 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12705 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12706 (x86_remove_point): Convert the packet number to a
12707 target_hw_bp_type before calling i386_low_remove_watchpoint.
12708 * win32-i386-low.c (i386_insert_point): Convert the packet number
12709 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12710 (i386_remove_point): Convert the packet number to a
12711 target_hw_bp_type before calling i386_low_remove_watchpoint.
12712
12713 2014-04-23 Pedro Alves <palves@redhat.com>
12714
12715 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12716
12717 2014-04-10 Pedro Alves <palves@redhat.com>
12718
12719 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12720 Check if the condition or command is NULL before checking if the
12721 breakpoint is known. On success, return true.
12722 * mem-break.h (add_breakpoint_condition): Document return.
12723 (add_breakpoint_commands): Add describing comment.
12724 * server.c (skip_to_semicolon): New function.
12725 (process_point_options): Use it.
12726
12727 2014-04-09 Pedro Alves <palves@redhat.com>
12728
12729 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12730 to lwpid_of.
12731
12732 2014-02-27 Pedro Alves <palves@redhat.com>
12733
12734 PR 12702
12735 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12736 macros.
12737 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12738 output.
12739 (last_thread_of_process_p): Take a PID argument instead of a
12740 thread pointer.
12741 (linux_wait_for_lwp): Delete.
12742 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12743 functions.
12744 (linux_low_filter_event): New function, party factored out from
12745 linux_wait_for_event.
12746 (linux_wait_for_event): Rename to ...
12747 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12748 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12749 sigsuspend. Check for zombie leaders.
12750 (linux_wait_for_event): Reimplement as wrapper around
12751 linux_wait_for_event_filtered.
12752 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12753 a normal or signal exit is seen, it's the whole process exiting.
12754 (wait_for_sigstop): No longer a for_each_inferior callback.
12755 Rewrite on top of linux_wait_for_event_filtered.
12756 (stop_all_lwps): Call wait_for_sigstop directly.
12757 * server.c (resume, handle_target_event): Handle
12758 TARGET_WAITKIND_NO_RESUMED.
12759
12760 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12761
12762 * win32-low.c (psapi_get_dll_name,
12763 * win32_CreateToolhelp32Snapshot): Delete.
12764 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12765 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12766 Delete.
12767 (handle_load_dll): Add function description.
12768 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12769
12770 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12771
12772 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12773 Add comment.
12774 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12775 base address when calling win32_add_one_solib.
12776 (handle_load_dll): Delete local variable load_addr.
12777 Remove 0x1000 offset applied to DLL base address when calling
12778 win32_add_one_solib.
12779 (handle_unload_dll): Add comment.
12780
12781 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12782
12783 * win32-low.c (win32_add_all_dlls): Renames
12784 win32_ensure_ntdll_loaded. Rewrite function documentation.
12785 Adjust implementation to always load all DLLs.
12786 Add 0x1000 offset to DLL base address when calling
12787 win32_add_one_solib.
12788 (child_initialization_done): New static global.
12789 (do_initial_child_stuff): Set child_initialization_done to
12790 zero during child initialization, and 1 after. Replace call
12791 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12792 Add comment.
12793 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12794 (handle_unload_dll): Add function documentation.
12795 (get_child_debug_event): Ignore load and unload DLL events
12796 during child initialization.
12797
12798 2014-02-20 Doug Evans <dje@google.com>
12799
12800 Remove global all_lwps.
12801 * inferiors.h (ptid_of): Move here from linux-low.h.
12802 (pid_of, lwpid_of): Ditto.
12803 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12804 parameter is a struct thread_info * now.
12805 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12806 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12807 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12808 directly.
12809 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12810 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12811 * linux-arm-low.c (update_registers_callback): Update, "entry"
12812 parameter is a struct thread_info * now.
12813 Fetch lwpid from current_inferior directly.
12814 (arm_insert_point): Pass &all_threads to find_inferior instead of
12815 &all_lwps.
12816 (arm_remove_point): Ditto.
12817 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12818 (arm_prepare_to_resume): Fetch pid from thread.
12819 (arm_read_description): Fetch lwpid from current_inferior directly.
12820 * linux-low.c (all_lwps): Delete.
12821 (delete_lwp): Delete call to remove_inferior.
12822 (handle_extended_wait): Fetch lwpid from thread.
12823 (add_lwp): Don't set lwp->entry.id. Remove call to
12824 add_inferior_to_list.
12825 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12826 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12827 (kill_one_lwp_callback): Ditto.
12828 (linux_kill): Don't dereference NULL pointer.
12829 Fetch ptid,lwpid from thread.
12830 (get_detach_signal): Fetch ptid from thread.
12831 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12832 Simplify call to regcache_invalidate_thread.
12833 (delete_lwp_callback): Update, "entry" parameter is a
12834 struct thread_info * now. Fetch pid from thread.
12835 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12836 (status_pending_p_callback): Update, "entry" parameter is a
12837 struct thread_info * now. Fetch ptid from thread.
12838 (find_lwp_pid): Update, "entry" parameter is a
12839 struct thread_info * now.
12840 (linux_wait_for_lwp): Fetch pid from thread.
12841 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12842 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12843 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12844 (dequeue_one_deferred_signal): Ditto.
12845 (cancel_breakpoint): Fetch ptid from current_inferior.
12846 (linux_wait_for_event): Pass &all_threads to find_inferior,
12847 not &all_lwps. Fetch ptid, lwpid from thread.
12848 (count_events_callback): Update, "entry" parameter is a
12849 struct thread_info * now.
12850 (select_singlestep_lwp_callback): Ditto.
12851 (select_event_lwp_callback): Ditto.
12852 (cancel_breakpoints_callback): Ditto.
12853 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12854 not &all_lwps.
12855 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12856 (unsuspend_one_lwp): Update, "entry" parameter is a
12857 struct thread_info * now.
12858 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12859 not &all_lwps.
12860 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12861 Fetch lwpid from thread, not lwp.
12862 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12863 Pass &all_threads to find_inferior, not &all_lwps.
12864 (send_sigstop): Fetch lwpid from thread, not lwp.
12865 (send_sigstop_callback): Update, "entry" parameter is a
12866 struct thread_info * now.
12867 (suspend_and_send_sigstop_callback): Ditto.
12868 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12869 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12870 struct thread_info * now.
12871 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12872 from thread, lwp.
12873 (lwp_running): Update, "entry" parameter is a
12874 struct thread_info * now.
12875 (stop_all_lwps): Fetch ptid from thread.
12876 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12877 (linux_resume_one_lwp): Fetch lwpid from thread.
12878 (linux_set_resume_request): Update, "entry" parameter is a
12879 struct thread_info * now. Fetch pid, lwpid from thread.
12880 (resume_status_pending_p): Update, "entry" parameter is a
12881 struct thread_info * now.
12882 (need_step_over_p): Ditto. Fetch lwpid from thread.
12883 (start_step_over): Fetch lwpid from thread.
12884 (linux_resume_one_thread): Update, "entry" parameter is a
12885 struct thread_info * now. Fetch lwpid from thread.
12886 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12887 (proceed_one_lwp): Update, "entry" parameter is a
12888 struct thread_info * now. Fetch lwpid from thread.
12889 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12890 struct thread_info * now.
12891 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12892 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12893 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12894 directly.
12895 (regsets_store_inferior_registers): Ditto.
12896 (fetch_register, store_register): Ditto.
12897 (linux_read_memory, linux_write_memory): Ditto.
12898 (linux_request_interrupt): Ditto.
12899 (linux_read_auxv): Ditto.
12900 (linux_xfer_siginfo): Ditto.
12901 (linux_qxfer_spu): Ditto.
12902 (linux_qxfer_libraries_svr4): Ditto.
12903 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12904 moved to inferiors.h.
12905 (get_lwp): Delete.
12906 (get_thread_lwp): Update.
12907 (struct lwp_info): Delete member "entry". Simplify comment for
12908 member "thread".
12909 (all_lwps): Delete.
12910 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12911 current_inferior directly.
12912 (update_watch_registers_callback): Update, "entry" parameter is a
12913 struct thread_info * now. Fetch pid from thread.
12914 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12915 (mips_insert_point): Fetch lwpid from current_inferior.
12916 Pass &all_threads to find_inferior, not &all_lwps.
12917 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12918 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12919 directly.
12920 (mips_stopped_data_address): Ditto.
12921 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12922 directly.
12923 * linux-tile-low.c (tile_arch_setup): Ditto.
12924 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12925 (update_debug_registers_callback): Update, "entry" parameter is a
12926 struct thread_info * now. Fetch pid from thread.
12927 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12928 Pass &all_threads to find_inferior, not &all_lwps.
12929 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12930 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12931 Pass &all_threads to find_inferior, not &all_lwps.
12932 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12933 (i386_dr_low_get_status): Ditto.
12934 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12935 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12936 (x86_linux_read_description): Ditto.
12937 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12938
12939 2014-02-20 Doug Evans <dje@google.com>
12940
12941 * inferiors.c (get_first_inferior): Fix buglet.
12942
12943 2014-02-19 Doug Evans <dje@google.com>
12944
12945 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12946 * inferiors.c (add_thread): Change result type to struct thread_info *.
12947 All callers updated.
12948 (add_lwp): Call add_thread here instead of in callers.
12949 All callers updated.
12950 * linux-low.h (get_lwp_thread): Rewrite.
12951 (struct lwp_info): New member "thread".
12952
12953 2014-02-19 Doug Evans <dje@google.com>
12954
12955 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12956 All callers updated.
12957
12958 2014-02-19 Doug Evans <dje@google.com>
12959
12960 * inferiors.c (add_thread): Fix whitespace.
12961
12962 2014-02-19 Doug Evans <dje@google.com>
12963
12964 * dll.c (clear_dlls): Replace accessing list implemention details
12965 with API function.
12966 * gdbthread.h (get_first_thread): Declare.
12967 * inferiors.c (for_each_inferior_with_data): New function.
12968 (get_first_thread): New function.
12969 (find_thread_ptid): Simplify.
12970 (get_first_inferior): New function.
12971 (clear_list): Delete.
12972 (one_inferior_p): New function.
12973 (clear_inferior_list): New function.
12974 (clear_inferiors): Update.
12975 * inferiors.h (for_each_inferior_with_data): Declare.
12976 (clear_inferior_list): Declare.
12977 (one_inferior_p): Declare.
12978 (get_first_inferior): Declare.
12979 * linux-low.c (linux_wait_for_event): Replace accessing list
12980 implemention details with API function.
12981 * server.c (target_running): Ditto.
12982 (accumulate_file_name_length): New function.
12983 (emit_dll_description): New function.
12984 (handle_qxfer_libraries): Replace accessing list implemention
12985 details with API function.
12986 (handle_qxfer_threads_worker): New function.
12987 (handle_qxfer_threads_proper): Replace accessing list implemention
12988 details with API function.
12989 (handle_query): Ditto.
12990 (visit_actioned_threads_callback_ftype): New typedef.
12991 (visit_actioned_threads_data): New struct.
12992 (visit_actioned_threads): Rewrite to be find_inferior callback.
12993 (resume): Call find_inferior.
12994 (handle_status): Replace accessing list implemention
12995 details with API function.
12996 (process_serial_event): Replace accessing list implemention details
12997 with API function.
12998 * target.c (set_desired_inferior): Replace accessing list implemention
12999 details with API function.
13000 * tracepoint.c (same_process_p): New function.
13001 (gdb_agent_about_to_close): Replace accessing list implemention
13002 details with API function.
13003 * win32-low.c (child_delete_thread): Replace accessing list
13004 implemention details with API function.
13005 (match_dll_by_basename): New function.
13006 (dll_is_loaded_by_basename): New function.
13007 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13008 details call to dll_is_loaded_by_basename.
13009
13010 2014-02-19 Doug Evans <dje@google.com>
13011
13012 * dll.h (struct dll_info): Add comment.
13013 * gdbthread.h (struct thread_info): Add comment.
13014 (current_ptid): Simplify.
13015 * inferiors.c (add_process): Update.
13016 (remove_process): Update.
13017 * inferiors.h (struct process_info): Rename member "head" to "entry".
13018 * linux-low.c (delete_lwp): Update.
13019 (add_lwp): Update.
13020 (last_thread_of_process_p): Update.
13021 (kill_one_lwp_callback, linux_kill): Update.
13022 (status_pending_p_callback): Update.
13023 (wait_for_sigstop): Update. Simplify read of ptid.
13024 (start_step_over): Update.
13025 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13026 (get_lwp_thread): Update.
13027 (struct lwp_info): Rename member "head" to "entry".
13028 * regcache.h (inferior_list_entry): Delete.
13029 * server.c (kill_inferior_callback): Update.
13030 (detach_or_kill_inferior_callback): Update.
13031 (print_started_pid): Update.
13032 (print_attached_pid): Update.
13033 (process_serial_event): Simplify read of ptid.
13034 * thread-db.c (thread_db_create_event): Update.
13035 (thread_db_get_tls_address): Update.
13036 * win32-low.c (current_inferior_ptid): Simplify.
13037
13038 2014-02-19 Tom Tromey <tromey@redhat.com>
13039
13040 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13041 argument.
13042 (target_supports_btrace): Update.
13043
13044 2014-02-14 Yao Qi <yao@codesourcery.com>
13045
13046 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13047 (rsp-low-ipa.o): New target.
13048
13049 2014-02-12 Tom Tromey <tromey@redhat.com>
13050
13051 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13052 convert_ascii_to_int.
13053 * regcache.c (registers_to_string): Likewise.
13054 * remote-utils.c (decode_M_packet): Likewise.
13055 * server.c (process_serial_event): Likewise.
13056
13057 2014-02-12 Tom Tromey <tromey@redhat.com>
13058
13059 * server.c (handle_query, handle_v_run): Use hex2bin, not
13060 unhexify.
13061 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13062
13063 2014-02-12 Tom Tromey <tromey@redhat.com>
13064
13065 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13066 convert_int_to_ascii.
13067 * regcache.c (registers_to_string, collect_register_as_string):
13068 Likewise.
13069 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13070 Likewise.
13071 * server.c (process_serial_event): Likewise.
13072 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13073 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13074
13075 2014-02-12 Tom Tromey <tromey@redhat.com>
13076
13077 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13078 bin2hex, not hexify.
13079 * tracepoint.c (cmd_qtstatus): Likewise.
13080
13081 2014-02-12 Tom Tromey <tromey@redhat.com>
13082
13083 * remote-utils.c (monitor_output): Pass explicit length to
13084 hexify.
13085
13086 2014-02-12 Tom Tromey <tromey@redhat.com>
13087
13088 * tracepoint.c: Include rsp-low.h.
13089 * server.c: Include rsp-low.h.
13090 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13091 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13092 declare.
13093 * remote-utils.c: Include rsp-low.h.
13094 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13095 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13096 (convert_int_to_ascii, convert_ascii_to_int): Move to
13097 common/rsp-low.c.
13098 * regcache.c: Include rsp-low.h.
13099 * ax.c: Include rsp-low.h.
13100 * Makefile.in (SFILES): Add common/rsp-low.c.
13101 (OBS): Add rsp-low.o.
13102 (rsp-low.o): New target.
13103
13104 2014-02-12 Tom Tromey <tromey@redhat.com>
13105
13106 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13107 Include print-utils.h.
13108 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13109 (plongest, thirty_two, phex_nz): Remove.
13110 * Makefile.in (SFILES): Add common/print-utils.c.
13111 (OBS): Add print-utils.o.
13112 (print-utils-ipa.o): New target.
13113 (print-utils.o): New target.
13114 (IPA_OBJS): Add print-utils-ipa.o.
13115
13116 2014-02-06 Tom Tromey <tromey@redhat.com>
13117
13118 * Makefile.in (SFILES): Fix indentation.
13119
13120 2014-02-05 Doug Evans <dje@google.com>
13121
13122 * linux-low.c (linux_wait_for_event): Improve comment.
13123 (linux_wait_1): Keep current_inferior in sync with event_child.
13124
13125 2014-01-22 Doug Evans <dje@google.com>
13126
13127 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13128
13129 2014-01-22 Doug Evans <dje@google.com>
13130
13131 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13132 * configure: Regenerate.
13133 * config.in: Regenerate.
13134 * Makefile.in (SFILES): Add debug.c.
13135 (OBS): Add debug.o.
13136 * debug.c: New file.
13137 * debug.h: New file.
13138 * linux-aarch64-low.c (*): Update all debugging printfs to use
13139 debug_printf instead of fprintf.
13140 * linux-arm-low.c (*): Ditto.
13141 * linux-cris-low.c (*): Ditto.
13142 * linux-crisv32-low.c (*): Ditto.
13143 * linux-m32r-low.c (*): Ditto.
13144 * linux-sparc-low.c (*): Ditto.
13145 * linux-x86.c (*): Ditto.
13146 * linux-low.c (*): Ditto.
13147 (linux_wait_1): Add calls to debug_enter, debug_exit.
13148 (linux_wait): Remove redundant debugging printf.
13149 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13150 (linux_resume, unstop_all_lwps): Ditto.
13151 * mem-break.c (*): Update all debugging printfs to use
13152 debug_printf instead of fprintf.
13153 * remote-utils.c (*): Ditto.
13154 * thread-db.c (*): Ditto.
13155 * server.c #include <ctype.h>, "gdb_vecs.h".
13156 (debug_threads): Moved to debug.c.
13157 (*): Update all debugging printfs to use debug_printf instead of
13158 fprintf.
13159 (start_inferior): Replace call to fflush with call to debug_flush.
13160 (monitor_show_help): Mention set debug-format.
13161 (parse_debug_format_options): New function.
13162 (handle_monitor_command): Handle "monitor set debug-format".
13163 (gdbserver_usage): Mention --debug-format.
13164 (main): Parse --debug-format.
13165 * server.h (debug_threads): Declaration moved to debug.h.
13166 #include "debug.h".
13167 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13168 trace_debug_1 that uses debug_printf.
13169 (tracepoint_look_up_symbols): Update all debugging printfs to use
13170 debug_printf instead of fprintf.
13171
13172 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13173
13174 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13175 sys/ptrace.h.
13176
13177 2014-01-17 Pedro Alves <palves@redhat.com>
13178
13179 PR build/16445
13180 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13181 defined after including gdb_proc_service.h.
13182
13183 2014-01-16 Doug Evans <dje@google.com>
13184
13185 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13186 (match_dll): Use it.
13187
13188 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13189
13190 * target.h (target_ops) <read_btrace>: Change parameters and
13191 return type to allow error reporting.
13192 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13193 trace reading errors on.
13194 * linux-low.c (linux_low_read_btrace): Pass trace reading
13195 errors on.
13196 (linux_low_disable_btrace): New.
13197
13198 2014-01-15 Doug Evans <dje@google.com>
13199
13200 * inferiors.c (thread_id_to_gdb_id): Delete.
13201 * inferiors.h (thread_id_to_gdb_id): Delete.
13202
13203 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13204
13205 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13206 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13207 versions.
13208
13209 2014-01-08 Pedro Alves <palves@redhat.com>
13210
13211 * server.c (handle_status): Don't discard previous queued stop
13212 replies or thread's pending status here.
13213 (main) <disconnection>: Do it here instead.
13214
13215 2014-01-08 Pedro Alves <palves@redhat.com>
13216
13217 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13218 * server.c (visit_actioned_threads, handle_pending_status): New
13219 function.
13220 (handle_v_cont): Factor out parts to ...
13221 (resume): ... this new function. If in all-stop, and a thread
13222 being resumed has a pending status, report it without actually
13223 resuming.
13224 (myresume): Adjust to use the new 'resume' function.
13225 (clear_pending_status_callback, set_pending_status_callback)
13226 (find_status_pending_thread_callback): New functions.
13227 (handle_status): Handle the case of multiple threads having
13228 interesting statuses to report. Report threads' real last signal
13229 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13230 with an interesting thread to report the status for, instead of
13231 always reporting the status of the first thread.
13232
13233 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13234
13235 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13236 * gdbreplay.c (gdbreplay_version): Likewise.
13237
13238 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13239
13240 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13241 iov.iov_len with the real length in use.
13242
13243 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13244
13245 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13246 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13247 for all targets that use win32-low.c.
13248 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13249 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13250
13251 2013-12-13 Pedro Alves <palves@redhat.com>
13252
13253 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13254 if equal to TARGET_WAITKIND_LOADED.
13255 * win32-low.c (cached_status): New static global.
13256 (win32_wait): Add declaration.
13257 (do_initial_child_stuff): Flush all initial pending debug events
13258 up to the initial breakpoint.
13259 (win32_wait): If CACHED_STATUS was set, return that instead
13260 of doing a real wait. Remove the code resuming the execution
13261 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13262 during the initial phase. Also remove the code changing
13263 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13264 TARGET_WAITKIND_STOPPED.
13265
13266 2013-12-11 Yao Qi <yao@codesourcery.com>
13267
13268 * notif.c (handle_notif_ack): Return 0 if no notification
13269 matches.
13270
13271 2013-11-20 Doug Evans <dje@google.com>
13272
13273 * linux-low.c (linux_set_resume_request): Fix comment.
13274
13275 2013-11-20 Doug Evans <dje@google.com>
13276
13277 * linux-low.c (resume_status_pending_p): Tweak comment.
13278
13279 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13280
13281 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13282 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13283 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13284 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13285 (srv_amd64_regobj): Add amd64-mpx.o.
13286 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13287 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13288 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13289 * i387-fp.c (num_pl_bnd_register) Added constant.
13290 (num_pl_bnd_cfg_registers) Added constant.
13291 (struct i387_xsave) Added reserved area and MPX fields.
13292 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13293 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13294 function.
13295 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13296 (init_registers_amd64_mpx_linux): Declare new function.
13297 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13298 (x86_64_regmap): Add MPX registers.
13299 (x86_linux_read_description): Add MPX case.
13300 (initialize_low_arch): Initialize MPX targets.
13301
13302 2013-11-18 Tom Tromey <tromey@redhat.com>
13303
13304 * configure: Rebuild.
13305 * configure.ac: Don't check for stdlib.h.
13306 * gdbreplay.c: Unconditionally include stdlib.h.
13307
13308 2013-11-18 Tom Tromey <tromey@redhat.com>
13309
13310 * config.in: Rebuild.
13311 * configure: Rebuild.
13312 * configure.ac: Don't use AC_HEADER_DIRENT.
13313
13314 2013-11-18 Tom Tromey <tromey@redhat.com>
13315
13316 * server.h: Don't check HAVE_STRING_H.
13317 * gdbreplay.c: Don't check HAVE_STRING_H.
13318 * configure: Rebuild.
13319
13320 2013-11-18 Tom Tromey <tromey@redhat.com>
13321
13322 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13323 LIBGNU.
13324
13325 2013-11-08 Tom Tromey <tromey@redhat.com>
13326
13327 * configure, config.in: Rebuild.
13328 * configure.ac: Remove unused configury.
13329
13330 2013-11-08 Tom Tromey <tromey@redhat.com>
13331
13332 * acinclude.m4: Include common.m4, codeset.m4.
13333 * configure, config.in: Rebuild.
13334 * configure.ac: Use GDB_AC_COMMON.
13335
13336 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13337
13338 * linux-s390-low.c (HWCAP_S390_TE): New define.
13339 (s390_arch_setup): Consider the TE field in the HWCAP for
13340 determining 'have_regset_tdb'.
13341
13342 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13343
13344 PR gdb/16014
13345 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13346 call to sizeof.
13347
13348 2013-10-02 Pedro Alves <palves@redhat.com>
13349
13350 * server.c (process_serial_event): Don't output "GDBserver
13351 exiting" if GDB is connected through stdio.
13352 * target.c (mywait): Likewise, be silent if GDB is connected
13353 through stdio.
13354
13355 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13356
13357 * lynx-low.c (lynx_add_threads_after_attach): New function.
13358 (lynx_attach): Remove call to add_thread. Add call to
13359 lynx_add_threads_after_attach instead.
13360
13361 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13362
13363 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13364 * config.in, configure: Regenerated.
13365
13366 2013-09-18 Yao Qi <yao@codesourcery.com>
13367
13368 PR server/15959
13369 * server.c (start_inferior): Clear 'resume_info'.
13370
13371 2013-09-16 Jiong Wang <jiwang@tilera.com>
13372
13373 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13374 for each register.
13375
13376 2013-09-16 Jiong Wang <jiwang@tilera.com>
13377
13378 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13379 linux-tile-low.o to srv_tgtobj.
13380
13381 2013-09-16 Will Newton <will.newton@linaro.org>
13382
13383 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13384 out regs.
13385
13386 2013-09-06 Pedro Alves <palves@redhat.com>
13387
13388 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13389 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13390 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13391 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13392 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13393 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13394
13395 2013-09-06 Pedro Alves <palves@redhat.com>
13396
13397 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13398 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13399
13400 2013-09-06 Pedro Alves <palves@redhat.com>
13401
13402 * linux-amd64-ipa.c: Include tracepoint.h.
13403 * linux-i386-ipa.c: Include tracepoint.h.
13404
13405 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13406
13407 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13408 (ps_get_thread_area): New function.
13409
13410 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13411
13412 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13413 (initialize_low_arch): Call init_registers_crisv32 rather than
13414 init_register_crisv32.
13415
13416 2013-09-05 Pedro Alves <palves@redhat.com>
13417
13418 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13419 to ...
13420 * hostio.h: ... this new file.
13421 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13422 win32-low.c: Include hostio.h.
13423
13424 2013-09-05 Pedro Alves <palves@redhat.com>
13425
13426 * server.h (gdb_client_data, handler_func, callback_handler_func)
13427 (delete_file_handler, add_file_handler, append_callback_event)
13428 (delete_callback_event, start_event_loop, initialize_event_loop):
13429 Move to event-loop.h and include it.
13430 * event-loop.h: New file.
13431
13432 2013-09-05 Pedro Alves <palves@redhat.com>
13433
13434 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13435 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13436 (loaded_dll, unloaded_dll): Move to ...
13437 * dll.h: ... this new file.
13438 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13439
13440 2013-09-05 Pedro Alves <palves@redhat.com>
13441
13442 * server.h (current_process, get_thread_process, all_processes)
13443 (add_inferior_to_list, for_each_inferior, current_inferior)
13444 (remove_inferior, add_process, remove_process, find_process_pid)
13445 (have_started_inferiors_p, have_attached_inferiors_p)
13446 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13447 (clear_inferiors, find_inferior, find_inferior_id)
13448 (inferior_target_data, set_inferior_target_data)
13449 (inferior_regcache_data, set_inferior_regcache_data): Move to
13450 inferiors.h, and include it.
13451 * inferiors.h: New file.
13452
13453 2013-09-05 Pedro Alves <palves@redhat.com>
13454
13455 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13456 Move ...
13457 * ax.h: ... here.
13458
13459 2013-09-05 Pedro Alves <palves@redhat.com>
13460
13461 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13462 tracepoint.h.
13463 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13464 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13465 (handle_tracepoint_general_set, handle_tracepoint_query)
13466 (tracepoint_finished_step, tracepoint_was_hit)
13467 (release_while_stepping_state_list, current_traceframe)
13468 (in_readonly_region, traceframe_read_mem)
13469 (fetch_traceframe_registers, traceframe_read_sdata)
13470 (traceframe_read_info, struct fast_tpoint_collect_status)
13471 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13472 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13473 (supply_fast_tracepoint_registers)
13474 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13475 (ipa_tdesc, claim_trampoline_space)
13476 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13477 (agent_mem_read, agent_get_trace_state_variable_value)
13478 (agent_set_trace_state_variable_value, agent_tsv_read)
13479 (agent_mem_read_string, get_raw_reg_func_addr)
13480 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13481 * tracepoint.h: ... this new file.
13482
13483 2013-09-05 Pedro Alves <palves@redhat.com>
13484
13485 * server.h (perror_with_name, error, fatal, warning, paddress)
13486 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13487 include it.
13488 * utils.h: New file.
13489
13490 2013-09-05 Pedro Alves <palves@redhat.com>
13491
13492 * server.h (remote_debug, noack_mode, transport_is_reliable)
13493 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13494 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13495 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13496 (write_enn, initialize_async_io, enable_async_io)
13497 (disable_async_io, check_remote_input_interrupt_request)
13498 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13499 (dead_thread_notify, prepare_resume_reply)
13500 (decode_address_to_semicolon, decode_address, decode_m_packet)
13501 (decode_M_packet, decode_X_packet, decode_xfer_write)
13502 (decode_search_memory_packet, unhexify, hexify)
13503 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13504 (look_up_one_symbol, relocate_instruction)
13505 (monitor_output): Move to remote-utils.h, and include it.
13506 * remote-utils.h: New file.
13507
13508 2013-09-05 Pedro Alves <palves@redhat.com>
13509
13510 * server.h (_): Delete.
13511
13512 2013-09-02 Pedro Alves <palves@redhat.com>
13513
13514 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13515 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13516 allocated.
13517 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13518
13519 2013-09-02 Pierre Muller <muller@sourceware.org>
13520
13521 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13522 or WriteProcessMemory complete successfully and handle
13523 ERROR_PARTIAL_COPY error.
13524
13525 2013-09-02 Pedro Alves <palves@redhat.com>
13526
13527 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13528 error instead of EIO.
13529
13530 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13531
13532 PR server/15604
13533 * linux-low.c: Include filestuff.h.
13534 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13535 * lynx-low.c: Include filestuff.h.
13536 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13537 * server.c: Include filestuff.h.
13538 (main): Call notice_open_fds.
13539 * spu-low.c: Include filestuff.h.
13540 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13541
13542 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13543
13544 * Makefile.in: Explain why ../target and ../nat are not
13545 listed as include file search paths.
13546 (linux-waitpid.o): New object file rule.
13547 * configure.srv (srv_native_linux_obj): New variable.
13548 Replace all occurrences of linux native object files with
13549 $srv_native_linux_obj.
13550 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13551 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13552 (linux_enable_event_reporting): Remove declaration.
13553 (my_waitpid): Moved to common/linux-waitpid.c.
13554 (linux_wait_for_event): Pass ptid when calling
13555 linux_enable_event_reporting.
13556 (linux_supports_tracefork_flag): Remove.
13557 (linux_enable_event_reporting): Likewise.
13558 (linux_tracefork_grandchild): Remove.
13559 (STACK_SIZE): Moved to common/linux-ptrace.c.
13560 (linux_tracefork_child): Remove.
13561 (linux_test_for_tracefork): Remove.
13562 (linux_look_up_symbols): Call linux_supports_traceclone.
13563 (initialize_low): Remove call to linux_test_for_tracefork.
13564 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13565 common/linux-ptrace.h.
13566 (PTRACE_TYPE_ARG4): Likewise.
13567 Include linux-ptrace.h.
13568
13569 2013-08-21 Pedro Alves <palves@redhat.com>
13570
13571 * config.in: Renegerate.
13572
13573 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13574
13575 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13576 (SFILES): Remove $(srcdir)/common/target-common.c and
13577 add $(srcdir)/target/waitstatus.c.
13578 (OBS): Remove target-common.o and add waitstatus.o.
13579 (server_h): Remove $(srcdir)/../common/target-common.h and
13580 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13581 and $(srcdir)/../target/waitstatus.h.
13582 (target-common.o): Remove.
13583 (waitstatus.o): New target object file.
13584 * target.h: Do not include target-common.h and
13585 include target/resume.h, target/wait.h and
13586 target/waitstatus.h.
13587
13588 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13589
13590 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13591 to PTRACE_TYPE_ARG3.
13592 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13593 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13594 PTRACE_TYPE_ARG4.
13595 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13596 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13597
13598 2013-07-27 Jie Zhang <jie@codesourcery.com>
13599 Daniel Jacobowitz <dan@codesourcery.com>
13600 Yao Qi <yao@codesourcery.com>
13601
13602 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13603 (mips-linux-watch.o): New rule.
13604 (mips_linux_watch_h): New variable.
13605 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13606 srv_tgtobj.
13607 * linux-mips-low.c: Include mips-linux-watch.h.
13608 (struct arch_process_info, struct arch_lwp_info): New.
13609 (update_watch_registers_callback): New function.
13610 (mips_linux_new_process, mips_linux_new_thread) New functions.
13611 (mips_linux_prepare_to_resume, mips_insert_point): New
13612 functions.
13613 (mips_remove_point, mips_stopped_by_watchpoint): New
13614 functions.
13615 (rsp_bp_type_to_target_hw_bp_type): New function.
13616 (mips_stopped_data_address): New function.
13617 (the_low_target): Add watchpoint support functions.
13618
13619 2013-07-27 Yao Qi <yao@codesourcery.com>
13620
13621 * i386-low.c: Include break-common.h.
13622 (enum target_hw_bp_type): Remove.
13623
13624 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13625
13626 * Makefile.in (SFILES): /common/target-common.c.
13627 (OBS): Add target-common.o.
13628 (server_h): Add $(srcdir)/../common/target-common.h.
13629 (target-common.o): New target.
13630 * server.c (queue_stop_reply_callback): Free
13631 status string after use.
13632 * target.c (target_waitstatus_to_string): Remove.
13633 * target.h: Include target-common.h.
13634 (resume_kind): Likewise.
13635 (target_waitkind): Likewise.
13636 (target_waitstatus): Likewise.
13637 (TARGET_WNOHANG): Likewise.
13638
13639 2013-07-04 Yao Qi <yao@codesourcery.com>
13640
13641 * Makefile.in (host_alias): Use @host_noncanonical@.
13642 (target_alias): Use @target_noncanonical@.
13643 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13644 ACX_NONCANONICAL_HOST.
13645 * configure: Regenerated.
13646
13647 Revert:
13648 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13649
13650 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13651 * configure: Rebuild.
13652 * Makefile.in (version_host, version_target): Get from configure.
13653 (version.c): Use $(version_host) and $(version_target).
13654
13655 2013-07-03 Pedro Alves <palves@redhat.com>
13656
13657 * Makefile.in (config.status): Depend on development.sh.
13658 * acinclude.m4: Include libmcheck.m4.
13659 * configure: Regenerate.
13660
13661 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13662
13663 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13664 attribute inside the parentheses.
13665 (winapi_DebugSetProcessKillOnExit): Ditto.
13666 (winapi_DebugBreakProcess): Ditto.
13667 (winapi_GenerateConsoleCtrlEvent): Ditto.
13668
13669 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13670
13671 * notif.h (notif_event): Add a dummy member to avoid compiler
13672 errors.
13673
13674 2013-07-01 Pedro Alves <palves@redhat.com>
13675
13676 * hostio.c (HOSTIO_PATH_MAX): Define.
13677 (require_filename, handle_open, handle_unlink, handle_readlink):
13678 Use it.
13679
13680 2013-07-01 Pedro Alves <palves@redhat.com>
13681
13682 * server.h: Include "pathmax.h".
13683 * linux-low.c: Don't include sys/param.h.
13684 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13685 MAXPATHLEN.
13686 * win32-low.c: Don't include sys/param.h.
13687 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13688
13689 2013-07-01 Pedro Alves <palves@redhat.com>
13690
13691 * event-loop.c: Don't check HAVE_UNISTD_H before including
13692 <unistd.h>.
13693 * gdbreplay.c: Likewise.
13694 * remote-utils.c: Likewise.
13695 * server.c: Likewise.
13696 * configure.ac: Don't check for unistd.h.
13697 * configure: Regenerate.
13698
13699 2013-06-28 Tom Tromey <tromey@redhat.com>
13700
13701 * Makefile.in (version.c): Use version.in, not
13702 common/version.in.
13703
13704 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13705
13706 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13707 * configure: Rebuild.
13708 * Makefile.in (version_host, version_target): Get from configure.
13709 (version.c): Use $(version_host) and $(version_target).
13710
13711 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13712
13713 Fix trace-status to output user name without trailing colon.
13714 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13715
13716 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13717
13718 Fix trace-status to output proper start-time and stop-time.
13719 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13720 output start time and stop time in hex as gdb expects.
13721
13722 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13723
13724 * tracepoint.c (build_traceframe_info_xml): Output trace state
13725 variables present in the trace buffer.
13726
13727 2013-06-24 Tom Tromey <tromey@redhat.com>
13728
13729 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13730 create-version.sh.
13731 (version.o): Remove.
13732 * gdbreplay.c: Include version.h.
13733 (version, host_name): Don't declare.
13734 * server.h: Include version.h.
13735 (version, host_name): Don't declare.
13736
13737 2013-06-12 Pedro Alves <palves@redhat.com>
13738
13739 * linux-x86-low.c (linux_is_elf64): Delete global.
13740 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13741 with local linux_pid_exe_is_elf_64_file use.
13742
13743 2013-06-11 Pedro Alves <palves@redhat.com>
13744
13745 * linux-low.c (regset_disabled, disable_regset): New functions.
13746 (regsets_fetch_inferior_registers)
13747 (regsets_store_inferior_registers): Use them.
13748 (initialize_regsets_info); Don't allocate the disabled_regsets
13749 array here.
13750 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13751 comment.
13752
13753 2013-06-11 Pedro Alves <palves@redhat.com>
13754
13755 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13756 xmalloc.
13757
13758 2013-06-11 Pedro Alves <palves@redhat.com>
13759
13760 * linux-x86-low.c (initialize_low_arch): Call
13761 init_registers_x32_avx_linux.
13762
13763 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13764
13765 Fix compatibility with Android Bionic.
13766 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13767 it is not empty.
13768
13769 2013-06-07 Pedro Alves <palves@redhat.com>
13770
13771 PR server/14823
13772 * Makefile.in (OBS): Add tdesc.o.
13773 (IPA_OBJS): Add tdesc-ipa.o.
13774 (tdesc-ipa.o): New rule.
13775 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13776 interface.
13777 * linux-low.c (new_inferior): Delete.
13778 (disabled_regsets, num_regsets): Delete.
13779 (linux_add_process): Adjust to set the new per-process
13780 new_inferior flag.
13781 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13782 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13783 was a stop. When calling arch_setup, switch the current inferior
13784 to the thread that got an event.
13785 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13786 (regsets_fetch_inferior_registers)
13787 (regsets_store_inferior_registers): New regsets_info parameter.
13788 Adjust to use it.
13789 (linux_register_in_regsets): New regs_info parameter. Adjust to
13790 use it.
13791 (register_addr, fetch_register, store_register): New usrregs_info
13792 parameter. Adjust to use it.
13793 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13794 parameter regs_info. Adjust to use it.
13795 (linux_fetch_registers): Get the current inferior's regs_info, and
13796 adjust to use it.
13797 (linux_store_registers): Ditto.
13798 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13799 (initialize_low): Don't initialize the target_regsets here. Call
13800 initialize_low_arch.
13801 * linux-low.h (target_regsets): Delete declaration.
13802 (struct regsets_info): New.
13803 (struct usrregs_info): New.
13804 (struct regs_info): New.
13805 (struct process_info_private) <new_inferior>: New field.
13806 (struct linux_target_ops): Delete the num_regs, regmap, and
13807 regset_bitmap fields. New field regs_info.
13808 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13809 * i387-fp.c (num_xmm_registers): Delete.
13810 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13811 calls to new interface.
13812 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13813 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13814 Infer the number of xmm registers from the regcache's target
13815 description.
13816 * i387-fp.h (num_xmm_registers): Delete.
13817 * inferiors.c (add_thread): Don't install the thread's regcache
13818 here.
13819 * proc-service.c (gregset_info): Fetch the current inferior's
13820 regs_info. Adjust to use it.
13821 * regcache.c: Include tdesc.h.
13822 (register_bytes, reg_defs, num_registers)
13823 (gdbserver_expedite_regs): Delete.
13824 (get_thread_regcache): If the thread doesn't have a regcache yet,
13825 create one, instead of aborting gdbserver.
13826 (regcache_invalidate_one): Rename to ...
13827 (regcache_invalidate_thread): ... this.
13828 (regcache_invalidate_one): New.
13829 (regcache_invalidate): Only invalidate registers of the current
13830 process.
13831 (init_register_cache): Add target_desc parameter, and use it.
13832 (new_register_cache): Ditto. Assert the target description has a
13833 non zero registers_size.
13834 (regcache_cpy): Add assertions. Adjust.
13835 (realloc_register_cache, set_register_cache): Delete.
13836 (registers_to_string, registers_from_string): Adjust.
13837 (find_register_by_name, find_regno, find_register_by_number)
13838 (register_cache_size): Add target_desc parameter, and use it.
13839 (free_register_cache_thread, free_register_cache_thread_one)
13840 (regcache_release, register_cache_size): New.
13841 (register_size): Add target_desc parameter, and use it.
13842 (register_data, supply_register, supply_register_zeroed)
13843 (supply_regblock, supply_register_by_name, collect_register)
13844 (collect_register_as_string, collect_register_by_name): Adjust.
13845 * regcache.h (struct target_desc): Forward declare.
13846 (struct regcache) <tdesc>: New field.
13847 (init_register_cache, new_register_cache): Add target_desc
13848 parameter.
13849 (regcache_invalidate_thread): Declare.
13850 (regcache_invalidate_one): Delete declaration.
13851 (regcache_release): Declare.
13852 (find_register_by_number, register_cache_size, register_size)
13853 (find_regno): Add target_desc parameter.
13854 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13855 declarations.
13856 * remote-utils.c: Include tdesc.h.
13857 (outreg, prepare_resume_reply): Adjust.
13858 * server.c: Include tdesc.h.
13859 (gdbserver_xmltarget): Delete declaration.
13860 (get_features_xml, process_serial_event): Adjust.
13861 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13862 declare.
13863 (struct process_info) <tdesc>: New field.
13864 (ipa_tdesc): Declare.
13865 * tdesc.c: New file.
13866 * tdesc.h: New file.
13867 * tracepoint.c: Include tdesc.h.
13868 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13869 (get_context_regcache): Adjust to pass ipa_tdesc down.
13870 (do_action_at_tracepoint): Adjust to get the register cache size
13871 from the context regcache's description.
13872 (traceframe_walk_blocks): Adjust to get the register cache size
13873 from the current trace frame's description.
13874 (traceframe_get_pc): Adjust to get current trace frame's
13875 description and pass it down.
13876 (gdb_collect): Adjust to get the register cache size from the
13877 IPA's description.
13878 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13879 (gdbserver_xmltarget): Delete.
13880 (initialize_low_tracepoint): Set the ipa's target description.
13881 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13882 (initialize_low_tracepoint): Set the ipa's target description.
13883 * linux-x86-low.c: Include tdesc.h.
13884 [__x86_64__] (is_64bit_tdesc): New.
13885 (ps_get_thread_area, x86_get_thread_area): Use it.
13886 (i386_cannot_store_register): Rename to ...
13887 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13888 (i386_cannot_fetch_register): Rename to ...
13889 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13890 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13891 to new interface.
13892 (target_regsets): Rename to ...
13893 (x86_regsets): ... this.
13894 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13895 interface.
13896 (x86_siginfo_fixup): Use is_64bit_tdesc.
13897 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13898 (tdesc_x32_avx_linux, tdesc_x32_linux)
13899 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13900 Declare.
13901 (x86_linux_update_xmltarget): Delete.
13902 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13903 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13904 (AMD64_LINUX_USER64_CS): New.
13905 (x86_linux_read_description): New, based on
13906 x86_linux_update_xmltarget.
13907 (same_process_callback): New.
13908 (x86_arch_setup_process_callback): New.
13909 (x86_linux_update_xmltarget): New.
13910 (x86_regsets_info): New.
13911 (amd64_linux_regs_info): New.
13912 (i386_linux_usrregs_info): New.
13913 (i386_linux_regs_info): New.
13914 (x86_linux_regs_info): New.
13915 (x86_arch_setup): Reimplement.
13916 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13917 (x86_emit_ops): Ditto.
13918 (the_low_target): Adjust. Install x86_linux_regs_info,
13919 x86_cannot_fetch_register, and x86_cannot_store_register.
13920 (initialize_low_arch): New.
13921 * linux-ia64-low.c (tdesc_ia64): Declare.
13922 (ia64_fetch_register): Adjust.
13923 (ia64_usrregs_info, regs_info): New globals.
13924 (ia64_regs_info): New function.
13925 (the_low_target): Adjust.
13926 (initialize_low_arch): New function.
13927 * linux-sparc-low.c (tdesc_sparc64): Declare.
13928 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13929 Adjust.
13930 (sparc_arch_setup): New function.
13931 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13932 (the_low_target): Adjust.
13933 (initialize_low_arch): New function.
13934 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13935 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13936 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13937 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13938 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13939 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13940 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13941 (tdesc_powerpc_isa205_vsx64l): Declare.
13942 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13943 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13944 (ppc_set_pc, ppc_get_hwcap): Adjust.
13945 (ppc_usrregs_info): Forward declare.
13946 (!__powerpc64__) ppc_regmap_adjusted: New global.
13947 (ppc_arch_setup): Adjust to the current process'es target
13948 description.
13949 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13950 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13951 (ppc_store_evrregset): Adjust.
13952 (target_regsets): Rename to ...
13953 (ppc_regsets): ... this, and make static.
13954 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13955 (ppc_regs_info): New function.
13956 (the_low_target): Adjust.
13957 (initialize_low_arch): New function.
13958 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13959 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13960 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13961 (tdesc_s390x_linux64v2): Declare.
13962 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13963 (s390_fill_gregset, s390_store_last_break): Adjust.
13964 (target_regsets): Rename to ...
13965 (s390_regsets): ... this, and make static.
13966 (s390_get_pc, s390_set_pc): Adjust.
13967 (s390_get_hwcap): New target_desc parameter, and use it.
13968 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13969 (s390_arch_setup): Adjust to set the current process'es target
13970 description. Don't adjust the regmap.
13971 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13972 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13973 (regs_info_3264): New globals.
13974 (s390_regs_info): New function.
13975 (the_low_target): Adjust.
13976 (initialize_low_arch): New function.
13977 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13978 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13979 [__mips64] (init_registers_mips_linux)
13980 (init_registers_mips_dsp_linux): Delete defines.
13981 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13982 (have_dsp): New global.
13983 (mips_read_description): New, based on mips_arch_setup.
13984 (mips_arch_setup): Reimplement.
13985 (get_usrregs_info): New function.
13986 (mips_cannot_fetch_register, mips_cannot_store_register)
13987 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13988 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13989 (target_regsets): Rename to ...
13990 (mips_regsets): ... this, and make static.
13991 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
13992 (dsp_regs_info, regs_info): New globals.
13993 (mips_regs_info): New function.
13994 (the_low_target): Adjust.
13995 (initialize_low_arch): New function.
13996 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
13997 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
13998 Declare.
13999 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14000 (arm_read_description): New, with bits factored from
14001 arm_arch_setup.
14002 (arm_arch_setup): Reimplement.
14003 (target_regsets): Rename to ...
14004 (arm_regsets): ... this, and make static.
14005 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14006 (arm_regs_info): New function.
14007 (the_low_target): Adjust.
14008 (initialize_low_arch): New function.
14009 * linux-m68k-low.c (tdesc_m68k): Declare.
14010 (target_regsets): Rename to ...
14011 (m68k_regsets): ... this, and make static.
14012 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14013 (m68k_regs_info): New function.
14014 (m68k_arch_setup): New function.
14015 (the_low_target): Adjust.
14016 (initialize_low_arch): New function.
14017 * linux-sh-low.c (tdesc_sharch): Declare.
14018 (target_regsets): Rename to ...
14019 (sh_regsets): ... this, and make static.
14020 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14021 (sh_regs_info, sh_arch_setup): New functions.
14022 (the_low_target): Adjust.
14023 (initialize_low_arch): New function.
14024 * linux-bfin-low.c (tdesc_bfin): Declare.
14025 (bfin_arch_setup): New function.
14026 (bfin_usrregs_info, regs_info): New globals.
14027 (bfin_regs_info): New function.
14028 (the_low_target): Adjust.
14029 (initialize_low_arch): New function.
14030 * linux-cris-low.c (tdesc_cris): Declare.
14031 (cris_arch_setup): New function.
14032 (cris_usrregs_info, regs_info): New globals.
14033 (cris_regs_info): New function.
14034 (the_low_target): Adjust.
14035 (initialize_low_arch): New function.
14036 * linux-cris-low.c (tdesc_crisv32): Declare.
14037 (cris_arch_setup): New function.
14038 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14039 (cris_regs_info): New function.
14040 (the_low_target): Adjust.
14041 (initialize_low_arch): New function.
14042 * linux-m32r-low.c (tdesc_m32r): Declare.
14043 (m32r_arch_setup): New function.
14044 (m32r_usrregs_info, regs_info): New globals.
14045 (m32r_regs_info): Adjust.
14046 (initialize_low_arch): New function.
14047 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14048 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14049 (tic6x_usrregs_info): Forward declare.
14050 (tic6x_read_description): New function, based on ...
14051 (tic6x_arch_setup): ... this. Reimplement.
14052 (target_regsets): Rename to ...
14053 (tic6x_regsets): ... this, and make static.
14054 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14055 (tic6x_regs_info): New function.
14056 (the_low_target): Adjust.
14057 (initialize_low_arch): New function.
14058 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14059 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14060 (target_regsets): Rename to ...
14061 (xtensa_regsets): ... this, and make static.
14062 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14063 globals.
14064 (xtensa_arch_setup, xtensa_regs_info): New functions.
14065 (the_low_target): Adjust.
14066 (initialize_low_arch): New function.
14067 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14068 (nios2_arch_setup): Set the current process'es tdesc.
14069 (target_regsets): Rename to ...
14070 (nios2_regsets): ... this.
14071 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14072 (nios2_regs_info): New function.
14073 (the_low_target): Adjust.
14074 (initialize_low_arch): New function.
14075 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14076 (aarch64_arch_setup): Set the current process'es tdesc.
14077 (target_regsets): Rename to ...
14078 (aarch64_regsets): ... this.
14079 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14080 (aarch64_regs_info): New function.
14081 (the_low_target): Adjust.
14082 (initialize_low_arch): New function.
14083 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14084 globals.
14085 (target_regsets): Rename to ...
14086 (tile_regsets): ... this.
14087 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14088 (tile_regs_info): New function.
14089 (tile_arch_setup): Set the current process'es tdesc.
14090 (the_low_target): Adjust.
14091 (initialize_low_arch): New function.
14092 * spu-low.c (tdesc_spu): Declare.
14093 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14094 * win32-arm-low.c (tdesc_arm): Declare.
14095 (arm_arch_setup): New function.
14096 (the_low_target): Install arm_arch_setup instead of
14097 init_registers_arm.
14098 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14099 (init_windows_x86): Rename to ...
14100 (i386_arch_setup): ... this. Set `win32_tdesc'.
14101 (the_low_target): Adjust.
14102 * win32-low.c (win32_tdesc): New global.
14103 (child_add_thread): Don't create the thread cache here.
14104 (do_initial_child_stuff): Set the new process'es tdesc.
14105 * win32-low.h (struct target_desc): Forward declare.
14106 (win32_tdesc): Declare.
14107 * lynx-i386-low.c (tdesc_i386): Declare global.
14108 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14109 * lynx-low.c (lynx_tdesc): New global.
14110 (lynx_add_process): Set the new process'es tdesc.
14111 * lynx-low.h (struct target_desc): Forward declare.
14112 (lynx_tdesc): Declare global.
14113 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14114 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14115 * nto-low.c (nto_tdesc): New global.
14116 (do_attach): Set the new process'es tdesc.
14117 * nto-low.h (struct target_desc): Forward declare.
14118 (nto_tdesc): Declare.
14119 * nto-x86-low.c (tdesc_i386): Declare.
14120 (nto_x86_arch_setup): Set `nto_tdesc'.
14121
14122 2013-06-04 Gary Benson <gbenson@redhat.com>
14123
14124 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14125 to qSupported response when appropriate.
14126 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14127 with nonzero-length annex.
14128 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14129 arguments supplied in annex.
14130
14131 2013-05-31 Doug Evans <dje@google.com>
14132
14133 PR server/15594
14134 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14135 64 bits in 64-cross-32 environment.
14136
14137 2013-05-28 Pedro Alves <palves@redhat.com>
14138
14139 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14140 (aarch64-without-fpu.c): Delete rule.
14141 * configure.srv (aarch64*-*-linux*): Remove references to
14142 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14143 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14144 declaration.
14145
14146 2013-05-24 Pedro Alves <palves@redhat.com>
14147
14148 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14149 instead of strchr/decode_address. Error if the range isn't split
14150 with a ','. Don't assume there's be a ':' in the action.
14151
14152 2013-05-23 Yao Qi <yao@codesourcery.com>
14153 Pedro Alves <palves@redhat.com>
14154
14155 * linux-low.c (lwp_in_step_range): New function.
14156 (linux_wait_1): If the thread was range stepping and stopped
14157 outside the stepping range, report the stop to GDB. Otherwise,
14158 continue stepping. Add range stepping debug output.
14159 (linux_set_resume_request): Copy the step range from the resume
14160 request to the lwp.
14161 (linux_supports_range_stepping): New.
14162 (linux_target_ops) <supports_range_stepping>: Set to
14163 linux_supports_range_stepping.
14164 * linux-low.h (struct linux_target_ops)
14165 <supports_range_stepping>: New field.
14166 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14167 * linux-x86-low.c (x86_supports_range_stepping): New.
14168 (the_low_target) <supports_range_stepping>: Set to
14169 x86_supports_range_stepping.
14170 * server.c (handle_v_cont): Handle 'r' action.
14171 (handle_v_requests): Append ";r" if the target supports range
14172 stepping.
14173 * target.h (struct thread_resume) <step_range_start,
14174 step_range_end>: New fields.
14175 (struct target_ops) <supports_range_stepping>:
14176 New field.
14177 (target_supports_range_stepping): New macro.
14178
14179 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14180
14181 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14182 confusion in comment.
14183
14184 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14185
14186 * lynx-low.c (struct process_info_private): New type.
14187 (lynx_add_process): New function.
14188 (lynx_create_inferior, lynx_attach): Replace calls to
14189 add_process by calls to lynx_add_process.
14190 (lynx_resume): If PTID is null, then try using
14191 current_process()->private->last_wait_event_ptid.
14192 Add comments.
14193 (lynx_clear_inferiors): Delete. The contents of that function
14194 has been inlined in lynx_mourn;
14195 (lynx_wait_1): Save the ptid in the process's private data.
14196 (lynx_mourn): Free the process' private data. Replace call
14197 to lynx_clear_inferiors by call to clear_inferiors.
14198
14199 2013-05-17 Yao Qi <yao@codesourcery.com>
14200
14201 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14202 the right place.
14203
14204 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14205
14206 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14207 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14208 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14209 PT_TEXT_END_ADDR guards. Update comments.
14210 (linux_target_op) <read_offsets>: Conditionally define to
14211 linux_read_offsets if the target is UCLIBC and if it defines
14212 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14213
14214 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14215 Andrew Jenner <andrew@codesourcery.com>
14216
14217 * Makefile.in (SFILES): Add linux-nios2-low.c.
14218 (clean): Add action to delete nios2-linux.c.
14219 (nios2-linux.c): New rule.
14220 * configure.srv: Add nios2*-*-linux*.
14221 * linux-nios2-low.c: New.
14222
14223 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14224
14225 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14226
14227 2013-04-25 Hui Zhu <hui@codesourcery.com>
14228
14229 PR gdb/15186
14230 * ax.c (ax_printf): Add fflush.
14231
14232 2013-04-22 Tom Tromey <tromey@redhat.com>
14233
14234 * Makefile.in (SFILES): Add filestuff.c.
14235 (OBS): Add filestuff.o.
14236 (filestuff.o): New target.
14237 * config.in, configure: Rebuild.
14238 * configure.ac: Check for fdwalk, pipe2.
14239
14240 2013-04-17 Pedro Alves <palves@redhat.com>
14241
14242 * configure.ac (USE_THREAD_DB): Delete variable.
14243 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14244 Don't AC_SUBST USE_THREAD_DB.
14245 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14246 * config.in, configure: Regenerate.
14247
14248 2013-04-16 Pedro Alves <palves@redhat.com>
14249
14250 * linux-low.h (struct lwp_info) <thread_known>: Move under
14251 the USE_THREAD_DB #ifdef.
14252
14253 2013-04-16 Pedro Alves <palves@redhat.com>
14254
14255 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14256 (linux-low.o): Delete rule.
14257 * linux-low.h: Always include "gdb_thread_db.h" instead of
14258 conditionally including thread_db.h.
14259 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14260 HAVE_THREAD_DB_H.
14261
14262 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14263
14264 * Makefile.in (install-only): Fix make install regression.
14265
14266 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14267
14268 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14269 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14270 installation.
14271 * gdbserver.1: Remove.
14272
14273 2013-03-22 Pedro Alves <palves@redhat.com>
14274
14275 * linux-low.c (handle_extended_wait): Don't call
14276 linux_enable_event_reporting.
14277
14278 2013-03-15 Tony Theodore <tonyt@logyst.com>
14279
14280 PR build/9098:
14281 * Makefile.in (SHELL): Use @SHELL@.
14282
14283 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14284
14285 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14286 compiler warning.
14287
14288 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14289
14290 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14291 Remove extraneous NULL element.
14292
14293 2013-03-13 Yao Qi <yao@codesourcery.com>
14294
14295 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14296 'V' block in trace frame.
14297
14298 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14299
14300 * target.h (struct target_ops): Add btrace ops.
14301 (target_supports_btrace): New macro.
14302 (target_enable_btrace): New macro.
14303 (target_disable_btrace): New macro.
14304 (target_read_btrace): New macro.
14305 * gdbthread.h (struct thread_info): Add btrace field.
14306 * server.c: Include btrace-common.h.
14307 (handle_btrace_general_set): New function.
14308 (handle_btrace_enable): New function.
14309 (handle_btrace_disable): New function.
14310 (handle_general_set): Call handle_btrace_general_set.
14311 (handle_qxfer_btrace): New function.
14312 (struct qxfer qxfer_packets[]): Add btrace entry.
14313 * inferiors.c (remove_thread): Disable btrace.
14314 * linux-low: Include linux-btrace.h.
14315 (linux_low_enable_btrace): New function.
14316 (linux_low_read_btrace): New function.
14317 (linux_target_ops): Add btrace ops.
14318 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14319 Add srv_linux_btrace=yes.
14320 (x86_64-*-linux*): Add linux-btrace.o.
14321 Add srv_linux_btrace=yes.
14322 * configure.ac: Define HAVE_LINUX_BTRACE.
14323 * config.in: Regenerated.
14324 * configure: Regenerated.
14325
14326 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14327
14328 * server.c (handle_qxfer): Preserve error message if -3 is
14329 returned.
14330 (qxfer): Document the -3 return value.
14331
14332 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14333
14334 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14335 (linux_btrace_h): New variable.
14336 (linux-btrace.o): New rule.
14337
14338 2013-03-08 Stan Shebs <stan@codesourcery.com>
14339 Hafiz Abid Qadeer <abidh@codesourcery.com>
14340
14341 * tracepoint.c (trace_buffer_size): New global.
14342 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14343 (init_trace_buffer): Change to one-argument function. Allocate
14344 trace buffer memory.
14345 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14346 handle QTBuffer:size packet.
14347 (cmd_bigqtbuffer_size): New function.
14348 (initialize_tracepoint): Call init_trace_buffer with
14349 DEFAULT_TRACE_BUFFER_SIZE.
14350 * server.c (handle_query): Add QTBuffer:size in the
14351 supported packets.
14352
14353 2013-03-07 Yao Qi <yao@codesourcery.com>
14354
14355 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14356 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14357 of -1.
14358 (cmd_qtsp): Adjust condition. Do post increment.
14359 Set cur_action and cur_step_action back to 0.
14360
14361 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14362
14363 PR server/15236
14364 * linux-low.c (linux_write_memory): Return early success if LEN is
14365 zero.
14366
14367 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14368
14369 * configure.srv: Add x86_64-*-cygwin* as target.
14370
14371 2013-02-28 Tom Tromey <tromey@redhat.com>
14372
14373 * configure.ac: Invoke AC_SYS_LARGEFILE.
14374 * configure, config.in: Rebuild.
14375
14376 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14377
14378 * win32-low.c: Throughout, fix format strings and casts of
14379 printf-like functions to avoid type related warnings on all
14380 platforms.
14381 (get_child_debug_event): Print dwDebugEventCode as hex since
14382 that's how it's usually documented.
14383
14384 2013-02-28 Yao Qi <yao@codesourcery.com>
14385
14386 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14387 pulongest.
14388
14389 2013-02-27 Jiong Wang <jiwang@tilera.com>
14390
14391 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14392 (reg-tilegx32.c): New rule.
14393 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14394 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14395 different register info initializer according to elf class.
14396 (init_registers_tilgx32): New function. The tilegx32 register info
14397 initializer.
14398 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14399 (tile_store_gregset): Likewise.
14400
14401 2013-02-27 Yao Qi <yao@codesourcery.com>
14402
14403 * server.c (process_point_options): Print debug message when
14404 debug_threads is true.
14405
14406 2013-02-26 Yao Qi <yao@codesourcery.com>
14407
14408 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14409
14410 2013-02-19 Pedro Alves <palves@redhat.com>
14411 Kai Tietz <ktietz@redhat.com>
14412
14413 PR gdb/15161
14414
14415 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14416 instead of strtoul to extract address from packet.
14417 (process_serial_event) <'z'>: Likewise.
14418
14419 2013-02-18 Yao Qi <yao@codesourcery.com>
14420
14421 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14422
14423 2013-02-14 Pedro Alves <palves@redhat.com>
14424
14425 Plug memory leak.
14426
14427 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14428 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14429
14430 2013-02-14 Pedro Alves <palves@redhat.com>
14431
14432 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14433
14434 2013-02-14 Pedro Alves <palves@redhat.com>
14435
14436 * tracepoint.c (save_string): Delete.
14437 (add_tracepoint_action): Use savestring instead of save_string.
14438
14439 2013-02-12 Pedro Alves <palves@redhat.com>
14440
14441 * linux-xtensa-low.c: Ditto.
14442 * xtensa-xtregs.c: Ditto.
14443
14444 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14445
14446 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14447 thread_db.
14448
14449 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14450
14451 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14452 aarch64_num_wp_regs and aarch64_num_bp_regs to
14453 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14454
14455 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14456
14457 * linux-aarch64-low.c (ps_get_thread_area): Replace
14458 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14459
14460 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14461 Marcus Shawcroft <marcus.shawcroft@arm.com>
14462 Nigel Stephens <nigel.stephens@arm.com>
14463 Yufeng Zhang <yufeng.zhang@arm.com>
14464
14465 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14466 (aarch64.c, aarch64-without-fpu.c): New targets.
14467 * configure.srv (aarch64*-*-linux*): New.
14468 * linux-aarch64-low.c: New file.
14469
14470 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14471
14472 * linux-low.c (handle_extended_wait, linux_create_inferior)
14473 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14474 (dequeue_one_deferred_signal, linux_resume_one_thread)
14475 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14476 (linux_tracefork_grandchild, linux_test_for_tracefork)
14477 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14478 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14479 where the argument is 0.
14480
14481 2013-01-25 Yao Qi <yao@codesourcery.com>
14482
14483 * event-loop.c: Include "queue.h".
14484 (gdb_event_p): New typedef.
14485 (struct gdb_event) <next_event>: Remove.
14486 (event_queue): Change to QUEUE(gdb_event_p).
14487 (async_queue_event): Remove.
14488 (gdb_event_xfree): New.
14489 (initialize_event_loop): New.
14490 (process_event): Use API from QUEUE.
14491 (wait_for_event): Likewise.
14492 * server.c (main): Call initialize_event_loop.
14493 * server.h (initialize_event_loop): Declare.
14494
14495 2013-01-18 Yao Qi <yao@codesourcery.com>
14496
14497 * ax.h (struct eval_agent_expr_context): New.
14498 (gdb_eval_agent_expr): Update declaration.
14499 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14500 TFRAME. Add new argument CTX.
14501 * server.h (struct eval_agent_expr_context): Declare.
14502 (agent_mem_read, agent_tsv_read): Update declaration.
14503 (agent_mem_read_string): Likewise.
14504 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14505 (add_traceframe_block): Add new argument TPOINT.
14506 Increase TPOINT->traceframe_usage.
14507 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14508 eval_tracepoint_agent_expr.
14509 (condition_true_at_tracepoint): Likewise.
14510 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14511 (agent_mem_read_string, agent_tsv_read): Likewise.
14512
14513 2013-01-16 Yao Qi <yao@codesourcery.com>
14514
14515 * linux-low.c (linux_resume_one_lwp): Don't check
14516 'lwp->bp_reinsert != 0'.
14517
14518 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14519 Pedro Alves <palves@redhat.com>
14520
14521 * lynx-low.c (ptrace_request_to_str): Define a temporary
14522 macro and use it to simplify this function's implementation.
14523
14524 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14525
14526 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14527 sets errno.
14528
14529 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14530
14531 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14532
14533 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14534
14535 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14536
14537 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14538
14539 * lynx-low.c (lynx_resume): Use the resume_info parameter
14540 to determine the ptid for the lynx_ptrace call, unless
14541 it is equal to minus_one_ptid, in which case we use the
14542 ptid of the current_inferior.
14543 (lynx_wait_1): After having received a thread create/exit
14544 event, resume the inferior's execution using the signaling
14545 thread's ptid, rather than the old ptid.
14546
14547 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14548
14549 * lynx-low.c (lynx_resume): Delete variable ret.
14550
14551 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14552
14553 * gdbreplay.c (gdbreplay_version): Update copyright year.
14554 * server.c (gdbserver_version): Likewise.
14555
14556 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14557
14558 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14559 new thread.
14560
14561 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14562
14563 * lynx-low.c (ptrace_request_to_str): Add handling for
14564 PTRACE_GETTRACESIG.
14565
14566 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14567
14568 * lynx-low.c (lynx_attach): Delete variable new_process.
14569
14570 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14571
14572 * lynx-low.c (lynx_create_inferior): Delete variable
14573 new_process.
14574
14575 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14576
14577 * lynx-low.c (ptrace_request_to_str): Do not handle
14578 PTRACE_GETTHREADLIST if this macro does not exist.
14579
14580 2012-12-15 Yao Qi <yao@codesourcery.com>
14581
14582 * Makefile.in (OBS): Add notif.o.
14583 * notif.c, notif.h: New.
14584 * server.c: Include "notif.h".
14585 (struct vstop_notif) <next>: Remove.
14586 <base>: New field.
14587 (queue_stop_reply): Update.
14588 (push_event, send_next_stop_reply): Remove.
14589 (discard_queued_stop_replies): Update.
14590 (notif_stop): New variable.
14591 (handle_v_stopped): Remove.
14592 (handle_v_requests): Don't call handle_v_stopped. Call
14593 handle_ack_notif instead.
14594 (queue_stop_reply_callback): Call notif_event_enque instead
14595 of queue_stop_reply.
14596 (handle_status): Don't call send_next_stop_reply, call
14597 notif_write_event instead.
14598 (kill_inferior_callback): Likewise.
14599 (detach_or_kill_inferior_callback): Likewise.
14600 (main): Call initialize_notif.
14601 (process_serial_event): Call QUEUE_is_empty.
14602 (handle_target_event): Call notif_push instead of push event.
14603 * server.h (push_event): Remove declaration.
14604
14605 2012-12-10 Tom Tromey <tromey@redhat.com>
14606
14607 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14608 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14609 macros.
14610 (.c.o): Rewrite.
14611 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14612 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14613 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14614 (amd64-linux-ipa.o, ax.o): Rewrite.
14615 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14616 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14617 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14618 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14619 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14620 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14621 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14622 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14623 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14624 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14625 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14626 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14627 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14628 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14629 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14630 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14631 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14632 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14633 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14634 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14635 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14636 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14637 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14638 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14639 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14640 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14641 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14642 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14643 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14644 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14645 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14646 (reg-tilegx.o): Remove.
14647 (all_object_files): New macro.
14648 Include .deps files.
14649 * aclocal.m4, configure: Rebuild.
14650 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14651 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14652 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14653
14654 2012-12-05 Tom Tromey <tromey@redhat.com>
14655
14656 PR gdb/14917:
14657 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14658
14659 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14660
14661 * configure.ac: Check for linux/perf_event.h.
14662 * config.in: Regenerated.
14663 * configure: Regenerated.
14664
14665 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14666
14667 * hostio.c (handle_readlink): Decrease buffer size
14668 parameter passed to readlink by one byte.
14669
14670 2012-11-26 Yao Qi <yao@codesourcery.com>
14671
14672 * configure.ac (build_warnings): Append '-Wempty-body'.
14673 * configure: Regenerated.
14674 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14675 body.
14676
14677 2012-11-15 Pierre Muller <muller@sourceware.org>
14678
14679 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14680 * config.in: Regenerate.
14681 * configure: Regenerate.
14682 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14683 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14684 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14685 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14686 header.
14687 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14688 instead of <sys/wait.h> header.
14689 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14690
14691 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14692
14693 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14694 (various make rules): Remove -DGDBSERVER
14695
14696 2012-11-09 Yao Qi <yao@codesourcery.com>
14697
14698 * spu-low.c (current_ptid): Move it to ..
14699 * gdbthread.h: ... here. New.
14700 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14701 * server.c (myresume, process_serial_event): Likewise.
14702 * thread-db.c (thread_db_find_new_threads): Likewise.
14703 * tracepoint.c (run_inferior_command): Likewise.
14704
14705 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14706
14707 * server.c (handle_search_memory_1): Include access length in
14708 warning message.
14709
14710 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14711
14712 * linux-crisv32-low.c: Fix compile errors.
14713
14714 2012-09-04 Yao Qi <yao@codesourcery.com>
14715
14716 * tracepoint.c (cmd_qtsv): Adjust debug message.
14717 Don't check CUR_TPOINT.
14718
14719 2012-08-28 Yao Qi <yao@codesourcery.com>
14720
14721 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14722 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14723 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14724 Remove declarations of xmalloc, xreallloc, xstrdup and
14725 freeargv.
14726 * Makefile.in (libiberty_h): New.
14727 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14728 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14729
14730 2012-08-23 Yao Qi <yao@codesourcery.com>
14731
14732 * server.h: Remove declaration of 'xsnprintf'.
14733
14734 2012-08-22 Keith Seitz <keiths@redhat.com>
14735
14736 * server.h: Include build-gnulib-gbserver/config.h.
14737 * gdbreplay.c: Likewise.
14738
14739 2012-08-08 Doug Evans <dje@google.com>
14740
14741 * Makefile.in (SFILES): Add gdb_vecs.c.
14742 (OBS): Add gdb_vecs.o.
14743 (gdb_vecs_h, host_defs_h): New variables.
14744 (thread-db.o): Add $(gdb_vecs_h) dependency.
14745 (gdb_vecs.o): New rule.
14746 * thread-db.c: #include "gdb_vecs.h".
14747 (thread_db_load_search): Use a vector to iterate over path elements.
14748 Handle text appearing after "$pdir".
14749
14750 * configure.ac: Add check for strstr.
14751 * config.in: Regenerate.
14752 * configure: Regenerate.
14753
14754 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14755
14756 * hostio.c (handle_pread): If pread fails, fall back to attempting
14757 lseek/read.
14758 (handle_pwrite): Likewise for pwrite.
14759
14760 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14761
14762 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14763 between unsupported TYPE and unimplementable ADDR/LEN combination.
14764 (arm_insert_point): Act on new return value.
14765
14766 2012-07-31 Pedro Alves <palves@redhat.com>
14767
14768 * server.c (process_point_options): Only skip tokens if we find
14769 one that is unrecognized. Don't treat 'X' specially while
14770 skipping unrecognized tokens.
14771
14772 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14773
14774 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14775 to 4-byte-align HW breakpoint addresses for Thumb.
14776
14777 2012-07-27 Yao Qi <yao@codesourcery.com>
14778
14779 PR remote/14161.
14780
14781 * server.h: Declare gdb_agent_about_to_close.
14782 * target.c (kill_inferior): Include "agent.h".
14783 New. Send command 'kill'.
14784 * target.h (kill_inferior): Removed macro.
14785 * tracepoint.c (gdb_agent_about_to_close): New.
14786 (gdb_agent_helper_thread): Handle command 'close'.
14787 Wait endlessly until the inferior stops.
14788 Install gdb_agent_remove_socket to atexit hook.
14789 (agent_socket_name): New static variable.
14790 (gdb_agent_socket_init): Replace local variable 'name' with
14791 'agent_socket_name'.
14792 (gdb_agent_remove_socket): New.
14793
14794 2012-07-27 Yao Qi <yao@codesourcery.com>
14795
14796 * server.c (process_point_options): Stop at 'X' when parsing.
14797
14798 2012-07-19 Michael Eager <eager@eagercon.com>
14799
14800 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14801 to hw_execute.
14802 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14803 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14804 hardware breakpoint.
14805
14806 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14807
14808 * gdbserver/linux-low.c (initialize_low): Call
14809 linux_ptrace_init_warnings.
14810
14811 2012-07-02 Doug Evans <dje@google.com>
14812
14813 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14814 pointer to int.
14815
14816 2012-07-02 Stan Shebs <stan@codesourcery.com>
14817
14818 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14819 (ax.o): Add it to build rule.
14820 (ax-ipa.o): Ditto.
14821 (OBS): Add format.o.
14822 (IPA_OBS): Add format.o.
14823 * server.c (handle_query): Claim support for breakpoint commands.
14824 (process_point_options): Add command case.
14825 (process_serial_event): Leave running if there are printfs in
14826 effect.
14827 * mem-break.h (any_persistent_commands): Declare.
14828 (add_breakpoint_commands): Declare.
14829 (gdb_no_commands_at_breakpoint): Declare.
14830 (run_breakpoint_commands): Declare.
14831 * mem-break.c (struct point_command_list): New struct.
14832 (struct breakpoint): New field command_list.
14833 (any_persistent_commands): New function.
14834 (add_commands_to_breakpoint): New function.
14835 (add_breakpoint_commands): New function.
14836 (gdb_no_commands_at_breakpoint): New function.
14837 (run_breakpoint_commands): New function.
14838 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14839 locally.
14840 * ax.c: Include format.h.
14841 (ax_printf): New function.
14842 (gdb_eval_agent_expr): Add printf opcode.
14843
14844 2012-06-13 Yao Qi <yao@codesourcery.com>
14845
14846 * server.c (start_inferior): Remove duplicated writes to fields
14847 'last_resume_kind' and 'last_status' of 'current_inferior'.
14848
14849 2012-06-12 Yao Qi <yao@codesourcery.com>
14850 Pedro Alves <palves@redhat.com>
14851
14852 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14853 comment.
14854 * server.c (handle_v_cont): Extend comment.
14855
14856 2012-06-11 Yao Qi <yao@codesourcery.com>
14857
14858 * linux-low.c (linux_attach): Add 'static'.
14859
14860 2012-06-06 Yao Qi <yao@codesourcery.com>
14861
14862 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14863
14864 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14865
14866 Fix gcc -flto compilation warning.
14867 * server.c (main): Make variable multi_mode and attach volatile.
14868
14869 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14870
14871 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14872 if the platform doesn't know about it.
14873
14874 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14875
14876 * Makefile.in (SFILES): Add linux-tile-low.c.
14877 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14878 * configure.srv: Handle tilegx-*-linux*.
14879 * linux-tile-low.c: New file.
14880
14881 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14882
14883 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14884
14885 2012-05-24 Pedro Alves <palves@redhat.com>
14886
14887 PR gdb/7205
14888
14889 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14890
14891 2012-05-24 Pedro Alves <palves@redhat.com>
14892
14893 PR gdb/7205
14894
14895 Replace target_signal with gdb_signal throughout.
14896
14897 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14898
14899 * linux-low.c (linux_store_registers): Avoid the copying sequence
14900 when no data has been retrieved by ptrace.
14901
14902 2012-05-22 Will Deacon <will.deacon@arm.com>
14903
14904 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14905 Include asm/ptrace.h.
14906 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14907 already defined.
14908
14909 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14910
14911 * linux-low.c (linux_store_registers): Don't re-retrieve data
14912 with ptrace that has already been obtained from /proc. Always
14913 copy any data retrieved with ptrace to the buffer supplied.
14914
14915 2012-05-11 Yao Qi <yao@codesourcery.com>
14916 Pedro Alves <palves@redhat.com>
14917
14918 * linux-low.c (enum stopping_threads_kind): New.
14919 (stopping_threads): Change type to `enum stopping_threads_kind'.
14920 (handle_extended_wait): If stopping and suspending threads, leave
14921 the new_lwp suspended too.
14922 (linux_wait_for_event): Adjust.
14923 (stop_all_lwps): Set `stopping_threads' to
14924 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14925 whether we're suspending threads or just stopping them. Assert no
14926 recursion happens.
14927
14928 2012-04-29 Yao Qi <yao@codesourcery.com>
14929
14930 * server.h: Move some code to ...
14931 * gdbthread.h: ... here. New.
14932 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14933 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14934 (nto-low.o, win32-low.o): Likewise.
14935 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14936 * regcache.c, remote-utils.c, server.c: Likewise.
14937 * target.c, tracepoint.c, win32-low.c: Likewise.
14938
14939 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14940
14941 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14942 (PTRACE_ARG4_TYPE): Likewise.
14943 (PTRACE_XFER_TYPE): Likewise.
14944 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14945 ptrace to PTRACE_ARG3_TYPE.
14946 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14947 (PTRACE_ARG4_TYPE): Likewise.
14948 (PTRACE_XFER_TYPE): Likewise.
14949 (linux_detach_one_lwp): Cast fourth argument of
14950 ptrace to long then PTRACE_ARG4_TYPE.
14951 (regsets_fetch_inferior_registers): Cast third argument of
14952 ptrace to long then PTRACE_ARG3_TYPE.
14953 (regsets_store_inferior_registers): Likewise.
14954
14955 2012-04-20 Pedro Alves <palves@redhat.com>
14956
14957 * configure: Regenerate.
14958
14959 2012-04-19 Pedro Alves <palves@redhat.com>
14960
14961 * Makefile.in (GNULIB_BUILDDIR): New.
14962 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14963 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14964 (all, install-only, uninstall, clean-info, all-lib, clean): No
14965 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14966 (maintainer-clean realclean distclean): Use subdir_do.
14967 (subdir_do): New.
14968 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14969 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14970 * acinclude.m4: Include acx_configure_dir.m4.
14971 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14972 calls. Call AC_PROG_RANLIB. Configure gnulib using
14973 ACX_CONFIGURE_DIR.
14974 (GNULIB): New.
14975 (GNULIB_STDINT_H): Adjust.
14976 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14977 * gdbreplay.c: Include build-gnulib/config.h.
14978 * server.h: Likewise.
14979 * aclocal.m4: Regenerate.
14980 * config.in: Regenerate.
14981 * configure: Regenerate.
14982
14983 2012-04-19 Pedro Alves <palves@redhat.com>
14984
14985 * Makefile.in (LIBGNU, INCGNU): Adjust.
14986 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14987 (all, install-only, uninstall, clean-info, all-lib, clean)
14988 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14989 * configure.ac: Adjust AC_OUTPUT output.
14990 * aclocal.m4: Regenerate.
14991 * configure: Regenerate.
14992
14993 2012-04-19 Pedro Alves <palves@redhat.com>
14994
14995 * Makefile.in (generated_files): New.
14996 (server_h): Remove the explicit dependency on config.h, and depend
14997 on $generated_files.
14998
14999 2012-04-19 Pedro Alves <palves@redhat.com>
15000
15001 * Makefile.in (INCGNU): Add -Ignulib.
15002
15003 2012-04-19 Pedro Alves <palves@redhat.com>
15004
15005 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15006 (INCGNU): ... this, and spell out -I here.
15007 (GNULIB_LIB): Rename to ...
15008 (LIBGNU): ... this.
15009 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15010
15011 2012-04-19 Pedro Alves <palves@redhat.com>
15012
15013 * config.in: Regenerate.
15014
15015 2012-04-19 Pedro Alves <palves@redhat.com>
15016
15017 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15018 * server.h (memmem): Remove declaration.
15019 * config.in: Regenerate.
15020 * configure: Regenerate.
15021
15022 2012-04-19 Yao Qi <yao@codesourcery.com>
15023
15024 * Makefile.in (SFILES): Add common/vec.c.
15025 (OBS): Add vec.o.
15026 (vec.o): New rule.
15027
15028 2012-04-19 Yao Qi <yao@codesourcery.com>
15029
15030 * remote-utils.c (prepare_resume_reply): Replace with macro
15031 target_core_of_thread.
15032 * server.c (handle_qxfer_threads_proper): Likewise.
15033 * target.h (traget_core_of_thread): New macro.
15034
15035 2012-04-18 Pedro Alves <palves@redhat.com>
15036
15037 * aclocal.m4: Regenerate.
15038 * configure: Regenerate.
15039
15040 2012-04-16 Yao Qi <yao@codesourcery.com>
15041
15042 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15043 duplicated on address.
15044
15045 2012-04-16 Yao Qi <yao@codesourcery.com>
15046
15047 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15048 (struct tracepoint_action_ops) <send>: New field.
15049 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15050 (agent_expr_send, x_tracepoint_action_send): New.
15051 (l_tracepoint_action_send): New.
15052 (cmd_qtdp): Download and install tracepoint
15053 according to `use_agent'.
15054 (run_inferior_command): Add one more parameter `len'.
15055 Update callers.
15056 (tracepoint_send_agent): New.
15057 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15058
15059 2012-04-16 Yao Qi <yao@codesourcery.com>
15060
15061 * tracepoint.c (download_tracepoints): Moved to ...
15062 (cmd_qtstart): ... here.
15063
15064 2012-04-14 Yao Qi <yao@codesourcery.com>
15065
15066 * tracepoint.c: Include inttypes.h.
15067 (struct collect_memory_action): Use sized types.
15068 (struct tracepoint): Likewise.
15069 (cmd_qtdp, stop_tracing): Update print specifiers.
15070 (cmd_qtp, response_tracepoint): Likewise.
15071 (collect_data_at_tracepoint): Likewise.
15072 (collect_data_at_step): Likewise.
15073
15074 2012-04-14 Yao Qi <yao@codesourcery.com>
15075
15076 Import gnulib module inttypes.
15077 * aclocal.m4, config.in, configure: Regenerated.
15078
15079 2012-04-14 Yao Qi <yao@codesourcery.com>
15080
15081 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15082 Makefile and config.status at last.
15083
15084 2012-04-13 Yao Qi <yao@codesourcery.com>
15085
15086 * tracepoint.c: Include stdint.h unconditionally.
15087
15088 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15089
15090 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15091 on BFD_HAVE_SYS_PROCFS_TYPE.
15092 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15093 * configure: Regenerate.
15094 * config.in: Likewise.
15095
15096 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15097
15098 * Makefile.in (clean): Also remove x32.c x32-linux.c
15099 x32-avx.c x32-avx-linux.c.
15100 (x32.o): New target.
15101 (x32.c): Likewise.
15102 (x32-linux.o): Likewise.
15103 (x32-linux.c): Likewise.
15104 (x32-avx.o): Likewise.
15105 (x32-avx.c): Likewise.
15106 (x32-avx-linux.o): Likewise.
15107 (x32-avx-linux.c): Likewise.
15108
15109 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15110 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15111 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15112 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15113 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15114 i386/x32-avx-linux.xml.
15115
15116 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15117 (init_registers_x32_avx_linux): Likwise.
15118 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15119 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15120
15121 2012-04-13 Pedro Alves <palves@redhat.com>
15122
15123 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15124 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15125 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15126 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15127 the sub-make.
15128
15129 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15130
15131 * linux-x86-low.c (compat_x32_clock_t): New.
15132 (compat_x32_siginfo_t): Likewise.
15133 (compat_x32_siginfo_from_siginfo): Likewise.
15134 (siginfo_from_compat_x32_siginfo): Likewise.
15135 (linux_is_elf64): Likewise.
15136 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15137 and siginfo_from_compat_x32_siginfo for x32.
15138 (x86_arch_setup): Set linux_is_elf64.
15139
15140 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15141
15142 PR gdb/13969
15143 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15144 e_machine field.
15145 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15146 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15147 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15148 compatible with process.
15149
15150 2012-04-12 Yao Qi <yao@codesourcery.com>
15151
15152 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15153 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15154 (install-only, install-info, clean): Handle sub dir gnulib.
15155 (all-lib, am--refresh): New targets.
15156 (memmem.o): Remove target.
15157 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15158 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15159 (AC_REPLACE_FUNCS): Remove memmem.
15160 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15161 (AC_OUTPUT): Generate Makefile in gnulib/.
15162 * aclocal.m4, config.in, configure: Regenerated.
15163
15164 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15165
15166 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15167
15168 2012-04-05 Pedro Alves <palves@redhat.com>
15169
15170 -Werror=strict-aliasing
15171
15172 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15173 pointer.
15174
15175 2012-04-04 Pedro Alves <palves@redhat.com>
15176
15177 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15178 (sparc_store_gregset_from_stack, sparc_store_gregset)
15179 (sparc_breakpoint_at): Fix formatting.
15180
15181 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15182
15183 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15184 are available.
15185 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15186 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15187 * config.in: Regenerate.
15188 * configure: Likewise.
15189
15190 2012-03-29 Pedro Alves <palves@redhat.com>
15191
15192 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15193 Correct ptrace arguments.
15194
15195 2012-03-28 Pedro Alves <palves@redhat.com>
15196
15197 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15198 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15199 (IA64_FR1_REGNUM): New defines.
15200 (ia64_fetch_register): New.
15201 (the_low_target): Install it.
15202 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15203 field.
15204 * linux-low.c (linux_fetch_registers): Try the
15205 the_low_target.fetch_register hook first.
15206
15207 * linux-arm-low.c (the_low_target): Adjust.
15208 * linux-bfin-low.c (the_low_target): Adjust.
15209 * linux-cris-low.c (the_low_target): Adjust.
15210 * linux-crisv32-low.c (the_low_target): Adjust.
15211 * linux-m32r-low.c (the_low_target): Adjust.
15212 * linux-m68k-low.c (the_low_target): Adjust.
15213 * linux-mips-low.c (the_low_target): Adjust.
15214 * linux-ppc-low.c (the_low_target): Adjust.
15215 * linux-s390-low.c (the_low_target): Adjust.
15216 * linux-sh-low.c (the_low_target): Adjust.
15217 * linux-sparc-low.c (the_low_target): Adjust.
15218 * linux-tic6x-low.c (the_low_target): Adjust.
15219 * linux-x86-low.c (the_low_target): Adjust.
15220 * linux-xtensa-low.c (the_low_target): Adjust.
15221
15222 2012-03-26 Pedro Alves <palves@redhat.com>
15223
15224 * server.c (handle_qxfer_libraries): Don't bail early if
15225 the_target->qxfer_libraries_svr4 is not NULL.
15226
15227 2012-03-26 Pedro Alves <palves@redhat.com>
15228
15229 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15230
15231 2012-03-23 Pedro Alves <palves@redhat.com>
15232
15233 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15234 "library-list-svr4" element's start tag when the the DSO list is
15235 empty.
15236
15237 2012-03-23 Pedro Alves <palves@redhat.com>
15238
15239 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15240 a variable whose type size is the same as the inferior's pointer
15241 size.
15242
15243 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15244
15245 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15246 struct siginfo.
15247 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15248 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15249 * linux-low.h: Include <signal.h>.
15250 (struct siginfo): Remove forward declaration.
15251 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15252 struct siginfo.
15253
15254 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15255
15256 * .gitignore: Ignore more files.
15257
15258 2012-03-19 Pedro Alves <palves@redhat.com>
15259 Jan Kratochvil <jan.kratochvil@redhat.com>
15260
15261 * server.c (cont_thread, general_thread): Add describing comments.
15262 (start_inferior): Clear `cont_thread'.
15263 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15264 of a process.
15265
15266 2012-03-15 Yao Qi <yao@codesourcery.com>
15267
15268 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15269 handling to ...
15270 (cmd_qtdp): ... here.
15271
15272 2012-03-15 Yao Qi <yao@codesourcery.com>
15273
15274 * tracepoint.c (struct tracepoint_action_ops): New.
15275 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15276 (m_tracepoint_action_download): New.
15277 (r_tracepoint_action_download): New.
15278 (x_tracepoint_action_download): New.
15279 (l_tracepoint_action_download): New.
15280 (add_tracepoint_action): Install `action->ops' according type.
15281 (download_tracepoint_1): Move code `download' function pointer
15282 of various tracepoint_action_ops.
15283
15284 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15285
15286 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15287 linux_ptrace_attach_warnings.
15288
15289 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15290
15291 * Makefile.in (linux-ptrace.o): New.
15292 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15293 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15294 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15295 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15296 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15297 of these targets.
15298 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15299
15300 2012-03-08 Yao Qi <yao@codesourcery.com>
15301 Pedro Alves <palves@redhat.com>
15302
15303 Fix PR server/13392.
15304 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15305 offset of JMP insn.
15306 * tracepoint.c (remove_tracepoint): New.
15307 (cmd_qtdp): Call remove_tracepoint when failed to install.
15308
15309 2012-03-07 Pedro Alves <palves@redhat.com>
15310
15311 * linux-low.c (get_detach_signal): New.
15312 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15313 Pass on pending signals to PTRACE_DETACH. Check the result of the
15314 ptrace call.
15315 * server.c (program_signals, program_signals_p): New.
15316 (handle_general_set): Handle QProgramSignals.
15317 * server.h (program_signals, program_signals_p): Declare.
15318
15319 2012-03-05 Pedro Alves <palves@redhat.com>
15320 Jan Kratochvil <jan.kratochvil@redhat.com>
15321
15322 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15323 New comment why.
15324
15325 2012-03-03 Yao Qi <yao@codesourcery.com>
15326
15327 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15328 agent_look_up_symbols.
15329
15330 2012-03-03 Yao Qi <yao@codesourcery.com>
15331
15332 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15333 (linux-x86-low.o): Likewise.
15334 * server.h: Remove in_process_agent_loaded.
15335 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15336 common/agent.c.
15337 Update callers.
15338
15339 2012-03-03 Yao Qi <yao@codesourcery.com>
15340
15341 * tracepoint.c (gdb_agent_capability): New global.
15342 (in_process_agent_loaded_ust): Renamed to
15343 `in_process_agent_supports_ust'.
15344 Update callers.
15345 (in_process_agent_supports_ust): Call agent_capability_check.
15346 (clear_installed_tracepoints): Assert that agent supports
15347 agent.
15348
15349 2012-03-03 Yao Qi <yao@codesourcery.com>
15350
15351 * linux-low.c (linux_supports_agent): New.
15352 (linux_target_ops): Initialize field `supports_agent' with
15353 linux_supports_agent.
15354 * target.h (struct target_ops) <supports_agent>: New.
15355 (target_supports_agent): New macro.
15356 * server.c (handle_general_set): Handle packet 'QAgent'.
15357 (handle_query): Send `QAgent+'.
15358 * Makefile.in (server.o): Depends on agent.h.
15359
15360 2012-03-03 Yao Qi <yao@codesourcery.com>
15361
15362 * Makefile.in (OBS): Add agent.o.
15363 Add new rule for agent.o.
15364 Track dependence of tracepoint.c on agent.h.
15365 * tracepoint.c (run_inferior_command_1):
15366 (run_inferior_command): Call agent_run_command.
15367 (gdb_ust_connect_sync_socket): Deleted. Move it to
15368 common/agent.c.
15369 (resume_thread, stop_thread): Likewise.
15370 (gdb_ust_socket_init): Renamed to ...
15371 (gdb_agent_socket_init): ... New.
15372 (gdb_ust_thread): Renamed to ...
15373 (gdb_agent_helper_thread): ... New.
15374 (gdb_ust_init): Move some code to ...
15375 (gdb_agent_init): ... here. New.
15376 [HAVE_UST]: Call gdb_ust_init.
15377 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15378 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15379 * config.in, configure: Regenerated.
15380
15381 2012-03-02 Pedro Alves <palves@redhat.com>
15382
15383 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15384 * linux-low.c (struct simple_pid_list): New.
15385 (stopped_pids): New a struct simple_pid_list pointer.
15386 (add_to_pid_list, pull_pid_from_list): New.
15387 (handle_extended_wait): Don't assume the first signal new children
15388 report is SIGSTOP. Adjust call to pull_pid_from_list.
15389 (linux_wait_for_lwp): Adjust.
15390
15391 2012-03-02 Yao Qi <yao@codesourcery.com>
15392
15393 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15394 debug log.
15395
15396 2012-03-02 Yao Qi <yao@codesourcery.com>
15397
15398 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15399 `stop_pc' and `tpoint'. Update caller.
15400
15401 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15402
15403 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15404 * linux-low.c (use_linux_regsets): New macro.
15405 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15406 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15407 (linux_register_in_regsets): New function.
15408 (usr_fetch_inferior_registers): Skip registers covered by
15409 regsets.
15410 (usr_store_inferior_registers): Likewise.
15411 (usr_fetch_inferior_registers): New macro.
15412 (usr_store_inferior_registers): Likewise.
15413 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15414 (linux_store_registers): Likewise.
15415 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15416 prototype.
15417 (init_registers_mips64_dsp_linux): Likewise.
15418 (init_registers_mips_linux): New macro.
15419 (init_registers_mips_dsp_linux): Likewise.
15420 (mips_dsp_num_regs): Likewise.
15421 (DSP_BASE, DSP_CONTROL): New fallback macros.
15422 (mips_base_regs): New macro.
15423 (mips_regmap): Use it. Fix the size.
15424 (mips_dsp_regmap): New variable.
15425 (mips_dsp_regset_bitmap): Likewise.
15426 (mips_arch_setup): New function.
15427 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15428 than mips_regmap.
15429 (mips_cannot_store_register): Likewise.
15430 (the_low_target): Update .arch_setup, .num_regs and .regmap
15431 initializers. Add .regset_bitmap initializer.
15432 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15433 initializer.
15434 * linux-bfin-low.c (the_low_target): Likewise.
15435 * linux-cris-low.c (the_low_target): Likewise.
15436 * linux-crisv32-low.c (the_low_target): Likewise.
15437 * linux-ia64-low.c (the_low_target): Likewise.
15438 * linux-m32r-low.c (the_low_target): Likewise.
15439 * linux-m68k-low.c (the_low_target): Likewise.
15440 * linux-ppc-low.c (the_low_target): Likewise.
15441 * linux-s390-low.c (the_low_target): Likewise.
15442 * linux-sh-low.c (the_low_target): Likewise.
15443 * linux-sparc-low.c (the_low_target): Likewise.
15444 * linux-tic6x-low.c (the_low_target): Likewise.
15445 * linux-x86-low.c (the_low_target): Likewise.
15446 * linux-xtensa-low.c (the_low_target): Likewise.
15447 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15448 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15449 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15450 srv_xmlfiles.
15451 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15452 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15453
15454 2012-02-29 Yao Qi <yao@codesourcery.com>
15455 Pedro Alves <palves@redhat.com>
15456
15457 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15458 `step_over_finished' is true.
15459
15460 2012-02-27 Pedro Alves <palves@redhat.com>
15461
15462 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15463 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15464
15465 2012-02-27 Pedro Alves <palves@redhat.com>
15466
15467 PR server/9684
15468 * linux-low.c (pid_is_stopped): New.
15469 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15470
15471 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15472
15473 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15474 of conditions.
15475
15476 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15477
15478 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15479
15480 2012-02-24 Luis Machado <lgustavo@codesourcery>
15481
15482 * server.c (handle_query): Advertise support for target-side
15483 breakpoint condition evaluation.
15484 (process_point_options): New function.
15485 (process_serial_event): When inserting a breakpoint, check for
15486 a target-side condition that should be evaluated.
15487
15488 * mem-break.c: Include regcache.h and ax.h.
15489 (point_cond_list_t): New data structure.
15490 (breakpoint) <cond_list>: New field.
15491 (find_gdb_breakpoint_at): Make non-static.
15492 (delete_gdb_breakpoint_at): Clear any target-side
15493 conditions.
15494 (clear_gdb_breakpoint_conditions): New function.
15495 (add_condition_to_breakpoint): Likewise.
15496 (add_breakpoint_condition): Likewise.
15497 (gdb_condition_true_at_breakpoint): Likewise.
15498 (gdb_breakpoint_here): Return result directly instead
15499 of going through a local variable.
15500
15501 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15502 (clear_gdb_breakpoint_conditions): Likewise.
15503 (add_breakpoint_condition): Likewise.
15504 (gdb_condition_true_at_breakpoint): Likewise.
15505
15506 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15507 (need_step_over_p): Take target-side breakpoint condition into
15508 consideration.
15509
15510 2012-02-24 Luis Machado <lgustavo@codesourcery>
15511
15512 * server.h: Include tracepoint.h.
15513 (agent_mem_read, agent_get_trace_state_variable_value,
15514 agent_set_trace_state_variable_value,
15515 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15516 get_set_tsv_func_addr): New prototypes.
15517
15518 * ax.h: New include file.
15519 * ax.c: New source file.
15520
15521 * tracepoint.c: Include ax.h.
15522 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15523 agent_expr, eval_result_type): Move to ax.h.
15524 (parse_agent_expr): Rename to ...
15525 (gdb_parse_agent_expr): ... this, make it non-static and move
15526 to ax.h.
15527 (unparse_agent_expr) Rename to ...
15528 (gdb_unparse_agent_expr): ... this, make it non-static and move
15529 to ax.h.
15530 (eval_agent_expr): Rename to ...
15531 (eval_tracepoint_agent_expr): ... this.
15532 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15533 forward declarations.
15534 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15535 (agent_get_trace_state_variable_value): New function.
15536 (agent_set_trace_state_variable_value): New function.
15537 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15538 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15539 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15540 (condition_true_at_tracepoint): Likewise.
15541 (parse_agent_expr): Rename to ...
15542 (gdb_parse_agent_expr): ... this and move to ax.c.
15543 (unparse_agent_expr): Rename to ...
15544 (gdb_unparse_agent_expr): ... this and move to ax.c.
15545 (gdb_agent_op_name): Move to ax.c.
15546 (eval_agent_expr): Rename to ...
15547 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15548 and move to ax.c.
15549 (eval_tracepoint_agent_expr): New function.
15550 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15551 non-static.
15552 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15553 ax.c.
15554 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15555 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15556 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15557 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15558 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15559 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15560 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15561 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15562 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15563 (compile_bytecodes): Remove forward declaration.
15564 (is_goto_target): Move to ax.c.
15565 (compile_bytecodes): Move to ax.c and call
15566 agent_get_trace_state_variable_value (...) and
15567 agent_set_trace_state_variable_value (...).
15568
15569 * Makefile.in: Update ax.c and IPA dependencies.
15570
15571 2012-02-24 Pedro Alves <palves@redhat.com>
15572
15573 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15574 (cmd_bigqtbuffer_circular): ... this. Only handle
15575 'QTBuffer:circular:'.
15576 (handle_tracepoint_general_set): Adjust.
15577
15578 2012-02-16 Yao Qi <yao@codesourcery.com>
15579
15580 * inferiors.c: Move code to ...
15581 * dll.c: .... here. New.
15582 * server.h: Declare clear_dlls.
15583 * Makefile.in (SFILES): Add dll.c.
15584 (OBS): Add dll.o
15585 (dll.o): New rule.
15586
15587 2012-02-11 Yao Qi <yao@codesourcery.com>
15588
15589 * server.c: (handle_monitor_command): Add a new parameter
15590 `own_buf'.
15591 (handle_query): Update caller.
15592
15593 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15594
15595 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15596 * configure, config.in: Regenerate.
15597 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15598 is not defined.
15599
15600 2012-02-02 Pedro Alves <palves@redhat.com>
15601
15602 Try SIGKILL first, then PTRACE_KILL.
15603 * linux-low.c (linux_kill_one_lwp): New.
15604 (linux_kill_one_lwp): Rename to ...
15605 (kill_one_lwp_callback): ... this. Use the new
15606 linux_kill_one_lwp.
15607
15608 2012-02-02 Pedro Alves <palves@redhat.com>
15609
15610 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15611 inferior.
15612
15613 2012-01-27 Pedro Alves <palves@redhat.com>
15614
15615 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15616 (elf_64_file_p): Make static.
15617 (linux_pid_exe_is_elf_64_file): New.
15618 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15619 Delete declarations.
15620 (linux_pid_exe_is_elf_64_file): Declare.
15621 * linux-x86-low.c (x86_arch_setup): Use
15622 linux_pid_exe_is_elf_64_file.
15623
15624 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15625
15626 * linux-low.c (linux_wait_for_event_1): Rename to ...
15627 (linux_wait_for_event): ... here and merge it with former
15628 linux_wait_for_event - new variable wait_ptid, use it.
15629 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15630
15631 2012-01-23 Pedro Alves <palves@redhat.com>
15632
15633 * server.c (main): Avoid yet another case of infinite loop while
15634 detaching/killing after a longjmp.
15635
15636 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15637
15638 Code cleanup.
15639 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15640
15641 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15642
15643 * hostio.c (handle_readlink): New function.
15644 (handle_vFile): Call it to handle "vFile:readlink" packets.
15645
15646 2012-01-20 Pedro Alves <palves@redhat.com>
15647 Ulrich Weigand <ulrich.weigand@linaro.org>
15648
15649 * server.c (handle_v_requests): Only support vAttach and vRun to
15650 start multiple processes when in extended protocol mode.
15651
15652 2012-01-17 Pedro Alves <palves@redhat.com>
15653
15654 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15655 memalign plus mprotect to allocate the scratch buffer.
15656
15657 2012-01-13 Pedro Alves <palves@redhat.com>
15658
15659 * server.c (attach_inferior): Clear `cont_thread'.
15660
15661 2012-01-13 Pedro Alves <palves@redhat.com>
15662
15663 * server.c (main): Avoid infinite loop while detaching/killing
15664 after a longjmp.
15665
15666 2012-01-09 Doug Evans <dje@google.com>
15667
15668 * server.c (start_inferior): Set last_ptid in --wrapper case.
15669
15670 2012-01-06 Yao Qi <yao@codesourcery.com>
15671
15672 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15673 defined.
15674 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15675
15676 2012-01-04 Yao Qi <yao@codesourcery.com>
15677
15678 * tracepoint.c (cmd_qtdp): Print debug message
15679 for static tracepoint.
15680
15681 2012-01-04 Yao Qi <yao@codesourcery.com>
15682
15683 * tracepoint.c (trace_vdebug): Differentiate debug message
15684 between gdbserver and IPA.
15685
15686 2012-01-03 Yao Qi <yao@codesourcery.com>
15687
15688 * tracepoint.c (tracepoint_was_hit): Don't collect for
15689 static tracepoint.
15690
15691 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15692
15693 * terminal.h: Reformat copyright header.
15694
15695 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15696
15697 * server.c (gdbserver_version): Update copyright year.
15698 * gdbreplay.c (gdbreplay_version): Likewise.
15699
15700 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15701
15702 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15703
15704 Revert:
15705 2011-12-18 Hui Zhu <teawater@gmail.com>
15706 * linux-low.c (linux_create_inferior): Save return value to ret.
15707
15708 2011-12-18 Hui Zhu <teawater@gmail.com>
15709
15710 * linux-low.c (linux_create_inferior): Save return value to ret.
15711
15712 2011-12-16 Doug Evans <dje@google.com>
15713
15714 * linux-low.c (linux_create_inferior): If stdio connection,
15715 redirect stdin from /dev/null, stdout to stderr.
15716 * remote-utils.c (remote_is_stdio): New static global.
15717 (remote_connection_is_stdio): New function.
15718 (remote_prepare): Handle stdio connection.
15719 (remote_open): Ditto.
15720 (remote_close): Don't close stdin for stdio connections.
15721 (read_prim,write_prim): New functions. Replace all calls to
15722 read/write to these.
15723 * server.c (main): Watch for "-" argument. Move call to
15724 remote_prepare before start_inferior.
15725 * server.h (STDIO_CONNECTION_NAME): New macro.
15726 (remote_connection_is_stdio): Declare.
15727
15728 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15729 in debugging output.
15730
15731 2011-12-15 Yao Qi <yao@codesourcery.com>
15732
15733 * tracepoint.c: Include sys/syscall.h.
15734 (gdb_ust_thread): Remove preprocessor conditional.
15735
15736 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15737
15738 * linux-low.c (linux_detach_one_lwp): Call
15739 the_low_target.prepare_to_resume before detaching.
15740
15741 2011-12-14 Yao Qi <yao@codesourcery.com>
15742
15743 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15744 of write.
15745
15746 2011-12-14 Yao Qi <yao@codesourcery.com>
15747
15748 * i386-low.c (i386_low_stopped_data_address): Initialize local
15749 variable `control'.
15750
15751 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15752
15753 PR remote/13492
15754
15755 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15756 DR_CONTROL unless necessary. Extend comments.
15757 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15758 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15759
15760 2011-12-13 Yao Qi <yao@codesourcery.com>
15761
15762 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15763 macros.
15764 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15765
15766 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15767
15768 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15769 Print new debug message for such case.
15770
15771 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15772
15773 Fix overlapping memcpy.
15774 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15775 the read_inferior_memory transfer.
15776 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15777 write_inferior_memory transfer.
15778 (set_fast_tracepoint_jump): New variable buf. Use it for the
15779 read_inferior_memory and write_inferior_memory transfers.
15780 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15781 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15782 Use it for the write_inferior_memory transfer.
15783 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15784 buffers.
15785
15786 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15787
15788 * linux-low.c (fetch_register, store_register): Make code
15789 consistent, fix formatting.
15790
15791 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15792
15793 * linux-low.c (usr_store_inferior_registers): Factor out code
15794 to handle individual registers into...
15795 (store_register): ... this new function.
15796
15797 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15798
15799 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15800 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15801 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15802 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15803 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15804 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15805 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15806 (srv_xmlfiles): Add new XML files.
15807
15808 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15809 and <sys/uio.h>.
15810 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15811 (init_registers_s390_linux32v1): Add prototype.
15812 (init_registers_s390_linux32v2): Likewise.
15813 (init_registers_s390_linux64v1): Likewise.
15814 (init_registers_s390_linux64v2): Likewise.
15815 (init_registers_s390x_linux64v1): Likewise.
15816 (init_registers_s390x_linux64v2): Likewise.
15817 (s390_num_regs): Increment to 52.
15818 (s390_regmap): Add orig_r2 register.
15819 (s390_num_regs_3264): Increment to 68.
15820 (s390_regmap_3264): Add orig_r2 register.
15821 (s390_collect_ptrace_register): Handle orig_r2 register.
15822 (s390_supply_ptrace_register): Likewise.
15823 (s390_fill_last_break): New function.
15824 (s390_store_last_break): Likewise.
15825 (s390_fill_system_call): New function.
15826 (s390_store_system_call): Likewise.
15827 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15828 register sets.
15829 (s390_check_regset): New function.
15830 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15831 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15832 Update target_regsets for available register sets.
15833
15834 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15835 Jan Kratochvil <jan.kratochvil@redhat.com>
15836
15837 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15838 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15839 New.
15840 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15841 * linux-low.h (struct process_info_private): New member r_debug.
15842 * server.c (handle_qxfer_libraries): Call
15843 the_target->qxfer_libraries_svr4.
15844 (handle_qxfer_libraries_svr4): New function.
15845 (qxfer_packets): New entry "libraries-svr4".
15846 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15847 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15848 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15849 PACKET_qXfer_libraries_svr4.
15850
15851 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15852
15853 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15854 PSW address/mask between 8-byte and 16-byte formats.
15855 (s390_supply_ptrace_register): Likewise.
15856 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15857 basic addressing mode bit.
15858
15859 2011-11-24 Stan Shebs <stan@codesourcery.com>
15860
15861 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15862
15863 2011-11-17 Stan Shebs <stan@codesourcery.com>
15864
15865 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15866 (tracing_start_time): New global.
15867 (tracing_stop_time): New global.
15868 (tracing_user_name): New global.
15869 (tracing_notes): New global.
15870 (tracing_stop_note): New global.
15871 (cmd_qtstart): Set traceframe_usage, start_time.
15872 (stop_tracing): Set stop_time.
15873 (cmd_qtstatus): Report additional status.
15874 (cmd_qtp): New function.
15875 (handle_tracepoint_query): Call it.
15876 (cmd_qtnotes): New function.
15877 (handle_tracepoint_general_set): Call it.
15878 (get_timestamp): Rename from tsv_get_timestamp.
15879
15880 2011-11-14 Stan Shebs <stan@codesourcery.com>
15881 Kwok Cheung Yeung <kcy@codesourcery.com>
15882
15883 * linux-x86-low.c (small_jump_insn): New.
15884 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15885 trampoline and error message, build a trampoline and issue a small
15886 jump instruction to it.
15887 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15888 trampoline and error message.
15889 (x86_get_min_fast_tracepoint_insn_len): New.
15890 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15891 * linux-low.h (struct linux_target_ops): Add arguments to
15892 install_fast_tracepoint_jump_pad operation, add new operation.
15893 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15894 arguments.
15895 (linux_get_min_fast_tracepoint_insn_len): New function.
15896 (linux_target_op): Add new operation.
15897 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15898 (gdb_trampoline_buffer_end): Ditto.
15899 (gdb_trampoline_buffer_error): Ditto.
15900 (struct ipa_sym_addresses): Add fields for new IPA variables.
15901 (symbol_list): Add entries for new IPA variables.
15902 (struct tracepoint): Add fields to hold the address range of the
15903 trampoline used by the tracepoint.
15904 (trampoline_buffer_head): New static variable.
15905 (trampoline_buffer_tail): Ditto.
15906 (claim_trampoline_space): New function.
15907 (have_fast_tracepoint_trampoline_buffer): New function.
15908 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15909 structure.
15910 (install_fast_tracepoint): Ditto, also add error buffer argument.
15911 (cmd_qtminftpilen): New function.
15912 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15913 (fast_tracepoint_from_trampoline_address): New function.
15914 (fast_tracepoint_collecting): Handle trampoline as part of jump
15915 pad space.
15916 (set_trampoline_buffer_space): New function.
15917 (initialize_tracepoint): Initialize new IPA variables.
15918 * target.h (struct target_ops): Add arguments to
15919 install_fast_tracepoint_jump_pad operation, add new
15920 get_min_fast_tracepoint_insn_len operation.
15921 (target_get_min_fast_tracepoint_insn_len): New.
15922 (install_fast_tracepoint_jump_pad): Add arguments.
15923 * server.h (IPA_BUFSIZ): Define.
15924 * linux-i386-ipa.c: Include extra header files.
15925 (initialize_fast_tracepoint_trampoline_buffer): New function.
15926 (initialize_low_tracepoint): Call it.
15927 * server.h (set_trampoline_buffer_space): Declare.
15928 (claim_trampoline_space): Ditto.
15929 (have_fast_tracepoint_trampoline_buffer): Ditto.
15930
15931 2011-11-14 Yao Qi <yao@codesourcery.com>
15932
15933 * server.c (handle_query): Handle InstallInTrace for qSupported.
15934 * tracepoint.c (add_tracepoint): Sort list.
15935 (install_tracepoint, download_tracepoint): New.
15936 (cmd_qtdp): Call them to install and download tracepoints.
15937 (sort_tracepoints): Removed.
15938 (cmd_qtstart): Update.
15939
15940 2011-11-14 Yao Qi <yao@codesourcery.com>
15941
15942 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15943 * mem-break.h: Declare.
15944 * tracepoint.c (cmd_qtstart): Move some code to ...
15945 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15946 New.
15947 (download_tracepoints): Move some code to ...
15948 (download_tracepoint_1): ... here. New.
15949
15950 2011-11-08 Yao Qi <yao@codesourcery.com>
15951
15952 * remote-utils.c (relocate_instruction): A comment fix.
15953
15954 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15955
15956 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15957 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15958 dr_status_mirror and dr_control_mirror from debug_reg_state.
15959 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15960 (i386_initial_stuff): Remove use of deleted globals.
15961 (i386_get_thread_context, i386_set_thread_context,
15962 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15963 from debug_reg_state.
15964
15965 2011-11-05 Yao Qi <yao@codesourcery.com>
15966
15967 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15968 address as TPOINT's.
15969
15970 2011-11-02 Stan Shebs <stan@codesourcery.com>
15971
15972 * tracepoint.c (agent_mem_read_string): New function.
15973 (eval_agent_expr): Call it for tracenz.
15974 * server.c (handle_query): Report support for tracenz.
15975
15976 2011-11-02 Yao Qi <yao@codesourcery.com>
15977
15978 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15979
15980 2011-11-02 Yao Qi <yao@codesourcery.com>
15981
15982 * target.h: Fix a typo in comment.
15983
15984 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15985
15986 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15987 clobber the breakpoints' shadows with fast tracepoint jumps.
15988 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15989 * target.c (write_inferior_memory): Also pass MYADDR down to
15990 check_mem_write.
15991
15992 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
15993
15994 * configure.ac: Check support for personality routine.
15995 * configure: Regenerate.
15996 * config.in: Likewise.
15997 * linux-low.c: Include <sys/personality.h>.
15998 Define ADDR_NO_RANDOMIZE if necessary.
15999 (linux_create_inferior): Disable address space randomization when
16000 forking inferior, if requested.
16001 (linux_supports_disable_randomization): New function.
16002 (linux_target_ops): Install it.
16003 * server.h (disable_randomization): Declare.
16004 * server.c (disable_randomization): New global variable.
16005 (handle_general_set): Handle QDisableRandomization.
16006 (handle_query): Likewise for qSupported.
16007 (main): Support --disable-randomization and --no-disable-randomization
16008 command line arguments.
16009 * target.h (struct target_ops): Add supports_disable_randomization.
16010 (target_supports_disable_randomization): New macro.
16011
16012 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16013
16014 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16015 ifdef check.
16016 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16017 [!PT_GETDSBT] (target_loadmap): New definition.
16018 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16019 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16020 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16021 and PT_GETDSBT to LINUX_LOADMAP.
16022 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16023 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16024
16025 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16026
16027 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16028 (arm_linux_hwbp_cap): New static variable.
16029 (arm_linux_get_hwbp_cap): Replace by ...
16030 (arm_linux_init_hwbp_cap): ... this new function.
16031 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16032 (arm_linux_get_hw_watchpoint_count): Likewise.
16033 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16034 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16035 (arm_prepare_to_resume): Use perror_with_name instead of error.
16036
16037 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16038
16039 * linux-arm-low.c: Include <signal.h>.
16040 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16041 (struct arm_linux_hwbp_cap): New data type.
16042 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16043 (struct arm_linux_hw_breakpoint): New data type.
16044 (MAX_BPTS, MAX_WPTS): Define.
16045 (struct arch_process_info, struct arch_lwp_info): New data types.
16046 (arm_linux_get_hwbp_cap): New function.
16047 (arm_linux_get_hw_breakpoint_count): Likewise.
16048 (arm_linux_get_hw_watchpoint_count): Likewise.
16049 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16050 (arm_hwbp_control_initialize): Likewise.
16051 (arm_hwbp_control_is_enabled): Likewise.
16052 (arm_hwbp_control_is_initialized): Likewise.
16053 (arm_hwbp_control_disable): Likewise.
16054 (arm_linux_hw_breakpoint_equal): Likewise.
16055 (arm_linux_hw_point_initialize): Likewise.
16056 (struct update_registers_data): New data structure.
16057 (update_registers_callback: New function.
16058 (arm_insert_point): Likewise.
16059 (arm_remove_point): Likewise.
16060 (arm_stopped_by_watchpoint): Likewise.
16061 (arm_stopped_data_address): Likewise.
16062 (arm_new_process): Likewise.
16063 (arm_new_thread): Likewise.
16064 (arm_prepare_to_resume): Likewise.
16065 (the_low_target): Register arm_insert_point, arm_remove_point,
16066 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16067 arm_new_thread, and arm_prepare_to_resume.
16068
16069 2011-09-15 Stan Shebs <stan@codesourcery.com>
16070
16071 * server.h (struct emit_ops): Add compare-goto fields.
16072 * tracepoint.c (gdb_agent_op_sizes): New table.
16073 (emit_eq_goto): New function.
16074 (emit_ne_goto): New function.
16075 (emit_lt_goto): New function.
16076 (emit_le_goto): New function.
16077 (emit_gt_goto): New function.
16078 (emit_ge_goto): New function.
16079 (is_goto_target): New function.
16080 (compile_bytecodes): Recognize special cases of compare-goto
16081 combinations and call specialized emitters for them.
16082 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16083 (amd64_emit_ne_goto): New function.
16084 (amd64_emit_lt_goto): New function.
16085 (amd64_emit_le_goto): New function.
16086 (amd64_emit_gt_goto): New function.
16087 (amd64_emit_ge_goto): New function.
16088 (amd64_emit_ops): Add the new functions.
16089 (i386_emit_eq_goto): New function.
16090 (i386_emit_ne_goto): New function.
16091 (i386_emit_lt_goto): New function.
16092 (i386_emit_le_goto): New function.
16093 (i386_emit_gt_goto): New function.
16094 (i386_emit_ge_goto): New function.
16095 (i386_emit_ops): Add the new functions.
16096
16097 2011-09-08 Stan Shebs <stan@codesourcery.com>
16098
16099 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16100 (i386_emit_epilogue): Restore %ebx.
16101
16102 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16103
16104 * server.c (step_thread): Remove definition.
16105 (process_serial_event): Don't handle Hs.
16106 * server.h (step_thread): Remove declaration.
16107 * target.c (set_desired_inferior): Remove use of step_thread.
16108
16109 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16110
16111 * linux-low.c: Include linux-procfs.h.
16112 (linux_attach_lwp_1): Update comments.
16113 (linux_attach): Scan for existing threads when attaching to a
16114 process that is the tgid.
16115 * Makefile.in: Update dependencies.
16116
16117 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16118
16119 * configure.srv: Add linux-procfs.o dependencies.
16120
16121 2011-08-14 Yao Qi <yao@codesourcery.com>
16122
16123 * target.h (struct target_ops): Fix indent.
16124 * win32-low.c (win32_target_ops): Fix comment.
16125
16126 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16127 Yao Qi <yao@codesourcery.com>
16128
16129 * Makefile.in (clean): Remove tic6x-*.c files.
16130 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16131 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16132 (tic6x-c64xp-linux.c): Likewise.
16133 * configure.srv: Add support for tic6x-*-uclinux.
16134 * linux-tic6x-low.c: New.
16135 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16136
16137 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16138 Yao Qi <yao@codesourcery.com>
16139
16140 * target.h (struct target_ops): Add read_loadmap.
16141 * linux-low.c (struct target_loadseg): New type.
16142 (struct target_loadmap): New type.
16143 (linux_read_loadmap): New function.
16144 (linux_target_ops): Add linux_read_loadmap.
16145 * server.c (handle_query): Support qXfer:fdpic:read packet.
16146 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16147 to NULL.
16148
16149 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16150
16151 * win32-low.c: Include <stdint.h>.
16152
16153 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16154
16155 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16156 to the inferior here.
16157 (i386_remove_aligned_watchpoint): Ditto.
16158 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16159 fit part of the watchpoint in the debug registers.
16160 (i386_update_inferior_debug_regs): New.
16161 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16162 registers, and only update the inferior on success.
16163 (i386_low_remove_watchpoint): Ditto.
16164
16165 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16166
16167 * linux-low.c (compare_ints, unique, list_threads, show_process,
16168 linux_core_of_thread): Delete.
16169 (linux_target_ops): Change linux_core_of_thread to
16170 linux_common_core_of_thread.
16171 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16172 * utils.c (malloc_failure): Change type of argument.
16173 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16174 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16175 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16176 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16177 (IPA_OBJS): Add common-utils-ipa.o.
16178 (ptid_h, linux_osdata_h): New macros.
16179 (server_h): Add common/common-utils.h, common/xml-utils.h,
16180 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16181 common/ptid.h.
16182 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16183 ptid.o, buffer.o): New rules.
16184 (linux-low.o): Add common/linux-osdata.h as a dependency.
16185 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16186 * configure.ac: Add AC_HEADER_DIRENT check.
16187 * config.in: Regenerate.
16188 * configure: Regenerate.
16189 * remote-utils.c (xml_escape_text): Delete.
16190 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16191 buffer_xml_printf): Move to common/buffer.c.
16192 * server.c (main): Remove call to initialize_inferiors.
16193 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16194 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16195 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16196 internal_error, gdb_assert, gdb_assert_fail): Delete.
16197 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16198 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16199 common/buffer.h.
16200 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16201 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16202 initialize_inferiors): Delete.
16203
16204 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16205
16206 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16207 symbol error.
16208
16209 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16210
16211 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16212 assertion.
16213 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16214
16215 2011-05-26 Yao Qi <yao@codesourcery.com>
16216
16217 * Makefile.in (thread-db.o): Track dependence to
16218 common/gdb_thread_db.h.
16219 * thread-db.c: include gdb_thread_db.h from right place.
16220
16221 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16222
16223 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16224 __FILE__ and __LINE__ to internal_error.
16225
16226 2011-05-13 Doug Evans <dje@google.com>
16227
16228 * thread-db.c (try_thread_db_load_from_sdir): New function.
16229 (try_thread_db_load_from_dir): New function.
16230 (thread_db_load_search): Handle $sdir, ignore $pdir.
16231 Remove trying of system directories if search of
16232 libthread-db-search-path fails, that is now done via $sdir.
16233
16234 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16235
16236 * server.c (handle_query): Add EnableDisableTracepoints to the list
16237 of supported features.
16238 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16239 tracepoints.
16240 (cmd_qtenable_disable): New.
16241 (cmd_qtstart): Install tracepoints even if disabled.
16242 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16243 receiving a QTEnable or QTDisable packet.
16244 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16245 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16246 tracepoints.
16247 (gdb_probe): Skip data collection if static tracepoint is disabled.
16248
16249 2011-05-10 Doug Evans <dje@google.com>
16250
16251 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16252
16253 2011-05-04 Doug Evans <dje@google.com>
16254
16255 * linux-low.c (linux_join): Skip process lookup.
16256 * spu-low.c (spu_join): Ditto.
16257 * server.c (join_inferiors_callback): Delete.
16258 (process_serial_event): For 'D' packet (detach) call join_inferior
16259 directly.
16260
16261 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16262
16263 * README: Don't mention xscale*-*-linux*.
16264 * configure.srv (xscale*-*-linux*): Don't handle target.
16265
16266 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16267
16268 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16269 casting pointers.
16270 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16271 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16272 (i386_emit_void_call_2): Likewise.
16273
16274 2011-04-26 Yao Qi <yao@codesourcery.com>
16275
16276 * linux-low.c: Move common macros to linux-ptrace.h.
16277 Include linux-ptrace.h.
16278 * Makefile.in (linux_ptrace_h): New.
16279 (linux-low.o): Depends on linux-ptrace.h.
16280
16281 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16282
16283 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16284 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16285 (remote_prepare): New function with most of the TCP code from ...
16286 (remote_open): ... here. Detect PORT here unconditionally. Move also
16287 setting transport_is_reliable.
16288 * server.c (run_once): New variable.
16289 (gdbserver_usage): Document it.
16290 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16291 the first run if RUN_ONCE.
16292 * server.h (run_once, remote_prepare): New declarations.
16293
16294 2011-04-19 Tom Tromey <tromey@redhat.com>
16295
16296 * win32-low.c (handle_load_dll): Remove duplicate "the".
16297
16298 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16299
16300 Remove support for old Cygwin 1.5 versions.
16301 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16302 function to avoid warning.
16303 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16304 warning.
16305
16306 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16307
16308 * gdbserver/server.h (Macro _): Define it if not available.
16309
16310 2011-03-14 Michael Snyder <msnyder@vmware.com>
16311
16312 * hostio.c (handle_close): Remove unnecessary null test.
16313
16314 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16315
16316 * Makefile.in (maintainer-clean realclean distclean): Remove
16317 "make ... subdir_do" command.
16318
16319 2011-03-10 Michael Snyder <msnyder@vmware.com>
16320
16321 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16322
16323 * server.c (handle_v_run): Free alloced buffer on early return.
16324
16325 2011-03-09 Yao Qi <yao@codesourcery.com>
16326
16327 Revert:
16328 2011-03-04 Yao Qi <yao@codesourcery.com>
16329
16330 * Makefile.in: Remove GNU make feature --directory.
16331
16332 2011-03-05 Yao Qi <yao@codesourcery.com>
16333
16334 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16335 (subdir_do): New make target. Copied from gdb/Makefile.
16336 (maintainer-clean, realclean, distclean, clean): Call corresponding
16337 make targets in common/Makefile.
16338
16339 2011-02-11 Yao Qi <yao@codesourcery.com>
16340
16341 * configure.ac: Call AC_PROG_RANLIB.
16342 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16343 * configure: Regenerate.
16344
16345 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16346
16347 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16348
16349 2011-03-06 Yao Qi <yao@codesourcery.com>
16350
16351 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16352
16353 2011-03-05 Yao Qi <yao@codesourcery.com>
16354
16355 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16356 (subdir_do): New make target. Copied from gdb/Makefile.
16357 (maintainer-clean, realclean, distclean, clean): Call corresponding
16358 make targets in common/Makefile.
16359
16360 2011-03-04 Yao Qi <yao@codesourcery.com>
16361
16362 * Makefile.in: Remove GNU make feature --directory.
16363
16364 2011-03-04 Michael Snyder <msnyder@vmware.com>
16365
16366 * server.c (queue_stop_reply): Call xmalloc not malloc.
16367
16368 2011-03-02 Michael Snyder <msnyder@vmware.com>
16369
16370 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16371
16372 2011-02-28 Michael Snyder <msnyder@vmware.com>
16373
16374 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16375 (cmd_qtframe): Ditto.
16376 (cmd_qtbuffer): Ditto.
16377 (cmd_bigqtbuffer): Ditto.
16378
16379 * utils.c (decimal2str): Initialize 'width' to nine, then
16380 don't mess with it.
16381
16382 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16383
16384 * hostio.c (require_data): Free *data, not data.
16385
16386 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16387
16388 * hostio.c (require_data): Use free, not xfree.
16389
16390 2011-02-27 Michael Snyder <msnyder@vmware.com>
16391
16392 * server.c (handle_query): Discard unused value.
16393
16394 * hostio.c (require_data): Free malloc memory before returning
16395 error.
16396
16397 2011-02-26 Michael Snyder <msnyder@vmware.com>
16398
16399 * linux-low.c (list_threads): Call closedir for dirent.
16400
16401 2011-02-27 Michael Snyder <msnyder@vmware.com>
16402
16403 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16404 a case statement falls through.
16405
16406 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16407
16408 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16409 in comparison.
16410
16411 2011-02-26 Michael Snyder <msnyder@vmware.com>
16412
16413 * utils.c (decimal2str): Eliminate dead code and dead param.
16414 (pulongest): Drop dead param from call to decimal2str.
16415 (plongest): Ditto.
16416
16417 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16418
16419 Revert the following patch (not approved yet):
16420 2011-02-21 Hui Zhu <teawater@gmail.com>
16421 * tracepoint.c (tp_printf): New function.
16422 (eval_agent_expr): Handle gdb_agent_op_printf.
16423
16424 2011-02-21 Hui Zhu <teawater@gmail.com>
16425
16426 * tracepoint.c (tp_printf): New function.
16427 (eval_agent_expr): Handle gdb_agent_op_printf.
16428
16429 2011-02-18 Tom Tromey <tromey@redhat.com>
16430
16431 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16432 (tracepoint.o): Likewise.
16433 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16434 (gdb_agent_op_names): Likewise.
16435
16436 2011-02-18 Tom Tromey <tromey@redhat.com>
16437
16438 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16439 gdb_agent_op_rot>: New constants.
16440 (gdb_agent_op_names): Add pick and roll.
16441 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16442 cases.
16443
16444 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16445
16446 * aclocal.m4: Regenerated with aclocal-1.11.1.
16447
16448 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16449
16450 * server.c (handle_qxfer_traceframe_info): New.
16451 (qxfer_packets): Register "traceframe-info".
16452 (handle_query): Report support for qXfer:traceframe-info:read+.
16453 * tracepoint.c (match_blocktype): New.
16454 (traceframe_find_block_type): Rename to ...
16455 (traceframe_walk_blocks): ... this. Add callback filter argument,
16456 and use it.
16457 (traceframe_find_block_type): New, reimplemented on top of
16458 traceframe_walk_blocks.
16459 (build_traceframe_info_xml): New.
16460 (traceframe_read_info): New.
16461 * server.h (traceframe_read_info): Declare.
16462
16463 2011-02-11 Yao Qi <yao@codesourcery.com>
16464
16465 * configure.ac: Call AC_PROG_RANLIB.
16466 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16467 * configure: Regenerate.
16468
16469 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16470
16471 * server.c (gdb_read_memory): Change return semantics to allow
16472 partial transfers.
16473 (handle_search_memory_1): Adjust.
16474 (process_serial_event) <'m' packet>: Handle partial transfers.
16475 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16476
16477 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16478
16479 * regcache.c (init_register_cache): Initialize
16480 regcache->register_status.
16481 (free_register_cache): Release regcache->register_status.
16482 (regcache_cpy): Copy register_status.
16483 (registers_to_string): Print 'x's for unavailable registers.
16484 (supply_register): Mark the register's status valid or
16485 unavailable, depending on whether a buffer was passed in or not.
16486 (supply_register_zeroed): New.
16487 (supply_regblock): Mark the registers' status valid or
16488 unavailable, depending on whether a buffer was passed in or not.
16489 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16490 (struct regcache): New `register_status' field.
16491 (supply_register_zeroed): Declare.
16492 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16493 supply_register_zeroed, rather than passing a NULL buffer to
16494 supply_register.
16495 * tracepoint.c (fetch_traceframe_registers): Update comment.
16496
16497 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16498
16499 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16500 buffer explicit.
16501
16502 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16503
16504 * server.h (decode_xfer_write): Change prototype.
16505 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16506 and don't extract the annex here.
16507 * server.c (decode_xfer_read): Remove `annex' parameter,
16508 and don't extract the annex here.
16509 (decode_xfer): New.
16510 (struct qxfer): New.
16511 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16512 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16513 (handle_qxfer_statictrace): New functions, abstracted out from
16514 handle_query, and made to use the struct qxfer interface.
16515 (handle_threads_qxfer_proper): Rename to ...
16516 (handle_qxfer_threads_proper): ... this.
16517 (handle_threads_qxfer): Rename to ...
16518 (handle_qxfer_threads): ... this. Adjust.
16519 (qxfer_packets): New array.
16520 (handle_qxfer): New function.
16521 (handle_query): Use handle_qxfer.
16522
16523 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16524
16525 * gdbreplay.c: Shorten lines of >= 80 columns.
16526 * linux-low.c: Ditto.
16527 * linux-ppc-low.c: Ditto.
16528 * linux-s390-low.c: Ditto.
16529 * linux-sparc-low.c: Ditto.
16530 * linux-x86-low.c: Ditto.
16531 * linux-xtensa-low.c: Ditto.
16532 * mem-break.c: Ditto.
16533 * nto-low.c: Ditto.
16534 * regcache.h: Ditto.
16535 * remote-utils.c: Ditto.
16536 * server.c: Ditto.
16537 * server.h: Ditto.
16538 * thread-db.c: Ditto.
16539 * tracepoint.c: Ditto.
16540 * utils.c: Ditto.
16541 * win32-low.h: Ditto.
16542
16543 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16544
16545 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16546 update.
16547
16548 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16549
16550 * server.c (gdbserver_version): Update copyright year in version
16551 output.
16552 * gdbreplay.c (gdbreplay_version): Ditto.
16553
16554 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16555
16556 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16557 * linux-bfin-low.c: New file.
16558 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16559 PT_DATA_ADDR for BFIN targets.
16560 * Makefile.in (SFILES): Add linux-bfin-low.c.
16561 (clean): Remove reg-bfin.c.
16562 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16563 * README: Mention supported Blackfin targets.
16564
16565 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16566
16567 * .gitignore: New file.
16568
16569 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16570
16571 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16572
16573 2010-10-22 Jie Zhang <jie@codesourcery.com>
16574
16575 * Makefile.in: Add FLAGS_TO_PASS variable.
16576 (install): Remove dependency of install-only and recursively
16577 invoke make for install-only.
16578
16579 2010-10-04 Doug Evans <dje@google.com>
16580
16581 * Makefile.in (uninstall): Use $(DESTDIR).
16582
16583 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16584
16585 PR gdb/11842
16586
16587 * linux-x86-low.c (compat_siginfo_from_siginfo)
16588 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16589 si_code is < 0. Check for si_code == SI_TIMER before checking for
16590 si_code < 0.
16591
16592 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16593
16594 * lynx-i386-low.c: New file.
16595 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16596
16597 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16598
16599 * lynx-low.c (ptrace_request_to_str): Remove handling for
16600 request values that have been removed in LynxOS 5.x.
16601
16602 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16603
16604 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16605 <ptrace.h>
16606
16607 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16608
16609 * configure.ac: Add --enable-inprocess-agent option.
16610 * configure: Rebuilt.
16611
16612 2010-09-06 Yao Qi <yao@codesourcery.com>
16613
16614 * linux-low.c (linux_kill): Remove unused variable.
16615 (linux_stabilize_threads): Likewise.
16616 * server.c (start_inferior): Likewise.
16617 (queue_stop_reply_callback): Likewise.
16618 * tracepoint.c (do_action_at_tracepoint): Likewise.
16619
16620 2010-09-06 Yao Qi <yao@codesourcery.com>
16621
16622 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16623 on return.
16624
16625 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16626
16627 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16628
16629 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16630
16631 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16632 "$(IPA_DEPFILES)".
16633
16634 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16635
16636 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16637 gdbserver/lynx-ppc-low.c: New files.
16638 * Makefile.in (lynx_low_h): New variable.
16639 (lynx-low.o, lynx-ppc-low.o): New rules.
16640 * configure.ac: On LynxOS, link with -lnetinet.
16641 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16642 * configure: regenerate.
16643
16644 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16645
16646 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16647 * configure.ac: Add check for vasprintf and vsnprintf.
16648 * configure, config.in: Regenerate.
16649 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16650
16651 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16652
16653 * gdbreplay.c: Move include of alloca.h up, next to include of
16654 malloc.h.
16655 * server.h: Add include of malloc.h.
16656 * mem-break.c: Remove include of malloc.h.
16657 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16658
16659 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16660
16661 * Makefile.in (memmem.o): Build with -Wno-error.
16662
16663 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16664
16665 * utils.c (xsnprintf): Make non-static.
16666 * server.h: Add xsnprintf declaration.
16667 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16668 replace calls to snprintf by calls to xsnprintf throughout.
16669
16670 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16671
16672 * configure.ac: Add configure check for alloca.
16673 * configure, config.in: Regenerate.
16674 * server.h: Include alloca.h if it exists.
16675 * gdbreplay.c: Include alloca.h if it exists.
16676
16677 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16678
16679 * linux-low.c (__SIGRTMIN): Define if not already defined.
16680 (linux_create_inferior): Check for __ANDROID__ rather than
16681 __SIGRTMIN.
16682 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16683 are already deferred.
16684 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16685 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16686 stopped and already has a pending signal to report.
16687 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16688 a pending signal to report or is moving out of a jump pad.
16689 (linux_init_signals): Check for __ANDROID__ rather than
16690 __SIGRTMIN.
16691
16692 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16693
16694 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16695 debug_threads check. Avoid a linear search when not doing debug
16696 output.
16697
16698 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16699
16700 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16701 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16702 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16703 (process_event): Change local fd's type to gdb_fildes_t.
16704 (create_file_handler): Adjust prototype.
16705 (delete_file_handler): Adjust prototype.
16706 (handle_file_event): Adjust prototype. Use pfildes.
16707 (create_file_event): Adjsut prototype.
16708 * remote-utils.c (remote_desc, listen_desc): Change type to
16709 gdb_fildes_t.
16710 * server.h: New gdb_fildes_t typedef.
16711 [USE_WIN32API]: Include winsock2.h.
16712 (delete_file_handler, add_file_handler): Adjust prototypes.
16713 (pfildes): Declare.
16714 * utils.c (pfildes): New.
16715
16716 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16717
16718 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16719 * configure: Regenerate.
16720
16721 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16722
16723 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16724 (linux_done_accessing_memory): ... this.
16725 (linux_target_ops): Adjust.
16726 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16727 * nto-low.c (nto_target_ops): Adjust comment.
16728 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16729 * spu-low.c (spu_target_ops): Adjust comment.
16730 * target.h (target_ops): Rename unprepare_to_access_memory field
16731 to done_accessing_memory.
16732 (unprepare_to_access_memory): Rename to ...
16733 (done_accessing_memory): ... this.
16734
16735 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16736
16737 * linux-low.c (linux_prepare_to_access_memory): New.
16738 (linux_unprepare_to_access_memory): New.
16739 (linux_target_ops): Install them.
16740 * server.c (read_memory): Rename to ...
16741 (gdb_read_memory): ... this. Use
16742 prepare_to_access_memory/prepare_to_access_memory.
16743 (write_memory): Rename to ...
16744 (gdb_write_memory): ... this. Use
16745 prepare_to_access_memory/prepare_to_access_memory.
16746 (handle_search_memory_1): Adjust.
16747 (process_serial_event): Adjust.
16748 * target.h (struct target_ops): New fields
16749 prepare_to_access_memory and unprepare_to_access_memory.
16750 (prepare_to_access_memory, unprepare_to_access_memory): New.
16751 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16752 prepare_to_access_memory/prepare_to_access_memory.
16753 * nto-low.c (nto_target_ops): Adjust.
16754 * spu-low.c (spu_target_ops): Adjust.
16755 * win32-low.c (win32_target_ops): Adjust.
16756
16757 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16758
16759 * Makefile.in (WARN_CFLAGS): Get it from configure.
16760 (WERROR_CFLAGS): New.
16761 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16762 * configure.ac: Introduce --enable-werror, which adds -Werror to
16763 the compiler command line. Enabled by default. Disable with
16764 --disable-werror. Add -Wdeclaration-after-statement
16765 Wpointer-arith and -Wformat-nonliteral to warning flags.
16766 * configure: Regenerate.
16767
16768 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16769
16770 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16771
16772 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16773
16774 * gdbreplay.c (remote_error): New.
16775 (gdbchar): New.
16776 (expect): Use gdbchar. Check for error reading from GDB.
16777 Clarify sync error output.
16778 (play): Check for errors writing to GDB.
16779 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16780 * remote-utils.c (getpkt): Check for errors writing to the remote
16781 descriptor.
16782
16783 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16784
16785 * linux-low.c (linux_wait_1): Move non-debugging code out of
16786 `debug_threads' control.
16787
16788 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16789
16790 * linux-low.c (linux_wait_1): Don't set last_status here.
16791 * server.c (push_event, queue_stop_reply_callback): Assert we're
16792 not pushing a TARGET_WAITKIND_IGNORE event.
16793 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16794 (myresume, handle_target_event): Set the thread's last_resume_kind
16795 and last_status from the target returned status.
16796
16797 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16798
16799 PR threads/10729
16800
16801 * linux-x86-low.c (update_debug_registers_callback): New.
16802 (i386_dr_low_set_addr): Use it.
16803 (i386_dr_low_get_addr): New.
16804 (i386_dr_low_set_control): Use update_debug_registers_callback.
16805 (i386_dr_low_get_control): New.
16806 (i386_dr_low_get_status): Adjust.
16807 * linux-low.c (linux_stop_lwp): New.
16808 * linux-low.h (linux_stop_lwp): Declare.
16809
16810 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16811 argument instead of a i386_debug_reg_state.
16812 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16813 a i386_debug_reg_state.
16814 (i386_insert_aligned_watchpoint): Adjust.
16815 (i386_remove_aligned_watchpoint): Adjust.
16816 (i386_low_stopped_data_address): Read the debug registers from the
16817 inferior instead of from the mirrors.
16818 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16819 (i386_dr_low_get_addr): Declare.
16820 (i386_dr_low_get_control): Declare.
16821 (i386_dr_low_get_status): Change prototype.
16822
16823 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16824 (i386_dr_low_get_addr): New.
16825 (i386_dr_low_get_control): New.
16826 (i386_dr_low_get_status): Adjust prototype. Return
16827 dr_status_mirror.
16828 (i386_initial_stuff): Clear dr_status_mirror and
16829 dr_control_mirror.
16830 (i386_get_thread_context): Adjust.
16831 (i386_set_thread_context): Adjust.
16832 (i386_thread_added): Adjust.
16833
16834 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16835
16836 * linux-low.h (linux_thread_area): Delete declaration.
16837
16838 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16839
16840 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16841 after its termination.
16842
16843 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16844
16845 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16846 (gdb_wants_all_stopped): Delete.
16847 (linux_wait_1): Don't call them.
16848 * server.c (handle_v_cont): Tag all threads as want-stopped.
16849 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16850 stopped as "client-wants-stopped".
16851
16852 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16853
16854 * Makefile.in (signals_h): New.
16855 (server_h): Depend on it.
16856 (server.o): Don't depend on $(signals_def).
16857 (signals.o): Depend on $(signals_def).
16858
16859 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16860
16861 * Makefile.in (signals_def): New.
16862 (server_h): Append include/gdb/signals.h and signals_def.
16863 (server.o): Append signals_def.
16864
16865 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16866
16867 * server.c (handle_target_event): Use target_signal_to_host for
16868 resume_info.sig initialization.
16869 * target.h (struct thread_resume) <sig>: New comment.
16870
16871 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16872
16873 * server.c (handle_query): strcpy() the returned string from paddress()
16874 instead of sprintf().
16875 * utils.c (paddress): Return phex_nz().
16876
16877 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16878
16879 * server.c (handle_v_cont): Call mourn_inferior if process
16880 just exited.
16881 (myresume): Likewise.
16882
16883 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16884
16885 Static tracepoints, and integration with UST.
16886
16887 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16888 * mem-break.c (uninsert_all_breakpoints)
16889 (reinsert_all_breakpoints): New.
16890 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16891 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16892 (gdb_agent_ust_loaded, helper_thread_id)
16893 (gdb_agent_helper_thread_id): New macros.
16894 (struct ipa_sym_addresses): Add addr_ust_loaded,
16895 addr_helper_thread_id, addr_cmd_buf.
16896 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16897 (in_process_agent_loaded_ust): New.
16898 (write_e_ust_not_loaded): New.
16899 (maybe_write_ipa_ust_not_loaded): New.
16900 (struct collect_static_trace_data_action): New.
16901 (enum tracepoint_type) <static_tracepoint>: New.
16902 (struct tracepoint) <handle>: Mention static tracepoints.
16903 (struct static_tracepoint_ctx): New.
16904 (CMD_BUF_SIZE): New.
16905 (add_tracepoint_action): Handle static tracepoint actions.
16906 (unprobe_marker_at): New.
16907 (clear_installed_tracepoints): Handle static tracepoints.
16908 (cmd_qtdp): Handle static tracepoints.
16909 (probe_marker_at): New.
16910 (cmd_qtstart): Handle static tracepoints.
16911 (response_tracepoint): Handle static tracepoints.
16912 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16913 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16914 (get_context_regcache): Handle static tracepoints.
16915 (do_action_at_tracepoint): Handle static tracepoint actions.
16916 (traceframe_find_block_type): Handle static trace data blocks.
16917 (traceframe_read_sdata): New.
16918 (download_tracepoints): Download static tracepoint actions.
16919 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16920 (GDB_PROBE_NAME): New.
16921 (ust_ops): New.
16922 (GET_UST_SYM): New.
16923 (USTF): New.
16924 (dlsym_ust): New.
16925 (ust_marker_to_static_tracepoint): New.
16926 (gdb_probe): New.
16927 (collect_ust_data_at_tracepoint): New.
16928 (gdb_ust_probe): New.
16929 (UNIX_PATH_MAX, SOCK_DIR): New.
16930 (gdb_ust_connect_sync_socket): New.
16931 (resume_thread, stop_thread): New.
16932 (run_inferior_command): New.
16933 (init_named_socket): New.
16934 (gdb_ust_socket_init): New.
16935 (cstr_to_hexstr): New.
16936 (next_st): New.
16937 (first_marker, next_marker): New.
16938 (response_ust_marker): New.
16939 (cmd_qtfstm, cmd_qtsstm): New.
16940 (unprobe_marker_at, probe_marker_at): New.
16941 (cmd_qtstmat, gdb_ust_thread): New.
16942 (gdb_ust_init): New.
16943 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16944 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16945 (ST_REGENTRY): New.
16946 (x86_64_st_collect_regmap): New.
16947 (X86_64_NUM_ST_COLLECT_GREGS): New.
16948 (AMD64_RIP_REGNUM): New.
16949 (supply_static_tracepoint_registers): New.
16950 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16951 (ST_REGENTRY): New.
16952 (i386_st_collect_regmap): New.
16953 (i386_NUM_ST_COLLECT_GREGS): New.
16954 (supply_static_tracepoint_registers): New.
16955 * server.c (handle_query): Handle qXfer:statictrace:read.
16956 <qSupported>: Report support for StaticTracepoints, and
16957 qXfer:statictrace:read features.
16958 * server.h (traceframe_read_sdata)
16959 (supply_static_tracepoint_registers): Declare.
16960 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16961 (unpack_varlen_hex): Include in IPA build.
16962 * Makefile.in (ustlibs, ustinc): New.
16963 (IPA_OBJS): Add remote-utils-ipa.o.
16964 ($(IPA_LIB)): Link -ldl and -lpthread.
16965 (UST_CFLAGS): New.
16966 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16967 * config.in, configure: Regenerate.
16968
16969 2010-06-20 Ian Lance Taylor <iant@google.com>
16970 Pedro Alves <pedro@codesourcery.com>
16971
16972 * linux-x86-low.c (always_true): Delete.
16973 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16974 trying to fool the compiler with always_true.
16975
16976 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16977
16978 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16979 conditions in gdbserver.
16980
16981 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16982
16983 * spu-low.c (spu_read_memory): Wrap around local store limit.
16984 (spu_write_memory): Likewise.
16985
16986 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16987
16988 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16989 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
16990 LONGEST uses.
16991 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
16992 uses.
16993 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
16994 uses with LONGEST uses.
16995
16996 2010-06-14 Stan Shebs <stan@codesourcery.com>
16997 Pedro Alves <pedro@codesourcery.com>
16998
16999 Bytecode compiler.
17000
17001 * linux-x86-low.c: Include limits.h.
17002 (add_insns): New.
17003 (always_true): New.
17004 (EMIT_ASM): New.
17005 (EMIT_ASM32): New.
17006 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17007 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17008 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17009 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17010 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17011 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17012 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17013 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17014 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17015 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17016 (amd64_emit_void_call_2): New.
17017 (amd64_emit_ops): New.
17018 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17019 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17020 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17021 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17022 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17023 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17024 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17025 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17026 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17027 (i386_emit_stack_adjust, i386_emit_int_call_1)
17028 (i386_emit_void_call_2): New.
17029 (i386_emit_ops): New.
17030 (x86_emit_ops): New.
17031 (the_low_target): Install x86_emit_ops.
17032 * server.h (struct emit_ops): New.
17033 (get_raw_reg_func_addr): Declare.
17034 (current_insn_ptr, emit_error): Declare.
17035 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17036 (set_trace_state_variable_value): New defines.
17037 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17038 addr_get_trace_state_variable_value and
17039 addr_set_trace_state_variable_value.
17040 (symbol_list): New fields for get_raw_reg,
17041 get_trace_state_variable_value and set_trace_state_variable_value.
17042 (condfn): New typedef.
17043 (struct tracepoint): New field `compiled_cond'.
17044 (do_action_at_tracepoint): Clear compiled_cond.
17045 (get_trace_state_variable_value, set_trace_state_variable_value):
17046 Export in the IPA.
17047 (condition_true_at_tracepoint): If there's a compiled condition,
17048 run that.
17049 (current_insn_ptr, emit_error): New globals.
17050 (struct bytecode_address): New.
17051 (get_raw_reg_func_addr): New.
17052 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17053 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17054 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17055 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17056 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17057 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17058 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17059 (compile_tracepoint_condition, compile_bytecodes): New.
17060 * target.h (emit_ops): Forward declare.
17061 (struct target_ops): New field emit_ops.
17062 (target_emit_ops): New.
17063 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17064 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17065 * linux-low.c (linux_emit_ops): New.
17066 (linux_target_ops): Install it.
17067 * linux-low.h (struct linux_target_ops): New field emit_ops.
17068
17069 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17070
17071 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17072 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17073
17074 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17075 Stan Shebs <stan@codesourcery.com>
17076
17077 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17078 (all): Depend on $(extra_libraries).
17079 (install-only): Install the IPA.
17080 (IPA_OBJS, IPA_LIB): New.
17081 (clean): Remove the IPA lib.
17082 (IPAGENT_CFLAGS): New.
17083 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17084 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17085 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17086 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17087 * configure.ac: Check for atomic builtins support in the compiler.
17088 (IPA_DEPFILES, extra_libraries): Define.
17089 * configure.srv (ipa_obj): Add description.
17090 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17091 (i[34567]86-*-linux*): Set ipa_obj.
17092 (x86_64-*-linux*): Set ipa_obj.
17093 * linux-low.c (stabilizing_threads): New.
17094 (supports_fast_tracepoints): New.
17095 (linux_detach): Stabilize threads before detaching.
17096 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17097 the lwp is either not stabilizing, or is moving out of a jump pad.
17098 (linux_fast_tracepoint_collecting): New.
17099 (maybe_move_out_of_jump_pad): New.
17100 (enqueue_one_deferred_signal): New.
17101 (dequeue_one_deferred_signal): New.
17102 (linux_wait_for_event_1): If moving out of a jump pad, defer
17103 pending signals to later.
17104 (linux_stabilize_threads): New.
17105 (linux_wait_1): Check if threads need moving out of jump pads, and
17106 do it if so.
17107 (stuck_in_jump_pad_callback): New.
17108 (move_out_of_jump_pad_callback): New.
17109 (lwp_running): New.
17110 (linux_resume_one_lwp): Handle moving out of jump pads.
17111 (linux_set_resume_request): Dequeue deferred signals.
17112 (need_step_over_p): Also step over fast tracepoint jumps.
17113 (start_step_over): Also uninsert fast tracepoint jumps.
17114 (finish_step_over): Also reinsert fast tracepoint jumps.
17115 (linux_install_fast_tracepoint_jump): New.
17116 (linux_target_ops): Install linux_stabilize_threads and
17117 linux_install_fast_tracepoint_jump_pad.
17118 * linux-low.h (linux_target_ops) <get_thread_area,
17119 install_fast_tracepoint_jump_pad>: New fields.
17120 (struct lwp_info) <collecting_fast_tracepoint,
17121 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17122 (linux_get_thread_area): Declare.
17123 * linux-x86-low.c (jump_insn): New.
17124 (x86_get_thread_area): New.
17125 (append_insns): New.
17126 (push_opcode): New.
17127 (amd64_install_fast_tracepoint_jump_pad): New.
17128 (i386_install_fast_tracepoint_jump_pad): New.
17129 (x86_install_fast_tracepoint_jump_pad): New.
17130 (the_low_target): Install x86_get_thread_area and
17131 x86_install_fast_tracepoint_jump_pad.
17132 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17133 (struct fast_tracepoint_jump): New.
17134 (fast_tracepoint_jump_insn): New.
17135 (fast_tracepoint_jump_shadow): New.
17136 (find_fast_tracepoint_jump_at): New.
17137 (fast_tracepoint_jump_here): New.
17138 (delete_fast_tracepoint_jump): New.
17139 (set_fast_tracepoint_jump): New.
17140 (uninsert_fast_tracepoint_jumps_at): New.
17141 (reinsert_fast_tracepoint_jumps_at): New.
17142 (set_breakpoint_at): Use write_inferior_memory.
17143 (uninsert_raw_breakpoint): Use write_inferior_memory.
17144 (check_mem_read): Mask out fast tracepoint jumps.
17145 (check_mem_write): Mask out fast tracepoint jumps.
17146 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17147 (set_fast_tracepoint_jump): Declare.
17148 (delete_fast_tracepoint_jump)
17149 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17150 (reinsert_fast_tracepoint_jumps_at): Declare.
17151 * regcache.c: Don't compile many functions when building the
17152 in-process agent library.
17153 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17154 the register buffer in the heap.
17155 (free_register_cache): If the register buffer isn't owned by the
17156 regcache, don't free it.
17157 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17158 pre-existing register caches.
17159 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17160 type.
17161 (convert_ascii_to_int): : Constify `from' parameter type.
17162 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17163 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17164 the needed buffer in-place.
17165 (relocate_instruction): New.
17166 * server.c (handle_query) <qSymbols>: If the target supports
17167 tracepoints, give it a chance of looking up symbols. Report
17168 support for fast tracepoints.
17169 (handle_status): Stabilize threads.
17170 (process_serial_event): Adjust.
17171 * server.h (struct fast_tracepoint_jump): Forward declare.
17172 (struct process_info) <fast_tracepoint_jumps>: New field.
17173 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17174 (decode_X_packet, decode_M_packet): Adjust.
17175 (relocate_instruction): Declare.
17176 (in_process_agent_loaded): Declare.
17177 (tracepoint_look_up_symbols): Declare.
17178 (struct fast_tpoint_collect_status): Declare.
17179 (fast_tracepoint_collecting): Declare.
17180 (force_unlock_trace_buffer): Declare.
17181 (handle_tracepoint_bkpts): Declare.
17182 (initialize_low_tracepoint)
17183 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17184 * target.h (struct target_ops) <stabilize_threads,
17185 install_fast_tracepoint_jump_pad>: New fields.
17186 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17187 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17188 [HAVE_STDINT_H]: Include stdint.h.
17189 (trace_debug_1): Rename to ...
17190 (trace_vdebug): ... this.
17191 (trace_debug): Rename to ...
17192 (trace_debug_1): ... this. Add `level' parameter.
17193 (trace_debug): New.
17194 (ATTR_USED, ATTR_NOINLINE): New.
17195 (IP_AGENT_EXPORT): New.
17196 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17197 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17198 (about_to_request_buffer_space, trace_buffer_is_full)
17199 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17200 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17201 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17202 (traceframe_write_count, traceframes_created)
17203 (trace_state_variables)
17204 New renaming defines.
17205 (struct ipa_sym_addresses): New.
17206 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17207 (symbol_list): New.
17208 (ipa_sym_addrs): New.
17209 (all_tracepoint_symbols_looked_up): New.
17210 (in_process_agent_loaded): New.
17211 (write_e_ipa_not_loaded): New.
17212 (maybe_write_ipa_not_loaded): New.
17213 (tracepoint_look_up_symbols): New.
17214 (debug_threads) [IN_PROCESS_AGENT]: New.
17215 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17216 (UNKNOWN_SIDE_EFFECTS): New.
17217 (stop_tracing): New.
17218 (flush_trace_buffer): New.
17219 (stop_tracing_bkpt): New.
17220 (flush_trace_buffer_bkpt): New.
17221 (read_inferior_integer): New.
17222 (read_inferior_uinteger): New.
17223 (read_inferior_data_pointer): New.
17224 (write_inferior_data_pointer): New.
17225 (write_inferior_integer): New.
17226 (write_inferior_uinteger): New.
17227 (struct collect_static_trace_data_action): Delete.
17228 (enum tracepoint_type): New.
17229 (struct tracepoint) <type>: New field `type'.
17230 <actions_str, step_actions, step_actions_str>: Only include in
17231 GDBserver.
17232 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17233 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17234 (tracepoints): Use IP_AGENT_EXPORT.
17235 (last_tracepoint): Don't include in the IPA.
17236 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17237 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17238 (alloced_trace_state_variables): New.
17239 (trace_state_variables): Use IP_AGENT_EXPORT.
17240 (traceframe_t): Delete unused variable.
17241 (circular_trace_buffer): Don't include in the IPA.
17242 (trace_buffer_start): Delete.
17243 (struct trace_buffer_control): New.
17244 (trace_buffer_free): Delete.
17245 (struct ipa_trace_buffer_control): New.
17246 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17247 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17248 New.
17249 (trace_buffer_ctrl): New.
17250 (TRACE_BUFFER_CTRL_CURR): New.
17251 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17252 Reimplement as macros.
17253 (trace_buffer_wrap): Delete.
17254 (traceframe_write_count, traceframe_read_count)
17255 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17256 (struct tracepoint_hit_ctx) <type>: New field.
17257 (struct fast_tracepoint_ctx): New.
17258 (memory_barrier): New.
17259 (cmpxchg): New.
17260 (record_tracepoint_error): Update atomically in the IPA.
17261 (clear_inferior_trace_buffer): New.
17262 (about_to_request_buffer_space): New.
17263 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17264 updating the same buffer.
17265 (add_tracepoint): Default the tracepoint's type to trap
17266 tracepoint, and orig_size to -1.
17267 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17268 internal variables.
17269 (create_trace_state_variable): New parameter `gdb'. Handle it.
17270 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17271 (cmd_qtdp): Handle fast tracepoints.
17272 (cmd_qtdv): Adjust.
17273 (max_jump_pad_size): New.
17274 (gdb_jump_pad_head): New.
17275 (get_jump_space_head): New.
17276 (claim_jump_space): New.
17277 (sort_tracepoints): New.
17278 (MAX_JUMP_SIZE): New.
17279 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17280 IPA.
17281 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17282 support. Upload fast traceframes, and delete internal IPA
17283 breakpoints.
17284 (stop_tracing_handler): New.
17285 (flush_trace_buffer_handler): New.
17286 (cmd_qtstop): Upload fast tracepoints.
17287 (response_tracepoint): Handle fast tracepoints.
17288 (tracepoint_finished_step): Upload fast traceframes. Set the
17289 tracepoint hit context's tracepoint type.
17290 (handle_tracepoint_bkpts): New.
17291 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17292 type. Add comment about fast tracepoints.
17293 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17294 non-existing action_str field.
17295 (get_context_regcache): Handle fast tracepoints.
17296 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17297 to the regcache.
17298 (fast_tracepoint_from_jump_pad_address): New.
17299 (fast_tracepoint_from_ipa_tpoint_address): New.
17300 (collecting_t): New.
17301 (force_unlock_trace_buffer): New.
17302 (fast_tracepoint_collecting): New.
17303 (collecting): New.
17304 (gdb_collect): New.
17305 (write_inferior_data_ptr): New.
17306 (target_tp_heap): New.
17307 (target_malloc): New.
17308 (download_agent_expr): New.
17309 (UALIGN): New.
17310 (download_tracepoints): New.
17311 (download_trace_state_variables): New.
17312 (upload_fast_traceframes): New.
17313 (IPA_FIRST_TRACEFRAME): New.
17314 (IPA_NEXT_TRACEFRAME_1): New.
17315 (IPA_NEXT_TRACEFRAME): New.
17316 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17317 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17318 (gdb_jump_pad_buffer_end): New.
17319 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17320 (initialize_tracepoint): Adjust.
17321 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17322 buffer. Initialize the low module.
17323 * utils.c (PREFIX, TOOLNAME): New.
17324 (malloc_failure): Use PREFIX.
17325 (error): In the IPA, an error causes an exit.
17326 (fatal, warning): Use PREFIX.
17327 (internal_error): Use TOOLNAME.
17328 (NUMCELLS): Increase to 10.
17329 * configure, config.in: Regenerate.
17330
17331 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17332
17333 * server.c (handle_query) <qSupported>: Do two passes over the
17334 qSupported string to avoid nesting strtok.
17335
17336 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17337
17338 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17339 (CDEPS): New.
17340 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17341 -Wl,--dynamic-list.
17342 * configure: Regenerate.
17343 * proc-service.list: New.
17344
17345 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17346
17347 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17348 New comment.
17349
17350 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17351
17352 * gdbreplay.c (remote_open): Check error return from socket() call by
17353 its equality to -1 not by it being negative.
17354 * remote-utils.c (remote_open): Likewise.
17355
17356 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17357
17358 * config.h: Regenerate.
17359
17360 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17361
17362 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17363 doesn't provide PTRACE_GET_THREAD_AREA.
17364
17365 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17366
17367 * linux-m68k-low.c: Include <asm/ptrace.h>
17368 (ps_get_thread_area): Implement.
17369
17370 2010-05-03 Doug Evans <dje@google.com>
17371
17372 * event-loop.c (struct callback_event): New struct.
17373 (callback_list): New global.
17374 (append_callback_event, delete_callback_event): New functions.
17375 (process_callback): New function.
17376 (start_event_loop): Call it.
17377 * remote-utils.c (NOT_SCHEDULED): Define.
17378 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17379 moved out of readchar.
17380 (readchar): Rewrite. Call reschedule before returning.
17381 (reset_readchar): New function.
17382 (remote_close): Call it.
17383 (process_remaining, reschedule): New functions.
17384 * server.h (callback_handler_func): New typedef.
17385 (append_callback_event, delete_callback_event): Declare.
17386
17387 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17388
17389 * proc-service.c (ps_pglobal_lookup): Use
17390 thread_db_look_up_one_symbol.
17391 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17392 parameter. Use it instead of all_symbols_looked_up.
17393 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17394 field.
17395 (all_symbols_looked_up): Don't declare.
17396 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17397 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17398 field.
17399 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17400 Set all_symbols_looked_up here.
17401 (thread_db_look_up_one_symbol): New.
17402 (thread_db_get_tls_address): Adjust.
17403 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17404 thread_db object on the heap, and tentatively set it in the
17405 process structure.
17406 (thread_db_init): Don't set all_symbols_looked_up here.
17407 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17408
17409 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17410
17411 * linux-low.c (linux_kill, linux_detach): Adjust.
17412 (status_pending_p_callback): Remove redundant statement. Check
17413 for !TARGET_WAITIKIND_IGNORE, instead of
17414 TARGET_WAITKIND_STOPPED.
17415 (handle_tracepoints): Make sure LWP is locked. Adjust.
17416 (linux_wait_for_event_1): Adjust.
17417 (linux_cancel_breakpoints): New.
17418 (unsuspend_one_lwp): New.
17419 (unsuspend_all_lwps): New.
17420 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17421 (send_sigstop_callback): Change return type to int, add new
17422 `except' parameter and handle it.
17423 (suspend_and_send_sigstop_callback): New.
17424 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17425 pass them down. If SUSPEND, also increment the lwp's suspend
17426 count.
17427 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17428 (need_step_over_p): Don't consider suspended LWPs.
17429 (start_step_over): Adjust.
17430 (proceed_one_lwp): Change return type to int, add new `except'
17431 parameter and handle it.
17432 (unsuspend_and_proceed_one_lwp): New.
17433 (proceed_all_lwps): Use find_inferior instead of
17434 for_each_inferior.
17435 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17436 also decrement the suspend count of LWPs. Pass `except' down,
17437 instead of hacking its suspend count.
17438 (linux_pause_all): Add `freeze' parameter. Adjust.
17439 (linux_unpause_all): New.
17440 (linux_target_ops): Install linux_unpause_all.
17441 * server.c (handle_status): Adjust.
17442 * target.h (struct target_ops): New fields `unpause_all' and
17443 `cancel_breakpoints'. Add new parameter to `pause_all'.
17444 (pause_all): Add new `freeze' parameter.
17445 (unpause_all): New.
17446 (cancel_breakpoints): New.
17447 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17448 cancel breakpoints.
17449 (cmd_qtstart): Pause threads.
17450 (stop_tracing): Pause threads, and cancel breakpoints.
17451 * win32-low.c (win32_target_ops): Adjust.
17452
17453 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17454
17455 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17456 the inferior right away from here...
17457 (linux_wait_1): ... to here, and adjust to check the thread's
17458 last_resume_kind instead of the lwp's step or stop_expected flags.
17459
17460 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17461
17462 * README: Use consistent `GDB' and `GDBserver' spellings.
17463
17464 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17465
17466 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17467 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17468 (linux_detach_one_lwp): Assume the lwp is stopped.
17469 (any_thread_of): Delete.
17470 (linux_detach): Stop all lwps here. Don't blindly delete all
17471 breakpoints.
17472 (delete_lwp_callback): New.
17473 (linux_mourn): Delete all lwps of the process that is gone.
17474 (linux_wait_1): Don't delete the last lwp of the process here.
17475 * mem-break.h (mark_breakpoints_out): Declare.
17476 * mem-break.c (mark_breakpoints_out): New.
17477 (free_all_breakpoints): Use it.
17478 * server.c (handle_target_event): If the process is gone, mark
17479 breakpoints out.
17480 * thread-db.c (struct thread_db) <create_bp>: New field.
17481 (thread_db_enable_reporting): Fix prototype. Store a thread event
17482 breakpoint reference in the thread_db struct.
17483 (thread_db_load_search): Clear the thread_db object.
17484 (try_thread_db_load_1): Ditto.
17485 (switch_to_process): New.
17486 (disable_thread_event_reporting): Use it.
17487 (remove_thread_event_breakpoints): New.
17488 (thread_db_detach, thread_db_mourn): Use it.
17489
17490 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17491
17492 * linux-low.c (linux_enable_event_reporting): New.
17493 (linux_wait_for_event_1, handle_extended_wait): Use it.
17494
17495 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17496
17497 * linux-low.c (linux_kill_one_lwp, linux_kill)
17498 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17499 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17500 SIGSTOP even if the LWP is stopped.
17501 (send_sigstop_callback): New.
17502 (stop_all_lwps): Use send_sigstop_callback instead.
17503 (linux_resume_one_thread): Adjust.
17504 (proceed_one_lwp): Still proceed an LWP that the client has
17505 requested to stop, if we haven't reported it as stopped yet. Make
17506 sure that LWPs the client want stopped, have a pending SIGSTOP.
17507
17508 2010-04-26 Doug Evans <dje@google.com>
17509
17510 * server.c (handle_general_set): Make static.
17511
17512 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17513 Print received char after testing for error/eof instead of before.
17514 (input_interrupt): Tweak comment.
17515
17516 2010-04-23 Doug Evans <dje@google.com>
17517
17518 * server.c (start_inferior): Print inferior argv if --debug.
17519
17520 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17521
17522 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17523 * nto-x86-low.c: Include server.h
17524
17525 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17526
17527 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17528 be consistent with other sources of this directory.
17529 (init_registers_amd64): Correct name of source file of this function
17530 in the comment.
17531
17532 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17533
17534 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17535 64-bit executables.
17536
17537 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17538
17539 * win32-i386-low.c: Add 64-bit support.
17540 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17541 (init_registers_amd64): Declare.
17542 (mappings): Add 64-bit version of array.
17543 (init_windows_x86): New function.
17544 (the_low_target): Change init_arch field to init_windows_x86.
17545
17546 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17547
17548 * win32-low.c: Adapt to support also 64-bit architecture.
17549 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17550 (get_image_name): Use SIZE_T type for local variable `done'.
17551 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17552 (toolhelp_get_dll_name): Idem.
17553 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17554 Use uintptr_t typecast to avoid warning.
17555 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17556 (handle_exception): Use phex_nz to avoid warning.
17557 (win32_wait): Remove unused local variable `process'.
17558
17559 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17560
17561 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17562 `amd64-avx.o'.
17563
17564 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17565
17566 * configure.ac: Use `ws2_32' library for srv_mingw.
17567 * configure: Regenerate.
17568 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17569 * remote-utils.c: Likewise.
17570
17571 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17572
17573 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17574 if __x86_64__ is defined.
17575
17576 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17577
17578 * configure: Regenerate.
17579
17580 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17581
17582 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17583 * target.h (target_ops): New get_tib_address field.
17584 * win32-low.h (win32_thread_info): Add thread_local_base field.
17585 * win32-low.c (child_add_thread): Add tlb argument.
17586 Set thread_local_base field to TLB.
17587 (get_child_debug_event): Adapt to child_add_thread change.
17588 (win32_get_tib_address): New function.
17589 (win32_target_ops): Set get_tib_address field to
17590 win32_get_tib_address.
17591 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17592
17593 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17594
17595 * linux-low.c (linux_mourn): Also remove the process.
17596 * server.c (handle_target_event): Don't remove the process here.
17597 * nto-low.c (nto_mourn): New.
17598 (nto_target_ops): Install it.
17599 * spu-low.c (spu_mourn): New.
17600 (spu_target_ops): Install it.
17601 * win32-low.c (win32_mourn): New.
17602 (win32_target_ops): Install it.
17603
17604 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17605
17606 * server.h (buffer_xml_printf): Remove redundant `;'.
17607
17608 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17609
17610 * regcache.c (set_register_cache): Invalidate regcaches before
17611 changing the register cache layout.
17612 (regcache_invalidate_one): Allow a NULL regcache.
17613 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17614 regcaches before changing the register cache layout or the target
17615 regsets.
17616
17617 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17618
17619 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17620 variable warning on Linux/x86-64.
17621
17622 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17623
17624 GDBserver disconnected tracing support.
17625
17626 * linux-low.c (linux_remove_process): Delete.
17627 (add_lwp): Don't set last_resume_kind here.
17628 (linux_kill): Use `mourn'.
17629 (linux_detach): Use `thread_db_detach', and `mourn'.
17630 (linux_mourn): New.
17631 (linux_attach_lwp_1): Adjust comment.
17632 (linux_attach): last_resume_kind moved the thread_info; adjust.
17633 (status_pending_p_callback): Adjust.
17634 (linux_wait_for_event_1): Adjust.
17635 (count_events_callback, select_singlestep_lwp_callback)
17636 (select_event_lwp_callback, cancel_breakpoints_callback)
17637 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17638 (proceed_one_lwp): Adjust.
17639 (linux_async): Add debug output.
17640 (linux_thread_stopped): New.
17641 (linux_pause_all): New.
17642 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17643 linux_pause_all.
17644 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17645 (thread_db_free): Delete declaration.
17646 (thread_db_detach, thread_db_mourn): Declare.
17647 * thread-db.c (thread_db_init): Use thread_db_mourn.
17648 (thread_db_free): Delete, split in two.
17649 (disable_thread_event_reporting): New.
17650 (thread_db_detach): New.
17651 (thread_db_mourn): New.
17652
17653 * server.h (struct thread_info) <last_resume_kind>: New field.
17654 <attached>: Add comment.
17655 <gdb_detached>: New field.
17656 (handler_func): Change return type to int.
17657 (handle_serial_event, handle_target_event): Ditto.
17658 (gdb_connected): Declare.
17659 (tracing): Delete.
17660 (disconnected_tracing): Declare.
17661 (stop_tracing): Declare.
17662
17663 * server.c (handle_query) <qSupported>: Report support for
17664 disconnected tracing.
17665 (queue_stop_reply_callback): Account for running threads.
17666 (gdb_wants_thread_stopped): New.
17667 (gdb_wants_all_threads_stopped): New.
17668 (gdb_reattached_process): New.
17669 (handle_status): Clear the `gdb_detached' flag of all processes.
17670 In all-stop, stop all threads.
17671 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17672 (process_serial_event): If the remote connection breaks, or if an
17673 exit was forced with "monitor exit", force an event loop exit.
17674 Handle disconnected tracing on detach.
17675 (handle_serial_event): Adjust.
17676 (handle_target_event): If GDB isn't connected, forward events back
17677 to the inferior, unless the last process exited, in which case,
17678 exit gdbserver. Adjust interface.
17679
17680 * remote-utils.c (remote_open): Don't block in accept. Instead
17681 register an event loop source on the listen socket file
17682 descriptor. Refactor bits into ...
17683 (listen_desc): ... this new global.
17684 (gdb_connected): ... this new function.
17685 (enable_async_notification): ... this new function.
17686 (handle_accept_event): ... this new function.
17687 (remote_close): Clear remote_desc.
17688
17689 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17690
17691 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17692 New fields.
17693 (mourn_inferior): Define.
17694 (target_process_qsupported): Avoid the dangling else problem.
17695 (thread_stopped): Define.
17696 (pause_all): Define.
17697 (target_waitstatus_to_string): Declare.
17698 * target.c (target_waitstatus_to_string): New.
17699
17700 * tracepoint.c (tracing): Make extern.
17701 (disconnected_tracing): New.
17702 (stop_tracing): Make extern. Handle tracing stops due to GDB
17703 disconnecting.
17704 (cmd_qtdisconnected): New.
17705 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17706 (handle_tracepoint_general_set): Handle QTDisconnected.
17707
17708 * event-loop.c (event_handler_func): Change return type to int.
17709 (process_event): Bail out if the event handler wants the event
17710 loop to stop.
17711 (handle_file_event): Ditto.
17712 (start_event_loop): Bail out if the event handler wants the event
17713 loop to stop.
17714
17715 * nto-low.c (nto_target_ops): Adjust.
17716 * spu-low.c (spu_wait): Don't remove the process here.
17717 (spu_target_ops): Adjust.
17718 * win32-low.c (win32_wait): Don't remove the process here.
17719 (win32_target_ops): Adjust.
17720
17721 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17722
17723 * regcache.c (realloc_register_cache): Invalidate inferior's
17724 regcache before recreating it.
17725
17726 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17727
17728 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17729
17730 2010-04-09 Stan Shebs <stan@codesourcery.com>
17731 Pedro Alves <pedro@codesourcery.com>
17732
17733 * server.h (LONGEST): New.
17734 (struct thread_info) <while_stepping>: New field.
17735 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17736 Declare.
17737 (initialize_tracepoint, handle_tracepoint_general_set)
17738 (handle_tracepoint_query, tracepoint_finished_step)
17739 (tracepoint_was_hit, release_while_stepping_state_list):
17740 (current_traceframe): Declare.
17741 * server.c (handle_general_set): Handle tracepoint packets.
17742 (read_memory): New.
17743 (write_memory): New.
17744 (handle_search_memory_1): Use read_memory.
17745 (handle_query): Report support for conditional tracepoints, trace
17746 state variables, and tracepoint sources. Handle tracepoint
17747 queries.
17748 (main): Initialize the tracepoints module.
17749 (process_serial_event): Handle traceframe reads/writes.
17750
17751 * linux-low.c (handle_tracepoints): New.
17752 (linux_wait_1): Call it.
17753 (linux_resume_one_lwp): Handle while-stepping.
17754 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17755 (linux_target_ops): Install them.
17756 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17757 New field.
17758 * linux-x86-low.c (x86_supports_tracepoints): New.
17759 (the_low_target). Install it.
17760
17761 * mem-break.h (delete_breakpoint): Declare.
17762 * mem-break.c (delete_breakpoint): Make external.
17763
17764 * target.h (struct target_ops): Add `supports_tracepoints',
17765 `read_pc', and `write_pc' fields.
17766 (target_supports_tracepoints): Define.
17767 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17768 (phex_nz): New.
17769
17770 * regcache.h (struct regcache) <registers_owned>: New field.
17771 (init_register_cache, regcache_cpy): Declare.
17772 (regcache_read_pc, regcache_write_pc): Declare.
17773 (register_cache_size): Declare.
17774 (supply_regblock): Declare.
17775 * regcache.c (init_register_cache): New.
17776 (new_register_cache): Use it.
17777 (regcache_cpy): New.
17778 (register_cache_size): New.
17779 (supply_regblock): New.
17780 (regcache_read_pc, regcache_write_pc): New.
17781
17782 * tracepoint.c: New.
17783
17784 * Makefile.in (OBS): Add tracepoint.o.
17785 (tracepoint.o): New rule.
17786
17787 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17788
17789 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17790 (i386-mmx.o): New.
17791 (i386-mmx.c): Likewise.
17792 (i386-mmx-linux.o): Likewise.
17793 (i386-mmx-linux.c): Likewise.
17794
17795 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17796 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17797 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17798 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17799
17800 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17801 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17802 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17803
17804 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17805
17806 * Makefile.in (clean): Updated.
17807 (i386-avx.o): New.
17808 (i386-avx.c): Likewise.
17809 (i386-avx-linux.o): Likewise.
17810 (i386-avx-linux.c): Likewise.
17811 (amd64-avx.o): Likewise.
17812 (amd64-avx.c): Likewise.
17813 (amd64-avx-linux.o): Likewise.
17814 (amd64-avx-linux.c): Likewise.
17815
17816 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17817 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17818 (srv_amd64_regobj): Add amd64-avx.o.
17819 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17820 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17821 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17822 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17823 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17824 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17825 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17826
17827 * i387-fp.c: Include "i386-xstate.h".
17828 (i387_xsave): New.
17829 (i387_cache_to_xsave): Likewise.
17830 (i387_xsave_to_cache): Likewise.
17831 (x86_xcr0): Likewise.
17832
17833 * i387-fp.h (i387_cache_to_xsave): Likewise.
17834 (i387_xsave_to_cache): Likewise.
17835 (x86_xcr0): Likewise.
17836
17837 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17838 * linux-crisv32-low.c (target_regsets): Likewise.
17839 * linux-m68k-low.c (target_regsets): Likewise.
17840 * linux-mips-low.c (target_regsets): Likewise.
17841 * linux-ppc-low.c (target_regsets): Likewise.
17842 * linux-s390-low.c (target_regsets): Likewise.
17843 * linux-sh-low.c (target_regsets): Likewise.
17844 * linux-sparc-low.c (target_regsets): Likewise.
17845 * linux-xtensa-low.c (target_regsets): Likewise.
17846
17847 * linux-low.c: Include <sys/uio.h>.
17848 (regsets_fetch_inferior_registers): Support nt_type.
17849 (regsets_store_inferior_registers): Likewise.
17850 (linux_process_qsupported): New.
17851 (linux_target_ops): Add linux_process_qsupported.
17852
17853 * linux-low.h (regset_info): Add nt_type.
17854 (linux_target_ops): Add process_qsupported.
17855
17856 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17857 and <sys/uio.h>.
17858 (init_registers_i386_avx_linux): New.
17859 (init_registers_amd64_avx_linux): Likewise.
17860 (xmltarget_i386_linux_no_xml): Likewise.
17861 (xmltarget_amd64_linux_no_xml): Likewise.
17862 (PTRACE_GETREGSET): Likewise.
17863 (PTRACE_SETREGSET): Likewise.
17864 (x86_fill_xstateregset): Likewise.
17865 (x86_store_xstateregset): Likewise.
17866 (use_xml): Likewise.
17867 (x86_linux_update_xmltarget): Likewise.
17868 (x86_linux_process_qsupported): Likewise.
17869 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17870 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17871 init_registers_i386_linux here. Call
17872 x86_linux_update_xmltarget.
17873 (the_low_target): Add x86_linux_process_qsupported.
17874
17875 * server.c (handle_query): Call target_process_qsupported.
17876
17877 * target.h (target_ops): Add process_qsupported.
17878 (target_process_qsupported): New.
17879
17880 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17881
17882 * inferiors.c (add_thread): Set last_status kind to
17883 TARGET_WAITKIND_IGNORE.
17884 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17885 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17886 (linux_wait_1): Move `thread' local definition to block that uses
17887 it. Don't NULL initialize `event_child'.
17888 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17889 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17890 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17891
17892 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17893
17894 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17895 an extended waitstatus, or by a watchpoint.
17896 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17897 thread was stepping or has been stopped by a watchpoint.
17898
17899 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17900
17901 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17902 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17903 of another, then delete the previous, and validate all
17904 breakpoints.
17905 (validate_inserted_breakpoint): New.
17906 (delete_disabled_breakpoints): New.
17907 (validate_breakpoints): New.
17908 (check_mem_read): Validate breakpoints before trusting their
17909 shadow. Delete disabled breakpoints.
17910 (check_mem_write): Validate breakpoints before trusting they
17911 should be inserted. Delete disabled breakpoints.
17912 * mem-break.h (validate_breakpoints):
17913 * server.c (handle_query): Validate breakpoints when we see a
17914 qSymbol query.
17915
17916 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17917
17918 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17919 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17920 if we could tell there's a GDB breakpoint at stop_pc.
17921 (need_step_over_p): Don't do a step over if we find a GDB
17922 breakpoint at the resume PC.
17923
17924 * mem-break.c (struct raw_breakpoint): New.
17925 (enum bkpt_type): New type `gdb_breakpoint'.
17926 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17927 fields. New field `raw'.
17928 (find_raw_breakpoint_at): New.
17929 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17930 breakpoint instead.
17931 (set_breakpoint_at): Adjust.
17932 (delete_raw_breakpoint): New.
17933 (release_breakpoint): New.
17934 (delete_breakpoint): Rename to...
17935 (delete_breakpoint_1): ... this. Add proc parameter. Use
17936 release_breakpoint. Return ENOENT.
17937 (delete_breakpoint): Reimplement.
17938 (find_breakpoint_at): Delete.
17939 (find_gdb_breakpoint_at): New.
17940 (delete_breakpoint_at): Delete.
17941 (set_gdb_breakpoint_at): New.
17942 (delete_gdb_breakpoint_at): New.
17943 (gdb_breakpoint_here): New.
17944 (set_reinsert_breakpoint): Use release_breakpoint.
17945 (uninsert_breakpoint): Rename to ...
17946 (uninsert_raw_breakpoint): ... this.
17947 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17948 (reinsert_raw_breakpoint): Change parameter type to
17949 raw_breakpoint.
17950 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17951 instead.
17952 (check_breakpoints): Adjust. Use release_breakpoint.
17953 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17954 (breakpoint_inserted_here): Ditto.
17955 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17956 Don't trust the breakpoint's shadow if it is not inserted.
17957 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17958 (delete_all_breakpoints): Adjust.
17959 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17960 use delete_breakpoint_1.
17961
17962 * mem-break.h (breakpoints_supported): Delete declaration.
17963 (set_gdb_breakpoint_at): Declare.
17964 (gdb_breakpoint_here): Declare.
17965 (delete_breakpoint_at): Delete.
17966 (delete_gdb_breakpoint_at): Declare.
17967
17968 * server.h (struct raw_breakpoint): Forward declare.
17969 (struct process_info): New field `raw_breakpoints'.
17970
17971 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17972 breakpoints.
17973
17974 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17975
17976 * linux-low.c (status_pending_p_callback): Fix comment.
17977 (linux_wait_for_event_1): Move most of the internal breakpoint
17978 handling from here...
17979 (linux_wait_1): ... to here.
17980 (count_events_callback): New.
17981 (select_singlestep_lwp_callback): New.
17982 (select_event_lwp_callback): New.
17983 (cancel_breakpoints_callback): New.
17984 (select_event_lwp): New.
17985 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17986 priority to all LWPs that have had events that should be reported
17987 to the client. Cancel breakpoints when about to reporting the
17988 event to the client, not while stopping lwps. No longer cancel
17989 finished single-steps here.
17990 (cancel_finished_single_step): Delete.
17991 (cancel_finished_single_steps): Delete.
17992
17993 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17994
17995 * mem-break.c (enum bkpt_type): New.
17996 (struct breakpoint): New field `type'.
17997 (set_breakpoint_at): Change return type to struct breakpoint
17998 pointer. Set type to `other_breakpoint' by default.
17999 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18000 in the breakpoint list.
18001 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18002 (reinsert_breakpoint): Rename to ...
18003 (reinsert_raw_breakpoint): ... this.
18004 (reinsert_breakpoints_at): Adjust.
18005 * mem-break.h (struct breakpoint): Declare.
18006 (set_breakpoint_at): Change return type to struct breakpoint
18007 pointer.
18008
18009 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18010
18011 * server.c (handle_query): Assign, not compare.
18012
18013 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18014
18015 Teach linux gdbserver to step-over-breakpoints.
18016
18017 * linux-low.c (can_hardware_single_step): New.
18018 (supports_breakpoints): New.
18019 (handle_extended_wait): If stopping threads, read the stop pc of
18020 the new cloned LWP.
18021 (get_pc): New.
18022 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18023 low target doesn't support retrieving the PC.
18024 (add_lwp): Set last_resume_kind to resume_continue.
18025 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18026 (linux_attach): Don't clear stop_expected. Set the lwp's
18027 last_resume_kind to resume_stop.
18028 (linux_detach_one_lwp): Don't check for removed breakpoints.
18029 (check_removed_breakpoint): Delete.
18030 (status_pending_p): Rename to ...
18031 (status_pending_p_callback): ... this. Don't check for removed
18032 breakpoints. Don't consider threads that are stopped from GDB's
18033 perspective.
18034 (linux_wait_for_lwp): Always read the stop_pc here.
18035 (cancel_breakpoint): New.
18036 (step_over_bkpt): New global.
18037 (linux_wait_for_event_1): Implement stepping over breakpoints.
18038 (gdb_wants_lwp_stopped): New.
18039 (gdb_wants_all_stopped): New.
18040 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18041 single-step traps here. Store the thread's last reported target
18042 wait status.
18043 (send_sigstop): Don't clear stop_expected. Always set it,
18044 instead.
18045 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18046 (cancel_finished_single_step): New.
18047 (cancel_finished_single_steps): New.
18048 (wait_for_sigstop): Don't cancel finished single-step traps here.
18049 (linux_resume_one_lwp): Don't check for removed breakpoints.
18050 Don't set `step' on non-hardware step archs.
18051 (linux_set_resume_request): Ignore resume_stop requests if already
18052 stopping or stopped. Set the lwp's last_resume_kind.
18053 (resume_status_pending_p): Don't check for removed breakpoints.
18054 (need_step_over_p): New.
18055 (start_step_over): New.
18056 (finish_step_over): New.
18057 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18058 requests. Clear the thread's last reported target waitstatus.
18059 Don't use the `suspended' flag. Don't consider pending breakpoints.
18060 (linux_resume): Start a step-over if necessary.
18061 (proceed_one_lwp): New.
18062 (proceed_all_lwps): New.
18063 (unstop_all_lwps): New.
18064 * linux-low.h (struct lwp_info): Rewrite comment for the
18065 `suspended' flag. Add the `stop_pc' field. Delete the
18066 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18067 Add `'last_resume_kind' and `need_step_over' fields.
18068 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18069 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18070 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18071 (set_raw_breakpoint_at): New.
18072 (set_breakpoint_at): Rewrite to use it.
18073 (reinsert_breakpoint_handler): Delete.
18074 (set_reinsert_breakpoint): New.
18075 (reinsert_breakpoint_by_bp): Delete.
18076 (delete_reinsert_breakpoints): New.
18077 (uninsert_breakpoint): Rewrite.
18078 (uninsert_breakpoints_at): New.
18079 (reinsert_breakpoint): Rewrite.
18080 (reinsert_breakpoints_at): New.
18081 (check_breakpoints): Rewrite.
18082 (breakpoint_here): New.
18083 (breakpoint_inserted_here): New.
18084 (check_mem_read): Adjust.
18085 * mem-break.h (breakpoints_supported, breakpoint_here)
18086 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18087 (reinsert_breakpoint_by_bp): Delete declaration.
18088 (delete_reinsert_breakpoints): Declare.
18089 (reinsert_breakpoint): Delete declaration.
18090 (reinsert_breakpoints_at): Declare.
18091 (uninsert_breakpoint): Delete declaration.
18092 (uninsert_breakpoints_at): Declare.
18093 (check_breakpoints): Adjust prototype.
18094 * server.h: Adjust include order.
18095 (struct thread_info): Declare here. Add a `last_status' field.
18096
18097 2010-03-23 Michael Snyder <msnyder@vmware.com>
18098
18099 * server.c (crc32): New function.
18100 (handle_query): Add handling for 'qCRC:' request.
18101
18102 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18103
18104 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18105 lwp had been stopped by a watchpoint.
18106
18107 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18108
18109 * server.h (internal_error): Declare.
18110 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18111 * utils.c (internal_error): New function.
18112
18113 2010-03-15 Andreas Schwab <schwab@redhat.com>
18114
18115 * configure.srv: Fix typo setting srv_regobj.
18116
18117 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18118
18119 * linux-low.c (fetch_register): Avoid passing a non string literal
18120 format to `error'.
18121 (usr_store_inferior_registers): Ditto.
18122
18123 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18124
18125 * linux-low.c (linux_write_memory): Bail out early if peeking
18126 memory failed.
18127
18128 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18129
18130 * linux-low.h (struct lwp_info): New fields
18131 `stopped_by_watchpoint' and `stopped_data_address'.
18132 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18133 here, and cache them in the lwp object.
18134 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18135 directly.
18136 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18137 field.
18138 (linux_stopped_by_watchpoint): Rewrite.
18139 (linux_stopped_data_address): Rewrite.
18140
18141 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18142
18143 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18144 switching the current inferior, not before.
18145
18146 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18147
18148 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18149 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18150 i386-linux.c and amd64-linux.c.
18151 (reg-i386.o): Removed.
18152 (reg-i386.c): Likewise.
18153 (reg-i386-linux.o): Likewise.
18154 (reg-i386-linux.c): Likewise.
18155 (reg-x86-64.o): Likewise.
18156 (reg-x86-64.c): Likewise.
18157 (reg-x86-64-linux.o): Likewise.
18158 (reg-x86-64-linux.c): Likewise.
18159 (i386.o): New.
18160 (i386.c): Likewise.
18161 (i386-linux.o): Likewise.
18162 (i386-linux.c): Likewise.
18163 (amd64.o): Likewise.
18164 (amd64.c): Likewise.
18165 (amd64-linux.o): Likewise.
18166 (amd64-linux.c): Likewise.
18167
18168 * configure.srv (srv_i386_regobj): New.
18169 (srv_i386_linux_regobj): Likewise.
18170 (srv_amd64_regobj): Likewise.
18171 (srv_amd64_linux_regobj): Likewise.
18172 (srv_i386_32bit_xmlfiles): Likewise.
18173 (srv_i386_64bit_xmlfiles): Likewise.
18174 (srv_i386_xmlfiles): Likewise.
18175 (srv_amd64_xmlfiles): Likewise.
18176 (srv_i386_linux_xmlfiles): Likewise.
18177 (srv_amd64_linux_xmlfiles): Likewise.
18178 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18179 srv_xmlfiles to $srv_i386_xmlfiles.
18180 (i[34567]86-*-mingw32ce*): Likewise.
18181 (i[34567]86-*-mingw*): Likewise.
18182 (i[34567]86-*-nto*): Likewise.
18183 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18184 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18185 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18186 (x86_64-*-linux*): Likewise.
18187
18188 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18189 (init_registers_amd64_linux): New.
18190 (x86_arch_setup): Replace init_registers_x86_64_linux with
18191 init_registers_amd64_linux.
18192
18193 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18194
18195 * configure.ac: Check for libdl. If it is not available link against
18196 static libthread_db.
18197 * configure: Regenerate.
18198
18199 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18200
18201 PR9605
18202
18203 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18204 handing a read watchpoint.
18205 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18206
18207 2010-02-12 Doug Evans <dje@google.com>
18208
18209 * linux-low.c (linux_supports_tracefork_flag): Document.
18210 (linux_look_up_symbols): Add comment.
18211
18212 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18213
18214 * regcache.c (supply_register): Clear regcache if buf is NULL.
18215
18216 2010-02-02 Nicolas Roche <roche@sourceware.org>
18217 Joel Brobecker <brobecker@adacore.com>
18218
18219 * inferiors.c (find_inferior): Add function documentation.
18220 (unloaded_dll): Handle the case where the unloaded dll has not
18221 been previously registered in the dll list.
18222
18223 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18224
18225 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18226 (thumb2_breakpoint): New.
18227 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18228
18229 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18230
18231 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18232 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18233 breakpoints.
18234
18235 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18236
18237 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18238
18239 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18240
18241 * linux-s390-low.c (s390_collect_ptrace_register)
18242 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18243
18244 2010-01-21 Doug Evans <dje@google.com>
18245
18246 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18247 (PTRACE_ARG4_TYPE): New macro.
18248 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18249 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18250 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18251 (usr_store_inferior_registers): Ditto.
18252 (linux_read_memory, linux_write_memory): Ditto.
18253 (linux_test_for_tracefork): Ditto.
18254
18255 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18256 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18257
18258 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18259
18260 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18261 target.
18262
18263 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18264
18265 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18266 prototype to take a regcache. Adjust.
18267
18268 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18269
18270 * regcache.h (struct thread_info): Forward declare.
18271 (struct regcache): New.
18272 (new_register_cache): Adjust prototype.
18273 (get_thread_regcache): Declare.
18274 (free_register_cache): Adjust prototype.
18275 (registers_to_string, registers_from_string): Ditto.
18276 (supply_register, supply_register_by_name, collect_register)
18277 (collect_register_as_string, collect_register_by_name): Ditto.
18278 * regcache.c (struct inferior_regcache_data): Delete.
18279 (get_regcache): Rename to ...
18280 (get_thread_regcache): ... this. Adjust. Switch inferior before
18281 fetching registers.
18282 (regcache_invalidate_one): Adjust.
18283 (regcache_invalidate): Fix prototype.
18284 (new_register_cache): Return the new register cache.
18285 (free_register_cache): Change prototype.
18286 (realloc_register_cache): Adjust.
18287 (registers_to_string): Change prototype to take a regcache. Adjust.
18288 (registers_from_string): Ditto.
18289 (register_data): Ditto.
18290 (supply_register): Ditto.
18291 (supply_register_by_name): Ditto.
18292 (collect_register): Ditto.
18293 (collect_register_as_string): Ditto.
18294 (collect_register_by_name): Ditto.
18295 * server.c (process_serial_event): Adjust.
18296 * linux-low.h (regset_fill_func, regset_store_func): Change
18297 prototype.
18298 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18299 Change prototype.
18300 * linux-low.c (get_stop_pc): Adjust.
18301 (check_removed_breakpoint): Adjust.
18302 (linux_wait_for_event): Adjust.
18303 (linux_resume_one_lwp): Adjust.
18304 (fetch_register): Add regcache parameter. Adjust.
18305 (usr_store_inferior_registers): Ditto.
18306 (regsets_fetch_inferior_registers): Ditto.
18307 (regsets_store_inferior_registers): Ditto.
18308 (linux_fetch_registers, linux_store_registers): Ditto.
18309 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18310 regcache. Adjust.
18311 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18312 Ditto.
18313 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18314 prototype to take a regcache.
18315 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18316 * remote-utils.c (convert_ascii_to_int, outreg)
18317 (prepare_resume_reply): Change prototype to take a regcache.
18318 Adjust.
18319 * target.h (struct target_ops) <fetch_registers, store_registers>:
18320 Change prototype to take a regcache.
18321 (fetch_inferior_registers, store_inferior_registers): Change
18322 prototype to take a regcache. Adjust.
18323 * proc-service.c (ps_lgetregs): Adjust.
18324 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18325 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18326 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18327 take a regcache. Adjust.
18328 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18329 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18330 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18331 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18332 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18333 (cris_cannot_fetch_register):
18334 (cris_breakpoint_at): Change prototype to take a regcache.
18335 Adjust.
18336 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18337 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18338 to take a regcache. Adjust.
18339 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18340 Adjust.
18341 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18342 take a regcache. Adjust.
18343 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18344 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18345 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18346 * linux-mips-low.c (mips_get_pc):
18347 (mips_set_pc): Change prototype to take a regcache. Adjust.
18348 (mips_reinsert_addr): Adjust.
18349 (mips_collect_register): Change prototype to take a regcache.
18350 Adjust.
18351 (mips_supply_register):
18352 (mips_collect_register_32bit, mips_supply_register_32bit)
18353 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18354 (mips_store_fpregset): Ditto.
18355 * linux-ppc-low.c (ppc_supply_ptrace_register)
18356 (ppc_supply_ptrace_register): Ditto.
18357 (parse_spufs_run): Adjust.
18358 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18359 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18360 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18361 take a regcache. Adjust.
18362 * linux-s390-low.c (s390_collect_ptrace_register)
18363 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18364 (s390_set_pc): Change prototype to take a regcache. Adjust.
18365 (s390_arch_setup): Adjust.
18366 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18367 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18368 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18369 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18370 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18371 regcache. Adjust.
18372 (sparc_breakpoint_at): Adjust.
18373 * linux-xtensa-low.c (xtensa_fill_gregset):
18374 (xtensa_store_gregset):
18375 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18376 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18377 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18378 prototype to take a regcache. Adjust.
18379 * win32-arm-low.c (arm_fetch_inferior_register)
18380 (arm_store_inferior_register): Change prototype to take a
18381 regcache. Adjust.
18382 * win32-i386-low.c (i386_fetch_inferior_register)
18383 (i386_store_inferior_register): Change prototype to take a
18384 regcache. Adjust.
18385 * win32-low.c (child_fetch_inferior_registers)
18386 (child_store_inferior_registers): Change prototype to take a
18387 regcache. Adjust.
18388 (win32_wait): Adjust.
18389 (win32_fetch_inferior_registers): Change prototype to take a
18390 regcache. Adjust.
18391 (win32_store_inferior_registers): Adjust.
18392 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18393 store_inferior_register>: Change prototype to take a regcache.
18394
18395 2010-01-20 Doug Evans <dje@google.com>
18396
18397 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18398 #ifdef.
18399 (linux_wait_for_event1, linux_init_signals): Ditto.
18400 (W_STOPCODE): Provide definition if missing.
18401
18402 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18403
18404 * linux-low.c (linux_core_of_thread): New.
18405 (compare_ints, show_process, list_threads): New.
18406 (linux_qxfer_osdata): Report threads and cores.
18407 (linux_target_op): Register linux_core_of_thread.
18408 * remote-utils.c (prepare_resume_reply): Report the core.
18409 (buffer_xml_printf): Support %d specifier.
18410 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18411 New.
18412 (handle_query): Handle qXfer:threads. Announce availability
18413 thereof.
18414 * target.h (struct target_ops): New field core_of_thread.
18415
18416 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18417
18418 * Makefile.in (clean): Remove new generated files.
18419 (reg-s390.o, reg-s390.c): Remove rules.
18420 (reg-s390x.o, reg-s390x.c): Likewise.
18421 (s390-linux32.o, s390-linux32.c): Add rules.
18422 (s390-linux64.o, s390-linux64.c): Likewise.
18423 (s390x-linux64.o, s390x-linux64.c): Likewise.
18424 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18425 * linux-s390-low.c: Include <elf.h>.
18426 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18427 (init_registers_s390): Remove prototype.
18428 (init_registers_s390x): Likewise.
18429 (init_registers_s390_linux32): Add prototype.
18430 (init_registers_s390_linux64): Likewise.
18431 (init_registers_s390x_linux64): Likewise.
18432 (s390_num_regs_3264): New define.
18433 (s390_regmap_3264): New global variable.
18434 (s390_cannot_fetch_register): Remove obsolete check.
18435 (s390_cannot_store_register): Likewise.
18436 (s390_collect_ptrace_register): Handle upper/lower register halves.
18437 (s390_supply_ptrace_register): Likewise.
18438 (s390_fill_gregset): Update to register number changes.
18439 (s390_get_hwcap): New routine.
18440 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18441 Install appropriate regmap and register set.
18442
18443 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18444
18445 * server.c (gdbserver_version): Update copyright year to 2010.
18446 * gdbreplay.c (gdbreplay_version): Likewise.
18447
18448 2009-12-28 Doug Evans <dje@google.com>
18449
18450 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18451 elf/external.h. Include <elf.h> instead but only if necessary.
18452
18453 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18454
18455 * linux-low.c (linux_remove_process): Remove `detaching'
18456 parameter. Don't release/detach from thread_db here.
18457 (linux_kill): Release/detach from thread_db here, ...
18458 (linux_detach): ... and here, before actually detaching.
18459 (linux_wait_1): ... and here, when a process exits.
18460 * thread-db.c (any_thread_of): New.
18461 (thread_db_free): Switch the current inferior to a thread of the
18462 passed in process.
18463
18464 2009-12-21 Doug Evans <dje@google.com>
18465
18466 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18467
18468 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18469 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18470 warning ifndef __NR_tkill. Move setting of errno there too.
18471 Delete unnecessary resetting of errno after syscall.
18472 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18473
18474 * configure.ac: Check for dladdr.
18475 * config.in: Regenerate.
18476 * configure: Regenerate.
18477 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18478 (try_thread_db_load): Update.
18479
18480 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18481
18482 2009-12-18 Doug Evans <dje@google.com>
18483
18484 * event-loop.c: Include unistd.h if it exists.
18485
18486 * linux-low.c (my_waitpid): Move definition away from being in
18487 between linux_tracefork_child/linux_test_for_tracefork.
18488
18489 * gdb_proc_service.h (psaddr_t): Fix type.
18490 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18491 signature to match glibc.
18492
18493 2009-12-16 Doug Evans <dje@google.com>
18494
18495 * linux-low.c (linux_read_memory): Fix argument to read.
18496
18497 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18498
18499 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18500 events, don't leave current_inferior pointing at null.
18501
18502 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18503
18504 * win32-low.c (LOG): Delete.
18505 (OUTMSG): Output to stderr.
18506 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18507 on compile time LOG macro.
18508 (win32_wait): Fix debug output.
18509
18510 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18511
18512 * win32-low.c (win32_add_one_solib): If the dll name is
18513 "ntdll.dll", prepend the system directory to the dll path.
18514
18515 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18516
18517 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18518
18519 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18520 Vladimir Prus <vladimir@codesourcery.com>
18521
18522 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18523 * configure.ac: Check for __mcoldfire__ and set
18524 gdb_cv_m68k_is_coldfire.
18525 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18526 reg-cf.o and reg-m68k.o.
18527 * configure: Regenerated.
18528
18529 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18530
18531 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18532 Pass it to thread_db_free.
18533 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18534 proper `detaching' argument to linux_remove_process.
18535 * linux-low.h (thread_db_free): Add `detaching' parameter.
18536 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18537 to thread_db_free.
18538 (thread_db_free): Add `detaching' parameter. Only
18539 call td_ta_clear_event if detaching from process.
18540
18541 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18542
18543 * thread-db.c (thread_db_free): Fix typo.
18544
18545 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18546
18547 PR gdb/10838
18548 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18549
18550 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18551
18552 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18553 with an i686 compiler.
18554 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18555 needed.
18556 * configure: Rebuilt.
18557
18558 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18559
18560 PR gdb/10783
18561
18562 * server.c (handle_search_memory_1): Correct read_addr initialization
18563 in loop for searching subsequent chunks.
18564
18565 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18566
18567 * configure.ac: New --with-libthread-db option.
18568 * thread-db.c: Allow direct dependence on libthread_db.
18569 (thread_db_free): Adjust.
18570 * config.in: Regenerate.
18571 * configure: Likewise.
18572
18573 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18574
18575 PR gdb/10757
18576 * thread-db.c (attach_thread): New function.
18577 (maybe_attach_thread): Return success/failure.
18578 (find_new_threads_callback): Adjust.
18579 (thread_db_find_new_threads): Loop until no new threads.
18580
18581 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18582
18583 * proc-service.c (ps_lgetregs): Formatting.
18584
18585 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18586
18587 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18588 * configure.ac: Adjust.
18589 * linux-low.h (struct process_info_private): Move members to struct
18590 thread_db.
18591 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18592 * linux-low.c (linux_remove_process): Adjust.
18593 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18594 * server.c (handle_query): Move code ...
18595 (handle_monitor_command): ... here. New function.
18596 * target.h (struct target_ops): New member.
18597 * thread-db.c (struct thread_db): New.
18598 (libthread_db_search_path): New variable.
18599 (thread_db_create_event, thread_db_enable_reporting)
18600 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18601 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18602 (try_thread_db_load_1, dladdr_to_soname): New functions.
18603 (try_thread_db_load, thread_db_load_search): New functions.
18604 (thread_db_init): Search for libthread_db.
18605 (thread_db_free): New function.
18606 (thread_db_handle_monitor_command): Likewise.
18607 * config.in: Regenerate.
18608 * configure: Regenerate.
18609
18610 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18611
18612 * spu-low.c (spu_kill): Wait for inferior to terminate.
18613 Call clear_inferiors.
18614 (spu_detach): Call clear_inferiors.
18615
18616 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18617
18618 * aclocal.m4: Regenerate.
18619 * config.in: Likewise.
18620 * configure: Likewise.
18621
18622 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18623
18624 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18625 (parse_spufs_run): New function.
18626 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18627 (ppc_breakpoint_at): Handle SPU breakpoints.
18628
18629 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18630
18631 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18632 (SPUFS_MAGIC): Define.
18633 (spu_enumerate_spu_ids): New function.
18634 (linux_qxfer_spu): New function.
18635 (linux_target_ops): Install linux_qxfer_spu.
18636
18637 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18638
18639 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18640 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18641 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18642 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18643 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18644 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18645 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18646 (init_registers_powerpc_cell32l): Add prototype.
18647 (init_registers_powerpc_cell64l): Likewise.
18648 (ppc_arch_setup): Detect Cell/B.E. architecture.
18649
18650 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18651
18652 * Makefile.in (datarootdir): New variable.
18653
18654 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18655
18656 * linux-low.c (linux_write_memory): Update debugging output.
18657 * Makefile.in (clean): Add new descriptions.
18658 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18659 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18660 * configure.srv: Add new files for arm*-*-linux*.
18661 * linux-arm-low.c: Add new declarations.
18662 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18663 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18664 (HWCAP_VFPv3D16): New.
18665 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18666 instead of __IWMMXT__.
18667 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18668 (arm_arch_setup): New.
18669 (target_regsets): Remove #ifdef. Add VFP regset.
18670 (the_low_target): Use arm_arch_setup.
18671
18672 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18673
18674 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18675 the main thread again.
18676
18677 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18678
18679 Adding Neutrino gdbserver.
18680 * configure: Regenerated.
18681 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18682 * configure.srv (i[34567]86-*-nto*): New target.
18683 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18684 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18685 (nto_comctrl) [__QNX__]: New function.
18686 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18687
18688 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18689
18690 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18691 srv_tgtobj.
18692
18693 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18694 Pedro Alves <pedro@codesourcery.com>
18695
18696 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18697 don't support CONTEXT_EXTENDED_REGISTERS.
18698 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18699 (the_low_target): Install them.
18700 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18701 failing with ERROR_PIPE_NOT_CONNECTED.
18702
18703 2009-06-30 Doug Evans <dje@google.com>
18704 Pierre Muller <muller@ics.u-strasbg.fr>
18705
18706 Add h/w watchpoint support to x86-linux, win32-i386.
18707 * Makefile.in (SFILES): Add i386-low.c
18708 (i386_low_h): Define.
18709 (i386-low.o): Add dependencies.
18710 (linux-x86-low.o): Add i386-low.h dependency.
18711 (win32-i386-low.o): Ditto.
18712 * i386-low.c: New file.
18713 * i386-low.h: New file.
18714 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18715 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18716 * linux-low.c (linux_add_process): Initialize arch_private.
18717 (linux_remove_process): Free arch_private.
18718 (add_lwp): Initialize arch_private.
18719 (delete_lwp): Free arch_private.
18720 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18721 provided.
18722 * linux-low.h (process_info_private): New member arch_private.
18723 (lwp_info): New member arch_private.
18724 (linux_target_ops): New members new_process, new_thread,
18725 prepare_to_resume.
18726 (ptid_of): New macro.
18727 * linux-x86-low.c: Include stddef.h, i386-low.h.
18728 (arch_process_info): New struct.
18729 (arch_lwp_info): New struct.
18730 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18731 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18732 (i386_dr_low_get_status): New function.
18733 (x86_insert_point, x86_remove_point): New functions.
18734 (x86_stopped_by_watchpoint): New function.
18735 (x86_stopped_data_address): New function.
18736 (x86_linux_new_process, x86_linux_new_thread): New functions.
18737 (x86_linux_prepare_to_resume): New function.
18738 (the_low_target): Add entries for insert_point, remove_point,
18739 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18740 prepare_to_resume.
18741 * server.c (debug_hw_points): New global.
18742 (monitor_show_help): Document set debug-hw-points.
18743 (handle_query): Process "set debug-hw-points".
18744 * server.h (debug_hw_points): Declare.
18745 (paddress): Declare.
18746 * utils.c (NUMCELLS, CELLSIZE): New macros.
18747 (get_sell, xsnprintf, paddress): New functions.
18748 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18749 remove_point, stopped_by_watchpoint, stopped_data_address.
18750 * win32-i386-low.c: Include i386-low.h.
18751 (debug_reg_state): Replaces dr.
18752 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18753 (i386_dr_low_get_status): New function.
18754 (i386_insert_point, i386_remove_point): New functions.
18755 (i386_stopped_by_watchpoint): New function.
18756 (i386_stopped_data_address): New function.
18757 (i386_initial_stuff): Update.
18758 (get_thread_context,set_thread_context,i386_thread_added): Update.
18759 (the_low_target): Add entries for insert_point,
18760 remove_point, stopped_by_watchpoint, stopped_data_address.
18761 * win32-low.c (win32_insert_watchpoint): New function.
18762 (win32_remove_watchpoint): New function.
18763 (win32_stopped_by_watchpoint): New function.
18764 (win32_stopped_data_address): New function.
18765 (win32_target_ops): Add entries for insert_watchpoint,
18766 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18767 * win32-low.h (win32_target_ops): New members insert_point,
18768 remove_point, stopped_by_watchpoint, stopped_data_address.
18769
18770 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18771
18772 * server.c (process_serial_event): Re-return unsupported, not
18773 error, if the type isn't recognized. Re-allow supporting only
18774 insert or remove packets. Also call require_running for
18775 breakpoints. Add missing break statement to default case. Tidy.
18776 * target.h (struct target_ops): Rename insert_watchpoint to
18777 insert_point, and remove_watchpoint to remove_point.
18778
18779 * linux-low.h (struct linux_target_ops): Likewise.
18780 * linux-low.c (linux_insert_watchpoint): Rename to ...
18781 (linux_insert_point): ... this. Adjust.
18782 (linux_remove_watchpoint): Rename to ...
18783 (linux_remove_point): ... this. Adjust.
18784 (linux_target_ops): Adjust.
18785 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18786 (cris_insert_point): ... this.
18787 (cris_remove_watchpoint): Rename to ...
18788 (cris_remove_point): ... this.
18789 (the_low_target): Adjust.
18790
18791 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18792
18793 * server.c (handle_v_kill): Pass signal_pid to
18794 kill_inferior if multi_process is zero.
18795
18796 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18797
18798 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18799 * target.h (target_ops): Comment for *_watchpoint to make it clear
18800 the functions can get types '0' and '1'.
18801
18802 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18803
18804 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18805 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18806 * regcache.c (get_regcache): Likewise.
18807 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18808 * win32-low.c (child_fetch_inferior_registers): Remove check for
18809 regno 0.
18810
18811 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18812 Pedro Alves <pedro@codesourcery.com>
18813
18814 * target.h (struct target_ops) <supports_multi_process>: New
18815 callback.
18816 (target_supports_multi_process): New.
18817 * server.c (handle_query): Even if GDB reports support, only
18818 enable multi-process if the target also supports it. Report
18819 multi-process support only if the target backend supports it.
18820 * linux-low.c (linux_supports_multi_process): New function.
18821 (linux_target_ops): Install it as target_supports_multi_process
18822 callback.
18823
18824 2009-05-24 Doug Evans <dje@google.com>
18825
18826 Global renaming of find_thread_pid to find_thread_ptid.
18827 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18828 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18829 All callers updated.
18830
18831 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18832 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18833 directly.
18834
18835 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18836 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18837 (linux_resume_one_lwp): Ditto.
18838
18839 2009-05-23 Doug Evans <dje@google.com>
18840
18841 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18842 from struct inferior_list_entry * to struct lwp_info *.
18843 All callers updated.
18844
18845 2009-05-13 Doug Evans <dje@google.com>
18846
18847 * linux-x86-low.c: Don't include assert.h.
18848 (x86_siginfo_fixup): Use fatal, not assert.
18849 (x86_arch_setup): Fix comment.
18850
18851 2009-05-12 Doug Evans <dje@google.com>
18852
18853 Biarch support for i386/amd64 gdbserver.
18854 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18855 Add linux-x86-low.c.
18856 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18857 (linux-x86-low.o): Add.
18858 * linux-x86-64-low.c: Delete.
18859 * linux-i386-low.c: Delete.
18860 * linux-x86-low.c: New file.
18861 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18862 linux-x86-low.o.
18863 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18864 linux-x86-low.o.
18865 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18866 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18867 (linux_child_pid_to_exec_file): New function.
18868 (elf_64_header_p, elf_64_file_p): New functions.
18869 (siginfo_fixup): New function.
18870 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18871 give target a chance to convert layout.
18872 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18873 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18874
18875 2009-05-07 Doug Evans <dje@google.com>
18876
18877 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18878 (regsets_store_inferior_registers): Ditto.
18879
18880 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18881
18882 PR server/10048
18883
18884 * linux-low.c (must_set_ptrace_flags): Delete.
18885 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18886 of the global.
18887 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18888 `lwp->must_set_ptrace_flags' instead.
18889 (linux_wait_for_event_1): Set ptrace options here.
18890 (linux_wait_1): ... not here.
18891
18892 2009-04-30 Doug Evans <dje@google.com>
18893
18894 * inferiors.c (started_inferior_callback): New function.
18895 (attached_inferior_callback): New function.
18896 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18897 * server.c (print_started_pid, print_attached_pid): New functions.
18898 (detach_or_kill_for_exit): New function.
18899 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18900 * server.h (have_started_inferiors_p): Declare.
18901 (have_attached_inferiors_p): Declare.
18902
18903 * inferiors.c (remove_process): Fix memory leak, free process.
18904 * linux-low.c (linux_remove_process): New function.
18905 (linux_kill): Call it instead of remove_process.
18906 (linux_detach, linux_wait_1): Ditto.
18907
18908 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18909
18910 * configure.srv: Add x86 Windows CE target.
18911
18912 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18913
18914 * inferiors.c (get_thread_process): Make global.
18915 * server.h (get_thread_process): Add prototype.
18916 * thread-db.c (find_one_thread): Use get_thread_process
18917 instead of current_process.
18918 (thread_db_get_tls_address): Do not crash if called when
18919 thread layer is not yet initialized.
18920
18921 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18922
18923 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18924 * spu-low.c (current_tid): Rename to ...
18925 (current_ptid): ... this.
18926 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18927 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18928 ptid_get_lwp (current_ptid) instead of current_tid.
18929 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18930 instead of current_tid. Use find_process_pid to verify pid
18931 argument is valid. Pass proper argument to remove_process.
18932 (spu_thread_alive): Compare current_ptid instead of current_tid.
18933 (spu_resume): Likewise.
18934
18935 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18936
18937 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18938 variable.
18939
18940 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18941
18942 Implement the multiprocess extensions, and add linux multiprocess
18943 support.
18944
18945 * server.h (ULONGEST): Declare.
18946 (struct ptid, ptid_t): New.
18947 (minus_one_ptid, null_ptid): Declare.
18948 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18949 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18950 (struct inferior_list_entry): Change `id' type from unsigned from
18951 to ptid_t.
18952 (struct sym_cache, struct breakpoint, struct
18953 process_info_private): Forward declare.
18954 (struct process_info): Declare.
18955 (current_process): Declare.
18956 (all_processes): Declare.
18957 (initialize_inferiors): Declare.
18958 (add_thread): Adjust to use ptid_t.
18959 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18960 (add_process, remove_process, find_thread_pid): Declare.
18961 (find_inferior_id): Adjust to use ptid_t.
18962 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18963 (multi_process): Declare.
18964 (push_event): Adjust to use ptid_t.
18965 (read_ptid, write_ptid): Declare.
18966 (prepare_resume_reply): Adjust to use ptid_t.
18967 (clear_symbol_cache): Declare.
18968 * inferiors.c (all_processes): New.
18969 (null_ptid, minus_one_ptid): New.
18970 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18971 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18972 (add_thread): Change unsigned long to ptid. Remove gdb_id
18973 parameter. Adjust.
18974 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18975 (gdb_id_to_thread): Rename to ...
18976 (find_thread_pid): ... this. Change unsigned long to ptid.
18977 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18978 (loaded_dll, pull_pid_from_list): Adjust.
18979 (add_process, remove_process, find_process_pid)
18980 (get_thread_process, current_process, initialize_inferiors): New.
18981 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18982 (struct target_waitstatus) <related_pid>: Ditto.
18983 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18984 return type to int.
18985 (struct target_ops) <join>: Add `pid' argument.
18986 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18987 (struct target_ops) <wait>: Add `ptid' field. Change return type
18988 to ptid.
18989 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
18990 (mywait): Add `ptid' argument. Change return type to ptid_t.
18991 (target_pid_to_str): Declare.
18992 * target.c (set_desired_inferior): Adjust to use ptids.
18993 (mywait): Add new `ptid' argument. Adjust.
18994 (target_pid_to_str): New.
18995 * mem-break.h (free_all_breakpoints): Declare.
18996 * mem-break.c (breakpoints): Delelete.
18997 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
18998 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
18999 to use per-process breakpoint list.
19000 (free_all_breakpoints): New.
19001 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19002 (symbol_cache, all_symbols_looked_up): Delete.
19003 (hexchars): New.
19004 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19005 read_ptid): New.
19006 (prepare_resume_reply): Change ptid argument's type from unsigned
19007 long to ptid_t. Adjust. Implement W;process and X;process.
19008 (free_sym_cache, clear_symbol_cache): New.
19009 (look_up_one_symbol): Adjust to per-process symbol cache. *
19010 * server.c (cont_thread, general_thread, step_thread): Change type
19011 to ptid_t.
19012 (attached): Delete.
19013 (multi_process): New.
19014 (last_ptid): Change type to ptid_t.
19015 (struct vstop_notif) <ptid>: Change type to ptid_t.
19016 (queue_stop_reply, push_event): Change `ptid' argument's type to
19017 ptid_t.
19018 (discard_queued_stop_replies): Add `pid' argument.
19019 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19020 changes. Don't reference the `attached' global.
19021 (attach_inferior): Adjust to mywait interface changes.
19022 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19023 features. Handle and report "multiprocess+". Handle
19024 "qAttached:PID".
19025 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19026 changes.
19027 (handle_v_kill): New.
19028 (handle_v_stopped): Adjust to use target_pid_to_str.
19029 (handle_v_requests): Allow multiple attaches and runs when
19030 multiprocess extensions are in effect. Handle "vKill".
19031 (myresume): Adjust to use ptids.
19032 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19033 (handle_status): Adjust to discard_queued_stop_replies interface
19034 change.
19035 (first_thread_of, kill_inferior_callback)
19036 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19037 (main): Call initialize_inferiors. Adjust to use ptids, killing
19038 and detaching from all inferiors. Handle multiprocess packet
19039 variants.
19040 * linux-low.h: Include gdb_proc_service.h.
19041 (struct process_info_private): New.
19042 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19043 <lwpid_of>: Use ptid_get_lwp.
19044 (get_lwp_thread): Adjust.
19045 (struct lwp_info): Add `dead' member.
19046 (find_lwp_pid): Declare.
19047 * linux-low.c (thread_db_active): Delete.
19048 (new_inferior): Adjust comment.
19049 (inferior_pid): Delete.
19050 (linux_add_process): New.
19051 (handle_extended_wait): Adjust.
19052 (add_lwp): Change unsigned long to ptid.
19053 (linux_create_inferior): Add process to processes table. Adjust
19054 to use ptids. Don't set new_inferior here.
19055 (linux_attach_lwp): Rename to ...
19056 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19057 it. Adjust to use ptids.
19058 (linux_attach_lwp): New.
19059 (linux_attach): Add process to processes table. Don't set
19060 new_inferior here.
19061 (struct counter): New.
19062 (second_thread_of_pid_p, last_thread_of_process_p): New.
19063 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19064 multiple processes.
19065 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19066 processes. Remove process from process table.
19067 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19068 to multiple processes.
19069 (any_thread_of): New.
19070 (linux_detach): Add `pid' argument, and handle it. Remove process
19071 from processes table.
19072 (linux_join): Add `pid' argument. Handle it.
19073 (linux_thread_alive): Change unsighed long argument to ptid_t.
19074 Consider dead lwps as not being alive.
19075 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19076 threads we're not interested in.
19077 (same_lwp, find_lwp_pid): New.
19078 (linux_wait_for_lwp): Change `pid' argument's type from int to
19079 ptid_t. Adjust.
19080 (linux_wait_for_event): Rename to ...
19081 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19082 from int to ptid_t. Adjust.
19083 (linux_wait_for_event): New.
19084 (linux_wait_1): Add `ptid' argument. Change return type to
19085 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19086 that exit from the process table.
19087 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19088 Adjust.
19089 (mark_lwp_dead): New.
19090 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19091 stopping all threads, mark its main lwp as dead.
19092 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19093 ptids.
19094 (fetch_register, usr_store_inferior_registers)
19095 (regsets_fetch_inferior_registers)
19096 (regsets_store_inferior_registers, linux_read_memory)
19097 (linux_write_memory): Inline `inferior_pid'.
19098 (linux_look_up_symbols): Adjust to use per-process
19099 `thread_db_active'.
19100 (linux_request_interrupt): Adjust to use ptids.
19101 (linux_read_auxv): Inline `inferior_pid'.
19102 (initialize_low): Don't reference thread_db_active.
19103 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19104 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19105 (ps_getpid): Return the pid of the current inferior.
19106 * thread-db.c (proc_handle, thread_agent): Delete.
19107 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19108 per-process data.
19109 (find_one_thread): Change argument type to ptid_t. Adjust to
19110 per-process data.
19111 (maybe_attach_thread): Adjust to per-process data and ptids.
19112 (thread_db_find_new_threads): Ditto.
19113 (thread_db_init): Ditto.
19114 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19115 processes table. Adjust to use ptids.
19116 (spu_kill, spu_detach): Adjust interface. Remove process from
19117 processes table.
19118 (spu_join, spu_thread_alive): Adjust interface.
19119 (spu_wait): Adjust interface. Remove process from processes
19120 table. Adjust to use ptids.
19121 * win32-low.c (current_inferior_tid): Delete.
19122 (current_inferior_ptid): New.
19123 (debug_event_ptid): New.
19124 (thread_rec): Take a ptid. Adjust.
19125 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19126 (child_delete_thread): Ditto.
19127 (do_initial_child_stuff): Add `attached' argument. Add process to
19128 processes table.
19129 (child_fetch_inferior_registers, child_store_inferior_registers):
19130 Adjust.
19131 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19132 (win32_attach): Pass 1 to do_initial_child_stuff.
19133 (win32_kill): Adjust interface. Remove process from processes
19134 table.
19135 (win32_detach): Ditto.
19136 (win32_join): Adjust interface.
19137 (win32_thread_alive): Take a ptid.
19138 (win32_resume): Adjust to use ptids.
19139 (get_child_debug_event): Ditto.
19140 (win32_wait): Adjust interface. Remove exiting process from
19141 processes table.
19142
19143 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19144
19145 Non-stop mode support.
19146
19147 * server.h (non_stop): Declare.
19148 (gdb_client_data, handler_func): Declare.
19149 (delete_file_handler, add_file_handler, start_event_loop):
19150 Declare.
19151 (handle_serial_event, handle_target_event, push_event)
19152 (putpkt_notif): Declare.
19153 * target.h (enum resume_kind): New.
19154 (struct thread_resume): Replace `step' field by `kind' field.
19155 (TARGET_WNOHANG): Define.
19156 (struct target_ops) <wait>: Add `options' argument.
19157 <supports_non_stop, async, start_non_stop>: New fields.
19158 (target_supports_non_stop, target_async): New.
19159 (start_non_stop): Declare.
19160 (mywait): Add `options' argument.
19161 * target.c (mywait): Add `options' argument. Print child exit
19162 notifications here.
19163 (start_non_stop): New.
19164 * server.c (non_stop, own_buf, mem_buf): New globals.
19165 (struct vstop_notif): New.
19166 (notif_queue): New global.
19167 (queue_stop_reply, push_event, discard_queued_stop_replies)
19168 (send_next_stop_reply): New.
19169 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19170 interface changes.
19171 (attach_inferior): In non-stop mode, don't wait for the target
19172 here.
19173 (handle_general_set): Handle QNonStop.
19174 (handle_query): When handling qC, return the current general
19175 thread, instead of the first thread of the list.
19176 (handle_query): If the backend supports non-stop mode, include
19177 QNonStop+ in the qSupported query response.
19178 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19179 and non-stop mode.
19180 (handle_v_attach, handle_v_run): Handle non-stop mode.
19181 (handle_v_stopped): New.
19182 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19183 (myresume): Adjust to use resume_kind. Handle non-stop.
19184 (queue_stop_reply_callback): New.
19185 (handle_status): Handle non-stop mode.
19186 (main): Clear non_stop flag on reconnection. Use the event-loop.
19187 Refactor serial protocol handling from here ...
19188 (process_serial_event): ... to this new function. When GDB
19189 selects any thread, select one here. In non-stop mode, wait until
19190 GDB acks all pending events before exiting.
19191 (handle_serial_event, handle_target_event): New.
19192 * remote-utils.c (remote_open): Install remote_desc in the event
19193 loop.
19194 (remote_close): Remove remote_desc from the event loop.
19195 (putpkt_binary): Rename to...
19196 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19197 (putpkt_binary): New as wrapper around putpkt_binary_1.
19198 (putpkt_notif): New.
19199 (prepare_resume_reply): In non-stop mode, don't change the
19200 general_thread.
19201 * event-loop.c: New.
19202 * Makefile.in (OBJ): Add event-loop.o.
19203 (event-loop.o): New rule.
19204
19205 * linux-low.h (pid_of): Moved here.
19206 (lwpid_of): New.
19207 (get_lwp_thread): Use lwpid_of.
19208 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19209 * linux-low.c (pid_of): Delete.
19210 (inferior_pid): Use lwpid_of.
19211 (linux_event_pipe): New.
19212 (target_is_async_p): New.
19213 (delete_lwp): New.
19214 (handle_extended_wait): Use lwpid_of.
19215 (add_lwp): Don't set lwpid field.
19216 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19217 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19218 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19219 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19220 first. Adjust to linux_wait_for_event interface changes. Use
19221 lwpid_of.
19222 (linux_detach): Don't delete the main lwp here.
19223 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19224 (status_pending_p): Don't consider explicitly suspended lwps.
19225 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19226 pointer. Add OPTIONS argument. Change return type to int. Use
19227 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19228 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19229 pointer. Add status pointer argument. Return a pid instead of a
19230 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19231 changes. In non-stop mode, don't switch to a random thread.
19232 (linux_wait): Rename to...
19233 (linux_wait_1): ... this. Add target_options argument, and handle
19234 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19235 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19236 clean exit and signal exit code. Don't stop all threads in
19237 non-stop mode. In all-stop mode, only stop all threads when
19238 reporting a stop to GDB. Handle explicit thread stop requests.
19239 (async_file_flush, async_file_mark): New.
19240 (linux_wait): New.
19241 (send_sigstop): Use lwpid_of.
19242 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19243 interface changes. In non-stop mode, don't switch to a random
19244 thread.
19245 (linux_resume_one_lwp): Use lwpid_of.
19246 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19247 (linux_resume_one_thread): ... this. Handle resume_stop. In
19248 non-stop mode, don't look for pending flag in all threads.
19249 (resume_status_pending_p): Don't consider explicitly suspended
19250 threads.
19251 (my_waitpid): Reimplement. Emulate __WALL.
19252 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19253 Use lwpid_of.
19254 (sigchld_handler, linux_supports_non_stop, linux_async)
19255 (linux_start_non_stop): New.
19256 (linux_target_ops): Register linux_supports_non_stop, linux_async
19257 and linux_start_non_stop.
19258 (initialize_low): Install SIGCHLD handler.
19259 * thread-db.c (thread_db_create_event, find_one_thread)
19260 (thread_db_get_tls_address): Use lwpid_of.
19261 * win32-low.c (win32_detach): Adjust to use resume_kind.
19262 (win32_wait): Add `options' argument.
19263 * spu-low.c (spu_resume): Adjust to use resume_kind.
19264 (spu_wait): Add `options' argument.
19265
19266 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19267
19268 Decouple target code from remote protocol.
19269
19270 * target.h (enum target_waitkind): New.
19271 (struct target_waitstatus): New.
19272 (struct target_ops) <wait>: Return an unsigned long. Take a
19273 target_waitstatus pointer instead of a char pointer.
19274 (mywait): Likewise.
19275 * target.c (mywait): Change prototype to return an unsigned long.
19276 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19277 * server.h (thread_from_wait, old_thread_from_wait): Delete
19278 declarations.
19279 (prepare_resume_reply): Change prototype to take a
19280 target_waitstatus.
19281 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19282 (last_status, last_ptid): New.
19283 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19284 pid instead of a signal.
19285 (attach_inferior): Remove "status" and "signal" parameters.
19286 Adjust.
19287 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19288 not as an address.
19289 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19290 (handle_v_requests, myresume): Remove "status" and "signal"
19291 parameters. Adjust.
19292 (handle_status): New.
19293 (main): Delete local `status'. Adjust.
19294 * remote-utils.c: Include target.h.
19295 (prepare_resume_reply): Change prototype to take a
19296 target_waitstatus. Adjust.
19297
19298 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19299 interface.
19300 * spu-low.c (spu_wait): Adjust.
19301 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19302 Delete.
19303 (win32_wait): Adjust.
19304
19305 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19306
19307 * target.h (struct thread_resume): Delete leave_stopped member.
19308 (struct target_ops): Add a `n' argument to the `resume' callback.
19309 * server.c (start_inferior): Adjust.
19310 (handle_v_cont, myresume): Adjust.
19311 * linux-low.c (check_removed_breakpoint): Adjust to resume
19312 interface change, and to removed leave_stopped field.
19313 (resume_ptr): Delete.
19314 (struct thread_resume_array): New.
19315 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19316 resume interface change.
19317 (linux_continue_one_thread, linux_queue_one_thread)
19318 (resume_status_pending_p): Check if the resume field is NULL
19319 instead of checking the leave_stopped member.
19320 (linux_resume): Adjust to the target resume interface change.
19321 * spu-low.c (spu_resume): Adjust to the target resume interface
19322 change.
19323 * win32-low.c (win32_detach, win32_resume): Ditto.
19324
19325 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19326
19327 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19328 flag.
19329 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19330 pending.
19331 (linux_continue_one_thread): Only preserve the stepping flag if
19332 there's a pending breakpoint.
19333
19334 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19335
19336 * server.c (main): After the inferior having exited, call
19337 remote_close before exiting gdbserver.
19338
19339 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19340
19341 Fix size of FPSCR in Power 7 processors.
19342 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19343 (PPC_FEATURE_HAS_DFP): New #define.
19344 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19345 size of the FPSCR.
19346
19347 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19348
19349 * server.c (handle_query) Whitespace and formatting.
19350
19351 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19352
19353 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19354 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19355 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19356 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19357 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19358 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19359 Makefile.in, configure.ac: Fix whitespace throughout.
19360 * configure: Regenerate.
19361
19362 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19363
19364 * inferiors.c (find_inferior): Make it safe for the callback
19365 function to delete the currently iterated inferior.
19366
19367 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19368
19369 * Makefile.in (linuw_low_h): Move higher.
19370 (thread-db.o): Depend on $(linux_low_h).
19371
19372 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19373
19374 Rename "process" to "lwp" throughout.
19375
19376 * linux-low.c (all_processes): Rename to...
19377 (all_lwps): ... this.
19378 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19379 (add_process): Rename to ...
19380 (add_lwp): ... this. Adjust.
19381 (linux_create_inferior): Adjust.
19382 (linux_attach_lwp): Adjust.
19383 (linux_attach): Adjust.
19384 (linux_kill_one_process): Rename to ...
19385 (linux_kill_one_lwp): ... this. Adjust.
19386 (linux_kill): Adjust.
19387 (linux_detach_one_process): Rename to ...
19388 (linux_detach_one_lwp): ... this. Adjust.
19389 (linux_detach): Adjust.
19390 (check_removed_breakpoint): Adjust.
19391 (status_pending_p): Adjust.
19392 (linux_wait_for_process): Rename to ...
19393 (linux_wait_for_lwp): ... this. Adjust.
19394 (linux_wait_for_event): Adjust.
19395 (send_sigstop): Adjust.
19396 (wait_for_sigstop): Adjust.
19397 (stop_all_processes): Rename to ...
19398 (stop_all_lwps): ... this.
19399 (linux_resume_one_process): Rename to ...
19400 (linux_resume_one_lwp): ... this. Adjust.
19401 (linux_set_resume_request, linux_continue_one_thread)
19402 (linux_queue_one_thread, resume_status_pending_p)
19403 (usr_store_inferior_registers, regsets_store_inferior_registers)
19404 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19405 Adjust.
19406 * linux-low.h (get_process): Rename to ...
19407 (get_lwp): ... this. Adjust.
19408 (get_thread_process): Rename to ...
19409 (get_thread_lwp): ... this. Adjust.
19410 (get_process_thread): Rename to ...
19411 (get_lwp_thread): ... this. Adjust.
19412 (struct process_info): Rename to ...
19413 (struct lwp_info): ... this.
19414 (all_processes): Rename to ...
19415 (all_lwps): ... this.
19416 * proc-service.c (ps_lgetregs): Adjust.
19417 * thread-db.c (thread_db_create_event, find_one_thread)
19418 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19419
19420 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19421
19422 * server.c (handle_query): Handle "qAttached".
19423
19424 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19425
19426 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19427 GPLv3, update license URL.
19428
19429 2009-03-01 Doug Evans <dje@google.com>
19430
19431 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19432 (server_h): Add gdb_signals.h.
19433 (signals.o): Update.
19434 * server.h (target_signal_from_host,target_signal_to_host_p)
19435 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19436
19437 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19438
19439 * remote-utils.c (getpkt): Also generate remote-debug
19440 information if noack_mode is set.
19441
19442 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19443
19444 * server.c (handle_query): Report qXfer:siginfo:read and
19445 qXfer:siginfo:write as supported and handle them.
19446 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19447 * linux-low.c (linux_xfer_siginfo): New.
19448 (linux_target_ops): Set it.
19449
19450 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19451
19452 * server.c (gdbserver_usage): Mention --remote-debug.
19453 (main): Accept '--remote-debug' switch.
19454
19455 2009-01-18 Doug Evans <dje@google.com>
19456
19457 * regcache.c (new_register_cache): No need to check result of xcalloc.
19458 * server.c (handle_search_memory): Back out calls to xmalloc,
19459 result is checked and error is returned to user upon failure.
19460 (handle_query): Ditto. Add more checks for result of malloc.
19461 (handle_v_cont): Check result of malloc, report error back to
19462 user upon failure.
19463 (handle_v_run): Ditto. Call freeargv.
19464 * server.h (freeargv): Declare.
19465 * utils.c (freeargv): New fn.
19466
19467 2009-01-15 Doug Evans <dje@google.com>
19468
19469 * gdbreplay.c (perror_with_name): Make arg const char *.
19470 * server.h (target_signal_to_name): Make return type const char *.
19471 * thread-db.c (thread_db_err_str): Make return type const char *.
19472 * utils.c (perror_with_name): Make arg const char *.
19473
19474 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19475
19476 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19477 when handling a EXIT_PROCESS_DEBUG_EVENT.
19478
19479 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19480
19481 * gdbreplay.c (gdbreplay_version): Update copyright year.
19482 * server.c (gdbserver_version): Likewise.
19483
19484 2009-01-05 Doug Evans <dje@google.com>
19485
19486 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19487 (handle_extended_wait): Improve comment.
19488
19489 2008-12-13 Doug Evans <dje@google.com>
19490
19491 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19492 * server.h (ATTR_MALLOC): New macro.
19493 (xmalloc,xcalloc,xstrdup): Declare.
19494 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19495 * inferiors.c: Ditto.
19496 * linux-low.c: Ditto.
19497 * mem-break.c: Ditto.
19498 * regcache.c: Ditto.
19499 * remote-utils.c: Ditto.
19500 * server.c: Ditto.
19501 * target.c: Ditto.
19502 * win32-low.c: Ditto.
19503
19504 2008-12-12 Doug Evans <dje@google.com>
19505
19506 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19507 in debugging printf.
19508
19509 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19510
19511 2008-12-09 Doug Evans <dje@google.com>
19512
19513 * linux-low.h (struct process_info): Delete member tid, unused.
19514 * thread-db.c (find_one_thread): Update.
19515 (maybe_attach_thread): Update.
19516
19517 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19518
19519 * target.h (struct target_ops): Add qxfer_osdata member.
19520 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19521 and dirent.h.
19522 (linux_qxfer_osdata): New functions.
19523 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19524 callback.
19525 * server.c (handle_query): Handle "qXfer:osdata:read:".
19526 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19527 (buffer_xml_printf): New functions.
19528 * server.h (struct buffer): New.
19529 (buffer_grow_str, buffer_grow_str0): New macros.
19530 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19531 (buffer_xml_printf): Declare.
19532
19533 2008-11-24 Doug Evans <dje@google.com>
19534
19535 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19536
19537 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19538
19539 * server.c (handle_v_run): Always use the supplied argument list.
19540
19541 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19542
19543 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19544 (xtensa_regmap_table): Add entry for scompare1.
19545
19546 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19547
19548 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19549 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19550 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19551 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19552 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19553 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19554 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19555 XML target descriptions.
19556 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19557 when inferior is running on an ISA 2.05 or later processor. Add
19558 special case to return offset for full 64-bit slot of FPSCR when
19559 in 32-bits.
19560
19561 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19562
19563 * Makefile.in (SFILES, clean): Added sparc64 files.
19564 (reg-sparc64.o, reg-sparc64.c): New.
19565 * configure.srv (sparc*-*-linux*): New configuration.
19566 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19567 syscall arguments for SPARC.
19568 (regsets_store_inferior_registers): Likewise.
19569 * linux-sparc-low.c: New file.
19570
19571 2008-10-21 Doug Evans <dje@google.com>
19572
19573 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19574 (READLINE_DIR,READLINE_DEP): Delete.
19575 (INTERNAL_CFLAGS): Update.
19576 (LINTFLAGS): Update.
19577
19578 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19579
19580 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19581 whole argv from the last run, not just argv[0].
19582
19583 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19584
19585 * regcache.c (new_register_cache): Return NULL if the register
19586 cache size isn't known yet.
19587 (free_register_cache): Avoid dereferencing a NULL regcache.
19588
19589 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19590
19591 * configure.srv: Merge MIPS and MIPS64.
19592
19593 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19594
19595 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19596
19597 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19598
19599 * Makefile.in: Add required vsx dependencies.
19600
19601 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19602 Declare init_registers_powerpc_vsx32l.
19603 Declare init_registers_powerpc_vsx64l.
19604 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19605 (ppc_arch_setup): Check for VSX in hwcap.
19606 (ppc_fill_vsxregset): New function.
19607 (ppc_store_vsxregset): New function.
19608 Add new VSX entry in regset_info target_regsets.
19609
19610 * configure.srv: Add new VSX dependencies.
19611
19612 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19613
19614 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19615 (remote_open): Set or clear transport_is_reliable.
19616 (putpkt_binary): Don't expect acks in noack mode.
19617 (getpkt): Don't send ack/nac in noack mode.
19618 * server.c (handle_general_set): Handle QStartNoAckMode.
19619 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19620 qSupported.
19621 (main): Reset noack_mode on every connection.
19622 * server.h (noack_mode): Declare.
19623
19624 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19625
19626 * Makefile.in (GDBREPLAY_OBS): New variable.
19627 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19628
19629 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19630 Daniel Jacobowitz <dan@codesourcery.com>
19631
19632 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19633 (usr_store_inferior_registers): Likewise.
19634 (regsets_store_inferior_registers): Likewise.
19635
19636 2008-07-31 Rolf Jansen <rj@surtec.com>
19637 Pedro Alves <pedro@codesourcery.com>
19638
19639 * configure.ac: Check for memmem declaration.
19640 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19641 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19642 (disable_packet_qfThreadInfo): Unconditionally compile.
19643 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19644 * configure, config.in: Regenerate.
19645
19646 2008-07-28 Doug Kwan <dougkwan@google.com>
19647
19648 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19649 (linux_write_memory): Remove declaration of errno.
19650
19651 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19652
19653 * linux-low.c (handle_extended_wait): Do not use "status"
19654 variable uninitialized.
19655
19656 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19657
19658 * server.c (handle_v_attach): Inhibit reporting dll changes.
19659
19660 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19661
19662 * remote-utils.c (prepare_resume_reply): If requested, don't
19663 output "thread:TID" in the T stop reply.
19664
19665 * server.c (disable_packet_vCont, disable_packet_Tthread)
19666 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19667 (handle_query): If requested, disable support for qC, qfThreadInfo
19668 and qsThreadInfo.
19669 (handle_v_requests): If requested, disable support for vCont.
19670 (gdbserver_show_disableable): New.
19671 (main): Handle --disable-packet and --disable-packet=LIST.
19672
19673 * server.h (disable_packet_vCont, disable_packet_Tthread)
19674 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19675
19676 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19677
19678 * server.c (gdbserver_usage): Mention --version.
19679
19680 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19681
19682 * Makefile.in (gdbreplay.o): New rule.
19683
19684 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19685
19686 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19687 message, not gdbserver.
19688
19689 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19690 Nathan Sidwell <nathan@codesourcery.com>
19691 Joseph Myers <joseph@codesourcery.com>
19692
19693 * acinclude.m4: Include ../../config/acx.m4.
19694 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19695 * configure, config.in: Regenerate.
19696 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19697 * server.c (gdbserver_version): Print PKGVERSION.
19698 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19699 (main): Adjust gdbserver_usage calls.
19700 * gdbreplay.c (version, host_name): Add declarations.
19701 (gdbreplay_version, gdbreplay_usage): New.
19702 (main): Accept --version and --help options.
19703
19704 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19705
19706 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19707 (arm_breakpoint_at): Handle Thumb.
19708 (the_low_target): Add comment.
19709
19710 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19711
19712 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19713
19714 2008-05-09 Doug Evans <dje@google.com>
19715
19716 * server.h (decode_search_memory_packet): Declare.
19717 * remote-utils.c (decode_search_memory_packet): New fn.
19718 * server.c (handle_search_memory_1): New fn.
19719 (handle_search_memory): New fn.
19720 (handle_query): Process qSearch:memory packets.
19721
19722 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19723
19724 * regcache.c (registers_length): Remove.
19725 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19726 full register packet.
19727 * regcache.h (registers_length): Remove prototype.
19728 * server.h (PBUFSIZ): Define to 16384.
19729
19730 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19731
19732 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19733 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19734 powerpc-64l.o, and powerpc-altivec64l.o.
19735 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19736 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19737 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19738 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19739 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19740 to srv_xmlfiles.
19741
19742 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19743 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19744 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19745 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19746 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19747 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19748 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19749 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19750 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19751 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19752 (clean): Update.
19753
19754 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19755 (init_registers_powerpc_32l): ... this new prototype.
19756 (init_registers_powerpc_32): Remove, replace by ...
19757 (init_registers_powerpc_altivec32l): ... this new prototype.
19758 (init_registers_powerpc_e500): Remove, replace by ...
19759 (init_registers_powerpc_e500l): ... this new prototype.
19760 (init_registers_ppc64): Remove, replace by ...
19761 (init_registers_powerpc_64l): ... this new prototype.
19762 (init_registers_powerpc_64): Remove, replace by ...
19763 (init_registers_powerpc_altivec64l): ... this new prototype.
19764 (ppc_num_regs): Set to 73.
19765 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19766 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19767 (ppc_cannot_store_register): Handle orig_r3 and trap.
19768 (ppc_arch_setup): Update init_registers_... calls.
19769 (ppc_fill_gregset): Handle orig_r3 and trap.
19770
19771 * inferiors.c (clear_inferiors): Reset current_inferior.
19772
19773 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19774
19775 * acinclude.m4: Add override.m4.
19776 * configure: Regenerate.
19777
19778 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19779
19780 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19781 initial call to init_register_ppc64.
19782
19783 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19784
19785 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19786 single powerpc*-*-linux* case.
19787 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19788
19789 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19790
19791 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19792 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19793 from reg_xmlfiles.
19794 * linux-ppc-low.c: Include <elf.h>.
19795 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19796 (ppc_hwcap): New global variable.
19797 (ppc_regmap): Remove __SPE__ #ifdef sections.
19798 (ppc_regmap_e500): New global variable.
19799 (ppc_cannot_store_register): Update __SPE__ special case.
19800 (ppc_get_hwcap): New function.
19801 (ppc_arch_setup): Use it to determine whether inferior supports
19802 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19803 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19804 Do not access registers if target does not support AltiVec.
19805 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19806 Do not access registers if target does not support SPE.
19807 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19808
19809 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19810
19811 * linux-low.c (disabled_regsets, num_regsets): New.
19812 (use_regsets_p): Delete.
19813 (linux_wait_for_process): Clear disabled_regsets.
19814 (regsets_fetch_inferior_registers): Check and set it.
19815 (regsets_store_inferior_registers): Likewise.
19816 (linux_fetch_registers, linux_store_registers): Do not use
19817 use_regsets_p.
19818 (initialize_low): Allocate disabled_regsets.
19819
19820 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19821
19822 * Makefile.in (LIBOBJS): New.
19823 (OBS): Use LIBOBJS.
19824 (memmem.o): New rule.
19825 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19826 * configure: Regenerated.
19827
19828 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19829
19830 * server.c (handle_query): Never return "unsupported" for
19831 qXfer:features:read queries.
19832
19833 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19834
19835 * server.c (get_features_xml): Fix inverted condition.
19836 (handle_query): Always support qXfer:feature:read.
19837
19838 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19839
19840 * server.c (wrapper_argv): New.
19841 (start_inferior): Handle wrapper_argv. If set, expect an extra
19842 trap.
19843 (gdbserver_usage): Document --wrapper.
19844 (main): Parse --wrapper.
19845
19846 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19847
19848 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19849 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19850 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19851 (ppc_set_pc): Likewise.
19852 (ppc_arch_setup): New function.
19853 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19854 of collect_register.
19855 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19856
19857 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19858
19859 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19860 instead of linux-ppc64-low.o.
19861 * linux-ppc64-low.c: Remove file.
19862 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19863 (linux-ppc64-low.o): Remove rule.
19864
19865 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19866 (init_registers_powerpc_64): Likewise.
19867 (ppc_regmap): Conditionally define depending on __powerpc64__.
19868 (ppc_cannot_store_register): Do not special-case "fpscr" when
19869 compiled on __powerpc64__.
19870 (ppc_collect_ptrace_register): New function.
19871 (ppc_supply_ptrace_register): New function.
19872 (ppc_breakpoint): Change type to "unsigned int".
19873 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19874 (the_low_target): Conditionally provide initializers for the
19875 arch_setup member depending on __powerpc64__. Install
19876 collect_ptrace_register and supply_ptrace_register members.
19877
19878 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19879
19880 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19881 * server.c (gdbserver_xmltarget): Define.
19882 (get_features_xml): Use it to replace "target.xml" and arch_string.
19883
19884 * configure.srv: Remove srv_xmltarget. Add XML files that were
19885 mentioned there to srv_xmlfiles instead. Remove conditional tests
19886 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19887 srv_xmlfiles and srv_regobj to include all possible choices.
19888 * configure.ac (srv_xmltarget): Remove.
19889 (srv_xmlfiles): Do not add "target.xml".
19890 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19891 checks for supplementary target information.
19892 * configure: Regenerate.
19893 * Makefile.in (XML_TARGET): Remove.
19894 (target.xml): Remove rule.
19895 (clean): Do not clean up target.xml.
19896 (.PRECIOUS): Do not mention target.xml.
19897
19898 * target.h (struct target_ops): Remove arch_string member.
19899 * linux-low.c (linux_arch_string): Remove.
19900 (linux_target_ops): Remove arch_string initializer.
19901 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19902 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19903 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19904 * spu-low.c (spu_arch_string): Remove.
19905 (spu_target_ops): Remove arch_string initializer.
19906 * win32-low.c (win32_arch_string): Remove.
19907 (win32_target_ops): Remove arch_string initializer.
19908 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19909 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19910 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19911
19912 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19913
19914 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19915 by collect_ptrace_register and supply_ptrace_register hooks.
19916 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19917 instead of checking for the_low_target.left_pad_xfer.
19918 (usr_store_inferior_registers): Use collect_ptrace_register callback
19919 instead of checking for the_low_target.left_pad_xfer.
19920
19921 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19922 (s390_supply_ptrace_register): Likewise.
19923 (s390_fill_gregset): Call s390_collect_ptrace_register.
19924 (the_low_target): Update.
19925
19926 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19927 (ppc_supply_ptrace_register): Likewise.
19928 (the_low_target): Update.
19929
19930 * linux-i386-low.c (the_low_target): Update.
19931 * linux-x86-64-low.c (the_low_target): Update.
19932
19933 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19934
19935 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19936 reg-s390.o and reg-s390x.o.
19937
19938 * linux-low.c (new_inferior): New global variable.
19939 (linux_create_inferior, linux_attach): Set it.
19940 (linux_wait_for_process): Call the_low_target.arch_setup after the
19941 target has stopped for the first time.
19942 (initialize_low): Do not call the_low_target.arch_setup.
19943
19944 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19945 (s390_set_pc): Likewise.
19946 (s390_arch_setup): New function.
19947 (the_low_target): Use s390_arch_setup as arch_setup routine.
19948
19949 * regcache.c (realloc_register_cache): New function.
19950 (set_register_cache): Call it for each existing regcache.
19951
19952 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19953
19954 * server.h (init_registers): Remove prototype.
19955
19956 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19957 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19958 instead of init_registers ().
19959 * linux-arm-low.c (init_registers_arm): Add prototype.
19960 (init_registers_arm_with_iwmmxt): Likewise.
19961 (the_low_target): Add initializer for arch_setup field.
19962 * linux-cris-low.c (init_registers_cris): Add prototype.
19963 (the_low_target): Add initializer for arch_setup field.
19964 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19965 (the_low_target): Add initializer for arch_setup field.
19966 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19967 (the_low_target): Add initializer for arch_setup field.
19968 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19969 (the_low_target): Add initializer for arch_setup field.
19970 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19971 (the_low_target): Add initializer for arch_setup field.
19972 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19973 (the_low_target): Add initializer for arch_setup field.
19974 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19975 (init_registers_mips64_linux): Likewise.
19976 (the_low_target): Add initializer for arch_setup field.
19977 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19978 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19979 (the_low_target): Add initializer for arch_setup field.
19980 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19981 (init_registers_powerpc_64): Likewise.
19982 (the_low_target): Add initializer for arch_setup field.
19983 * linux-s390-low.c (init_registers_s390): Add prototype.
19984 (init_registers_s390x): Likewise.
19985 (the_low_target): Add initializer for arch_setup field.
19986 * linux-sh-low.c (init_registers_sh): Add prototype.
19987 (the_low_target): Add initializer for arch_setup field.
19988 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19989 (the_low_target): Add initializer for arch_setup field.
19990 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
19991 (the_low_target): Add initializer for arch_setup field.
19992
19993 * win32-low.h (struct win32_target_ops): Add arch_setup field.
19994 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
19995 instead of init_registers ().
19996 * win32-arm-low.c (init_registers_arm): Add prototype.
19997 (the_low_target): Add initializer for arch_setup field.
19998 * win32-i386-low.c (init_registers_i386): Add prototype.
19999 (the_low_target): Add initializer for arch_setup field.
20000
20001 * spu-low.c (init_registers_spu): Add prototype.
20002 (initialize_low): Call initialie_registers_spu () instead of
20003 initialize_registers ().
20004
20005 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20006
20007 * server.c (handle_v_requests): When handling the vRun and vAttach
20008 packets, if already debugging a process, don't kill it. Return an
20009 error instead.
20010
20011 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20012
20013 * server.c (handle_query): Correct length check.
20014
20015 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20016
20017 * win32-low.c (do_initial_child_stuff): Add process handle
20018 parameter. Set current_process_handle and current_process_id from the
20019 parameters. Clear globals.
20020 (win32_create_inferior): Don't set current_process_handle and
20021 current_process_id here. Instead pass them on the call to
20022 do_initial_child_stuff.
20023 (win32_attach): Likewise.
20024 (win32_clear_inferiors): New.
20025 (win32_kill): Don't close the current process handle or the
20026 current thread handle here. Instead call win32_clear_inferiors.
20027 (win32_detach): Don't open a new handle to the process. Call
20028 win32_clear_inferiors.
20029 (win32_join): Don't rely on current_process_handle; open a new
20030 handle using the process id.
20031 (win32_wait): Call win32_clear_inferiors when the inferior process
20032 has exited.
20033
20034 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20035
20036 * server.c (monitor_show_help): Add "exit".
20037
20038 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20039
20040 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20041 (clean): Add reg-xtensa.c.
20042 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20043 * configure.srv (xtensa*-*-linux*) New target.
20044 * linux-xtensa-low.c: New.
20045 * xtensa-xtregs.c: New.
20046
20047 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20048
20049 * hostio.c: Don't include errno.h.
20050 (errno_to_fileio_errno): Move to hostio-errno.
20051 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20052 error number outputting to the target->hostio_last_error callback.
20053 (hostio_packet_error): Use FILEIO_EINVAL directly.
20054 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20055 calls to hostio_error.
20056 * hostio-errno.c: New.
20057 * server.h (hostio_last_error_from_errno): Declare.
20058 * target.h (target_ops): Add hostio_last_error member.
20059 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20060 as hostio_last_error handler.
20061 * spu-low.c (spu_target_ops): Likewise.
20062 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20063 (wince_hostio_last_error): New functions.
20064 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20065 as hostio_last_error handler.
20066 (win32_target_ops) [!_WIN32_WCE]: Register
20067 hostio_last_error_from_errno as hostio_last_error handler.
20068 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20069 (hostio-errno.o): New rule.
20070 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20071 * configure.srv (srv_hostio_err_objs): New variable. Default to
20072 hostio-errno.o.
20073 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20074 * configure: Regenerate.
20075
20076 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20077
20078 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20079 (linux_kill, linux_detach): Clean up the process list.
20080 * remote-utils.c (remote_open): Improve port number parsing.
20081 (putpkt_binary, input_interrupt): Only send interrupts if the target
20082 is running.
20083 * server.c (extended_protocol): Make static.
20084 (attached): Define earlier.
20085 (exit_requested, response_needed, program_argv): New variables.
20086 (target_running): New.
20087 (start_inferior): Clear attached here.
20088 (attach_inferior): Set attached here.
20089 (require_running): Define.
20090 (handle_query): Use require_running and target_running. Implement
20091 "monitor exit".
20092 (handle_v_attach, handle_v_run): New.
20093 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20094 (gdbserver_usage): Update.
20095 (main): Redo argument parsing. Handle --debug and --multi. Handle
20096 --attach along with other options or after the port. Save
20097 program_argv. Support no initial program. Resynchronize
20098 communication with GDB after an error. Handle "monitor exit".
20099 Use require_running and target_running. Always allow the extended
20100 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20101 restart in extended mode.
20102 * README: Refer to the GDB manual. Update --attach usage.
20103
20104 2007-12-20 Andreas Schwab <schwab@suse.de>
20105
20106 * linux-low.c (STACK_SIZE): Define.
20107 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20108 (linux_test_for_tracefork): Likewise.
20109
20110 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20111
20112 * linux-low.c (linux_wait_for_event): Update messages. Do not
20113 reinsert auto-delete breakpoints.
20114 * mem-break.c (struct breakpoint): Change return type of handler to
20115 int.
20116 (set_breakpoint_at): Update handler type.
20117 (reinsert_breakpoint_handler): Return 1 instead of calling
20118 delete_breakpoint.
20119 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20120 setting a new one.
20121 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20122 * mem-break.h (set_breakpoint_at): Update handler type.
20123 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20124 * win32-low.c (auto_delete_breakpoint): New.
20125 (get_child_debug_event): Use it.
20126
20127 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20128
20129 * configure.ac: Check for pread and pwrite.
20130 * hostio.c (handle_pread): Fall back to lseek and read.
20131 (handle_pwrite): Fall back to lseek and write.
20132 * config.in, configure: Regenerated.
20133
20134 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20135
20136 * server.c (myresume): Add own_buf argument.
20137 (main): Update calls.
20138
20139 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20140
20141 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20142 * remote-utils.c (remote_open): Do not call disable_async_io.
20143 (block_async_io): Delete.
20144 (unblock_async_io): Make static.
20145 (initialize_async_io): New.
20146 * server.c (handle_v_cont): Handle async I/O here.
20147 (myresume): Likewise. Move other common resume tasks here...
20148 (main): ... from here. Call initialize_async_io. Disable async
20149 I/O before the main loop.
20150 * server.h (initialize_async_io): Declare.
20151 (block_async_io, unblock_async_io): Delete prototypes.
20152 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20153
20154 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20155
20156 * remote-utils.c (readchar): Allow binary data in received messages.
20157
20158 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20159
20160 * win32-low.c (attaching): New global.
20161 (win32_create_inferior): Clear the `attaching' global.
20162 (win32_attach): Set the `attaching' global.
20163 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20164 attaching. Only set a breakpoint at the entry point if not
20165 attaching.
20166
20167 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20168
20169 * server.c (main): Don't report dll events on the initial
20170 connection on attaches.
20171
20172 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20173
20174 * server.c (main): Relax numerical bases supported for the pid of
20175 the --attach command line argument.
20176
20177 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20178
20179 * win32-low.c (win32_attach): Call OpenProcess before
20180 DebugActiveProcess, not after. Add last error output to error
20181 call.
20182
20183 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20184
20185 * win32-low.c (win32_get_thread_context)
20186 (win32_set_thread_context): New functions.
20187 (thread_rec): Use win32_get_thread_context.
20188 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20189 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20190 field.
20191
20192 2007-12-03 Leo Zayas
20193 Pedro Alves <pedro_alves@portugalmail.pt>
20194
20195 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20196 global variables.
20197 (child_add_thread): Minor cleanup.
20198 (child_continue): Resume artificially suspended threads before
20199 calling ContinueDebugEvent.
20200 (suspend_one_thread): New.
20201 (fake_breakpoint_event): New.
20202 (get_child_debug_event): Change return type to int. Check here if
20203 gdb sent an interrupt request. If a soft interrupt was requested,
20204 fake a breakpoint event. Return 0 if there is no event to handle,
20205 and 1 otherwise.
20206 (win32_wait): Don't check here if gdb sent an interrupt request.
20207 Ensure there is a valid event to handle.
20208 (win32_request_interrupt): Add soft interruption method as last
20209 resort.
20210
20211 2007-12-03 Leo Zayas
20212 Pedro Alves <pedro_alves@portugalmail.pt>
20213
20214 * win32-low.h (win32_thread_info): Add descriptions to the
20215 structure members. Replace `suspend_count' counter by a
20216 `suspended' flag.
20217 * win32-low.c (thread_rec): Update condition of when to get the
20218 context from the inferior. Rely on ContextFlags being set if it
20219 has already been retrieved. Only suspend the inferior thread if
20220 we haven't already. Warn if that fails.
20221 (continue_one_thread): s/suspend_count/suspended/. Only call
20222 ResumeThread once. Warn if that fails.
20223
20224 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20225
20226 * win32-low.c (win32_wait): Don't read from the inferior when it
20227 has already exited.
20228
20229 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20230
20231 * Makefile.in (win32_low_h): New variable.
20232 (win32-low.o): Add dependency on $(win32_low_h).
20233 (win32-arm-low.o, win32-i386-low.o): New rules.
20234
20235 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20236
20237 * hostio.c: Correct copyright year.
20238
20239 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20240
20241 * Makefile.in (OBS): Add hostio.o.
20242 (hostio.o): New rule.
20243 * server.h (handle_vFile): Declare.
20244 * hostio.c: New file.
20245 * server.c (handle_v_requests): Take packet_len and new_packet_len
20246 for binary packets. Call handle_vFile.
20247 (main): Update call to handle_v_requests.
20248
20249 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20250
20251 * linux-low.c: Include <sched.h>.
20252
20253 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20254
20255 * linux-low.c (linux_tracefork_grandchild): New.
20256 (linux_tracefork_child): Use clone.
20257 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20258
20259 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20260
20261 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20262
20263 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20264
20265 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20266
20267 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20268
20269 * inferiors.c (change_inferior_id): Delete.
20270 (add_pid_to_list, pull_pid_from_list): New.
20271 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20272 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20273 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20274 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20275 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20276 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20277 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20278 (using_threads): Always set to 1.
20279 (handle_extended_wait): New.
20280 (add_process): Do not set TID.
20281 (linux_create_inferior): Set must_set_ptrace_flags.
20282 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20283 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20284 (linux_thread_alive): Rename TID argument to LWPID.
20285 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20286 (linux_wait_for_event): Do not use TID or check using_threads. Update
20287 call to dead_thread_notify. Call handle_extended_wait.
20288 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20289 (send_sigstop): Delete sigstop_sent.
20290 (wait_for_sigstop): Avoid TID.
20291 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20292 (linux_test_for_tracefork): New.
20293 (linux_lookup_signals): Use thread_db_active and
20294 linux_supports_tracefork_flag.
20295 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20296 * linux-low.h (get_process_thread): Avoid TID.
20297 (struct process_ifo): Move thread_known and tid to the end. Remove
20298 sigstop_sent.
20299 (linux_attach_lwp, thread_db_init): Update prototypes.
20300 * server.h (change_inferior_id): Delete prototype.
20301 (add_pid_to_list, pull_pid_from_list): New prototypes.
20302 * thread-db.c (thread_db_use_events): New.
20303 (find_first_thread): Rename to...
20304 (find_one_thread): ...this. Update callers and messages. Do not
20305 call fatal. Check thread_db_use_events. Do not call
20306 change_inferior_id or new_thread_notify.
20307 (maybe_attach_thread): Update. Do not call new_thread_notify.
20308 (thread_db_init): Set thread_db_use_events. Check use_events.
20309 * utils.c (fatal, warning): Correct message prefix.
20310
20311 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20312
20313 * Makefile.in (clean): Remove new files.
20314 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20315 (powerpc-64.o, powerpc-64.c): New rules.
20316 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20317 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20318 with SPE.
20319 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20320 SPE targets.
20321 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20322 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20323 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20324 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20325 (target_regsets): Add AltiVec and SPE register sets.
20326 * configure.ac: Check for AltiVec and SPE.
20327 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20328 (ppc_fill_vrregset, ppc_store_vrregset): New.
20329 (target_regsets): Add AltiVec register set.
20330 * configure: Regenerated.
20331
20332 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20333
20334 * linux-low.c (O_LARGEFILE): Define.
20335 (linux_read_memory): Use /proc/PID/mem.
20336 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20337 * configure, config.in: Regenerated.
20338
20339 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20340
20341 * linux-low.c (linux_wait_for_event): Do not pass signals while
20342 single-stepping.
20343
20344 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20345
20346 * win32-low.c (create_process): New.
20347 (win32_create_inferior): Use create_process instead of
20348 CreateProcess. If create_process failed retry appending an ".exe"
20349 suffix. Store the GetLastError result immediatelly after
20350 create_process calls and use it on the call to error.
20351
20352 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20353
20354 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20355
20356 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20357
20358 * configure.ac: Switch license to GPLv3.
20359
20360 2007-08-01 Michael Snyder <msnyder@access-company.com>
20361
20362 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20363
20364 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20365
20366 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20367 typedef.
20368 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20369 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20370 CloseToolhelp32Snapshot.
20371 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20372 CloseToolhelp32Snapshot.
20373
20374 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20375
20376 * server.c (main): Check for inferior exit before main loop.
20377
20378 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20379
20380 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20381 instead of on tmp_desc.
20382
20383 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20384 Daniel Jacobowitz <dan@codesourcery.com>
20385
20386 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20387 (add_thread): Minor cleanups.
20388 (clear_inferiors): Move lower in the file. Clear the DLL
20389 list.
20390 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20391 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20392 (xml_escape_text): New.
20393 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20394 for qSupported.
20395 (handle_v_cont): Report errors.
20396 (gdbserver_version): Update.
20397 (main): Correct size of own_buf. Do not report initial DLL events.
20398 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20399 (unloaded_dll, xml_escape_text): New.
20400 * win32-low.c (enum target_waitkind): Update comments.
20401 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20402 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20403 (win32_EnumProcessModules, win32_GetModuleInformation)
20404 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20405 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20406 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20407 (win32_Module32First, win32_Module32Next, load_toolhelp)
20408 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20409 (get_child_debug_event): Handle DLL events.
20410 (win32_wait): Likewise.
20411
20412 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20413
20414 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20415 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20416
20417 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20418
20419 * win32-low.c (handle_output_debug_string): Ignore event if not
20420 waiting.
20421
20422 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20423
20424 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20425
20426 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20427
20428 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20429
20430 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20431
20432 * inferiors.c (change_inferior_id): Add comment.
20433 * linux-low.c (check_removed_breakpoint): Add an early
20434 prototype. Improve debug output.
20435 (linux_attach): Doc update.
20436 (linux_detach_one_process, linux_detach): Clean up before releasing
20437 each process.
20438 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20439 * linux-low.h (struct process_info): Doc improvement.
20440 * mem-break.c (delete_all_breakpoints): New.
20441 * mem-break.h (delete_all_breakpoints): New prototype.
20442 * thread-db.c (find_first_thread): New.
20443 (thread_db_create_event): Call it instead of
20444 thread_db_find_new_threads. Clean up unused variables.
20445 (maybe_attach_thread): Remove first thread handling.
20446 (thread_db_find_new_threads): Use find_first_thread.
20447 (thread_db_get_tls_address): Likewise.
20448
20449 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20450
20451 * thread-db.c (thread_db_find_new_threads): Add prototype.
20452 (thread_db_create_event): Check for the main thread before adding
20453 a new thread.
20454 (maybe_attach_thread): Only enable event reporting if TID == 0.
20455 (thread_db_get_tls_address): Check for new threads.
20456
20457 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20458
20459 * linux-low.c (linux_create_inferior): Try execv before execvp.
20460 * spu-low.c (spu_create_inferior): Likewise.
20461
20462 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20463
20464 * linux-low.c (linux_create_inferior): Change execv to execvp.
20465 * spu-low.c (spu_create_inferior): Likewies.
20466
20467 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20468
20469 * Makefile.in (clean): Clean new files instead of deleted ones.
20470 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20471 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20472 rules.
20473 * configure.srv: Specify XML files and new regformats for MIPS and
20474 MIPS64 GNU/Linux.
20475 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20476 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20477 an entry for the restart register.
20478 (mips_cannot_fetch_register, mips_cannot_store_register)
20479 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20480 register names to match the XML descriptions.
20481 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20482 restart register instead of $0.
20483
20484 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20485 Markus Deuling <deuling@de.ibm.com>
20486
20487 * remote-utils.c (decode_xfer_write): New function.
20488 * server.h (decode_xfer_write): Add prototype.
20489 * server.c (handle_query): Add PACKET_LEN argument. Support
20490 qXfer:spu:read and qXfer:spu:write packets.
20491 (main): Pass packet_len to handle_query.
20492 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20493 * target.h (target_ops): Add qxfer_spu.
20494
20495 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20496
20497 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20498 accessing non-seekable spufs files.
20499
20500 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20501
20502 * server.c (handle_query): Add reply for qC packet.
20503
20504 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20505 Leo Zayas <lerele@champenstudios@com>
20506
20507 * server.h (check_remote_input_interrupt_request): New function.
20508 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20509 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20510 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20511 (check_remote_input_interrupt_request): New function.
20512 * server.h (check_remote_input_interrupt_request): Declare.
20513 * win32-low.c (winapi_DebugBreakProcess,
20514 winapi_GenerateConsoleCtrlEvent): New typedefs.
20515 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20516 to 250 ms.
20517 (win32_wait): Check for remote interrupt request
20518 with check_remote_input_interrupt_request.
20519 (win32_request_interrupt): New function.
20520 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20521
20522 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20523
20524 * win32-low.c (debug_registers_changed,
20525 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20526 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20527 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20528 (thread_rec): Get context using the low target.
20529 (child_add_thread): Call thread_added on the low target,
20530 which does the same thing.
20531 (regptr): Delete.
20532 (do_initial_child_stuff): Remove debug registers references.
20533 Set context using the low target. Resume threads after
20534 setting the contexts.
20535 (child_continue): Remove dead variable. Remove debug
20536 registers references.
20537 (child_fetch_inferior_registers): Go through the low target.
20538 (do_child_store_inferior_registers): Remove.
20539 (child_store_inferior_registers): Go through the low target.
20540 (win32_resume): Remove debug registers references.
20541 Set context using the low target.
20542 (handle_exception): Change return type to void. Don't record
20543 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20544 first chance exception.
20545 (get_child_debug_event): Change return type to void. Remove
20546 goto loop. Always return after waiting for debug event.
20547 (win32_wait): Convert to switch statement. Handle spurious
20548 events.
20549
20550 * win32-i386-low.c (debug_registers_changed,
20551 debug_registers_used): New.
20552 (initial_stuff): Rename to ...
20553 (i386_initial_stuff): ... this. Clear debug registers
20554 state variables.
20555 (store_debug_registers): Delete.
20556 (i386_get_thread_context): New.
20557 (load_debug_registers): Delete.
20558 (i386_set_thread_context): New.
20559 (i386_thread_added): New.
20560 (single_step): Rename to ...
20561 (i386_single_step): ... this.
20562 (do_fetch_inferior_registers): Rename to ...
20563 (i386_fetch_inferior_register): ... this.
20564 (i386_store_inferior_register): New.
20565 (the_low_target): Adapt to new interface.
20566
20567 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20568 (arm_get_thread_context): New.
20569 (arm_set_thread_context): New.
20570 (regptr): New.
20571 (do_fetch_inferior_registers): Rename to ...
20572 (arm_fetch_inferior_register): ... this.
20573 (arm_store_inferior_register): New.
20574 (arm_wince_breakpoint): Reimplement as unsigned long.
20575 (arm_wince_breakpoint_len): Define.
20576 (the_low_target): Adapt to new interface.
20577
20578 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20579 load_debug_registers. Add get_thread_context, set_thread_context,
20580 thread_added and store_inferior_register. Rename
20581 fetch_inferior_registers to fetch_inferior_register.
20582 (regptr): Remove declaration.
20583
20584 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20585
20586 * linux-low.c (linux_detach): Change return type to int. Return 0.
20587 * spu-low.c (spu_detach): Likewise.
20588
20589 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20590
20591 * target.h (target_ops): Change return type of detach to int.
20592 Add join.
20593 (join_inferior): New.
20594 * server.c (main): Don't skip detach support on mingw32.
20595 If the inferior doesn't support detaching return error.
20596 Call join_inferior instead of using waitpid.
20597 * linux-low.c (linux_join): New.
20598 (linux_target_op): Add linux_join.
20599 * spu-low.c (spu_join): New.
20600 (spu_target_ops): Add spu_join.
20601 * win32-low.c (win32_detach): Adapt to new interface.
20602 Reopen current_process_handle before detaching. Issue a child
20603 resume before detaching.
20604 (win32_join): New.
20605 (win32_target_op): Add win32_join.
20606
20607 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20608
20609 * win32-low.c (win32-attach): Fix return value.
20610 * target.h (target_ops): Describe ATTACH return values.
20611
20612 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20613
20614 * win32-low.c (GETPROCADDRESS): Define.
20615 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20616 (winapi_DebugSetProcessKillOnExit): Likewise.
20617 (win32_create_inferior): Force usage of ansi CreateProcessA.
20618 (win32_attach): Use GETPROCADDRESS.
20619 (win32_detach): Likewise.
20620
20621 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20622
20623 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20624
20625 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20626
20627 * win32-low.c: Commit leftover changes from 2007-03-29.
20628
20629 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20630
20631 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20632 fields short instead of int. Add explicit padding.
20633 (i387_cache_to_fsave): Remove unnecessary casts.
20634 (i387_fsave_to_cache): Doc fix.
20635 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20636
20637 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20638
20639 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20640 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20641
20642 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20643
20644 * configure.srv (arm*-*-mingw32ce*): Move near the other
20645 arm targets.
20646
20647 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20648
20649 * configure.ac: Add errno checking.
20650 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20651 sys/file.h and malloc.h.
20652 (AC_CHECK_DECLS): Add perror.
20653 (srv_mingwce): Handle.
20654 * configure.srv (i[34567]86-*-cygwin*): Add
20655 win32-i386-low.o to srv_tgtobj.
20656 (i[34567]86-*-mingw*): Likewise.
20657 (arm*-*-mingw32ce*): Add case.
20658 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20659 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20660 [__MINGW32CE__] (strerror): New function.
20661 [__MINGW32CE__] (errno): Define to GetLastError.
20662 [__MINGW32CE__] (COUNTOF): New macro.
20663 (remote_open): Remove extra close call.
20664 * mem-break.c (delete_breakpoint_at): New function.
20665 * mem-break.h (delete_breakpoint_at): Declare.
20666 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20667 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20668 [USE_WIN32API] (read, write): Add char* casts.
20669 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20670 * server.h: Include wincecompat.h on Windows CE.
20671 [HAVE_ERRNO_H]: Check.
20672 (perror): Declare if not declared.
20673 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20674 (perror_with_name): Remove errno declaration.
20675 * wincecompat.h: New.
20676 * wincecompat.c: New.
20677 * win32-low.h: New.
20678 * win32-arm-low.c: New.
20679 * win32-i386-low.c: New.
20680 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20681 (OUTMSG2): Make it safe.
20682 (_T): New macro.
20683 (COUNTOF): New macro.
20684 (NUM_REGS): Get it from the low target.
20685 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20686 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20687 (thread_rec): Let low target handle debug registers.
20688 (child_add_thread): Likewise.
20689 (child_init_thread_list): Likewise.
20690 (continue_one_thread): Likewise.
20691 (regptr): New.
20692 (do_child_fetch_inferior_registers): Move to ...
20693 * win32-i386-low.c: ... here, and rename to ...
20694 (do_fetch_inferior_registers): ... this.
20695 * win32-low.c (child_fetch_inferior_registers):
20696 Go through the low target.
20697 (do_child_store_inferior_registers): Use regptr.
20698 (strwinerror): New function.
20699 (win32_create_inferior): Handle Windows CE.
20700 Use strwinerror instead of strerror on Windows error
20701 codes. Add program to the error output.
20702 Don't close the main thread handle on Windows CE.
20703 (win32_attach): Use coredll.dll on Windows CE.
20704 (win32_kill): Close current process and current
20705 thread handles.
20706 (win32_detach): Use coredll.dll on Windows CE.
20707 (win32_resume): Let low target handle debug registers, and
20708 step request.
20709 (handle_exception): Add/Remove initial breakpoint. Avoid
20710 non-existant WSTOPSIG on Windows CE.
20711 (win32_read_inferior_memory): Cast to remove warning.
20712 (win32_arch_string): Go through the low target.
20713 (initialize_low): Call set_breakpoint_data with the low
20714 target's breakpoint.
20715 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20716 FOP_REGNUM, mappings): Move to ...
20717 * win32-i386-low.c: ... here.
20718 * win32-low.c (win32_thread_info): Move to ...
20719 * win32-low.h: ... here.
20720 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20721 win32-arm-low.c and wincecompat.c.
20722 (all:): Add $EXEEXT.
20723 (install-only:): Likewise.
20724 (gdbserver:): Likewise.
20725 (gdbreplay:): Likewise.
20726 * config.in: Regenerate.
20727 * configure: Regenerate.
20728
20729 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20730
20731 * win32-low.c: Rename typedef thread_info to
20732 win32_thread_info throughout.
20733
20734 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20735
20736 * win32-i386-low.c: Rename to ...
20737 * win32-low.c: ... this.
20738 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20739 * Makefile.in: Likewise.
20740
20741 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20742
20743 * remote-utils.c (monitor_output): Constify msg parameter.
20744 * server.h (monitor_output): Likewise.
20745 * win32-i386-low.c (handle_output_debug_string): New.
20746 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20747 handle_output_debug_string.
20748 (get_child_debug_event): Likewise.
20749
20750 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20751
20752 * server.c (main): Correct strtoul check.
20753
20754 2007-03-27 Jon Ringle <jon@ringle.org>
20755
20756 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20757
20758 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20759
20760 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20761
20762 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20763
20764 * terminal.h: Check HAVE_SGTTY_H.
20765
20766 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20767
20768 * remote-utils.c (remote_open): Print out the assigned port number.
20769
20770 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20771
20772 * remote-utils.c (monitor_output): New function.
20773 * server.c (debug_threads): Define here.
20774 (monitor_show_help): New function.
20775 (handle_query): Handle qRcmd.
20776 (main): Do not handle 'd' packet.
20777 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20778 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20779 of debug_threads.
20780
20781 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20782
20783 * Makefile.in (EXEEXT): New.
20784 (clean): Use $(EXEEXT).
20785
20786 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20787
20788 * target.h (target_ops): Rename send_signal to request_interrupt,
20789 and remove enum target_signal parameter.
20790 * linux-low.c (linux_request_interrupt): Rename from
20791 linux_send_signal, and always send SIGINT.
20792 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20793 and always send SIGINT.
20794 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20795 of send_signal.
20796 (input_interrupt): Likewise.
20797
20798 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20799
20800 * server.c (get_features_xml): Check if target implemented
20801 arch_string.
20802 * win32-i386-low.c (win32_arch_string): New.
20803 (win32_target_ops): Add win32_arch_string as arch_string member.
20804
20805 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20806
20807 * spu-low.c (spu_arch_string): New.
20808 (spu_target_ops): Add spu_arch_string.
20809
20810 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20811
20812 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20813 * configure.ac: Do not check for terminal.h.
20814 * configure, config.in: Regenerated.
20815
20816 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20817
20818 * Makefile.in (OBS): Add $(XML_BUILTIN).
20819 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20820 (clean): Update.
20821 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20822 (arm-with-iwmmxt.c): New.
20823 * config.in, configure: Regenerate.
20824 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20825 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20826 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20827 (arm*-*-linux*): Add iWMMXt and regset support.
20828 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20829 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20830 (arm_store_wmmxregset, target_regsets): New.
20831 * server.c (get_features_xml): Take annex argument. Check builtin
20832 XML documents.
20833 (handle_query): Handle multiple annexes.
20834
20835 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20836
20837 * remote-utils.c [USE_WIN32API] (read, write): Define.
20838 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20839 write.
20840
20841 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20842
20843 * linux-i386-low.c (the_low_target): Set arch_string.
20844 * linux-x86-64-low.c (the_low_target): Likewise.
20845 * linux-low.c (linux_arch_string): New.
20846 (linux_target_ops): Add it.
20847 * linux-low.h (struct linux_target_ops): Add arch_string.
20848 * server.c (write_qxfer_response): Use const void * for DATA.
20849 (get_features_xml): New.
20850 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20851 * target.h (struct target_ops): Add arch_string method.
20852
20853 2007-01-03 Denis Pilat <denis.pilat@st.com>
20854 Daniel Jacobowitz <dan@codesourcery.com>
20855
20856 * linux-low.c (linux_kill): Handle being called with no threads.
20857 * win32-i386-low.c (win32_kill): Likewise.
20858 (get_child_debug_event): Clear current_process_handle.
20859
20860 2006-12-30 Denis PILAT <denis.pilat@st.com>
20861 Daniel Jacobowitz <dan@codesourcery.com>
20862
20863 * remote-utils.c (remote_open): Check the type of specified
20864 serial port devices before opening them.
20865 * server.c (main): Kill the inferior if an error occurs during
20866 the first remote_open.
20867
20868 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20869
20870 * README: Update supported targets.
20871
20872 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20873
20874 * Makefile.in (clean): Remove reg-mips64.c.
20875 (reg-mips64.c, reg-mips64.o): New rules.
20876 * configure.srv: Handle mips64. Include regset support for mips.
20877 * linux-mips-low.c (union mips_register): New.
20878 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20879 (mips_breakpoint, mips_breakpoint_at): Use int.
20880 (mips_collect_register, mips_supply_register)
20881 (mips_collect_register_32bit, mips_supply_register_32bit)
20882 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20883 (mips_store_fpregset, target_regsets): New.
20884 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20885
20886 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20887
20888 * configure.srv: Add target "spu*-*-*".
20889 * Makefile.in (clean): Remove reg-spu.c.
20890 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20891 * spu-low.c: New file.
20892
20893 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20894
20895 * configure.ac: Correct td_thr_tls_get_addr test.
20896 * configure: Regenerated.
20897
20898 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20899
20900 * linux-low.c (linux_wait_for_event): Reformat. Use the
20901 pass_signals array.
20902 * remote-utils.c (decode_address_to_semicolon): New.
20903 * server.c (pass_signals, handle_general_set): New.
20904 (handle_query): Mention QPassSignals for qSupported.
20905 (main): Call handle_general_set.
20906 * server.h (pass_signals, decode_address_to_semicolon): New.
20907
20908 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20909
20910 * server.c (handle_query): Correct error handling for read_auxv.
20911
20912 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20913
20914 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20915 and srv_linux_thread_db to yes.
20916 * linux-s390-low.c (s390_fill_gregset): New function.
20917 (target_regsets): Define data structure.
20918
20919 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20920
20921 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20922 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20923 * config.in, configure: Regenerated.
20924 * inferiors.c (gdb_id_to_thread): New function.
20925 (gdb_id_to_thread_id): Use it.
20926 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20927 * linux-low.h (struct process_info): Add th member.
20928 (thread_db_get_tls_address): New prototype.
20929 * remote-utils.c (decode_address): Make non-static.
20930 * server.c (handle_query): Handle qGetTLSAddr.
20931 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20932 * target.h (struct target_ops): Add get_tls_address.
20933 * thread-db.c (maybe_attach_thread): Save the thread handle.
20934 (thread_db_get_tls_address): New.
20935
20936 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20937
20938 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20939 (linux_resume_one_process): Take a siginfo_t *. Update all
20940 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20941 (struct pending_signals): Add a siginfo_t.
20942 (linux_wait_for_process): Always set last_status.
20943 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20944 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20945 * linux-low.h (struct process_info): Add last_status.
20946
20947 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20948
20949 * remote-utils.c (try_rle): New function.
20950 (putpkt_binary): Use it.
20951
20952 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20953
20954 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20955 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20956 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20957 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20958 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20959 point registers.
20960
20961 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20962
20963 * server.c (terminal_fd): New variable.
20964 (old_foreground_pgrp): Likewise.
20965 (restore_old_foreground_pgrp): New function.
20966 (start_inferior): Record the terminal file descriptor in terminal_fd
20967 and its original foreground group in old_foreground_pgrp. Register
20968 restore_old_foreground_pgrp with atexit().
20969
20970 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20971
20972 * server.c (handle_query): Correct qPart to qXfer.
20973
20974 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20975
20976 * configure.ac: Check for more headers which are missing on
20977 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20978 * configure.srv: Add Cygwin and mingw32.
20979 * remote-utils.c: Don't include headers unconditionally which
20980 are missing on mingw32. Include <winsock.h> for mingw32.
20981 (remote_open): Adjust for mingw32 support. Flush
20982 standard error after writing to it.
20983 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20984 (unblock_async_io, enable_async_io, disable_async_io)
20985 (readchar, getpkt): Update for Winsock support.
20986 (prepare_resume_reply): Expect a protocol signal number.
20987 * server.c: Disable <sys/wait.h> on mingw32.
20988 (start_inferior): Adjust for mingw32 support. Flush
20989 standard error after writing to it.
20990 (attach_inferior): Likewise. Use protocol signal
20991 numbers.
20992 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
20993 and names.
20994 * win32-i386-low.c: New file.
20995 * Makefile.in (XM_CLIBS): Set.
20996 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
20997 (win32-i386-low.o): New dependency rule.
20998 * linux-low.c (linux_wait): Use target signal numbers.
20999 * target.h (struct target_ops): Doc fix.
21000 * server.h (target_signal_to_name): New prototype.
21001 * gdbreplay.c: Don't include headers unconditionally which
21002 are missing on mingw32. Include <winsock.h> for mingw32.
21003 (remote_close, remote_open): Adjust for Winsock support.
21004 * configure, config.in: Regenerated.
21005
21006 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21007
21008 * server.c (decode_xfer_read, write_qxfer_response): New.
21009 (handle_query): Take a packet length argument. Handle
21010 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21011 the qSupported response.
21012 (main): Update call to handle_query.
21013
21014 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21015
21016 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21017 (putpkt_binary): Renamed from putpkt and adjusted for binary
21018 data.
21019 (putpkt): New wrapper for putpkt_binary.
21020 (readchar): Don't mask off the high bit.
21021 (decode_X_packet): New function.
21022 * server.c (main): Call putpkt_binary if a handler sets the packet
21023 length. Save the length of the incoming packet. Handle 'X'.
21024 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21025
21026 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21027
21028 * server.c (handle_query): Handle qSupported.
21029
21030 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21031
21032 * remote-utils.c (all_symbols_looked_up): New variable.
21033 (look_up_one_symbol): Check it.
21034 * server.h (look_up_one_symbol): New declaration.
21035 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21036
21037 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21038
21039 * Makefile.in (linux-arm-low.o): Update dependencies.
21040 * linux-arm-low.c: Include "gdb_proc_service.h".
21041 (PTRACE_GET_THREAD_AREA): Define.
21042 (ps_get_thread_area): New function.
21043
21044 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21045
21046 * configure.srv (m68k*-*-uclinux*): New target.
21047 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21048 (linux_resume_one_process): Remove extraneous cast.
21049 (linux_read_offsets): New.
21050 (linux_target_op): Add linux_read_offsets on mmuless systems.
21051 * server.c (handle_query): Add qOffsets logic.
21052 * target.h (struct target_ops): Add read_offsets.
21053
21054 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21055
21056 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21057 (PTRACE_GET_THREAD_AREA): Define.
21058 (ps_get_thread_area): New function.
21059 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21060 (linux-x86-64-low.o): Update.
21061
21062 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21063
21064 * configure.ac: Remove checks for prfpregset_t.
21065 * gdb_proc_service.h: New file.
21066 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21067 new "gdb_proc_service.h".
21068 * proc-service.c: Likewise.
21069 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21070 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21071 * Makefile.in (gdb_proc_service_h): Updated.
21072 * configure, config.in: Regenerated.
21073
21074 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21075
21076 * remote-utils.c (prepare_resume_reply): Move declaration
21077 of gdb_id_from_wait to the top of the block.
21078
21079 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21080
21081 * linux-low.c (regsets_store_inferior_registers): Read the regset
21082 from the target before filling it.
21083
21084 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21085
21086 * server.c (attach_inferior): Return SIGTRAP for a successful
21087 attach.
21088
21089 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21090
21091 * Makefile.in (OBS): Add version.o.
21092 (STAGESTUFF): Delete.
21093 (version.o): Add dependencies.
21094 (version.c): Replace rule.
21095 (clean): Remove version.c.
21096 * server.c (gdbserver_version): New.
21097 (gdbserver_usage): Use printf.
21098 (main): Handle --version and --help.
21099 * server.h (version, host_name): Add declarations.
21100
21101 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21102
21103 * linux-arm-low.c:
21104 * linux-arm-low.c:
21105 * inferiors.c:
21106 * i387-fp.h:
21107 * i387-fp.c:
21108 * gdbreplay.c:
21109 * regcache.c:
21110 * proc-service.c:
21111 * mem-break.h:
21112 * mem-break.c:
21113 * linux-x86-64-low.c:
21114 * linux-sh-low.c:
21115 * linux-s390-low.c:
21116 * linux-ppc64-low.c:
21117 * linux-ppc-low.c:
21118 * linux-mips-low.c:
21119 * linux-m68k-low.c:
21120 * linux-m32r-low.c:
21121 * linux-low.h:
21122 * linux-low.c:
21123 * linux-ia64-low.c:
21124 * linux-i386-low.c:
21125 * linux-crisv32-low.c:
21126 * thread-db.c:
21127 * terminal.h:
21128 * target.h:
21129 * target.c:
21130 * server.h:
21131 * server.c:
21132 * remote-utils.c:
21133 * regcache.h:
21134 * utils.c:
21135 * Makefile.in:
21136 * configure.ac:
21137 * gdbserver.1: Add (C) after Copyright. Update the FSF
21138 address.
21139
21140 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21141
21142 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21143 (arm_breakpoint_at): Recognize both breakpoints.
21144 (the_low_target): Use the correct breakpoint instruction.
21145
21146 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21147
21148 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21149 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21150 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21151 (the_low_target): Update.
21152
21153 2005-10-25 Andreas Schwab <schwab@suse.de>
21154
21155 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21156
21157 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21158 (ia64_num_regs): Reduce to 462.
21159
21160 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21161
21162 * acinclude.m4: Correct quoting.
21163 * aclocal.m4: Regenerated.
21164
21165 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21166 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21167 (thread_db_init): Call thread_db_err_str.
21168 * configure.ac: Check for TD_VERSION.
21169 * config.in, configure: Regenerated.
21170
21171 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21172
21173 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21174
21175 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21176
21177 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21178 is not available. Define HAVE_PTRACE_GETREGS if it is.
21179 * config.in, configure: Regenerated.
21180 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21181 * linux-i386-low.c, linux-m68k-low.c: Update to use
21182 HAVE_PTRACE_GETREGS.
21183 * linux-low.c (regsets_fetch_inferior_registers)
21184 (regsets_store_inferior_registers): Only return 0 if we processed
21185 GENERAL_REGS.
21186 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21187 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21188
21189 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21190
21191 * inferiors.c (struct thread_info): Add gdb_id.
21192 (add_thread): Add gdb_id argument.
21193 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21194 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21195 calls to add_thread.
21196 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21197 * server.c (handle_query): Use thread_to_gdb_id.
21198 (handle_v_cont, main): Use gdb_id_to_thread_id.
21199 * server.h (add_thread): Update prototype.
21200 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21201 prototypes.
21202
21203 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21204
21205 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21206 left-padded registers.
21207 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21208 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21209
21210 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21211
21212 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21213 * configure: Regenerate.
21214 * config.in: Regenerate.
21215 * server.h (NEED_DECLARATION_STRERROR):
21216 Replace with !HAVE_DECL_STRERROR.
21217
21218 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21219
21220 * linux-low.c (linux_wait, linux_send_signal): Don't test
21221 an unsigned long variable for > 0 if it could be MAX_ULONG.
21222 * server.c (myresume): Likewise.
21223 * target.c (set_desired_inferior): Likewise.
21224
21225 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21226
21227 * configure.ac: Simplify and improve check for socklen_t.
21228 * configure, config.in: Regenerate.
21229
21230 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21231
21232 * acconfig.h: Remove.
21233 * configure.ac: Add a test for socklen_t. Use three-argument
21234 AC_DEFINE throughout.
21235 * config.in: Regenerated using autoheader 2.59.
21236 * configure: Regenerated.
21237
21238 * gdbreplay.c (socklen_t): Provide a default.
21239 (remote_open): Use socklen_t.
21240 * remote-utils.c (socklen_t): Provide a default.
21241 (remote_open): Use socklen_t.
21242 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21243 unsigned char.
21244
21245 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21246 char for buffers.
21247 * linux-low.c (linux_read_memory, linux_write_memory)
21248 (linux_read_auxv): Likewise.
21249 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21250 (check_mem_write): Likewise.
21251 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21252 Likewise.
21253 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21254 (registers_from_string, register_data): Likewise.
21255 * server.c (handle_query, main): Likewise.
21256 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21257 (decode_M_packet): Likewise.
21258 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21259 * target.h (struct target_ops): Update read_memory, write_memory,
21260 and read_auxv.
21261 (read_inferior_memory, write_inferior_memory): Update.
21262 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21263 to unsigned char *.
21264 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21265 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21266 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21267 linux-s390-low.c, linux-sh-low.c: Update for changes in
21268 read_inferior_memory and the_low_target->breakpoint.
21269
21270 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21271
21272 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21273 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21274 * configure.srv: Add powerpc64-*-linux*.
21275 * linux-ppc64-low.c: New file.
21276
21277 2005-05-23 Orjan Friberg <orjanf@axis.com>
21278
21279 * linux-cris-low.c: New file with support for CRIS.
21280 * linux-crisv32-low.c: Ditto for CRISv32.
21281 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21282 (clean): Add reg-cris.c and reg-crisv32.c.
21283 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21284 reg-crisv32.o, and reg-crisv32.c to make rules.
21285 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21286 recognized targets.
21287
21288 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21289
21290 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21291 of sizeof (PTRACE_XFER_TYPE).
21292 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21293
21294 2005-05-12 Orjan Friberg <orjanf@axis.com>
21295
21296 * target.h (struct target_ops): Add insert_watchpoint,
21297 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21298 pointers for hardware watchpoint support.
21299 * linux-low.h (struct linux_target_ops): Ditto.
21300 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21301 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21302 to linux_target_ops.
21303 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21304 reply packet.
21305 * server.c (main): Recognize 'Z' and 'z' packets.
21306
21307 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21308
21309 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21310 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21311 (the_low_target): Add new members.
21312
21313 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21314
21315 * proc-service.c (ps_lgetregs): Search all_processes instead of
21316 all_threads.
21317
21318 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21319
21320 * server.c (start_inferior): Change return type to int.
21321 (attach_inferior): Change sigptr to int *.
21322 (handle_v_cont, handle_v_requests): Change signal to int *.
21323 (main): Change signal to int.
21324
21325 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21326
21327 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21328 * configure.srv: Add m32r*-*-linux*.
21329 * linux-m32r-low.c: New file.
21330
21331 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21332
21333 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21334
21335 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21336
21337 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21338 Take unsigned long arguments for PIDs.
21339 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21340 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21341 (wait_for_sigstop, linux_resume_one_process)
21342 (regsets_fetch_inferior_registers, linux_send_signal)
21343 (linux_read_auxv): Likewise. Update the types of variables holding
21344 PIDs. Update format string specifiers.
21345 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21346 * remote-utils.c (prepare_resume_reply): Likewise.
21347 * server.c (cont_thread, general_thread, step_thread)
21348 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21349 unsigned long.
21350 (handle_query): Update format specifiers.
21351 (handle_v_cont, main): Use strtoul for thread IDs.
21352 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21353 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21354 (general_thread, step_thread, thread_from_wait)
21355 (old_thread_from_wait): Update.
21356 * target.h (struct thread_resume): Use unsigned long for THREAD.
21357 (struct target_ops): Use unsigned long for arguments to attach and
21358 thread_alive.
21359
21360 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21361
21362 * acinclude.m4: Include bfd/bfd.m4 directly.
21363 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21364 <agriffis@toolchain.org>.
21365 * aclocal.m4, configure: Regenerated.
21366
21367 2005-01-07 Andrew Cagney <cagney@gnu.org>
21368
21369 * configure.ac: Rename configure.in, require autoconf 2.59.
21370 * configure: Re-generate.
21371
21372 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21373
21374 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21375 LIBS when finished.
21376 * aclocal.m4: Regenerated.
21377 * configure: Regenerated.
21378
21379 2004-11-21 Andreas Schwab <schwab@suse.de>
21380
21381 * linux-m68k-low.c (m68k_num_gregs): Define.
21382 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21383 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21384 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21385 (m68k_breakpoint_at): New. Add to the_low_target.
21386
21387 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21388 srv_linux_thread_db to yes.
21389
21390 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21391
21392 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21393 (ARCH_SET_FS): Likewise.
21394 (ARCH_GET_FS): Likewise.
21395 (ARCH_GET_GS): Likewise.
21396
21397 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21398
21399 * linux-i386-low.c (ps_get_thread_area): New.
21400 * linux-x86-64-low.c (ps_get_thread_area): New.
21401 * linux-low.c: Include <sys/syscall.h>.
21402 (linux_kill_one_process): Don't kill the first thread here.
21403 (linux_kill): Kill the first thread here.
21404 (kill_lwp): New function.
21405 (send_sigstop, linux_send_signal): Use it.
21406 * proc-service.c: Clean up #ifdefs.
21407 (fpregset_info): Delete.
21408 (ps_lgetregs): Update and enable implementation.
21409 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21410 implementations.
21411 * remote-utils.c (struct sym_cache, symbol_cache): New.
21412 (input_interrupt): Print a clearer message.
21413 (async_io_enabled): New variable.
21414 (enable_async_io, disable_async_io): Use it. Update comments.
21415 (look_up_one_symbol): Use the symbol cache.
21416 * thread-db.c (thread_db_look_up_symbols): New function.
21417 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21418
21419 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21420
21421 * configure.in: Test for -rdynamic.
21422 * configure: Regenerated.
21423 * Makefile (INTERNAL_LDFLAGS): New.
21424 (gdbserver, gdbreplay): Use it.
21425
21426 2004-09-02 Andrew Cagney <cagney@gnu.org>
21427
21428 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21429
21430 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21431
21432 * linux-low.c (linux_wait): Clear all_processes list also.
21433
21434 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21435
21436 * linux-low.c: Include <errno.h>. Remove extern declaration of
21437 errno.
21438
21439 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21440
21441 * gdbreplay.c, server.h, utils.c: Update copyright years.
21442
21443 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21444
21445 * server.c (main): Print child status or termination signal from
21446 variable 'signal', not 'sig'.
21447
21448 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21449
21450 * linux-low.c (linux_read_memory): Change return type to
21451 int. Check for and return error from ptrace().
21452 * target.c (read_inferior_memory): Change return type to int. Pass
21453 back return status from the_target->read_memory().
21454 * target.h (struct target_ops): Adapt *read_memory() prototype.
21455 Update comment.
21456 (read_inferior_memory): Adapt prototype.
21457 * server.c (main): Return an error packet if
21458 read_inferior_memory() returns an error.
21459
21460 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21461
21462 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21463 Unify with other clean targets.
21464
21465 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21466
21467 * server.c (handle_v_cont): Call set_desired_inferior.
21468
21469 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21470
21471 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21472
21473 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21474
21475 * linux-low.c (linux_wait): Unblock async I/O.
21476 (linux_resume): Block and enable async I/O.
21477 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21478 * server.h (block_async_io, unblock_async_io): Add prototypes.
21479
21480 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21481
21482 * remote-utils.c (remote_open): Print a status notice after
21483 opening a TCP port.
21484 * server.c (attach_inferior): Print a status notice after
21485 attaching.
21486
21487 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21488
21489 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21490
21491 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21492
21493 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21494 error packet.
21495 * server.c, target.h: Update copyright years.
21496
21497 2004-02-25 Roland McGrath <roland@redhat.com>
21498
21499 * target.h (struct target_ops): New member `read_auxv'.
21500 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21501 * linux-low.c (linux_read_auxv): New function.
21502 (linux_target_ops): Initialize `read_auxv' member to that.
21503
21504 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21505
21506 Committed by Jim Blandy <jimb@redhat.com>.
21507
21508 * linux-s390-low.c (s390_num_regs): Update.
21509 (s390_regmap): Remove control registers. Use __s390x__ predefine
21510 instead of GPR_SIZE to distiguish s390 and s390x targets.
21511
21512 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21513
21514 * linux-low.c: Update copyright year.
21515 (check_removed_breakpoint): Clear pending_is_breakpoint.
21516 (linux_set_resume_request, linux_queue_one_thread)
21517 (resume_status_pending_p): New functions.
21518 (linux_continue_one_thread): Use process->resume.
21519 (linux_resume): Only resume threads if there are no pending events.
21520 * linux-low.h (struct process_info): Add resume request
21521 pointer.
21522
21523 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21524
21525 * regcache.c (new_register_cache): Clear the allocated register
21526 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21527
21528 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21529
21530 * linux-low.c (linux_resume): Take a struct thread_resume *
21531 argument.
21532 (linux_wait): Update call.
21533 (resume_ptr): New static variable.
21534 (linux_continue_one_thread): Renamed from
21535 linux_continue_one_process. Use resume_ptr.
21536 (linux_resume): Use linux_continue_one_thread.
21537 * server.c (handle_v_cont, handle_v_requests): New functions.
21538 (myresume): New function.
21539 (main): Handle 'v' case.
21540 * target.h (struct thread_resume): New type.
21541 (struct target_ops): Change argument of "resume" to struct
21542 thread_resume *.
21543 (myresume): Delete macro.
21544
21545 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21546
21547 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21548 (uninstall): Support DESTDIR.
21549
21550 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21551
21552 * configure.srv: Add xscale*linux copy of arm*linux entry.
21553
21554 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21555
21556 * linux-arm-low.c (arm_reinsert_addr): New function.
21557 (the_low_target): Add arm_reinsert_addr.
21558
21559 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21560
21561 * mem-break.c: Remove whitespace at end of file.
21562
21563 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21564
21565 * configure.in: Check whether we need to prototype strerror.
21566 * server.h: Optionally prototype strerror.
21567 * gdbreplay.c (perror_with_name): Use strerror.
21568 * linux-low.c (linux_attach_lwp): Use strerror.
21569 * utils.c (perror_with_name): Use strerror.
21570 * config.in, configure: Regenerated.
21571
21572 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21573
21574 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21575 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21576
21577 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21578
21579 * Makefile.in (SFILES): Update.
21580 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21581 low-sun3.c: Remove files.
21582
21583 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21584
21585 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21586 (linux_detach_one_process, linux_detach): New functions.
21587 (linux_target_ops): Add linux_detach.
21588 * server.c (main): Handle 'D' packet.
21589 * target.h (struct target_ops): Add "detach" member.
21590 (detach_inferior): Define.
21591
21592 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21593
21594 From Kelley Cook <kelleycook@wideopenwest.com>:
21595 * configure.srv: Accept i[34567]86 variants.
21596
21597 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21598
21599 * linux-low.c (linux_wait_for_event): Correct comment typos.
21600 (linux_resume_one_process): Call check_removed_breakpoint.
21601 (linux_send_signal): New function.
21602 (linux_target_ops): Add linux_send_signal.
21603 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21604 of kill.
21605 * target.h (struct target_ops): Add send_signal.
21606
21607 2003-05-29 Jim Blandy <jimb@redhat.com>
21608
21609 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21610 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21611 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21612 away part of the register's value.
21613
21614 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21615
21616 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21617 (linux_wait_for_event, linux_init_signals): Likewise.
21618
21619 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21620
21621 * configure.in: Check for stdlib.h.
21622 * configure: Regenerated.
21623 * config.in: Regenerated.
21624
21625 2003-01-04 Andreas Schwab <schwab@suse.de>
21626
21627 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21628
21629 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21630
21631 * Makefile.in: Remove obsolete code.
21632
21633 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21634
21635 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21636 defined(PT_FPR0_HI).
21637
21638 2002-11-17 Stuart Hughes <seh@zee2.com>
21639
21640 * linux-arm-low.c (arm_num_regs): Increase.
21641 (arm_regmap): Include status register.
21642
21643 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21644
21645 * linux-low.c (register_addr): Remove incorrect -1 check.
21646
21647 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21648
21649 * linux-low.c (linux_create_inferior): Call setpgid. Return
21650 the new PID.
21651 (unstopped_p, linux_signal_pid): Remove.
21652 (linux_target_ops): Remove linux_signal_pid.
21653 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21654 global instead of target method.
21655 * target.h (struct target_ops): Remove signal_pid. Update comment
21656 for create_inferior.
21657 * server.c (signal_pid): New variable.
21658 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21659 gdbserver. Set the child to be the foreground process group.
21660 (attach_inferior): Set signal_pid.
21661
21662 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21663
21664 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21665
21666 2002-08-20 Jim Blandy <jimb@redhat.com>
21667
21668 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21669 default for this.
21670
21671 2002-08-01 Andrew Cagney <cagney@redhat.com>
21672
21673 * Makefile.in: Make chill references obsolete.
21674
21675 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21676
21677 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21678 * configure: Regenerate.
21679 * config.in: Regenerate.
21680
21681 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21682
21683 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21684 (perror_with_name, remote_close, remote_open, expect, play): Static.
21685
21686 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21687
21688 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21689 byte offsets instead of an array of indexes.
21690 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21691
21692 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21693
21694 * regcache.c: Add comment.
21695
21696 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21697
21698 * thread-db.c: New file.
21699 * proc-service.c: New file.
21700 * acinclude.m4: New file.
21701 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21702 proc-service.o, and thread-db.o.
21703 (linux-low.o): Add USE_THREAD_DB.
21704 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21705 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21706 * aclocal.m4: Regenerated.
21707 * config.in: Regenerated.
21708 * configure: Regenerated.
21709 * configure.in: Check for proc_service.h, sys/procfs.h,
21710 thread_db.h, and linux/elf.h headrs.
21711 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21712 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21713 Check for -lthread_db and thread support.
21714 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21715 PowerPC, and SuperH.
21716 * i387-fp.c: Constify arguments.
21717 * i387-fp.h: Likewise.
21718 * inferiors.c: (struct thread_info): Renamed from
21719 `struct inferior_info'. Remove PID member. Use generic inferior
21720 list header. All uses updated.
21721 (inferiors, signal_pid): Removed.
21722 (all_threads): New variable.
21723 (get_thread): Define.
21724 (add_inferior_to_list): New function.
21725 (for_each_inferior): New function.
21726 (change_inferior_id): New function.
21727 (add_inferior): Removed.
21728 (remove_inferior): New function.
21729 (add_thread): New function.
21730 (free_one_thread): New function.
21731 (remove_thread): New function.
21732 (clear_inferiors): Use for_each_inferior and free_one_thread.
21733 (find_inferior): New function.
21734 (find_inferior_id): New function.
21735 (inferior_target_data): Update argument type.
21736 (set_inferior_target_data): Likewise.
21737 (inferior_regcache_data): Likewise.
21738 (set_inferior_regcache_data): Likewise.
21739 * linux-low.c (linux_bp_reinsert): Remove.
21740 (all_processes, stopping_threads, using_thrads)
21741 (struct pending_signals, debug_threads, pid_of): New.
21742 (inferior_pid): Replace with macro.
21743 (struct inferior_linux_data): Remove.
21744 (get_stop_pc, add_process): New functions.
21745 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21746 Use add_process and add_thread.
21747 (linux_attach_lwp): New function, based on old linux_attach. Use
21748 add_process and add_thread. Set stop_expected for new threads.
21749 (linux_attach): New function.
21750 (linux_kill_one_process): New function.
21751 (linux_kill): Kill all LWPs.
21752 (linux_thread_alive): Use find_inferior_id.
21753 (check_removed_breakpoints, status_pending_p): New functions.
21754 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21755 Update. Use WNOHANG. Wait for cloned processes also. Update process
21756 struct for the found process.
21757 (linux_wait_for_event): New function.
21758 (linux_wait): Use it. Support LWPs.
21759 (send_sigstop, wait_for_sigstop, stop_all_processes)
21760 (linux_resume_one_process, linux_continue_one_process): New functions.
21761 (linux_resume): Support LWPs.
21762 (REGISTER_RAW_SIZE): Remove.
21763 (fetch_register): Use register_size instead. Call supply_register.
21764 (usr_store_inferior_registers): Likewise. Call collect_register.
21765 Fix recursive case.
21766 (regsets_fetch_inferior_registers): Improve error message.
21767 (regsets_store_inferior_registers): Add debugging.
21768 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21769 (unstopped_p, linux_signal_pid): New functions.
21770 (linux_target_ops): Add linux_signal_pid.
21771 (linux_init_signals): New function.
21772 (initialize_low): Call it. Initialize using_threads.
21773 * regcache.c (inferior_regcache_data): Add valid
21774 flag.
21775 (get_regcache): Fetch registers lazily. Add fetch argument
21776 and update all callers.
21777 (regcache_invalidate_one, regcache_invalidate): New
21778 functions.
21779 (new_register_cache): Renamed from create_register_cache.
21780 Return the new regcache.
21781 (free_register_cache): Change argument to a void *.
21782 (registers_to_string, registers_from_string): Call get_regcache
21783 with fetch flag set.
21784 (register_data): Make static. Pass fetch flag to get_regcache.
21785 (supply_register): Call get_regcache with fetch flag clear.
21786 (collect_register): Call get_regcache with fetch flag set.
21787 (collect_register_as_string): New function.
21788 * regcache.h: Update.
21789 * remote-utils.c (putpkt): Flush after debug output and use
21790 stderr.
21791 Handle input interrupts while waiting for an ACK.
21792 (input_interrupt): Use signal_pid method.
21793 (getpkt): Flush after debug output and use stderr.
21794 (outreg): Use collect_register_as_string.
21795 (new_thread_notify, dead_thread_notify): New functions.
21796 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21797 and general_thread.
21798 (look_up_one_symbol): Flush after debug output.
21799 * server.c (step_thread, server_waiting): New variables.
21800 (start_inferior): Don't use signal_pid. Update call to mywait.
21801 (attach_inferior): Update call to mywait.
21802 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21803 (main): Don't fetch/store registers explicitly. Use
21804 set_desired_inferior. Support proposed ``Hs'' packet. Update
21805 calls to mywait.
21806 * server.h: Update.
21807 (struct inferior_list, struct_inferior_list_entry): New.
21808 * target.c (set_desired_inferior): New.
21809 (write_inferior_memory): Constify.
21810 (mywait): New function.
21811 * target.h: Update.
21812 (struct target_ops): New signal_pid method.
21813 (mywait): Removed macro, added prototype.
21814
21815 * linux-low.h (regset_func): Removed.
21816 (regset_fill_func, regset_store_func): New.
21817 (enum regset_type): New.
21818 (struct regset_info): Add type field. Use new operation types.
21819 (struct linux_target_ops): stop_pc renamed to get_pc.
21820 Add decr_pc_after_break and breakpoint_at.
21821 (get_process, get_thread_proess, get_process_thread)
21822 (strut process_info, all_processes, linux_attach_lwp)
21823 (thread_db_init): New.
21824
21825 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21826 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21827 (the_low_target): Add new members.
21828 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21829 (i386_store_fpxregset): Constify.
21830 (target_regsets): Add new kind identifier.
21831 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21832 (i386_set_pc): Add debugging.
21833 (i386_breakpoint_at): New function.
21834 (the_low_target): Add new members.
21835 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21836 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21837 (mips_breakpoint_at): New.
21838 (the_low_target): Add new members.
21839 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21840 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21841 (the_low_target): Add new members.
21842 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21843 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21844 (the_low_target): Add new members.
21845 * linux-x86-64-low.c (target_regsets): Add new kind
21846 identifier.
21847
21848 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21849
21850 From Martin Pool <mbp@samba.org>:
21851 * server.c (gdbserver_usage): New function.
21852 (main): Call it.
21853
21854 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21855
21856 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21857 stop_at -> stop_pc.
21858
21859 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21860
21861 * Makefile.in: Remove obsolete code.
21862
21863 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21864
21865 * linux-low.c (regsets_fetch_inferior_registers),
21866 (regsets_store_inferior_registers): Removed cast to int from
21867 ptrace() calls.
21868 * regcache.h: Added declaration of struct inferior_info.
21869
21870 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21871
21872 * inferiors.c (struct inferior_info): Add regcache_data.
21873 (add_inferior): Call create_register_cache.
21874 (clear_inferiors): Call free_register_cache.
21875 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21876 * regcache.c (struct inferior_regcache_data): New.
21877 (registers): Remove.
21878 (get_regcache): New function.
21879 (create_register_cache, free_register_cache): New functions.
21880 (set_register_cache): Don't initialize the register cache here.
21881 (registers_to_string, registers_from_string, register_data): Call
21882 get_regcache.
21883 * regcache.h: Add prototypes.
21884 * server.h: Likewise.
21885
21886 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21887
21888 * mem-break.c: New file.
21889 * mem-break.h: New file.
21890 * Makefile.in: Add mem-break.o rule; update server.h
21891 dependencies.
21892 * inferiors.c (struct inferior_info): Add target_data
21893 member.
21894 (clear_inferiors): Free target_data member if set.
21895 (inferior_target_data, set_inferior_target_data): New functions.
21896 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21897 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21898 * linux-low.c (linux_bp_reinsert): New variable.
21899 (struct inferior_linux_data): New.
21900 (linux_create_inferior): Use set_inferior_target_data.
21901 (linux_attach): Likewise. Call add_inferior.
21902 (linux_wait_for_one_inferior): New function.
21903 (linux_wait): Call it.
21904 (linux_write_memory): Add const.
21905 (initialize_low): Call set_breakpoint_data.
21906 * linux-low.h (struct linux_target_ops): Add breakpoint
21907 handling members.
21908 * server.c (attach_inferior): Remove extra add_inferior
21909 call.
21910 * server.h: Include mem-break.h. Update inferior.c
21911 prototypes.
21912 * target.c (read_inferior_memory)
21913 (write_inferior_memory): New functions.
21914 * target.h (read_inferior_memory)
21915 (write_inferior_memory): Change macros to prototypes.
21916 (struct target_ops): Update comments. Add const to write_memory
21917 definition.
21918
21919 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21920
21921 * linux-low.c (usr_store_inferior_registers): Support
21922 registers which are allowed to fail to store.
21923 * linux-low.h (linux_target_ops): Likewise.
21924 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21925 (ppc_cannot_store_register): FPSCR may not be storable.
21926
21927 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21928
21929 * server.h: Include <string.h> if HAVE_STRING_H.
21930 * ChangeLog: Correct paths in last ChangeLog entry.
21931
21932 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21933
21934 * linux-low.h: Remove obsolete prototypes.
21935 (struct linux_target_ops): New.
21936 (extern the_low_target): New.
21937 * linux-low.c (num_regs, regmap): Remove declarations.
21938 (register_addr): Use the_low_target explicitly.
21939 (fetch_register): Likewise.
21940 (usr_fetch_inferior_registers): Likewise.
21941 (usr_store_inferior_registers): Likewise.
21942 * linux-arm-low.c (num_regs): Remove.
21943 (arm_num_regs): Define.
21944 (arm_regmap): Renamed from regmap, made static.
21945 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21946 made static.
21947 (arm_cannot_store_register): Renamed from cannot_store_register,
21948 made static.
21949 (the_low_target): New.
21950 * linux-i386-low.c (num_regs): Remove.
21951 (i386_num_regs): Define.
21952 (i386_regmap): Renamed from regmap, made static.
21953 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21954 made static.
21955 (i386_cannot_store_register): Renamed from cannot_store_register,
21956 made static.
21957 (the_low_target): New.
21958 * linux-ia64-low.c (num_regs): Remove.
21959 (ia64_num_regs): Define.
21960 (ia64_regmap): Renamed from regmap, made static.
21961 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21962 made static.
21963 (ia64_cannot_store_register): Renamed from cannot_store_register,
21964 made static.
21965 (the_low_target): New.
21966 * linux-m68k-low.c (num_regs): Remove.
21967 (m68k_num_regs): Define.
21968 (m68k_regmap): Renamed from regmap, made static.
21969 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21970 made static.
21971 (m68k_cannot_store_register): Renamed from cannot_store_register,
21972 made static.
21973 (the_low_target): New.
21974 * linux-mips-low.c (num_regs): Remove.
21975 (mips_num_regs): Define.
21976 (mips_regmap): Renamed from regmap, made static.
21977 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21978 made static.
21979 (mips_cannot_store_register): Renamed from cannot_store_register,
21980 made static.
21981 (the_low_target): New.
21982 * linux-ppc-low.c (num_regs): Remove.
21983 (ppc_num_regs): Define.
21984 (ppc_regmap): Renamed from regmap, made static.
21985 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21986 made static.
21987 (ppc_cannot_store_register): Renamed from cannot_store_register,
21988 made static.
21989 (the_low_target): New.
21990 * linux-s390-low.c (num_regs): Remove.
21991 (s390_num_regs): Define.
21992 (s390_regmap): Renamed from regmap, made static.
21993 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
21994 made static.
21995 (s390_cannot_store_register): Renamed from cannot_store_register,
21996 made static.
21997 (the_low_target): New.
21998 * linux-sh-low.c (num_regs): Remove.
21999 (sh_num_regs): Define.
22000 (sh_regmap): Renamed from regmap, made static.
22001 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22002 made static.
22003 (sh_cannot_store_register): Renamed from cannot_store_register,
22004 made static.
22005 (the_low_target): New.
22006 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22007 (the_low_target): New.
22008
22009 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22010
22011 * Makefile.in: Add stamp-h target.
22012 * configure.in: Create stamp-h.
22013 * configure: Regenerated.
22014
22015 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22016
22017 * inferiors.c: New file.
22018 * target.c: New file.
22019 * target.h: New file.
22020 * Makefile.in: Add target.o and inferiors.o. Update
22021 dependencies.
22022 * linux-low.c (inferior_pid): New static variable,
22023 moved from server.c.
22024 (linux_create_inferior): Renamed from create_inferior.
22025 Call add_inferior. Return 0 on success instead of a PID.
22026 (linux_attach): Renamed from myattach.
22027 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22028 (linux_thread_alive): Renamed from mythread_alive.
22029 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22030 child dies.
22031 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22032 (regsets_store_inferior_registers): Correct error message.
22033 Add missing ``return 0''.
22034 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22035 (linux_store_registers): Renamed from store_inferior_registers.
22036 (linux_read_memory): Renamed from read_inferior_memory.
22037 (linux_write_memory): Renamed from write_inferior_memory.
22038 (linux_target_ops): New structure.
22039 (initialize_low): Call set_target_ops ().
22040 * remote-utils.c (unhexify): New function.
22041 (hexify): New function.
22042 (input_interrupt): Send signals to ``signal_pid''.
22043 * server.c (inferior_pid): Remove.
22044 (start_inferior): Update create_inferior call.
22045 (attach_inferior): Call add_inferior.
22046 (handle_query): New function.
22047 (main): Call handle_query for `q' packets.
22048 * server.h: Include "target.h". Remove obsolete prototypes.
22049 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22050
22051 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22052
22053 * Makefile.in: Add WARN_CFLAGS. Update configury
22054 dependencies.
22055 * configure.in: Check for <string.h>
22056 * configure: Regenerate.
22057 * config.in: Regenerate.
22058 * gdbreplay.c: Include needed system headers.
22059 (remote_open): Remove strchr prototype.
22060 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22061 * regcache.c (supply_register): Change buf argument to const void *.
22062 (supply_register_by_name): Likewise.
22063 (collect_register): Change buf argument to void *.
22064 (collect_register_by_name): Likewise.
22065 * regcache.h: Add missing prototypes.
22066 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22067 * server.c (handle_query): New function.
22068 (attached): New static variable, moved out of main.
22069 (main): Quiet longjmp clobber warnings.
22070 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22071 * utils.c (error): Remove NORETURN.
22072 (fatal): Likewise.
This page took 0.450456 seconds and 5 git commands to generate.