]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdbserver/ChangeLog
Remove gdb_fildes_t
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-13 Tom Tromey <tom@tromey.com>
2
3 * server.h (gdb_fildes_t): Remove typedef.
4 * remote-utils.c (remote_desc, list_desc): Now int.
5 (INVALID_DESCRIPTOR): Remove.
6 (gdb_connected, remote_close)
7 (check_remote_input_interrupt_request): Update.
8 * utils.h (pfildes): Don't declare.
9 * utils.c (pfildes): Remove.
10
11 2020-04-13 Tom Tromey <tom@tromey.com>
12
13 * server.h (handle_serial_event, handle_target_event): Update.
14 * server.c: Don't call initialize_event_loop.
15 (keep_processing_events): New global.
16 (handle_serial_event): Return void. Set keep_processing_events.
17 (handle_target_event): Return void.
18 (start_event_loop): Move from event-loop.c. Rewrite.
19 * remote-utils.c (handle_accept_event): Return void.
20 (reset_readchar): Use delete_timer.
21 (process_remaining): Return void.
22 (reschedule): Use create_timer.
23 * event-loop.h: Remove.
24 * event-loop.cc: Remove.
25 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
26
27 2020-04-13 Tom Tromey <tom@tromey.com>
28
29 * server.c (invoke_async_signal_handlers)
30 (check_async_event_handlers, flush_streams, gdb_select): New
31 functions.
32
33 2020-04-13 Tom Tromey <tom@tromey.com>
34
35 * configure: Rebuild.
36 * config.in: Rebuild.
37
38 2020-04-08 Tom Tromey <tromey@adacore.com>
39
40 PR gdb/22992
41 * win32-low.c (child_continue): Call matching_pending_stop.
42 (get_child_debug_event): Call fetch_pending_stop. Push pending
43 stop when needed.
44
45 2020-04-08 Tom Tromey <tromey@adacore.com>
46
47 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
48 (win32_process_target::supports_stopped_by_sw_breakpoint):
49 Declare.
50 * win32-low.c (win32_supports_z_point_type): Always handle
51 Z_PACKET_SW_BP.
52 (win32_insert_point): Call insert_memory_breakpoint when needed.
53 (win32_remove_point): Call remove_memory_breakpoint when needed.
54 (win32_process_target::stopped_by_sw_breakpoint)
55 (win32_process_target::supports_stopped_by_sw_breakpoint): New
56 methods.
57 (win32_target_ops): Update.
58 (maybe_adjust_pc): New function.
59 (win32_wait): Call maybe_adjust_pc.
60
61 2020-04-08 Tom Tromey <tromey@adacore.com>
62
63 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
64 field.
65 * win32-i386-low.c (the_low_target): Update.
66 * win32-arm-low.c (the_low_target): Update.
67
68 2020-04-08 Tom Tromey <tromey@adacore.com>
69
70 * win32-low.h (win32_process_target::read_pc)
71 (win32_process_target::write_pc): Declare.
72 * win32-low.c (win32_process_target::read_pc)
73 (win32_process_target::write_pc): New methods.
74 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
75 functions.
76 (the_low_target): Update.
77 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
78 functions.
79 (the_low_target): Update.
80
81 2020-04-08 Tom Tromey <tromey@adacore.com>
82
83 * win32-low.c (win32_kill, get_child_debug_event): Use
84 wait_for_debug_event.
85
86 2020-04-08 Tom Tromey <tromey@adacore.com>
87
88 * win32-low.c (child_continue): Call continue_last_debug_event.
89
90 2020-04-08 Tom Tromey <tromey@adacore.com>
91
92 * win32-low.c (handle_exception): Remove.
93 (windows_nat::handle_ms_vc_exception): New function.
94 (get_child_debug_event): Add "continue_status" parameter.
95 Update.
96 (win32_wait): Update.
97
98 2020-04-08 Tom Tromey <tromey@adacore.com>
99
100 * win32-low.c (windows_nat::handle_load_dll): Rename from
101 handle_load_dll. No longer static.
102 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
103 No longer static.
104
105 2020-04-08 Tom Tromey <tromey@adacore.com>
106
107 * win32-low.c (handle_output_debug_string): Add parameter. Change
108 return type.
109 (win32_kill, get_child_debug_event): Update.
110
111 2020-04-08 Tom Tromey <tromey@adacore.com>
112
113 * win32-low.c (current_process_handle, current_process_id)
114 (main_thread_id, last_sig, current_event, siginfo_er): Move to
115 nat/windows-nat.c.
116
117 2020-04-08 Tom Tromey <tromey@adacore.com>
118
119 * win32-low.c (get_image_name): Remove.
120 (handle_load_dll): Update.
121
122 2020-04-08 Tom Tromey <tromey@adacore.com>
123
124 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
125 No longer static. Change parameters.
126 (child_add_thread, child_fetch_inferior_registers)
127 (child_store_inferior_registers, win32_resume)
128 (win32_get_tib_address): Update.
129
130 2020-04-08 Tom Tromey <tromey@adacore.com>
131
132 * win32-low.h (struct win32_target_ops): Use qualified names where
133 needed.
134 * win32-i386-low.c: Add "using namespace".
135 * win32-low.c: Add "using namespace".
136 * win32-arm-low.c: Add "using namespace".
137
138 2020-04-08 Tom Tromey <tromey@adacore.com>
139
140 * win32-low.c (delete_thread_info): Don't call CloseHandle.
141
142 2020-04-08 Tom Tromey <tromey@adacore.com>
143
144 * win32-low.c (win32_require_context, suspend_one_thread): Use
145 windows_thread_info::suspend.
146 (continue_one_thread): Use windows_thread_info::resume.
147 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
148
149 2020-04-08 Tom Tromey <tromey@adacore.com>
150
151 * win32-i386-low.c (update_debug_registers)
152 (i386_prepare_to_resume, i386_thread_added): Update.
153
154 2020-04-08 Tom Tromey <tromey@adacore.com>
155
156 * win32-low.c (child_add_thread): Use new.
157 (delete_thread_info): Use delete.
158
159 2020-04-08 Tom Tromey <tromey@adacore.com>
160
161 * win32-low.h (struct windows_thread_info): Remove.
162
163 2020-04-08 Tom Tromey <tromey@adacore.com>
164
165 * win32-low.h (struct windows_thread_info): Rename from
166 win32_thread_info. Remove typedef.
167 (struct win32_target_ops, win32_require_context): Update.
168 * win32-low.c (win32_get_thread_context)
169 (win32_set_thread_context, win32_prepare_to_resume)
170 (win32_require_context, thread_rec, child_add_thread)
171 (delete_thread_info, continue_one_thread)
172 (child_fetch_inferior_registers, child_store_inferior_registers)
173 (win32_resume, suspend_one_thread, win32_get_tib_address):
174 Update.
175 * win32-i386-low.c (update_debug_registers)
176 (win32_get_current_dr, i386_get_thread_context)
177 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
178 (i386_fetch_inferior_register, i386_store_inferior_register):
179 Update.
180 * win32-arm-low.c (arm_get_thread_context)
181 (arm_fetch_inferior_register, arm_store_inferior_register):
182 Update.
183
184 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
185
186 * linux-low.h (struct linux_target_ops): Remove.
187 (the_low_target): Remove.
188 * linux-x86-low.cc (the_low_target): Remove.
189 * linux-aarch64-low.cc (the_low_target): Ditto.
190 * linux-arm-low.cc (the_low_target): Ditto.
191 * linux-bfin-low.cc (the_low_target): Ditto.
192 * linux-cris-low.cc (the_low_target): Ditto.
193 * linux-crisv32-low.cc (the_low_target): Ditto.
194 * linux-ia64-low.cc (the_low_target): Ditto.
195 * linux-m32r-low.cc (the_low_target): Ditto.
196 * linux-m68k-low.cc (the_low_target): Ditto.
197 * linux-mips-low.cc (the_low_target): Ditto.
198 * linux-nios2-low.cc (the_low_target): Ditto.
199 * linux-ppc-low.cc (the_low_target): Ditto.
200 * linux-riscv-low.cc (the_low_target): Ditto.
201 * linux-s390-low.cc (the_low_target): Ditto.
202 * linux-sh-low.cc (the_low_target): Ditto.
203 * linux-sparc-low.cc (the_low_target): Ditto.
204 * linux-tic6x-low.cc (the_low_target): Ditto.
205 * linux-tile-low.cc (the_low_target): Ditto.
206 * linux-xtensa-low.cc (the_low_target): Ditto.
207
208 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
209
210 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
211 linux target define the op by overriding the declaration in
212 process_stratum_target.
213
214 * linux-low.h (struct linux_target_ops): Remove the op.
215 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
216 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
217 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
218 (x86_get_ipa_tdesc_idx): Turn into...
219 (x86_target::get_ipa_tdesc_idx): ...this.
220 (the_low_target): Remove the op field.
221 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
222 (ppc_get_ipa_tdesc_idx): Turn into...
223 (ppc_target::get_ipa_tdesc_idx): ...this.
224 (the_low_target): Remove the op field.
225 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
226 (s390_get_ipa_tdesc_idx): Turn into...
227 (s390_target::get_ipa_tdesc_idx): ...this.
228 (the_low_target): Remove the op field.
229
230 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
231
232 Turn the 'get_syscall_trapinfo' linux target op into a method
233 of process_stratum_target.
234
235 * linux-low.h (struct linux_target_ops): Remove the op.
236 (class linux_process_target) <get_syscall_trapinfo>
237 <gdb_catch_this_syscall>
238 <low_supports_catch_syscall>
239 <low_get_syscall_trapinfo>: Declare.
240 * linux-low.cc (get_syscall_trapinfo): Turn into...
241 (linux_process_target::get_syscall_trapinfo): ...this.
242 (linux_process_target::low_get_syscall_trapinfo): Define.
243 (gdb_catch_this_syscall_p): Turn into...
244 (linux_process_target::gdb_catch_this_syscall): ...this.
245 (linux_process_target::low_supports_catch_syscall): Define.
246
247 Update the callers below.
248
249 (linux_process_target::wait_1)
250 (linux_process_target::supports_catch_syscall)
251
252 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
253 <low_get_syscall_trapinfo>: Declare.
254 (x86_target::low_supports_catch_syscall): Define.
255 (x86_get_syscall_trapinfo): Turn into...
256 (x86_target::low_get_syscall_trapinfo): ...this.
257 (the_low_target): Remove the op field.
258 * linux-aarch64-low.cc (class aarch64_target)
259 <low_supports_catch_syscall>
260 <low_get_syscall_trapinfo>: Declare.
261 (aarch64_target::low_supports_catch_syscall): Define.
262 (aarch64_get_syscall_trapinfo): Turn into...
263 (aarch64_target::low_get_syscall_trapinfo): ...this.
264 (the_low_target): Remove the op field.
265 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
266 <low_get_syscall_trapinfo>: Declare.
267 (arm_target::low_supports_catch_syscall): Define.
268 (arm_get_syscall_trapinfo): Turn into...
269 (arm_target::low_get_syscall_trapinfo): ...this.
270 (the_low_target): Remove the op field.
271 * linux-ppc-low.cc (the_low_target): Remove the op field.
272 * linux-s390-low.cc (the_low_target): Remove the op field.
273
274 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
275
276 Remove the 'supports_hardware_single_step' linux target op and
277 override the process_stratum_target's op definition in
278 linux_process_target to return true.
279
280 * linux-low.h (struct linux_target_ops): Remove the op.
281 (class linux_process_target) <finish_step_over>
282 <maybe_hw_step>: Declare.
283 * linux-low.cc (can_hardware_single_step): Remove.
284 (maybe_hw_step): Turn into...
285 (linux_process_target::maybe_hw_step): ...this.
286 (finish_step_over): Turn into...
287 (linux_process_target::finish_step_over): ...this.
288 (linux_process_target::supports_hardware_single_step): Update
289 to return true.
290
291 Update the callers below.
292
293 (linux_process_target::single_step)
294 (linux_process_target::resume_one_lwp_throw)
295
296 * linux-arm-low.cc (class arm_target)
297 <supports_hardware_single_step>: Declare.
298 (arm_supports_hardware_single_step): Turn into...
299 (arm_target::supports_hardware_single_step): ...this.
300 (the_low_target): Remove the op field.
301 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
302 (the_low_target): Remove the op field.
303 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
304 Remove.
305 (the_low_target): Remove the op field.
306 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
307 (the_low_target): Remove the op field.
308 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
309 (the_low_target): Remove the op field.
310 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
311 (the_low_target): Remove the op field.
312 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
313 (the_low_target): Remove the op field.
314 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
315 (the_low_target): Remove the op field.
316 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
317 (the_low_target): Remove the op field.
318 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
319 (the_low_target): Remove the op field.
320 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
321 (the_low_target): Remove the op field.
322 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
323 (the_low_target): Remove the op field.
324 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
325 Remove.
326 (the_low_target): Remove the op field.
327
328 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
329
330 Turn the 'supports_range_stepping' linux target op into a method
331 of linux_process_target.
332
333 * linux-low.h (struct linux_target_ops): Remove the op.
334 (class linux_process_target) <low_supports_range_stepping>: Declare.
335 * linux-low.cc (linux_process_target::low_supports_range_stepping):
336 Define.
337 (linux_process_target::supports_range_stepping): Update the call
338 site.
339 * linux-x86-low.cc (class x86_target)
340 <low_supports_range_stepping>: Declare.
341 (x86_supports_range_stepping): Turn into...
342 (x86_target::low_supports_range_stepping): ...this.
343 (the_low_target): Remove the op field.
344 * linux-aarch64-low.cc (class aarch64_target)
345 <low_supports_range_stepping>: Declare.
346 (aarch64_supports_range_stepping): Turn into...
347 (aarch64_target::low_supports_range_stepping): ...this.
348 (the_low_target): Remove the op field.
349 * linux-arm-low.cc (the_low_target): Remove the op field.
350 * linux-bfin-low.cc (the_low_target): Ditto.
351 * linux-crisv32-low.cc (the_low_target): Ditto.
352 * linux-m32r-low.cc (the_low_target): Ditto.
353 * linux-m68k-low.cc (the_low_target): Ditto.
354 * linux-ppc-low.cc (the_low_target): Ditto.
355 * linux-s390-low.cc (the_low_target): Ditto.
356 * linux-sh-low.cc (the_low_target): Ditto.
357 * linux-tic6x-low.cc (the_low_target): Ditto.
358 * linux-tile-low.cc (the_low_target): Ditto.
359 * linux-xtensa-low.cc (the_low_target): Ditto.
360
361 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
362
363 Remove the 'emit_ops' linux target ops and let the concrete
364 linux target define the op by overriding the declaration of
365 process_stratum_target.
366
367 * linux-low.h (struct linux_target_ops): Remove the op.
368 (class linux_process_target) <emit_ops>: Remove.
369 * linux-low.cc (linux_process_target::emit_ops): Remove.
370 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
371 (x86_emit_ops): Turn into...
372 (x86_target::emit_ops): ...this.
373 (the_low_target): Remove the op field.
374 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
375 (aarch64_emit_ops): Turn into...
376 (aarch64_target::emit_ops): ...this.
377 (the_low_target): Remove the op field.
378 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
379 (ppc_emit_ops): Turn into...
380 (ppc_target::emit_ops): ...this.
381 (the_low_target): Remove the op field.
382 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
383 (s390_emit_ops): Turn into...
384 (s390_target::emit_ops): ...this.
385 (the_low_target): Remove the op field.
386 * linux-arm-low.cc (the_low_target): Remove the op field.
387 * linux-bfin-low.cc (the_low_target): Ditto.
388 * linux-crisv32-low.cc (the_low_target): Ditto.
389 * linux-m32r-low.cc (the_low_target): Ditto.
390 * linux-m68k-low.cc (the_low_target): Ditto.
391 * linux-sh-low.cc (the_low_target): Ditto.
392 * linux-tic6x-low.cc (the_low_target): Ditto.
393 * linux-tile-low.cc (the_low_target): Ditto.
394 * linux-xtensa-low.cc (the_low_target): Ditto.
395
396 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
397
398 Remove the 'install_fast_tracepoint_jump_pad' and
399 'get_min_fast_tracepoint_insn_len' linux target ops to let the
400 concrete linux target define the ops by overriding the declarations
401 of process_stratum_target.
402
403 * linux-low.h (struct linux_target_ops): Remove the ops.
404 (class linux_process_target) <supports_fast_tracepoints>
405 <install_fast_tracepoint_jump_pad>
406 <get_min_fast_tracepoint_insn_len>: Remove.
407 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
408 (linux_process_target::install_fast_tracepoint_jump_pad)
409 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
410 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
411 <install_fast_tracepoint_jump_pad>
412 <get_min_fast_tracepoint_insn_len>: Declare.
413 (x86_target::supports_fast_tracepoints): Define.
414 (x86_install_fast_tracepoint_jump_pad): Turn into...
415 (x86_target::install_fast_tracepoint_jump_pad): ...this.
416 (x86_get_min_fast_tracepoint_insn_len): Turn into...
417 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
418 (the_low_target): Remove the op fields.
419 * linux-aarch64-low.cc (class aarch64_target)
420 <supports_fast_tracepoints>
421 <install_fast_tracepoint_jump_pad>
422 <get_min_fast_tracepoint_insn_len>: Declare.
423 (aarch64_target::supports_fast_tracepoints): Define.
424 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
425 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
426 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
427 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
428 (the_low_target): Remove the op fields.
429 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
430 <install_fast_tracepoint_jump_pad>
431 <get_min_fast_tracepoint_insn_len>: Declare.
432 (ppc_target::supports_fast_tracepoints): Define.
433 (ppc_install_fast_tracepoint_jump_pad): Turn into...
434 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
435 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
436 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
437 (the_low_target): Remove the op fields.
438 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
439 <install_fast_tracepoint_jump_pad>
440 <get_min_fast_tracepoint_insn_len>: Declare.
441 (s390_target::supports_fast_tracepoints): Define.
442 (s390_install_fast_tracepoint_jump_pad): Turn into...
443 (s390_target::install_fast_tracepoint_jump_pad): ...this.
444 (s390_get_min_fast_tracepoint_insn_len): Turn into...
445 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
446 (the_low_target): Remove the op fields.
447 * linux-arm-low.cc (the_low_target): Remove the op fields.
448 * linux-bfin-low.cc (the_low_target): Ditto.
449 * linux-crisv32-low.cc (the_low_target): Ditto.
450 * linux-m32r-low.cc (the_low_target): Ditto.
451 * linux-m68k-low.cc (the_low_target): Ditto.
452 * linux-sh-low.cc (the_low_target): Ditto.
453 * linux-tic6x-low.cc (the_low_target): Ditto.
454 * linux-tile-low.cc (the_low_target): Ditto.
455 * linux-xtensa-low.cc (the_low_target): Ditto.
456
457 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
458
459 Turn the 'get_thread_area' linux target op into a method of
460 process_stratum_target.
461
462 * linux-low.h (struct linux_target_ops): Remove the op.
463 (class linux_process_target) <stuck_in_jump_pad>
464 <linux_fast_tracepoint_collecting>
465 <low_get_thread_area>: Declare.
466 * linux-low.cc (supports_fast_tracepoints): Remove.
467 (linux_fast_tracepoint_collecting): Turn into...
468 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
469 (linux_process_target::low_get_thread_area): Define.
470 (stuck_in_jump_pad_callback): Turn into...
471 (linux_process_target::stuck_in_jump_pad): ...this.
472
473 Update the caller below.
474
475 (linux_process_target::stabilize_threads)
476
477 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
478 Declare.
479 (x86_get_thread_area): Turn into...
480 (x86_target::low_get_thread_area): ...this.
481 (the_low_target): Remove the op field.
482 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
483 Declare.
484 (aarch64_get_thread_area): Turn into...
485 (aarch64_target::low_get_thread_area): ...this.
486 (the_low_target): Remove the op field.
487 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
488 Declare.
489 (ppc_get_thread_area): Turn into...
490 (ppc_target::low_get_thread_area): ...this.
491 (the_low_target): Remove the op field.
492 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
493 Declare.
494 (s390_get_thread_area): Turn into...
495 (s390_target::low_get_thread_area): ...this.
496 (the_low_target): Remove the op field.
497 * linux-arm-low.cc (the_low_target): Remove the op field.
498 * linux-bfin-low.cc (the_low_target): Ditto.
499 * linux-crisv32-low.cc (the_low_target): Ditto.
500 * linux-m32r-low.cc (the_low_target): Ditto.
501 * linux-m68k-low.cc (the_low_target): Ditto.
502 * linux-sh-low.cc (the_low_target): Ditto.
503 * linux-tic6x-low.cc (the_low_target): Ditto.
504 * linux-tile-low.cc (the_low_target): Ditto.
505 * linux-xtensa-low.cc (the_low_target): Ditto.
506
507 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
508
509 Remote the 'supports_tracepoints' linux target op and let the
510 concrete linux target define it by overriding the op declared in
511 process_stratum_target.
512
513 * linux-low.h (struct linux_target_ops): Remove the op.
514 (class linux_process_target) <supports_tracepoints>: Remove.
515 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
516 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
517 Declare.
518 (x86_supports_tracepoints): Turn into...
519 (x86_target::supports_tracepoints): ...this.
520 (the_low_target): Remove the op field.
521 * linux-aarch64-low.cc (class aarch64_target)
522 <supports_tracepoints>: Declare.
523 (aarch64_supports_tracepoints): Turn into...
524 (aarch64_target::supports_tracepoints): ...this.
525 (the_low_target): Remove the op field.
526 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
527 Declare.
528 (ppc_supports_tracepoints): Turn into...
529 (ppc_target::supports_tracepoints): ...this.
530 (the_low_target): Remove the op field.
531 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
532 Declare.
533 (s390_supports_tracepoints): Turn into...
534 (s390_target::supports_tracepoints): ...this.
535 (the_low_target): Remove the op field.
536 * linux-arm-low.cc (the_low_target): Remove the op field.
537 * linux-bfin-low.cc (the_low_target): Ditto.
538 * linux-crisv32-low.cc (the_low_target): Ditto.
539 * linux-m32r-low.cc (the_low_target): Ditto.
540 * linux-m68k-low.cc (the_low_target): Ditto.
541 * linux-sh-low.cc (the_low_target): Ditto.
542 * linux-tic6x-low.cc (the_low_target): Ditto.
543 * linux-tile-low.cc (the_low_target): Ditto.
544 * linux-xtensa-low.cc (the_low_target): Ditto.
545
546 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
547
548 Remove the 'process_qsupported' linux target op and let a concrete
549 linux target define the op by overriding the op declaration in
550 process_stratum_target.
551
552 * linux-low.h (struct linux_target_ops): Remove the op.
553 (class linux_process_target) <process_qsupported>: Remove.
554 * linux-low.cc (linux_process_target::process_qsupported): Remove.
555 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
556 (x86_linux_process_qsupported): Turn into...
557 (x86_target::process_qsupported): ...this.
558 (the_low_target): Remove the op field.
559 * linux-aarch64-low.cc (the_low_target): Remove the op
560 field.
561 * linux-arm-low.cc (the_low_target): Ditto.
562 * linux-bfin-low.cc (the_low_target): Ditto.
563 * linux-crisv32-low.cc (the_low_target): Ditto.
564 * linux-m32r-low.cc (the_low_target): Ditto.
565 * linux-m68k-low.cc (the_low_target): Ditto.
566 * linux-ppc-low.cc (the_low_target): Ditto.
567 * linux-s390-low.cc (the_low_target): Ditto.
568 * linux-sh-low.cc (the_low_target): Ditto.
569 * linux-tic6x-low.cc (the_low_target): Ditto.
570 * linux-tile-low.cc (the_low_target): Ditto.
571 * linux-xtensa-low.cc (the_low_target): Ditto.
572
573 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
574
575 Turn the 'prepare_to_resume' linux target op into a method of
576 linux_process_target.
577
578 * linux-low.h (struct linux_target_ops): Remove the op.
579 (class linux_process_target) <low_prepare_to_resume>: Declare.
580 * linux-low.cc (linux_process_target::low_prepare_to_resume):
581 Define.
582
583 Update the callers below:
584
585 (linux_process_target::resume_one_lwp_throw)
586 (linux_process_target::low_prepare_to_resume)
587
588 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
589 Declare.
590 (x86_target::low_prepare_to_resume): Define.
591 (the_low_target): Remove the op field.
592 * linux-aarch64-low.cc (class aarch64_target)
593 <low_prepare_to_resume>: Declare.
594 (aarch64_target::low_prepare_to_resume): Define.
595 (the_low_target): Remove the op field.
596 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
597 Declare.
598 (arm_prepare_to_resume): Turn into...
599 (arm_target::low_prepare_to_resume): ...this.
600 (the_low_target): Remove the op field.
601 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
602 Declare.
603 (mips_linux_prepare_to_resume): Turn into...
604 (mips_target::low_prepare_to_resume): ...this.
605 (the_low_target): Remove the op field.
606 * linux-bfin-low.cc (the_low_target): Remove the op field.
607 * linux-crisv32-low.cc (the_low_target): Ditto.
608 * linux-m32r-low.cc (the_low_target): Ditto.
609 * linux-m68k-low.cc (the_low_target): Ditto.
610 * linux-ppc-low.cc (the_low_target): Ditto.
611 * linux-s390-low.cc (the_low_target): Ditto.
612 * linux-sh-low.cc (the_low_target): Ditto.
613 * linux-tic6x-low.cc (the_low_target): Ditto.
614 * linux-tile-low.cc (the_low_target): Ditto.
615 * linux-xtensa-low.cc (the_low_target): Ditto.
616
617 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
618
619 Turn the 'new_process', 'delete_process', 'new_thread',
620 'delete_thread', and 'new_fork' linux target ops into methods
621 of linux_process_target.
622
623 * linux-low.h (struct linux_target_ops): Remove the ops.
624 (class linux_process_target) <add_linux_process>
625 <add_lwp>
626 <delete_lwp>
627 <attach_lwp>
628 <detach_one_lwp>
629 <check_zombie_leaders>
630 <filter_exit_event>
631 <low_new_process>
632 <low_delete_process>
633 <low_new_thread>
634 <low_delete_thread>
635 <low_new_fork>: Declare.
636 * linux-low.cc (delete_lwp): Turn into...
637 (linux_process_target::delete_lwp): ...this.
638 (linux_process_target::low_delete_thread): Define.
639 (linux_add_process): Turn into...
640 (linux_process_target::add_linux_process): ...this.
641 (linux_process_target::low_new_process): Define.
642 (linux_process_target::low_delete_process): Define.
643 (linux_process_target::low_new_fork): Define.
644 (add_lwp): Turn into...
645 (linux_process_target::add_lwp): ...this.
646 (linux_process_target::low_new_thread): Define.
647 (linux_attach_lwp): Turn into...
648 (linux_process_target::attach_lwp): ...this.
649 (linux_detach_one_lwp): Turn into...
650 (linux_process_target::detach_one_lwp): ...this.
651 (linux_detach_lwp_callback): Remove and inline...
652 (linux_process_target::detach): ...here.
653 (check_zombie_leaders): Turn into...
654 (linux_process_target::check_zombie_leaders): ...this.
655 (filter_exit_event): Turn into...
656 (linux_process_target::filter_exit_event): ...this.
657
658 Update the callers below.
659
660 (linux_process_target::handle_extended_wait)
661 (linux_process_target::create_inferior)
662 (attach_proc_task_lwp_callback)
663 (linux_process_target::attach)
664 (linux_process_target::detach)
665 (linux_process_target::mourn)
666 * thread-db.cc (attach_thread)
667
668 * linux-x86-low.cc (class x86_target) <low_new_process>
669 <low_delete_process>
670 <low_new_thread>
671 <low_delete_thread>
672 <low_new_fork>: Declare.
673 (x86_linux_new_process): Turn into...
674 (x86_target::low_new_process): ...this.
675 (x86_linux_delete_process): Turn into...
676 (x86_target::low_delete_process): ...this.
677 (x86_target::low_new_thread): Define.
678 (x86_target::low_delete_thread): Define.
679 (x86_linux_new_fork): Turn into...
680 (x86_target::low_new_fork): ...this.
681 (the_low_target): Remove the op fields.
682 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
683 <low_delete_process>
684 <low_new_thread>
685 <low_delete_thread>
686 <low_new_fork>: Declare.
687 (aarch64_linux_new_process): Turn into...
688 (aarch64_target::low_new_process): ...this.
689 (aarch64_linux_delete_process): Turn into...
690 (aarch64_target::low_delete_process): ...this.
691 (aarch64_target::low_new_thread): Define.
692 (aarch64_target::low_delete_thread): Define.
693 (aarch64_linux_new_fork): Turn into...
694 (aarch64_target::low_new_fork): ...this.
695 (the_low_target): Remove the op fields.
696 * linux-arm-low.cc (class arm_target) <low_new_process>
697 <low_delete_process>
698 <low_new_thread>
699 <low_delete_thread>
700 <low_new_fork>: Declare.
701 (arm_new_process): Turn into...
702 (arm_target::low_new_process): ...this.
703 (arm_delete_process): Turn into...
704 (arm_target::low_delete_process): ...this.
705 (arm_new_thread): Turn into...
706 (arm_target::low_new_thread): ...this.
707 (arm_delete_thread): Turn into...
708 (arm_target::low_delete_thread): ...this.
709 (arm_new_fork): Turn into...
710 (arm_target::low_new_fork): ...this.
711 (the_low_target): Remove the op fields.
712 * linux-mips-low.cc (class mips_target) <low_new_process>
713 <low_delete_process>
714 <low_new_thread>
715 <low_delete_thread>
716 <low_new_fork>: Declare.
717 (mips_linux_new_process): Turn into...
718 (mips_target::low_new_process): ...this.
719 (mips_linux_delete_process): Turn into...
720 (mips_target::low_delete_process): ...this.
721 (mips_linux_new_thread): Turn into...
722 (mips_target::low_new_thread): ...this.
723 (mips_linux_delete_thread): Turn into...
724 (mips_target::low_delete_thread): ...this.
725 (mips_linux_new_fork): Turn into...
726 (mips_target::low_new_fork): ...this.
727 (the_low_target): Remove the op fields.
728 * linux-bfin-low.cc (the_low_target): Remove the op fields.
729 * linux-crisv32-low.cc (the_low_target): Ditto.
730 * linux-m32r-low.cc (the_low_target): Ditto.
731 * linux-m68k-low.cc (the_low_target): Ditto.
732 * linux-ppc-low.cc (the_low_target): Ditto.
733 * linux-s390-low.cc (the_low_target): Ditto.
734 * linux-sh-low.cc (the_low_target): Ditto.
735 * linux-tic6x-low.cc (the_low_target): Ditto.
736 * linux-tile-low.cc (the_low_target): Ditto.
737 * linux-xtensa-low.cc (the_low_target): Ditto.
738
739 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
740
741 Turn the 'siginfo_fixup' linux target op into a method of
742 linux_process_target.
743
744 * linux-low.h (struct linux_target_ops): Remove the op.
745 (class linux_process_target) <siginfo_fixup>
746 <low_siginfo_fixup>: Declare.
747 * linux-low.cc (siginfo_fixup): Turn into...
748 (linux_process_target::siginfo_fixup): ...this.
749 (linux_process_target::low_siginfo_fixup): Define.
750 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
751 (x86_siginfo_fixup): Turn into...
752 (x86_target::low_siginfo_fixup): ...this.
753 (the_low_target): Remove the op field.
754 * linux-aarch64-low.cc (class aarch64_target):
755 <low_siginfo_fixup>: Declare.
756 (aarch64_linux_siginfo_fixup): Turn into...
757 (aarch64_target::low_siginfo_fixup): ...this.
758 (the_low_target): Remove the op field.
759 * linux-arm-low.cc (the_low_target): Remove the op field.
760 * linux-bfin-low.cc (the_low_target): Ditto.
761 * linux-crisv32-low.cc (the_low_target): Ditto.
762 * linux-m32r-low.cc (the_low_target): Ditto.
763 * linux-m68k-low.cc (the_low_target): Ditto.
764 * linux-mips-low.cc (the_low_target): Ditto.
765 * linux-ppc-low.cc (the_low_target): Ditto.
766 * linux-s390-low.cc (the_low_target): Ditto.
767 * linux-sh-low.cc (the_low_target): Ditto.
768 * linux-tic6x-low.cc (the_low_target): Ditto.
769 * linux-tile-low.cc (the_low_target): Ditto.
770 * linux-xtensa-low.cc (the_low_target): Ditto.
771
772 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
773
774 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
775 linux target ops into methods of linux_process_target.
776
777 * linux-low.h (struct linux_target_ops): Remove the ops.
778 (class linux_process_target) <low_collect_ptrace_register>
779 <low_store_ptrace_register>: Declare.
780 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
781 (linux_process_target::low_supply_ptrace_register): Define.
782
783 Update the callers below.
784
785 (linux_process_target::fetch_register)
786 (linux_process_target::store_register)
787
788 * linux-x86-low.cc (the_low_target): Remove the op fields.
789 * linux-aarch64-low.cc (the_low_target): Ditto.
790 * linux-arm-low.cc (the_low_target): Ditto.
791 * linux-bfin-low.cc (the_low_target): Ditto.
792 * linux-crisv32-low.cc (the_low_target): Ditto.
793 * linux-m32r-low.cc (the_low_target): Ditto.
794 * linux-m68k-low.cc (the_low_target): Ditto.
795 * linux-sh-low.cc (the_low_target): Ditto.
796 * linux-sparc-low.cc (the_low_target): Ditto.
797 * linux-tic6x-low.cc (the_low_target): Ditto.
798 * linux-tile-low.cc (the_low_target): Ditto.
799 * linux-xtensa-low.cc (the_low_target): Ditto.
800 * linux-mips-low.cc (class mips_target)
801 <low_collect_ptrace_register>
802 <low_supply_ptrace_register>: Declare.
803 (mips_collect_ptrace_register): Turn into ...
804 (mips_target::low_collect_ptrace_register): ...this.
805 (mips_supply_ptrace_register): Turn into...
806 (mips_target::low_supply_ptrace_register): ...this.
807 (the_low_target): Remove the op fields.
808 * linux-ppc-low.cc (class ppc_target)
809 <low_collect_ptrace_register>
810 <low_supply_ptrace_register>: Declare.
811 (ppc_collect_ptrace_register): Turn into ...
812 (ppc_target::low_collect_ptrace_register): ...this.
813 (ppc_supply_ptrace_register): Turn into ...
814 (ppc_target::low_supply_ptrace_register): ...this.
815 (ppc_fill_gregset): Update for the calls to
816 low_collect_ptrace_register.
817 (the_low_target): Remove the op fields.
818 * linux-s390-low.cc (class s390_target)
819 <low_collect_ptrace_register>
820 <low_supply_ptrace_register>: Declare.
821 (s390_collect_ptrace_register): Turn into ...
822 (s390_target::low_collect_ptrace_register): ...this.
823 (s390_supply_ptrace_register): Turn into ...
824 (s390_target::low_supply_ptrace_register): ...this.
825 (s390_fill_gregset): Update for the calls to
826 low_collect_ptrace_register.
827 (the_low_target): Remove the op fields.
828
829 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
830
831 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
832 target ops into methods of linux_process_target.
833
834 * linux-low.h (struct linux_target_ops): Remove the ops.
835 (class linux_process_target) <check_stopped_by_watchpoint>
836 <low_stopped_by_watchpoint>
837 <low_stopped_data_address>: Declare.
838 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
839 (linux_process_target::check_stopped_by_watchpoint): ...this.
840 (linux_process_target::low_stopped_by_watchpoint): Define.
841 (linux_process_target::low_stopped_data_address): Define.
842 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
843 <low_stopped_data_address>: Declare.
844 (x86_stopped_by_watchpoint): Turn into...
845 (x86_target::low_stopped_by_watchpoint): ...this.
846 (x86_stopped_data_address): Turn into...
847 (x86_target::low_stopped_data_address): ...this.
848 (the_low_target): Remove the op fields.
849 * linux-aarch64-low.cc (class aarch64_target)
850 <low_stopped_by_watchpoint>
851 <low_stopped_data_address>: Declare.
852 (aarch64_stopped_by_watchpoint): Turn into...
853 (aarch64_target::low_stopped_by_watchpoint): ...this.
854 (aarch64_stopped_data_address): Turn into...
855 (aarch64_target::low_stopped_data_address): ...this.
856 (the_low_target): Remove the op fields.
857 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
858 <low_stopped_data_address>: Declare.
859 (arm_stopped_by_watchpoint): Turn into...
860 (arm_target::low_stopped_by_watchpoint): ...this.
861 (arm_stopped_data_address): Turn into...
862 (arm_target::low_stopped_data_address): ...this.
863 (the_low_target): Remove the op fields.
864 * linux-crisv32-low.cc (class crisv32_target)
865 <low_stopped_by_watchpoint>
866 <low_stopped_data_address>: Declare.
867 (cris_stopped_by_watchpoint): Turn into...
868 (crisv32_target::low_stopped_by_watchpoint): ...this.
869 (cris_stopped_data_address): Turn into...
870 (crisv32_target::low_stopped_data_address): ...this.
871 (the_low_target): Remove the op fields.
872 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
873 <low_stopped_data_address>: Declare.
874 (mips_stopped_by_watchpoint): Turn into...
875 (mips_target::low_stopped_by_watchpoint): ...this.
876 (mips_stopped_data_address): Turn into...
877 (mips_target::low_stopped_data_address): ...this.
878 (the_low_target): Remove the op fields.
879 * linux-bfin-low.cc (the_low_target): Remove the op fields.
880 * linux-m32r-low.cc (the_low_target): Ditto.
881 * linux-m68k-low.cc (the_low_target): Ditto.
882 * linux-ppc-low.cc (the_low_target): Ditto.
883 * linux-s390-low.cc (the_low_target): Ditto.
884 * linux-sh-low.cc (the_low_target): Ditto.
885 * linux-sparc-low.cc (the_low_target): Ditto.
886 * linux-tic6x-low.cc (the_low_target): Ditto.
887 * linux-tile-low.cc (the_low_target): Ditto.
888 * linux-xtensa-low.cc (the_low_target): Ditto.
889
890 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
891
892 Turn the 'insert_point' and 'remove_point' linux target ops into
893 methods of linux_process_target.
894
895 * linux-low.h (struct linux_target_ops): Remove the ops.
896 (class linux_process_target) <low_insert_point>
897 <low_remove_point>: Declare.
898 * linux-low.cc (linux_process_target::low_insert_point)
899 (linux_process_target::low_remove_point): Define.
900 (linux_process_target::insert_point)
901 (linux_process_target::remove_point): Update for calls to
902 low_insert_point and low_remove_point.
903 * linux-x86-low.cc (class x86_target) <low_insert_point>
904 <low_remove_point>: Declare.
905 (x86_insert_point): Turn into...
906 (x86_target::low_insert_point): ...this.
907 (x86_remove_point): Turn into...
908 (x86_target::low_remove_point): ...this.
909 (the_low_target): Remove the op fields.
910 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
911 <low_remove_point>: Declare.
912 (aarch64_insert_point): Turn into...
913 (aarch64_target::low_insert_point): ...this.
914 (aarch64_remove_point): Turn into...
915 (aarch64_target::low_remove_point): ...this.
916 (the_low_target): Remove the op fields.
917 * linux-arm-low.cc (class arm_target) <low_insert_point>
918 <low_remove_point>: Declare.
919 (arm_insert_point): Turn into...
920 (arm_target::low_insert_point): ...this.
921 (arm_remove_point): Turn into...
922 (arm_target::low_remove_point): ...this.
923 (the_low_target): Remove the op fields.
924 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
925 <low_remove_point>: Declare.
926 (crisv32_insert_point): Turn into...
927 (crisv32_target::low_insert_point): ...this.
928 (crisv32_remove_point): Turn into...
929 (crisv32_target::low_remove_point): ...this.
930 (the_low_target): Remove the op fields.
931 * linux-mips-low.cc (class mips_target) <low_insert_point>
932 <low_remove_point>: Declare.
933 (mips_insert_point): Turn into...
934 (mips_target::low_insert_point): ...this.
935 (mips_remove_point): Turn into...
936 (mips_target::low_remove_point): ...this.
937 (the_low_target): Remove the op fields.
938 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
939 <low_remove_point>: Declare.
940 (ppc_insert_point): Turn into...
941 (ppc_target::low_insert_point): ...this.
942 (ppc_remove_point): Turn into...
943 (ppc_target::low_remove_point): ...this.
944 (the_low_target): Remove the op fields.
945 * linux-bfin-low.cc (the_low_target): Remove the op fields.
946 * linux-m32r-low.cc (the_low_target): Ditto.
947 * linux-m68k-low.cc (the_low_target): Ditto.
948 * linux-s390-low.cc (the_low_target): Ditto.
949 * linux-sh-low.cc (the_low_target): Ditto.
950 * linux-sparc-low.cc (the_low_target): Ditto.
951 * linux-tic6x-low.cc (the_low_target): Ditto.
952 * linux-tile-low.cc (the_low_target): Ditto.
953 * linux-xtensa-low.cc (the_low_target): Ditto.
954
955 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
956
957 Remove the 'supports_z_point_type' linux target op and let the
958 concrete linux target define it by overriding the op declared in
959 process_stratum_target.
960
961 * linux-low.cc (linux_process_target::supports_z_point_type):
962 Remove.
963 * linux-low.h (struct linux_target_ops): Remove the op.
964 (class linux_process_target) <supports_z_point_type>: Remove.
965 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
966 Declare.
967 (x86_supports_z_point_type): Turn into...
968 (x86_target::supports_z_point_type): ...this.
969 (the_low_target): Remove the op field.
970 * linux-aarch64-low.cc (class aarch64_target)
971 <supports_z_point_type>: Declare.
972 (aarch64_supports_z_point_type): Turn into...
973 (aarch64_target::supports_z_point_type): ...this.
974 (the_low_target): Remove the op field.
975 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
976 Declare.
977 (arm_supports_z_point_type): Turn into...
978 (arm_target::supports_z_point_type): ...this.
979 (the_low_target): Remove the op field.
980 * linux-crisv32-low.cc (class crisv32_target)
981 <supports_z_point_type>: Declare.
982 (cris_supports_z_point_type): Turn into...
983 (crisv32_target::supports_z_point_type): ...this.
984 (the_low_target): Remove the op field.
985 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
986 Declare.
987 (mips_supports_z_point_type): Turn into...
988 (mips_target::supports_z_point_type): ...this.
989 (the_low_target): Remove the op field.
990 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
991 Declare.
992 (ppc_supports_z_point_type): Turn into...
993 (ppc_target::supports_z_point_type): ...this.
994 (the_low_target): Remove the op field.
995 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
996 Declare.
997 (s390_supports_z_point_type): Turn into...
998 (s390_target::supports_z_point_type): ...this.
999 (the_low_target): Remove the op field.
1000 * linux-bfin-low.cc (the_low_target): Remove the op field.
1001 * linux-m32r-low.cc (the_low_target): Ditto.
1002 * linux-m68k-low.cc (the_low_target): Ditto.
1003 * linux-sh-low.cc (the_low_target): Ditto.
1004 * linux-sparc-low.cc (the_low_target): Ditto.
1005 * linux-tic6x-low.cc (the_low_target): Ditto.
1006 * linux-tile-low.cc (the_low_target): Ditto.
1007 * linux-xtensa-low.cc (the_low_target): Ditto.
1008
1009 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1010
1011 Turn the 'breakpoint_at' linux target op into a method of
1012 linux_process_target.
1013
1014 * linux-low.h (struct linux_target_ops): Remove the op.
1015 (class linux_process_target) <low_breakpoint_at>: Declare.
1016
1017 Update the callers below:
1018
1019 * linux-low.cc (linux_process_target::save_stop_reason)
1020 (linux_process_target::thread_still_has_status_pending)
1021 (linux_process_target::wait_1)
1022
1023 * linux-x86-low.cc (class x86_target)
1024 <low_breakpoint_at>: Declare.
1025 (x86_breakpoint_at): Turn into...
1026 (x86_target::low_breakpoint_at): ...this.
1027 (the_low_target): Remove the op field.
1028 * linux-aarch64-low.cc (class aarch64_target)
1029 <low_breakpoint_at>: Declare.
1030 (aarch64_breakpoint_at): Turn into...
1031 (aarch64_target::low_breakpoint_at): ...this.
1032 (the_low_target): Remove the op field.
1033 * linux-arm-low.cc (class arm_target)
1034 <low_breakpoint_at>: Declare.
1035 (arm_target::low_breakpoint_at): Define.
1036 (the_low_target): Remove the op field.
1037 * linux-bfin-low.cc (class bfin_target)
1038 <low_breakpoint_at>: Declare.
1039 (bfin_breakpoint_at): Turn into...
1040 (bfin_target::low_breakpoint_at): ...this.
1041 (the_low_target): Remove the op field.
1042 * linux-cris-low.cc (class cris_target)
1043 <low_breakpoint_at>: Declare.
1044 (cris_breakpoint_at): Turn into...
1045 (cris_target::low_breakpoint_at): ...this.
1046 (the_low_target): Remove the op field.
1047 * linux-crisv32-low.cc (class crisv32_target)
1048 <low_breakpoint_at>: Declare.
1049 (crisv32_breakpoint_at): Turn into...
1050 (crisv32_target::low_breakpoint_at): ...this.
1051 (the_low_target): Remove the op field.
1052 * linux-ia64-low.cc (class ia64_target)
1053 <low_breakpoint_at>: Declare.
1054 (ia64_target::low_breakpoint_at): Define.
1055 * linux-m32r-low.cc (class m32r_target)
1056 <low_breakpoint_at>: Declare.
1057 (m32r_breakpoint_at): Turn into...
1058 (m32r_target::low_breakpoint_at): ...this.
1059 (the_low_target): Remove the op field.
1060 * linux-m68k-low.cc (class m68k_target)
1061 <low_breakpoint_at>: Declare.
1062 (m68k_breakpoint_at): Turn into...
1063 (m68k_target::low_breakpoint_at): ...this.
1064 (the_low_target): Remove the op field.
1065 * linux-mips-low.cc (class mips_target)
1066 <low_breakpoint_at>: Declare.
1067 (mips_breakpoint_at): Turn into...
1068 (mips_target::low_breakpoint_at): ...this.
1069 (the_low_target): Remove the op field.
1070 * linux-nios2-low.cc (class nios2_target)
1071 <low_breakpoint_at>: Declare.
1072 (nios2_breakpoint_at): Turn into...
1073 (nios2_target::low_breakpoint_at): ...this.
1074 (the_low_target): Remove the op field.
1075 * linux-ppc-low.cc (class ppc_target)
1076 <low_breakpoint_at>: Declare.
1077 (ppc_breakpoint_at): Turn into...
1078 (ppc_target::low_breakpoint_at): ...this.
1079 (the_low_target): Remove the op field.
1080 * linux-riscv-low.cc (class riscv_target)
1081 <low_breakpoint_at>: Declare.
1082 (riscv_breakpoint_at): Turn into...
1083 (riscv_target::low_breakpoint_at): ...this.
1084 (the_low_target): Remove the op field.
1085 * linux-s390-low.cc (class s390_target)
1086 <low_breakpoint_at>: Declare.
1087 (s390_breakpoint_at): Turn into...
1088 (s390_target::low_breakpoint_at): ...this.
1089 (the_low_target): Remove the op field.
1090 * linux-sh-low.cc (class sh_target)
1091 <low_breakpoint_at>: Declare.
1092 (sh_breakpoint_at): Turn into...
1093 (sh_target::low_breakpoint_at): ...this.
1094 (the_low_target): Remove the op field.
1095 * linux-sparc-low.cc (class sparc_target)
1096 <low_breakpoint_at>: Declare.
1097 (sparc_breakpoint_at): Turn into...
1098 (sparc_target::low_breakpoint_at): ...this.
1099 (the_low_target): Remove the op field.
1100 * linux-tic6x-low.cc (class tic6x_target)
1101 <low_breakpoint_at>: Declare.
1102 (tic6x_breakpoint_at): Turn into...
1103 (tic6x_target::low_breakpoint_at): ...this.
1104 (the_low_target): Remove the op field.
1105 * linux-tile-low.cc (class tile_target)
1106 <low_breakpoint_at>: Declare.
1107 (tile_breakpoint_at): Turn into...
1108 (tile_target::low_breakpoint_at): ...this.
1109 (the_low_target): Remove the op field.
1110 * linux-xtensa-low.cc (class xtensa_target)
1111 <low_breakpoint_at>: Declare.
1112 (xtensa_breakpoint_at): Turn into...
1113 (xtensa_target::low_breakpoint_at): ...this.
1114 (the_low_target): Remove the op field.
1115
1116 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1117
1118 Turn the 'decr_pc_after_break' linux_target_ops field into
1119 a method of linux_process_target.
1120
1121 * linux-low.h (struct linux_target_ops)
1122 <decr_pc_after_break>: Remove.
1123 (class linux_process_target) <low_decr_pc_after_break>: New method
1124 declaration.
1125 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1126 New method implementation.
1127
1128 Update the users below.
1129
1130 (linux_process_target::save_stop_reason)
1131 (linux_process_target::wait_1)
1132 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1133 New declaration.
1134 (x86_target::low_decr_pc_after_break): New method implementation.
1135 (the_low_target): Remove the field.
1136 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1137 New declaration.
1138 (bfin_target::low_decr_pc_after_break): New method implementation.
1139 (the_low_target): Remove the field.
1140 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1141 New declaration.
1142 (m68k_target::low_decr_pc_after_break): New method implementation.
1143 (the_low_target): Remove the field.
1144 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1145 New declaration.
1146 (s390_target::low_decr_pc_after_break): New method implementation.
1147 (the_low_target): Remove the field.
1148 * linux-aarch64-low.cc (the_low_target): Remove the field.
1149 * linux-arm-low.cc (the_low_target): Remove the field.
1150 * linux-cris-low.cc (the_low_target): Remove the field.
1151 * linux-crisv32-low.cc (the_low_target): Remove the field.
1152 * linux-m32r-low.cc (the_low_target): Remove the field.
1153 * linux-mips-low.cc (the_low_target): Remove the field.
1154 * linux-nios2-low.cc (the_low_target): Remove the field.
1155 * linux-ppc-low.cc (the_low_target): Remove the field.
1156 * linux-riscv-low.cc (the_low_target): Remove the field.
1157 * linux-sh-low.cc (the_low_target): Remove the field.
1158 * linux-sparc-low.cc (the_low_target): Remove the field.
1159 * linux-tic6x-low.cc (the_low_target): Remove the field.
1160 * linux-tile-low.cc (the_low_target): Remove the field.
1161 * linux-xtensa-low.cc (the_low_target): Remove the field.
1162
1163 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1164
1165 Remove the 'supports_software_single_step' linux target op and let
1166 the concrete linux target define it by overriding the op in
1167 process_stratum_target.
1168 Turn the 'get_next_pcs' linux target op into a method of
1169 linux_process_target.
1170
1171 * linux-low.h (struct linux_target_ops): Remove the ops.
1172 (class linux_process_target) <supports_software_single_step>:
1173 Remove.
1174 <low_get_next_pcs>: Declare.
1175 * linux-low.cc (can_software_single_step): Remove.
1176 (linux_process_target::low_get_next_pcs): Define.
1177 (linux_process_target::supports_software_single_step): Remove.
1178
1179 Update the callers below.
1180
1181 (linux_process_target::handle_extended_wait)
1182 (linux_process_target::wait_1)
1183 (linux_process_target::install_software_single_step_breakpoints)
1184 (linux_process_target::single_step)
1185 (linux_process_target::thread_needs_step_over)
1186 (linux_process_target::proceed_one_lwp)
1187 (linux_process_target::supports_range_stepping)
1188
1189 * linux-x86-low.cc (the_low_target): Remove the op field.
1190 * linux-aarch64-low.cc (the_low_target): Ditto.
1191 * linux-bfin-low.cc (the_low_target): Ditto.
1192 * linux-cris-low.cc (the_low_target): Ditto.
1193 * linux-crisv32-low.cc (the_low_target): Ditto.
1194 * linux-m32r-low.cc (the_low_target): Ditto.
1195 * linux-m68k-low.cc (the_low_target): Ditto.
1196 * linux-mips-low.cc (the_low_target): Ditto.
1197 * linux-nios2-low.cc (the_low_target): Ditto.
1198 * linux-ppc-low.cc (the_low_target): Ditto.
1199 * linux-riscv-low.cc (the_low_target): Ditto.
1200 * linux-s390-low.cc (the_low_target): Ditto.
1201 * linux-sh-low.cc (the_low_target): Ditto.
1202 * linux-sparc-low.cc (the_low_target): Ditto.
1203 * linux-tic6x-low.cc (the_low_target): Ditto.
1204 * linux-tile-low.cc (the_low_target): Ditto.
1205 * linux-xtensa-low.cc (the_low_target): Ditto.
1206 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1207 <supports_software_single_step>: Declare.
1208 (arm_target::supports_software_single_step): Define.
1209 (arm_gdbserver_get_next_pcs): Turn into...
1210 (arm_target::low_get_next_pcs): ...this.
1211 (the_low_target): Remove the op field.
1212
1213 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1214
1215 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1216 the concrete linux target define it by overriding the op
1217 in process_stratum_target.
1218
1219 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1220 Remove.
1221 * linux-low.h (struct linux_target_ops): Remove the op.
1222 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1223 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1224 Declare.
1225 (x86_sw_breakpoint_from_kind): Turn into...
1226 (x86_target::sw_breakpoint_from_kind): ...this.
1227 (the_low_target): Remove the op field.
1228 * linux-aarch64-low.cc (class aarch64_target)
1229 <sw_breakpoint_from_kind>: Declare.
1230 (aarch64_sw_breakpoint_from_kind): Turn into...
1231 (aarch64_target::sw_breakpoint_from_kind): ...this.
1232 (the_low_target): Remove the op field.
1233 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1234 Declare.
1235 (arm_target::sw_breakpoint_from_kind): Define.
1236 (the_low_target): Remove the op field.
1237 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1238 Declare.
1239 (bfin_sw_breakpoint_from_kind): Turn into...
1240 (bfin_target::sw_breakpoint_from_kind): ...this.
1241 (the_low_target): Remove the op field.
1242 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1243 Declare.
1244 (cris_sw_breakpoint_from_kind): Turn into...
1245 (cris_target::sw_breakpoint_from_kind): ...this.
1246 (the_low_target): Remove the op field.
1247 * linux-crisv32-low.cc (class crisv32_target)
1248 <sw_breakpoint_from_kind>: Declare.
1249 (cris_sw_breakpoint_from_kind): Turn into...
1250 (crisv32_target::sw_breakpoint_from_kind): ...this.
1251 (the_low_target): Remove the op field.
1252 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1253 Declare.
1254 (ia64_target::sw_breakpoint_from_kind): Define.
1255 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1256 Declare.
1257 (m32r_sw_breakpoint_from_kind): Turn into...
1258 (m32r_target::sw_breakpoint_from_kind): ...this.
1259 (the_low_target): Remove the op field.
1260 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1261 Declare.
1262 (m68k_sw_breakpoint_from_kind): Turn into...
1263 (m68k_target::sw_breakpoint_from_kind): ...this.
1264 (the_low_target): Remove the op field.
1265 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1266 Declare.
1267 (mips_sw_breakpoint_from_kind): Turn into...
1268 (mips_target::sw_breakpoint_from_kind): ...this.
1269 (the_low_target): Remove the op field.
1270 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1271 Declare.
1272 (nios2_sw_breakpoint_from_kind): Turn into...
1273 (nios2_target::sw_breakpoint_from_kind): ...this.
1274 (the_low_target): Remove the op field.
1275 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1276 Declare.
1277 (ppc_sw_breakpoint_from_kind): Turn into...
1278 (ppc_target::sw_breakpoint_from_kind): ...this.
1279 (the_low_target): Remove the op field.
1280 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1281 Declare.
1282 (riscv_sw_breakpoint_from_kind): Turn into...
1283 (riscv_target::sw_breakpoint_from_kind): ...this.
1284 (the_low_target): Remove the op field.
1285 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1286 Declare.
1287 (s390_sw_breakpoint_from_kind): Turn into...
1288 (s390_target::sw_breakpoint_from_kind): ...this.
1289 (the_low_target): Remove the op field.
1290 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1291 Declare.
1292 (sh_sw_breakpoint_from_kind): Turn into...
1293 (sh_target::sw_breakpoint_from_kind): ...this.
1294 (the_low_target): Remove the op field.
1295 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1296 Declare.
1297 (sparc_sw_breakpoint_from_kind): Turn into...
1298 (sparc_target::sw_breakpoint_from_kind): ...this.
1299 (the_low_target): Remove the op field.
1300 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1301 Declare.
1302 (tic6x_sw_breakpoint_from_kind): Turn into...
1303 (tic6x_target::sw_breakpoint_from_kind): ...this.
1304 (the_low_target): Remove the op field.
1305 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1306 Declare.
1307 (tile_sw_breakpoint_from_kind): Turn into...
1308 (tile_target::sw_breakpoint_from_kind): ...this.
1309 (the_low_target): Remove the op field.
1310 * linux-xtensa-low.cc (class xtensa_target)
1311 <sw_breakpoint_from_kind>: Declare.
1312 (xtensa_sw_breakpoint_from_kind): Turn into...
1313 (xtensa_target::sw_breakpoint_from_kind): ...this.
1314 (the_low_target): Remove the op field.
1315
1316 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1317
1318 Remove the 'breakpoint_kind_from_pc' and
1319 'breakpoint_kind_from_current_state' linux target ops, and let the
1320 concrete linux target define them by overriding the ops of
1321 process_stratum_target.
1322
1323 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1324 Remove.
1325 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1326 * linux-low.h (struct linux_target_ops): Remove ops.
1327 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1328 <breakpoint_kind_from_current_state>: Remove.
1329 * linux-x86-low.cc (the_low_target): Remove the op fields.
1330 * linux-bfin-low.cc (the_low_target): Ditto.
1331 * linux-cris-low.cc (the_low_target): Ditto.
1332 * linux-crisv32-low.cc (the_low_target): Ditto.
1333 * linux-m32r-low.cc (the_low_target): Ditto.
1334 * linux-m68k-low.cc (the_low_target): Ditto.
1335 * linux-mips-low.cc (the_low_target): Ditto.
1336 * linux-nios2-low.cc (the_low_target): Ditto.
1337 * linux-ppc-low.cc (the_low_target): Ditto.
1338 * linux-s390-low.cc (the_low_target): Ditto.
1339 * linux-sh-low.cc (the_low_target): Ditto.
1340 * linux-sparc-low.cc (the_low_target): Ditto.
1341 * linux-tic6x-low.cc (the_low_target): Ditto.
1342 * linux-tile-low.cc (the_low_target): Ditto.
1343 * linux-xtensa-low.cc (the_low_target): Ditto.
1344 * linux-aarch64-low.cc (class aarch64_target)
1345 <breakpoint_kind_from_pc>
1346 <breakpoint_kind_from_current_state>: Declare.
1347 (aarch64_breakpoint_kind_from_pc): Turn into...
1348 (aarch64_target::breakpoint_kind_from_pc): ...this.
1349 (aarch64_breakpoint_kind_from_current_state): Turn into...
1350 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1351 (the_low_target): Remove the op fields.
1352 * linux-arm-low.cc (class arm_target):
1353 <breakpoint_kind_from_pc>
1354 <breakpoint_kind_from_current_state>: Declare.
1355 (arm_target::breakpoint_kind_from_pc): Define.
1356 (arm_target::breakpoint_kind_from_current_state): Define.
1357 (the_low_target): Remove the op fields.
1358 * linux-riscv-low.cc (class riscv_target):
1359 <breakpoint_kind_from_pc>: Declare.
1360 (riscv_breakpoint_kind_from_pc): Turn into...
1361 (riscv_target::breakpoint_kind_from_pc): ...this.
1362 (the_low_target): Remove the op fields.
1363
1364 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1365
1366 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1367 of linux_process_target.
1368
1369 * linux-low.h (struct linux_target_ops): Remove the ops.
1370 (class linux_process_target) <low_supports_breakpoints>
1371 <low_get_pc>
1372 <low_set_pc>: Declare.
1373 * linux-low.cc (supports_breakpoints): Turn into...
1374 (linux_process_target::low_supports_breakpoints): ...this.
1375 (linux_process_target::low_get_pc): Define.
1376 (linux_process_target::low_set_pc): Define.
1377
1378 Update the callers below.
1379
1380 (linux_process_target::get_pc)
1381 (linux_process_target::save_stop_reason)
1382 (linux_process_target::maybe_move_out_of_jump_pad)
1383 (linux_process_target::wait_1)
1384 (linux_process_target::resume_one_lwp_throw)
1385 (linux_process_target::resume)
1386 (linux_process_target::proceed_all_lwps)
1387 (linux_process_target::read_pc)
1388 (linux_process_target::write_pc)
1389
1390 * linux-x86-low.cc (class linux_process_target)
1391 <low_supports_breakpoints>
1392 <low_get_pc>
1393 <low_set_pc>: Declare.
1394 (x86_target::low_supports_breakpoints): Define.
1395 (x86_get_pc): Turn into...
1396 (x86_target::low_get_pc): ...this.
1397 (x86_set_pc): Turn into...
1398 (x86_target::low_set_pc): ...this.
1399 (the_low_target): Remove the op fields.
1400 * linux-arm-low.cc (class arm_target)
1401 <low_supports_breakpoints>
1402 <low_get_pc>
1403 <low_set_pc>: Declare.
1404 (arm_target::low_supports_breakpoints)
1405 (arm_target::low_get_pc)
1406 (arm_target::low_set_pc): Define.
1407 (the_low_target): Remove the op fields.
1408 * linux-bfin-low.cc (class bfin_target)
1409 <low_supports_breakpoints>
1410 <low_get_pc>
1411 <low_set_pc>: Declare.
1412 (bfin_target::low_supports_breakpoints)
1413 (bfin_target::low_get_pc)
1414 (bfin_target::low_set_pc): Define.
1415 (the_low_target): Remove the op fields.
1416 * linux-cris-low.cc (class cris_target)
1417 <low_supports_breakpoints>
1418 <low_get_pc>
1419 <low_set_pc>: Declare.
1420 (cris_target::low_supports_breakpoints)
1421 (cris_target::low_get_pc)
1422 (cris_target::low_set_pc): Define.
1423 (the_low_target): Remove the op fields.
1424 * linux-crisv32-low.cc (class crisv32_target)
1425 <low_supports_breakpoints>
1426 <low_get_pc>
1427 <low_set_pc>: Declare.
1428 (crisv32_target::low_supports_breakpoints)
1429 (crisv32_target::low_get_pc)
1430 (crisv32_target::low_set_pc): Define.
1431 (the_low_target): Remove the op fields.
1432 * linux-m32r-low.cc (class m32r_target)
1433 <low_supports_breakpoints>
1434 <low_get_pc>
1435 <low_set_pc>: Declare.
1436 (m32r_target::low_supports_breakpoints)
1437 (m32r_target::low_get_pc)
1438 (m32r_target::low_set_pc): Define.
1439 (the_low_target): Remove the op fields.
1440 * linux-m68k-low.cc (class m68k_target)
1441 <low_supports_breakpoints>
1442 <low_get_pc>
1443 <low_set_pc>: Declare.
1444 (m68k_target::low_supports_breakpoints)
1445 (m68k_target::low_get_pc)
1446 (m68k_target::low_set_pc): Define.
1447 (the_low_target): Remove the op fields.
1448 * linux-nios2-low.cc (class nios2_target)
1449 <low_supports_breakpoints>
1450 <low_get_pc>
1451 <low_set_pc>: Declare.
1452 (nios2_target::low_supports_breakpoints)
1453 (nios2_target::low_get_pc)
1454 (nios2_target::low_set_pc): Define.
1455 (the_low_target): Remove the op fields.
1456 * linux-sh-low.cc (class sh_target)
1457 <low_supports_breakpoints>
1458 <low_get_pc>
1459 <low_set_pc>: Declare.
1460 (sh_target::low_supports_breakpoints)
1461 (sh_target::low_get_pc)
1462 (sh_target::low_set_pc): Define.
1463 (the_low_target): Remove the op fields.
1464 * linux-xtensa-low.cc (class xtensa_target)
1465 <low_supports_breakpoints>
1466 <low_get_pc>
1467 <low_set_pc>: Declare.
1468 (xtensa_target::low_supports_breakpoints)
1469 (xtensa_target::low_get_pc)
1470 (xtensa_target::low_set_pc): Define.
1471 (the_low_target): Remove the op fields.
1472 * linux-sparc-low.cc (class sparc_target)
1473 <low_supports_breakpoints>
1474 <low_get_pc>: Declare.
1475 (sparc_target::low_supports_breakpoints)
1476 (sparc_target::low_get_pc): Define.
1477 (the_low_target): Remove the op fields.
1478 * linux-tile-low.cc (class tile_target)
1479 <low_supports_breakpoints>
1480 <low_get_pc>
1481 <low_set_pc>: Declare.
1482 (tile_target::low_supports_breakpoints)
1483 (tile_target::low_get_pc)
1484 (tile_target::low_set_pc): Define.
1485 (the_low_target): Remove the op fields.
1486 * linux-aarch64-low.cc (class aarch64_target)
1487 <low_supports_breakpoints>
1488 <low_get_pc>
1489 <low_set_pc>: Declare.
1490 (aarch64_target::low_supports_breakpoints): Define.
1491 (aarch64_get_pc): Turn into...
1492 (aarch64_target::low_get_pc): ...this.
1493 (aarch64_set_pc): Turn into...
1494 (aarch64_target::low_set_pc): ...this.
1495 (the_low_target): Remove the op fields.
1496 * linux-mips-low.cc (class mips_target)
1497 <low_supports_breakpoints>
1498 <low_get_pc>
1499 <low_set_pc>: Declare.
1500 (mips_target::low_supports_breakpoints): Define.
1501 (mips_get_pc): Turn into...
1502 (mips_target::low_get_pc): ...this.
1503 (mips_set_pc): Turn into...
1504 (mips_target::low_set_pc): ...this.
1505 (the_low_target): Remove the op fields.
1506 * linux-ppc-low.cc (class ppc_target)
1507 <low_supports_breakpoints>
1508 <low_get_pc>
1509 <low_set_pc>: Declare.
1510 (ppc_target::low_supports_breakpoints): Define.
1511 (ppc_get_pc): Turn into...
1512 (ppc_target::low_get_pc): ...this.
1513 (ppc_set_pc): Turn into...
1514 (ppc_target::low_set_pc): ...this.
1515 (the_low_target): Remove the op fields.
1516 * linux-riscv-low.cc (class riscv_target)
1517 <low_supports_breakpoints>
1518 <low_get_pc>
1519 <low_set_pc>: Declare.
1520 (riscv_target::low_supports_breakpoints): Define.
1521 (riscv_get_pc): Turn into...
1522 (riscv_target::low_get_pc): ...this.
1523 (riscv_set_pc): Turn into...
1524 (riscv_target::low_set_pc): ...this.
1525 (the_low_target): Remove the op fields.
1526 * linux-s390-low.cc (class s390_target)
1527 <low_supports_breakpoints>
1528 <low_get_pc>
1529 <low_set_pc>: Declare.
1530 (s390_target::low_supports_breakpoints): Define.
1531 (s390_get_pc): Turn into...
1532 (s390_target::low_get_pc): ...this.
1533 (s390_set_pc): Turn into...
1534 (s390_target::low_set_pc): ...this.
1535 (the_low_target): Remove the op fields.
1536 * linux-tic6x-low.cc (class tic6x_target)
1537 <low_supports_breakpoints>
1538 <low_get_pc>
1539 <low_set_pc>: Declare.
1540 (tic6x_target::low_supports_breakpoints): Define.
1541 (tic6x_get_pc): Turn into...
1542 (tic6x_target::low_get_pc): ...this.
1543 (tic6x_set_pc): Turn into...
1544 (tic6x_target::low_set_pc): ...this.
1545 (the_low_target): Remove the op fields.
1546
1547 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1548
1549 Turn some more static methods in linux-low into private methods
1550 of linux_process_target.
1551
1552 * linux-low.cc (get_pc): Turn into...
1553 (linux_process_target::get_pc): ...this.
1554 (save_stop_reason): Turn into...
1555 (linux_process_target::save_stop_reason): ...this.
1556 (thread_still_has_status_pending_p): Turn into...
1557 (linux_process_target::thread_still_has_status_pending): ...this.
1558 (status_pending_p_callback): Turn into...
1559 (linux_process_target::status_pending_p_callback): ...this.
1560 (resume_stopped_resumed_lwps): Turn into...
1561 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1562 (install_software_single_step_breakpoints): Turn into...
1563 (linux_process_target::install_software_single_step_breakpoints):
1564 ...this.
1565 (single_step): Turn into...
1566 (linux_process_target::single_step): ...this.
1567 (linux_resume_one_lwp_throw): Turn into...
1568 (linux_process_target::resume_one_lwp_throw): ...this.
1569 (linux_resume_one_lwp): Turn into...
1570 (linux_process_target::resume_one_lwp): ...this.
1571 (resume_status_pending_p): Turn into...
1572 (linux_process_target::resume_status_pending): ...this.
1573 (need_step_over_p): Turn into...
1574 (linux_process_target::thread_needs_step_over): ...this.
1575 (linux_resume_one_thread): Turn into...
1576 (linux_process_target::resume_one_thread): ...this.
1577 (proceed_one_lwp): Turn into...
1578 (linux_process_target::proceed_one_lwp): ...this.
1579 (unsuspend_and_proceed_one_lwp): Turn into...
1580 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1581
1582 Update the calls/references to the above functions below.
1583
1584 (linux_process_target::handle_extended_wait)
1585 (linux_process_target::filter_event)
1586 (linux_process_target::wait_for_event_filtered)
1587 (linux_process_target::wait_1)
1588 (linux_process_target::move_out_of_jump_pad)
1589 (linux_process_target::start_step_over)
1590 (linux_process_target::resume)
1591 (linux_process_target::proceed_all_lwps)
1592 (regsets_store_inferior_registers)
1593 (linux_process_target::store_register)
1594
1595 * linux-low.h (class linux_process_target)
1596 <get_pc>
1597 <save_stop_reason>
1598 <thread_still_has_status_pending>
1599 <status_pending_p_callback>
1600 <resume_stopped_resumed_lwps>
1601 <install_software_single_step_breakpoints>
1602 <single_step>
1603 <resume_one_lwp_throw>
1604 <resume_one_lwp>
1605 <resume_status_pending>
1606 <thread_needs_step_over>
1607 <resume_one_thread>
1608 <proceed_one_lwp>
1609 <unsuspend_and_proceed_one_lwp>: Declare.
1610
1611 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1612
1613 Turn the 'fetch_register' linux target op into a method of
1614 linux_process_target.
1615
1616 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1617 (class linux_process_target) <low_fetch_register>: Declare.
1618 * linux-x86-low.cc (the_low_target)
1619 * linux-aarch64-low.cc (the_low_target)
1620 * linux-arm-low.cc (the_low_target)
1621 * linux-bfin-low.cc (the_low_target)
1622 * linux-cris-low.cc (the_low_target)
1623 * linux-crisv32-low.cc (the_low_target)
1624 * linux-m32r-low.cc (the_low_target)
1625 * linux-m68k-low.cc (the_low_target)
1626 * linux-nios2-low.cc (the_low_target)
1627 * linux-ppc-low.cc (the_low_target)
1628 * linux-s390-low.cc (the_low_target)
1629 * linux-sh-low.cc (the_low_target)
1630 * linux-sparc-low.cc (the_low_target)
1631 * linux-tic6x-low.cc (the_low_target)
1632 * linux-tile-low.cc (the_low_target)
1633 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1634 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1635 Declare.
1636 (ia64_fetch_register): Turn into...
1637 (ia64_target::low_fetch_register): ...this.
1638 (the_low_target): Remove the op field.
1639 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1640 Declare.
1641 (mips_fetch_register): Turn into...
1642 (mips_target::low_fetch_register): ...this.
1643 (the_low_target): Remove the op field.
1644 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1645 Declare.
1646 (riscv_fetch_register): Turn into...
1647 (riscv_target::low_fetch_register): ...this.
1648 (the_low_target): Remove the op field.
1649
1650 Update the callers below.
1651
1652 * linux-low.cc (linux_process_target::fetch_registers)
1653 (linux_process_target::low_fetch_register)
1654
1655 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1656
1657 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1658 linux target ops into methods of linux_process_target.
1659
1660 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1661 (class linux_process_target) <fetch_register>
1662 <store_register>
1663 <usr_fetch_inferior_registers>
1664 <usr_store_inferior_registers>
1665 <low_cannot_fetch_register>
1666 <low_cannot_fetch_register> Declare.
1667 * linux-low.cc (fetch_register): Turn into...
1668 (linux_process_target::fetch_register): ...this.
1669 (store_register): Turn into ...
1670 (linux_process_target::store_register): ...this.
1671 (usr_fetch_inferior_registers): Turn into...
1672 (linux_process_target::usr_fetch_inferior_registers): ...this.
1673 (usr_store_inferior_registers): Turn into...
1674 (linux_process_target::usr_store_inferior_registers): ...this.
1675 * linux-x86-low.cc (class x86_target)
1676 <low_cannot_fetch_register>
1677 <low_cannot_store_register>: Declare.
1678 (x86_cannot_store_register): Turn into...
1679 (x86_target::low_cannot_store_register): ...this.
1680 (x86_cannot_fetch_register): Turn into...
1681 (x86_target::low_cannot_fetch_register): ...this.
1682 (the_low_target): Remove the target op fields.
1683 * linux-aarch64-low.cc (class aarch64_target)
1684 <low_cannot_fetch_register>
1685 <low_cannot_store_register>: Declare.
1686 (aarch64_target::low_cannot_fetch_register)
1687 (aarch64_target::low_cannot_store_register): Define.
1688 (the_low_target): Remove the op fields.
1689 * linux-arm-low.cc (class arm_target)
1690 <low_cannot_fetch_register>
1691 <low_cannot_store_register>: Declare.
1692 (arm_cannot_fetch_register): Turn into...
1693 (arm_target::low_cannot_fetch_register): ...this.
1694 (arm_cannot_store_register): Turn into...
1695 (arm_target::low_cannot_store_register): ...this.
1696 (the_low_target): Remove the op fields.
1697 * linux-bfin-low.cc (class bfin_target)
1698 <low_cannot_fetch_register>
1699 <low_cannot_store_register>: Declare.
1700 (bfin_cannot_fetch_register): Turn into...
1701 (bfin_target::low_cannot_fetch_register): ...this.
1702 (bfin_cannot_store_register): Turn into...
1703 (bfin_target::low_cannot_store_register): ...this.
1704 (the_low_target): Remove the op fields.
1705 * linux-cris-low.cc (class cris_target)
1706 <low_cannot_fetch_register>
1707 <low_cannot_store_register>: Declare.
1708 (cris_cannot_fetch_register): Turn into...
1709 (cris_target::low_cannot_fetch_register): ...this.
1710 (cris_cannot_store_register): Turn into...
1711 (cris_target::low_cannot_store_register): ...this.
1712 (the_low_target): Remove the op fields.
1713 * linux-crisv32-low.cc (class crisv32_target)
1714 <low_cannot_fetch_register>
1715 <low_cannot_store_register>: Declare.
1716 (crisv32_target::low_cannot_fetch_register)
1717 (crisv32_target::low_cannot_store_register): Define.
1718 (the_low_target): Remove the op fields.
1719 * linux-ia64-low.cc (class ia64_target)
1720 <low_cannot_fetch_register>
1721 <low_cannot_store_register>: Declare.
1722 (ia64_cannot_fetch_register): Turn into...
1723 (ia64_target::low_cannot_fetch_register): ...this.
1724 (ia64_cannot_store_register): Turn into...
1725 (ia64_target::low_cannot_store_register): ...this.
1726 (the_low_target): Remove the op fields.
1727 * linux-m32r-low.cc (class m32r_target)
1728 <low_cannot_fetch_register>
1729 <low_cannot_store_register>: Declare.
1730 (m32r_cannot_fetch_register): Turn into...
1731 (m32r_target::low_cannot_fetch_register): ...this.
1732 (m32r_cannot_store_register): Turn into...
1733 (m32r_target::low_cannot_store_register): ...this.
1734 (the_low_target): Remove the op fields.
1735 * linux-m68k-low.cc (class m68k_target)
1736 <low_cannot_fetch_register>
1737 <low_cannot_store_register>: Declare.
1738 (m68k_cannot_fetch_register): Turn into...
1739 (m68k_target::low_cannot_fetch_register): ...this.
1740 (m68k_cannot_store_register): Turn into...
1741 (m68k_target::low_cannot_store_register): ...this.
1742 (the_low_target): Remove the op fields.
1743 * linux-mips-low.cc (class mips_target)
1744 <low_cannot_fetch_register>
1745 <low_cannot_store_register>: Declare.
1746 (mips_cannot_fetch_register): Turn into...
1747 (mips_target::low_cannot_fetch_register): ...this.
1748 (mips_cannot_store_register): Turn into...
1749 (mips_target::low_cannot_store_register): ...this.
1750 (get_usrregs_info): Inline at the call sites in
1751 low_cannot_fetch_register and low_cannot_store_register,
1752 and remove.
1753 (the_low_target): Remove the op fields.
1754 * linux-nios2-low.cc (class nios2_target)
1755 <low_cannot_fetch_register>
1756 <low_cannot_store_register>: Declare.
1757 (nios2_cannot_fetch_register): Turn into...
1758 (nios2_target::low_cannot_fetch_register): ...this.
1759 (nios2_cannot_store_register): Turn into...
1760 (nios2_target::low_cannot_store_register): ...this.
1761 (the_low_target): Remove the op fields.
1762 * linux-ppc-low.cc (class ppc_target)
1763 <low_cannot_fetch_register>
1764 <low_cannot_store_register>: Declare.
1765 (ppc_cannot_fetch_register): Turn into...
1766 (ppc_target::low_cannot_fetch_register): ...this.
1767 (ppc_cannot_store_register): Turn into...
1768 (ppc_target::low_cannot_store_register): ...this.
1769 (the_low_target): Remove the op fields.
1770 * linux-riscv-low.cc (class riscv_target)
1771 <low_cannot_fetch_register>
1772 <low_cannot_store_register>: Declare.
1773 (riscv_target::low_cannot_fetch_register)
1774 (riscv_target::low_cannot_store_register): Define.
1775 (the_low_target): Remove the op fields.
1776 * linux-s390-low.cc (class s390_target)
1777 <low_cannot_fetch_register>
1778 <low_cannot_store_register>: Declare.
1779 (s390_cannot_fetch_register): Turn into...
1780 (s390_target::low_cannot_fetch_register): ...this.
1781 (s390_cannot_store_register): Turn into...
1782 (s390_target::low_cannot_store_register): ...this.
1783 (the_low_target): Remove the op fields.
1784 * linux-sh-low.cc (class sh_target)
1785 <low_cannot_fetch_register>
1786 <low_cannot_store_register>: Declare.
1787 (sh_cannot_fetch_register): Turn into...
1788 (sh_target::low_cannot_fetch_register): ...this.
1789 (sh_cannot_store_register): Turn into...
1790 (sh_target::low_cannot_store_register): ...this.
1791 (the_low_target): Remove the op fields.
1792 * linux-sparc-low.cc (class sparc_target)
1793 <low_cannot_fetch_register>
1794 <low_cannot_store_register>: Declare.
1795 (sparc_cannot_fetch_register): Turn into...
1796 (sparc_target::low_cannot_fetch_register): ...this.
1797 (sparc_cannot_store_register): Turn into...
1798 (sparc_target::low_cannot_store_register): ...this.
1799 (the_low_target): Remove the op fields.
1800 * linux-tic6x-low.cc (class tic6x_target)
1801 <low_cannot_fetch_register>
1802 <low_cannot_store_register>: Declare.
1803 (tic6x_cannot_fetch_register): Turn into...
1804 (tic6x_target::low_cannot_fetch_register): ...this.
1805 (tic6x_cannot_store_register): Turn into...
1806 (tic6x_target::low_cannot_store_register): ...this.
1807 (the_low_target): Remove the op fields.
1808 * linux-tile-low.cc (class tile_target)
1809 <low_cannot_fetch_register>
1810 <low_cannot_store_register>: Declare.
1811 (tile_cannot_fetch_register): Turn into...
1812 (tile_target::low_cannot_fetch_register): ...this.
1813 (tile_cannot_store_register): Turn into...
1814 (tile_target::low_cannot_store_register): ...this.
1815 (the_low_target): Remove the op fields.
1816 * linux-xtensa-low.cc (class xtensa_target)
1817 <low_cannot_fetch_register>
1818 <low_cannot_store_register>: Declare.
1819 (xtensa_target::low_cannot_fetch_register)
1820 (xtensa_target::low_cannot_store_register): Define.
1821 (the_low_target): Remove the op fields.
1822
1823 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1824
1825 Turn the 'regs_info' linux target op into a method of
1826 linux_process_target.
1827
1828 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1829 (class linux_process_target) <get_regs_info>: Define.
1830
1831 Update the callers below.
1832
1833 * linux-low.cc (linux_process_target::fetch_registers)
1834 (linux_process_target::store_registers)
1835 * proc-service.cc (gregset_info)
1836
1837 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1838 (x86_linux_regs_info): Turn into ...
1839 (x86_target::get_regs_info): ...this.
1840 (the_low_target): Remove the op field.
1841 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1842 Declare.
1843 (aarch64_regs_info): Turn into ...
1844 (aarch64_target::get_regs_info): ...this.
1845 (the_low_target): Remove the op field.
1846 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1847 (arm_regs_info): Turn into ...
1848 (arm_target::get_regs_info): ...this.
1849 (the_low_target): Remove the op field.
1850 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1851 (bfin_regs_info): Turn into ...
1852 (bfin_target::get_regs_info): ...this.
1853 (the_low_target): Remove the op field.
1854 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1855 (cris_regs_info): Turn into ...
1856 (cris_target::get_regs_info): ...this.
1857 (the_low_target): Remove the op field.
1858 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1859 Declare.
1860 (crisv32_regs_info): Turn into ...
1861 (crisv32_target::get_regs_info): ...this.
1862 (the_low_target): Remove the op field.
1863 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1864 (ia64_regs_info): Turn into ...
1865 (ia64_target::get_regs_info): ...this.
1866 (the_low_target): Remove the op field.
1867 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1868 (m32r_regs_info): Turn into ...
1869 (m32r_target::get_regs_info): ...this.
1870 (the_low_target): Remove the op field.
1871 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1872 (m68k_regs_info): Turn into ...
1873 (m68k_target::get_regs_info): ...this.
1874 (the_low_target): Remove the op field.
1875 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1876 (mips_regs_info): Turn into ...
1877 (mips_target::get_regs_info): ...this.
1878 (the_low_target): Remove the op field.
1879 (get_usrregs_info): Update the call to the op.
1880 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1881 (nios2_regs_info): Turn into ...
1882 (nios2_target::get_regs_info): ...this.
1883 (the_low_target): Remove the op field.
1884 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1885 (ppc_regs_info): Turn into ...
1886 (ppc_target::get_regs_info): ...this.
1887 (the_low_target): Remove the op field.
1888 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1889 (riscv_regs_info): Turn into ...
1890 (riscv_target::get_regs_info): ...this.
1891 (the_low_target): Remove the op field.
1892 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1893 (s390_regs_info): Turn into ...
1894 (s390_target::get_regs_info): ...this.
1895 (the_low_target): Remove the op field.
1896 (s390_collect_ptrace_register)
1897 (s390_supply_ptrace_register)
1898 (s390_fill_gregset): Update the call to the op.
1899 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1900 (sh_regs_info): Turn into ...
1901 (sh_target::get_regs_info): ...this.
1902 (the_low_target): Remove the op field.
1903 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1904 (sparc_regs_info): Turn into ...
1905 (sparc_target::get_regs_info): ...this.
1906 (the_low_target): Remove the op field.
1907 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1908 (tic6x_regs_info): Turn into ...
1909 (tic6x_target::get_regs_info): ...this.
1910 (the_low_target): Remove the op field.
1911 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1912 (tile_regs_info): Turn into ...
1913 (tile_target::get_regs_info): ...this.
1914 (the_low_target): Remove the op field.
1915 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1916 Declare.
1917 (xtensa_regs_info): Turn into ...
1918 (xtensa_target::get_regs_info): ...this.
1919 (the_low_target): Remove the op field.
1920
1921 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1922
1923 Turn the 'arch_setup' linux target op into a method of
1924 linux_process_target.
1925
1926 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1927 (class linux_process_target) <arch_setup_thread>
1928 <low_arch_setup>: New declarations.
1929 * linux-low.cc (linux_arch_setup): Delete.
1930 (linux_arch_setup_thread): Turn into...
1931 (linux_process_target::arch_setup_thread): ... this.
1932
1933 Update the callers below.
1934
1935 (linux_process_target::handle_extended_wait)
1936 (linux_process_target::post_create_inferior)
1937 (linux_process_target::filter_event)
1938
1939 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1940 declaration.
1941 (x86_linux_update_xmltarget): Turn into...
1942 (x86_target::update_xmltarget): ...this.
1943 (x86_linux_process_qsupported): Update the call to
1944 x86_linux_update_xmltarget.
1945 (x86_arch_setup): Turn into ...
1946 (x86_target::low_arch_setup): ...this.
1947 (the_low_target): Remove the op field.
1948 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1949 declaration.
1950 (aarch64_arch_setup): Turn into ...
1951 (aarch64_target::low_arch_setup): ...this.
1952 (the_low_target): Remove the op field.
1953 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1954 declaration.
1955 (arm_arch_setup): Turn into ...
1956 (arm_target::low_arch_setup): ...this.
1957 (the_low_target): Remove the op field.
1958 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1959 declaration.
1960 (bfin_arch_setup): Turn into ...
1961 (bfin_target::low_arch_setup): ...this.
1962 (the_low_target): Remove the op field.
1963 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1964 declaration.
1965 (cris_arch_setup): Turn into ...
1966 (cris_target::low_arch_setup): ...this.
1967 (the_low_target): Remove the op field.
1968 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1969 declaration.
1970 (crisv32_arch_setup): Turn into ...
1971 (crisv32_target::low_arch_setup): ...this.
1972 (the_low_target): Remove the op field.
1973 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1974 declaration.
1975 (ia64_arch_setup): Turn into ...
1976 (ia64_target::low_arch_setup): ...this.
1977 (the_low_target): Remove the op field.
1978 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1979 declaration.
1980 (m32r_arch_setup): Turn into ...
1981 (m32r_target::low_arch_setup): ...this.
1982 (the_low_target): Remove the op field.
1983 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1984 declaration.
1985 (m68k_arch_setup): Turn into ...
1986 (m68k_target::low_arch_setup): ...this.
1987 (the_low_target): Remove the op field.
1988 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
1989 declaration.
1990 (mips_arch_setup): Turn into ...
1991 (mips_target::low_arch_setup): ...this.
1992 (the_low_target): Remove the op field.
1993 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
1994 declaration.
1995 (nios2_arch_setup): Turn into ...
1996 (nios2_target::low_arch_setup): ...this.
1997 (the_low_target): Remove the op field.
1998 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
1999 declaration.
2000 (ppc_arch_setup): Turn into ...
2001 (ppc_target::low_arch_setup): ...this.
2002 (the_low_target): Remove the op field.
2003 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2004 declaration.
2005 (riscv_arch_setup): Turn into ...
2006 (riscv_target::low_arch_setup): ...this.
2007 (the_low_target): Remove the op field.
2008 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2009 declaration.
2010 (s390_arch_setup): Turn into ...
2011 (s390_target::low_arch_setup): ...this.
2012 (the_low_target): Remove the op field.
2013 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2014 declaration.
2015 (sh_arch_setup): Turn into ...
2016 (sh_target::low_arch_setup): ...this.
2017 (the_low_target): Remove the op field.
2018 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2019 declaration.
2020 (sparc_arch_setup): Turn into ...
2021 (sparc_target::low_arch_setup): ...this.
2022 (the_low_target): Remove the op field.
2023 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2024 declaration.
2025 (tic6x_arch_setup): Turn into ...
2026 (tic6x_target::low_arch_setup): ...this.
2027 (the_low_target): Remove the op field.
2028 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2029 declaration.
2030 (tile_arch_setup): Turn into ...
2031 (tile_target::low_arch_setup): ...this.
2032 (the_low_target): Remove the op field.
2033 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2034 declaration.
2035 (xtensa_arch_setup): Turn into ...
2036 (xtensa_target::low_arch_setup): ...this.
2037 (the_low_target): Remove the op field.
2038
2039 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2040
2041 * linux-low.h (the_linux_target): New extern declaration.
2042 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2043 'the_target'.
2044 (the_linux_target): Remove.
2045 * linux-x86-low.cc (class x86_target): New class.
2046 (the_x86_target): New static object.
2047 (the_linux_target): Define as pointer to the_x86_target.
2048 * linux-aarch64-low.cc (class aarch64_target): New class.
2049 (the_aarch64_target): New static object.
2050 (the_linux_target): Define as pointer to the_aarch64_target.
2051 * linux-arm-low.cc (class arm_target): New class.
2052 (the_arm_target): New static object.
2053 (the_linux_target): Define as pointer to the_arm_target.
2054 * linux-bfin-low.cc (class bfin_target): New class.
2055 (the_bfin_target): New static object.
2056 (the_linux_target): Define as pointer to the_bfin_target.
2057 * linux-cris-low.cc (class cris_target): New class.
2058 (the_cris_target): New static object.
2059 (the_linux_target): Define as pointer to the_cris_target.
2060 * linux-crisv32-low.cc (class crisv32_target): New class.
2061 (the_crisv32_target): New static object.
2062 (the_linux_target): Define as pointer to the_crisv32_target.
2063 * linux-ia64-low.cc (class ia64_target): New class.
2064 (the_ia64_target): New static object.
2065 (the_linux_target): Define as pointer to the_ia64_target.
2066 * linux-m32r-low.cc (class m32r_target): New class.
2067 (the_m32r_target): New static object.
2068 (the_linux_target): Define as pointer to the_m32r_target.
2069 * linux-m68k-low.cc (class m68k_target): New class.
2070 (the_m68k_target): New static object.
2071 (the_linux_target): Define as pointer to the_m68k_target.
2072 * linux-mips-low.cc (class mips_target): New class.
2073 (the_mips_target): New static object.
2074 (the_linux_target): Define as pointer to the_mips_target.
2075 * linux-nios2-low.cc (class nios2_target): New class.
2076 (the_nios2_target): New static object.
2077 (the_linux_target): Define as pointer to the_nios2_target.
2078 * linux-ppc-low.cc (class ppc_target): New class.
2079 (the_ppc_target): New static object.
2080 (the_linux_target): Define as pointer to the_ppc_target.
2081 * linux-riscv-low.cc (class riscv_target): New class.
2082 (the_riscv_target): New static object.
2083 (the_linux_target): Define as pointer to the_riscv_target.
2084 * linux-s390-low.cc (class s390_target): New class.
2085 (the_s390_target): New static object.
2086 (the_linux_target): Define as pointer to the_s390_target.
2087 * linux-sh-low.cc (class sh_target): New class.
2088 (the_sh_target): New static object.
2089 (the_linux_target): Define as pointer to the_sh_target.
2090 * linux-sparc-low.cc (class sparc_target): New class.
2091 (the_sparc_target): New static object.
2092 (the_linux_target): Define as pointer to the_sparc_target.
2093 * linux-tic6x-low.cc (class tic6x_target): New class.
2094 (the_tic6x_target): New static object.
2095 (the_linux_target): Define as pointer to the_tic6x_target.
2096 * linux-tile-low.cc (class tile_target): New class.
2097 (the_tile_target): New static object.
2098 (the_linux_target): Define as pointer to the_tile_target.
2099 * linux-xtensa-low.cc (class xtensa_target): New class.
2100 (the_xtensa_target): New static object.
2101 (the_linux_target): Define as pointer to the_xtensa_target.
2102
2103 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2104
2105 Turn some static functions in linux-low.cc into private methods of
2106 linux_process_target.
2107
2108 * linux-low.cc (handle_extended_wait): Turn into ...
2109 (linux_process_target::handle_extended_wait): ...this. Call
2110 'mourn' on 'this' object instead of 'the_target'.
2111 (maybe_move_out_of_jump_pad): Turn into...
2112 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2113 (linux_low_filter_event): Turn into...
2114 (linux_process_target::filter_event): ...this.
2115 (linux_wait_for_event_filtered): Turn into...
2116 (linux_process_target::wait_for_event_filtered): ...this.
2117 (linux_wait_for_event): Turn into...
2118 (linux_process_target::wait_for_event): ...this.
2119 (linux_wait_1): Turn into...
2120 (linux_process_target::wait_1): ...this.
2121 (wait_for_sigstop): Turn into...
2122 (linux_process_target::wait_for_sigstop): ...this.
2123 (move_out_of_jump_pad_callback): Turn into...
2124 (linux_process_target::move_out_of_jump_pad): ...this.
2125 (stop_all_lwps): Turn into...
2126 (linux_process_target::stop_all_lwps): ...this.
2127 (start_step_over): Turn into...
2128 (linux_process_target::start_step_over): ...this.
2129 (complete_ongoing_step_over): Turn into...
2130 (linux_process_target::complete_ongoing_step_over): ...this.
2131 (proceed_all_lwps): Turn into...
2132 (linux_process_target::proceed_all_lwps): ...this.
2133 (unstop_all_lwps): Turn into...
2134 (linux_process_target::unstop_all_lwps): ...this.
2135
2136 * linux-low.h (class linux_process_target)
2137 <handle_extended_wait>
2138 <maybe_move_out_of_jump_pad>
2139 filter_event>
2140 <wait_for_event_filtered>
2141 <wait_for_event>
2142 <wait_1>
2143 <wait_for_sigstop>
2144 <move_out_of_jump_pad>
2145 <stop_all_lwps>
2146 <start_step_over>
2147 <complete_ongoing_step_over>
2148 <proceed_all_lwps>
2149 <unstop_all_lwps>: Declare.
2150
2151 Update the callers below.
2152
2153 * linux-low.cc (linux_process_target::attach): Update.
2154 (linux_process_target::stabilize_threads): Ditto.
2155 (linux_process_target::wait): Ditto.
2156
2157 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2158
2159 * linux-low.h (struct linux_target_ops): Update the comment for
2160 'cannot_store_register' to return 0 or 1.
2161 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2162 of 2.
2163
2164 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2165
2166 * config.in: Re-generate.
2167 * configure: Re-generate.
2168
2169 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2170
2171 * regcache.cc (find_register_by_number): Update.
2172 * tdesc.cc (init_target_desc): Likewise.
2173 * tdesc.h (target_desc::reg_defs): Likewise.
2174
2175 2020-03-12 Tom Tromey <tom@tromey.com>
2176
2177 * configure: Rebuild.
2178 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2179 (WIN32APILIBS): New subst.
2180 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2181 gdbsupport files.
2182 (gdbsupport/%.o): Remove target.
2183 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2184 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2185 (WIN32APILIBS): New variable.
2186 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2187 (gdbreplay$(EXEEXT)): Likewise.
2188
2189 2020-03-12 Tom Tromey <tom@tromey.com>
2190
2191 * config.in, configure: Rebuild.
2192 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2193 * acinclude.m4: Include gettext-sister.m4.
2194 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2195 variables.
2196 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2197 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2198
2199 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2200
2201 * acinclude.m4: Update path to selftest.m4.
2202
2203 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2204
2205 * configure.ac: Don't source bfd/development.sh, move
2206 GDB_AC_COMMON higher.
2207 * configure: Re-generate.
2208
2209 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2210
2211 * configure: Re-generate.
2212
2213 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2214
2215 * configure: Re-generate.
2216
2217 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2218
2219 * .dir-locals.el: New file.
2220
2221 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2222
2223 * .gitattributes: New file.
2224
2225 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2226
2227 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2228 reply into an S reply.
2229 * server.cc (disable_packet_T): New global.
2230 (captured_main): Set new global when appropriate.
2231 * server.h (disable_packet_T): Declare.
2232
2233 2020-02-21 Tom Tromey <tom@tromey.com>
2234
2235 * Makefile.in (mostlyclean): New target.
2236
2237 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2238
2239 * target.h (struct process_stratum_target): Remove.
2240 (class process_target): Rename to ...
2241 (class process_stratum_target): ... this.
2242 * linux-low.h (class linux_process_target): Derive from
2243 'process_stratum_target'.
2244 * linux-low.cc (linux_target_ops): Remove.
2245 (initialize_low): Set the_target to the singleton instance of
2246 linux_process_target.
2247 * lynx-low.h (class lynx_process_target): Derive from
2248 'process_stratum_target'.
2249 * lynx-low.cc (lynx_target_ops): Remove.
2250 (initialize_low): Set the_target to the singleton instance of
2251 lynx_process_target.
2252 * nto-low.h (class nto_process_target): Derive from
2253 'process_stratum_target'.
2254 * nto-low.cc (nto_target_ops): Remove.
2255 (initialize_low): Set the_target to the singleton instance of
2256 nto_process_target.
2257 * win32-low.h (class win32_process_target): Derive from
2258 'process_stratum_target'.
2259 * win32-low.cc (win32_target_ops): Remove.
2260 (initialize_low): Set the_target to the singleton instance of
2261 win32_process_target.
2262
2263 Replace 'the_target->pt' with 'the_target' in the uses below.
2264
2265 * hostio.cc (hostio_error)
2266 (handle_setfs)
2267 (handle_open)
2268 (handle_unlink)
2269 (handle_readlink)
2270 * linux-aarch32-low.cc (arm_breakpoint_at)
2271 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2272 * linux-arm-low.cc (arm_sigreturn_next_pc)
2273 (arm_get_hwcap)
2274 (arm_get_syscall_trapinfo)
2275 * linux-cris-low.cc (cris_breakpoint_at)
2276 * linux-crisv32-low.cc (cris_breakpoint_at)
2277 * linux-low.cc (handle_extended_wait)
2278 (linux_wait_1)
2279 (linux_read_memory)
2280 (linux_process_target::breakpoint_kind_from_pc)
2281 (linux_get_auxv)
2282 * linux-m32r-low.cc (m32r_breakpoint_at)
2283 * linux-mips-low.cc (mips_breakpoint_at)
2284 * linux-nios2-low.cc (nios2_breakpoint_at)
2285 * linux-ppc-low.cc (ppc_breakpoint_at)
2286 * linux-s390-low.cc (s390_get_hwcap)
2287 * linux-sh-low.cc (sh_breakpoint_at)
2288 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2289 (sparc_store_gregset_from_stack)
2290 (sparc_breakpoint_at)
2291 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2292 * linux-tile-low.cc (tile_breakpoint_at)
2293 * linux-x86-low.cc (x86_breakpoint_at)
2294 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2295 * mem-break.cc (bp_size)
2296 (bp_opcode)
2297 (insert_memory_breakpoint)
2298 (set_raw_breakpoint_at)
2299 (delete_raw_breakpoint)
2300 (z_type_supported)
2301 (uninsert_raw_breakpoint)
2302 (reinsert_raw_breakpoint)
2303 (validate_inserted_breakpoint)
2304 * regcache.cc (regcache_read_pc)
2305 (regcache_write_pc)
2306 * remote-utils.cc (putpkt_binary_1)
2307 (input_interrupt)
2308 (getpkt)
2309 (prepare_resume_reply)
2310 * server.cc (handle_general_set)
2311 (handle_detach)
2312 (handle_qxfer_auxv)
2313 (handle_qxfer_exec_file)
2314 (handle_qxfer_libraries_svr4)
2315 (handle_qxfer_osdata)
2316 (handle_qxfer_siginfo)
2317 (handle_qxfer_fdpic)
2318 (handle_query)
2319 (resume)
2320 (handle_v_requests)
2321 (queue_stop_reply_callback)
2322 (captured_main)
2323 * target.cc (prepare_to_access_memory)
2324 (done_accessing_memory)
2325 (read_inferior_memory)
2326 (target_write_memory)
2327 (target_stop_and_wait)
2328 (target_wait)
2329 (target_mourn_inferior)
2330 (target_continue_no_signal)
2331 (target_continue)
2332 (target_supports_multi_process)
2333 (kill_inferior)
2334 * target.h
2335 (target_create_inferior)
2336 (target_post_create_inferior)
2337 (myattach)
2338 (target_supports_fork_events)
2339 (target_supports_vfork_events)
2340 (target_supports_exec_events)
2341 (target_handle_new_gdb_connection)
2342 (detach_inferior)
2343 (mythread_alive)
2344 (fetch_inferior_registers)
2345 (store_inferior_registers)
2346 (join_inferior)
2347 (target_supports_non_stop)
2348 (target_async)
2349 (target_process_qsupported)
2350 (target_supports_catch_syscall)
2351 (target_get_ipa_tdesc_idx)
2352 (target_supports_tracepoints)
2353 (target_supports_fast_tracepoints)
2354 (target_get_min_fast_tracepoint_insn_len)
2355 (target_thread_stopped)
2356 (target_pause_all)
2357 (target_unpause_all)
2358 (target_stabilize_threads)
2359 (target_install_fast_tracepoint_jump_pad)
2360 (target_emit_ops)
2361 (target_supports_disable_randomization)
2362 (target_supports_agent)
2363 (target_enable_btrace)
2364 (target_disable_btrace)
2365 (target_read_btrace)
2366 (target_read_btrace_conf)
2367 (target_supports_range_stepping)
2368 (target_supports_stopped_by_sw_breakpoint)
2369 (target_stopped_by_sw_breakpoint)
2370 (target_supports_stopped_by_hw_breakpoint)
2371 (target_supports_hardware_single_step)
2372 (target_stopped_by_hw_breakpoint)
2373 (target_breakpoint_kind_from_pc)
2374 (target_breakpoint_kind_from_current_state)
2375 (target_supports_software_single_step)
2376 (target_core_of_thread)
2377 (target_thread_name)
2378 (target_thread_handle)
2379 * win32-low.cc (do_initial_child_stuff)
2380
2381 Rename target op default definitions listed below.
2382
2383 * target.cc (process_target::post_create_inferior): Rename as ...
2384 (process_stratum_target::post_create_inferior): ... this.
2385 (process_target::prepare_to_access_memory): Rename as ...
2386 (process_stratum_target::prepare_to_access_memory): ... this.
2387 (process_target::done_accessing_memory): Rename as ...
2388 (process_stratum_target::done_accessing_memory): ... this.
2389 (process_target::look_up_symbols): Rename as ...
2390 (process_stratum_target::look_up_symbols): ... this.
2391 (process_target::supports_read_auxv): Rename as ...
2392 (process_stratum_target::supports_read_auxv): ... this.
2393 (process_target::read_auxv): Rename as ...
2394 (process_stratum_target::read_auxv): ... this.
2395 (process_target::supports_z_point_type): Rename as ...
2396 (process_stratum_target::supports_z_point_type): ... this.
2397 (process_target::insert_point): Rename as ...
2398 (process_stratum_target::insert_point): ... this.
2399 (process_target::remove_point): Rename as ...
2400 (process_stratum_target::remove_point): ... this.
2401 (process_target::stopped_by_sw_breakpoint): Rename as ...
2402 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2403 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2404 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2405 (process_target::stopped_by_hw_breakpoint): Rename as ...
2406 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2407 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2408 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2409 (process_target::supports_hardware_single_step): Rename as ...
2410 (process_stratum_target::supports_hardware_single_step): ... this.
2411 (process_target::stopped_by_watchpoint): Rename as ...
2412 (process_stratum_target::stopped_by_watchpoint): ... this.
2413 (process_target::stopped_data_address): Rename as ...
2414 (process_stratum_target::stopped_data_address): ... this.
2415 (process_target::supports_read_offsets): Rename as ...
2416 (process_stratum_target::supports_read_offsets): ... this.
2417 (process_target::read_offsets): Rename as ...
2418 (process_stratum_target::read_offsets): ... this.
2419 (process_target::supports_get_tls_address): Rename as ...
2420 (process_stratum_target::supports_get_tls_address): ... this.
2421 (process_target::get_tls_address): Rename as ...
2422 (process_stratum_target::get_tls_address): ... this.
2423 (process_target::hostio_last_error): Rename as ...
2424 (process_stratum_target::hostio_last_error): ... this.
2425 (process_target::supports_qxfer_osdata): Rename as ...
2426 (process_stratum_target::supports_qxfer_osdata): ... this.
2427 (process_target::qxfer_osdata): Rename as ...
2428 (process_stratum_target::qxfer_osdata): ... this.
2429 (process_target::supports_qxfer_siginfo): Rename as ...
2430 (process_stratum_target::supports_qxfer_siginfo): ... this.
2431 (process_target::qxfer_siginfo): Rename as ...
2432 (process_stratum_target::qxfer_siginfo): ... this.
2433 (process_target::supports_non_stop): Rename as ...
2434 (process_stratum_target::supports_non_stop): ... this.
2435 (process_target::async): Rename as ...
2436 (process_stratum_target::async): ... this.
2437 (process_target::start_non_stop): Rename as ...
2438 (process_stratum_target::start_non_stop): ... this.
2439 (process_target::supports_multi_process): Rename as ...
2440 (process_stratum_target::supports_multi_process): ... this.
2441 (process_target::supports_fork_events): Rename as ...
2442 (process_stratum_target::supports_fork_events): ... this.
2443 (process_target::supports_vfork_events): Rename as ...
2444 (process_stratum_target::supports_vfork_events): ... this.
2445 (process_target::supports_exec_events): Rename as ...
2446 (process_stratum_target::supports_exec_events): ... this.
2447 (process_target::handle_new_gdb_connection): Rename as ...
2448 (process_stratum_target::handle_new_gdb_connection): ... this.
2449 (process_target::handle_monitor_command): Rename as ...
2450 (process_stratum_target::handle_monitor_command): ... this.
2451 (process_target::core_of_thread): Rename as ...
2452 (process_stratum_target::core_of_thread): ... this.
2453 (process_target::supports_read_loadmap): Rename as ...
2454 (process_stratum_target::supports_read_loadmap): ... this.
2455 (process_target::read_loadmap): Rename as ...
2456 (process_stratum_target::read_loadmap): ... this.
2457 (process_target::process_qsupported): Rename as ...
2458 (process_stratum_target::process_qsupported): ... this.
2459 (process_target::supports_tracepoints): Rename as ...
2460 (process_stratum_target::supports_tracepoints): ... this.
2461 (process_target::read_pc): Rename as ...
2462 (process_stratum_target::read_pc): ... this.
2463 (process_target::write_pc): Rename as ...
2464 (process_stratum_target::write_pc): ... this.
2465 (process_target::supports_thread_stopped): Rename as ...
2466 (process_stratum_target::supports_thread_stopped): ... this.
2467 (process_target::thread_stopped): Rename as ...
2468 (process_stratum_target::thread_stopped): ... this.
2469 (process_target::supports_get_tib_address): Rename as ...
2470 (process_stratum_target::supports_get_tib_address): ... this.
2471 (process_target::get_tib_address): Rename as ...
2472 (process_stratum_target::get_tib_address): ... this.
2473 (process_target::pause_all): Rename as ...
2474 (process_stratum_target::pause_all): ... this.
2475 (process_target::unpause_all): Rename as ...
2476 (process_stratum_target::unpause_all): ... this.
2477 (process_target::stabilize_threads): Rename as ...
2478 (process_stratum_target::stabilize_threads): ... this.
2479 (process_target::supports_fast_tracepoints): Rename as ...
2480 (process_stratum_target::supports_fast_tracepoints): ... this.
2481 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2482 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2483 (process_target::emit_ops): Rename as ...
2484 (process_stratum_target::emit_ops): ... this.
2485 (process_target::supports_disable_randomization): Rename as ...
2486 (process_stratum_target::supports_disable_randomization): ... this.
2487 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2488 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2489 (process_target::qxfer_libraries_svr4): Rename as ...
2490 (process_stratum_target::qxfer_libraries_svr4): ... this.
2491 (process_target::supports_agent): Rename as ...
2492 (process_stratum_target::supports_agent): ... this.
2493 (process_target::enable_btrace): Rename as ...
2494 (process_stratum_target::enable_btrace): ... this.
2495 (process_target::disable_btrace): Rename as ...
2496 (process_stratum_target::disable_btrace): ... this.
2497 (process_target::read_btrace): Rename as ...
2498 (process_stratum_target::read_btrace): ... this.
2499 (process_target::read_btrace_conf): Rename as ...
2500 (process_stratum_target::read_btrace_conf): ... this.
2501 (process_target::supports_range_stepping): Rename as ...
2502 (process_stratum_target::supports_range_stepping): ... this.
2503 (process_target::supports_pid_to_exec_file): Rename as ...
2504 (process_stratum_target::supports_pid_to_exec_file): ... this.
2505 (process_target::pid_to_exec_file): Rename as ...
2506 (process_stratum_target::pid_to_exec_file): ... this.
2507 (process_target::supports_multifs): Rename as ...
2508 (process_stratum_target::supports_multifs): ... this.
2509 (process_target::multifs_open): Rename as ...
2510 (process_stratum_target::multifs_open): ... this.
2511 (process_target::multifs_unlink): Rename as ...
2512 (process_stratum_target::multifs_unlink): ... this.
2513 (process_target::multifs_readlink): Rename as ...
2514 (process_stratum_target::multifs_readlink): ... this.
2515 (process_target::breakpoint_kind_from_pc): Rename as ...
2516 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2517 (process_target::breakpoint_kind_from_current_state): Rename as ...
2518 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2519 (process_target::thread_name): Rename as ...
2520 (process_stratum_target::thread_name): ... this.
2521 (process_target::thread_handle): Rename as ...
2522 (process_stratum_target::thread_handle): ... this.
2523 (process_target::supports_software_single_step): Rename as ...
2524 (process_stratum_target::supports_software_single_step): ... this.
2525 (process_target::supports_catch_syscall): Rename as ...
2526 (process_stratum_target::supports_catch_syscall): ... this.
2527 (process_target::get_ipa_tdesc_idx): Rename as ...
2528 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2529
2530 2020-02-20 Pedro Alves <palves@redhat.com>
2531
2532 * target.cc (set_target_ops): Simply copy the given target pointer
2533 instead of creating a copy of the pointed object.
2534
2535 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2536
2537 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2538 of process_target.
2539
2540 * target.h (struct process_stratum_target): Remove the target op.
2541 (class process_target): Add the target op.
2542 (target_get_ipa_tdesc_idx): Update the macro.
2543 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2544
2545 Update the derived classes and callers below.
2546
2547 * linux-low.cc (linux_target_ops): Update.
2548 (linux_get_ipa_tdesc_idx): Turn into ...
2549 (linux_process_target::get_ipa_tdesc_idx): ... this.
2550 * linux-low.h (class linux_process_target): Update.
2551 * lynx-low.cc (lynx_target_ops): Update.
2552 * nto-low.cc (nto_target_ops): Update.
2553 * win32-low.cc (win32_target_ops): Update.
2554
2555 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2556
2557 Turn process_stratum_target's supports_catch_syscall op into a
2558 method of process_target.
2559
2560 * target.h (struct process_stratum_target): Remove the target op.
2561 (class process_target): Add the target op.
2562 (target_supports_catch_syscall): Update the macro.
2563 * target.cc (process_target::supports_catch_syscall): Define.
2564
2565 Update the derived classes and callers below.
2566
2567 * linux-low.cc (linux_target_ops): Update.
2568 (linux_supports_catch_syscall): Turn into ...
2569 (linux_process_target::supports_catch_syscall): ... this.
2570 * linux-low.h (class linux_process_target): Update.
2571 * lynx-low.cc (lynx_target_ops): Update.
2572 * nto-low.cc (nto_target_ops): Update.
2573 * win32-low.cc (win32_target_ops): Update.
2574
2575 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2576
2577 Turn process_stratum_target's supports_software_single_step op
2578 into a method of process_target.
2579
2580 * target.h (struct process_stratum_target): Remove the target op.
2581 (class process_target): Add the target op.
2582 (target_supports_software_single_step): Update the macro.
2583 * target.cc (process_target::supports_software_single_step): Define.
2584
2585 Update the derived classes and callers below.
2586
2587 * linux-low.cc (linux_target_ops): Update.
2588 (linux_supports_software_single_step): Turn into ...
2589 (linux_process_target::supports_software_single_step): ... this.
2590 * linux-low.h (class linux_process_target): Update.
2591 * lynx-low.cc (lynx_target_ops): Update.
2592 * nto-low.cc (nto_target_ops): Update.
2593 * win32-low.cc (win32_target_ops): Update.
2594
2595 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2596
2597 Turn process_stratum_target's thread_name and thread_handle ops
2598 into methods of process_target.
2599
2600 * target.h (struct process_stratum_target): Remove the target ops.
2601 (class process_target): Add the target ops.
2602 (target_thread_name): Update the macro.
2603 (target_thread_handle): Update the macro.
2604 * target.cc (process_target::thread_name): Define.
2605 (process_target::thread_handle): Define.
2606
2607 Update the derived classes and callers below.
2608
2609 * linux-low.cc (linux_target_ops): Update.
2610 (linux_process_target::thread_name): Define.
2611 (linux_process_target::thread_handle): Define.
2612 * linux-low.h (class linux_process_target): Update.
2613 * lynx-low.cc (lynx_target_ops): Update.
2614 * nto-low.cc (nto_target_ops): Update.
2615 * win32-low.cc (win32_target_ops): Update.
2616
2617 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2618
2619 Turn process_stratum_target's breakpoint_kind_from_pc,
2620 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2621 ops into methods of process_target.
2622
2623 * target.h (struct process_stratum_target): Remove the target op.
2624 (class process_target): Add the target op.
2625 (target_breakpoint_kind_from_pc): Update the macro.
2626 (target_breakpoint_kind_from_current_state): Update the macro.
2627 (default_breakpoint_kind_from_pc): Remove declaration.
2628 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2629 (process_target::breakpoint_kind_from_pc): ... this.
2630 (process_target::breakpoint_kind_from_current_state): Define.
2631
2632 Update the derived classes and callers below.
2633
2634 * mem-break.cc (bp_size): Update.
2635 (bp_opcode): Update.
2636 * linux-low.cc (linux_target_ops): Update.
2637 (linux_wait_1): Update.
2638 (linux_breakpoint_kind_from_pc): Turn into ...
2639 (linux_process_target::breakpoint_kind_from_pc): ... this.
2640 (linux_sw_breakpoint_from_kind): Turn into ...
2641 (linux_process_target::sw_breakpoint_from_kind): ... this.
2642 (linux_breakpoint_kind_from_current_state): Turn into ...
2643 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2644 * linux-low.h (class linux_process_target): Update.
2645 * lynx-low.cc (lynx_target_ops): Update.
2646 (lynx_process_target::sw_breakpoint_from_kind): Define.
2647 * lynx-low.h (class lynx_process_target): Update.
2648 * nto-low.cc (nto_target_ops): Update.
2649 (nto_sw_breakpoint_from_kind): Turn into ...
2650 (nto_process_target::sw_breakpoint_from_kind): ... this.
2651 * nto-low.h (class nto_process_target): Update.
2652 * win32-low.cc (win32_target_ops): Update.
2653 (win32_sw_breakpoint_from_kind): Turn into ...
2654 (win32_process_target::sw_breakpoint_from_kind): ... this.
2655 * win32-low.h (class win32_process_target): Update.
2656
2657 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2658
2659 Turn process_stratum_target's multifs_open, multifs_readlink,
2660 multifs_unlink ops into methods of process_target.
2661
2662 * target.h (struct process_stratum_target): Remove the target ops.
2663 (class process_target): Add the target ops. Also add
2664 'supports_multifs'.
2665 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2666 "sys/stat.h".
2667 (process_target::supports_multifs): Define.
2668 (process_target::multifs_open): Define.
2669 (process_target::multifs_readlink): Define.
2670 (process_target::multifs_unlink): Define.
2671
2672 Update the derived classes and callers below.
2673
2674 * hostio.cc (handle_setfs): Update.
2675 (handle_open): Update.
2676 (handle_unlink): Update.
2677 (handle_readlink): Update.
2678 * linux-low.cc (linux_target_ops): Update.
2679 (linux_process_target::supports_multifs): Define.
2680 (linux_process_target::multifs_open): Define.
2681 (linux_process_target::multifs_readlink): Define.
2682 (linux_process_target::multifs_unlink): Define.
2683 * linux-low.h (class linux_process_target): Update.
2684 * lynx-low.cc (lynx_target_ops): Update.
2685 * nto-low.cc (nto_target_ops): Update.
2686 * win32-low.cc (win32_target_ops): Update.
2687
2688 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2689
2690 Turn process_stratum_target's pid_to_exec_file op into a method
2691 of process_target.
2692
2693 * target.h (struct process_stratum_target): Remove the target op.
2694 (class process_target): Add the target op. Also add
2695 'supports_pid_to_exec_file'.
2696 * target.cc (process_target::pid_to_exec_file): Define.
2697 (process_target::supports_pid_to_exec_file): Define.
2698
2699 Update the derived classes and callers below.
2700
2701 * server.cc (handle_qxfer_exec_file): Update.
2702 (handle_query): Update.
2703 * linux-low.cc (linux_target_ops): Update.
2704 (linux_process_target::supports_pid_to_exec_file): Define.
2705 (linux_process_target::pid_to_exec_file): Define.
2706 * linux-low.h (class linux_process_target): Update.
2707 * lynx-low.cc (lynx_target_ops): Update.
2708 * nto-low.cc (nto_target_ops): Update.
2709 * win32-low.cc (win32_target_ops): Update.
2710
2711 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2712
2713 Turn process_stratum_target's supports_range_stepping op into a
2714 method of process_target.
2715
2716 * target.h (struct process_stratum_target): Remove the target op.
2717 (class process_target): Add the target op.
2718 (target_supports_range_stepping): Update the macro.
2719 * target.cc (process_target::supports_range_stepping): Define.
2720
2721 Update the derived classes and callers below.
2722
2723 * linux-low.cc (linux_target_ops): Update.
2724 (linux_supports_range_stepping): Turn into ...
2725 (linux_process_target::supports_range_stepping): ... this.
2726 * linux-low.h (class linux_process_target): Update.
2727 * lynx-low.cc (lynx_target_ops): Update.
2728 * nto-low.cc (nto_target_ops): Update.
2729 * win32-low.cc (win32_target_ops): Update.
2730
2731 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2732
2733 Turn process_stratum_target's btrace-related ops (enable_btrace,
2734 disable_btrace, read_btrace, read_btrace_conf) into methods of
2735 process_target.
2736
2737 * target.h (struct process_stratum_target): Remove the target ops.
2738 (class process_target): Add the target ops.
2739 (target_enable_btrace): Update.
2740 (target_disable_btrace): Update.
2741 (target_read_btrace): Update.
2742 (target_read_btrace_conf): Update.
2743 * target.cc (process_target::enable_btrace): Define.
2744 (process_target::disable_btrace): Define.
2745 (process_target::read_btrace): Define.
2746 (process_target::read_btrace_conf): Define.
2747
2748 Update the derived classes and callers below.
2749
2750 * linux-low.cc (linux_target_ops): Update.
2751 (linux_process_target:enable_btrace): Define as a wrapper around
2752 linux_enable_btrace.
2753 (linux_low_disable_btrace): Turn into ...
2754 (linux_process_target::disable_btrace): ... this.
2755 (linux_low_read_btrace): Turn into ...
2756 (linux_process_target::read_btrace): ... this.
2757 (linux_low_btrace_conf): Turn into ...
2758 (linux_process_target::read_btrace_conf): ... this.
2759 * linux-low.h (class linux_process_target): Update.
2760 * lynx-low.cc (lynx_target_ops): Update.
2761 * nto-low.cc (nto_target_ops): Update.
2762 * win32-low.cc (win32_target_ops): Update.
2763
2764 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2765
2766 Turn process_stratum_target's supports_agent op into a method of
2767 process_target.
2768
2769 * target.h (struct process_stratum_target): Remove the target op.
2770 (class process_target): Add the target op.
2771 (target_supports_agent): Update the macro.
2772 * target.cc (process_target::supports_agent): Define.
2773
2774 Update the derived classes and callers below.
2775
2776 * linux-low.cc (linux_target_ops): Update.
2777 (linux_supports_agent): Turn into ...
2778 (linux_process_target::supports_agent): ... this.
2779 * linux-low.h (class linux_process_target): Update.
2780 * lynx-low.cc (lynx_target_ops): Update.
2781 * nto-low.cc (nto_target_ops): Update.
2782 * win32-low.cc (win32_target_ops): Update.
2783
2784 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2785
2786 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2787 method of process_target.
2788
2789 * target.h (struct process_stratum_target): Remove the target op.
2790 (class process_target): Add the target op. Also add
2791 'supports_qxfer_libraries_svr4'.
2792 * target.cc (process_target::qxfer_libraries_svr4): Define.
2793 (process_target::supports_qxfer_libraries_svr4): Define.
2794
2795 Update the derived classes and callers below.
2796
2797 * server.cc (handle_qxfer_libraries_svr4): Update.
2798 (handle_query): Update.
2799 * linux-low.cc (linux_target_ops): Update.
2800 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2801 (linux_qxfer_libraries_svr4): Turn into ...
2802 (linux_process_target::qxfer_libraries_svr4): ... this.
2803 * linux-low.h (class linux_process_target): Update.
2804 * lynx-low.cc (lynx_target_ops): Update.
2805 * nto-low.cc (nto_target_ops): Update.
2806 * win32-low.cc (win32_target_ops): Update.
2807
2808 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2809
2810 Turn process_stratum_target's supports_disable_randomization op
2811 into a method of process_target.
2812
2813 * target.h (struct process_stratum_target): Remove the target op.
2814 (class process_target): Add the target op.
2815 (target_supports_disable_randomization): Update the macro.
2816 * target.cc (process_target::supports_disable_randomization): Define.
2817
2818 Update the derived classes and callers below.
2819
2820 * linux-low.cc (linux_target_ops): Update.
2821 (linux_supports_disable_randomization): Turn into ...
2822 (linux_process_target::supports_disable_randomization): ... this.
2823 * linux-low.h (class linux_process_target): Update.
2824 * lynx-low.cc (lynx_target_ops): Update.
2825 * nto-low.cc (nto_target_ops): Update.
2826 * win32-low.cc (win32_target_ops): Update.
2827
2828 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2829
2830 Turn process_stratum_target's emit_ops op into a method of
2831 process_target.
2832
2833 * target.h (struct process_stratum_target): Remove the target op.
2834 (class process_target): Add the target op.
2835 (target_emit_ops): Update the macro.
2836 * target.cc (process_target::emit_ops): Define.
2837
2838 Update the derived classes and callers below.
2839
2840 * linux-low.cc (linux_target_ops): Update.
2841 (linux_emit_ops): Turn into ...
2842 (linux_process_target::emit_ops): ... this.
2843 * linux-low.h (class linux_process_target): Update.
2844 * lynx-low.cc (lynx_target_ops): Update.
2845 * nto-low.cc (nto_target_ops): Update.
2846 * win32-low.cc (win32_target_ops): Update.
2847
2848 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2849
2850 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2851 and get_min_fast_tracepoint_insn_len ops into methods of
2852 process_target.
2853
2854 * target.h (struct process_stratum_target): Remove the target ops.
2855 (class process_target): Add the target ops. Also add
2856 'supports_fast_tracepoints'.
2857 (target_supports_fast_tracepoints): Update the macro.
2858 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2859 (install_fast_tracepoint_jump_pad): Update and rename the macro
2860 to ...
2861 (target_install_fast_tracepoint_jump_pad): ... this.
2862 * target.cc (process_target::supports_fast_tracepoints): Define.
2863 (process_target::install_fast_tracepoint_jump_pad): Define.
2864 (process_target::get_min_fast_tracepoint_insn_len): Define.
2865
2866 Update the derived classes and callers below.
2867
2868 * tracepoint.cc (install_fast_tracepoint): Update.
2869 * linux-low.cc (linux_target_ops): Update.
2870 (linux_process_target::supports_fast_tracepoints): Define.
2871 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2872 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2873 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2874 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2875 * linux-low.h (class linux_process_target): Update.
2876 * lynx-low.cc (lynx_target_ops): Update.
2877 * nto-low.cc (nto_target_ops): Update.
2878 * win32-low.cc (win32_target_ops): Update.
2879
2880 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2881
2882 Turn process_stratum_target's stabilize_threads op into a
2883 method of process_target.
2884
2885 * target.h (struct process_stratum_target): Remove the target op.
2886 (class process_target): Add the target op.
2887 (target_stabilize_threads): Update the macro.
2888 * target.cc (process_target::stabilize_threads): Define.
2889
2890 Update the derived classes and callers below.
2891
2892 * server.cc (handle_status): Update.
2893 * tracepoint.cc (cmd_qtdp): Update.
2894 (cmd_qtstart): Update.
2895 * linux-low.cc (linux_target_ops): Update.
2896 (linux_stabilize_threads): Turn into ...
2897 (linux_process_target::stabilize_threads): ... this.
2898 (linux_wait_1): Update.
2899 * linux-low.h (class linux_process_target): Update.
2900 * lynx-low.cc (lynx_target_ops): Update.
2901 * nto-low.cc (nto_target_ops): Update.
2902 * win32-low.cc (win32_target_ops): Update.
2903
2904 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2905
2906 Turn process_stratum_target's pause_all and unpause_all ops
2907 into methods of process_target.
2908
2909 * target.h (struct process_stratum_target): Remove the target ops.
2910 (class process_target): Add the target ops.
2911 (pause_all): Update the macro and rename to...
2912 (target_pause_all): ... this.
2913 (unpause_all): Update the macro and rename to...
2914 (target_unpause_all): ... this.
2915 * target.cc (process_target::pause_all): Define.
2916 (process_target::unpause_all): Define.
2917
2918 Update the derived classes and callers below.
2919
2920 * server.cc (handle_status): Update.
2921 * tracepoint.cc (clear_installed_tracepoints): Update.
2922 (cmd_qtdp): Update.
2923 (cmd_qtstart): Update.
2924 (stop_tracing): Update.
2925 (cmd_qtstatus): Update.
2926 (upload_fast_traceframes): Update.
2927 (run_inferior_command): Update.
2928 * linux-low.cc (linux_target_ops): Update.
2929 (linux_pause_all): Turn into ...
2930 (linux_process_target::pause_all): ... this.
2931 (linux_unpause_all): Turn into ...
2932 (linux_process_target::unpause_all): ... this.
2933 (linux_process_target::prepare_to_access_memory): Update.
2934 (linux_process_target::done_accessing_memory): Update.
2935 * linux-low.h (class linux_process_target): Update.
2936 * lynx-low.cc (lynx_target_ops): Update.
2937 * nto-low.cc (nto_target_ops): Update.
2938 * win32-low.cc (win32_target_ops): Update.
2939
2940 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2941
2942 Turn process_stratum_target's get_tib_address op into a method of
2943 process_target.
2944
2945 * target.h (struct process_stratum_target): Remove the target op.
2946 (class process_target): Add the target op. Also add
2947 'supports_get_tib_address'.
2948 * target.cc (process_target::get_tib_address): Define.
2949 (process_target::supports_get_tib_address): Define.
2950
2951 Update the derived classes and callers below.
2952
2953 * server.cc (handle_query): Update.
2954 * linux-low.cc (win32_target_ops): Update.
2955 * lynx-low.cc (lynx_target_ops): Update.
2956 * nto-low.cc (nto_target_ops): Update.
2957 * win32-low.cc (win32_target_ops): Update.
2958 (win32_process_target::supports_get_tib_address): Define.
2959 (win32_get_tib_address): Turn into ...
2960 (win32_process_target::get_tib_address): ... this.
2961 * win32-low.h (class win32_process_target): Update.
2962
2963 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2964
2965 Turn process_stratum_target's thread_stopped op into a method of
2966 process_target.
2967
2968 * target.h (struct process_stratum_target): Remove the target op.
2969 (class process_target): Add the target op. Also add
2970 'supports_thread_stopped'.
2971 (target_thread_stopped): Update the macro.
2972 * target.cc (process_target::thread_stopped): Define.
2973 (process_target::supports_thread_stopped): Define.
2974 (prepare_to_access_memory): Update.
2975
2976 Update the derived classes and callers below.
2977
2978 * server.cc (queue_stop_reply_callback): Update.
2979 * linux-low.cc (linux_target_ops): Update.
2980 (linux_process_target::supports_thread_stopped): Define.
2981 (linux_thread_stopped): Turn into ...
2982 (linux_process_target::thread_stopped): ... this.
2983 * linux-low.h (class linux_process_target): Update.
2984 * lynx-low.cc (lynx_target_ops): Update.
2985 * nto-low.cc (nto_target_ops): Update.
2986 * win32-low.cc (win32_target_ops): Update.
2987
2988 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2989
2990 Turn process_stratum_target's read_pc and write_pc ops into
2991 methods of process_target.
2992
2993 * target.h (struct process_stratum_target): Remove the target ops.
2994 (class process_target): Add the target ops.
2995 * target.cc (process_target::read_pc): Define.
2996 (process_target::write_pc): Define.
2997
2998 Update the derived classes and callers below.
2999
3000 * regcache.cc (regcache_read_pc): Update.
3001 (regcache_write_pc): Update.
3002 * linux-low.cc (linux_target_ops): Update.
3003 (linux_read_pc): Turn into ...
3004 (linux_process_target::read_pc): ... this.
3005 (linux_write_pc): Turn into ...
3006 (linux_process_target::write_pc): ... this.
3007 * linux-low.h (class linux_process_target): Update.
3008 * lynx-low.cc (lynx_target_ops): Update.
3009 * nto-low.cc (nto_target_ops): Update.
3010 * win32-low.cc (win32_target_ops): Update.
3011
3012 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3013
3014 Turn process_stratum_target's supports_tracepoints op into a
3015 method of process_target.
3016
3017 * target.h (struct process_stratum_target): Remove the target op.
3018 (class process_target): Add the target op.
3019 (target_supports_tracepoints): Update the macro.
3020 * target.cc (process_target::supports_tracepoints): Define.
3021
3022 Update the derived classes and callers below.
3023
3024 * linux-low.cc (linux_target_ops): Update.
3025 (linux_supports_tracepoints): Turn into ...
3026 (linux_process_target::supports_tracepoints): ... this.
3027 * linux-low.h (class linux_process_target): Update.
3028 * lynx-low.cc (lynx_target_ops): Update.
3029 * nto-low.cc (nto_target_ops): Update.
3030 * win32-low.cc (win32_target_ops): Update.
3031
3032 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3033
3034 Turn process_stratum_target's process_qsupported op into a method
3035 of process_target.
3036
3037 * target.h (struct process_stratum_target): Remove the target op.
3038 (class process_target): Add the target op.
3039 (target_process_qsupported): Update the macro.
3040 * target.cc (process_target::process_qsupported): Define.
3041
3042 Update the derived classes and callers below.
3043
3044 * linux-low.cc (linux_target_ops): Update.
3045 (linux_process_qsupported): Turn into ...
3046 (linux_process_target::process_qsupported): ... this.
3047 * linux-low.h (class linux_process_target): Update.
3048 * lynx-low.cc (lynx_target_ops): Update.
3049 * nto-low.cc (nto_target_ops): Update.
3050 * win32-low.cc (win32_target_ops): Update.
3051
3052 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3053
3054 Turn process_stratum_target's read_loadmap op into a method of
3055 process_target.
3056
3057 * target.h (struct process_stratum_target): Remove the target op.
3058 (class process_target): Add the target op. Also add
3059 'supports_read_loadmap'.
3060 * target.cc (process_target::read_loadmap): Define.
3061 (process_target::supports_read_loadmap): Define.
3062
3063 Update the derived classes and callers below.
3064
3065 * server.cc (handle_qxfer_fdpic): Update.
3066 (handle_query): Update.
3067 * linux-low.cc (linux_target_ops): Update.
3068 (linux_process_target::supports_read_loadmap): Define.
3069 (linux_read_loadmap): Turn into ...
3070 (linux_process_target::read_loadmap): ... this.
3071 * linux-low.h (class linux_process_target): Update.
3072 * lynx-low.cc (lynx_target_ops): Update.
3073 * nto-low.cc (nto_target_ops): Update.
3074 * win32-low.cc (win32_target_ops): Update.
3075
3076 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3077
3078 Turn process_stratum_target's core_of_thread op into a method of
3079 process_target.
3080
3081 * target.h (struct process_stratum_target): Remove the target op.
3082 (class process_target): Add the target op.
3083 (target_core_of_thread): Update the macro.
3084 * target.cc (process_target::core_of_thread): Define.
3085
3086 Update the derived classes and callers below.
3087
3088 * linux-low.cc (linux_target_ops): Update.
3089 (linux_process_target::core_of_thread): Define.
3090 * linux-low.h (class linux_process_target): Update.
3091 * lynx-low.cc (lynx_target_ops): Update.
3092 * nto-low.cc (nto_target_ops): Update.
3093 * win32-low.cc (win32_target_ops): Update.
3094
3095 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3096
3097 Turn process_stratum_target's handle_monitor_command op into a
3098 method of process_target.
3099
3100 * target.h (struct process_stratum_target): Remove the target op.
3101 (class process_target): Add the target op.
3102 (target_handle_monitor_command): Update the macro.
3103 * target.cc (process_target::handle_monitor_command): Define.
3104
3105 Update the derived classes and callers below.
3106
3107 * server.cc (handle_query): Update.
3108 * linux-low.cc (linux_target_ops): Update.
3109 (linux_process_target::handle_monitor_command): Define.
3110 * linux-low.h (class linux_process_target): Update.
3111 * lynx-low.cc (lynx_target_ops): Update.
3112 * nto-low.cc (nto_target_ops): Update.
3113 * win32-low.cc (win32_target_ops): Update.
3114
3115 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3116
3117 Turn process_stratum_target's handle_new_gdb_connection op into a
3118 method of process_target.
3119
3120 * target.h (struct process_stratum_target): Remove the target op.
3121 (class process_target): Add the target op.
3122 (target_handle_new_gdb_connection): Update the macro.
3123 * target.cc (process_target::handle_new_gdb_connection): Define.
3124
3125 Update the derived classes and callers below.
3126
3127 * linux-low.cc (linux_target_ops): Update.
3128 (linux_handle_new_gdb_connection): Turn into ...
3129 (linux_process_target::handle_new_gdb_connection): ... this.
3130 * linux-low.h (class linux_process_target): Update.
3131 * lynx-low.cc (lynx_target_ops): Update.
3132 * nto-low.cc (nto_target_ops): Update.
3133 * win32-low.cc (win32_target_ops): Update.
3134
3135 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3136
3137 Turn process_stratum_target's supports_fork_events,
3138 supports_vfork_events, and supports_exec_events ops into methods
3139 of process_target.
3140
3141 * target.h (struct process_stratum_target): Remove the target ops.
3142 (class process_target): Add the target ops.
3143 (target_supports_fork_events): Update the macro.
3144 (target_supports_vfork_events): Update the macro.
3145 (target_supports_exec_events): Update the macro.
3146 * target.cc (process_target::supports_fork_events): Define.
3147 (process_target::supports_vfork_events): Define.
3148 (process_target::supports_exec_events): Define.
3149
3150 Update the derived classes and callers below.
3151
3152 * linux-low.cc (linux_target_ops): Update.
3153 (linux_supports_fork_events): Turn into ...
3154 (linux_process_target::supports_fork_events): ... this.
3155 (linux_supports_vfork_events): Turn into ...
3156 (linux_process_target::supports_vfork_events): ... this.
3157 (linux_supports_exec_events): Turn into ...
3158 (linux_process_target::supports_exec_events): ... this.
3159 * linux-low.h (class linux_process_target): Update.
3160 * lynx-low.cc (lynx_target_ops): Update.
3161 * nto-low.cc (nto_target_ops): Update.
3162 * win32-low.cc (win32_target_ops): Update.
3163
3164 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3165
3166 Turn process_stratum_target's supports_multi_process op into a
3167 method of process_target.
3168
3169 * target.h (struct process_stratum_target): Remove the target op.
3170 (class process_target): Add the target op.
3171 * target.cc (process_target::supports_multi_process): Define.
3172 (target_supports_multi_process): Update.
3173
3174 Update the derived classes and callers below.
3175
3176 * linux-low.cc (linux_target_ops): Update.
3177 (linux_supports_multi_process): Turn into ...
3178 (linux_process_target::supports_multi_process): ... this.
3179 * linux-low.h (class linux_process_target): Update.
3180 * lynx-low.cc (lynx_target_ops): Update.
3181 * nto-low.cc (nto_target_ops): Update.
3182 * win32-low.cc (win32_target_ops): Update.
3183
3184 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3185
3186 Turn process_stratum_target's supports_non_stop, async, and
3187 start_non_stop ops into methods of process_target.
3188
3189 * target.h (struct process_stratum_target): Remove the target ops.
3190 (class process_target): Add the target ops.
3191 (target_supports_non_stop): Update the macro.
3192 (target_async): Update the macro.
3193 (start_non_stop): Remove declaration.
3194 * target.cc (process_target::supports_non_stop): Define.
3195 (process_target::async): Define.
3196 (process_target::start_non_stop): Define.
3197 (start_non_stop): Remove.
3198
3199 Update the derived classes and callers below.
3200
3201 * server.cc (handle_qxfer_siginfo): Update.
3202 (handle_query): Update.
3203 * linux-low.cc (linux_target_ops): Update.
3204 (linux_supports_non_stop): Turn into ...
3205 (linux_process_target::supports_non_stop): ... this.
3206 (linux_async): Turn into ...
3207 (linux_process_target::async): ... this.
3208 (linux_start_non_stop): Turn into ...
3209 (linux_process_target::start_non_stop): ... this.
3210 * linux-low.h (class linux_process_target): Update.
3211 * lynx-low.cc (lynx_target_ops): Update.
3212 * nto-low.cc (nto_target_ops): Update.
3213 (nto_supports_non_stop): Remove; rely on the default behavior
3214 instead.
3215 * win32-low.cc (win32_target_ops): Update.
3216
3217 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3218
3219 Turn process_stratum_target's qxfer_siginfo op into a method of
3220 process_target.
3221
3222 * target.h (struct process_stratum_target): Remove the target op.
3223 (class process_target): Add the target op. Also add
3224 'supports_qxfer_siginfo'.
3225 * target.cc (process_target::qxfer_siginfo): Define.
3226 (process_target::supports_qxfer_siginfo): Define.
3227
3228 Update the derived classes and callers below.
3229
3230 * server.cc (handle_qxfer_siginfo): Update.
3231 (handle_query): Update.
3232 * linux-low.cc (linux_target_ops): Update.
3233 (linux_process_target::supports_qxfer_siginfo): Define.
3234 (linux_xfer_siginfo): Turn into ...
3235 (linux_process_target::qxfer_siginfo): ... this.
3236 * linux-low.h (class linux_process_target): Update.
3237 * lynx-low.cc (lynx_target_ops): Update.
3238 * nto-low.cc (nto_target_ops): Update.
3239 * win32-low.cc (win32_target_ops): Update.
3240
3241 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3242
3243 Turn process_stratum_target's qxfer_osdata op into a method of
3244 process_target.
3245
3246 * target.h (struct process_stratum_target): Remove the target op.
3247 (class process_target): Add the target op. Also add
3248 'supports_qxfer_osdata'.
3249 * target.cc (process_target::qxfer_osdata): Define.
3250 (process_target::supports_qxfer_osdata): Define.
3251
3252 Update the derived classes and callers below.
3253
3254 * server.cc (handle_qxfer_osdata): Update.
3255 (handle_query): Update.
3256 * linux-low.cc (linux_target_ops): Update.
3257 (linux_process_target::supports_qxfer_osdata): Define.
3258 (linux_qxfer_osdata): Turn into ...
3259 (linux_process_target::qxfer_osdata): ... this.
3260 * linux-low.h (class linux_process_target): Update.
3261 * lynx-low.cc (lynx_target_ops): Update.
3262 * nto-low.cc (nto_target_ops): Update.
3263 * win32-low.cc (win32_target_ops): Update.
3264
3265 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3266
3267 Turn process_stratum_target's hostio_last_error op into a
3268 method of process_target.
3269
3270 * target.h (struct process_stratum_target): Remove the target op.
3271 (class process_target): Add the target op.
3272 * target.cc: Add "hostio.h" to includes.
3273 (process_target::hostio_last_error): Define.
3274
3275 Update the derived classes and callers below.
3276
3277 * hostio.cc (hostio_error): Update.
3278 * linux-low.cc: Remove "hostio.h" from includes.
3279 (linux_target_ops): Update.
3280 * lynx-low.cc (lynx_target_ops): Update.
3281 * nto-low.cc (nto_target_ops): Update.
3282 * win32-low.h (class win32_process_target): Update.
3283 * win32-low.cc (win32_target_ops): Update.
3284 (wince_hostio_last_error): Turn into ...
3285 (win32_process_target::hostio_last_error): ... this.
3286
3287 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3288
3289 Turn process_stratum_target's get_tls_address op into a method of
3290 process_target.
3291
3292 * target.h (struct process_stratum_target): Remove the target op.
3293 (class process_target): Add the target op. Also add
3294 'supports_get_tls_address'.
3295 * target.cc (process_target::get_tls_address): Define.
3296 (process_target::supports_get_tls_address): Define.
3297
3298 Update the derived classes and callers below.
3299
3300 * server.cc (handle_query): Update.
3301 * linux-low.cc (linux_target_ops): Update.
3302 (linux_process_target::supports_get_tls_address): Define.
3303 (linux_process_target::get_tls_address): Define.
3304 * linux-low.h (class linux_process_target): Update.
3305 * lynx-low.cc (lynx_target_ops): Update.
3306 * nto-low.cc (nto_target_ops): Update.
3307 * win32-low.cc (win32_target_ops): Update.
3308
3309 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3310
3311 Turn process_stratum_target's read_offsets op into a method of
3312 process_target.
3313
3314 * target.h (struct process_stratum_target): Remove the target op.
3315 (class process_target): Add the target op. Also add
3316 'supports_read_offsets'.
3317 * target.cc (process_target::read_offsets): Define.
3318 (process_target::supports_read_offsets): Define.
3319
3320 Update the derived classes and callers below.
3321
3322 * server.cc (handle_query): Update.
3323 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3324 (linux_target_ops): Update.
3325 (linux_process_target::supports_read_offsets): Define.
3326 (linux_read_offsets): Turn into ...
3327 (linux_process_target::read_offsets): ... this.
3328 * linux-low.h (class linux_process_target): Update.
3329 * lynx-low.cc (lynx_target_ops): Update.
3330 * nto-low.cc (nto_target_ops): Update.
3331 * win32-low.cc (win32_target_ops): Update.
3332
3333 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3334
3335 Turn process_stratum_target's stopped_by_watchpoint and
3336 stopped_data_address ops into methods of process_target.
3337
3338 * target.h (struct process_stratum_target): Remove the target ops.
3339 (class process_target): Add the target ops.
3340 * target.cc (process_target::stopped_by_watchpoint): Define.
3341 (process_target::stopped_data_address): Define.
3342
3343 Update the derived classes and callers below.
3344
3345 * remote-utils.cc (prepare_resume_reply): Update.
3346 * linux-low.cc (linux_target_ops): Update.
3347 (linux_stopped_by_watchpoint): Turn into ...
3348 (linux_process_target::stopped_by_watchpoint): ... this.
3349 (linux_stopped_data_address): Turn into ...
3350 (linux_process_target::stopped_data_address): ... this.
3351 * linux-low.h (class linux_process_target): Update.
3352 * lynx-low.cc (lynx_target_ops): Update.
3353 * nto-low.cc (nto_target_ops): Update.
3354 (nto_stopped_by_watchpoint): Turn into ...
3355 (nto_process_target::stopped_by_watchpoint): ... this.
3356 (nto_stopped_data_address): Turn into ...
3357 (nto_process_target::stopped_data_address): ... this.
3358 * nto-low.h (class nto_process_target): Update.
3359 * win32-low.cc (win32_target_ops): Update.
3360 (win32_stopped_by_watchpoint): Turn into ...
3361 (win32_process_target::stopped_by_watchpoint): ... this.
3362 (win32_stopped_data_address): Turn into ...
3363 (win32_process_target::stopped_data_address): ... this.
3364 * win32-low.h (class win32_process_target): Update.
3365
3366 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3367
3368 Turn process_stratum_target's supports_hardware_single_step op into
3369 a method of process_target.
3370
3371 * target.h (struct process_stratum_target): Remove the target op.
3372 (class process_target): Add the target op.
3373 (target_supports_hardware_single_step): Update the macro.
3374 (target_can_do_hardware_single_step): Remove declaration.
3375 * target.cc (process_target::supports_hardware_single_step): Define.
3376 (target_can_do_hardware_single_step): Remove.
3377
3378 Update the derived classes and callers below.
3379
3380 * linux-low.h (class linux_process_target): Update.
3381 * linux-low.cc (linux_target_ops): Update.
3382 (linux_supports_hardware_single_step): Turn into ...
3383 (linux_process_target::supports_hardware_single_step): ... this.
3384 * lynx-low.h (class lynx_process_target): Update.
3385 * lynx-low.cc (lynx_target_ops): Update.
3386 (lynx_process_target::supports_hardware_single_step): Define.
3387 * nto-low.h (class nto_process_target): Update.
3388 * nto-low.cc (nto_target_ops): Update.
3389 (nto_process_target::supports_hardware_single_step): Define.
3390 * win32-low.h (class win32_process_target): Update.
3391 * win32-low.cc (win32_target_ops): Update.
3392 (win32_process_target::supports_hardware_single_step): Define.
3393
3394 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3395
3396 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3397 ops into methods of process_target.
3398
3399 * target.h (struct process_stratum_target): Remove the target ops.
3400 (class process_target): Add the target ops.
3401 (target_stopped_by_hw_breakpoint): Update the macro.
3402 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3403 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3404 (process_target::supports_stopped_by_hw_breakpoint): Define.
3405
3406 Update the derived classes and callers below.
3407
3408 * linux-low.cc (linux_target_ops): Update.
3409 (linux_stopped_by_hw_breakpoint): Turn into ...
3410 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3411 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3412 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3413 * linux-low.h (class linux_process_target): Update.
3414 * lynx-low.cc (lynx_target_ops): Update.
3415 * nto-low.cc (nto_target_ops): Update.
3416 * win32-low.cc (win32_target_ops): Update.
3417
3418 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3419
3420 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3421 ops into methods of process_target.
3422
3423 * target.h (struct process_stratum_target): Remove the target ops.
3424 (class process_target): Add the target ops.
3425 (target_stopped_by_sw_breakpoint): Update the macro.
3426 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3427 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3428 (process_target::supports_stopped_by_sw_breakpoint): Define.
3429
3430 Update the derived classes and callers below.
3431
3432 * linux-low.cc (linux_target_ops): Update.
3433 (linux_stopped_by_sw_breakpoint): Turn into ...
3434 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3435 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3436 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3437 * linux-low.h (class linux_process_target): Update.
3438 * lynx-low.cc (lynx_target_ops): Update.
3439 * nto-low.cc (nto_target_ops): Update.
3440 * win32-low.cc (win32_target_ops): Update.
3441
3442 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3443
3444 Turn process_stratum_target's insert_point and remove_point ops
3445 into methods of process_target.
3446
3447 * target.h (struct process_stratum_target): Remove the target ops.
3448 (class process_target): Add the target ops.
3449 * target.cc (process_target::insert_point): Define.
3450 (process_target::remove_point): Define.
3451
3452 Update the derived classes and callers below.
3453
3454 * mem-break.cc (set_raw_breakpoint_at): Update.
3455 (delete_raw_breakpoint): Update.
3456 (uninsert_raw_breakpoint): Update.
3457 (reinsert_raw_breakpoint): Update.
3458 * linux-low.cc (linux_target_ops): Update.
3459 (linux_insert_point): Turn into ...
3460 (linux_process_target::insert_point): ... this.
3461 (linux_remove_point): Turn into ...
3462 (linux_process_target::remove_point): ... this.
3463 * linux-low.h (class linux_process_target): Update.
3464 * lynx-low.cc (lynx_target_ops): Update.
3465 * nto-low.cc (nto_target_ops): Update.
3466 (nto_insert_point): Turn into ...
3467 (nto_process_target::insert_point): ... this.
3468 (nto_remove_point): Turn into ...
3469 (nto_process_target::remove_point): ... this.
3470 * nto-low.h (class nto_process_target): Update.
3471 * win32-low.cc (win32_target_ops): Update.
3472 (win32_insert_point): Turn into ...
3473 (win32_process_target::insert_point): ... this.
3474 (win32_remove_point): Turn into ...
3475 (win32_process_target::remove_point): ... this.
3476 * win32-low.h (class win32_process_target): Update.
3477
3478 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3479
3480 Turn process_stratum_target's supports_z_point_type op into a
3481 method of process_target.
3482
3483 * target.h (struct process_stratum_target): Remove the target op.
3484 (class process_target): Add the target op.
3485 * target.cc (process_target::supports_z_point_type): Define.
3486
3487 Update the derived classes and callers below.
3488
3489 * mem-break.cc (z_type_supported): Update.
3490 * linux-low.cc (linux_target_ops): Update.
3491 (linux_supports_z_point_type): Turn into ...
3492 (linux_process_target::supports_z_point_type): ... this.
3493 * linux-low.h (class linux_process_target): Update.
3494 * lynx-low.cc (lynx_target_ops): Update.
3495 * nto-low.cc (nto_target_ops): Update.
3496 (nto_supports_z_point_type): Turn into ...
3497 (nto_process_target::supports_z_point_type): ... this.
3498 * nto-low.h (class nto_process_target): Update.
3499 * win32-low.cc (win32_target_ops): Update.
3500 (win32_supports_z_point_type): Turn into ...
3501 (win32_process_target::supports_z_point_type): ... this.
3502 * win32-low.h (class win32_process_target): Update.
3503
3504 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3505
3506 Turn process_stratum_target's read_auxv op into a method of
3507 process_target.
3508
3509 * target.h (class process_stratum_target): Remove the target op.
3510 (struct process_target): Add the target op. Also add
3511 'supports_read_auxv'.
3512 * target.cc (process_target::read_auxv): Define.
3513 (process_target::supports_read_auxv): Define.
3514
3515 Update the derived classes and callers below.
3516
3517 * server.cc (handle_qxfer_auxv): Update.
3518 (handle_query): Update.
3519 * linux-low.cc (linux_target_ops): Update.
3520 (linux_process_target::supports_read_auxv): Define.
3521 (linux_read_auxv): Turn into ...
3522 (linux_process_target::read_auxv): ... this.
3523 * linux-low.h (class linux_process_target): Update.
3524 * lynx-low.cc (lynx_target_ops): Update.
3525 * nto-low.cc (nto_target_ops): Update.
3526 (nto_process_target::supports_read_auxv): Define.
3527 (nto_read_auxv): Turn into ...
3528 (nto_process_target::read_auxv): ... this.
3529 * nto-low.h (class nto_process_target): Update.
3530 * win32-low.cc (win32_target_ops): Update.
3531
3532 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3533
3534 Turn process_stratum_target's request_interrupt op into a method of
3535 process_target.
3536
3537 * target.h (struct process_stratum_target): Remove the target op.
3538 (class process_target): Add the target op.
3539
3540 Update the derived classes and callers below.
3541
3542 * remote-utils.cc (putpkt_binary_1): Update.
3543 (input_interrupt): Update.
3544 (getpkt): Update.
3545 * server.cc (handle_v_requests): Update.
3546 * linux-low.cc (linux_target_ops): Update.
3547 (linux_request_interrupt): Turn into ...
3548 (linux_process_target::request_interrupt): ... this.
3549 * linux-low.h (class linux_process_target): Update.
3550 * lynx-low.cc (lynx_target_ops): Update.
3551 (lynx_request_interrupt): Turn into ...
3552 (lynx_process_target::request_interrupt): ... this.
3553 * lynx-low.h (class lynx_process_target): Update.
3554 * nto-low.cc (nto_target_ops): Update.
3555 (nto_request_interrupt): Turn into ...
3556 (nto_process_target::request_interrupt): ... this.
3557 * nto-low.h (class nto_process_target): Update.
3558 * win32-low.cc (win32_target_ops): Update.
3559 (win32_request_interrupt): Turn into ...
3560 (win32_process_target::request_interrupt): ... this.
3561 * win32-low.h (class win32_process_target): Update.
3562
3563 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3564
3565 Turn process_stratum_target's look_up_symbols op into a method of
3566 process_target.
3567
3568 * target.h (struct process_stratum_target): Remove the target op.
3569 (class process_target): Add the target op.
3570 * target.cc (process_target::look_up_symbols): Define.
3571
3572 Update the derived classes and callers below.
3573
3574 * server.cc (handle_query): Update.
3575 * linux-low.cc (linux_target_ops): Update.
3576 (linux_look_up_symbols): Turn into ...
3577 (linux_process_target::look_up_symbols): ... this.
3578 * linux-low.h (class linux_process_target): Update.
3579 * lynx-low.cc (lynx_target_ops): Update.
3580 * nto-low.cc (nto_target_ops): Update.
3581 * win32-low.cc (win32_target_ops): Update.
3582
3583 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3584
3585 Turn process_stratum_target's read_memory and write_memory
3586 ops into methods of process_target.
3587
3588 * target.h (struct process_stratum_target): Remove the target ops.
3589 (class process_target): Add the target ops.
3590
3591 Update the derived classes and callers below.
3592
3593 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3594 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3595 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3596 (arm_get_syscall_trapinfo): Update.
3597 * linux-cris-low.cc (cris_breakpoint_at): Update.
3598 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3599 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3600 * linux-mips-low.cc (mips_breakpoint_at): Update.
3601 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3602 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3603 * linux-sh-low.cc (sh_breakpoint_at): Update.
3604 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3605 (sparc_store_gregset_from_stack): Update.
3606 (sparc_breakpoint_at): Update.
3607 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3608 * linux-tile-low.cc (tile_breakpoint_at): Update.
3609 * linux-x86-low.cc (x86_breakpoint_at): Update.
3610 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3611 * mem-brea.cc (insert_memory_breakpoint): Update.
3612 (validate_inserted_breakpoint): Update.
3613 * target.cc (read_inferior_memory): Update.
3614 (target_write_memory): Update.
3615 * linux-low.cc (linux_target_ops): Update.
3616 (linux_read_memory): Make a wrapper around the read_memory target
3617 op call.
3618 (linux_process_target::read_memory): Rename from linux_read_memory.
3619 (linux_write_memory): Turn into ...
3620 (linux_process_target::write_memory): ... this.
3621 * linux-low.h (class linux_process_target): Update.
3622 * lynx-low.cc (lynx_target_ops): Update.
3623 (lynx_read_memory): Turn into ...
3624 (lynx_process_target::read_memory): ... this.
3625 (lynx_write_memory): Turn into ...
3626 (lynx_process_target::write_memory): ... this.
3627 * lynx-low.h (class lynx_process_target): Update.
3628 * nto-low.cc (nto_target_ops): Update.
3629 (nto_read_memory): Turn into ...
3630 (nto_process_target::read_memory): ... this.
3631 (nto_write_memory): Turn into ...
3632 (nto_process_target::write_memory): ... this.
3633 * nto-low.h (class nto_process_target): Update.
3634 * win32-low.cc (win32_target_ops): Update.
3635 (win32_read_inferior_memory): Turn into ...
3636 (win32_process_target::read_memory): ... this.
3637 (win32_write_inferior_memory): Turn into ...
3638 (win32_process_target::write_memory): ... this.
3639 * win32-low.h (class win32_process_target): Update.
3640
3641 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3642
3643 Turn process_stratum_target's prepare_to_access_memory and
3644 done_accessing_memory ops into methods of process_target.
3645
3646 * target.h (struct process_stratum_target): Remove the target ops.
3647 (class process_target): Add the target ops.
3648 * target.cc (process_target::prepare_to_access_memory): Define.
3649 (process_target::done_accessing_memory): Define.
3650 (prepare_to_access_memory): Update.
3651 (done_accessing_memory): Update.
3652
3653 Update the derived classes and callers below.
3654
3655 * linux-low.cc (linux_target_ops): Update.
3656 (linux_prepare_to_access_memory): Turn into ...
3657 (linux_process_target::prepare_to_access_memory): ... this.
3658 (linux_done_accessing_memory): Turn into ...
3659 (linux_process_target::done_accessing_memory): ... this.
3660 * linux-low.h (class linux_process_target): Update.
3661 * lynx-low.cc (lynx_target_ops): Update.
3662 * nto-low.cc (nto_target_ops): Update.
3663 * win32-low.cc (win32_target_ops): Update.
3664
3665 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3666
3667 Turn process_stratum_target's fetch_registers and store_registers
3668 ops into methods of process_target.
3669
3670 * target.h (struct process_stratum_target): Remove the target ops.
3671 (class process_target): Add the target ops.
3672 (fetch_inferior_registers): Update the macro.
3673 (store_inferior_registers): Update the macro.
3674
3675 Update the derived classes and callers below.
3676
3677 * linux-low.cc (linux_target_ops): Update.
3678 (linux_fetch_registers): Turn into ...
3679 (linux_process_target::fetch_registers): ... this.
3680 (linux_store_registers): Turn into ...
3681 (linux_process_target::store_registers): ... this.
3682 * linux-low.h (class linux_process_target): Update.
3683 * lynx-low.cc (lynx_target_ops): Update.
3684 (lynx_fetch_registers): Turn into ...
3685 (lynx_process_target::fetch_registers): ... this.
3686 (lynx_store_registers): Turn into ...
3687 (lynx_process_target::store_registers): ... this.
3688 * lynx-low.h (class lynx_process_target): Update.
3689 * nto-low.cc (nto_target_ops): Update.
3690 (nto_fetch_registers): Turn into ...
3691 (nto_process_target::fetch_registers): ... this.
3692 (nto_store_registers): Turn into ...
3693 (nto_process_target::store_registers): ... this.
3694 * nto-low.h (class nto_process_target): Update.
3695 * win32-low.cc (win32_target_ops): Update.
3696 (win32_fetch_inferior_registers): Turn into ...
3697 (win32_process_target::fetch_registers): ... this.
3698 (win32_store_inferior_registers): Turn into ...
3699 (win32_process_target::store_registers): ... this.
3700 * win32-low.h (class win32_process_target): Update.
3701
3702 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3703
3704 Turn process_stratum_target's wait op into a method of
3705 process_target.
3706
3707 * target.h (struct process_stratum_target): Remove the target op.
3708 (class process_target): Add the target op.
3709
3710 Update the derived classes and callers below.
3711
3712 * target.cc (target_wait): Update.
3713 * linux-low.cc (linux_target_ops): Update.
3714 (linux_wait): Turn into ...
3715 (linux_process_target::wait): ... this.
3716 * linux-low.h (class linux_process_target): Update.
3717 * lynx-low.cc (lynx_target_ops): Update.
3718 (lynx_wait): Turn into ...
3719 (lynx_process_target::wait): ... this.
3720 * lynx-low.h (class lynx_process_target): Update.
3721 * nto-low.cc (nto_target_ops): Update.
3722 (nto_wait): Turn into ...
3723 (nto_process_target::wait): ... this.
3724 * nto-low.h (class nto_process_target): Update.
3725 * win32-low.cc (win32_target_ops): Update.
3726 (win32_wait): Turn into ...
3727 (win32_process_target::wait): ... this.
3728 (do_initial_child_stuff): Update.
3729 * win32-low.h (class win32_process_target): Update.
3730
3731 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3732
3733 Turn process_stratum_target's resume op into a method of
3734 process_target.
3735
3736 * target.h (struct process_stratum_target): Remove the target op.
3737 (class process_target): Add the target op.
3738
3739 Update the derived classes and callers below.
3740
3741 * server.cc (resume): Update.
3742 * target.cc (target_stop_and_wait): Update.
3743 (target_continue_no_signal): Update.
3744 (target_continue): Update.
3745 * linux-low.cc (linux_target_ops): Update.
3746 (linux_resume): Turn into ...
3747 (linux_process_target::resume): ... this.
3748 * linux-low.h (class linux_process_target): Update.
3749 * lynx-low.cc (lynx_target_ops): Update.
3750 (lynx_resume): Turn into ...
3751 (lynx_process_target::resume): ... this.
3752 * lynx-low.h (class lynx_process_target): Update.
3753 * nto-low.cc (nto_target_ops): Update.
3754 (nto_resume): Turn into ...
3755 (nto_process_target::resume): ... this.
3756 * nto-low.h (class nto_process_target): Update.
3757 * win32-low.cc (win32_target_ops): Update.
3758 (win32_resume): Turn into ...
3759 (win32_process_target::resume): ... this.
3760 (win32_process_target::detach): Update.
3761 (do_initial_child_stuff): Update.
3762 * win32-low.h (class win32_process_target): Update.
3763
3764 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3765
3766 Turn process_stratum_target's thread_alive op into a method of
3767 process_target.
3768
3769 * target.h (struct process_stratum_target): Remove the target op.
3770 (class process_target): Add the target op.
3771 (mythread_alive): Update the macro.
3772
3773 Update the derived classes and callers below.
3774
3775 * linux-low.cc (linux_target_ops): Update.
3776 (linux_thread_alive): Turn into ...
3777 (linux_process_target::thread_alive): ... this.
3778 (wait_for_sigstop): Update.
3779 * linux-low.h (class linux_process_target): Update.
3780 * lynx-low.cc (lynx_target_ops): Update.
3781 (lynx_thread_alive): Turn into ...
3782 (lynx_process_target::thread_alive): ... this.
3783 * lynx-low.h (class lynx_process_target): Update.
3784 * nto-low.cc (nto_target_ops): Update.
3785 (nto_thread_alive): Turn into ...
3786 (nto_process_target::thread_alive): ... this.
3787 * nto-low.h (class nto_process_target): Update.
3788 * win32-low.cc (win32_target_ops): Update.
3789 (win32_thread_alive): Turn into ...
3790 (win32_process_target::thread_alive): ... this.
3791 * win32-low.h (class win32_process_target): Update.
3792
3793 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3794
3795 Turn process_stratum_target's join op into a method of
3796 process_target.
3797
3798 * target.h (struct process_stratum_target): Remove the target op.
3799 (class process_target): Add the target op.
3800 (join_inferior): Update the macro.
3801
3802 Update the derived classes and callers below.
3803
3804 * linux-low.cc (linux_target_ops): Update.
3805 (linux_join): Turn into ...
3806 (linux_process_target::join): ... this.
3807 * linux-low.h (class linux_process_target): Update.
3808 * lynx-low.cc (lynx_target_ops): Update.
3809 (lynx_join): Turn into ...
3810 (lynx_process_target::join): ... this.
3811 * lynx-low.h (class lynx_process_target): Update.
3812 * nto-low.cc (nto_target_ops): Update.
3813 (nto_process_target::join): Define.
3814 * nto-low.h (class nto_process_target): Update.
3815 * win32-low.cc (win32_target_ops): Update.
3816 (win32_join): Turn into ...
3817 (win32_process_target::join): ... this.
3818 * win32-low.h (class win32_process_target): Update.
3819
3820 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3821
3822 Turn process_stratum_target's mourn op into a method of
3823 process_target.
3824
3825 * target.h (struct process_stratum_target): Remove the target op.
3826 (class process_target): Add the target op.
3827
3828 Update the derived classes and callers below.
3829
3830 * target.cc (target_mourn_inferior): Update.
3831 * linux-low.cc (linux_target_ops): Update.
3832 (linux_mourn): Turn into ...
3833 (linux_process_target::mourn): ... this.
3834 (handle_extended_wait): Update.
3835 (linux_process_target::kill): Update.
3836 (linux_process_target::detach): Update.
3837 * linux-low.h (class linux_process_target): Update.
3838 * lynx-low.cc (lynx_target_ops): Update.
3839 (lynx_mourn): Turn into ...
3840 (lynx_process_target::mourn): ... this.
3841 * lynx-low.h (class lynx_process_target): Update.
3842 * nto-low.cc (nto_target_ops): Update.
3843 (nto_mourn): Turn into ...
3844 (nto_process_target::mourn): ... this.
3845 * nto-low.h (class nto_process_target): Update.
3846 * win32-low.cc (win32_target_ops): Update.
3847 (win32_mourn): Turn into ...
3848 (win32_process_target::mourn): ... this.
3849 * win32-low.h (class win32_process_target): Update.
3850
3851 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3852
3853 Turn process_stratum_target's detach op into a method of
3854 process_target.
3855
3856 * target.h (struct process_stratum_target): Remove the target op.
3857 (class process_target): Add the target op.
3858 (detach_inferior): Update the macro.
3859
3860 Update the derived classes and callers below.
3861
3862 * linux-low.cc (linux_target_ops): Update.
3863 (linux_detach): Turn into ...
3864 (linux_process_target::detach): ... this.
3865 * linux-low.h (class linux_process_target): Update.
3866 * lynx-low.cc (lynx_target_ops): Update.
3867 (lynx_detach): Turn into ...
3868 (lynx_process_target::detach): ... this.
3869 * lynx-low.h (class lynx_process_target): Update.
3870 * nto-low.cc (nto_target_ops): Update.
3871 (nto_detach): Turn into ...
3872 (nto_process_target::detach): ... this.
3873 * nto-low.h (class nto_process_target): Update.
3874 * win32-low.cc (win32_target_ops): Update.
3875 (win32_detach): Turn into ...
3876 (win32_process_target::detach): ... this.
3877 * win32-low.h (class win32_process_target): Update.
3878
3879 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3880
3881 Turn process_stratum_target's kill op into a method of
3882 process_target.
3883
3884 * target.h (struct process_stratum_target): Remove the target op.
3885 (class process_target): Add the target op.
3886
3887 Update the derived classes and callers below.
3888
3889 * target.cc (kill_inferior): Update.
3890 * linux-low.cc (linux_target_ops): Update.
3891 (linux_kill): Turn into ...
3892 (linux_process_target::kill): ... this.
3893 * linux-low.h (class linux_process_target): Update.
3894 * lynx-low.cc (lynx_target_ops): Update.
3895 (lynx_kill): Turn into ...
3896 (lynx_process_target::kill): ... this.
3897 * lynx-low.h (class lynx_process_target): Update.
3898 * nto-low.cc (nto_target_ops): Update.
3899 (nto_kill): Turn into ...
3900 (nto_process_target::kill): ... this.
3901 * nto-low.h (class nto_process_target): Update.
3902 * win32-low.cc (win32_target_ops): Update.
3903 (win32_kill): Turn into ...
3904 (win32_process_target::kill): ... this.
3905 * win32-low.h (class win32_process_target): Update.
3906
3907 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3908
3909 Turn process_stratum_target's attach op into a method of
3910 process_target.
3911
3912 * target.h (struct process_stratum_target): Remove the target op.
3913 (class process_target): Add the target op.
3914 (myattach): Update the macro.
3915
3916 Update the derived classes and callers below.
3917
3918 * linux-low.cc (linux_target_ops): Update.
3919 (linux_attach): Turn into ...
3920 (linux_process_target::attach): ... this.
3921 * linux-low.h (class linux_process_target): Update.
3922 * lynx-low.cc (lynx_target_ops): Update.
3923 (lynx_attach): Turn into ...
3924 (lynx_process_target::attach): ... this.
3925 * lynx-low.h (class lynx_process_target): Update.
3926 * nto-low.cc (nto_target_ops): Update.
3927 (nto_attach): Turn into ...
3928 (nto_process_target::attach): ... this.
3929 * nto-low.h (class nto_process_target): Update.
3930 * win32-low.cc (win32_target_ops): Update.
3931 (win32_attach): Turn into ...
3932 (win32_process_target::attach): ... this.
3933 * win32-low.h (class win32_process_target): Update.
3934
3935 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3936
3937 Turn process_stratum_target's post_create_inferior op into a method
3938 of process_target.
3939
3940 * target.h (struct process_stratum_target): Remove the target op.
3941 (class process_target): Add the target op.
3942 (target_post_create_inferior): Update the macro.
3943 * target.cc (process_target::post_create_inferior): Define.
3944
3945 Update the derived classes and callers below.
3946
3947 * linux-low.cc (linux_target_ops): Update.
3948 (linux_post_create_inferior): Turn into ...
3949 (linux_process_target::post_create_inferior): ... this.
3950 * linux-low.h (class linux_process_target): Update.
3951 * lynx-low.cc (lynx_target_ops): Update.
3952 * nto-low.cc (nto_target_ops): Update.
3953 * win32-low.cc (win32_target_ops): Update.
3954
3955 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3956
3957 Turn process_stratum_target's create_inferior op into a method of
3958 process_target.
3959
3960 * target.h (struct process_stratum_target): Remove the target op.
3961 (class process_target): Add the target op.
3962 (create_inferior): Rename the macro to ...
3963 (target_create_inferior): ... this.
3964
3965 Update the derived classes and callers below.
3966
3967 * server.cc (handle_v_run): Update.
3968 (captured_main): Update.
3969 (process_serial_event): Update.
3970 * linux-low.cc (linux_target_ops): Update.
3971 (linux_create_inferior): Turn into ...
3972 (linux_process_target::create_inferior): ... this.
3973 * linux-low.h (class linux_process_target): Update.
3974 * lynx-low.cc (lynx_target_ops): Update.
3975 (lynx_create_inferior): Turn into ...
3976 (lynx_process_target::create_inferior): ... this.
3977 * lynx-low.h (class lynx_process_target): Update.
3978 * nto-low.cc (nto_target_ops): Update.
3979 (nto_create_inferior): Turn into ...
3980 (nto_process_target::create_inferior): ... this.
3981 * nto-low.h (class nto_process_target): Update.
3982 * win32-low.cc (win32_target_ops): Update.
3983 (win32_create_inferior): Turn into ...
3984 (win32_process_target::create_inferior): ... this.
3985 * win32-low.h (class win32_process_target): Update.
3986
3987 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3988
3989 * target.h (class process_target): New class definition.
3990 (struct process_stratum_target) <pt>: New field with type
3991 'process_target*'.
3992 * linux-low.h (class linux_process_target): Define as a derived
3993 class of 'process_target'.
3994 * linux-low.cc (linux_target_ops): Add a linux_process_target*
3995 as the 'pt' field.
3996 * lynx-low.h (class lynx_process_target): Define as a derived
3997 class of 'process_target'.
3998 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
3999 as the 'pt' field.
4000 * nto-low.h (class nto_process_target): Define as a derived
4001 class of 'process_target'.
4002 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4003 as the 'pt' field.
4004 * win32-low.h (class win32_process_target): Define as a derived
4005 class of 'process_target'.
4006 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4007 as the 'pt' field.
4008
4009 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4010
4011 * configure: Regenerate.
4012
4013 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4014 Andrew Burgess <andrew.burgess@embecosm.com>
4015
4016 * linux-riscv-low.cc: New file.
4017 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4018 and nat/riscv-linux-tdesc.c.
4019 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4020 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4021 Define.
4022
4023 2020-02-14 Tom Tromey <tom@tromey.com>
4024
4025 * acinclude.m4: Don't include acx_configure_dir.m4.
4026 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4027 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4028 (all, install-only, uninstall, clean-info, clean)
4029 (maintainer-clean): Don't recurse.
4030 (subdir_do, all-lib): Remove.
4031 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4032 (GNULIB_H): Remove.
4033 (generated_files): Update.
4034 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4035 * configure: Rebuild.
4036 * configure.ac: Don't configure gnulib or libiberty.
4037 (GNULIB): Update.
4038
4039 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4040
4041 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4042 preparing the command line for CreateProcess.
4043 (win32_create_inferior): Reflect the program name in debugging
4044 output that shows the process and its command line.
4045
4046 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4047
4048 * Makefile.in: Rename source files from .c to .cc.
4049 * %.c: Rename to %.cc.
4050 * configure.ac: Rename server.c to server.cc.
4051 * configure: Re-generate.
4052
4053 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4054
4055 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4056
4057 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4058
4059 * win32-low.c (win32_create_inferior): Set signal_pid.
4060
4061 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4062 Pedro Alves <palves@redhat.com>
4063
4064 Skip building gdbserver in a cross-configuration.
4065 * configure.srv: Set $gdbserver_host depending on whether $target
4066 is $host. Use $gdbserver_host instead of $host.
4067
4068 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4069
4070 * configure: Re-generate.
4071
4072 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4073
4074 * configure: Re-generate.
4075
4076 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4077
4078 * acinclude.m4: Update warning.m4 path.
4079
4080 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4081
4082 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4083 (handle_exception): Set siginfo_er.
4084 (win32_xfer_siginfo): New function.
4085
4086 2020-02-07 Tom Tromey <tom@tromey.com>
4087 Pedro Alves <palves@redhat.com>
4088
4089 * README: Update build documentation.
4090 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4091 host, not target.
4092 * configure.ac: Update paths.
4093 * configure: Rebuild.
4094 * acinclude.m4: Update paths.
4095 * Makefile.in: Update include paths.
4096 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4097 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4098 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4099 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4100 (%-generated.c): Update paths.
4101 * Move entire directory from ../gdb/gdbserver.
4102
4103 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4104
4105 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4106
4107 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4108
4109 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4110 assignment instead of srv_linux_obj.
4111
4112 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4113
4114 * server.c (handle_qxfer_libraries): Write segment-address with
4115 paddress.
4116
4117 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4118
4119 * Makefile.in (install-strip): New target.
4120 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4121 * aclocal.m4: Regenerate.
4122 * configure: Regenerate.
4123 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4124
4125 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4126
4127 * Makefile.in (SFILES): Adjust paths to point to real files.
4128 (OBS): Move waitstatus.o to target/waitstatus.o.
4129 (TAGS): Transform paths appropriately.
4130 (%.o): Rename to...
4131 (nat/%.o): ... this pattern rule.
4132 (%.o): Rename to...
4133 (target/%.o): ... this pattern rule.
4134 * configure.srv: Adjust paths throughout to include nat/ prefix
4135 with the revant files.
4136 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4137 * configure: Regenerate.
4138
4139 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4140
4141 * Makefile.in (TAGS): Remove config files from the recipe.
4142
4143 2020-01-14 Tom Tromey <tom@tromey.com>
4144
4145 * configure: Rebuild.
4146 * configure.ac: Remove any checks that were added to common.m4.
4147 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4148 lib-link.m4.
4149
4150 2020-01-14 Tom Tromey <tom@tromey.com>
4151
4152 * server.h: Include config.h.
4153 * gdbreplay.c: Include config.h.
4154 * configure: Rebuild.
4155 * configure.ac: Don't source common.host.
4156 * acinclude.m4: Update path.
4157 * Makefile.in (INCSUPPORT): New variable.
4158 (INCLUDE_CFLAGS): Add INCSUPPORT.
4159 (SFILES): Update paths.
4160 (version-generated.c): Update path to create-version.sh.
4161 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4162
4163 2020-01-14 Tom Tromey <tom@tromey.com>
4164
4165 * configure.ac (LIBS): Use WIN32APILIBS.
4166 (USE_WIN32API): Don't define.
4167 * configure: Rebuild.
4168
4169 2020-01-14 Tom Tromey <tom@tromey.com>
4170
4171 * configure: Rebuild.
4172
4173 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4174
4175 * Makefile.in (%-generated.c): Remove rule for files from
4176 regformats/i386.
4177
4178 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4179
4180 * configure: Re-generate.
4181
4182 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4183
4184 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4185 Define to static.
4186 * tracepoint.c (stop_tracing, flush_trace_buffer,
4187 about_to_request_buffer_space, get_trace_state_variable_value,
4188 set_trace_state_variable_value, gdb_collect): Add declaration.
4189
4190 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4191
4192 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4193 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4194 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4195 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4196 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4197 static.
4198
4199 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4200
4201 * inferiors.c: Include gdbsupport/common-inferior.h.
4202
4203 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4204
4205 * hostio-errno.c: Include hostio.h.
4206
4207 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4208
4209 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4210 prerequisite.
4211
4212 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4213
4214 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4215 * linux-arm-tdesc.h: Include arch/arm.h.
4216
4217 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4218
4219 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4220
4221 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4222
4223 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4224 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4225
4226 2020-01-10 Pedro Alves <palves@redhat.com>
4227
4228 * fork-child.c (post_fork_inferior): Pass target down to
4229 startup_inferior.
4230 * inferiors.c (switch_to_thread): Add process_stratum_target
4231 parameter.
4232 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4233 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4234 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4235 * remote-utils.c (prepare_resume_reply): Pass the target to
4236 switch_to_thread.
4237 * target.c (the_target): Now a process_stratum_target.
4238 (done_accessing_memory): Pass the target to switch_to_thread.
4239 (set_target_ops): Ajust to use process_stratum_target.
4240 * target.h (struct target_ops): Rename to ...
4241 (struct process_stratum_target): ... this.
4242 (the_target, set_target_ops): Adjust.
4243 (prepare_to_access_memory): Adjust comment.
4244 * win32-low.c (child_xfer_memory): Adjust to use
4245 process_stratum_target.
4246 (win32_target_ops): Now a process_stratum_target.
4247
4248 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4249 Pedro Alves <palves@redhat.com>
4250
4251 * win32-low.c (get_child_debug_event): Extract the fatal exception
4252 from the exit status and convert to the equivalent Posix signal
4253 number.
4254 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4255 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4256
4257 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4258
4259 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4260
4261 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4262
4263 * server.c (gdbserver_version): Change copyright year to 2020.
4264 * gdbreplay.c (gdbreplay_version): Likewise.
4265
4266 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4267
4268 * configure: Regenerate.
4269 * configure.ac: Quote variable arguments of test.
4270
4271 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4272
4273 * Makefile.in: Fix build with GNU Make 3.81
4274
4275 2019-12-16 Tom Tromey <tromey@adacore.com>
4276
4277 * server.c (get_exec_file): Constify result.
4278
4279 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4280
4281 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4282 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4283 * config.in: Regenerate.
4284 * configure: Regenerate.
4285 * configure.ac: Don't check for strerror.
4286 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4287 Call safe_strerror instead of strerror.
4288 * server.h (strerror): Remove this now-unnecessary declaration.
4289 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4290 strerror.
4291 (gdb_agent_helper_thread): Likewise.
4292 * utils.c (perror_with_name): Likewise.
4293
4294 2019-11-26 Tom Tromey <tom@tromey.com>
4295
4296 * configure, config.in: Rebuild.
4297
4298 2019-11-26 Tom Tromey <tom@tromey.com>
4299
4300 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4301 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4302 gdb_sigmask.
4303 * configure, config.in: Rebuild.
4304
4305 2019-11-26 Tom Tromey <tom@tromey.com>
4306
4307 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4308 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4309 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4310 * acinclude.m4: Include ax_pthread.m4.
4311 * config.in, configure: Rebuild.
4312
4313 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4314
4315 * debug.c (debug_set_output): Call safe_strerror instead of
4316 strerror.
4317 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4318 (linux_kill_one_lwp): Likewise.
4319 (linux_detach_one_lwp): Likewise.
4320 (linux_wait_for_event_filtered): Likewise.
4321 (store_register): Likewise.
4322 * lynx-low.c (lynx_attach): Likewise.
4323 * mem-break.c (insert_memory_breakpoint): Likewise.
4324 (remove_memory_breakpoint): Likewise.
4325 (delete_fast_tracepoint_jump): Likewise.
4326 (set_fast_tracepoint_jump): Likewise.
4327 (uninsert_fast_tracepoint_jumps_at): Likewise.
4328 (reinsert_fast_tracepoint_jumps_at): Likewise.
4329 * nto-low.c (nto_xfer_memory): Likewise.
4330 (nto_resume): Likewise.
4331
4332 2019-11-20 Luis Machado <luis.machado@linaro.org>
4333
4334 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4335 instead of register count.
4336 * tdesc.c (tdesc_contains_feature): New function.
4337 * tdesc.h (tdesc_contains_feature): New prototype.
4338
4339 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4340
4341 * Makefile.in: Add safe-strerror.c.
4342 * configure: Regenerate.
4343 * configure.ac: Don't source common.host.
4344
4345 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4346
4347 * config.in: Regenerate.
4348 * configure: Regenerate.
4349
4350 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4351
4352 * ax.c (ax_printf): Handle size_t_arg.
4353
4354 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4355
4356 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4357 * mi/mi-main.c (output_cores): Likewise.
4358 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4359 (linux_xfer_osdata_modules): Likewise.
4360 * remote.c (register_remote_support_xml): Likewise.
4361 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4362 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4363
4364 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4365
4366 * configure: Regenerate.
4367 * configure.ac: Remove check for strerror_r.
4368
4369 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4370
4371 * config.in: Regenerate.
4372 * configure: Regenerate.
4373 * configure.ac: Also check for strerror_r.
4374
4375 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4376
4377 * ax.h (debug_agent): Remove duplicate declaration.
4378
4379 2019-10-26 Tom de Vries <tdevries@suse.de>
4380
4381 * linux-aarch64-low.c: Fix typos in comments.
4382 * linux-arm-low.c: Same.
4383 * linux-low.c: Same.
4384 * linux-ppc-low.c: Same.
4385 * proc-service.c: Same.
4386 * regcache.h: Same.
4387 * server.c: Same.
4388 * tracepoint.c: Same.
4389 * win32-low.c: Same.
4390
4391 2019-10-25 Tom Tromey <tromey@adacore.com>
4392
4393 * utils.c (xstrdup): Remove.
4394
4395 2019-10-23 Tom Tromey <tom@tromey.com>
4396
4397 * configure, config.in: Rebuild.
4398
4399 2019-10-23 Tom Tromey <tom@tromey.com>
4400
4401 * configure: Rebuild.
4402 * acinclude.m4: Use m4_include, not sinclude.
4403
4404 2019-10-17 Tom Tromey <tromey@adacore.com>
4405
4406 * configure: Rebuild.
4407 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4408 in AC_CONFIG_FILES invocation.
4409 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4410 invocation.
4411
4412 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4413
4414 * server.c: Include xml-builtin.h.
4415 (get_xml_features): Don't declare xml_builtins here.
4416
4417 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4418
4419 * Makefile.in: Remove references to vec-ipa.o.
4420
4421 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4422
4423 * Makefile.in: Remove references to vec.c.
4424
4425 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4426
4427 * server.c (server_waiting): Change to bool.
4428 (extended_protocol): Likewise.
4429 (response_needed): Likewise.
4430 (exit_requested): Likewise.
4431 (run_once): Likewise.
4432 (report_no_resumed): Likewise.
4433 (non_stop): Likewise.
4434 (disable_packet_vCont): Likewise.
4435 (disable_packet_Tthread): Likewise.
4436 (disable_packet_qC): Likewise.
4437 (disable_packet_qfThreadInfo): Likewise.
4438 (handle_general_set): Update.
4439 (handle_detach): Update.
4440 (handle_monitor_command): Update.
4441 (handle_query): Update.
4442 (captured_main): Update.
4443 (process_serial_event): Update.
4444 * server.h (server_waiting): Change to bool.
4445 (disable_packet_vCont): Likewise.
4446 (disable_packet_Tthread): Likewise.
4447 (disable_packet_qC): Likewise.
4448 (disable_packet_qfThreadInfo): Likewise.
4449 (run_once): Likewise.
4450 (non_stop): Likewise.
4451 * target.c (target_stop_and_wait): Update.
4452
4453 2019-10-02 Tom Tromey <tromey@adacore.com>
4454
4455 * Makefile.in (SFILES): Add common-inferior.c.
4456 (OBS): Add common-inferior.o.
4457 * server.c (startup_with_shell): Don't define.
4458
4459 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4460
4461 * linux-low.c (linux_low_read_btrace): Update for change to
4462 std::vector.
4463
4464 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4465
4466 * debug.c (debug_threads): Remove comment in favor of the header.
4467 * debug.h (using_threads): Add declaration.
4468 (debug_threads): Add comment.
4469 * linux-aarch64-low.c: Include debug.h and remove declaration of
4470 debug_threads.
4471 * nto-low.c: Likewise.
4472 * remote-utils.c: Likewise.
4473 * thread-db.c: Likewise.
4474
4475 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4476
4477 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4478 and powerpc-cell64l-ipa.o.
4479 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4480 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4481 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4482 (spu*-*-*): Remove.
4483
4484 * spu-low.c: Remove file.
4485
4486 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4487 (parse_spufs_run): Remove.
4488 (ppc_get_pc): Remove Cell/B.E. support.
4489 (ppc_set_pc): Likewise.
4490 (ppc_breakpoint_at): Likewise.
4491 (ppc_arch_setup): Likewise.
4492 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4493 tdesc_powerpc_cell32l.
4494 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4495 or init_registers_powerpc_cell32l.
4496 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4497 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4498 or init_registers_powerpc_cell32l.
4499 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4500 (init_registers_powerpc_cell32l): Remove prototype.
4501 (init_registers_powerpc_cell64l): Likewise.
4502
4503 * target.h (struct target_ops): Remove qxfer_spu member.
4504 * server.c (handle_qxfer_spu): Remove.
4505 (qxfer_packets): Remove entry for "spu".
4506 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4507 * linux-low.c (SPUFS_MAGIC): Remove.
4508 (spu_enumerate_spu_ids): Remove.
4509 (linux_qxfer_spu): Remove.
4510 (linux_target_ops): Remove qxfer_spu member.
4511 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4512 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4513 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4514
4515 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4516
4517 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4518 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4519 * config.in: Regenerate.
4520 * configure: Regenerate.
4521
4522 2019-08-15 Tom Tromey <tromey@adacore.com>
4523
4524 * target.c (target_write_memory): Use gdb::byte_vector.
4525
4526 2019-08-15 Tom Tromey <tromey@adacore.com>
4527
4528 * tracepoint.c (write_inferior_data_pointer)
4529 (write_inferior_integer, write_inferior_int8)
4530 (write_inferior_uinteger, m_tracepoint_action_download)
4531 (r_tracepoint_action_download, x_tracepoint_action_download)
4532 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4533 (download_agent_expr, download_tracepoint_1)
4534 (download_trace_state_variables, upload_fast_traceframes): Update.
4535 * server.c (gdb_write_memory): Update.
4536 * remote-utils.c (relocate_instruction): Update.
4537 * proc-service.c (ps_pdwrite): Update.
4538 * mem-break.c (remove_memory_breakpoint)
4539 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4540 (uninsert_fast_tracepoint_jumps_at)
4541 (reinsert_fast_tracepoint_jumps_at): Update.
4542 * linux-x86-low.c (append_insns)
4543 (i386_install_fast_tracepoint_jump_pad)
4544 (amd64_write_goto_address, i386_write_goto_address): Update.
4545 * linux-s390-low.c (append_insns, s390_write_goto_address):
4546 Update.
4547 * linux-ppc-low.c (ppc_relocate_instruction)
4548 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4549 (ppc_write_goto_address): Update.
4550 * linux-aarch64-low.c (append_insns): Update.
4551 * target.h (struct target_ops): Update.
4552 (write_inferior_memory): Don't declare.
4553 * target.c (target_write_memory): Rename from
4554 write_inferior_memory. Remove old target_write_memory.
4555
4556 2019-08-15 Tom Tromey <tromey@adacore.com>
4557
4558 * target.c (write_inferior_memory): Use std::vector.
4559
4560 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4561
4562 PR build/24886
4563 * configure.ac: Drop enable-libmcheck support.
4564 * configure, config.in: Rebuild.
4565 * acinclude.m4: Don't include it.
4566
4567 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4568
4569 * configure.srv: Remove Arm xml files.
4570
4571 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4572
4573 * configure.srv: Add new files. Remove xml generated files.
4574 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4575 registers.
4576 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4577 * linux-aarch32-tdesc.c: New file.
4578 * linux-aarch32-tdesc.h: New file.
4579 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4580 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4581 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4582 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4583 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4584 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4585 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4586 (arm_read_description): Call arm_linux_read_description.
4587 (initialize_low_arch): Don't init registers.
4588 * linux-arm-tdesc.c: New file.
4589 * linux-arm-tdesc.h: New file.
4590
4591 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4592
4593 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4594 Move counter inside for.
4595 (arm_read_description): Check ptrace earlier.
4596 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4597
4598 2019-07-09 Tom Tromey <tom@tromey.com>
4599
4600 * configure: Rebuild.
4601 * configure.ac: Change common to gdbsupport.
4602 * acinclude.m4: Change common to gdbsupport.
4603 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4604 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4605 common to gdbsupport.
4606 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4607 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4608 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4609 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4610 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4611 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4612 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4613 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4614 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4615 common to gdbsupport.
4616
4617 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4618
4619 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4620 defines.
4621 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4622
4623 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4624
4625 * configure.srv: Remove legacy xml.
4626 * linux-aarch64-low.c (initialize_low_arch): Remove
4627 initialize_low_tdesc call.
4628 * linux-aarch64-tdesc-selftest.c: Remove file.
4629 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4630 * linux-x86-low.c (initialize_low_arch): Remove
4631 initialize_low_tdesc call.
4632 * linux-x86-tdesc-selftest.c: Remove file.
4633 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4634
4635 2019-06-20 Tom de Vries <tdevries@suse.de>
4636
4637 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4638 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4639
4640 2019-06-19 Tom de Vries <tdevries@suse.de>
4641
4642 * debug.h (debug_write): Change return type to ssize_t.
4643 * debug.c (debug_write): Same.
4644
4645 2019-06-14 Tom Tromey <tom@tromey.com>
4646
4647 * configure.ac: Use new path to gnulib.
4648 * configure: Rebuild.
4649 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4650 to gnulib.
4651
4652 2019-06-11 Tom Tromey <tom@tromey.com>
4653
4654 * Makefile.in (SFILES): Add alloc.c.
4655 (OBS): Add alloc.o.
4656 (IPA_OBJS): Add alloc-ipa.o.
4657 (alloc-ipa.o): New target.
4658 (%.o: ../%.c): New pattern rule.
4659
4660 2019-06-10 Tom Tromey <tromey@adacore.com>
4661
4662 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4663 end warning with a newline.
4664 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4665 newline.
4666 * thread-db.c (attach_thread): Don't end warning with a newline.
4667 (thread_db_notice_clone): Likewise.
4668 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4669 newline.
4670 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4671 end warning with a newline.
4672
4673 2019-06-04 Pedro Alves <palves@redhat.com>
4674
4675 * server.c (captured_main): Use make_unique_xstrdup.
4676
4677 2019-06-02 Tom Tromey <tom@tromey.com>
4678
4679 * gdbreplay.c (fromhex): Remove.
4680 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4681
4682 2019-05-29 Tom Tromey <tromey@adacore.com>
4683
4684 * configure: Rebuild.
4685
4686 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4687
4688 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4689 sign extension code on 32-bit builds.
4690
4691 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4692
4693 * remote-utils.c:
4694 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4695
4696 2019-04-19 Tom Tromey <tom@tromey.com>
4697
4698 * server.c (struct vstop_notif): Derive from notif_event.
4699 <base>: Remove.
4700 (queue_stop_reply): Update.
4701 (remove_all_on_match_ptid): Change type. Rewrite.
4702 (discard_queued_stop_replies): Rewrite.
4703 (in_queued_stop_replies_ptid): Change type.
4704 (in_queued_stop_replies): Rewrite.
4705 (notif_stop): Update.
4706 (queue_stop_reply_callback): Update.
4707 (captured_main): Don't call initialize_notif.
4708 (push_stop_notification): Update.
4709 * notif.c (notif_write_event, handle_notif_ack)
4710 (notif_event_enque, notif_push): Update.
4711 (notif_event_xfree, initialize_notif): Remove.
4712 * notif.h (struct notif_event): Include <list>, not
4713 "common/queue.h".
4714 (struct notif_server) <queue>: Now a std::list.
4715 (notif_event_p): Remove typedef.
4716 (initialize_notif): Don't declare.
4717 (struct notif_event): Add virtual destructor.
4718
4719 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4720
4721 * ax.c (ax_vdebug): Call debug_printf.
4722 * debug.c (debug_write): New function.
4723 * debug.h (debug_write): New declaration.
4724 * linux-low.c (sigchld_handler): Call debug_write.
4725
4726 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4727
4728 * debug.c (debug_set_output): New function.
4729 (debug_vprintf): Send output to debug_file.
4730 (debug_flush): Likewise.
4731 * debug.h (debug_set_output): New declaration.
4732 * server.c (handle_monitor_command): Add debug-file option.
4733 (captured_main): Likewise.
4734
4735 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4736
4737 * debug.c (remote_debug): Add definition.
4738 * debug.h (remote_debug): Add declaration.
4739 * hostio.c (remote_debug): Remove declaration.
4740 * remote-utils.c (struct ui_file): Likewise.
4741 (remote_debug): Likewise.
4742 * remote-utils.h (remote_debug): Likewise,
4743 * server.c (remote_debug): Remove definition.
4744
4745 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4746
4747 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4748 when using a 64-bit gdbserver.
4749
4750 2019-04-09 Tom Tromey <tromey@adacore.com>
4751
4752 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4753
4754 2019-04-08 Tom Tromey <tom@tromey.com>
4755
4756 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4757 throw.
4758 (linux_resume_one_lwp): Likewise.
4759
4760 2019-04-08 Tom Tromey <tom@tromey.com>
4761
4762 * gdbreplay.c: Update.
4763 * linux-low.c: Update.
4764 * server.c: Update.
4765
4766 2019-04-08 Tom Tromey <tom@tromey.com>
4767
4768 * server.c: Use C++ exception handling.
4769 * linux-low.c: Use C++ exception handling.
4770 * gdbreplay.c: Use C++ exception handling.
4771
4772 2019-04-08 Tom Tromey <tom@tromey.com>
4773
4774 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4775 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4776 (captured_main, main): Update.
4777 * gdbreplay.c (main): Update.
4778
4779 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4780
4781 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4782 value in argument pointer, return 1 if the entry is found and 0
4783 otherwise. Move comment.
4784 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4785 * linux-low.h (linux_get_auxv): Declare.
4786 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4787
4788 2019-04-05 Tom Tromey <tromey@adacore.com>
4789
4790 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4791 variables.
4792
4793 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4794
4795 * linux-low.c (AT_HWCAP2): Add define if not already included.
4796
4797 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4798
4799 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4800 (aarch64_arch_setup): Call linux_get_hwcap.
4801 * linux-arm-low.c (arm_get_hwcap): Remove function.
4802 (arm_read_description): Call linux_get_hwcap.
4803 * linux-low.c (linux_get_auxv): New function.
4804 (linux_get_hwcap): Likewise.
4805 (linux_get_hwcap2): Likewise.
4806 * linux-low.h (linux_get_hwcap): New declaration.
4807 (linux_get_hwcap2): Likewise.
4808 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4809 (ppc_arch_setup): Call linux_get_hwcap.
4810 * linux-s390-low.c (s390_get_hwcap): Remove function.
4811 (s390_arch_setup): Call linux_get_hwcap.
4812
4813 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4814 Jiong Wang <jiong.wang@arm.com>
4815
4816 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4817 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4818 to fail.
4819 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4820
4821 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4822 Jiong Wang <jiong.wang@arm.com>
4823
4824 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4825 (aarch64_get_hwcap): New function.
4826 (aarch64_arch_setup): Read APIA hwcap.
4827
4828 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4829 Jiong Wang <jiong.wang@arm.com>
4830
4831 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4832 (initialize_low_tracepoint): Likewise.
4833 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4834 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4835 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4836 (aarch64_linux_read_description): Likewise.
4837 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4838
4839 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4840
4841 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4842 i386_create_target_description for 'segments' parameter.
4843 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4844 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4845 * win32-i386-low.c (i386_arch_setup): Likewise.
4846
4847 2019-03-12 Tom Tromey <tromey@adacore.com>
4848
4849 * linux-low.c (iterate_over_lwps): Update.
4850
4851 2019-03-06 Tom Tromey <tom@tromey.com>
4852
4853 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4854 (captured_main): Use SCOPE_EXIT.
4855
4856 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4857
4858 * configure.srv: Use '$enable_unittest' instead of '$development'
4859 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4860 case.
4861
4862 2019-02-27 Tom Tromey <tromey@adacore.com>
4863
4864 * gdbreplay.c (logchar): Handle \r\n.
4865
4866 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4867
4868 * linux-low.c (linux_attach): Add process before lwp.
4869 * server.c (attach_inferior): Check if already attached.
4870
4871 2019-02-07 Tom Tromey <tom@tromey.com>
4872
4873 * x86-tdesc.h: Rename include guard.
4874 * x86-low.h: Add include guard.
4875 * wincecompat.h: Rename include guard.
4876 * win32-low.h: Add include guard.
4877 * utils.h: Rename include guard.
4878 * tracepoint.h: Rename include guard.
4879 * tdesc.h: Rename include guard.
4880 * target.h: Rename include guard.
4881 * server.h: Rename include guard.
4882 * remote-utils.h: Rename include guard.
4883 * regcache.h: Rename include guard.
4884 * nto-low.h: Rename include guard.
4885 * notif.h: Add include guard.
4886 * mem-break.h: Rename include guard.
4887 * lynx-low.h: Add include guard.
4888 * linux-x86-tdesc.h: Add include guard.
4889 * linux-s390-tdesc.h: Add include guard.
4890 * linux-ppc-tdesc-init.h: Add include guard.
4891 * linux-low.h: Add include guard.
4892 * linux-aarch64-tdesc.h: Add include guard.
4893 * linux-aarch32-low.h: Add include guard.
4894 * inferiors.h: Rename include guard.
4895 * i387-fp.h: Rename include guard.
4896 * hostio.h: Rename include guard.
4897 * gdbthread.h: Rename include guard.
4898 * gdb_proc_service.h: Rename include guard.
4899 * event-loop.h: Rename include guard.
4900 * dll.h: Rename include guard.
4901 * debug.h: Rename include guard.
4902 * ax.h: Rename include guard.
4903
4904 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4905
4906 PR gdb/23985
4907 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4908 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4909
4910 2019-01-25 Tom Tromey <tom@tromey.com>
4911
4912 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4913
4914 2019-01-25 Tom Tromey <tom@tromey.com>
4915
4916 * win32-low.c: Fix common/ includes.
4917 * win32-i386-low.c: Fix common/ includes.
4918 * tracepoint.c: Fix common/ includes.
4919 * thread-db.c: Fix common/ includes.
4920 * target.h: Fix common/ includes.
4921 * symbol.c: Fix common/ includes.
4922 * spu-low.c: Fix common/ includes.
4923 * server.h: Fix common/ includes.
4924 * server.c: Fix common/ includes.
4925 * remote-utils.c: Fix common/ includes.
4926 * regcache.h: Fix common/ includes.
4927 * regcache.c: Fix common/ includes.
4928 * nto-x86-low.c: Fix common/ includes.
4929 * notif.h: Fix common/ includes.
4930 * mem-break.h: Fix common/ includes.
4931 * lynx-low.c: Fix common/ includes.
4932 * lynx-i386-low.c: Fix common/ includes.
4933 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4934 * linux-x86-low.c: Fix common/ includes.
4935 * linux-low.c: Fix common/ includes.
4936 * inferiors.h: Fix common/ includes.
4937 * i387-fp.c: Fix common/ includes.
4938 * hostio.c: Fix common/ includes.
4939 * hostio-errno.c: Fix common/ includes.
4940 * gdbthread.h: Fix common/ includes.
4941 * gdbreplay.c: Fix common/ includes.
4942 * fork-child.c: Fix common/ includes.
4943 * event-loop.c: Fix common/ includes.
4944 * ax.c:
4945 (enum gdb_agent_op): Fix common/ includes.
4946
4947 2019-01-21 Tom Tromey <tom@tromey.com>
4948
4949 * tracepoint.c: Fix includes.
4950 * remote-utils.c: Fix includes.
4951 * linux-x86-low.c: Fix includes.
4952
4953 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4954
4955 * gdbreplay.c (gdbreplay_version): Update copyright year in
4956 version message.
4957 * server.c (gdbserver_version): Likewise.
4958
4959 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4960
4961 * linux-low.c (add_lwp): Switch ordering.
4962
4963 2018-11-29 Tom Tromey <tom@tromey.com>
4964
4965 * win32-low.c (win32_join): Take pid, not process.
4966 * target.h (struct target_ops) <join>: Change argument type.
4967 (join_inferior): Change argument name.
4968 * spu-low.c (spu_join): Take pid, not process.
4969 * server.c (handle_detach): Preserve pid before destroying
4970 process.
4971 * lynx-low.c (lynx_join): Take pid, not process.
4972 * linux-low.c (linux_join): Take pid, not process.
4973
4974 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4975
4976 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4977 (aarch64_cannot_fetch_register): Likewise.
4978 (struct linux_target_ops): Update references.
4979
4980 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4981
4982 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4983
4984 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4985
4986 * configure.srv (ipa_ppc_linux_regobj): Add
4987 powerpc-isa207-htm-vsx32l-ipa.o and
4988 powerpc-isa207-htm-vsx64l-ipa.o.
4989 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
4990 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
4991 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
4992 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
4993 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
4994 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
4995 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
4996 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
4997 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
4998 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
4999 (init_registers_powerpc_isa207_htm_vsx32l)
5000 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5001 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5002 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5003 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5004 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5005 (ppc_store_tm_ctarregset): New functions.
5006 (ppc_regsets): Add entries for HTM regsets.
5007 (ppc_arch_setup): Set htm in features struct when needed. Set
5008 sizes for the HTM regsets.
5009 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5010 (initialize_low_arch): Call
5011 init_registers_powerpc_isa207_htm_vsx32l and
5012 init_registers_powerpc_isa207_htm_vsx64l.
5013 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5014 PPC_TDESC_ISA207_HTM_VSX.
5015 (initialize_low_tracepoint): Call
5016 init_registers_powerpc_isa207_htm_vsx32l and
5017 init_registers_powerpc_isa207_htm_vsx64l.
5018
5019 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5020
5021 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5022 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5023 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5024 (ppc_store_pmuregset): New functions.
5025 (ppc_regsets): Add entries for ebb and pmu regsets.
5026 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5027 pmu regsets are available. Set sizes for these regsets.
5028
5029 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5030
5031 * configure.srv (ipa_ppc_linux_regobj): Add
5032 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5033 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5034 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5035 rs6000/powerpc-isa207-vsx32l.xml, and
5036 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5037 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5038 <PPC_TDESC_ISA207_VSX>: New enum value.
5039 (init_registers_powerpc_isa207_vsx32l): Declare.
5040 (init_registers_powerpc_isa207_vsx64l): Declare.
5041 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5042 (ppc_store_tarregset): New function.
5043 (ppc_regsets): Add entry for the TAR regset.
5044 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5045 size for the TAR regsets.
5046 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5047 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5048 and init_registers_powerpc_isa207_vsx64l.
5049 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5050 (initialize_low_tracepoint): Call
5051 init_registers_powerpc_isa207_vsx32l and
5052 init_registers_powerpc_isa207_vsx64l.
5053
5054 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5055 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5056
5057 * configure.srv (ipa_ppc_linux_regobj): Add
5058 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5059 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5060 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5061 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5062 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5063 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5064 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5065 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5066 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5067 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5068 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5069 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5070 (ppc_hwcap): Add comment.
5071 (ppc_hwcap2): New global.
5072 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5073 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5074 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5075 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5076 when needed. Set sizes for the the DSCR and PPR regsets.
5077 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5078 (initialize_low_arch): Call
5079 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5080 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5081 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5082 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5083 (initialize_low_tracepoint): Call
5084 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5085 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5086
5087 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5088
5089 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5090
5091 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5092 Simon Marchi <simark@simark.ca>
5093
5094 * acinclude.m4: Include "../selftest.m4".
5095 * configure: Regenerate.
5096 * configure.ac: Use "GDB_AC_SELFTEST".
5097 * configure.srv: Use "$enable_unittests" instead of
5098 "$development" when checking whether unit tests have been
5099 enabled.
5100 * server.c (captured_main): Update message informing that
5101 selftests have been disabled.
5102
5103 2018-10-04 Tom Tromey <tom@tromey.com>
5104
5105 * configure: Rebuild.
5106
5107 2018-10-04 Tom Tromey <tom@tromey.com>
5108
5109 * server.c (handle_status): Rename inner "thread".
5110 (process_serial_event): Declare "res" in 'm' case.
5111 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5112 (iterate_over_lwps): Rename inner "thread".
5113 (linux_qxfer_libraries_svr4): Rename inner "len".
5114 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5115
5116 2018-10-01 Gary Benson <gbenson@redhat.com>
5117
5118 * gdb_proc_service.h: Moved common code to
5119 common/gdb_proc_service.h.
5120
5121 2018-10-01 Gary Benson <gbenson@redhat.com>
5122
5123 * gdb_proc_service.h: Synchronize comments and whitespace with
5124 GDB's version of this file.
5125
5126 2018-09-25 Tom Tromey <tom@tromey.com>
5127
5128 * configure: Rebuild.
5129 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5130
5131 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5132
5133 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5134 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5135 ($(IPA_LIB)): Sort IPA_OBJS.
5136
5137 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5138
5139 * Makefile.in: Remove references to $(ADD_DEPS).
5140
5141 2018-09-16 Tom Tromey <tom@tromey.com>
5142
5143 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5144 variables.
5145 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5146 variables.
5147
5148 2018-09-05 Tom Tromey <tom@tromey.com>
5149
5150 * configure: Rebuild.
5151
5152 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5153
5154 PR build/23399
5155 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5156
5157 2018-08-27 Tom Tromey <tom@tromey.com>
5158
5159 PR build/23087:
5160 * configure: Rebuild.
5161
5162 2018-08-27 Tom Tromey <tom@tromey.com>
5163
5164 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5165 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5166 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5167 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5168 (s390x_emit_stack_adjust): Add casts to unsigned char.
5169
5170 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5171
5172 PR gdb/23374
5173 PR gdb/23375
5174 * server.h (struct client_state) <disable_randomization>:
5175 Initialize to 1.
5176
5177 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5178
5179 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5180 variable.
5181 (mips_supply_ptrace_register): Likewise.
5182
5183 2018-07-22 Tom Tromey <tom@tromey.com>
5184
5185 * configure: Rebuild.
5186
5187 2018-07-22 Tom Tromey <tom@tromey.com>
5188
5189 * win32-low.c (win32_create_inferior): Remove unused variables.
5190 * gdbreplay.c (remote_open): Remove unused variable.
5191 * remote-utils.c (remote_prepare): Remove unused variable.
5192 * x86-tdesc.h (X86_TDESC_H): Define.
5193 (amd64_expedite_regs): Define conditionally.
5194 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5195 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5196 * remote-utils.c (readchar): Remove unused variable.
5197
5198 2018-07-13 Pedro Alves <palves@redhat.com>
5199
5200 * linux-low.c (linux_kill): Change parameter to process_info
5201 pointer instead of pid. Adjust.
5202 * lynx-low.c (lynx_kill): Likewise.
5203 * nto-low.c (nto_kill): Likewise.
5204 * spu-low.c (spu_kill): Likewise.
5205 * win32-low.c (win32_kill): Likewise.
5206 * server.c (handle_v_kill, kill_inferior_callback)
5207 (detach_or_kill_for_exit): Adjust.
5208 * target.c (kill_inferior): Change parameter to process_info
5209 pointer instead of pid. Adjust.
5210 * target.h (struct target_ops) <kill>: Change parameter to
5211 process_info pointer instead of pid. Adjust all implementations
5212 and callers.
5213 (kill_inferior): Likewise.
5214
5215 2018-07-13 Pedro Alves <palves@redhat.com>
5216
5217 * linux-low.c (linux_detach, linux_join): Change parameter to
5218 process_info pointer instead of pid. Adjust.
5219 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5220 * nto-low.c (nto_detach): Likewise.
5221 * spu-low.c (spu_detach, spu_join): Likewise.
5222 * win32-low.c (win32_detach, win32_join): Likewise.
5223 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5224 * target.h (struct target_ops) <detach, join>: Change parameter to
5225 process_info pointer instead of pid. Adjust all implementations
5226 and callers.
5227 (detach_inferior, join_inferior): Rename 'pid' parameter to
5228 'proc'.
5229
5230 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5231 Jan Kratochvil <jan.kratochvil@redhat.com>
5232 Paul Fertser <fercerpav@gmail.com>
5233 Tsutomu Seki <sekiriki@gmail.com>
5234
5235 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5236 (OBS): Add 'common/netstuff.o'.
5237 (GDBREPLAY_OBS): Likewise.
5238 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5239 (remote_open): Implement support for IPv6
5240 connections.
5241 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5242 and 'wspiapi.h'.
5243 (handle_accept_event): Accept connections from IPv6 sources.
5244 (remote_prepare): Handle IPv6-style hostnames; implement
5245 support for IPv6 connections.
5246 (remote_open): Implement support for printing connections from
5247 IPv6 sources.
5248
5249 2018-07-11 Pedro Alves <palves@redhat.com>
5250
5251 PR gdb/23377
5252 * mem-break.c (any_persistent_commands): Add process_info
5253 parameter and use it instead of relying on the current process.
5254 Change return type to bool.
5255 * mem-break.h (any_persistent_commands): Add process_info
5256 parameter and change return type to bool.
5257 * server.c (handle_detach): Remove require_running_or_return call.
5258 Look up the process_info for the process we're about to detach.
5259 If not found, return back error to GDB. Adjust
5260 any_persistent_commands call to pass down a process pointer.
5261
5262 2018-07-11 Pedro Alves <palves@redhat.com>
5263
5264 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5265 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5266 instead of collect_register_by_name.
5267 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5268 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5269
5270 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5271 Pedro Alves <palves@redhat.com>
5272
5273 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5274
5275 2018-07-03 Tom Tromey <tom@tromey.com>
5276
5277 * linux-low.c: Update.
5278 * lynx-low.c: Update.
5279 * mem-break.c: Update.
5280 * nto-low.c: Update.
5281 * remote-utils.c: Update.
5282 * server.c: Update.
5283 * spu-low.c: Update.
5284 * target.c: Update.
5285 * win32-low.c: Update.
5286
5287 2018-07-03 Tom Tromey <tom@tromey.com>
5288
5289 * server.c: Update.
5290
5291 2018-07-03 Tom Tromey <tom@tromey.com>
5292
5293 * linux-low.c: Update.
5294
5295 2018-07-03 Tom Tromey <tom@tromey.com>
5296
5297 * target.c: Update.
5298
5299 2018-07-03 Tom Tromey <tom@tromey.com>
5300
5301 * linux-low.c: Update.
5302 * linux-mips-low.c: Update.
5303 * lynx-low.c: Update.
5304 * nto-low.c: Update.
5305 * remote-utils.c: Update.
5306 * server.c: Update.
5307 * spu-low.c: Update.
5308 * target.c: Update.
5309 * thread-db.c: Update.
5310
5311 2018-07-03 Tom Tromey <tom@tromey.com>
5312
5313 * linux-low.c: Update.
5314 * linux-mips-low.c: Update.
5315 * lynx-low.c: Update.
5316 * mem-break.c: Update.
5317 * nto-low.c: Update.
5318 * remote-utils.c: Update.
5319 * server.c: Update.
5320 * spu-low.c: Update.
5321 * target.c: Update.
5322 * tracepoint.c: Update.
5323
5324 2018-07-03 Tom Tromey <tom@tromey.com>
5325
5326 * linux-low.c: Update.
5327 * linux-ppc-low.c: Update.
5328 * linux-x86-low.c: Update.
5329 * proc-service.c: Update.
5330 * server.c: Update.
5331 * spu-low.c: Update.
5332 * thread-db.c: Update.
5333 * win32-low.c: Update.
5334
5335 2018-07-03 Tom Tromey <tom@tromey.com>
5336
5337 * linux-low.c: Update.
5338 * lynx-low.c: Update.
5339 * nto-low.c: Update.
5340 * remote-utils.c: Update.
5341 * spu-low.c: Update.
5342 * thread-db.c: Update.
5343 * win32-low.c: Update.
5344
5345 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5346
5347 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5348 parameter in call to 'amd64_create_target_description'.
5349
5350 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5351
5352 * x86-tdesc.h: Remove executable permission flag.
5353
5354 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5355
5356 * configure.ac: Remove AC_PREREQ, add missing quoting.
5357 * configure: Re-generate.
5358 * config.in: Re-generate.
5359 * aclocal.m4: Re-generate.
5360
5361 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5362
5363 * tracepoint.h (current_traceframe): Remove declaration.
5364
5365 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5366
5367 * linux-aarch64-low.c (is_sve_tdesc): New function.
5368 (aarch64_sve_regs_copy_to_regcache): Likewise.
5369 (aarch64_sve_regs_copy_from_regcache): Likewise.
5370 (aarch64_regs_info): Add SVE checks.
5371 (initialize_low_arch): Initialize SVE.
5372
5373 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5374
5375 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5376
5377 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5378
5379 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5380 (initialize_low_tracepoint): Likewise
5381 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5382 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5383 param.
5384 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5385 checks.
5386 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5387
5388 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5389
5390 * server.h (PBUFSIZ): Increase size
5391
5392 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5393
5394 * regcache.c (regcache::raw_compare): New function.
5395 * regcache.h (regcache::raw_compare): New declaration.
5396
5397 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5398
5399 * regcache.c (new_register_cache): Use new.
5400 (free_register_cache): Use delete.
5401 (register_data): Use const.
5402 (supply_register): Move body inside regcache.
5403 (regcache::raw_supply): New override function.
5404 (collect_register): Move body inside regcache.
5405 (regcache::raw_collect): New override function.
5406 (regcache::get_register_status): New override function.
5407 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5408
5409 2018-06-09 Tom Tromey <tom@tromey.com>
5410
5411 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5412 declare queue.
5413 (event_queue): Use std::queue.
5414 (gdb_event_xfree): Remove.
5415 (initialize_event_loop, process_event, wait_for_event): Update.
5416
5417 2018-06-08 Stan Cox <scox@redhat.com>
5418
5419 * win32-low.c (win32_create_inferior): last_ptid and last_status
5420 moved to client_state.
5421
5422 2018-06-08 Pedro Alves <palves@redhat.com>
5423
5424 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5425 common/common-exceptions.o, common/common-utils.o,
5426 common/errors.o, common/print-utils.o and utils.o.
5427 * gdbreplay.c: Include "common-defs.h" instead of the two
5428 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5429 string.h or alloca.h.
5430 (perror_with_name): Delete.
5431 (remote_open): Use xstrdup instead of strdup.
5432 (main): Rename to ...
5433 (captured_main): ... this.
5434 (main): New.
5435
5436 2018-06-08 Tom Tromey <tom@tromey.com>
5437
5438 * linux-low.c (linux_low_read_btrace): Update.
5439
5440 2018-06-04 Stan Cox <scox@redhat.com>
5441
5442 * server.h (struct client_state): New.
5443 * server.c (cont_thread, general_thread, multi_process)
5444 (report_fork_events, report_vfork_events, report_exec_events)
5445 (report_thread_events, swbreak_feature, hwbreak_feature)
5446 (vCont_supported, disable_randomization, pass_signals)
5447 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5448 Moved to client_state.
5449 * remote-utils.c (remote_debug, noack_mode)
5450 (transport_is_reliable): Moved to client_state.
5451 * tracepoint.c (current_traceframe): Moved to client_state.
5452
5453 Update all callers.
5454 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5455 linux-low.c, remote-utils.h, target.c: Use client_state.
5456
5457 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5458
5459 * configure.srv: Add new c/h file.
5460
5461 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5462
5463 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5464 null VQ.
5465
5466 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5467
5468 * gdb.arch/mips-fpregset-core.exp: New test.
5469 * gdb.arch/mips-fpregset-core.c: New test source.
5470
5471 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5472
5473 PR server/23198
5474 * hostio.c (require_int): Do not report overflow for integers
5475 between 0xfffffff and 0x7fffffff.
5476
5477 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5478
5479 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5480 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5481 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5482 functions.
5483 (the_low_target): Wire them.
5484
5485 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5486
5487 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5488 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5489 mode. Call collect_register_by_name with vscr using
5490 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5491 (ppc_store_vrregset): Add and set vscr_offset variable as in
5492 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5493 vscr_offset.
5494
5495 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5496
5497 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5498 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5499 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5500
5501 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5502
5503 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5504 (ppc_store_vsxregset): Likewise.
5505 (ppc_fill_vrregset): Likewise.
5506 (ppc_store_vrregset): Likewise.
5507 (ppc_fill_evrregset): Likewise.
5508 (ppc_store_evrregset): Likewise.
5509 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5510 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5511 needed.
5512
5513 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5514
5515 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5516 wordsize of the inferior. Call ppc_linux_target_wordsize.
5517
5518 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5519
5520 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5521 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5522 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5523 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5524 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5525 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5526 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5527 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5528 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5529 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5530 (tdesc_powerpc_e500l): Remove.
5531 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5532 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5533 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5534 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5535 linux-ppc-tdesc.h.
5536 (ppc_arch_setup): Remove target description matching code. Fill a
5537 ppc_linux_features struct and call ppc_linux_match_description
5538 with it.
5539
5540 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5541
5542 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5543 width of the requested register exceeds the width of the
5544 `ptrace' data type.
5545 (mips_cannot_store_register): Likewise.
5546
5547 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5548
5549 * linux-mips-low.c (mips_fetch_register): New function. Update
5550 preceding comment.
5551 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5552 (the_low_target): Wire `mips_fetch_register'.
5553
5554 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5555
5556 * lynx-i386-low.c (LYNXOS_178): New macro.
5557 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5558 the layout on LynxOS-178.
5559 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5560 handle floating point registers that are not supported by
5561 LynxOS-178.
5562
5563 2018-05-10 Tom Tromey <tom@tromey.com>
5564
5565 * configure: Rebuild.
5566
5567 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5568
5569 PR server/23158:
5570 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5571 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5572 Use it to set the expedite_regs field in the given tdesc.
5573 * x86-tdesc.h: New file.
5574 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5575 Adjust following the addition of the new expedite_regs parameter
5576 to init_target_desc.
5577 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5578 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5579 (i386_linux_read_description, amd64_linux_read_description):
5580 Adjust following the addition of the new expedite_regs parameter
5581 to init_target_desc.
5582 * lynx-i386-low.c: #include "x86-tdesc.h".
5583 (lynx_i386_arch_setup): Adjust following the addition of the new
5584 expedite_regs parameter to init_target_desc.
5585 * nto-x86-low.c: #include "x86-tdesc.h".
5586 (nto_x86_arch_setup): Adjust following the addition of the new
5587 expedite_regs parameter to init_target_desc.
5588 * win32-i386-low.c: #include "x86-tdesc.h".
5589 (i386_arch_setup): Adjust following the addition of the new
5590 expedite_regs parameter to init_target_desc.
5591
5592 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5593
5594 PR server/23158:
5595 * win32-low.c (win32_create_inferior): Add call to my_wait
5596 setting last_status global.
5597
5598 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5599
5600 PR server/23158:
5601 * win32-low.c (create_process): Only call gdb_tilde_expand if
5602 inferior_cwd is not NULL.
5603
5604 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5605
5606 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5607 registers to the cache if their values have changed.
5608 (i387_xsave_to_cache): Provide default values for x87 control
5609 registers when these features are available, but disabled.
5610 * regcache.c (supply_register_by_name_zeroed): New function.
5611 * regcache.h (supply_register_by_name_zeroed): Declare new
5612 function.
5613
5614 2018-05-07 Tom Tromey <tom@tromey.com>
5615
5616 * configure: Rebuild.
5617
5618 2018-05-04 Tom Tromey <tom@tromey.com>
5619
5620 * configure: Rebuild.
5621
5622 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5623 Pedro Alves <palves@redhat.com>
5624
5625 * linux-aarch64-low.c (aarch64_stopped_data_address):
5626 Likewise.
5627
5628 2018-04-27 Tom Tromey <tom@tromey.com>
5629
5630 * configure: Rebuild.
5631
5632 2018-04-23 Tom Tromey <tom@tromey.com>
5633
5634 * configure: Rebuild.
5635
5636 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5637
5638 * Makefile.in (depcomp): Add "..".
5639 (all_deps_files): New and use it.
5640
5641 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5642
5643 * configure.srv (aarch64*-*-linux*): Don't include xml.
5644 (i[34567]86-*-cygwin*): Likewise.
5645 (i[34567]86-*-linux*): Likewise.
5646 (i[34567]86-*-lynxos*): Likewise.
5647 (i[34567]86-*-mingw32ce*): Likewise.
5648 (i[34567]86-*-mingw*): Likewise.
5649 (i[34567]86-*-nto*): Likewise.
5650 (tic6x-*-uclinux): Likewise.
5651 (x86_64-*-linux*): Likewise.
5652 (x86_64-*-mingw*): Likewise.
5653 (x86_64-*-cygwin*): Likewise.
5654
5655 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5656
5657 * tdesc.c: Remove xml parameter.
5658
5659 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5660
5661 * server.c (get_features_xml): Remove cast.
5662 * tdesc.c (void target_desc::accept): Fill in function.
5663 (tdesc_get_features_xml): Remove old xml creation.
5664 (print_xml_feature::visit_pre): Add xml vistor.
5665 * tdesc.h (struct target_desc): Make xmltarget mutable.
5666 (tdesc_get_features_xml): Remove declaration.
5667
5668 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5669
5670 * tdesc.c (tdesc_architecture_name): Add new function.
5671 (tdesc_osabi_name): Likewise.
5672 (tdesc_get_features_xml): Use new functions.
5673
5674 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5675
5676 * tdesc.c (tdesc_create_flags): Remove.
5677 (tdesc_add_flag): Likewise.
5678 (tdesc_named_type): Likewise.
5679 (tdesc_create_union): Likewise.
5680 (tdesc_create_struct): Likewise.
5681 (tdesc_create_vector): Likewise.
5682 (tdesc_add_bitfield): Likewise.
5683 (tdesc_add_field): Likewise.
5684 (tdesc_set_struct_size): Likewise.
5685
5686 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5687
5688 * tdesc.c (~target_desc): Remove implictly deleted items.
5689 (init_target_desc): Iterate all features.
5690 (tdesc_get_features_xml): Use vector.
5691 (tdesc_create_feature): Create feature.
5692 * tdesc.h (tdesc_feature) Remove
5693 (target_desc): Add features.
5694
5695 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5696
5697 * Makefile.in: Add common/tdesc.c
5698 * tdesc.c (init_target_desc): init all reg_defs from register
5699 vector.
5700 (tdesc_create_reg): Create tdesc_reg.
5701 * tdesc.h (tdesc_feature): Add register vector.
5702
5703 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5704
5705 * tdesc.h (struct target_desc) <features>: Change type to
5706 std::vector<std::string>.
5707 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5708 changes.
5709 (tdesc_get_features_xml): Likewise.
5710 (tdesc_create_feature): Likewise.
5711
5712 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5713
5714 * regcache.c (find_register_by_number): Return a ref.
5715 (find_regno): Use references.
5716 (register_size): Likewise.
5717 (register_data): Likewise.
5718 * tdesc.c (target_desc::~target_desc): Remove free calls.
5719 (target_desc::operator==): Use std::vector compare.
5720 (init_target_desc): Use reference.
5721 (tdesc_create_reg): Use reg constructors.
5722 * tdesc.h (struct target_desc): Replace pointer with object.
5723
5724 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5725
5726 * regcache.c (find_register_by_number): Make static.
5727 (find_regno): Use find_register_by_number
5728 * regcache.h (struct reg): Remove declaration.
5729
5730 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5731
5732 * tdesc.c (target_desc::~target_desc): Move to here.
5733 (target_desc::operator==): Likewise.
5734 * tdesc.h (target_desc::~target_desc): Move from here.
5735 (target_desc::operator==): Likewise.
5736
5737 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5738
5739 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5740
5741 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5742
5743 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5744 S390_TDESC_GS.
5745 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5746 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5747 and init_registers_s390_gs_linux64.
5748
5749 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5750
5751 * linux-s390-low.c (s390_fill_gs): Remove function.
5752 (s390_fill_gsbc): Remove function.
5753 (s390_regsets): Set fill functions for the guarded storage regsets
5754 to NULL.
5755
5756 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5757
5758 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5759 the word size. Add comment.
5760 (s390_get_wordsize): New function.
5761 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5762 pswm with it. Instead, use s390_get_wordsize to determine the
5763 word size first and derive the correct tdesc from that directly.
5764
5765 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5766
5767 * Makefile.in: Include silent-rules.mk.
5768 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5769 (COMPILE): Add ECHO_CXX.
5770 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5771 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5772 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5773 (version-generated.c): Add ECHO_GEN.
5774 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5775 (IPAGENT_COMPILE): Add ECHO_CXX.
5776 (%-generated.c): Add ECHO_REGDAT.
5777
5778 2018-03-14 Tom Tromey <tom@tromey.com>
5779
5780 PR cli/14977:
5781 * ax.c (ax_printf): Special case for NULL.
5782
5783 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5784
5785 * linux-low.c (linux_qxfer_libraries_svr4): Use
5786 xml_escape_text_append.
5787
5788 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5789
5790 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5791
5792 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5793
5794 * server.c (handle_general_set): Remove unnecessary xstrdup.
5795
5796 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5797
5798 * server.c (parse_debug_format_options): Adjust to
5799 delim_string_to_char_ptr_vec changes.
5800 * thread-db.c (thread_db_load_search): Adjust to
5801 dirnames_to_char_ptr_vec changes.
5802
5803 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5804
5805 * target.h (target_enable_btrace, target_disable_btrace)
5806 (target_read_btrace, target_read_btrace_conf): Turn macro into
5807 inline function. Throw error if target method is not defined.
5808 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5809 check for btrace target method. Be prepared to handle exceptions
5810 from btrace target methods.
5811
5812 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5813
5814 * server.c (captured_main): Change order of error message printed
5815 when the current working directory cannot be found.
5816
5817 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5818
5819 * server.c: Include "filenames.h" and "pathstuff.h".
5820 (program_name): Delete variable.
5821 (program_path): New anonymous class.
5822 (get_exec_wrapper): Use "program_path" instead of
5823 "program_name".
5824 (handle_v_run): Likewise.
5825 (captured_main): Likewise.
5826 (process_serial_event): Likewise.
5827
5828 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5829
5830 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5831 (OBJS): Add "pathstuff.o".
5832 * server.c (current_directory): New global variable.
5833 (captured_main): Initialize "current_directory".
5834
5835 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5836
5837 * tdesc.c: Use common/tdesc.h.
5838 * tdesc.h: Likewise.
5839
5840 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5841 Simon Marchi <simon.marchi@ericsson.com>
5842
5843 * Makefile.in: Switch order of make rules.
5844
5845 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5846
5847 * Makefile.in: Add common directory in build.
5848 * configure.ac: Add common reference.
5849 * configure: Regenerate.
5850
5851 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5852
5853 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5854 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5855 * spu-low.c (spu_target_ops): Likewise.
5856 * win32-low.c (win32_target_ops): Likewise.
5857 * server.c (supported_btrace_packets): Report packets unconditionally.
5858 * target.h (target_ops) <supports_btrace>: Remove.
5859 (target_supports_btrace): Remove.
5860
5861 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5862
5863 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5864 (handle_btrace_disable): Change return type to void. Use exceptions
5865 to report errors.
5866 (handle_btrace_general_set): Catch exception and copy message to
5867 return message.
5868
5869 2018-02-08 Tom Tromey <tom@tromey.com>
5870
5871 * linux-low.c (install_software_single_step_breakpoints): Use
5872 make_scoped_restore.
5873 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5874 (do_restore_current_thread_cleanup): Remove.
5875 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5876 declare.
5877
5878 2018-02-08 Tom Tromey <tom@tromey.com>
5879
5880 * mem-break.c (set_raw_breakpoint_at): Use
5881 gdb::unique_xmalloc_ptr.
5882
5883 2018-01-30 Pedro Alves <palves@redhat.com>
5884
5885 PR gdb/13211
5886 * target.c (target_terminal::terminal_state): Rename to ...
5887 (target_terminal::m_terminal_state): ... this.
5888
5889 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5890
5891 * linux-low.c (handle_extended_wait): Surround call to
5892 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5893
5894 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5895
5896 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5897 linux_ptrace_attach_fail_reason_string now returning an
5898 std::string.
5899 (linux_attach): Likewise.
5900 * thread-db.c (attach_thread): Likewise.
5901
5902 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5903
5904 PR gdb/21559
5905 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5906 checking for fs_base/gs_base fields in struct user_regs_struct.
5907 * configure: Regenerate.
5908
5909 2018-01-16 Yao Qi <yao.qi@linaro.org>
5910
5911 PR gdb/18749
5912 * linux-low.c (fetch_register): Call supply_register instead of
5913 error.
5914
5915 2018-01-08 Yao Qi <yao.qi@linaro.org>
5916 Simon Marchi <simon.marchi@ericsson.com>
5917
5918 * Makefile.in (OBS): Remove selftest.o.
5919 * configure.ac: Set srv_selftest_objs if $development is true.
5920 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5921 * configure: Re-generated.
5922 * server.c (captured_main): Wrap variable selftest_filter with
5923 GDB_SELF_TEST.
5924
5925 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5926
5927 * server.c (parse_debug_format_options): Return std::string.
5928 (handle_monitor_command, captured_main): Adjust.
5929
5930 2018-01-05 Pedro Alves <palves@redhat.com>
5931
5932 PR gdb/18653
5933 * server.c (captured_main): Pass quiet=false to
5934 save_original_signals_state.
5935
5936 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5937
5938 * gdbreplay.c (gdbreplay_version): Update copyright year in
5939 version message.
5940 * server.c (gdbserver_version): Likewise.
5941
5942 2017-12-08 Tom Tromey <tom@tromey.com>
5943
5944 * ax.c (ax_printf): Update.
5945
5946 2017-12-07 Yao Qi <yao.qi@linaro.org>
5947
5948 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5949 aarch64_linux_read_description.
5950 * linux-amd64-ipa.c (idx2mask): New array.
5951 (get_ipa_tdesc): Move idx2mask out.
5952 (initialize_low_tracepoint): Initialize target descriptions.
5953 * linux-i386-ipa.c (idx2mask): New array.
5954 (get_ipa_tdesc): Move idx2mask out.
5955 (initialize_low_tracepoint): Initialize target descriptions.
5956
5957 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5958
5959 * tdesc.c (struct tdesc_type): Change return type.
5960 (tdesc_add_flag): Change parameter type.
5961 (tdesc_add_bitfield): Likewise.
5962 (tdesc_add_field): Likewise.
5963 (tdesc_set_struct_size): Likewise.
5964
5965 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5966
5967 * regcache.c (registers_to_string): Remove unused variable.
5968
5969 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5970
5971 * inferiors.c (for_each_inferior_with_data): Remove.
5972 * inferiors.h (for_each_inferior_with_data): Remove.
5973 * server.c (handle_qxfer_threads_worker): Change parameter type.
5974 (handle_qxfer_threads_proper): Use for_each_thread.
5975
5976 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5977
5978 * inferiors.c (for_each_inferior): Remove.
5979 (clear_inferiors): Use for_each_thread.
5980 * inferiors.h (for_each_inferior): Remove.
5981 * linux-low.c (linux_wait_for_event_filtered): Use
5982 for_each_thread.
5983 (linux_stabilize_threads): Likewise.
5984 * regcache.c (regcache_release): Likewise.
5985 * server.c (gdb_wants_all_threads_stopped): Likewise.
5986 (clear_pending_status_callback): Remove.
5987 (handle_status): Use for_each_thread.
5988 (captured_main): Likewise.
5989 * win32-low.c (child_init_thread_list): Likewise.
5990 (win32_clear_inferiors): Likewise.
5991 (fake_breakpoint_event): Likewise.
5992
5993 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5994
5995 * inferiors.h (find_inferior): Remove.
5996 * inferiors.c (find_inferior): Remove.
5997
5998 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5999
6000 * linux-low.c (resume_status_pending_p): Update comment.
6001 (need_step_over_p): Update comment.
6002
6003 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6004
6005 * linux-low.c (proceed_one_lwp): Return void, change parameter
6006 type.
6007 (unsuspend_and_proceed_one_lwp): Likewise.
6008 (proceed_all_lwps): Use for_each_thread.
6009 (unstop_all_lwps): Likewise.
6010
6011 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6012
6013 * linux-low.c (linux_resume_one_thread): Return void, take
6014 parameter directly.
6015 (linux_resume): Use for_each_thread.
6016
6017 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6018
6019 * linux-low.c (send_sigstop_callback): Return void, change
6020 parameter type. Rename to...
6021 (send_sigstop): ... this.
6022 (suspend_and_send_sigstop_callback): Return void, change parameter
6023 type. Rename to...
6024 (suspend_and_send_sigstop): ... this.
6025 (stop_all_lwps): Use for_each_thread.
6026
6027 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6028
6029 * linux-low.c (lwp_running): Return bool, remove unused
6030 argument.
6031 (linux_stabilize_threads): Use find_thread.
6032
6033 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6034
6035 * linux-low.c (select_singlestep_lwp_callback): Remove.
6036 (count_events_callback): Remove.
6037 (select_event_lwp_callback): Remove.
6038 (select_event_lwp): Use find_thread/for_each_thread.
6039
6040 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6041
6042 * linux-low.c (not_stopped_callback): Return bool, take filter
6043 argument directly.
6044 (linux_wait_for_event_filtered): Use find_thread.
6045 (linux_wait_1): Likewise.
6046
6047 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6048
6049 * linux-low.c (same_lwp): Remove.
6050 (find_lwp_pid): Use find_thread.
6051
6052 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6053
6054 * linux-low.c (delete_lwp_callback): Remove.
6055 (linux_mourn): Use for_each_thread.
6056
6057 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6058
6059 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6060 args parameter, don't check for pid.
6061 (linux_detach): Use for_each_thread.
6062
6063 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6064
6065 * linux-low.c (struct counter): Remove.
6066 (second_thread_of_pid_p): Remove.
6067 (last_thread_of_process_p): Use find_thread.
6068
6069 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6070
6071 * inferiors.c (find_inferior_in_random): Remove.
6072 * inferiors.h (find_inferior_in_random): Remove.
6073 * linux-low.c (status_pending_p_callback): Return bool, accept
6074 parameter ptid directly.
6075 (linux_wait_for_event_filtered): Use find_thread_in_random.
6076 (linux_wait_1): Likewise.
6077
6078 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6079
6080 * inferiors.c (find_inferior_id): Remove.
6081 (find_thread_ptid): Move implemention from find_inferior_id to
6082 here.
6083 * inferiors.h (find_inferior_id): Remove.
6084 * server.c (handle_status): Use find_thread_ptid.
6085 (process_serial_event): Likewise.
6086 * thread-db.c (find_one_thread): Likewise.
6087 (thread_db_thread_handle): Likewise.
6088 * win32-low.c (thread_rec): Likewise.
6089 (child_delete_thread): Likewise.
6090 (win32_thread_alive): Likewise.
6091 (get_child_debug_event): Likewise.
6092
6093 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6094
6095 * linux-mips-low.c (update_watch_registers_callback): Return
6096 void, remove pid_p parameter, don't check for pid.
6097 (mips_insert_point, mips_remove_point): Use for_each_thread.
6098
6099 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6100
6101 * lynx.low (lynx_delete_thread_callback): Remove.
6102 (lynx_mourn): Use for_each_thread.
6103
6104 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6105
6106 * regcache.c (regcache_invalidate_one): Remove.
6107 (regcache_invalidate_pid): use for_each_thread.
6108
6109 2017-11-26 Tom Tromey <tom@tromey.com>
6110
6111 * linux-low.c (linux_create_inferior): Update.
6112
6113 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6114
6115 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6116
6117 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6118
6119 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6120 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6121 * linux-aarch64-tdesc-selftest.c: New file.
6122 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6123
6124 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6125
6126 * configure.srv: Add new file.
6127 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6128 * linux-aarch64-tdesc-selftest.c: New file.
6129 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6130
6131 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6132
6133 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6134 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6135 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6136
6137 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6138
6139 * configure.srv: Add new files.
6140 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6141 aarch64_linux_read_description.
6142 * linux-aarch64-low.c (aarch64_linux_read_description):
6143 Merge with aarch64_arch_setup.
6144 (aarch64_arch_setup): Call aarch64_linux_read_description.
6145 * linux-aarch64-tdesc.c: New file.
6146 * linux-aarch64-tdesc.h: New file.
6147
6148 2017-11-24 Yao Qi <yao.qi@linaro.org>
6149
6150 * configure.srv: Set $srv_regobj for tic6x-linux.
6151 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6152 (tic6x_read_description): Move some code to tic6x_arch_setup.
6153 (tic6x_tdesc_test): New function.
6154 (initialize_low_arch): Call selftests::register_test.
6155
6156 2017-11-22 Yao Qi <yao.qi@linaro.org>
6157
6158 * remote-utils.c (prepare_resume_reply): Use memcpy.
6159
6160 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6161
6162 * linux-low.c (kill_one_lwp_callback): Return void, take
6163 argument directly, don't filter on pid.
6164 (linux_kill): Use for_each_thread.
6165
6166 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6167
6168 * linux-low.c (need_step_over_p): Return bool, remove dummy
6169 argument.
6170 (linux_resume, proceed_all_lwps): Use find_thread.
6171
6172 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6173
6174 * linux-low.c (resume_status_pending_p): Return bool, remove
6175 flag_p argument.
6176 (linux_resume): Use find_thread.
6177
6178 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6179
6180 * linux-low.c (struct thread_resume_array): Remove.
6181 (linux_set_resume_request): Return void, take arguments
6182 directly.
6183 (linux_resume): Use for_each_thread.
6184
6185 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6186
6187 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6188 return bool, remove data argument.
6189 (linux_stabilize_threads): Use find_thread.
6190
6191 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6192
6193 * linux-low.c (unsuspend_one_lwp): Remove.
6194 (unsuspend_all_lwps): Use for_each_thread, inline code from
6195 unsuspend_one_lwp.
6196
6197 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6198
6199 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6200 * linux-low.c (struct iterate_over_lwps_args): Remove.
6201 (iterate_over_lwps_filter): Remove.
6202 (iterate_over_lwps): Use find_thread.
6203
6204 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6205
6206 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6207 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6208 code from reset_lwp_ptrace_options_callback.
6209
6210 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6211
6212 * linux-arm-low.c (struct update_registers_data): Remove.
6213 (update_registers_callback): Return void, take arguments
6214 directly, don't check thread's pid.
6215 (arm_insert_point, arm_remove_point): Use for_each_thread.
6216
6217 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6218
6219 * win32-low.c (continue_one_thread): Return void, take argument
6220 directly.
6221 (child_continue): Use for_each_thread.
6222
6223 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6224
6225 * win32-i386-low.c (update_debug_registers_callback): Rename
6226 to ...
6227 (update_debug_registers): ... this, return void, remove pid_p arg.
6228 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6229
6230 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6231
6232 * inferiors.h (struct process_info): Add constructor, initialize
6233 fields..
6234 <syscalls_to_catch>: Change type to std::vector<int>.
6235 * inferiors.c (add_process): Allocate process_info with new.
6236 (remove_process): Free process_info with delete.
6237 * linux-low.c (handle_extended_wait): Adjust.
6238 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6239 * server.c (handle_general_set): Adjust.
6240
6241 2017-11-16 Pedro Alves <palves@redhat.com>
6242
6243 * remote-utils.c (remote_close): Block SIGIO signals instead of
6244 uninstalling the SIGIO handler.
6245
6246 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6247
6248 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6249
6250 2017-11-16 Yao Qi <yao.qi@linaro.org>
6251
6252 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6253 (tic6x_store_gregset): Likewise.
6254 (tic6x_usrregs_info): Move it up.
6255
6256 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6257
6258 * Makefile.in: Update arch rules.
6259 * configure.srv: Explicitly mark arch/ files.
6260
6261 2017-11-13 Andreas Schwab <schwab@suse.de>
6262
6263 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6264 function.
6265 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6266
6267 2017-11-06 Pedro Alves <palves@redhat.com>
6268
6269 * config.in, configure: Regenerate.
6270
6271 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6272
6273 * target.c (struct thread_search): Remove.
6274 (thread_search_callback): Remove.
6275 (prepare_to_access_memory): Use for_each_thread instead of
6276 find_inferior. Inline code from thread_search_callback.
6277
6278 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6279
6280 * server.c (struct visit_actioned_threads_data): Remove.
6281 (visit_actioned_threads): Change prototype to take arguments
6282 directly.
6283 (resume): Use find_thread instead of find_inferior.
6284
6285 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6286
6287 * server.c (queue_stop_reply_callback): Change prototype, return
6288 void.
6289 (find_status_pending_thread_callback): Remove.
6290 (handle_status): Replace find_inferior with find_thread and
6291 for_each_thread.
6292
6293 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6294
6295 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6296 with REGNO.
6297 (aarch64_store_gregset): Likewise.
6298 (aarch64_fill_fpregset): Likewise.
6299 (aarch64_store_fpregset): Likewise.
6300
6301 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6302
6303 * gdbthread.h (find_thread, for_each_thread): New functions.
6304 * inferiors.c (thread_of_pid): Remove.
6305 (find_any_thread_of_pid): Use find_thread.
6306 * linux-low.c (num_lwps): Use for_each_thread.
6307
6308 2017-10-17 Yao Qi <yao.qi@linaro.org>
6309
6310 * Makefile.in: Remove one rule.
6311 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6312
6313 2017-10-17 Yao Qi <yao.qi@linaro.org>
6314
6315 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6316 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6317
6318 2017-10-17 Yao Qi <yao.qi@linaro.org>
6319
6320 * configure.srv: Rename arm.o with arch/arm.o.
6321
6322 2017-10-17 Yao Qi <yao.qi@linaro.org>
6323
6324 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6325 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6326 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6327 (arch-i386.o, arch-amd64.o): Remove rules.
6328 (arch/%.o): New rule.
6329 Update POSTCOMPILE and COMPILE.pre.
6330 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6331 * configure: Re-generated.
6332 * configure.srv: Replace arch-i386.o with arch/i386.o.
6333 Replace arch-amd64.o with arch/amd64.o.
6334
6335 2017-10-16 Yao Qi <yao.qi@linaro.org>
6336
6337 * configure: Regenerated.
6338
6339 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6340
6341 * inferiors.h: (struct inferior_list): Remove.
6342 (struct inferior_list_entry); Remove.
6343 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6344 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6345 get_first_inferior): Remove.
6346 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6347 find_inferior_id, find_inferior_in_random): Change signature.
6348 * inferiors.c (all_threads): Change type to
6349 std::list<thread_info *>.
6350 (get_thread): Remove macro.
6351 (find_inferior, find_inferior_id): Change signature, implement
6352 using find_thread.
6353 (find_inferior_in_random): Change signature, implement using
6354 find_thread_in_random.
6355 (for_each_inferior, for_each_inferior_with_data): Change
6356 signature, implement using for_each_thread.
6357 (add_inferior_to_list, remove_inferior): Remove.
6358 (add_thread, get_first_thread, thread_of_pid,
6359 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6360 (get_first_inferior, one_inferior_p, clear_inferior_list):
6361 Remove.
6362 (clear_inferiors, get_thread_process): Update.
6363 * gdbthread.h: Include <list>.
6364 (struct thread_info) <entry>: Remove field.
6365 <id>: New field.
6366 (all_threads): Change type to std::list<thread_info *>.
6367 (get_first_inferior): Add doc.
6368 (find_thread, for_each_thread, find_thread_in_random): New
6369 functions.
6370 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6371 * linux-arm-low.c (update_registers_callback): Update.
6372 * linux-low.c (second_thread_of_pid_p): Update.
6373 (kill_one_lwp_callback, linux_detach_lwp_callback,
6374 delete_lwp_callback, status_pending_p_callback, same_lwp,
6375 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6376 iterate_over_lwps, not_stopped_callback,
6377 resume_stopped_resumed_lwps, count_events_callback,
6378 select_singlestep_lwp_callback, select_event_lwp_callback,
6379 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6380 suspend_and_send_sigstop_callback, wait_for_sigstop,
6381 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6382 lwp_running, linux_set_resume_request, resume_status_pending_p,
6383 need_step_over_p, start_step_over, linux_resume_one_thread,
6384 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6385 reset_lwp_ptrace_options_callback): Update.
6386 * linux-mips-low.c (update_watch_registers_callback): Update.
6387 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6388 Update.
6389 (free_register_cache_thread_one): Remove.
6390 (regcache_release): Update.
6391 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6392 handle_qxfer_threads_worker): Update.
6393 (handle_query): Update, use list iterator.
6394 (visit_actioned_threads, handle_pending_status,
6395 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6396 clear_pending_status_callback, set_pending_status_callback,
6397 find_status_pending_thread_callback, handle_status,
6398 process_serial_event): Update.
6399 * target.c (thread_search_callback): Update.
6400 * thread-db.c (thread_db_get_tls_address): Update.
6401 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6402 Update.
6403 * win32-i386-low.c (update_debug_registers_callback): Update.
6404 * win32-low.c (delete_thread_info, child_delete_thread,
6405 continue_one_thread, suspend_one_thread,
6406 get_child_debug_event): Adjust.
6407
6408 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6409
6410 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6411 * inferiors.h: Include <list>.
6412 (struct process_info) <entry>: Remove field.
6413 <pid>: New field.
6414 (pid_of): Change macro to function.
6415 (ptid_of, lwpid_of): Remove macro.
6416 (all_processes): Change type to std::list<process_info *>.
6417 (ALL_PROCESSES): Remove macro.
6418 (for_each_process, find_process): New function.
6419 * inferiors.c (all_processes): Change type to
6420 std::list<process_info *>.
6421 (find_thread_process): Adjust.
6422 (add_process): Likewise.
6423 (remove_process): Likewise.
6424 (find_process_pid): Likewise.
6425 (get_first_process): Likewise.
6426 (started_inferior_callback): Remove.
6427 (have_started_inferiors_p): Adjust.
6428 (attached_inferior_callback): Remove.
6429 (have_attached_inferiors_p): Adjust.
6430 * linux-low.c (check_zombie_leaders): Likewise.
6431 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6432 (x86_linux_update_xmltarget): Adjust.
6433 * server.c (handle_query): Likewise.
6434 (gdb_reattached_process): Remove.
6435 (handle_status): Adjust.
6436 (kill_inferior_callback): Likewise.
6437 (detach_or_kill_inferior): Remove.
6438 (print_started_pid): Likewise.
6439 (print_attached_pid): Likewise.
6440 (detach_or_kill_for_exit): Update.
6441 (process_serial_event): Likewise.
6442 * linux-arm-low.c (arm_new_fork): Likewise.
6443
6444 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6445
6446 * dll.h: Include <list>.
6447 (struct dll_info): Add constructor.
6448 <entry>: Remove field.
6449 (all_dlls): Change type to std::list<dll_info>.
6450 * dll.c: Include <algorithm>.
6451 (get_dll): Remove macro.
6452 (all_dlls): Change type to std::list<dll_info *>.
6453 (free_one_dll): Remove.
6454 (match_dll): Likewise.
6455 (loaded_dll): Adjust.
6456 (unloaded_dll): Adjust to all_dlls type change, use
6457 std::find_if. Inline code from match_dll.
6458 (clear_dlls): Adjust to all_dlls type change.
6459 * server.c (emit_dll_description): Remove.
6460 (handle_qxfer_libraries): Adjust to all_dlls type change,
6461 integrate emit_dll_description's functionality.
6462
6463 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6464
6465 * linux-low.h (struct linux_target_ops) <delete_process>: New
6466 field.
6467 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6468 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6469 (struct linux_target_ops): Add delete_process callback.
6470 * linux-arm-low.c (arm_delete_process): New.
6471 (struct linux_target_ops): Add delete_process callback.
6472 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6473 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6474 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6475 * linux-mips-low.c (mips_linux_delete_process): New.
6476 (struct linux_target_ops): Add delete_process callback.
6477 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6478 * linux-s390-low.c (struct linux_target_ops): Likewise.
6479 * linux-sh-low.c (struct linux_target_ops): Likewise.
6480 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6481 * linux-tile-low.c (struct linux_target_ops): Likewise.
6482 * linux-x86-low.c (x86_linux_delete_process): New.
6483 (struct linux_target_ops): Add delete_process callback.
6484 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6485
6486 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6487
6488 * linux-aarch64-low.c (the_low_target): Add thread delete
6489 callback.
6490 * linux-arm-low.c (arm_delete_thread): New function.
6491 (the_low_target): Add thread delete callback.
6492 * linux-bfin-low.c (the_low_target): Likewise.
6493 * linux-crisv32-low.c (the_low_target): Likewise.
6494 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6495 set.
6496 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6497 field.
6498 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6499 * linux-mips-low.c (mips_linux_delete_thread): New function.
6500 (the_low_target): Add thread delete callback.
6501 * linux-ppc-low.c (the_low_target): Likewise.
6502 * linux-s390-low.c (the_low_target): Likewise.
6503 * linux-sh-low.c (the_low_target): Likewise.
6504 * linux-tic6x-low.c (the_low_target): Likewise.
6505 * linux-tile-low.c (the_low_target): Likewise.
6506 * linux-x86-low.c (the_low_target): Likewise.
6507 * linux-xtensa-low.c (the_low_target): Likewise.
6508
6509 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6510
6511 * win32-low.c: Include "common-inferior.h".
6512
6513 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6514
6515 * inferiors.c (set_inferior_cwd): New function.
6516 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6517 (handle_query): Inform that QSetWorkingDir is supported.
6518 * win32-low.c (create_process): Pass the inferior's cwd to
6519 CreateProcess.
6520
6521 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6522
6523 * inferiors.c (current_inferior_cwd): New global variable.
6524 (get_inferior_cwd): New function.
6525 * inferiors.h (struct process_info) <cwd>: New field.
6526
6527 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6528
6529 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6530 (OBS): Add gdb_tilde_expand.o.
6531
6532 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6533
6534 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6535 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6536
6537 2017-09-29 Pedro Alves <palves@redhat.com>
6538
6539 * ax.c (gdb_parse_agent_expr): Constify.
6540 * ax.h (gdb_parse_agent_expr): Constify.
6541 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6542 Constify.
6543 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6544 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6545 * remote-utils.h (read_ptid): Constify.
6546 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6547 (process_point_options, process_serial_event): Constify.
6548 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6549 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6550 (cmd_qtbuffer): Constify.
6551
6552 2017-09-29 Pedro Alves <palves@redhat.com>
6553
6554 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6555 fails.
6556
6557 2017-09-29 Pedro Alves <palves@redhat.com>
6558
6559 * linux-low.c (handle_extended_wait): Pass parent thread instead
6560 of process to thread_db_notice_clone.
6561 * linux-low.h (thread_db_notice_clone): Replace parent process
6562 parameter with parent thread parameter.
6563 * thread-db.c (find_one_thread): Add comment.
6564 (thread_db_notice_clone): Replace parent process parameter with
6565 parent thread parameter. Temporarily switch to the parent thread.
6566
6567 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6568
6569 * gdbthread.h: Include "common-gdbthread.h".
6570 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6571 "if" when validating the ptid.
6572 * remote-utils.c: Include "gdbthread.h".
6573 (prepare_resume_reply): Use "switch_to_thread".
6574 * target.c (done_accessing_memory): Likewise.
6575
6576 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6577
6578 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6579 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6580 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6581 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6582 s390x-gs-linux64-ipa.o to ipa_obj.
6583 * linux-s390-low.c (HWCAP_S390_GS): New define.
6584 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6585 New functions.
6586 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6587 (s390_arch_setup): Check for guarded-storage support and choose
6588 appropriate tdesc.
6589 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6590 init_registers_s390x_gs_linux64.
6591 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6592 enum value.
6593 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6594 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6595
6596 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6597
6598 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6599
6600 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6601
6602 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6603 (thread_db_thread_handle): Declare.
6604 * linux-low.c (linux_target_ops): Initialize thread_handle.
6605 * server.c (handle_qxfer_threads_worker): Add support for
6606 "handle" attribute.
6607 * target.h (struct target_ops): Add new function pointer,
6608 thread_handle.
6609 (target_thread_handle): Define.
6610 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6611 field in lwp.
6612 (thread_db_thread_handle): New function.
6613
6614 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6615
6616 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6617 * linux-low.h (thread_db_notice_clone): Declare.
6618 * thread-db.c (thread_db_notice_clone): New function.
6619
6620 2017-09-21 Pedro Alves <palves@redhat.com>
6621
6622 * server.c (gdb_read_memory, handle_status, process_serial_event)
6623 (handle_serial_event, handle_target_event): Adjust to
6624 set_desired_thread prototype change.
6625 * target.c (set_desired_thread): Remove 'use_general' parameter
6626 and adjust.
6627 * target.h (set_desired_thread): Remove 'use_general' parameter.
6628
6629 2017-09-20 Tom Tromey <tom@tromey.com>
6630
6631 * target.c (target_terminal::terminal_state): Define.
6632 (target_terminal::init): Rename from target_terminal_init.
6633 (target_terminal::inferior): Rename from
6634 target_terminal_inferior.
6635 (target_terminal::ours): Rename from target_terminal_ours.
6636 (target_terminal::ours_for_output, target_terminal::info): New.
6637
6638 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6639
6640 * server.c (accumulate_file_name_length): Remove.
6641 (emit_dll_description): Adjust to std::string change.
6642 (handle_qxfer_libraries): Use std::string to hold document.
6643
6644 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6645
6646 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6647 return type of xml_escape_text.
6648 * server.c (emit_dll_description): Likewise.
6649
6650 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6651
6652 * server.c (captured_main): Accept argument for --selftest.
6653 Update run_tests call.
6654 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6655 when registering selftests.
6656
6657 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6658
6659 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6660 instead of "VEC" for "target_desc.reg_defs".
6661 (regcache_cpy): Likewise.
6662 (registers_to_string): Likewise.
6663 (registers_from_string): Likewise.
6664 (find_regno): Likewise.
6665 (supply_regblock): Likewise.
6666 (regcache_raw_read_unsigned): Likewise.
6667 * tdesc.c (init_target_desc): Likewise.
6668 (tdesc_create_reg): Likewise.
6669 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6670 (struct target_desc) <reg_defs>: Convert to "std::vector".
6671 (target_desc): Do not initialize "reg_defs".
6672 (~target_desc): Update code to use "std::vector" instead of "VEC"
6673 for "target_desc.reg_defs".
6674 (operator==): Likewise.
6675
6676 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6677
6678 * inferiors.h (thread_to_gdb_id): Remove.
6679 * inferiors.c (thread_to_gdb_id): Remove.
6680 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6681 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6682 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6683 Likewise.
6684 * nto-low.c (nto_fetch_registers, nto_store_registers,
6685 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6686
6687 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6688
6689 * inferiors.h (gdb_id_to_thread_id): Remove.
6690 * inferiors.c (gdb_id_to_thread_id): Remove.
6691 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6692 removal. Move pid declaration closer to where it's used.
6693
6694 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6695
6696 * server.c (handle_detach): New function.
6697 (process_serial_event): Move code out, call handle_detach.
6698
6699 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6700
6701 * server.c (require_running): Rename to ...
6702 (require_running_or_return): ... this ...
6703 (require_running_or_break): ... and this.
6704 (handle_query, process_serial_event): Adjust.
6705
6706 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6707
6708 * linux-low.c (linux_set_resume_request): Remove unused
6709 variables.
6710
6711 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6712
6713 * server.c (first_thread_of): Remove.
6714 (process_serial_event): Replace usage of first_thread_of with
6715 find_any_thread_of_pid.
6716 * tracepoint.c (same_process_p): Remove.
6717 (gdb_agent_about_to_close): Replace usage of same_process_p with
6718 find_any_thread_of_pid.
6719 * linux-x86-low.c (same_process_callback): Remove.
6720 (x86_arch_setup_process_callback): Replace usage of
6721 same_process_callback with find_any_thread_of_pid.
6722 * thread-db.c (any_thread_of): Remove.
6723 (switch_to_process): Replace usage of any_thread_of with
6724 find_any_thread_of_pid.
6725 * inferiors.c (thread_pid_matches_callback): Remove.
6726 (find_thread_process): Adjust to use find_any_thread_of_pid.
6727
6728 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6729
6730 * regcache.c (get_thread_regcache): Guard calls to "memset"
6731 with "!VEC_empty".
6732
6733 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6734
6735 * linux-low.c (handle_extended_wait): Use
6736 "allocate_target_description" instead of "XNEW".
6737 * linux-x86-low.c (initialize_low_arch): Likewise.
6738
6739 2017-09-05 Yao Qi <yao.qi@linaro.org>
6740
6741 * configure.srv (srv_i386_regobj): Remove.
6742 (srv_amd64_regobj): Remove.
6743 (srv_regobj): Set it to "" for x86 non-linux targets.
6744 * linux-x86-tdesc.c (i386_linux_read_description):
6745 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6746 (init_registers_i386): Remove the declaration.
6747 (tdesc_i386): Remove the declaration.
6748 (lynx_i386_arch_setup): Call i386_create_target_description.
6749 * nto-x86-low.c: Likewise.
6750 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6751 [!__x86_64__]: include arch/i386.h.
6752 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6753
6754 2017-09-05 Yao Qi <yao.qi@linaro.org>
6755
6756 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6757 i386/amd64-XXX-linux from it.
6758
6759 2017-09-05 Yao Qi <yao.qi@linaro.org>
6760
6761 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6762 false.
6763 (ipa_amd64_linux_regobj): Remove.
6764 (ipa_x32_linux_regobj): Remove.
6765
6766 2017-09-05 Yao Qi <yao.qi@linaro.org>
6767
6768 * Makefile.in (arch-amd64.o): New rule.
6769 * configure.srv: Append arch-amd64.o.
6770 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6771 (get_ipa_tdesc): Call amd64_linux_read_description.
6772 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6773 and init_registers_amd64_XXX.
6774 * linux-x86-low.c (x86_linux_read_description): Call
6775 amd64_linux_read_description.
6776 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6777 (initialize_low_arch): Don't call init_registers_x32_XXX and
6778 init_registers_amd64_XXX.
6779 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6780 and tdesc_amd64_XXX.
6781 [__x86_64__] (amd64_tdesc_test): New function.
6782 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6783 and init_registers_amd64_XXX.
6784 * linux-x86-tdesc.c: Include arch/amd64.h.
6785 (xcr0_to_tdesc_idx): New function.
6786 (i386_linux_read_description): New function.
6787 (amd64_get_ipa_tdesc_idx): New function.
6788 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6789 (amd64_get_ipa_tdesc): Declare.
6790
6791 2017-09-05 Yao Qi <yao.qi@linaro.org>
6792
6793 * configure.srv (srv_i386_linux_xmlfiles): Remove
6794 i386/i386-XXX-linux.xml from it.
6795
6796 2017-09-05 Yao Qi <yao.qi@linaro.org>
6797
6798 * configure.srv: Set srv_i386_linux_regobj empty if $development
6799 is false.
6800 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6801 initialize_low_tdesc.
6802 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6803 with #if initialize_low_tdesc.
6804 * linux-x86-tdesc-selftest.c: New file.
6805 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6806
6807 2017-09-05 Yao Qi <yao.qi@linaro.org>
6808
6809 * Makefile.in (arch-i386.o): New rule.
6810 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6811 (x86_64-*-linux*): Likewise.
6812 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6813 include arch/i386.h.
6814 (i386_linux_read_description): Remove code and call
6815 i386_create_target_description.
6816 * tdesc.c (allocate_target_description): New function.
6817 * tdesc.h (set_tdesc_architecture): Remove declaration.
6818 (set_tdesc_osabi): Likewise.
6819
6820 2017-09-05 Yao Qi <yao.qi@linaro.org>
6821
6822 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6823 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6824 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6825 .xmltarget.
6826 * server.c (get_features_xml): Call tdesc_get_features_xml.
6827 * tdesc.c (set_tdesc_architecture): New function.
6828 (set_tdesc_osabi): New function.
6829 (tdesc_get_features_xml): New function.
6830 (tdesc_create_feature): Add an argument.
6831 * tdesc.h (struct target_desc) <features>: New field.
6832 <arch, osabi>: New field.
6833 (~target_desc): xfree features, arch, and osabi.
6834 (target_desc::oerator==): Don't compare .xmltarget.
6835 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6836 (set_tdesc_osabi): Likewise.
6837 (tdesc_get_features_xml): Likewise.
6838
6839 2017-09-05 Yao Qi <yao.qi@linaro.org>
6840
6841 * linux-x86-tdesc.c: Include selftest.h.
6842 (i386_tdesc_test): New function.
6843 (initialize_low_tdesc): Call selftests::register_test.
6844 * tdesc.h: Include regdef.h.
6845 (target_desc): Override operator == and !=.
6846
6847 2017-09-05 Yao Qi <yao.qi@linaro.org>
6848
6849 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6850 (ipa_obj): Likewise.
6851 * linux-i386-ipa.c: Include common/x86-xstate.h
6852 (get_ipa_tdesc): Call i386_linux_read_description.
6853 (initialize_low_tracepoint): Don't call init_registers_XXX
6854 functions, call initialize_low_tdesc instead.
6855 * linux-x86-low.c (x86_linux_read_description): Call
6856 i386_linux_read_description.
6857 (initialize_low_arch): Don't call init_registers_i386_XXX
6858 functions, call initialize_low_tdesc.
6859 * linux-x86-tdesc.c: New file.
6860 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6861 (i386_get_ipa_tdesc_idx): Declare.
6862 (i386_get_ipa_tdesc): Declare.
6863 (initialize_low_tdesc): Declare.
6864
6865 2017-09-05 Yao Qi <yao.qi@linaro.org>
6866
6867 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6868 instead of 0.
6869
6870 2017-09-05 Yao Qi <yao.qi@linaro.org>
6871
6872 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6873 * regcache.c (get_thread_regcache): Use VEC_length.
6874 (init_register_cache): Likewise.
6875 (regcache_cpy): Likewise.
6876 (registers_to_string): Iterate reg_defs via VEC_iterate.
6877 (find_regno): Likewise.
6878 (find_register_by_number): Use VEC_index.
6879 (register_size): Call find_register_by_number.
6880 (register_data): Call find_register_by_number.
6881 (supply_regblock): Use VEC_length.
6882 (regcache_raw_read_unsigned): Likewise.
6883 * tdesc.c (init_target_desc): Iterate reg_defs via
6884 VEC_iterate.
6885 (default_description): Update initializer.
6886 (copy_target_description): Don't update field num_registers.
6887 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6888 <num_registers>: Remove.
6889
6890 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6891
6892 * Makefile.in (.SECONDARY): Define target.
6893
6894 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6895
6896 * linux-low.c (linux_wait_1): Adjust.
6897 * server.c (queue_stop_reply_callback): Adjust.
6898
6899 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6900
6901 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6902 QEnvironmentUnset and QEnvironmentReset packets.
6903 (handle_query): Inform remote that QEnvironmentHexEncoded,
6904 QEnvironmentUnset and QEnvironmentReset are supported.
6905
6906 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6907
6908 * inferiors.h (inferior_target_data): Rename to ...
6909 (thread_target_data): ... this.
6910 (inferior_regcache_data): Rename to ...
6911 (thread_regcache_data): ... this.
6912 (set_inferior_regcache_data): Rename to ...
6913 (set_thread_regcache_data): ... this.
6914 * inferiors.c (inferior_target_data): Rename to ...
6915 (thread_target_data): ... this.
6916 (inferior_regcache_data): Rename to ...
6917 (thread_regcache_data): ... this.
6918 (set_inferior_regcache_data): Rename to ...
6919 (set_thread_regcache_data): ... this.
6920 (free_one_thread): Update.
6921 * linux-low.h (get_thread_lwp): Update.
6922 * regcache.c (get_thread_regcache): Update.
6923 (regcache_invalidate_thread): Update.
6924 (free_register_cache_thread): Update.
6925 * win32-i386-low.c (update_debug_registers_callback): Update.
6926 (win32_get_current_dr): Update.
6927 * win32-low.c (thread_rec): Update.
6928 (delete_thread_info): Update.
6929 (continue_one_thread): Update.
6930 (suspend_one_thread): Update.
6931
6932 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6933
6934 * inferiors.c (set_inferior_target_data): Remove.
6935 * inferiors.h (set_inferior_target_data): Remove.
6936
6937 2017-08-18 Yao Qi <yao.qi@linaro.org>
6938
6939 * Makefile.in (OBS): Add selftest.o.
6940 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6941 * configure, config.in: Re-generated.
6942 * server.c: Include common/sefltest.h.
6943 (captured_main): Handle option --selftest.
6944
6945 2017-08-09 Yao Qi <yao.qi@linaro.org>
6946
6947 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6948 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6949 i386-avx-mpx.o and i386-mmx.o.
6950 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6951 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6952 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6953 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6954 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6955 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6956 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6957 i386/amd64-avx-mpx.xml.
6958
6959 2017-08-09 Yao Qi <yao.qi@linaro.org>
6960
6961 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6962 and x32-avx-avx512.o.
6963 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6964 i386/x32-avx-avx512.xml.
6965
6966 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6967
6968 * tracepoint.h (enum class fast_tpoint_collect_result): New
6969 enumeration.
6970 (fast_tracepoint_collecting): Change return type to
6971 fast_tpoint_collect_result.
6972 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6973 * linux-low.h: Include tracepoint.h.
6974 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6975 fast_tpoint_collect_result.
6976 * linux-low.c (handle_tracepoints): Adjust.
6977 (linux_fast_tracepoint_collecting): Change return type to
6978 fast_tpoint_collect_result.
6979 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6980 linux_wait_1, stuck_in_jump_pad_callback,
6981 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6982 proceed_one_lwp): Adjust to type change.
6983
6984 2017-07-10 Yao Qi <yao.qi@linaro.org>
6985
6986 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
6987
6988 2017-06-29 Yao Qi <yao.qi@linaro.org>
6989
6990 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
6991 Remove.
6992 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
6993
6994 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
6995
6996 * Makefile.in (IPA_OBJS): Sort and format one item per line.
6997
6998 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
6999
7000 * linux-low.c (linux_create_inferior): Adjust code to access the
7001 environment information via 'gdb_environ' class.
7002 * lynx-low.c (lynx_create_inferior): Likewise.
7003 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7004 (get_environ): Return a pointer to 'our_environ'.
7005 (captured_main): Initialize 'our_environ'.
7006 * server.h (get_environ): Adjust prototype.
7007 * spu-low.c (spu_create_inferior): Adjust code to access the
7008 environment information via 'gdb_environ' class.
7009
7010 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7011
7012 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7013 usage of "register" keyword.
7014
7015 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7016
7017 * configure: Re-generate.
7018
7019 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7020
7021 * configure: Re-generate.
7022
7023 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7024
7025 * Makefile.in (COMPILE.pre): Add "-x c++".
7026
7027 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7028
7029 * fork-child.c: Conditionally include <signal.h>.
7030
7031 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7032
7033 * server.c (handle_general_set): Handle new packet
7034 "QStartupWithShell".
7035 (handle_query): Add "QStartupWithShell" to the list of supported
7036 packets.
7037 (gdbserver_usage): Add help text explaining the
7038 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7039 options.
7040 (captured_main): Recognize and act upon the presence of the new
7041 CLI options.
7042
7043 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7044 Pedro Alves <palves@redhat.com>
7045
7046 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7047 * configure: Regenerate.
7048 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7049 "fork-inferior.o".
7050 (i[34567]86-*-lynxos*): Likewise.
7051 (spu*-*-*): Likewise.
7052 * fork-child.c: New file.
7053 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7054 and "environ.h".
7055 (linux_ptrace_fun): New function.
7056 (linux_create_inferior): Adjust function prototype to reflect
7057 change on "target.h". Adjust function code to use
7058 "fork_inferior".
7059 (linux_request_interrupt): Delete "signal_pid".
7060 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7061 (lynx_ptrace_fun): New function.
7062 (lynx_create_inferior): Adjust function prototype to reflect
7063 change on "target.h". Adjust function code to use
7064 "fork_inferior".
7065 * nto-low.c (nto_create_inferior): Adjust function prototype and
7066 code to reflect change on "target.h". Update comments.
7067 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7068 "common-terminal.h" and "environ.h".
7069 (terminal_fd): Moved to fork-child.c.
7070 (old_foreground_pgrp): Likewise.
7071 (restore_old_foreground_pgrp): Likewise.
7072 (last_status): Make it global.
7073 (last_ptid): Likewise.
7074 (our_environ): New variable.
7075 (startup_with_shell): Likewise.
7076 (program_name): Likewise.
7077 (program_argv): Rename to...
7078 (program_args): ...this.
7079 (wrapper_argv): New variable.
7080 (start_inferior): Delete function.
7081 (get_exec_wrapper): New function.
7082 (get_exec_file): Likewise.
7083 (get_environ): Likewise.
7084 (prefork_hook): Likewise.
7085 (post_fork_inferior): Likewise.
7086 (postfork_hook): Likewise.
7087 (postfork_child_hook): Likewise.
7088 (handle_v_run): Update code to deal with arguments coming from the
7089 remote host. Update calls from "start_inferior" to
7090 "create_inferior".
7091 (captured_main): Likewise. Initialize environment variable. Call
7092 "have_job_control".
7093 * server.h (post_fork_inferior): New prototype.
7094 (get_environ): Likewise.
7095 (last_status): Declare.
7096 (last_ptid): Likewise.
7097 (signal_pid): Likewise.
7098 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7099 (spu_ptrace_fun): New function.
7100 (spu_create_inferior): Adjust function prototype to reflect change
7101 on "target.h". Adjust function code to use "fork_inferior".
7102 * target.c (target_terminal_init): New function.
7103 (target_terminal_inferior): Likewise.
7104 (target_terminal_ours): Likewise.
7105 * target.h: Include <vector>.
7106 (struct target_ops) <create_inferior>: Update prototype.
7107 (create_inferior): Update macro.
7108 * utils.c (gdb_flush_out_err): New function.
7109 * win32-low.c (win32_create_inferior): Adjust function prototype
7110 and code to reflect change on "target.h".
7111
7112 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7113
7114 * inferiors.c (switch_to_thread): New function.
7115
7116 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7117
7118 * Makefile.in (SFILE): Add "common/job-control.c".
7119 (OBS): Add "job-control.o".
7120
7121 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7122
7123 * Makefile: Remove "@host_makefile_frag@".
7124
7125 2017-05-05 Pedro Alves <palves@redhat.com>
7126
7127 * configure: Regenerate.
7128
7129 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7130
7131 * configure: Regenerate.
7132
7133 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7134
7135 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7136 software_single_step change of return type to
7137 std::vector<CORE_ADDR>.
7138 * linux-low.c (install_software_single_step_breakpoints):
7139 Likewise.
7140 * linux-low.h (install_software_single_step_breakpoints):
7141 Likewise.
7142
7143 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7144
7145 * remote-utils.c: Include "gdb_termios.h" instead of
7146 "terminal.h".
7147 * terminal.h: Delete file.
7148
7149 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7150
7151 * server.c: Include <vector>.
7152 <program_argv, wrapper_argv>: Convert to std::vector.
7153 (start_inferior): Rewrite function to use C++.
7154 (handle_v_run): Likewise. Update code that calculates the argv
7155 based on the vRun packet; use C++.
7156 (captured_main): Likewise.
7157
7158 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7159
7160 * server.c (handle_v_cont): Initialize thread_resume::thread
7161 with null_ptid.
7162
7163 2017-04-05 Pedro Alves <palves@redhat.com>
7164
7165 * configure: Regenerate.
7166
7167 2017-04-05 Pedro Alves <palves@redhat.com>
7168
7169 * gdbreplay.c (sync_error): Constify.
7170 * linux-x86-low.c (push_opcode): Constify.
7171
7172 2017-04-05 Pedro Alves <palves@redhat.com>
7173
7174 * win32-low.c (get_child_debug_event)
7175 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7176 Report TARGET_WAITKIND_SPURIOUS instead.
7177
7178 2017-04-05 Pedro Alves <palves@redhat.com>
7179
7180 * remote-utils.c (remote_prepare, remote_open): Constify.
7181 * remote-utils.h (remote_prepare, remote_open): Constify.
7182 * server.c (captured_main): Constify 'port' handling.
7183
7184 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7185
7186 * Makefile.in (clean): Clear .deps.
7187
7188 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7189
7190 * .gitignore: Remove generated files, replace with wildcard.
7191 * (clean): Replace removal of generated files with wildcard.
7192 (version.c): Replace with...
7193 (version-generated.c): ...this.
7194 (xml-builtin.c): Replace with...
7195 (xml-builtin-generated.c): ...this.
7196 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7197 (%.c: *regformats*): Replace with...
7198 (%-generated.c: *regformats*): ...this.
7199
7200 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7201
7202 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7203 (xtensa_fill_gregset): Call collect_register_by_name for
7204 threadptr register.
7205 (xtensa_store_gregset): Call supply_register_by_name for
7206 threadptr register.
7207
7208 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7209
7210 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7211 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7212 (xtensa_store_gregset): Call supply_register for all registers in
7213 a0_regnum..a0_regnum + C0_NREGS range.
7214
7215 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7216
7217 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7218 (ax-ipa.o: ax.c): Remove.
7219 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7220 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7221 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7222 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7223 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7224
7225 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7226
7227 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7228 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7229 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7230 (errors-ipa.o: ../common/errors.c): Remove.
7231 (format-ipa.o: ../common/format.c): Remove.
7232 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7233
7234 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7235
7236 * Makefile.in (%-ipa.o: %.c): New rule.
7237 (tracepoint-ipa.o: tracepoint.c): Remove.
7238 (utils-ipa.o: utils.c): Remove.
7239 (remote-utils-ipa.o: remote-utils.c): Remove.
7240 (regcache-ipa.o: regcache.c): Remove.
7241 (i386-linux-ipa.o: i386-linux.c): Remove.
7242 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7243 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7244 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7245 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7246 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7247 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7248 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7249 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7250 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7251 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7252 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7253 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7254 (aarch64-ipa.o: aarch64.c): Remove.
7255 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7256 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7257 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7258 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7259 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7260 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7261 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7262 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7263 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7264 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7265 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7266 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7267 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7268 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7269 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7270 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7271 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7272 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7273 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7274 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7275 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7276 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7277 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7278 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7279 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7280 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7281 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7282 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7283 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7284 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7285 (tdesc-ipa.o: tdesc.c): Remove.
7286 (x32-linux-ipa.o: x32-linux.c): Remove.
7287 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7288 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7289
7290 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7291
7292 * Makefile.in (%.o: ../arch/%.c): New rule.
7293 (arm.o: ../arch/arm.c): Remove.
7294 (arm-linux.o: ../arch/arm-linux.c): Remove.
7295 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7296 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7297
7298 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7299
7300 * Makefile.in (%.o: ../nat/%.c): New rule.
7301 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7302 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7303 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7304 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7305 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7306 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7307 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7308 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7309 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7310 (linux-personality.o: ../nat/linux-personality.c): Remove.
7311 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7312 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7313 (x86-linux.o: ../nat/x86-linux.c): Remove.
7314 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7315 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7316
7317 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7318
7319 * Makefile.in (%.o: ../common/%.c): New rule.
7320 (signals.o: ../common/signals.c): Remove.
7321 (print-utils.o: ../common/print-utils.c): Remove.
7322 (rsp-low.o: ../common/rsp-low.c): Remove.
7323 (common-utils.o: ../common/common-utils.c): Remove.
7324 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7325 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7326 (vec.o: ../common/vec.c): Remove.
7327 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7328 (xml-utils.o: ../common/xml-utils.c): Remove.
7329 (ptid.o: ../common/ptid.c): Remove.
7330 (buffer.o: ../common/buffer.c): Remove.
7331 (format.o: ../common/format.c): Remove.
7332 (filestuff.o: ../common/filestuff.c): Remove.
7333 (agent.o: ../common/agent.c): Remove.
7334 (errors.o: ../common/errors.c): Remove.
7335 (environ.o: ../common/environ.c): Remove.
7336 (common-debug.o: ../common/common-debug.c): Remove.
7337 (cleanups.o: ../common/cleanups.c): Remove.
7338 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7339 (fileio.o: ../common/fileio.c): Remove.
7340 (common-regcache.o: ../common/common-regcache.c): Remove.
7341 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7342 (new-op.o: ../common/new-op.c): Remove.
7343 (btrace-common.o: ../common/btrace-common.c): Remove.
7344
7345 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7346
7347 * Makefile.in (%.o: ../target/%.c): New rule.
7348 (waitstatus.o: ../target/waitstatus.c): Remove.
7349
7350 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7351
7352 * Makefile.in
7353 (%.c: ../regformats/%.dat,
7354 (%.c: ../regformats/arm/%.dat,
7355 (%.c: ../regformats/i386/%.dat,
7356 (%.c: ../regformats/rs6000/%.dat): New rules.
7357 (aarch64.c): Remove.
7358 (reg-arm.c): Remove.
7359 (arm-with-iwmmxt.c): Remove.
7360 (arm-with-vfpv2.c): Remove.
7361 (arm-with-vfpv3.c): Remove.
7362 (arm-with-neon.c): Remove.
7363 (reg-bfin.c): Remove.
7364 (reg-cris.c): Remove.
7365 (reg-crisv32.c): Remove.
7366 (i386.c): Remove.
7367 (i386-linux.c): Remove.
7368 (i386-avx.c): Remove.
7369 (i386-avx-linux.c): Remove.
7370 (i386-avx-avx512.c): Remove.
7371 (i386-avx-avx512-linux.c): Remove.
7372 (i386-mpx.c): Remove.
7373 (i386-mpx-linux.c): Remove.
7374 (i386-avx-mpx-avx512-pku.c): Remove.
7375 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7376 (i386-avx-mpx.c): Remove.
7377 (i386-avx-mpx-linux.c): Remove.
7378 (i386-mmx.c): Remove.
7379 (i386-mmx-linux.c): Remove.
7380 (reg-ia64.c): Remove.
7381 (reg-m32r.c): Remove.
7382 (reg-m68k.c): Remove.
7383 (reg-cf.c): Remove.
7384 (mips-linux.c): Remove.
7385 (mips-dsp-linux.c): Remove.
7386 (mips64-linux.c): Remove.
7387 (mips64-dsp-linux.c): Remove.
7388 (nios2-linux.c): Remove.
7389 (powerpc-32.c): Remove.
7390 (powerpc-32l.c): Remove.
7391 (powerpc-altivec32l.c): Remove.
7392 (powerpc-cell32l.c): Remove.
7393 (powerpc-vsx32l.c): Remove.
7394 (powerpc-isa205-32l.c): Remove.
7395 (powerpc-isa205-altivec32l.c): Remove.
7396 (powerpc-isa205-vsx32l.c): Remove.
7397 (powerpc-e500l.c): Remove.
7398 (powerpc-64l.c): Remove.
7399 (powerpc-altivec64l.c): Remove.
7400 (powerpc-cell64l.c): Remove.
7401 (powerpc-vsx64l.c): Remove.
7402 (powerpc-isa205-64l.c): Remove.
7403 (powerpc-isa205-altivec64l.c): Remove.
7404 (powerpc-isa205-vsx64l.c): Remove.
7405 (s390-linux32.c): Remove.
7406 (s390-linux32v1.c): Remove.
7407 (s390-linux32v2.c): Remove.
7408 (s390-linux64.c): Remove.
7409 (s390-linux64v1.c): Remove.
7410 (s390-linux64v2.c): Remove.
7411 (s390-te-linux64.c): Remove.
7412 (s390-vx-linux64.c): Remove.
7413 (s390-tevx-linux64.c): Remove.
7414 (s390x-linux64.c): Remove.
7415 (s390x-linux64v1.c): Remove.
7416 (s390x-linux64v2.c): Remove.
7417 (s390x-te-linux64.c): Remove.
7418 (s390x-vx-linux64.c): Remove.
7419 (s390x-tevx-linux64.c): Remove.
7420 (tic6x-c64xp-linux.c): Remove.
7421 (tic6x-c64x-linux.c): Remove.
7422 (tic6x-c62x-linux.c): Remove.
7423 (reg-sh.c): Remove.
7424 (reg-sparc64.c): Remove.
7425 (reg-spu.c): Remove.
7426 (amd64.c): Remove.
7427 (amd64-linux.c): Remove.
7428 (amd64-avx.c): Remove.
7429 (amd64-avx-linux.c): Remove.
7430 (amd64-avx-avx512.c): Remove.
7431 (amd64-avx-avx512-linux.c): Remove.
7432 (amd64-mpx.c): Remove.
7433 (amd64-mpx-linux.c): Remove.
7434 (amd64-avx-mpx-avx512-pku.c): Remove.
7435 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7436 (amd64-avx-mpx.c): Remove.
7437 (amd64-avx-mpx-linux.c): Remove.
7438 (x32.c): Remove.
7439 (x32-linux.c): Remove.
7440 (x32-avx.c): Remove.
7441 (x32-avx-linux.c): Remove.
7442 (x32-avx-avx512.c): Remove.
7443 (x32-avx-avx512-linux.c): Remove.
7444 (reg-xtensa.c): Remove.
7445 (reg-tilegx.c): Remove.
7446 (reg-tilegx32.c): Remove.
7447
7448 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7449
7450 * Makefile.in (SFILES): Add "common/environ.c".
7451 (OBJS): Add "common/environ.h".
7452
7453 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7454
7455 * configure.ac: Check if the fs_base and gs_base members of
7456 `struct user_regs_struct' exist.
7457 * config.in: Regenerated.
7458 * configure: Likewise.
7459
7460 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7461
7462 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7463 target_read_memory.
7464 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7465 (get_next_pcs_syscall_next_pc): Likewise.
7466
7467 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7468
7469 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7470 * nto-x86-low.c: Likewise.
7471
7472 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7473
7474 * Makefile.in: Include disable-implicit-rules.mk.
7475
7476 2016-11-23 Pedro Alves <palves@redhat.com>
7477
7478 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7479 (debug_vprintf): Use std::chrono::steady_clock instead of
7480 gettimeofday. Use '.' instead of ':'.
7481 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7482 (get_timestamp): Use std::chrono::steady_clock instead of
7483 gettimeofday.
7484
7485 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7486
7487 * Makefile.in: Fix whitespace formatting.
7488
7489 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7490
7491 * Makefile.in (SFILES, OBS): Flatten list and order
7492 alphabetically.
7493
7494 2016-11-23 Pedro Alves <palves@redhat.com>
7495
7496 * event-loop.c (handle_file_event): Use warning.
7497 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7498 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7499 Use warning.
7500
7501 2016-11-23 Pedro Alves <palves@redhat.com>
7502
7503 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7504 output.
7505 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7506 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7507 debug_printf and debug_flush for debug output.
7508 * server.c (handle_general_set): Likewise.
7509 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7510 output.
7511
7512 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7513
7514 * Makefile.in (.c.o): Replace rule with ...
7515 (%.o: %.c): ... this one.
7516
7517 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7518
7519 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7520 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7521 make.
7522 * configure.ac: Remove checks for the make program.
7523 * configure: Re-generate.
7524
7525 2016-10-28 Pedro Alves <palves@redhat.com>
7526
7527 * Makefile.in (CXX_DIALECT): Get from configure.
7528 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7529 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7530 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7531 * config.in: Regenerate.
7532 * configure: Regenerate.
7533
7534 2016-10-27 Yao Qi <yao.qi@linaro.org>
7535
7536 * linux-low.c (linux_supports_range_stepping): Return true if
7537 can_software_single_step return true.
7538
7539 2016-10-27 Yao Qi <yao.qi@linaro.org>
7540
7541 * inferiors.c (find_inferior_in_random): New function.
7542 * inferiors.h (find_inferior_in_random): Declare.
7543 * linux-low.c (linux_wait_for_event_filtered): Call
7544 find_inferior_in_random instead of find_inferior.
7545
7546 2016-10-27 Yao Qi <yao.qi@linaro.org>
7547
7548 * linux-low.c (linux_wait_1): If single-step breakpoints are
7549 inserted, remove them.
7550
7551 2016-10-26 Pedro Alves <palves@redhat.com>
7552
7553 * linux-low.c (handle_extended_wait): Link parent/child fork
7554 threads.
7555 (linux_wait_1): Unlink them.
7556 (linux_set_resume_request): Ignore resume requests for
7557 already-resumed and unhandled fork child threads.
7558 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7559 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7560 New functions.
7561 (handle_v_requests) <vCont>: Don't call require_running.
7562 * server.h (in_queued_stop_replies): New declaration.
7563
7564 2016-10-24 Yao Qi <yao.qi@linaro.org>
7565
7566 PR server/20733
7567 * linux-aarch64-low.c (append_insns): Cast the return value to
7568 'uint32_t *'.
7569
7570 2016-10-10 Yao Qi <yao.qi@linaro.org>
7571
7572 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7573
7574 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7575
7576 * target.c (target_supports_multi_process): New function, moved
7577 from...
7578 * target.h (target_supports_multi_process): ... here. Remove
7579 macro.
7580
7581 2016-10-05 Tom Tromey <tom@tromey.com>
7582
7583 PR remote/20655:
7584 * tracepoint.c (handle_tracepoint_bkpts): Check
7585 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7586
7587 2016-10-05 Yao Qi <yao.qi@linaro.org>
7588
7589 * configure.srv: Update the path of arm-*.xml files.
7590
7591 2016-10-05 Terry Guo <terry.guo@arm.com>
7592 Yao Qi <yao.qi@linaro.org>
7593
7594 * Makefile.in: Adjust the path of rules.
7595 * configure.srv: Update the path of xml files.
7596 * regformats/arm-with-iwmmxt.dat: Regenerated.
7597 * regformats/arm-with-neon.dat: Likewise.
7598 * regformats/arm-with-vfpv2.dat: Likewise.
7599 * regformats/arm-with-vfpv3.dat Likewise.
7600
7601 2016-09-30 Yao Qi <yao.qi@linaro.org>
7602
7603 PR gdbserver/20627
7604 * target.c (target_stop_and_wait): Don't call
7605 target_continue_no_signal, use resume_stop instead.
7606
7607 2016-09-26 Yao Qi <yao.qi@linaro.org>
7608
7609 * linux-low.c (linux_wait_1): Call debug_exit.
7610
7611 2016-09-23 Pedro Alves <palves@redhat.com>
7612
7613 * Makefile.in (SFILES): Add common/new-op.c.
7614 (OBS): Add common/new-op.o.
7615 (new-op.o): New rule.
7616
7617 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7618
7619 * .gitinore: Ignore more files.
7620
7621 2016-09-21 Yao Qi <yao.qi@linaro.org>
7622
7623 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7624 23.
7625
7626 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7627
7628 * server.c (start_inferior): Call target_mourn_inferior instead of
7629 mourn_inferior; pass ptid_t argument to it.
7630 (resume): Likewise.
7631 (handle_target_event): Likewise.
7632 * target.c (target_mourn_inferior): New function.
7633 * target.h (mourn_inferior): Delete macro.
7634
7635 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7636
7637 * linux-low.c (lwp_is_stepping): New function.
7638
7639 2016-09-06 Carl Love <cel@us.ibm.com>
7640
7641 * server.c (start_inferior): Fixed comment, requested comment change
7642 didn't get updated correctly. Removed reference to ptrace () call as
7643 it is only true on Linux systems.
7644
7645 2016-09-06 Carl Love <cel@us.ibm.com>
7646
7647 * server.c (start_inferior): Do not call
7648 function target_post_create_inferior () if the
7649 inferior process has already exited.
7650
7651 2016-09-05 Pedro Alves <palves@redhat.com>
7652
7653 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7654 (COMPILE.pre, CC_LD): Use CXX directly.
7655 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7656 * acinclude.m4: Don't include build-with-cxx.m4.
7657 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7658 * configure: Regenerate.
7659
7660 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7661
7662 PR gdb/19495
7663 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7664 call writing data to own_buf.
7665
7666 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7667
7668 * target.c (mywait): Call target_wait instead of
7669 the_target->wait.
7670 (target_wait): New function.
7671
7672 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7673
7674 * server.c (start_inferior): New variable 'ptid'. Replace calls
7675 to the_target->resume by target_continue{,_no_signal}, depending
7676 on the case.
7677 * target.c (target_stop_and_wait): Call target_continue_no_signal
7678 instead of the_target->resume.
7679 (target_continue): New function.
7680
7681 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7682
7683 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7684
7685 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7686
7687 PR server/20491
7688 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7689 ps_prochandle.
7690 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7691 * linux-arm-low.c (ps_get_thread_area): Likewise.
7692 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7693 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7694 * linux-mips-low.c (ps_get_thread_area): Likewise.
7695 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7696 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7697 * linux-x86-low.c (ps_get_thread_area): Likewise.
7698 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7699
7700 2016-08-19 Pedro Alves <palves@redhat.com>
7701
7702 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7703
7704 2016-08-19 Pedro Alves <palves@redhat.com>
7705
7706 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7707 comment. Use memcpy instead of casting through unsigned long.
7708
7709 2016-08-19 Pedro Alves <palves@redhat.com>
7710
7711 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7712 allocating around 0x80000000.
7713
7714 2016-08-19 Pedro Alves <palves@redhat.com>
7715
7716 PR gdb/20415
7717 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7718 (x32-avx512-linux-ipa.o): New rules.
7719 * configure.ac (x86_64-*-linux*): New x32 check.
7720 * configure.srv (ipa_x32_linux_regobj): New.
7721 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7722 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7723 descriptions.
7724 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7725 descriptions.
7726 * configure: Regenerate.
7727
7728 2016-08-09 Pedro Alves <palves@redhat.com>
7729
7730 PR gdb/18653
7731 * Makefile.in (OBS): Add signals-state-save-restore.o.
7732 (signals-state-save-restore.o): New rule.
7733 * config.in: Regenerate.
7734 * configure: Regenerate.
7735 * linux-low.c: Include "signals-state-save-restore.h".
7736 (linux_create_inferior): Call
7737 restore_original_signals_state.
7738 * server.c: Include "dispositions-save-restore.h".
7739 (captured_main): Call save_original_signals_state.
7740
7741 2016-08-05 Pedro Alves <palves@redhat.com>
7742
7743 * configure: Regenerate.
7744
7745 2016-08-04 Yao Qi <yao.qi@linaro.org>
7746
7747 * linux-low.c (regsets_fetch_inferior_registers): Check
7748 errno is ESRCH or not.
7749
7750 2016-08-02 Yao Qi <yao.qi@linaro.org>
7751
7752 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7753 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7754 (thread_db_load_search): Update.
7755 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7756 td_ta_set_event and td_ta_event_getmsg.
7757
7758 2016-07-26 Pedro Alves <palves@redhat.com>
7759
7760 PR server/20414
7761 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7762 of unsigned long for 64-bit registers and use uint32_t instead of
7763 unsigned int for 32-bit registers.
7764
7765 2016-07-26 Pedro Alves <palves@redhat.com>
7766
7767 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7768 to 'ptrace'.
7769
7770 2016-07-21 Tom Tromey <tom@tromey.com>
7771
7772 * configure: Rebuild.
7773
7774 2016-07-21 Yao Qi <yao.qi@linaro.org>
7775
7776 * mem-break.c (find_gdb_breakpoint): Cast bp to
7777 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7778
7779 2016-07-21 Yao Qi <yao.qi@linaro.org>
7780
7781 * server.c (handle_v_requests): Support s and S actions
7782 if target_supports_software_single_step return true.
7783
7784 2016-07-21 Yao Qi <yao.qi@linaro.org>
7785
7786 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7787 is resume_step, call maybe_hw_step.
7788 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7789 and unstop them.
7790 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7791 breakpoints or not.
7792 (proceed_one_lwp): If resume request is resume_step, install
7793 reinsert breakpoints and call maybe_hw_step.
7794
7795 2016-07-21 Yao Qi <yao.qi@linaro.org>
7796
7797 * linux-low.c (proceed_one_lwp): Declare.
7798 (linux_resume_one_thread): Remove local variable 'step'.
7799 Lift code enqueue signal. Call proceed_one_lwp instead of
7800 linux_resume_one_lwp.
7801
7802 2016-07-21 Yao Qi <yao.qi@linaro.org>
7803
7804 * linux-low.c (linux_resume_one_thread): Call
7805 enqueue_pending_signal.
7806
7807 2016-07-21 Yao Qi <yao.qi@linaro.org>
7808
7809 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7810 * inferiors.c (do_restore_current_thread_cleanup): New function.
7811 (make_cleanup_restore_current_thread): Likewise.
7812 * linux-low.c (install_software_single_step_breakpoints): Call
7813 make_cleanup_restore_current_thread. Switch current_thread to
7814 thread.
7815
7816 2016-07-21 Yao Qi <yao.qi@linaro.org>
7817
7818 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7819 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7820 (clone_one_breakpoint): Likewise.
7821 (delete_reinsert_breakpoints): Change parameter to thread.
7822 Callers updated.
7823 (has_reinsert_breakpoints): Likewise.
7824 (uninsert_reinsert_breakpoints): Likewise.
7825 (reinsert_reinsert_breakpoints): Likewise.
7826 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7827 (delete_reinsert_breakpoints): Likewise.
7828 (reinsert_reinsert_breakpoints): Likewise.
7829 (uninsert_reinsert_breakpoints): Likewise.
7830 (has_reinsert_breakpoints): Likewise.
7831
7832 2016-07-21 Yao Qi <yao.qi@linaro.org>
7833
7834 * inferiors.c (get_thread_process): Make parameter const.
7835 * inferiors.h (get_thread_process): Update declaration.
7836 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7837 Add new parameters child_thread and parent_thread. Callers
7838 updated.
7839 * mem-break.h (clone_all_breakpoints): Update declaration.
7840
7841 2016-07-21 Yao Qi <yao.qi@linaro.org>
7842
7843 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7844 <command_list, handler>: Remove.
7845 (struct gdb_breakpoint): New.
7846 (struct other_breakpoint): New.
7847 (struct reinsert_breakpoint): New.
7848 (is_gdb_breakpoint): New function.
7849 (any_persistent_commands): Update command_list if
7850 is_gdb_breakpoint returns true.
7851 (set_breakpoint): Create breakpoints according to their types.
7852 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7853 (set_gdb_breakpoint_1): Likewise.
7854 (set_gdb_breakpoint): Likewise.
7855 (clear_breakpoint_conditions): Change parameter type to
7856 'struct gdb_breakpoint *'.
7857 (clear_breakpoint_commands): Likewise.
7858 (clear_breakpoint_conditions_and_commands): Likewise.
7859 (add_condition_to_breakpoint): Likewise.
7860 (add_breakpoint_condition): Likewise.
7861 (add_commands_to_breakpoint): Likewise.
7862 (check_breakpoints): Check other_breakpoint.
7863 (clone_one_breakpoint): Clone breakpopint according to its type.
7864 * mem-break.h (struct gdb_breakpoint): Declare.
7865 (set_gdb_breakpoint): Update declaration.
7866 (clear_breakpoint_conditions_and_commands): Likewise.
7867 (add_breakpoint_condition): Likewise.
7868 (add_breakpoint_commands): Likewise.
7869 * server.c (process_point_options): Change parameter type to
7870 'struct gdb_breakpoint *'.
7871
7872 2016-07-21 Yao Qi <yao.qi@linaro.org>
7873
7874 * mem-break.c (set_breakpoint_at): Rename it to ...
7875 (set_breakpoint_type_at): ... it.
7876 (set_breakpoint_at): Call set_breakpoint_type_at.
7877 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7878 * mem-break.h (set_breakpoint_at): Update comments.
7879
7880 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7881
7882 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7883 to buf parameter.
7884 (nios2_store_gregset): Likewise.
7885
7886 2016-07-01 Pedro Alves <palves@redhat.com>
7887 Antoine Tremblay <antoine.tremblay@ericsson.com>
7888
7889 * linux-low.c: Change interface to take the target lwp_info
7890 pointer directly and return void. Handle detaching from a zombie
7891 thread.
7892 (linux_detach_lwp_callback): New function.
7893 (linux_detach): Detach from the leader thread after detaching from
7894 the clone threads.
7895
7896 2016-06-28 Yao Qi <yao.qi@linaro.org>
7897
7898 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7899 for variable new_offset.
7900 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7901 (aarch64_ftrace_insn_reloc_cb): Likewise.
7902 (aarch64_ftrace_insn_reloc_tb): Likewise.
7903 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7904 PRIx64 instead of PRIx32.
7905
7906 2016-06-28 Yao Qi <yao.qi@linaro.org>
7907
7908 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7909 (the_low_target): Install arm_get_syscall_trapinfo.
7910
7911 2016-06-28 Yao Qi <yao.qi@linaro.org>
7912
7913 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7914 function.
7915 (the_low_target): Install aarch64_get_syscall_trapinfo.
7916
7917 2016-06-28 Yao Qi <yao.qi@linaro.org>
7918
7919 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7920 Callers updated.
7921 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7922 Remove parameter sysno.
7923 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7924 sysret.
7925
7926 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7927
7928 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7929 (s390_emit_ne_goto): Likewise.
7930 (s390_emit_lt_goto): Likewise.
7931 (s390_emit_le_goto): Likewise.
7932 (s390_emit_gt_goto): Likewise.
7933 (s390_emit_ge_goto): Likewise.
7934 (s390x_emit_eq_goto): Likewise.
7935 (s390x_emit_ne_goto): Likewise.
7936 (s390x_emit_lt_goto): Likewise.
7937 (s390x_emit_le_goto): Likewise.
7938 (s390x_emit_gt_goto): Likewise.
7939 (s390x_emit_ge_goto): Likewise.
7940 (s390_emit_ops_impl): Mark variable static.
7941 (s390x_emit_ops): Likewise.
7942
7943 2016-06-17 Yao Qi <yao.qi@linaro.org>
7944
7945 * linux-low.c (handle_extended_wait): Call
7946 uninsert_reinsert_breakpoints for the parent process. Remove
7947 reinsert breakpoints from the child process. Reinsert them to
7948 the parent process when vfork is done.
7949 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7950 (reinsert_reinsert_breakpoints): New function.
7951 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7952 (reinsert_reinsert_breakpoints): Declare.
7953
7954 2016-06-17 Yao Qi <yao.qi@linaro.org>
7955
7956 * linux-low.c (handle_extended_wait): If the parent is doing
7957 step-over, remove the reinsert breakpoints from the forked child.
7958
7959 2016-06-17 Yao Qi <yao.qi@linaro.org>
7960
7961 * linux-low.c (unsuspend_all_lwps): Declare.
7962 (linux_low_filter_event): If thread exited, call finish_step_over.
7963 If step-over is finished, unsuspend other threads.
7964
7965 2016-06-17 Yao Qi <yao.qi@linaro.org>
7966
7967 * linux-low.c (linux_resume_one_lwp_throw): Assert
7968 has_reinsert_breakpoints returns false.
7969 * mem-break.c (delete_disabled_breakpoints): Assert
7970 bp type isn't reinsert_breakpoint.
7971
7972 2016-06-17 Yao Qi <yao.qi@linaro.org>
7973
7974 * linux-low.c (maybe_hw_step): New function.
7975 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7976 (finish_step_over): Switch current_thread to lwp temporarily,
7977 and assert has_reinsert_breakpoints returns true.
7978 (proceed_one_lwp): Call maybe_hw_step.
7979 * mem-break.c (has_reinsert_breakpoints): New function.
7980 * mem-break.h (has_reinsert_breakpoints): Declare.
7981
7982 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7983
7984 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7985
7986 2016-05-17 Yao Qi <yao.qi@linaro.org>
7987
7988 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
7989 instead of find_inferior.
7990
7991 2016-05-05 Yao Qi <yao.qi@linaro.org>
7992
7993 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
7994 Initialize res to zero.
7995
7996 2016-05-05 Yao Qi <yao.qi@linaro.org>
7997
7998 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
7999 to uint32_t.
8000
8001 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8002
8003 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8004 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8005 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8006
8007 2016-04-28 Par Olsson <par.olsson@windriver.com>
8008 Simon Marchi <simon.marchi@ericsson.com>
8009
8010 * tracepoint.c (write_inferior_int8): New function.
8011 (cmd_qtenable_disable): Write enable flag using
8012 write_inferior_int8.
8013
8014 2016-04-25 Yao Qi <yao.qi@linaro.org>
8015
8016 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8017 (need_step_over_p): Return zero if the LWP has pending signals
8018 can be delivered on software single step target.
8019
8020 2016-04-25 Yao Qi <yao.qi@linaro.org>
8021
8022 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8023 return instead of error.
8024
8025 2016-04-22 Yao Qi <yao.qi@linaro.org>
8026
8027 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8028 to 23.
8029
8030 2016-04-22 Yao Qi <yao.qi@linaro.org>
8031
8032 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8033 signal when stepping over breakpoint with software single
8034 step.
8035
8036 2016-04-21 Pedro Alves <palves@redhat.com>
8037
8038 * linux-s390-low.c (s390_collect_ptrace_register)
8039 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8040 add casts.
8041 (s390_check_regset): Use void * instead of gdb_byte *.
8042
8043 2016-04-20 Pedro Alves <palves@redhat.com>
8044
8045 * configure: Renegerate.
8046
8047 2016-04-20 Yao Qi <yao.qi@linaro.org>
8048
8049 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8050 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8051 number 16.
8052 (arm_store_gregset): Likewise.
8053
8054 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8055
8056 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8057 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8058 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8059 (amd64-avx-mpx-linux.c): New rules.
8060 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8061 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8062 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8063 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8064 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8065 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8066 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8067 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8068 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8069 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8070 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8071 * linux-x86-low.c (x86_linux_read_description): Add case for
8072 X86_XSTATE_AVX_MPX_MASK.
8073 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8074 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8075 init_registers_i386_avx_mpx_linux.
8076 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8077 (initialize_low_tracepoint): Call
8078 init_registers_i386_avx_mpx_linux.
8079 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8080 (initialize_low_tracepoint): Call
8081 init_registers_amd64_avx_mpx_linux.
8082 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8083 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8084 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8085 declarations.
8086
8087 2016-04-18 Pedro Alves <palves@redhat.com>
8088
8089 * configure: Regenerate.
8090
8091 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8092
8093 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8094 (aarch64_emit_sub): Likewise.
8095
8096 2016-04-12 Pedro Alves <palves@redhat.com>
8097
8098 * utils.c (prepare_to_throw_exception): Delete.
8099
8100 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8101
8102 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8103
8104 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8105
8106 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8107
8108 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8109
8110 * linux-aarch64-ipa.c: Add <elf.h> include.
8111 * linux-ppc-ipa.c: Add <elf.h> include.
8112 * linux-s390-ipa.c: Add <elf.h> include.
8113
8114 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8115
8116 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8117 (get_raw_reg_ptr): Likewise.
8118 (get_trace_state_variable_value_ptr): Likewise.
8119 (set_trace_state_variable_value_ptr): Likewise.
8120 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8121 char *.
8122
8123 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8124 Marcin Kościelnicki <koriakin@0x04.net>
8125
8126 PR/17221
8127 * linux-ppc-low.c (emit_insns): New function.
8128 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8129 (ppc_emit_prologue): New function.
8130 (ppc_emit_epilogue): New function.
8131 (ppc_emit_add): New function.
8132 (ppc_emit_sub): New function.
8133 (ppc_emit_mul): New function.
8134 (ppc_emit_lsh): New function.
8135 (ppc_emit_rsh_signed): New function.
8136 (ppc_emit_rsh_unsigned): New function.
8137 (ppc_emit_ext): New function.
8138 (ppc_emit_zero_ext): New function.
8139 (ppc_emit_log_not): New function.
8140 (ppc_emit_bit_and): New function.
8141 (ppc_emit_bit_or): New function.
8142 (ppc_emit_bit_xor): New function.
8143 (ppc_emit_bit_not): New function.
8144 (ppc_emit_equal): New function.
8145 (ppc_emit_less_signed): New function.
8146 (ppc_emit_less_unsigned): New function.
8147 (ppc_emit_ref): New function.
8148 (ppc_emit_const): New function.
8149 (ppc_emit_reg): New function.
8150 (ppc_emit_pop): New function.
8151 (ppc_emit_stack_flush): New function.
8152 (ppc_emit_swap): New function.
8153 (ppc_emit_stack_adjust): New function.
8154 (ppc_emit_call): New function.
8155 (ppc_emit_int_call_1): New function.
8156 (ppc_emit_void_call_2): New function.
8157 (ppc_emit_if_goto): New function.
8158 (ppc_emit_goto): New function.
8159 (ppc_emit_eq_goto): New function.
8160 (ppc_emit_ne_goto): New function.
8161 (ppc_emit_lt_goto): New function.
8162 (ppc_emit_le_goto): New function.
8163 (ppc_emit_gt_goto): New function.
8164 (ppc_emit_ge_goto): New function.
8165 (ppc_write_goto_address): New function.
8166 (ppc_emit_ops_impl): New static variable.
8167 (ppc64v1_emit_prologue): New function.
8168 (ppc64v2_emit_prologue): New function.
8169 (ppc64_emit_epilogue): New function.
8170 (ppc64_emit_add): New function.
8171 (ppc64_emit_sub): New function.
8172 (ppc64_emit_mul): New function.
8173 (ppc64_emit_lsh): New function.
8174 (ppc64_emit_rsh_signed): New function.
8175 (ppc64_emit_rsh_unsigned): New function.
8176 (ppc64_emit_ext): New function.
8177 (ppc64_emit_zero_ext): New function.
8178 (ppc64_emit_log_not): New function.
8179 (ppc64_emit_bit_and): New function.
8180 (ppc64_emit_bit_or): New function.
8181 (ppc64_emit_bit_xor): New function.
8182 (ppc64_emit_bit_not): New function.
8183 (ppc64_emit_equal): New function.
8184 (ppc64_emit_less_signed): New function.
8185 (ppc64_emit_less_unsigned): New function.
8186 (ppc64_emit_ref): New function.
8187 (ppc64_emit_const): New function.
8188 (ppc64v1_emit_reg): New function.
8189 (ppc64v2_emit_reg): New function.
8190 (ppc64_emit_pop): New function.
8191 (ppc64_emit_stack_flush): New function.
8192 (ppc64_emit_swap): New function.
8193 (ppc64v1_emit_call): New function.
8194 (ppc64v2_emit_call): New function.
8195 (ppc64v1_emit_int_call_1): New function.
8196 (ppc64v2_emit_int_call_1): New function.
8197 (ppc64v1_emit_void_call_2): New function.
8198 (ppc64v2_emit_void_call_2): New function.
8199 (ppc64_emit_if_goto): New function.
8200 (ppc64_emit_eq_goto): New function.
8201 (ppc64_emit_ne_goto): New function.
8202 (ppc64_emit_lt_goto): New function.
8203 (ppc64_emit_le_goto): New function.
8204 (ppc64_emit_gt_goto): New function.
8205 (ppc64_emit_ge_goto): New function.
8206 (ppc64v1_emit_ops_impl): New static variable.
8207 (ppc64v2_emit_ops_impl): New static variable.
8208 (ppc_emit_ops): New function.
8209 (linux_low_target): Wire in ppc_emit_ops.
8210
8211 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8212 Marcin Kościelnicki <koriakin@0x04.net>
8213
8214 PR/17221
8215 * Makefile.in: Add powerpc-*-ipa.o
8216 * configure.srv: Add ipa_obj for powerpc*-linux.
8217 * linux-ppc-ipa.c: New file.
8218 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8219 includes.
8220 (PPC_FIELD): New macro.
8221 (PPC_SEXT): New macro.
8222 (PPC_OP6): New macro.
8223 (PPC_BO): New macro.
8224 (PPC_LI): New macro.
8225 (PPC_BD): New macro.
8226 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8227 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8228 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8229 (ppc_get_thread_area): New function.
8230 (is_elfv2_inferior): New function.
8231 (gen_ds_form): New function.
8232 (GEN_STD): New macro.
8233 (GEN_STDU): New macro.
8234 (GEN_LD): New macro.
8235 (GEN_LDU): New macro.
8236 (gen_d_form): New function.
8237 (GEN_ADDI): New macro.
8238 (GEN_ADDIS): New macro.
8239 (GEN_LI): New macro.
8240 (GEN_LIS): New macro.
8241 (GEN_ORI): New macro.
8242 (GEN_ORIS): New macro.
8243 (GEN_LWZ): New macro.
8244 (GEN_STW): New macro.
8245 (GEN_STWU): New macro.
8246 (gen_xfx_form): New function.
8247 (GEN_MFSPR): New macro.
8248 (GEN_MTSPR): New macro.
8249 (GEN_MFCR): New macro.
8250 (GEN_MTCR): New macro.
8251 (GEN_SYNC): New macro.
8252 (GEN_LWSYNC): New macro.
8253 (gen_x_form): New function.
8254 (GEN_OR): New macro.
8255 (GEN_MR): New macro.
8256 (GEN_LWARX): New macro.
8257 (GEN_STWCX): New macro.
8258 (GEN_CMPW): New macro.
8259 (gen_md_form): New function.
8260 (GEN_RLDICL): New macro.
8261 (GEN_RLDICR): New macro.
8262 (gen_i_form): New function.
8263 (GEN_B): New macro.
8264 (GEN_BL): New macro.
8265 (gen_b_form): New function.
8266 (GEN_BNE): New macro.
8267 (GEN_LOAD): New macro.
8268 (GEN_STORE): New macro.
8269 (gen_limm): New function.
8270 (gen_atomic_xchg): New function.
8271 (gen_call): New function.
8272 (ppc_relocate_instruction): New function.
8273 (ppc_install_fast_tracepoint_jump_pad): New function.
8274 (ppc_get_min_fast_tracepoint_insn_len): New function.
8275 (ppc_get_ipa_tdesc_idx): New function.
8276 (the_low_target): Wire in the new functions.
8277 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8278 tdescs.
8279 * linux-ppc-tdesc.h: New file.
8280
8281 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8282
8283 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8284 (alloc_jump_pad_buffer): New function.
8285 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8286 (alloc_jump_pad_buffer): New function.
8287 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8288 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8289 (alloc_jump_pad_buffer): New function.
8290 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8291 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8292 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8293 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8294
8295 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8296
8297 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8298 * linux-amd64-ipa.c: Likewise.
8299 * linux-i386-ipa.c: Likewise.
8300 * linux-s390-ipa.c: Likewise.
8301 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8302 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8303 set_trace_state_variable_value_ptr.
8304 (struct ipa_sym_addresses): Likewise.
8305 (symbol_list): Likewise.
8306 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8307 accessing gdb_collect directly.
8308 (gdb_collect_ptr_type): New typedef.
8309 (get_raw_reg_ptr_type): New typedef.
8310 (get_trace_state_variable_value_ptr_type): New typedef.
8311 (set_trace_state_variable_value_ptr_type): New typedef.
8312 (gdb_collect_ptr): New global.
8313 (get_raw_reg_ptr): New global.
8314 (get_trace_state_variable_value_ptr): New global.
8315 (set_trace_state_variable_value_ptr): New global.
8316 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8317 accessing get_raw_reg directly.
8318 (get_get_tsv_func_addr): Likewise for
8319 get_trace_state_variable_value_ptr.
8320 (get_set_tsv_func_addr): Likewise for
8321 set_trace_state_variable_value_ptr.
8322 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8323
8324 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8325
8326 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8327
8328 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8329
8330 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8331 packets.
8332 (relocate_instruction): Remove own_buf.
8333 * server.c (own_buf): Make global.
8334 (handle_v_requests): Make global.
8335 * server.h (own_buf): New declaration.
8336 (handle_v_requests): New prototype.
8337
8338 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8339
8340 PR 18377
8341 * linux-s390-low.c (add_insns): New function.
8342 (s390_emit_prologue): New function.
8343 (s390_emit_epilogue): New function.
8344 (s390_emit_add): New function.
8345 (s390_emit_sub): New function.
8346 (s390_emit_mul): New function.
8347 (s390_emit_lsh): New function.
8348 (s390_emit_rsh_signed): New function.
8349 (s390_emit_rsh_unsigned): New function.
8350 (s390_emit_ext): New function.
8351 (s390_emit_log_not): New function.
8352 (s390_emit_bit_and): New function.
8353 (s390_emit_bit_or): New function.
8354 (s390_emit_bit_xor): New function.
8355 (s390_emit_bit_not): New function.
8356 (s390_emit_equal): New function.
8357 (s390_emit_less_signed): New function.
8358 (s390_emit_less_unsigned): New function.
8359 (s390_emit_ref): New function.
8360 (s390_emit_if_goto): New function.
8361 (s390_emit_goto): New function.
8362 (s390_write_goto_address): New function.
8363 (s390_emit_litpool): New function.
8364 (s390_emit_const): New function.
8365 (s390_emit_call): New function.
8366 (s390_emit_reg): New function.
8367 (s390_emit_pop): New function.
8368 (s390_emit_stack_flush): New function.
8369 (s390_emit_zero_ext): New function.
8370 (s390_emit_swap): New function.
8371 (s390_emit_stack_adjust): New function.
8372 (s390_emit_set_r2): New function.
8373 (s390_emit_int_call_1): New function.
8374 (s390_emit_void_call_2): New function.
8375 (s390_emit_eq_goto): New function.
8376 (s390_emit_ne_goto): New function.
8377 (s390_emit_lt_goto): New function.
8378 (s390_emit_le_goto): New function.
8379 (s390_emit_gt_goto): New function.
8380 (s390_emit_ge_goto): New function.
8381 (s390x_emit_prologue): New function.
8382 (s390x_emit_epilogue): New function.
8383 (s390x_emit_add): New function.
8384 (s390x_emit_sub): New function.
8385 (s390x_emit_mul): New function.
8386 (s390x_emit_lsh): New function.
8387 (s390x_emit_rsh_signed): New function.
8388 (s390x_emit_rsh_unsigned): New function.
8389 (s390x_emit_ext): New function.
8390 (s390x_emit_log_not): New function.
8391 (s390x_emit_bit_and): New function.
8392 (s390x_emit_bit_or): New function.
8393 (s390x_emit_bit_xor): New function.
8394 (s390x_emit_bit_not): New function.
8395 (s390x_emit_equal): New function.
8396 (s390x_emit_less_signed): New function.
8397 (s390x_emit_less_unsigned): New function.
8398 (s390x_emit_ref): New function.
8399 (s390x_emit_if_goto): New function.
8400 (s390x_emit_const): New function.
8401 (s390x_emit_call): New function.
8402 (s390x_emit_reg): New function.
8403 (s390x_emit_pop): New function.
8404 (s390x_emit_stack_flush): New function.
8405 (s390x_emit_zero_ext): New function.
8406 (s390x_emit_swap): New function.
8407 (s390x_emit_stack_adjust): New function.
8408 (s390x_emit_int_call_1): New function.
8409 (s390x_emit_void_call_2): New function.
8410 (s390x_emit_eq_goto): New function.
8411 (s390x_emit_ne_goto): New function.
8412 (s390x_emit_lt_goto): New function.
8413 (s390x_emit_le_goto): New function.
8414 (s390x_emit_gt_goto): New function.
8415 (s390x_emit_ge_goto): New function.
8416 (s390_emit_ops): New function.
8417 (struct linux_target_ops): Fill in emit_ops hook.
8418
8419 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8420
8421 PR 18377
8422 * Makefile.in: Add s390 IPA files.
8423 * configure.srv: Build IPA for s390.
8424 * linux-s390-ipa.c: New file.
8425 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8426 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8427 (tdesc_s390_linux32): Likewise.
8428 (init_registers_s390_linux32v1): Likewise.
8429 (tdesc_s390_linux32v1): Likewise.
8430 (init_registers_s390_linux32v2): Likewise.
8431 (tdesc_s390_linux32v2): Likewise.
8432 (init_registers_s390_linux64): Likewise.
8433 (tdesc_s390_linux64): Likewise.
8434 (init_registers_s390_linux64v1): Likewise.
8435 (tdesc_s390_linux64v1): Likewise.
8436 (init_registers_s390_linux64v2): Likewise.
8437 (tdesc_s390_linux64v2): Likewise.
8438 (init_registers_s390_te_linux64): Likewise.
8439 (tdesc_s390_te_linux64): Likewise.
8440 (init_registers_s390_vx_linux64): Likewise.
8441 (tdesc_s390_vx_linux64): Likewise.
8442 (init_registers_s390_tevx_linux64): Likewise.
8443 (tdesc_s390_tevx_linux64): Likewise.
8444 (init_registers_s390x_linux64): Likewise.
8445 (tdesc_s390x_linux64): Likewise.
8446 (init_registers_s390x_linux64v1): Likewise.
8447 (tdesc_s390x_linux64v1): Likewise.
8448 (init_registers_s390x_linux64v2): Likewise.
8449 (tdesc_s390x_linux64v2): Likewise.
8450 (init_registers_s390x_te_linux64): Likewise.
8451 (tdesc_s390x_te_linux64): Likewise.
8452 (init_registers_s390x_vx_linux64): Likewise.
8453 (tdesc_s390x_vx_linux64): Likewise.
8454 (init_registers_s390x_tevx_linux64): Likewise.
8455 (tdesc_s390x_tevx_linux64): Likewise.
8456 (have_hwcap_s390_vx): New static variable.
8457 (s390_arch_setup): Fill have_hwcap_s390_vx.
8458 (s390_get_thread_area): New function.
8459 (s390_ft_entry_gpr_esa): New const.
8460 (s390_ft_entry_gpr_zarch): New const.
8461 (s390_ft_entry_misc): New const.
8462 (s390_ft_entry_fr): New const.
8463 (s390_ft_entry_vr): New const.
8464 (s390_ft_main_31): New const.
8465 (s390_ft_main_64): New const.
8466 (s390_ft_exit_fr): New const.
8467 (s390_ft_exit_vr): New const.
8468 (s390_ft_exit_misc): New const.
8469 (s390_ft_exit_gpr_esa): New const.
8470 (s390_ft_exit_gpr_zarch): New const.
8471 (append_insns): New function.
8472 (s390_relocate_instruction): New function.
8473 (s390_install_fast_tracepoint_jump_pad): New function.
8474 (s390_get_min_fast_tracepoint_insn_len): New function.
8475 (s390_get_ipa_tdesc_idx): New function.
8476 (struct linux_target_ops): Wire in the above functions.
8477 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8478 * linux-s390-tdesc.h: New file.
8479
8480 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8481
8482 * linux-s390-low.c (s390_supports_tracepoints): New function.
8483 (struct linux_target_ops): Fill supports_tracepoints hook.
8484
8485 2016-03-18 Yao Qi <yao.qi@linaro.org>
8486
8487 * linux-low.c (lwp_signal_can_be_delivered): New function.
8488 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8489
8490 2016-03-18 Yao Qi <yao.qi@linaro.org>
8491
8492 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8493 0 if signal is enqueued. Remove 'signal' from one debugging
8494 message. Move one debugging message to some lines below.
8495 Remove code setting 'signal' to 0.
8496
8497 2016-03-18 Yao Qi <yao.qi@linaro.org>
8498
8499 * linux-low.c (linux_low_filter_event): Remove redundant
8500 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8501
8502 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8503
8504 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8505 (struct linux_target_ops): Wire in the above.
8506
8507 2016-03-03 Yao Qi <yao.qi@linaro.org>
8508
8509 * linux-low.c: Update comments to start_step_over.
8510
8511 2016-03-03 Yao Qi <yao.qi@linaro.org>
8512
8513 PR server/19736
8514 * linux-low.c (handle_extended_wait): Set child suspended
8515 if event_lwp->bp_reinsert isn't zero.
8516
8517 2016-03-02 Yao Qi <yao.qi@linaro.org>
8518
8519 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8520 enqueue_pending_signal.
8521
8522 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8523
8524 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8525 is actually loaded.
8526
8527 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8528
8529 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8530 (s390_regmap_3264) [!__s390x__]: New global.
8531 (s390_collect_ptrace_register): Skip map entries containing -1.
8532 (s390_supply_ptrace_register): Ditto.
8533 (s390_fill_gprs_high): New function.
8534 (s390_store_gprs_high): New function.
8535 (s390_regsets): Add NT_S390_HIGH_GPRS.
8536 (s390_get_hwcap): Enable on 31-bit.
8537 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8538 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8539 Detect NT_S390_HIGH_GPRS.
8540 (s390_usrregs_info_3264): Enable on 31-bit.
8541 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8542 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8543
8544 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8545
8546 PR gdb/13808
8547 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8548 * configure.srv: Ditto.
8549 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8550 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8551 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8552 (init_registers_amd64_linux): Remove prototype.
8553 (tdesc_amd64_linux): Remove declaration.
8554 (get_ipa_tdesc): New function.
8555 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8556 initialize remaining tdescs.
8557 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8558 (init_registers_i386_linux): Remove prototype.
8559 (tdesc_i386_linux): Remove declaration.
8560 (get_ipa_tdesc): New function.
8561 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8562 initialize remaining tdescs.
8563 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8564 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8565 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8566 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8567 (x86_get_ipa_tdesc_idx): New function.
8568 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8569 * linux-x86-tdesc.h: New file.
8570 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8571 (target_get_ipa_tdesc_idx): New macro.
8572 * tracepoint.c (ipa_tdesc_idx): New macro.
8573 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8574 (symbol_list): Add ipa_tdesc_idx.
8575 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8576 (ipa_tdesc): Remove.
8577 (ipa_tdesc_idx): New variable.
8578 (get_context_regcache): Use get_ipa_tdesc.
8579 (gdb_collect): Ditto.
8580 (gdb_probe): Ditto.
8581 * tracepoint.h (get_ipa_tdesc): New prototype.
8582 (ipa_tdesc): Remove.
8583
8584 2016-02-24 Pedro Alves <palves@redhat.com>
8585
8586 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8587 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8588 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8589 Factor out common code between the USE_SIGTRAP_SIGINFO and
8590 !USE_SIGTRAP_SIGINFO blocks.
8591 (linux_low_filter_event): Call save_stop_reason instead of
8592 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8593 Update comments.
8594 (linux_wait_1): Update comments.
8595
8596 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8597
8598 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8599 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8600 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8601 ppc_insert_point, ppc_remove_point.
8602
8603 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8604
8605 * linux-s390-low.c (s390_supports_z_point_type): New function.
8606 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8607
8608 2016-02-16 Yao Qi <yao.qi@linaro.org>
8609
8610 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8611 PC. Get pc from regcache_read_pc.
8612
8613 2016-02-12 Yao Qi <yao.qi@linaro.org>
8614
8615 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8616 or linux_get_pc_32bit.
8617 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8618
8619 2016-02-12 Yao Qi <yao.qi@linaro.org>
8620
8621 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8622 arm_linux_get_next_pcs_fixup.
8623
8624 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8625
8626 * tracepoint.c (x_tracepoint_action_download): Change
8627 write_inferior_data_ptr to write_inferior_data_pointer.
8628 (cmd_qtstart): Likewise.
8629 (write_inferior_data_ptr): Remove.
8630 (download_agent_expr): Change write_inferior_data_ptr to
8631 write_inferior_data_pointer.
8632 (download_tracepoint_1): Likewise.
8633 (download_tracepoint): Likewise.
8634 (download_trace_state_variables): Likewise.
8635
8636 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8637 Marcin Kościelnicki <koriakin@0x04.net>
8638
8639 * tracepoint.c (struct tracepoint_action_ops): Remove.
8640 (struct tracepoint_action): Remove ops.
8641 (m_tracepoint_action_download, r_tracepoint_action_download)
8642 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8643 size and offset accordingly.
8644 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8645 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8646 (tracepoint_action_send, tracepoint_action_download): New functions.
8647 Helpers for trace action handlers.
8648 (add_tracepoint_action): Remove setup actions ops.
8649 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8650
8651 2016-02-10 Yao Qi <yao.qi@linaro.org>
8652
8653 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8654
8655 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8656
8657 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8658 to AC_OUTPUT.
8659 * configure: Regenerate.
8660
8661 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8662
8663 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8664 void * to gdb_byte *.
8665 * linux-low.c (siginfo_fixup): Likewise.
8666 (linux_xfer_siginfo): Likewise.
8667 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8668 Likewise.
8669 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8670
8671 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8672
8673 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8674 to srv_tgtobj.
8675 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8676 to srv_tgtobj.
8677 * linux-x86-low.c [__x86_64__]: Include
8678 "nat/amd64-linux-siginfo.h".
8679 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8680 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8681 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8682 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8683 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8684 (cpt_si_fd, si_timerid, si_overrun): Move from
8685 nat/amd64-linux-siginfo.c.
8686 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8687
8688 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8689
8690 * server.c (skip_to_semicolon): Remove.
8691 (process_point_options): Use strchrnul instead of
8692 skip_to_semicolon.
8693
8694 2016-01-26 Yao Qi <yao.qi@linaro.org>
8695
8696 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8697 * linux-low.c (install_software_single_step_breakpoints): Don't
8698 call regcache_read_pc.
8699 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8700 argument pc.
8701
8702 2016-01-26 Yao Qi <yao.qi@linaro.org>
8703
8704 * linux-low.c (install_software_single_step_breakpoints): Call
8705 regcache_read_pc instead of get_pc.
8706
8707 2016-01-26 Yao Qi <yao.qi@linaro.org>
8708
8709 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8710 (unblock_async_io): Rename to ...
8711 (block_unblock_async_io): ... it. New function.
8712 (enable_async_io): Don't install SIGIO handler. Unblock it
8713 instead.
8714 (disable_async_io): Don't ignore SIGIO. Block it instead.
8715 (initialize_async_io): Install SIGIO handler. Don't call
8716 unblock_async_io.
8717
8718 2016-01-26 Yao Qi <yao.qi@linaro.org>
8719
8720 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8721 first character is '\003', call *the_target->request_interrupt.
8722
8723 2016-01-25 Yao Qi <yao.qi@linaro.org>
8724
8725 * remote-utils.c (new_thread_notify): Remove.
8726 (dead_thread_notify): Likewise.
8727 * remote-utils.h (new_thread_notify): Remove declaration.
8728 (dead_thread_notify): Likewise.
8729
8730 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8731
8732 * gdb.trace/pending.exp: Fix expected message on continue.
8733
8734 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8735
8736 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8737 it works properly on big-endian machines where sizeof (CORE_ADDR)
8738 != sizeof (void *).
8739
8740 2016-01-21 Pedro Alves <palves@redhat.com>
8741
8742 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8743 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8744 * configure: Regenerate.
8745
8746 2016-01-21 Yao Qi <yao.qi@linaro.org>
8747
8748 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8749 is_thumb and set it according to CPSR saved on the stack.
8750 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8751 arm_sigreturn_next_pc.
8752
8753 2016-01-18 Yao Qi <yao.qi@linaro.org>
8754
8755 * linux-low.c (linux_set_pc_64bit): New function.
8756 (linux_get_pc_64bit): New function.
8757 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8758 Declare.
8759 * linux-sparc-low.c (debug_threads): Remove declaration.
8760 (sparc_get_pc): Remove.
8761 (the_low_target): Use linux_get_pc_64bit instead of
8762 sparc_get_pc.
8763 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8764 (the_low_target): Use linux_get_pc_64bit and
8765 linux_set_pc_64bit.
8766
8767 2016-01-18 Yao Qi <yao.qi@linaro.org>
8768
8769 * linux-arm-low.c (debug_threads): Remove declaration.
8770 (arm_get_pc, arm_set_pc): Remove.
8771 (the_low_target): Use linux_get_pc_32bit and
8772 linux_set_pc_32bit.
8773 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8774 (the_low_target): Use linux_get_pc_32bit and
8775 linux_set_pc_32bit.
8776 * linux-cris-low.c (debug_threads): Remove declaration.
8777 (cris_get_pc, cris_set_pc,): Remove.
8778 (the_low_target): Use linux_get_pc_32bit and
8779 linux_set_pc_32bit.
8780 * linux-crisv32-low.c (debug_threads): Remove declaration.
8781 (cris_get_pc, cris_set_pc): Remove.
8782 (the_low_target): Use linux_get_pc_32bit and
8783 linux_set_pc_32bit.
8784 * linux-low.c: Include inttypes.h.
8785 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8786 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8787 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8788 (the_low_target): Use linux_get_pc_32bit and
8789 linux_set_pc_32bit.
8790 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8791 (the_low_target): Use linux_get_pc_32bit and
8792 linux_set_pc_32bit.
8793 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8794 (the_low_target): Use linux_get_pc_32bit and
8795 linux_set_pc_32bit.
8796 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8797 (the_low_target): Use linux_get_pc_32bit and
8798 linux_set_pc_32bit.
8799 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8800 (the_low_target): Use linux_get_pc_32bit and
8801 linux_set_pc_32bit.
8802
8803 2016-01-18 Gary Benson <gbenson@redhat.com>
8804
8805 * configure.ac (AC_FUNC_FORK): New check.
8806 * config.in: Regenerate.
8807 * configure: Likewise.
8808
8809 2016-01-14 Yao Qi <yao.qi@linaro.org>
8810
8811 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8812 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8813 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8814 arm_get_next_pcs_ctor.
8815
8816 2016-01-12 Josh Stone <jistone@redhat.com>
8817 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8818
8819 * inferiors.h: Include "gdb_vecs.h".
8820 (struct process_info): Add syscalls_to_catch.
8821 * inferiors.c (remove_process): Free syscalls_to_catch.
8822 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8823 syscall_return stops.
8824 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8825 * server.c (handle_general_set): Handle QCatchSyscalls.
8826 (handle_query): Report support for QCatchSyscalls.
8827 * target.h (struct target_ops): Add supports_catch_syscall.
8828 (target_supports_catch_syscall): New macro.
8829 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8830 (struct lwp_info): Add syscall_state.
8831 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8832 Maintain syscall_state and syscalls_to_catch across exec.
8833 (get_syscall_trapinfo): New function, proxy to the_low_target.
8834 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8835 (linux_low_filter_event): Toggle syscall_state entry/return for
8836 syscall traps, and set it ignored for all others.
8837 (gdb_catching_syscalls_p): New function.
8838 (gdb_catch_this_syscall_p): New function.
8839 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8840 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8841 (linux_supports_catch_syscall): New function.
8842 (linux_target_ops): Install it.
8843 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8844 (the_low_target): Install it.
8845
8846 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8847
8848 * acinclude.m4: Include new ../warning.m4 file.
8849 * configure: Regenerated.
8850 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8851
8852 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8853
8854 * ax.c (is_goto_target): Mark static.
8855 * linux-low.c (register_addr): Likewise.
8856 (linux_fetch_registers, linux_store_registers): Likewise.
8857 * mem-break.c (any_persistent_commands): Fix old prototype.
8858 (add_commands_to_breakpoint): Mark static.
8859 * regcache.c (find_register_by_name): Delete unused func.
8860 * remote-utils.c (hex_or_minus_one): Mark static.
8861 * server.c (monitor_show_help): Mark static.
8862 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8863 handle_v_requests): Likewise.
8864
8865 2016-01-12 Pedro Alves <palves@redhat.com>
8866
8867 Remove use of the registered trademark symbol throughout.
8868
8869 2016-01-08 Yao Qi <yao.qi@linaro.org>
8870
8871 * remote-utils.c (getpkt): If c is '\003', call target hook
8872 request_interrupt.
8873
8874 2016-01-06 Yao Qi <yao.qi@linaro.org>
8875
8876 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8877 linux-aarch32-low.c.
8878 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8879 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8880 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8881 (thumb2_breakpoint): Declare.
8882 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8883 linux-aarch32-low.h.
8884 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8885 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8886 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8887
8888 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8889
8890 * gdbreplay.c (gdbreplay_version): Change copyright year in
8891 version message.
8892 * server.c (gdbserver_version): Likewise.
8893
8894 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8895
8896 * server.c (crc32_table): Delete.
8897 (crc32): Use libiberty's xcrc32 function.
8898
8899 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8900
8901 * lynx-low.c (lynx_delete_thread_callback): New function.
8902 (lynx_mourn): Properly delete our process and all of its
8903 threads. Remove call to clear_inferiors.
8904
8905 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8906
8907 * target.c (thread_search_callback): Add check that
8908 the thread_stopped target callback is not NULL before
8909 calling it.
8910
8911 2015-12-21 Yao Qi <yao.qi@linaro.org>
8912
8913 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8914 arm breakpoint.
8915
8916 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8917
8918 * server.c (handle_query): Call target_supports_software_single_step.
8919
8920 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8921
8922 * linux-low.c (single_step): New function.
8923 (linux_resume_one_lwp_throw): Call single_step.
8924 (start_step_over): Likewise.
8925
8926 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8927
8928 * Makefile.in (SFILES): Append arch/arm-linux.c,
8929 arch/arm-get-next-pcs.c.
8930 (arm-linux.o): New rule.
8931 (arm-get-next-pcs.o): New rule.
8932 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8933 arm-linux.o.
8934 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8935 to linux-aarch32-low.c.
8936 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8937 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8938 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8939 (thumb2_breakpoint_len): Likewise.
8940 (arm_is_thumb_mode): Make non-static.
8941 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8942 from linux-aarch32-low.c.
8943 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8944 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8945 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8946 (thumb2_breakpoint_len): Likewise.
8947 (arm_is_thumb_mode): New declaration.
8948 * linux-arm-low.c: Include arch/arm-linux.h
8949 aarch/arm-get-next-pcs.h, sys/syscall.h.
8950 (get_next_pcs_ops): New struct.
8951 (get_next_pcs_addr_bits_remove): New function.
8952 (get_next_pcs_is_thumb): New function.
8953 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8954 (arm_sigreturn_next_pc): Likewise.
8955 (get_next_pcs_syscall_next_pc): Likewise.
8956 (arm_gdbserver_get_next_pcs): Likewise.
8957 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8958 Initialize.
8959 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8960 * server.h: Include gdb_vecs.h.
8961
8962 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8963
8964 * Makefile.in (SFILES): Append common/common-regcache.c.
8965 (OBS): Append common-regcache.o.
8966 (common-regcache.o): New rule.
8967 * regcache.c (init_register_cache): Initialize cache to
8968 REG_UNAVAILABLE.
8969 (regcache_raw_read_unsigned): New function.
8970 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8971 register_status enum.
8972
8973 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8974
8975 * linux-aarch64-low.c (the_low_targets): Rename
8976 breakpoint_reinsert_addr to get_next_pcs.
8977 * linux-arm-low.c (the_low_targets): Likewise.
8978 * linux-bfin-low.c (the_low_targets): Likewise.
8979 * linux-cris-low.c (the_low_targets): Likewise.
8980 * linux-crisv32-low.c (the_low_targets): Likewise.
8981 * linux-low.c (can_software_single_step): Likewise.
8982 (install_software_single_step_breakpoints): New function.
8983 (start_step_over): Use install_software_single_step_breakpoints.
8984 * linux-low.h: New CORE_ADDR vector.
8985 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
8986 get_next_pcs.
8987 * linux-mips-low.c (the_low_targets): Likewise.
8988 * linux-nios2-low.c (the_low_targets): Likewise.
8989 * linux-sparc-low.c (the_low_targets): Likewise.
8990
8991 2015-12-17 Pedro Alves <palves@redhat.com>
8992
8993 * linux-low.c (linux_kill_one_lwp): Remove references to
8994 LinuxThreads.
8995 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
8996 to 'kill'.
8997 (linux_init_signals): Delete.
8998 (initialize_low): Adjust.
8999 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9000
9001 2015-12-16 Pedro Alves <palves@redhat.com>
9002
9003 * configure.ac (compiler warning flags): When testing a
9004 -Wno-foo option, check whether -Wfoo works instead.
9005 * configure: Regenerate.
9006
9007 2015-12-11 Don Breazeal <donb@codesourcery.com>
9008
9009 * server.c (process_serial_event): Don't exit from gdbserver
9010 in remote mode if there are still active inferiors.
9011
9012 2015-12-11 Yao Qi <yao.qi@linaro.org>
9013
9014 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9015 arm_breakpoint_at if the process is 32-bit.
9016
9017 2015-12-11 Yao Qi <yao.qi@linaro.org>
9018
9019 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9020 arm breakpoint.
9021
9022 2015-12-07 Yao Qi <yao.qi@linaro.org>
9023
9024 * configure.srv: Append arm.o to srv_tgtobj for
9025 aarch64*-*-linux* target.
9026 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9027 from linux-arm-low.c.
9028 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9029 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9030 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9031 (thumb2_breakpoint_len): Likewise.
9032 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9033 (arm_breakpoint_kinds): Likewise.
9034 (arm_breakpoint_kind_from_pc): Likewise.
9035 (arm_sw_breakpoint_from_kind): Likewise.
9036 (arm_breakpoint_kind_from_current_state): Likewise.
9037 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9038 (arm_sw_breakpoint_from_kind): Declare.
9039 (arm_breakpoint_kind_from_current_state): Declare.
9040 (arm_breakpoint_at): Declare.
9041 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9042 arm_sw_breakpoint_from_kind if process is 32-bit.
9043 (aarch64_breakpoint_kind_from_pc): New function.
9044 (aarch64_breakpoint_kind_from_current_state): New function.
9045 (the_low_target): Initialize fields breakpoint_kind_from_pc
9046 and breakpoint_kind_from_current_state.
9047 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9048 linux-aarch32-low.c.
9049 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9050 (arm_breakpoint, arm_breakpoint_len): Likewise.
9051 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9052 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9053 (arm_is_thumb_mode): Likewise.
9054 (arm_breakpoint_at): Likewise.
9055 (arm_breakpoint_kind_from_pc): Likewise.
9056 (arm_sw_breakpoint_from_kind): Likewise.
9057 (arm_breakpoint_kind_from_current_state): Likewise.
9058
9059 Revert:
9060 2015-08-04 Yao Qi <yao.qi@linaro.org>
9061
9062 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9063 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9064 * server.c (extended_protocol): Remove "static".
9065 * server.h (extended_protocol): Declare it.
9066
9067 2015-12-04 Josh Stone <jistone@redhat.com>
9068
9069 * target.h (struct target_ops) <arch_setup>: Rename to ...
9070 (struct target_ops) <post_create_inferior>: ... this.
9071 (target_arch_setup): Rename to ...
9072 (target_post_create_inferior): ... this, calling post_create_inferior.
9073 * server.c (start_inferior): Update target_arch_setup calls to
9074 target_post_create_inferior.
9075 * linux-low.c (linux_low_ptrace_options): Forward declare.
9076 (linux_arch_setup): Update its comment for general use.
9077 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9078 (struct linux_target_ops): Use linux_post_create_inferior.
9079 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9080 to post_create_inferior.
9081 * nto-low.c (struct nto_target_ops): Likewise.
9082 * spu-low.c (struct spu_target_ops): Likewise.
9083 * win32-low.c (struct win32_target_ops): Likewise.
9084
9085 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9086
9087 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9088
9089 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9090
9091 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9092 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9093 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9094 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9095 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9096 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9097 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9098 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9099 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9100 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9101 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9102 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9103
9104 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9105
9106 * linux-low.c (linux_look_up_symbols): Don't call
9107 linux_supports_traceclone.
9108 * linux-low.h (thread_db_init): Remove use_events argument.
9109 * thread-db.c (thread_db_use_event): Remove global variable.
9110 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9111 (struct thread_db) <td_create_bp>: Remove field.
9112 (thread_db_create_event): Remove function.
9113 (thread_db_enable_reporting): Likewise.
9114 (find_one_thread): Don't check for thread_db_use_events.
9115 (attach_thread): Likewise.
9116 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9117 (try_thread_db_load_1): Don't check for thread_db_use_events.
9118 (thread_db_init): Remove use_events argument and thread events
9119 handling.
9120 (remove_thread_event_breakpoints): Remove function.
9121 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9122
9123 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9124
9125 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9126 New function.
9127 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9128 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9129 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9130 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9131 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9132 Initialize.
9133 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9134 New function.
9135 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9136 * linux-low.c (can_hardware_single_step): Use
9137 supports_hardware_single_step.
9138 (can_software_single_step): New function.
9139 (start_step_over): Call can_software_single_step.
9140 (linux_supports_hardware_single_step): New function.
9141 (struct target_ops) <supports_software_single_step>: Initialize.
9142 * linux-low.h (struct linux_target_ops)
9143 <supports_hardware_single_step>: Initialize.
9144 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9145 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9146 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9147 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9148 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9149 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9150 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9151 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9152 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9153 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9154 Initialize.
9155 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9156 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9157 Initialize.
9158 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9159 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9160 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9161 New function.
9162 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9163 * target.h (struct target_ops): <supports_software_single_step>:
9164 New field.
9165 (target_supports_software_single_step): New macro.
9166
9167 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9168
9169 * linux-low.c (linux_wait_1): Fix pc advance condition.
9170 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9171 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9172
9173 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9174
9175 * linux-arm-low.c (arm_is_thumb_mode): New function.
9176 (arm_breakpoint_at): Use arm_is_thumb_mode.
9177 (arm_breakpoint_kind_from_current_state): New function.
9178 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9179 Initialize.
9180 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9181 (linux_breakpoint_kind_from_current_state): New function.
9182 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9183 * linux-low.h (struct linux_target_ops)
9184 <breakpoint_kind_from_current_state>: New field.
9185 * target.h (struct target_ops): Likewise.
9186 (target_breakpoint_kind_from_current_state): New macro.
9187
9188 2015-11-30 Pedro Alves <palves@redhat.com>
9189
9190 * linux-low.c (linux_resume): Wake up the event loop before
9191 returning.
9192
9193 2015-11-30 Pedro Alves <palves@redhat.com>
9194
9195 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9196 check.
9197 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9198 to -1.
9199 * target.c (struct thread_search): New structure.
9200 (thread_search_callback): New function.
9201 (prev_general_thread): New global.
9202 (prepare_to_access_memory, done_accessing_memory): New functions.
9203 * target.h (prepare_to_access_memory, done_accessing_memory):
9204 Replace macros with function declarations.
9205
9206 2015-11-30 Pedro Alves <palves@redhat.com>
9207
9208 PR 14618
9209 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9210 report TARGET_WAITKIND_NO_RESUMED.
9211 * remote-utils.c (prepare_resume_reply): Handle
9212 TARGET_WAITKIND_NO_RESUMED.
9213 * server.c (report_no_resumed): New global.
9214 (handle_query) <qSupported>: Handle "no-resumed+". Report
9215 "no-resumed+" support.
9216 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9217 return error if the client doesn't support no-resumed events.
9218 (push_stop_notification): New function.
9219 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9220 events if the client supports them.
9221
9222 2015-11-30 Pedro Alves <palves@redhat.com>
9223
9224 * linux-low.c (thread_still_has_status_pending_p): Don't check
9225 vCont;t here.
9226 (lwp_resumed): New function.
9227 (status_pending_p_callback): Return early if the LWP is not
9228 supposed to be resumed.
9229
9230 2015-11-30 Pedro Alves <palves@redhat.com>
9231
9232 * linux-low.c (handle_extended_wait): Assert that the LWP's
9233 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9234 thread create events, leave the new child's status pending.
9235 (linux_low_filter_event): If GDB wants to hear about thread exit
9236 events, leave the LWP marked dead and don't delete it.
9237 (linux_wait_for_event_filtered): Don't check for thread exit.
9238 (filter_exit_event): New function.
9239 (linux_wait_1): Use it, when returning an exit event.
9240 (linux_resume_one_lwp_throw): Assert that the LWP's
9241 waitstatus is TARGET_WAITKIND_IGNORE.
9242 * remote-utils.c (prepare_resume_reply): Handle
9243 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9244 * server.c (report_thread_events): New global.
9245 (handle_general_set): Handle QThreadEvents.
9246 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9247 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9248 TARGET_WAITKIND_THREAD_EXITED.
9249 * server.h (report_thread_events): Declare.
9250
9251 2015-11-30 Pedro Alves <palves@redhat.com>
9252
9253 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9254 the thread's last_resume_kind was resume_stop.
9255
9256 2015-11-30 Pedro Alves <palves@redhat.com>
9257
9258 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9259 before returning.
9260
9261 2015-11-30 Pedro Alves <palves@redhat.com>
9262
9263 * server.c (handle_v_requests): Handle vCtrlC.
9264
9265 2015-11-30 Pedro Alves <palves@redhat.com>
9266
9267 * gdbthread.h (find_any_thread_of_pid): Declare.
9268 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9269 functions.
9270 * server.c (handle_query): If current_thread is NULL, look for
9271 another thread of the selected process.
9272
9273 2015-11-26 Daniel Colascione <dancol@dancol.org>
9274 Simon Marchi <simon.marchi@ericsson.com>
9275
9276 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9277 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9278 name in reply.
9279 * target.h (struct target_ops) <thread_name>: New field.
9280 (target_thread_name): New macro.
9281
9282 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9283
9284 * regcache.h (regcache_invalidate_pid): Add declaration.
9285 * regcache.c (regcache_invalidate_pid): New function, extracted
9286 from regcache_invalidate.
9287 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9288 Add trivial documentation comment.
9289 * lynx-low.c: Use regcache_invalidate_pid instead of
9290 regcache_invalidate.
9291
9292 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9293
9294 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9295 and Elf64_auxv_t if the target is Android.
9296
9297 2015-11-22 Doug Evans <xdje42@gmail.com>
9298
9299 * target.h: #include <sys/types.h>.
9300
9301 2015-11-19 Pedro Alves <palves@redhat.com>
9302
9303 * linux-low.c (linux_process_qsupported): Change prototype.
9304 Adjust.
9305 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9306 Change prototype.
9307 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9308 and adjust to loop over all features.
9309 * server.c (handle_query) <qSupported>: Adjust to call
9310 target_process_qsupported once, passing it a vector of unprocessed
9311 features.
9312 * target.h (struct target_ops) <process_qsupported>: Change
9313 prototype.
9314 (target_process_qsupported): Adjust.
9315
9316 2015-11-19 Pedro Alves <palves@redhat.com>
9317
9318 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9319 mode.
9320 * configure: Regenerate.
9321
9322 2015-11-19 Pedro Alves <palves@redhat.com>
9323
9324 * configure: Regenerate.
9325
9326 2015-11-19 Yao Qi <yao.qi@linaro.org>
9327
9328 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9329 type to uint32_t.
9330
9331 2015-11-19 Yao Qi <yao.qi@linaro.org>
9332
9333 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9334 (struct aarch64_operand): Move enum out.
9335
9336 2015-11-19 Yao Qi <yao.qi@linaro.org>
9337
9338 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9339 struct user_fpsimd_state *.
9340 (aarch64_store_fpregset): Likewise.
9341
9342 2015-11-19 Yao Qi <yao.qi@linaro.org>
9343
9344 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9345 struct user_pt_regs *.
9346 (aarch64_store_gregset): Likewise.
9347
9348 2015-11-18 Pedro Alves <palves@redhat.com>
9349
9350 * Makefile.in (all_object_files): Add $IPA_OBJS.
9351
9352 2015-11-17 Pedro Alves <palves@redhat.com>
9353
9354 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9355 GDB_SIGNAL_0 and gdb_signal_to_string.
9356
9357 2015-11-17 Pedro Alves <palves@redhat.com>
9358
9359 * win32-low.c (handle_output_debug_string): Remove parameter.
9360 (win32_kill): Remove our_status local and adjust call to
9361 handle_output_debug_string.
9362 (get_child_debug_event): Adjust call to
9363 handle_output_debug_string.
9364
9365 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9366
9367 * linux-mips-low.c (mips_fill_gregset): Add cast.
9368 (mips_store_gregset): Likewise.
9369 (mips_fill_fpregset): Likewise.
9370 (mips_store_fpregset): Likewise.
9371
9372 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9373
9374 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9375 priv.
9376
9377 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9378
9379 * linux-mips-low.c (mips_linux_new_thread): Change type of
9380 watch_type to enum target_hw_bp_type.
9381
9382 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9383
9384 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9385 Change return type to arm_hwbp_type.
9386
9387 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9388
9389 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9390 (arm_store_gregset): Likewise.
9391 * linux-arm-low.c (arm_get_hwcap): Likewise.
9392 (arm_read_description): Likewise.
9393
9394 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9395
9396 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9397
9398 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9399
9400 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9401 (ppc_fill_vsxregset): Likewise.
9402 (ppc_store_vsxregset): Likewise.
9403 (ppc_fill_vrregset): Likewise.
9404 (ppc_store_vrregset): Likewise.
9405 (ppc_fill_evrregset): Likewise.
9406 (ppc_store_evrregset): Likewise.
9407
9408 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9409
9410 * linux-ppc-low.c (ppc_usrregs_info): Remove
9411 forward-declaration.
9412 (ppc_arch_setup): Move lower in file.
9413
9414 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9415
9416 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9417 (ps_pdwrite): Likewise.
9418
9419 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9420
9421 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9422 to after assert checks.
9423
9424 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9425
9426 * proc-service.c (ps_pdread): Add/adjust casts.
9427 (ps_pdwrite): Add/adjust casts.
9428
9429 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9430
9431 * server.c (handle_search_memory_1): Cast return value of
9432 memmem.
9433
9434 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9435
9436 * server.c (write_qxfer_response): Change type of data to
9437 gdb_byte *.
9438
9439 2015-10-29 Pedro Alves <palves@redhat.com>
9440
9441 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9442
9443 2015-10-29 Pedro Alves <palves@redhat.com>
9444
9445 * tracepoint.c (clear_installed_tracepoints): Add casts.
9446
9447 2015-10-29 Pedro Alves <palves@redhat.com>
9448
9449 * server.c (handle_v_cont, process_serial_event): Add enum
9450 gdb_signal casts to signal parsing code.
9451
9452 2015-10-29 Pedro Alves <palves@redhat.com>
9453
9454 * linux-low.h (NULL_REGSET): Define.
9455 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9456 * linux-arm-low.c (arm_regsets): Likewise.
9457 * linux-crisv32-low.c (cris_regsets): Likewise.
9458 * linux-m68k-low.c (m68k_regsets): Likewise.
9459 * linux-mips-low.c (mips_regsets): Likewise.
9460 * linux-nios2-low.c (nios2_regsets): Likewise.
9461 * linux-ppc-low.c (ppc_regsets): Likewise.
9462 * linux-s390-low.c (s390_regsets): Likewise.
9463 * linux-sh-low.c (sh_regsets): Likewise.
9464 * linux-sparc-low.c (sparc_regsets): Likewise.
9465 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9466 * linux-tile-low.c (tile_regsets): Likewise.
9467 * linux-x86-low.c (x86_regsets): Likewise.
9468 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9469
9470 2015-10-29 Pedro Alves <palves@redhat.com>
9471
9472 * linux-low.h (NULL_REGSET): Define.
9473 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9474 * linux-arm-low.c (arm_regsets): Likewise.
9475 * linux-crisv32-low.c (cris_regsets): Likewise.
9476 * linux-m68k-low.c (m68k_regsets): Likewise.
9477 * linux-mips-low.c (mips_regsets): Likewise.
9478 * linux-nios2-low.c (nios2_regsets): Likewise.
9479 * linux-ppc-low.c (ppc_regsets): Likewise.
9480 * linux-s390-low.c (s390_regsets): Likewise.
9481 * linux-sh-low.c (sh_regsets): Likewise.
9482 * linux-sparc-low.c (sparc_regsets): Likewise.
9483 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9484 * linux-tile-low.c (tile_regsets): Likewise.
9485 * linux-x86-low.c (x86_regsets): Likewise.
9486 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9487
9488 2015-10-26 Doug Evans <dje@google.com>
9489
9490 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9491
9492 2015-10-26 Doug Evans <dje@google.com>
9493
9494 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9495
9496 2015-10-26 Doug Evans <dje@google.com>
9497
9498 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9499 for debug_printf.
9500 (attach_thread, find_new_threads_callback): Ditto.
9501
9502 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9503
9504 * mem-break.h (set_breakpoint_data): Remove.
9505
9506 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9507
9508 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9509 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9510 (initialize_low): Remove set_breakpoint_data call.
9511 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9512 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9513 (initialize_low): Remove set_breakpoint_data call.
9514 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9515 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9516 (initialize_low): Remove set_breakpoint_data call.
9517
9518 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9519
9520 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9521 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9522 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9523 * target.h (target_breakpoint_kind_from_pc): New macro.
9524
9525 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9526
9527 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9528 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9529 the default breakpoint kind.
9530
9531 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9532
9533 * linux-arm-low.c (arm_supports_z_point_type): Add software
9534 breakpoint support.
9535
9536 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9537
9538 * linux-arm-low.c: Refactor breakpoint definitions.
9539 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9540 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9541
9542 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9543
9544 * Makefile.in: Add arm.c/o.
9545 * configure.srv: Likewise.
9546 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9547 (arm_breakpoint_kind_from_pc): New function.
9548 (arm_sw_breakpoint_from_kind): Return proper kind.
9549 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9550
9551 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9552
9553 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9554 removal.
9555 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9556 (struct raw_breakpoint) <size>: Remove.
9557 (struct raw_breakpoint) <kind>: Add.
9558 (bp_size): New function.
9559 (bp_opcode): Likewise.
9560 (find_raw_breakpoint_at): Adjust for kind.
9561 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9562 (remove_memory_breakpoint): Adjust for kind call bp_size.
9563 (set_raw_breakpoint_at): Adjust for kind.
9564 (set_breakpoint): Likewise.
9565 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9566 (delete_raw_breakpoint): Adjust for kind.
9567 (delete_breakpoint): Likewise.
9568 (find_gdb_breakpoint): Likewise.
9569 (set_gdb_breakpoint_1): Likewise.
9570 (set_gdb_breakpoint): Likewise.
9571 (delete_gdb_breakpoint_1): Likewise.
9572 (delete_gdb_breakpoint): Likewise.
9573 (uninsert_raw_breakpoint): Likewise.
9574 (reinsert_raw_breakpoint): Likewise.
9575 (set_breakpoint_data): Remove.
9576 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9577 (check_mem_read): Adjust for kind call bp_size.
9578 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9579 (clone_one_breakpoint): Adjust for kind.
9580 * mem-break.h (set_gdb_breakpoint): Likewise.
9581 (delete_gdb_breakpoint): Likewise.
9582 * server.c (process_serial_event): Likewise.
9583
9584 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9585
9586 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9587 (struct linux_target_ops) <breakpoint>: Remove.
9588 (struct linux_target_ops) <breakpoint_len>: Remove.
9589 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9590 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9591 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9592 (arm_sw_breakpoint_from_kind): New function.
9593 * linux-bfin-low.c (bfin_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-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9599 (struct linux_target_ops) <breakpoint>: Remove.
9600 (struct linux_target_ops) <breakpoint_len>: Remove.
9601 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9602 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9603 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9604 (struct linux_target_ops) <breakpoint>: Remove.
9605 (struct linux_target_ops) <breakpoint_len>: Remove.
9606 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9607 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9608 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9609 and sw_breakpoint_from_kind to increment the pc.
9610 (linux_breakpoint_kind_from_pc): New function.
9611 (linux_sw_breakpoint_from_kind): New function.
9612 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9613 (initialize_low): Call breakpoint_kind_from_pc and
9614 sw_breakpoint_from_kind to replace breakpoint_data/len.
9615 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9616 New field.
9617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9618 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9654 (struct linux_target_ops) <breakpoint>: Remove.
9655 (struct linux_target_ops) <breakpoint_len>: Remove.
9656 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9657 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9658 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9659 (struct linux_target_ops) <breakpoint>: Remove.
9660 (struct linux_target_ops) <breakpoint_len>: Remove.
9661 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9662 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9663 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9664 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9665 (struct linux_target_ops) <breakpoint>: Remove.
9666 (struct linux_target_ops) <breakpoint_len>: Remove.
9667 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9668 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9669 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9670 (struct linux_target_ops) <breakpoint>: Remove.
9671 (struct linux_target_ops) <breakpoint_len>: Remove.
9672 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9673 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9674
9675 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9676
9677 * linux-cris-low.c (cris_get_pc): Remove void arg.
9678
9679 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9680
9681 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9682 variable name.
9683
9684 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9685
9686 * inferiors.c (thread_pid_matches_callback): New function.
9687 (find_thread_process): New function.
9688 (remove_thread): Reset current_thread.
9689 (remove_process): Assert threads have been removed first.
9690
9691 2015-10-15 Yao Qi <yao.qi@linaro.org>
9692
9693 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9694 if it is 3.
9695 (aarch64_remove_point): Likewise.
9696 * regcache.c (regcache_register_size): New function.
9697
9698 2015-10-12 Yao Qi <yao.qi@linaro.org>
9699
9700 * linux-aarch64-low.c: Update all callers as emit_load_store
9701 is renamed to aarch64_emit_load_store.
9702
9703 2015-10-12 Yao Qi <yao.qi@linaro.org>
9704
9705 * linux-aarch64-low.c: Update all callers of function renaming
9706 from emit_insn to aarch64_emit_insn.
9707
9708 2015-10-12 Yao Qi <yao.qi@linaro.org>
9709
9710 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9711 arch/aarch64-insn.h.
9712 (struct aarch64_memory_operand): Likewise.
9713 (ENCODE): Likewise.
9714 (emit_insn): Move to arch/aarch64-insn.c.
9715 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9716 (emit_load_store): Move to arch/aarch64-insn.c.
9717 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9718 (can_encode_int32): Remove.
9719
9720 2015-10-12 Yao Qi <yao.qi@linaro.org>
9721
9722 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9723 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9724 (aarch64_relocate_instruction): Likewise.
9725 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9726 (struct aarch64_insn_visitor): Likewise.
9727
9728 2015-10-12 Yao Qi <yao.qi@linaro.org>
9729
9730 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9731 (struct aarch64_insn_visitor): New.
9732 (struct aarch64_insn_relocation_data): New.
9733 (aarch64_ftrace_insn_reloc_b): New function.
9734 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9735 (aarch64_ftrace_insn_reloc_cb): Likewise.
9736 (aarch64_ftrace_insn_reloc_tb): Likewise.
9737 (aarch64_ftrace_insn_reloc_adr): Likewise.
9738 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9739 (aarch64_ftrace_insn_reloc_others): Likewise.
9740 (visitor): New.
9741 (aarch64_relocate_instruction): Use visitor.
9742
9743 2015-10-12 Yao Qi <yao.qi@linaro.org>
9744
9745 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9746 int. Add argument buf.
9747 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9748 aarch64_relocate_instruction.
9749
9750 2015-10-12 Yao Qi <yao.qi@linaro.org>
9751
9752 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9753 argument insn. Remove local variable insn. Don't call
9754 target_read_uint32.
9755 (aarch64_install_fast_tracepoint_jump_pad): Call
9756 target_read_uint32.
9757
9758 2015-09-30 Yao Qi <yao.qi@linaro.org>
9759
9760 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9761 (emit_load_store_pair): Likewise.
9762
9763 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9764
9765 * dll.c (match_dll): Add cast(s).
9766 (unloaded_dll): Likewise.
9767 * linux-low.c (second_thread_of_pid_p): Likewise.
9768 (delete_lwp_callback): Likewise.
9769 (count_events_callback): Likewise.
9770 (select_event_lwp_callback): Likewise.
9771 (linux_set_resume_request): Likewise.
9772 * server.c (accumulate_file_name_length): Likewise.
9773 (emit_dll_description): Likewise.
9774 (handle_qxfer_threads_worker): Likewise.
9775 (visit_actioned_threads): Likewise.
9776 * thread-db.c (any_thread_of): Likewise.
9777 * tracepoint.c (same_process_p): Likewise.
9778 (match_blocktype): Likewise.
9779 (build_traceframe_info_xml): Likewise.
9780
9781 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9782
9783 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9784 assignment.
9785 (gdb_unparse_agent_expr): Likewise.
9786 * hostio.c (require_data): Likewise.
9787 (handle_pread): Likewise.
9788 * linux-low.c (disable_regset): Likewise.
9789 (fetch_register): Likewise.
9790 (store_register): Likewise.
9791 (get_dynamic): Likewise.
9792 (linux_qxfer_libraries_svr4): Likewise.
9793 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9794 (set_fast_tracepoint_jump): Likewise.
9795 (uninsert_fast_tracepoint_jumps_at): Likewise.
9796 (reinsert_fast_tracepoint_jumps_at): Likewise.
9797 (validate_inserted_breakpoint): Likewise.
9798 (clone_agent_expr): Likewise.
9799 * regcache.c (init_register_cache): Likewise.
9800 * remote-utils.c (putpkt_binary_1): Likewise.
9801 (decode_M_packet): Likewise.
9802 (decode_X_packet): Likewise.
9803 (look_up_one_symbol): Likewise.
9804 (relocate_instruction): Likewise.
9805 (monitor_output): Likewise.
9806 * server.c (handle_search_memory): Likewise.
9807 (handle_qxfer_exec_file): Likewise.
9808 (handle_qxfer_libraries): Likewise.
9809 (handle_qxfer): Likewise.
9810 (handle_query): Likewise.
9811 (handle_v_cont): Likewise.
9812 (handle_v_run): Likewise.
9813 (captured_main): Likewise.
9814 * target.c (write_inferior_memory): Likewise.
9815 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9816 * tracepoint.c (init_trace_buffer): Likewise.
9817 (add_tracepoint_action): Likewise.
9818 (add_traceframe): Likewise.
9819 (add_traceframe_block): Likewise.
9820 (cmd_qtdpsrc): Likewise.
9821 (cmd_qtdv): Likewise.
9822 (cmd_qtstatus): Likewise.
9823 (response_source): Likewise.
9824 (response_tsv): Likewise.
9825 (cmd_qtnotes): Likewise.
9826 (gdb_collect): Likewise.
9827 (initialize_tracepoint): Likewise.
9828
9829 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9830
9831 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9832 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9833 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9834 <NOP>: New.
9835 (enum aarch64_condition_codes): New enum.
9836 (w0): New static global.
9837 (fp): Likewise.
9838 (lr): Likewise.
9839 (struct aarch64_memory_operand) <type>: New
9840 MEMORY_OPERAND_POSTINDEX type.
9841 (postindex_memory_operand): New helper function.
9842 (emit_ret): New function.
9843 (emit_load_store_pair): New function, factored out of emit_stp
9844 with support for MEMORY_OPERAND_POSTINDEX.
9845 (emit_stp): Rewrite using emit_load_store_pair.
9846 (emit_ldp): New function.
9847 (emit_load_store): Likewise.
9848 (emit_ldr): Mention post-index instruction in comment.
9849 (emit_ldrh): New function.
9850 (emit_ldrb): New function.
9851 (emit_ldrsw): Mention post-index instruction in comment.
9852 (emit_str): Likewise.
9853 (emit_subs): New function.
9854 (emit_cmp): Likewise.
9855 (emit_and): Likewise.
9856 (emit_orr): Likewise.
9857 (emit_orn): Likewise.
9858 (emit_eor): Likewise.
9859 (emit_mvn): Likewise.
9860 (emit_lslv): Likewise.
9861 (emit_lsrv): Likewise.
9862 (emit_asrv): Likewise.
9863 (emit_mul): Likewise.
9864 (emit_sbfm): Likewise.
9865 (emit_sbfx): Likewise.
9866 (emit_ubfm): Likewise.
9867 (emit_ubfx): Likewise.
9868 (emit_csinc): Likewise.
9869 (emit_cset): Likewise.
9870 (emit_nop): Likewise.
9871 (emit_ops_insns): New helper function.
9872 (emit_pop): Likewise.
9873 (emit_push): Likewise.
9874 (aarch64_emit_prologue): New function.
9875 (aarch64_emit_epilogue): Likewise.
9876 (aarch64_emit_add): Likewise.
9877 (aarch64_emit_sub): Likewise.
9878 (aarch64_emit_mul): Likewise.
9879 (aarch64_emit_lsh): Likewise.
9880 (aarch64_emit_rsh_signed): Likewise.
9881 (aarch64_emit_rsh_unsigned): Likewise.
9882 (aarch64_emit_ext): Likewise.
9883 (aarch64_emit_log_not): Likewise.
9884 (aarch64_emit_bit_and): Likewise.
9885 (aarch64_emit_bit_or): Likewise.
9886 (aarch64_emit_bit_xor): Likewise.
9887 (aarch64_emit_bit_not): Likewise.
9888 (aarch64_emit_equal): Likewise.
9889 (aarch64_emit_less_signed): Likewise.
9890 (aarch64_emit_less_unsigned): Likewise.
9891 (aarch64_emit_ref): Likewise.
9892 (aarch64_emit_if_goto): Likewise.
9893 (aarch64_emit_goto): Likewise.
9894 (aarch64_write_goto_address): Likewise.
9895 (aarch64_emit_const): Likewise.
9896 (aarch64_emit_call): Likewise.
9897 (aarch64_emit_reg): Likewise.
9898 (aarch64_emit_pop): Likewise.
9899 (aarch64_emit_stack_flush): Likewise.
9900 (aarch64_emit_zero_ext): Likewise.
9901 (aarch64_emit_swap): Likewise.
9902 (aarch64_emit_stack_adjust): Likewise.
9903 (aarch64_emit_int_call_1): Likewise.
9904 (aarch64_emit_void_call_2): Likewise.
9905 (aarch64_emit_eq_goto): Likewise.
9906 (aarch64_emit_ne_goto): Likewise.
9907 (aarch64_emit_lt_goto): Likewise.
9908 (aarch64_emit_le_goto): Likewise.
9909 (aarch64_emit_gt_goto): Likewise.
9910 (aarch64_emit_ge_got): Likewise.
9911 (aarch64_emit_ops_impl): New static global variable.
9912 (aarch64_emit_ops): New target function, return
9913 &aarch64_emit_ops_impl.
9914 (struct linux_target_ops): Install it.
9915
9916 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9917
9918 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9919 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9920 aarch64-ipa.o.
9921 * linux-aarch64-ipa.c: New file.
9922 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9923 and endian.h.
9924 (aarch64_get_thread_area): New target method.
9925 (extract_signed_bitfield): New helper function.
9926 (aarch64_decode_ldr_literal): New function.
9927 (enum aarch64_opcodes): New enum.
9928 (struct aarch64_register): New struct.
9929 (struct aarch64_operand): New struct.
9930 (x0): New static global.
9931 (x1): Likewise.
9932 (x2): Likewise.
9933 (x3): Likewise.
9934 (x4): Likewise.
9935 (w2): Likewise.
9936 (ip0): Likewise.
9937 (sp): Likewise.
9938 (xzr): Likewise.
9939 (aarch64_register): New helper function.
9940 (register_operand): Likewise.
9941 (immediate_operand): Likewise.
9942 (struct aarch64_memory_operand): New struct.
9943 (offset_memory_operand): New helper function.
9944 (preindex_memory_operand): Likewise.
9945 (enum aarch64_system_control_registers): New enum.
9946 (ENCODE): New macro.
9947 (emit_insn): New helper function.
9948 (emit_b): New function.
9949 (emit_bcond): Likewise.
9950 (emit_cb): Likewise.
9951 (emit_tb): Likewise.
9952 (emit_blr): Likewise.
9953 (emit_stp): Likewise.
9954 (emit_ldp_q_offset): Likewise.
9955 (emit_stp_q_offset): Likewise.
9956 (emit_load_store): Likewise.
9957 (emit_ldr): Likewise.
9958 (emit_ldrsw): Likewise.
9959 (emit_str): Likewise.
9960 (emit_ldaxr): Likewise.
9961 (emit_stxr): Likewise.
9962 (emit_stlr): Likewise.
9963 (emit_data_processing_reg): Likewise.
9964 (emit_data_processing): Likewise.
9965 (emit_add): Likewise.
9966 (emit_sub): Likewise.
9967 (emit_mov): Likewise.
9968 (emit_movk): Likewise.
9969 (emit_mov_addr): Likewise.
9970 (emit_mrs): Likewise.
9971 (emit_msr): Likewise.
9972 (emit_sevl): Likewise.
9973 (emit_wfe): Likewise.
9974 (append_insns): Likewise.
9975 (can_encode_int32_in): New helper function.
9976 (aarch64_relocate_instruction): New function.
9977 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9978 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9979 (struct linux_target_ops): Install aarch64_get_thread_area,
9980 aarch64_install_fast_tracepoint_jump_pad and
9981 aarch64_get_min_fast_tracepoint_insn_len.
9982
9983 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9984
9985 * Makefile.in (aarch64-insn.o): New rule.
9986 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
9987
9988 2015-09-21 Yao Qi <yao.qi@linaro.org>
9989
9990 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
9991
9992 2015-09-21 Yao Qi <yao.qi@linaro.org>
9993
9994 * tracepoint.c (max_jump_pad_size): Remove.
9995
9996 2015-09-18 Yao Qi <yao.qi@linaro.org>
9997
9998 * linux-aarch64-low.c: Don't include sys/uio.h.
9999 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10000
10001 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10002
10003 * tracepoint.c (eval_result_type): Change prototype.
10004 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10005
10006 2015-09-15 Pedro Alves <palves@redhat.com>
10007
10008 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10009 Check whether to report exec events instead of checking whether
10010 multiprocess is enabled.
10011
10012 2015-09-15 Pedro Alves <palves@redhat.com>
10013
10014 PR remote/18965
10015 * remote-utils.c (prepare_resume_reply): Merge
10016 TARGET_WAITKIND_VFORK_DONE switch case with the
10017 TARGET_WAITKIND_FORKED case.
10018
10019 2015-09-15 Yao Qi <yao.qi@linaro.org>
10020
10021 * server.c (handle_query): Check string comparison using
10022 "else if" instead of "if".
10023
10024 2015-09-15 Yao Qi <yao.qi@linaro.org>
10025
10026 * server.c (vCont_supported): New global variable.
10027 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10028 matches. Append ";vContSupported+" to own_buf.
10029 (handle_v_requests): Append ";s;S" to own_buf if target supports
10030 hardware single step or vCont_supported is false.
10031 (capture_main): Set vCont_supported to zero.
10032
10033 2015-09-15 Yao Qi <yao.qi@linaro.org>
10034
10035 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10036 it to ...
10037 (linux_supports_hardware_single_step): ... New function.
10038 (linux_target_ops): Update.
10039 * lynx-low.c (lynx_target_ops): Set field
10040 supports_hardware_single_step to target_can_do_hardware_single_step.
10041 * nto-low.c (nto_target_ops): Likewise.
10042 * spu-low.c (spu_target_ops): Likewise.
10043 * win32-low.c (win32_target_ops): Likewise.
10044 * target.c (target_can_do_hardware_single_step): New function.
10045 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10046 Remove. <supports_hardware_single_step>: New field.
10047 (target_supports_conditional_breakpoints): Remove.
10048 (target_supports_hardware_single_step): New macro.
10049 (target_can_do_hardware_single_step): Declare.
10050 * server.c (handle_query): Use target_supports_hardware_single_step
10051 instead of target_supports_conditional_breakpoints.
10052
10053 2015-09-15 Yao Qi <yao.qi@linaro.org>
10054
10055 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10056 function.
10057 (struct linux_target_ops the_low_target): Install
10058 aarch64_linux_siginfo_fixup.
10059
10060 2015-09-11 Don Breazeal <donb@codesourcery.com>
10061 Luis Machado <lgustavo@codesourcery.com>
10062
10063 * linux-low.c (linux_mourn): Static declaration.
10064 (linux_arch_setup): Move in front of
10065 handle_extended_wait.
10066 (linux_arch_setup_thread): New function.
10067 (handle_extended_wait): Handle exec events. Call
10068 linux_arch_setup_thread. Make event_lwp argument a
10069 pointer-to-a-pointer.
10070 (check_zombie_leaders): Do not check stopped threads.
10071 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10072 (linux_low_filter_event): Add lwp and thread for exec'ing
10073 non-leader thread if leader thread has been deleted.
10074 Refactor code into linux_arch_setup_thread and call it.
10075 Pass child lwp pointer by reference to handle_extended_wait.
10076 (linux_wait_for_event_filtered): Update comment.
10077 (linux_wait_1): Prevent clobbering exec event status.
10078 (linux_supports_exec_events): New function.
10079 (linux_target_ops) <supports_exec_events>: Initialize new member.
10080 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10081 new member.
10082 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10083 * server.c (report_exec_events): New global variable.
10084 (handle_query): Handle qSupported query for exec-events feature.
10085 (captured_main): Initialize report_exec_events.
10086 * server.h (report_exec_events): Declare new global variable.
10087 * target.h (struct target_ops) <supports_exec_events>: New
10088 member.
10089 (target_supports_exec_events): New macro.
10090 * win32-low.c (win32_target_ops) <supports_exec_events>:
10091 Initialize new member.
10092
10093 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10094
10095 * linux-low.c (linux_low_enable_btrace): Remove.
10096 (linux_target_ops): Replace linux_low_enable_btrace with
10097 linux_enable_btrace.
10098
10099 2015-09-03 Yao Qi <yao.qi@linaro.org>
10100
10101 * linux-aarch64-low.c (aarch64_insert_point): Call
10102 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10103 returns true.
10104
10105 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10106
10107 * linux-low.c (check_stopped_by_breakpoint): Use
10108 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10109
10110 2015-08-27 Pedro Alves <palves@redhat.com>
10111
10112 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10113
10114 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10115
10116 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10117 the XNEW-family equivalent.
10118 (compile_bytecodes): Likewise.
10119 * dll.c (loaded_dll): Likewise.
10120 * event-loop.c (append_callback_event): Likewise.
10121 (create_file_handler): Likewise.
10122 (create_file_event): Likewise.
10123 * hostio.c (handle_open): Likewise.
10124 * inferiors.c (add_thread): Likewise.
10125 (add_process): Likewise.
10126 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10127 * linux-arm-low.c (arm_new_process): Likewise.
10128 (arm_new_thread): Likewise.
10129 * linux-low.c (add_to_pid_list): Likewise.
10130 (linux_add_process): Likewise.
10131 (handle_extended_wait): Likewise.
10132 (add_lwp): Likewise.
10133 (enqueue_one_deferred_signal): Likewise.
10134 (enqueue_pending_signal): Likewise.
10135 (linux_resume_one_lwp_throw): Likewise.
10136 (linux_resume_one_thread): Likewise.
10137 (linux_read_memory): Likewise.
10138 (linux_write_memory): Likewise.
10139 * linux-mips-low.c (mips_linux_new_process): Likewise.
10140 (mips_linux_new_thread): Likewise.
10141 (mips_add_watchpoint): Likewise.
10142 * linux-x86-low.c (initialize_low_arch): Likewise.
10143 * lynx-low.c (lynx_add_process): Likewise.
10144 * mem-break.c (set_raw_breakpoint_at): Likewise.
10145 (set_breakpoint): Likewise.
10146 (add_condition_to_breakpoint): Likewise.
10147 (add_commands_to_breakpoint): Likewise.
10148 (clone_agent_expr): Likewise.
10149 (clone_one_breakpoint): Likewise.
10150 * regcache.c (new_register_cache): Likewise.
10151 * remote-utils.c (look_up_one_symbol): Likewise.
10152 * server.c (queue_stop_reply): Likewise.
10153 (start_inferior): Likewise.
10154 (queue_stop_reply_callback): Likewise.
10155 (handle_target_event): Likewise.
10156 * spu-low.c (fetch_ppc_memory): Likewise.
10157 (store_ppc_memory): Likewise.
10158 * target.c (set_target_ops): Likewise.
10159 * thread-db.c (thread_db_load_search): Likewise.
10160 (try_thread_db_load_1): Likewise.
10161 * tracepoint.c (add_tracepoint): Likewise.
10162 (add_tracepoint_action): Likewise.
10163 (create_trace_state_variable): Likewise.
10164 (cmd_qtdpsrc): Likewise.
10165 (cmd_qtro): Likewise.
10166 (add_while_stepping_state): Likewise.
10167 * win32-low.c (child_add_thread): Likewise.
10168 (get_image_name): Likewise.
10169
10170 2015-08-25 Yao Qi <yao.qi@linaro.org>
10171
10172 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10173
10174 2015-08-25 Yao Qi <yao.qi@linaro.org>
10175
10176 * Makefile.in (aarch64-linux.o): New rule.
10177 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10178 srv_tgtobj.
10179 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10180 (aarch64_init_debug_reg_state): Make it extern.
10181 (aarch64_linux_prepare_to_resume): Remove.
10182
10183 2015-08-25 Yao Qi <yao.qi@linaro.org>
10184
10185 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10186 lwp_arch_private_info and ptid_of_lwp.
10187
10188 2015-08-25 Yao Qi <yao.qi@linaro.org>
10189
10190 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10191 Find proc_info by find_process_pid. All callers updated.
10192
10193 2015-08-25 Yao Qi <yao.qi@linaro.org>
10194
10195 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10196 Remove.
10197 (debug_reg_change_callback): Remove.
10198 (aarch64_notify_debug_reg_change): Remove.
10199
10200 2015-08-25 Yao Qi <yao.qi@linaro.org>
10201
10202 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10203 Call current_lwp_ptid.
10204
10205 2015-08-25 Yao Qi <yao.qi@linaro.org>
10206
10207 * linux-aarch64-low.c (debug_reg_change_callback): Use
10208 debug_printf.
10209
10210 2015-08-25 Yao Qi <yao.qi@linaro.org>
10211
10212 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10213
10214 2015-08-25 Yao Qi <yao.qi@linaro.org>
10215
10216 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10217
10218 2015-08-25 Yao Qi <yao.qi@linaro.org>
10219
10220 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10221 the code.
10222
10223 2015-08-25 Yao Qi <yao.qi@linaro.org>
10224
10225 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10226 Remove.
10227 (debug_reg_change_callback): Remove argument entry and add argument
10228 lwp. Remove local variable thread. Don't print thread id in the
10229 debugging output. Don't check whether pid of thread equals to pid.
10230 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10231 iterate_over_lwps instead find_inferior.
10232
10233 2015-08-24 Pedro Alves <palves@redhat.com>
10234
10235 * inferiors.c (get_first_process): New function.
10236 * inferiors.h (get_first_process): New declaration.
10237 * remote-utils.c (read_ptid): Default to the first process in the
10238 list, instead of to the current thread's process.
10239
10240 2015-08-24 Pedro Alves <palves@redhat.com>
10241
10242 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10243 * event-loop.c: Likewise.
10244 * remote-utils.c: Likewise.
10245 * tracepoint.c: Likewise.
10246
10247 2015-08-24 Pedro Alves <palves@redhat.com>
10248
10249 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10250 ptid_get_lwp.
10251
10252 2015-08-21 Pedro Alves <palves@redhat.com>
10253
10254 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10255 instead of literal 1.
10256
10257 2015-08-21 Pedro Alves <palves@redhat.com>
10258
10259 * tdesc.c (default_description): Explicitly zero-initialize.
10260
10261 2015-08-21 Pedro Alves <palves@redhat.com>
10262
10263 PR gdb/18749
10264 * inferiors.c (remove_thread): Discard any pending stop reply for
10265 this thread.
10266 * server.c (remove_all_on_match_pid): Rename to ...
10267 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10268 instead of a pid.
10269 (discard_queued_stop_replies): Change parameter to a ptid. Now
10270 extern.
10271 (handle_v_kill, kill_inferior_callback, captured_main)
10272 (process_serial_event): Adjust.
10273 * server.h (discard_queued_stop_replies): Declare.
10274
10275 2015-08-21 Pedro Alves <palves@redhat.com>
10276
10277 * linux-low.c (wait_for_sigstop): Always switch to no thread
10278 selected if the previously current thread dies.
10279 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10280 process instead of the current thread's.
10281 * remote-utils.c (input_interrupt): Don't check if there's no
10282 current thread.
10283 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10284 current thread to the general thread fails, error out.
10285 (handle_qxfer_auxv, handle_qxfer_libraries)
10286 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10287 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10288 (handle_query): Check if there's a thread selected instead of
10289 checking whether there's any thread in the thread list.
10290 (handle_qxfer_threads, handle_qxfer_btrace)
10291 (handle_qxfer_btrace_conf): Don't error out early if there's no
10292 thread in the thread list.
10293 (handle_v_cont, myresume): Don't set the current thread to the
10294 continue thread.
10295 (process_serial_event) <Hg handling>: Also set thread_id if the
10296 previous general thread is still alive.
10297 (process_serial_event) <g/G handling>: If setting the current
10298 thread to the general thread fails, error out.
10299 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10300 thread's lwp instead of the current thread's.
10301 * target.c (set_desired_thread): If the desired thread was not
10302 found, leave the current thread pointing to NULL. Return an int
10303 (boolean) indicating success.
10304 * target.h (set_desired_thread): Change return type to int.
10305
10306 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10307
10308 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10309 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10310 #includes.
10311 (ps_get_thread_area): New function.
10312
10313 2015-08-19 Gary Benson <gbenson@redhat.com>
10314
10315 * hostio.c (handle_pread): Do not attempt to read more data
10316 than hostio_reply_with_data can fit in a packet.
10317
10318 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10319
10320 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10321
10322 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10323
10324 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10325
10326 2015-08-06 Pedro Alves <palves@redhat.com>
10327
10328 * tracepoint.c (expr_eval_result): Now an int.
10329
10330 2015-08-06 Pedro Alves <palves@redhat.com>
10331
10332 * gdbthread.h (struct regcache): Forward declare.
10333 (struct thread_info) <regcache_data>: Now a struct regcache
10334 pointer.
10335 * inferiors.c (inferior_regcache_data)
10336 (set_inferior_regcache_data): Now work with struct regcache
10337 pointers.
10338 * inferiors.h (struct regcache): Forward declare.
10339 (inferior_regcache_data, set_inferior_regcache_data): Now work
10340 with struct regcache pointers.
10341 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10342 (free_register_cache_thread): Remove struct regcache pointer
10343 casts.
10344
10345 2015-08-06 Pedro Alves <palves@redhat.com>
10346
10347 * server.c (captured_main): On error, print the exception message
10348 to stderr, and if run_once is set, throw a quit.
10349
10350 2015-08-06 Pedro Alves <palves@redhat.com>
10351
10352 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10353 the current thread.
10354
10355 2015-08-06 Pedro Alves <palves@redhat.com>
10356
10357 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10358 reading beyond the passed in buffer length.
10359
10360 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10361
10362 * tracepoint.c (symbol_list) <required>: Remove.
10363
10364 2015-08-06 Pedro Alves <palves@redhat.com>
10365
10366 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10367 count if stopping and suspending threads.
10368 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10369 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10370 (linux_detach): Complete an ongoing step-over.
10371 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10372 throughout.
10373 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10374 (linux_wait_1): If passing a signal to the inferior after
10375 finishing a step-over, unsuspend and re-resume all lwps. If we
10376 see a single-step event but the thread should be continuing, don't
10377 pass the trap to gdb.
10378 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10379 internal_error instead of gdb_assert.
10380 (enqueue_pending_signal): New function.
10381 (check_ptrace_stopped_lwp_gone): Add debug output.
10382 (start_step_over): Use internal_error instead of gdb_assert.
10383 (complete_ongoing_step_over): New function.
10384 (linux_resume_one_thread): Don't resume a suspended thread.
10385 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10386 it stepping.
10387
10388 2015-08-06 Pedro Alves <palves@redhat.com>
10389
10390 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10391 (linux_thread_alive): Use lwp_is_marked_dead.
10392 (extended_event_reported): Delete.
10393 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10394 instead of extended_event_reported.
10395 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10396 as well.
10397 (lwp_is_marked_dead): New function.
10398 (lwp_running): Use lwp_is_marked_dead.
10399 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10400 comment.
10401
10402 2015-08-06 Pedro Alves <palves@redhat.com>
10403
10404 * linux-low.c (linux_wait_1): Move fork event output out of the
10405 !report_to_gdb check. Pass event_child->waitstatus to
10406 target_waitstatus_to_string instead of ourstatus.
10407
10408 2015-08-04 Yao Qi <yao.qi@linaro.org>
10409
10410 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10411 if current_thread is 32 bit.
10412
10413 2015-08-04 Yao Qi <yao.qi@linaro.org>
10414
10415 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10416 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10417 * server.c (extended_protocol): Remove "static".
10418 * server.h (extended_protocol): Declare it.
10419
10420 2015-08-04 Yao Qi <yao.qi@linaro.org>
10421
10422 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10423 both aarch64 and aarch32.
10424 (aarch64_set_pc): Likewise.
10425
10426 2015-08-04 Yao Qi <yao.qi@linaro.org>
10427
10428 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10429 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10430 arm-with-neon.xml to srv_xmlfiles.
10431 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10432 (is_64bit_tdesc): New function.
10433 (aarch64_linux_read_description): New function.
10434 (aarch64_arch_setup): Call aarch64_linux_read_description.
10435 (regs_info): Rename to regs_info_aarch64.
10436 (aarch64_regs_info): Return right regs_info.
10437 (initialize_low_arch): Call initialize_low_arch_aarch32.
10438
10439 2015-08-04 Yao Qi <yao.qi@linaro.org>
10440
10441 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10442 * linux-aarch32-low.c: New file.
10443 * linux-aarch32-low.h: New file.
10444 * linux-arm-low.c (arm_fill_gregset): Move it to
10445 linux-aarch32-low.c.
10446 (arm_store_gregset): Likewise.
10447 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10448 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10449 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10450 (regs_info): Rename to regs_info_arm.
10451 (arm_regs_info): Return regs_info_aarch32 if
10452 have_ptrace_getregset is 1 and target description is
10453 arm_with_neon or arm_with_vfpv3.
10454 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10455 Call initialize_low_arch_aarch32 instead.
10456
10457 2015-08-04 Yao Qi <yao.qi@linaro.org>
10458
10459 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10460 * linux-low.c: ... here.
10461 * linux-low.h (have_ptrace_getregset): Declare it.
10462
10463 2015-08-04 Pedro Alves <palves@redhat.com>
10464
10465 * thread-db.c (struct thread_db): Use new typedefs.
10466 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10467 CHK calls.
10468 (disable_thread_event_reporting): Cast result of dlsym to
10469 destination function pointer type.
10470 (thread_db_mourn): Use td_ta_delete_ftype.
10471
10472 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10473
10474 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10475 arch variant.
10476 (CDX_BREAKPOINT): Define for R2.
10477 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10478 (the_low_target): Add comments.
10479
10480 2015-07-30 Yao Qi <yao.qi@linaro.org>
10481
10482 * linux-arm-low.c (arm_hwcap): Remove it.
10483 (arm_read_description): New local variable arm_hwcap. Don't
10484 set arm_hwcap to zero.
10485
10486 2015-07-30 Yao Qi <yao.qi@linaro.org>
10487
10488 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10489 Use regcache->tdesc instead.
10490 (arm_store_wmmxregset): Likewise.
10491 (arm_fill_vfpregset): Likewise.
10492 (arm_store_vfpregset): Likewise.
10493
10494 2015-07-30 Yao Qi <yao.qi@linaro.org>
10495
10496 * linux-arm-low.c: Include arch/arm.h.
10497 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10498 (arm_store_gregset): Likewise.
10499
10500 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10501
10502 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10503 ptrace's 4th parameter.
10504
10505 2015-07-27 Yao Qi <yao.qi@linaro.org>
10506
10507 * configure.srv (case aarch64*-*-linux*): Don't set
10508 srv_linux_usrregs.
10509
10510 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10511
10512 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10513 sys/ptrace.h.
10514 * linux-arm-low.c: Likewise.
10515 * linux-cris-low.c: Likewise.
10516 * linux-crisv32-low.c: Likewise.
10517 * linux-low.c: Likewise.
10518 * linux-m68k-low.c: Likewise.
10519 * linux-mips-low.c: Likewise.
10520 * linux-nios2-low.c: Likewise.
10521 * linux-s390-low.c: Likewise.
10522 * linux-sparc-low.c: Likewise.
10523 * linux-tic6x-low.c: Likewise.
10524 * linux-tile-low.c: Likewise.
10525 * linux-x86-low.c: Likewise.
10526
10527 2015-07-24 Pedro Alves <palves@redhat.com>
10528
10529 * config.in: Regenerate.
10530 * configure: Regenerate.
10531
10532 2015-07-24 Pedro Alves <palves@redhat.com>
10533
10534 * acinclude.m4: Include ../ptrace.m4.
10535 * configure.ac: Call GDB_AC_PTRACE.
10536 * config.in, configure: Regenerate.
10537
10538 2015-07-24 Yao Qi <yao.qi@linaro.org>
10539
10540 * linux-low.c (linux_create_inferior): Remove setting to
10541 proc->priv->new_inferior.
10542 (linux_attach): Likewise.
10543 (linux_low_filter_event): Likewise.
10544 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10545
10546 2015-07-24 Yao Qi <yao.qi@linaro.org>
10547
10548 * linux-low.c (linux_arch_setup): New function.
10549 (linux_low_filter_event): If proc->tdesc is NULL and
10550 proc->attached is true, call the_low_target.arch_setup.
10551 Otherwise, keep status pending, and return.
10552 (linux_resume_one_lwp_throw): Don't call get_pc if
10553 thread->while_stepping isn't NULL. Don't call
10554 get_thread_regcache if proc->tdesc is NULL.
10555 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10556 (linux_target_ops): Install arch_setup.
10557 * server.c (start_inferior): Call the_target->arch_setup.
10558 * target.h (struct target_ops) <arch_setup>: New field.
10559 (target_arch_setup): New marco.
10560 * lynx-low.c (lynx_target_ops): Update.
10561 * nto-low.c (nto_target_ops): Update.
10562 * spu-low.c (spu_target_ops): Update.
10563 * win32-low.c (win32_target_ops): Update.
10564
10565 2015-07-24 Yao Qi <yao.qi@linaro.org>
10566
10567 * linux-low.c (linux_add_process): Don't set
10568 proc->priv->new_inferior.
10569 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10570 (linux_attach): Likewise.
10571
10572 2015-07-24 Yao Qi <yao.qi@linaro.org>
10573
10574 * server.c (start_inferior): Code refactor.
10575
10576 2015-07-24 Yao Qi <yao.qi@linaro.org>
10577
10578 * server.c (process_serial_event): Set general_thread.
10579
10580 2015-07-21 Yao Qi <yao.qi@linaro.org>
10581
10582 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10583 aarch64_linux_get_debug_reg_capacity.
10584
10585 2015-07-17 Yao Qi <yao.qi@linaro.org>
10586
10587 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10588 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10589 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10590 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10591 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10592 (AARCH64_HWP_ALIGNMENT): Likewise.
10593 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10594 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10595 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10596 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10597 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10598 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10599 (struct aarch64_debug_reg_state): Likewise.
10600 (struct arch_lwp_info): Likewise.
10601 (aarch64_align_watchpoint): Likewise.
10602 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10603 (aarch64_watchpoint_length): Likewise.
10604 (aarch64_point_encode_ctrl_reg): Likewise
10605 (aarch64_point_is_aligned): Likewise.
10606 (aarch64_align_watchpoint): Likewise.
10607 (aarch64_linux_set_debug_regs):
10608 (aarch64_dr_state_insert_one_point): Likewise.
10609 (aarch64_dr_state_remove_one_point): Likewise.
10610 (aarch64_handle_breakpoint): Likewise.
10611 (aarch64_handle_aligned_watchpoint): Likewise.
10612 (aarch64_handle_unaligned_watchpoint): Likewise.
10613 (aarch64_handle_watchpoint): Likewise.
10614
10615 2015-07-17 Yao Qi <yao.qi@linaro.org>
10616
10617 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10618 and don't aarch64_get_debug_reg_state. All callers update.
10619 (aarch64_handle_aligned_watchpoint): Likewise.
10620 (aarch64_handle_unaligned_watchpoint): Likewise.
10621 (aarch64_handle_watchpoint): Likewise.
10622 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10623 (aarch64_remove_point): Likewise.
10624
10625 2015-07-17 Yao Qi <yao.qi@linaro.org>
10626
10627 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10628 debug_printf.
10629 (aarch64_handle_unaligned_watchpoint): Likewise.
10630
10631 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10632
10633 Revert the previous 3 commits:
10634 Move gdb_regex* to common/
10635 Move linux_find_memory_regions_full & co.
10636 gdbserver build-id attribute generator
10637
10638 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10639 Jan Kratochvil <jan.kratochvil@redhat.com>
10640
10641 gdbserver build-id attribute generator.
10642 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10643 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10644 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10645 (find_phdr): New.
10646 (get_dynamic): Use find_pdhr to traverse program headers.
10647 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10648 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10649 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10650 (get_hex_build_id): New.
10651 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10652 to reply XML document.
10653
10654 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10655 Jan Kratochvil <jan.kratochvil@redhat.com>
10656
10657 * target.c: Include target/target-utils.h and fcntl.h.
10658 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10659 (target_fileio_read_stralloc): New functions.
10660
10661 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10662
10663 * Makefile.in (OBS): Add gdb_regex.o.
10664 (gdb_regex.o): New.
10665 * config.in: Rebuilt.
10666 * configure: Rebuilt.
10667
10668 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10669 Jan Kratochvil <jan.kratochvil@redhat.com>
10670
10671 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10672 * Makefile.in (OBS): Add target-utils.o.
10673 (linux-maps.o, target-utils.o): New.
10674 * configure.srv (srv_linux_obj): Add linux-maps.o.
10675
10676 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10677
10678 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10679 function, return 1.
10680 (the_low_target): Install it.
10681
10682 2015-07-14 Pedro Alves <palves@redhat.com>
10683
10684 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10685 Instead, ignore ECHILD, and throw an error for other errnos.
10686
10687 2015-07-10 Pedro Alves <palves@redhat.com>
10688
10689 * event-loop.c (struct callback_event) <data>: Change type to
10690 gdb_client_data instance instead of gdb_client_data pointer.
10691 (append_callback_event): Adjust.
10692
10693 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10694
10695 * linux-aarch64-low.c: Add comments for each linux_target_ops
10696 method. Remove comments already covered in target_ops and
10697 linux_target_ops definitions.
10698 (the_low_target): Add comments for each unimplemented method.
10699
10700 2015-07-09 Yao Qi <yao.qi@linaro.org>
10701
10702 * linux-aarch64-low.c (aarch64_regmap): Remove.
10703 (aarch64_usrregs_info): Remove.
10704 (regs_info): Set field usrregs to NULL.
10705
10706 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10707
10708 * linux-low.c: Include "rsp-low.h"
10709 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10710 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10711 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10712 (handle_btrace_enable_pt): New.
10713 (handle_btrace_general_set): Support "pt".
10714 (handle_btrace_conf_general_set): Support "pt:size".
10715
10716 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10717
10718 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10719 Z_PACKET_SW_BP.
10720
10721 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10722
10723 * linux-aarch64-low.c: Remove comment about endianness.
10724 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10725 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10726 memcmp.
10727
10728 2015-06-24 Gary Benson <gbenson@redhat.com>
10729
10730 * linux-i386-ipa.c (stdint.h): Do not include.
10731 * lynx-i386-low.c (stdint.h): Likewise.
10732 * lynx-ppc-low.c (stdint.h): Likewise.
10733 * mem-break.c (stdint.h): Likewise.
10734 * thread-db.c (stdint.h): Likewise.
10735 * tracepoint.c (stdint.h): Likewise.
10736 * win32-low.c (stdint.h): Likewise.
10737
10738 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10739
10740 * server.c (write_qxfer_response): Update call to
10741 remote_escape_output.
10742
10743 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10744 Jan Kratochvil <jan.kratochvil@redhat.com>
10745
10746 Merge multiple hex conversions.
10747 * gdbreplay.c (tohex): Rename to 'fromhex'.
10748 (logchar): Use fromhex.
10749
10750 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10751
10752 * server.c (handle_qxfer_libraries): Set `version' attribute for
10753 <library-list>.
10754
10755 2015-06-10 Gary Benson <gbenson@redhat.com>
10756
10757 * target.h (struct target_ops) <multifs_open>: New field.
10758 <multifs_unlink>: Likewise.
10759 <multifs_readlink>: Likewise.
10760 * linux-low.c (nat/linux-namespaces.h): New include.
10761 (linux_target_ops): Initialize the_target->multifs_open,
10762 the_target->multifs_unlink and the_target->multifs_readlink.
10763 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10764 * hostio.c (hostio_fs_pid): New static variable.
10765 (hostio_handle_new_gdb_connection): New function.
10766 (handle_setfs): Likewise.
10767 (handle_open): Use the_target->multifs_open as appropriate.
10768 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10769 (handle_readlink): Use the_target->multifs_readlink as
10770 appropriate.
10771 (handle_vFile): Handle vFile:setfs packets.
10772 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10773 after target_handle_new_gdb_connection.
10774
10775 2015-06-10 Gary Benson <gbenson@redhat.com>
10776
10777 * configure.ac (AC_CHECK_FUNCS): Add setns.
10778 * config.in: Regenerate.
10779 * configure: Likewise.
10780 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10781 (linux-namespaces.o): New rule.
10782 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10783
10784 2015-06-09 Gary Benson <gbenson@redhat.com>
10785
10786 * hostio.c (handle_open): Process mode argument with
10787 fileio_to_host_mode.
10788
10789 2015-06-01 Yao Qi <yao.qi@linaro.org>
10790
10791 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10792 * linux-x86-low.c: Likewise.
10793
10794 2015-05-28 Don Breazeal <donb@codesourcery.com>
10795
10796 * linux-low.c (handle_extended_wait): Initialize
10797 thread_info.last_resume_kind for new fork children.
10798
10799 2015-05-15 Pedro Alves <palves@redhat.com>
10800
10801 * target.h (target_handle_new_gdb_connection): Rewrite using if
10802 wrapped in do/while.
10803
10804 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10805
10806 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10807 * configure, config.in: Regenerate.
10808 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10809 Declare typedef.
10810
10811 2015-05-12 Don Breazeal <donb@codesourcery.com>
10812
10813 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10814 PTRACE_EVENT_VFORK_DONE.
10815 (linux_low_ptrace_options, extended_event_reported): Add vfork
10816 events.
10817 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10818 and "vforkdone" for RSP 'T' Stop Reply Packet.
10819 * server.h (report_vfork_events): Declare
10820 global variable.
10821
10822 2015-05-12 Don Breazeal <donb@codesourcery.com>
10823
10824 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10825 (the_low_target) <new_fork>: Initialize new member.
10826 * linux-arm-low.c (arm_new_fork): New function.
10827 (the_low_target) <new_fork>: Initialize new member.
10828 * linux-low.c (handle_extended_wait): Call new target function
10829 new_fork.
10830 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10831 * linux-mips-low.c (mips_add_watchpoint): New function
10832 extracted from mips_insert_point.
10833 (the_low_target) <new_fork>: Initialize new member.
10834 (mips_linux_new_fork): New function.
10835 (mips_insert_point): Call mips_add_watchpoint.
10836 * linux-x86-low.c (x86_linux_new_fork): New function.
10837 (the_low_target) <new_fork>: Initialize new member.
10838
10839 2015-05-12 Don Breazeal <donb@codesourcery.com>
10840
10841 * linux-low.c (handle_extended_wait): Implement return value,
10842 rename argument 'event_child' to 'event_lwp', handle
10843 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10844 (linux_low_ptrace_options): New function.
10845 (linux_low_filter_event): Call linux_low_ptrace_options,
10846 use different argument fo linux_enable_event_reporting,
10847 use return value from handle_extended_wait.
10848 (extended_event_reported): New function.
10849 (linux_wait_1): Call extended_event_reported and set
10850 status to report fork events.
10851 (linux_write_memory): Add pid to debug message.
10852 (reset_lwp_ptrace_options_callback): New function.
10853 (linux_handle_new_gdb_connection): New function.
10854 (linux_target_ops): Initialize new structure member.
10855 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10856 * lynx-low.c: Initialize new structure member.
10857 * remote-utils.c (prepare_resume_reply): Implement stop reason
10858 "fork" for "T" stop message.
10859 * server.c (handle_query): Call handle_new_gdb_connection.
10860 * server.h (report_fork_events): Declare global flag.
10861 * target.h (struct target_ops) <handle_new_gdb_connection>:
10862 New member.
10863 (target_handle_new_gdb_connection): New macro.
10864 * win32-low.c: Initialize new structure member.
10865
10866 2015-05-12 Don Breazeal <donb@codesourcery.com>
10867
10868 * mem-break.c (APPEND_TO_LIST): Define macro.
10869 (clone_agent_expr): New function.
10870 (clone_one_breakpoint): New function.
10871 (clone_all_breakpoints): New function.
10872 * mem-break.h: Declare new functions.
10873
10874 2015-05-12 Don Breazeal <donb@codesourcery.com>
10875
10876 * linux-low.c (linux_supports_fork_events): New function.
10877 (linux_supports_vfork_events): New function.
10878 (linux_target_ops): Initialize new structure members.
10879 (initialize_low): Call linux_check_ptrace_features.
10880 * lynx-low.c (lynx_target_ops): Initialize new structure
10881 members.
10882 * server.c (report_fork_events, report_vfork_events):
10883 New global flags.
10884 (handle_query): Add new features to qSupported packet and
10885 response.
10886 (captured_main): Initialize new global variables.
10887 * target.h (struct target_ops) <supports_fork_events>:
10888 New member.
10889 <supports_vfork_events>: New member.
10890 (target_supports_fork_events): New macro.
10891 (target_supports_vfork_events): New macro.
10892 * win32-low.c (win32_target_ops): Initialize new structure
10893 members.
10894
10895 2015-05-12 Gary Benson <gbenson@redhat.com>
10896
10897 * server.c (handle_qxfer_exec_file): Use current process
10898 if annex is empty.
10899
10900 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10901
10902 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10903 Remove HAVE_PTRACE_GETREGS conditionals.
10904 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10905 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10906
10907 2015-05-08 Yao Qi <yao.qi@linaro.org>
10908
10909 * linux-low.c (linux_supports_conditional_breakpoints): New
10910 function.
10911 (linux_target_ops): Install new target method.
10912 * lynx-low.c (lynx_target_ops): Install NULL hook for
10913 supports_conditional_breakpoints.
10914 * nto-low.c (nto_target_ops): Likewise.
10915 * spu-low.c (spu_target_ops): Likewise.
10916 * win32-low.c (win32_target_ops): Likewise.
10917 * server.c (handle_query): Check
10918 target_supports_conditional_breakpoints.
10919 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10920 New field.
10921 (target_supports_conditional_breakpoints): New macro.
10922
10923 2015-05-06 Pedro Alves <palves@redhat.com>
10924
10925 PR server/18081
10926 * server.c (start_inferior): If the process exits, mourn it.
10927
10928 2015-04-21 Gary Benson <gbenson@redhat.com>
10929
10930 * hostio.c (fileio_open_flags_to_host): Factored out to
10931 fileio_to_host_openflags in common/fileio.c. Single use
10932 updated.
10933
10934 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10935
10936 * linux-xtensa-low.c (xtensa_fill_gregset)
10937 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10938 XCHAL_HAVE_LOOP.
10939
10940 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10941
10942 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10943 (regs_info): Replace usrregs pointer with NULL.
10944
10945 2015-04-17 Gary Benson <gbenson@redhat.com>
10946
10947 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10948 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10949 * server.c (handle_qxfer_exec_file): New function.
10950 (qxfer_packets): Add exec-file entry.
10951 (handle_query): Report qXfer:exec-file:read as supported packet.
10952
10953 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10954
10955 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10956
10957 2015-04-09 Gary Benson <gbenson@redhat.com>
10958
10959 * hostio-errno.c (errno_to_fileio_error): Remove function.
10960 Update caller to use remote_fileio_to_fio_error.
10961
10962 2015-04-09 Yao Qi <yao.qi@linaro.org>
10963
10964 * linux-low.c (linux_insert_point): Call
10965 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10966 (linux_remove_point): Call remove_memory_breakpoint if type is
10967 raw_bkpt_type_sw.
10968 * linux-x86-low.c (x86_insert_point): Don't call
10969 insert_memory_breakpoint.
10970 (x86_remove_point): Don't call remove_memory_breakpoint.
10971
10972 2015-04-01 Pedro Alves <palves@redhat.com>
10973 Cleber Rosa <crosa@redhat.com>
10974
10975 * server.c (gdbserver_usage): Reorganize and extend the usage
10976 message.
10977
10978 2015-03-24 Pedro Alves <palves@redhat.com>
10979
10980 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10981 output. Also dump TRAP_TRACE.
10982 (linux_low_filter_event): In debug output, distinguish a
10983 resume_stop SIGSTOP from a delayed SIGSTOP.
10984
10985 2015-03-24 Gary Benson <gbenson@redhat.com>
10986
10987 * linux-x86-low.c (x86_linux_new_thread): Moved to
10988 nat/x86-linux.c.
10989 (x86_linux_prepare_to_resume): Likewise.
10990
10991 2015-03-24 Gary Benson <gbenson@redhat.com>
10992
10993 * Makefile.in (x86-linux-dregs.o): New rule.
10994 * configure.srv: Add x86-linux-dregs.o to relevant targets.
10995 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
10996 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
10997 (x86_linux_dr_get): Likewise.
10998 (x86_linux_dr_set): Likewise.
10999 (update_debug_registers_callback): Likewise.
11000 (x86_linux_dr_set_addr): Likewise.
11001 (x86_linux_dr_get_addr): Likewise.
11002 (x86_linux_dr_set_control): Likewise.
11003 (x86_linux_dr_get_control): Likewise.
11004 (x86_linux_dr_get_status): Likewise.
11005 (x86_linux_update_debug_registers): Likewise.
11006
11007 2015-03-24 Gary Benson <gbenson@redhat.com>
11008
11009 * linux-x86-low.c (x86_linux_update_debug_registers):
11010 New function, factored out from...
11011 (x86_linux_prepare_to_resume): ...this.
11012
11013 2015-03-24 Gary Benson <gbenson@redhat.com>
11014
11015 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11016 (x86_linux_dr_set): Likewise.
11017 (update_debug_registers_callback): Likewise.
11018 (x86_linux_dr_set_addr): Likewise.
11019 (x86_linux_dr_get_addr): Likewise.
11020 (x86_linux_dr_set_control): Likewise.
11021 (x86_linux_dr_get_control): Likewise.
11022 (x86_linux_dr_get_status): Likewise.
11023 (x86_linux_prepare_to_resume): Likewise.
11024
11025 2015-03-24 Gary Benson <gbenson@redhat.com>
11026
11027 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11028 Use perror_with_name. Pass string through gettext.
11029 (x86_linux_dr_set): Likewise.
11030
11031 2015-03-24 Gary Benson <gbenson@redhat.com>
11032
11033 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11034 (x86_linux_dr_set_addr): ...this.
11035 (x86_dr_low_get_addr): Rename to...
11036 (x86_linux_dr_get_addr): ...this.
11037 (x86_dr_low_set_control): Rename to...
11038 (x86_linux_dr_set_control): ...this.
11039 (x86_dr_low_get_control): Rename to...
11040 (x86_linux_dr_get_control): ...this.
11041 (x86_dr_low_get_status): Rename to...
11042 (x86_linux_dr_get_status): ...this.
11043 (x86_dr_low): Update with new function names.
11044
11045 2015-03-24 Gary Benson <gbenson@redhat.com>
11046
11047 * Makefile.in (x86-linux.o): New rule.
11048 * configure.srv: Add x86-linux.o to relevant targets.
11049 * linux-low.c (lwp_set_arch_private_info): New function.
11050 (lwp_arch_private_info): Likewise.
11051 * linux-x86-low.c: Include nat/x86-linux.h.
11052 (arch_lwp_info): Removed structure.
11053 (update_debug_registers_callback):
11054 Use lwp_set_debug_registers_changed.
11055 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11056 and lwp_set_debug_registers_changed.
11057 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11058
11059 2015-03-24 Gary Benson <gbenson@redhat.com>
11060
11061 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11062 * linux-arm-low.c (arm_new_thread): Likewise.
11063 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11064 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11065 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11066 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11067
11068 2015-03-24 Gary Benson <gbenson@redhat.com>
11069
11070 * linux-low.c (ptid_of_lwp): New function.
11071 (lwp_is_stopped): Likewise.
11072 (lwp_stop_reason): Likewise.
11073 * linux-x86-low.c (update_debug_registers_callback):
11074 Use lwp_is_stopped.
11075 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11076 lwp_stop_reason.
11077
11078 2015-03-24 Gary Benson <gbenson@redhat.com>
11079
11080 * linux-low.h (linux_stop_lwp): Remove declaration.
11081
11082 2015-03-24 Gary Benson <gbenson@redhat.com>
11083
11084 * linux-low.h: Include nat/linux-nat.h.
11085 * linux-low.c (iterate_over_lwps_args): New structure.
11086 (iterate_over_lwps_filter): New function.
11087 (iterate_over_lwps): Likewise.
11088 * linux-x86-low.c (update_debug_registers_callback):
11089 Update signature to what iterate_over_lwps expects.
11090 Remove PID check that iterate_over_lwps now performs.
11091 (x86_dr_low_set_addr): Use iterate_over_lwps.
11092 (x86_dr_low_set_control): Likewise.
11093
11094 2015-03-24 Gary Benson <gbenson@redhat.com>
11095
11096 * linux-x86-low.c (x86_debug_reg_state): New function.
11097 (x86_linux_prepare_to_resume): Use the above.
11098
11099 2015-03-24 Gary Benson <gbenson@redhat.com>
11100
11101 * linux-low.c (current_lwp_ptid): New function.
11102 * linux-x86-low.c: Include nat/linux-nat.h.
11103 (x86_dr_low_get_addr): Use current_lwp_ptid.
11104 (x86_dr_low_get_control): Likewise.
11105 (x86_dr_low_get_status): Likewise.
11106
11107 2015-03-20 Pedro Alves <palves@redhat.com>
11108
11109 * tracepoint.c (cmd_qtstatus): Make "str" const.
11110
11111 2015-03-20 Pedro Alves <palves@redhat.com>
11112
11113 * server.c (handle_general_set): Make "req_str" const.
11114
11115 2015-03-19 Pedro Alves <palves@redhat.com>
11116
11117 * linux-low.c (linux_resume_one_lwp): Rename to ...
11118 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11119 instead call perror_with_name.
11120 (check_ptrace_stopped_lwp_gone): New function.
11121 (linux_resume_one_lwp): Reimplement as wrapper around
11122 linux_resume_one_lwp_throw that swallows errors if the LWP is
11123 gone.
11124
11125 2015-03-19 Pedro Alves <palves@redhat.com>
11126
11127 * linux-low.c (count_events_callback, select_event_lwp_callback):
11128 No longer check whether the thread has resume_stop as last resume
11129 kind.
11130
11131 2015-03-19 Pedro Alves <palves@redhat.com>
11132
11133 * linux-low.c (count_events_callback, select_event_lwp_callback):
11134 Use the lwp's status_pending_p field, not the thread's.
11135
11136 2015-03-19 Pedro Alves <palves@redhat.com>
11137
11138 * linux-low.c (select_event_lwp_callback): Update comments to
11139 no longer mention SIGTRAP.
11140
11141 2015-03-18 Gary Benson <gbenson@redhat.com>
11142
11143 * server.c (handle_query): Do not report vFile:fstat as supported.
11144
11145 2015-03-11 Gary Benson <gbenson@redhat.com>
11146
11147 * hostio.c (sys/types.h): New include.
11148 (sys/stat.h): Likewise.
11149 (common-remote-fileio.h): Likewise.
11150 (handle_fstat): New function.
11151 (handle_vFile): Handle vFile:fstat packets.
11152
11153 2015-03-11 Gary Benson <gbenson@redhat.com>
11154
11155 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11156 struct stat.st_blocks and struct stat.st_blksize.
11157 * configure: Regenerate.
11158 * config.in: Likewise.
11159 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11160 (OBS): Add common-remote-fileio.o.
11161 (common-remote-fileio.o): New rule.
11162
11163 2015-03-09 Pedro Alves <palves@redhat.com>
11164
11165 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11166 'struct sockaddr' pointer in 'accept' call.
11167
11168 2015-03-09 Pedro Alves <palves@redhat.com>
11169
11170 Revert:
11171 2015-03-07 Pedro Alves <palves@redhat.com>
11172 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11173 or <winsock2.h> here. Instead include "gdb_socket.h".
11174 (remote_open): Use union gdb_sockaddr_u.
11175 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11176 or <winsock2.h> here. Instead include "gdb_socket.h".
11177 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11178 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11179 or <sys/un.h>.
11180 (init_named_socket, gdb_agent_helper_thread): Use union
11181 gdb_sockaddr_u.
11182
11183 2015-03-07 Pedro Alves <palves@redhat.com>
11184
11185 * configure.ac (build_warnings): Move
11186 -Wdeclaration-after-statement to the C-specific set.
11187 * configure: Regenerate.
11188
11189 2015-03-07 Pedro Alves <palves@redhat.com>
11190
11191 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11192 or <winsock2.h> here. Instead include "gdb_socket.h".
11193 (remote_open): Use union gdb_sockaddr_u.
11194 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11195 or <winsock2.h> here. Instead include "gdb_socket.h".
11196 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11197 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11198 or <sys/un.h>.
11199 (init_named_socket, gdb_agent_helper_thread): Use union
11200 gdb_sockaddr_u.
11201
11202 2015-03-07 Pedro Alves <palves@redhat.com>
11203
11204 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11205 instead.
11206
11207 2015-03-06 Yao Qi <yao.qi@linaro.org>
11208
11209 * linux-aarch64-low.c (aarch64_insert_point): Use
11210 show_debug_regs as a boolean.
11211 (aarch64_remove_point): Likewise.
11212
11213 2015-03-05 Pedro Alves <palves@redhat.com>
11214
11215 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11216 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11217 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11218 * nto-low.c (nto_target_ops): Likewise.
11219 * spu-low.c (spu_target_ops): Likewise.
11220 * win32-low.c (win32_target_ops): Likewise.
11221
11222 2015-03-04 Pedro Alves <palves@redhat.com>
11223
11224 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11225 Decide whether a breakpoint triggered based on the SIGTRAP's
11226 siginfo.si_code.
11227 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11228 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11229 (linux_low_filter_event): Check for breakpoints before checking
11230 watchpoints.
11231 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11232 siginfo.si_code.
11233 (linux_stopped_by_sw_breakpoint)
11234 (linux_supports_stopped_by_sw_breakpoint)
11235 (linux_stopped_by_hw_breakpoint)
11236 (linux_supports_stopped_by_hw_breakpoint): New functions.
11237 (linux_target_ops): Install new target methods.
11238
11239 2015-03-04 Pedro Alves <palves@redhat.com>
11240
11241 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11242 * server.c (swbreak_feature, hwbreak_feature): New globals.
11243 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11244 (captured_main): Clear swbreak_feature and hwbreak_feature.
11245 * server.h (swbreak_feature, hwbreak_feature): Declare.
11246 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11247 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11248 supports_stopped_by_hw_breakpoint>: New fields.
11249 (target_supports_stopped_by_sw_breakpoint)
11250 (target_stopped_by_sw_breakpoint)
11251 (target_supports_stopped_by_hw_breakpoint)
11252 (target_stopped_by_hw_breakpoint): Declare.
11253
11254 2015-03-04 Pedro Alves <palves@redhat.com>
11255
11256 enum lwp_stop_reason -> enum target_stop_reason
11257 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11258 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11259 (linux_wait_1, stuck_in_jump_pad_callback)
11260 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11261 (linux_stopped_by_watchpoint):
11262 * linux-low.h (enum lwp_stop_reason): Delete.
11263 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11264 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11265
11266 2015-03-04 Yao Qi <yao.qi@linaro.org>
11267
11268 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11269
11270 2015-03-03 Gary Benson <gbenson@redhat.com>
11271
11272 * hostio.c (handle_vFile): Fix prefix lengths.
11273
11274 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11275
11276 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11277 ptr_bits.
11278
11279 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11280
11281 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11282 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11283 (clean): Add "rm -f" for above C files.
11284 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11285 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11286 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11287 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11288 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11289 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11290 (init_registers_s390x_vx_linux64)
11291 (init_registers_s390x_tevx_linux64)
11292 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11293 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11294 declarations.
11295 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11296 (s390_store_vxrs_high): New functions.
11297 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11298 NT_S390_VXRS_HIGH.
11299 (s390_arch_setup): Add logic for selecting one of the new target
11300 descriptions. Activate the new vector regsets if applicable.
11301 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11302 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11303 and init_registers_s390x_tevx_linux64.
11304
11305 2015-03-01 Pedro Alves <palves@redhat.com>
11306
11307 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11308 parameter.
11309
11310 2015-02-27 Pedro Alves <palves@redhat.com>
11311
11312 * linux-x86-low.c (u_debugreg_offset): New function.
11313 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11314
11315 2015-02-27 Pedro Alves <palves@redhat.com>
11316
11317 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11318 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11319 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11320 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11321 (ps_lsetfpregs, ps_getpid)
11322 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11323 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11324 (ps_lsetxregs, ps_plog): Declare.
11325
11326 2015-02-27 Pedro Alves <palves@redhat.com>
11327
11328 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11329 IP_AGENT_EXPORT_FUNC.
11330 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11331 IP_AGENT_EXPORT_FUNC.
11332 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11333 (IP_AGENT_EXPORT): Delete.
11334 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11335 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11336 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11337 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11338 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11339 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11340 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11341 (traceframe_read_count, traceframe_write_count)
11342 (traceframes_created, trace_state_variables, get_raw_reg)
11343 (get_trace_state_variable_value, set_trace_state_variable_value)
11344 (ust_loaded, helper_thread_id, cmd_buf): Use
11345 IPA_SYM_EXPORTED_NAME.
11346 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11347 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11348 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11349 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11350 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11351 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11352 EXTERN_C_PUSH/EXTERN_C_POP.
11353 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11354 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11355 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11356 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11357 (traceframe_write_count, traceframe_read_count)
11358 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11359 (about_to_request_buffer_space, get_trace_state_variable_value)
11360 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11361 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11362 EXTERN_C_PUSH/EXTERN_C_POP.
11363 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11364 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11365 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11366 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11367 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11368 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11369 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11370 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11371 Define.
11372 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11373 (IP_AGENT_EXPORT_VAR_DECL): Define.
11374 (tracing): Declare.
11375 (gdb_agent_get_raw_reg): Declare.
11376
11377 2015-02-27 Tom Tromey <tromey@redhat.com>
11378 Pedro Alves <palves@redhat.com>
11379
11380 Rename symbols whose names are reserved C++ keywords throughout.
11381
11382 2015-02-27 Pedro Alves <palves@redhat.com>
11383
11384 * Makefile.in (COMPILER): New, get it from autoconf.
11385 (CXX): Get from autoconf instead.
11386 (COMPILE.pre): Use COMPILER.
11387 (CC-LD): Rename to ...
11388 (CC_LD): ... this. Use COMPILER.
11389 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11390 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11391 * acinclude.m4: Include build-with-cxx.m4.
11392 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11393 Disable -Werror by default if building in C++ mode.
11394 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11395 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11396 the C++ compiler. Save/restore CXXFLAGS too.
11397 * configure: Regenerate.
11398
11399 2015-02-27 Pedro Alves <palves@redhat.com>
11400
11401 * acinclude.m4: Include libiberty.m4.
11402 * configure.ac: Call libiberty_INIT.
11403 * config.in, configure: Regenerate.
11404
11405 2015-02-26 Pedro Alves <palves@redhat.com>
11406
11407 * linux-low.c (linux_wait_1): When incrementing the PC past a
11408 program breakpoint always use the_low_target.breakpoint_len as
11409 increment, rather than the maximum between that and
11410 the_low_target.decr_pc_after_break.
11411
11412 2015-02-23 Pedro Alves <palves@redhat.com>
11413
11414 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11415 thread was doing a step-over; always adjust the PC if
11416 we stepped over a permanent breakpoint.
11417 (linux_wait_1): If we stepped over breakpoint that was on top of a
11418 permanent breakpoint, manually advance the PC past it.
11419
11420 2015-02-23 Pedro Alves <palves@redhat.com>
11421
11422 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11423 modes.
11424 (x86_fill_gregset, x86_store_gregset): Use it when handling
11425 $orig_eax.
11426
11427 2015-02-20 Pedro Alves <palves@redhat.com>
11428
11429 * thread-db.c: Include "nat/linux-procfs.h".
11430 (thread_db_init): Skip listing new threads if the kernel supports
11431 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11432
11433 2015-02-20 Pedro Alves <palves@redhat.com>
11434
11435 * linux-low.c (status_pending_p_callback): Use ptid_match.
11436
11437 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11438
11439 PR breakpoints/16812
11440 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11441 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11442 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11443
11444 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11445
11446 PR breakpoints/15956
11447 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11448
11449 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11450
11451 * linux-low.c (linux_low_btrace_conf): Print size.
11452 * server.c (handle_btrace_conf_general_set): New.
11453 (hanle_general_set): Call handle_btrace_conf_general_set.
11454 (handle_query): Report Qbtrace-conf:bts:size as supported.
11455
11456 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11457
11458 * linux-low.c (linux_low_enable_btrace): Update parameters.
11459 (linux_low_btrace_conf): New.
11460 (linux_target_ops)<to_btrace_conf>: Initialize.
11461 * server.c (current_btrace_conf): New.
11462 (handle_btrace_enable): Rename to ...
11463 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11464 to target_enable_btrace. Update comment. Update users.
11465 (handle_qxfer_btrace_conf): New.
11466 (qxfer_packets): Add btrace-conf entry.
11467 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11468 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11469 (target_ops)<read_btrace_conf>: New.
11470 (target_enable_btrace): Update parameters.
11471 (target_read_btrace_conf): New.
11472
11473 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11474
11475 * server.c (handle_btrace_general_set): Remove call to
11476 target_supports_btrace.
11477 (supported_btrace_packets): New.
11478 (handle_query): Call supported_btrace_packets.
11479 * target.h: include btrace-common.h.
11480 (btrace_target_info): Removed.
11481 (supports_btrace, target_supports_btrace): Update parameters.
11482
11483 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11484
11485 * Makefile.in (SFILES): Add common/btrace-common.c.
11486 (OBS): Add common/btrace-common.o.
11487 (btrace-common.o): Add build rules.
11488 * linux-low: Include btrace-common.h.
11489 (linux_low_read_btrace): Use struct btrace_data. Call
11490 btrace_data_init and btrace_data_fini.
11491
11492 2015-02-06 Pedro Alves <palves@redhat.com>
11493
11494 * thread-db.c (find_new_threads_callback): Add debug output.
11495
11496 2015-02-04 Pedro Alves <palves@redhat.com>
11497
11498 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11499 (resume_stopped_resumed_lwps): New function.
11500 (linux_wait_for_event_filtered): Use it.
11501
11502 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11503
11504 * Makefile.in (SFILES): Add linux-personality.c.
11505 (linux-personality.o): New rule.
11506 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11507 list of objects to be built.
11508 * linux-low.c: Include nat/linux-personality.h.
11509 (linux_create_inferior): Remove code to disable address space
11510 randomization (moved to ../nat/linux-personality.c). Create
11511 cleanup to disable address space randomization.
11512
11513 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11514
11515 * Makefile.in (posix-strerror.o): New rule.
11516 (mingw-strerror.o): Likewise.
11517 * configure: Regenerated.
11518 * configure.ac: Source file ../common/common.host. Initialize new
11519 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11520
11521 2015-01-14 Yao Qi <yao@codesourcery.com>
11522
11523 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11524 (ppc-linux.o): New rule.
11525 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11526 * configure.ac: AC_CHECK_FUNCS(getauxval).
11527 * config.in: Re-generated.
11528 * configure: Re-generated.
11529 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11530 ppc64_64bit_inferior_p
11531
11532 2015-01-14 Yao Qi <yao@codesourcery.com>
11533
11534 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11535 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11536 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11537 (PT_ORIG_R3, PT_TRAP): Likewise.
11538 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11539 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11540 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11541
11542 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11543
11544 * i387-fp.c (i387_cache_to_xsave): In look over
11545 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11546 zmmh_low_space field by use of zmmh_high_space.
11547
11548 2015-01-09 Pedro Alves <palves@redhat.com>
11549
11550 * linux-low.c (step_over_bkpt): Move higher up in the file.
11551 (handle_extended_wait): Don't store the stop_pc here.
11552 (get_stop_pc): Adjust comments and rename to ...
11553 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11554 stopped for a software breakpoint or hardware breakpoint.
11555 (thread_still_has_status_pending_p): New function.
11556 (status_pending_p_callback): Use
11557 thread_still_has_status_pending_p. If the event is no longer
11558 interesting, resume the LWP.
11559 (handle_tracepoints): Add assert.
11560 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11561 (wstatus_maybe_breakpoint): New function.
11562 (cancel_breakpoint): Delete function.
11563 (check_stopped_by_watchpoint): New function, factored out from
11564 linux_low_filter_event.
11565 (lp_status_maybe_breakpoint): Delete function.
11566 (linux_low_filter_event): Remove filter_ptid argument.
11567 Leave thread group exits pending here. Store the LWP's stop PC.
11568 Always leave events pending.
11569 (linux_wait_for_event_filtered): Pull all events out of the
11570 kernel, and leave them all pending.
11571 (count_events_callback, select_event_lwp_callback): Consider all
11572 events.
11573 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11574 (select_event_lwp): Only give preference to the stepping LWP in
11575 all-stop mode. Adjust comments.
11576 (ignore_event): New function.
11577 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11578 references to cancel_breakpoints. Adjust to renames. Also give
11579 equal priority to all LWPs that have had events in non-stop mode.
11580 If reporting a software breakpoint event, unadjust the LWP's PC.
11581 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11582 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11583 Adjust.
11584 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11585 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11586 (linux_stopped_by_watchpoint): Adjust.
11587 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11588 * linux-low.h (enum lwp_stop_reason): New.
11589 (struct lwp_info) <stop_pc>: Adjust comment.
11590 <stopped_by_watchpoint>: Delete field.
11591 <stop_reason>: New field.
11592 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11593 * mem-break.c (software_breakpoint_inserted_here)
11594 (hardware_breakpoint_inserted_here): New function.
11595 * mem-break.h (software_breakpoint_inserted_here)
11596 (hardware_breakpoint_inserted_here): Declare.
11597 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11598 (cancel_breakpoints): Delete.
11599 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11600 (upload_fast_traceframes): Remove references to
11601 cancel_breakpoints.
11602
11603 2015-01-09 Pedro Alves <palves@redhat.com>
11604
11605 * thread-db.c (find_new_threads_callback): Ignore thread if the
11606 kernel thread ID is -1.
11607
11608 2015-01-09 Pedro Alves <palves@redhat.com>
11609
11610 * linux-low.c (linux_attach_fail_reason_string): Move to
11611 nat/linux-ptrace.c, and rename.
11612 (linux_attach_lwp): Update comment.
11613 (attach_proc_task_lwp_callback): New function.
11614 (linux_attach): Adjust to rename and use
11615 linux_proc_attach_tgid_threads.
11616 (linux_attach_fail_reason_string): Delete declaration.
11617
11618 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11619
11620 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11621 * server.c (gdbserver_version): Likewise.
11622
11623 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11624
11625 * remote-utils.c: Include ctype.h.
11626 (input_interrupt): Explicitly handle the case when the char
11627 received is the NUL byte. Improve the printing of non-ASCII
11628 characters.
11629
11630 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11631
11632 * linux-low.c (linux_low_filter_event): Update call to
11633 linux_enable_event_reporting following the addition of
11634 a new parameter to that function.
11635
11636 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11637
11638 PR server/17457
11639 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11640 (AARCH64_FPCR_REGNO): Likewise.
11641 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11642 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11643 (aarch64_store_fpregset): Likewise.
11644
11645 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11646
11647 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11648 Remove FIXME comment about assumption about N.
11649
11650 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11651
11652 * configure.ac: If large-file support is disabled in GDBserver,
11653 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11654 * configure: Regenerate.
11655
11656 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11657
11658 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11659 warning upon ENODATA from ptrace.
11660 * linux-s390-low.c (s390_store_tdb): New.
11661 (s390_regsets): Add regset for NT_S390_TDB.
11662
11663 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11664
11665 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11666 without a fill_function.
11667 * linux-s390-low.c (s390_fill_last_break): Remove.
11668 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11669 (s390_arch_setup): Use regset's size instead of fill_function for
11670 loop end condition.
11671
11672 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11673
11674 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11675 the regset's store function when ptrace returned an error.
11676 * regcache.c (get_thread_regcache): Invalidate register cache
11677 before fetching inferior's registers.
11678
11679 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11680
11681 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11682 while-loop as for-loop.
11683 (regsets_store_inferior_registers): Likewise.
11684
11685 2014-11-28 Yao Qi <yao@codesourcery.com>
11686
11687 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11688 * config.in, configure: Re-generate.
11689 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11690 is defined.
11691
11692 2014-11-21 Yao Qi <yao@codesourcery.com>
11693
11694 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11695 (AC_CHECK_HEADERS): Remove malloc.h.
11696 * configure: Re-generated.
11697 * config.in: Re-generated.
11698 * server.h: Don't include alloca.h and malloc.h.
11699 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11700 Don't include malloc.h.
11701
11702 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11703
11704 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11705 corresponding ERRNO check in same block.
11706
11707 2014-11-12 Pedro Alves <palves@redhat.com>
11708
11709 * server.c (cont_thread): Update comment.
11710 (start_inferior, attach_inferior): No longer clear cont_thread.
11711 (handle_v_cont): No longer set cont_thread.
11712 (captured_main): Clear cont_thread each time a GDB connects.
11713
11714 2014-11-12 Pedro Alves <palves@redhat.com>
11715
11716 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11717 thread, and don't resume all threads if the Hc thread has exited.
11718
11719 2014-11-12 Pedro Alves <palves@redhat.com>
11720
11721 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11722 the process group instead of to a specific LWP.
11723
11724 2014-10-15 Pedro Alves <palves@redhat.com>
11725
11726 PR server/17487
11727 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11728 parameter.
11729 (arm_set_thread_context): Delete.
11730 (the_low_target): Adjust.
11731 * win32-i386-low.c (debug_registers_changed)
11732 (debug_registers_used): Delete.
11733 (update_debug_registers_callback): New function.
11734 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11735 needing to update their debug registers.
11736 (win32_get_current_dr): New function.
11737 (x86_dr_low_get_addr, x86_dr_low_get_control)
11738 (x86_dr_low_get_status): Fetch the debug register from the thread
11739 record's context.
11740 (i386_initial_stuff): Adjust.
11741 (i386_get_thread_context): Remove current_event parameter. Don't
11742 clear debug_registers_changed nor copy DR values to
11743 debug_reg_state.
11744 (i386_set_thread_context): Delete.
11745 (i386_prepare_to_resume): New function.
11746 (i386_thread_added): Mark the thread as needing to update irs
11747 debug registers.
11748 (the_low_target): Remove i386_set_thread_context and install
11749 i386_prepare_to_resume.
11750 * win32-low.c (win32_get_thread_context): Adjust.
11751 (win32_set_thread_context): Use SetThreadContext
11752 directly.
11753 (win32_prepare_to_resume): New function.
11754 (win32_require_context): New function, factored out from ...
11755 (thread_rec): ... this.
11756 (continue_one_thread): Call win32_prepare_to_resume on each thread
11757 we're about to continue.
11758 (win32_resume): Call win32_prepare_to_resume on the event thread.
11759 * win32-low.h (struct win32_thread_info)
11760 <debug_registers_changed>: New field.
11761 (struct win32_target_ops): Change prototype of set_thread_context,
11762 delete set_thread_context and add prepare_to_resume.
11763 (win32_require_context): New declaration.
11764
11765 2014-10-08 Gary Benson <gbenson@redhat.com>
11766
11767 * server.h: Do not include common-exceptions.h.
11768
11769 2014-10-08 Gary Benson <gbenson@redhat.com>
11770
11771 * server.h: Do not include cleanups.h.
11772
11773 2014-09-30 James Hogan <james.hogan@imgtec.com>
11774
11775 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11776 mips64-dsp-linux.c.
11777
11778 2014-09-23 Yao Qi <yao@codesourcery.com>
11779
11780 * linux-low.c (lp_status_maybe_breakpoint): New function.
11781 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11782 (count_events_callback): Likewise.
11783 (select_event_lwp_callback): Likewise.
11784 (cancel_breakpoints_callback): Likewise.
11785
11786 2014-09-19 Don Breazeal <donb@codesourcery.com>
11787
11788 * linux-low.c (handle_extended_wait): Call
11789 linux_ptrace_get_extended_event.
11790 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11791 linux_is_extended_waitstatus.
11792
11793 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11794
11795 * Makefile.in (CPPFLAGS): Define.
11796 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11797 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11798
11799 2014-09-16 Gary Benson <gbenson@redhat.com>
11800
11801 * inferiors.h (current_inferior): Renamed as...
11802 (current_thread): New variable. All uses updated.
11803 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11804 (maybe_move_out_of_jump_pad): Likewise.
11805 (cancel_breakpoint): Likewise.
11806 (linux_low_filter_event): Likewise.
11807 (wait_for_sigstop): Likewise.
11808 (linux_resume_one_lwp): Likewise.
11809 (need_step_over_p): Likewise.
11810 (start_step_over): Likewise.
11811 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11812 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11813 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11814 and save_inferior as saved_thread.
11815 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11816 saved_thread.
11817 (regcache_invalidate_thread): Likewise.
11818 * remote-utils.c (prepare_resume_reply): Likewise.
11819 * thread-db.c (thread_db_get_tls_address): Likewise.
11820 (disable_thread_event_reporting): Likewise.
11821 (remove_thread_event_breakpoints): Likewise.
11822 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11823 as saved_thread.
11824 * target.h (set_desired_inferior): Renamed as...
11825 (set_desired_thread): New declaration. All uses updated.
11826 * server.c (myresume): Updated comment to reference thread instead
11827 of inferior.
11828 (handle_serial_event): Likewise.
11829 (handle_target_event): Likewise.
11830
11831 2014-09-12 Tom Tromey <tromey@redhat.com>
11832 Gary Benson <gbenson@redhat.com>
11833
11834 * regcache.h: Include common-regcache.h.
11835 (regcache_read_pc): Don't declare.
11836 * regcache.c (get_thread_regcache_for_ptid): New function.
11837
11838 2014-09-11 Tom Tromey <tromey@redhat.com>
11839 Gary Benson <gbenson@redhat.com>
11840
11841 * symbol.c: New file.
11842 * Makefile.in (SFILES): Add symbol.c.
11843 (OBS): Add symbol.o.
11844
11845 2014-09-11 Gary Benson <gbenson@redhat.com>
11846
11847 * target.c (target_stop_ptid, target_continue_ptid): New
11848 functions.
11849
11850 2014-09-11 Tom Tromey <tromey@redhat.com>
11851 Gary Benson <gbenson@redhat.com>
11852
11853 * target.h: Include target/target.h.
11854 * target.c (target_read_memory, target_read_uint32)
11855 (target_write_memory): New functions.
11856
11857 2014-09-11 Gary Benson <gbenson@redhat.com>
11858
11859 * server.h (debug_hw_points): Don't declare.
11860 * server.c (debug_hw_points): Don't define. Replace all uses
11861 with show_debug_regs.
11862 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11863 all uses with show_debug_regs.
11864
11865 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11866
11867 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11868 endianness into account.
11869 (ppc_supply_ptrace_register): Likewise.
11870
11871 2014-09-03 James Hogan <james.hogan@imgtec.com>
11872
11873 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11874 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11875
11876 2014-09-03 Gary Benson <gbenson@redhat.com>
11877
11878 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11879 ALL_DEBUG_ADDRESS_REGISTERS.
11880
11881 2014-09-02 Gary Benson <gbenson@redhat.com>
11882
11883 * i386-low.h: Renamed as...
11884 * x86-low.h: New file. All type, function and variable name
11885 prefixes changed from "i386_" to "x86_". All references updated.
11886 * i386-low.c: Renamed as...
11887 * x86-low.c: New file. All type, function and variable name
11888 prefixes changed from "i386_" to "x86_". All references updated.
11889
11890 2014-09-02 Gary Benson <gbenson@redhat.com>
11891
11892 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11893 (x86_linux_new_thread): Likewise.
11894
11895 2014-08-29 Gary Benson <gbenson@redhat.com>
11896
11897 * server.h (setjmp.h): Do not include.
11898 (toplevel): Do not declare.
11899 (common-exceptions.h): Include.
11900 (cleanups.h): Likewise.
11901 * server.c (toplevel): Do not define.
11902 (exit_code): New static global.
11903 (detach_or_kill_for_exit_cleanup): New function.
11904 (main): New function. Original main renamed to...
11905 (captured_main): New function.
11906 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11907
11908 2014-08-29 Gary Benson <gbenson@redhat.com>
11909
11910 * Makefile.in (SFILES): Add common/common-exceptions.c.
11911 (OBS): Add common-exceptions.o.
11912 (common-exceptions.o): New rule.
11913 * utils.c (prepare_to_throw_exception): New function.
11914
11915 2014-08-29 Gary Benson <gbenson@redhat.com>
11916
11917 * config.in: Regenerate.
11918 * configure: Likewise.
11919
11920 2014-08-29 Gary Benson <gbenson@redhat.com>
11921
11922 * Makefile.in (SFILES): Add common/cleanups.c.
11923 (OBS): cleanups.o.
11924 (cleanups.o): New rule.
11925
11926 2014-08-29 Gary Benson <gbenson@redhat.com>
11927
11928 * utils.c (internal_vwarning): New function.
11929
11930 2014-08-28 Gary Benson <gbenson@redhat.com>
11931
11932 * utils.h (fatal): Remove declaration.
11933 * utils.c (fatal): Remove function.
11934
11935 2014-08-28 Gary Benson <gbenson@redhat.com>
11936
11937 * tracepoint.c (gdb_agent_init): Replace fatal with
11938 perror_with_name.
11939 (initialize_tracepoint): Likewise.
11940
11941 2014-08-28 Gary Benson <gbenson@redhat.com>
11942
11943 * remote-utils.c (remote_prepare): Replace fatal with error.
11944
11945 2014-08-28 Gary Benson <gbenson@redhat.com>
11946
11947 * linux-low.c (linux_async): Replace fatal with warning.
11948 Tidy up and return.
11949 (linux_start_non_stop): Return -1 if linux_async failed.
11950
11951 2014-08-28 Gary Benson <gbenson@redhat.com>
11952
11953 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11954 gdb_assert.
11955 (i386_dr_low_get_addr): Remove vague comment.
11956 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11957 gdb_assert.
11958
11959 2014-08-28 Gary Benson <gbenson@redhat.com>
11960
11961 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11962 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11963 internal_error.
11964 (linux_resume_one_lwp): Likewise.
11965 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11966 gdb_assert.
11967 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11968 with internal_error.
11969 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11970 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11971 (find_register_by_name): Replace fatal with internal_error.
11972 (find_regno): Likewise.
11973 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11974 * thread-db.c (thread_db_create_event): Likewise.
11975 (thread_db_load_search): Likewise.
11976 (try_thread_db_load_1): Likewise.
11977 * tracepoint.c (get_jump_space_head): Replace fatal with
11978 internal_error.
11979 (claim_trampoline_space): Likewise.
11980 (have_fast_tracepoint_trampoline_buffer): Likewise.
11981 (cmd_qtstart): Likewise.
11982 (stop_tracing): Likewise.
11983 (fast_tracepoint_collecting): Likewise.
11984 (target_malloc): Likewise.
11985 (download_tracepoint): Likewise.
11986 (download_trace_state_variables): Replace check with gdb_assert.
11987 (upload_fast_traceframes): Replace fatal with internal_error.
11988
11989 2014-08-19 Tom Tromey <tromey@redhat.com>
11990 Gary Benson <gbenson@redhat.com>
11991
11992 * Makefile.in (SFILES): Add common/common-debug.c.
11993 (OBS): Add common-debug.o.
11994 (common-debug.o): New rule.
11995 * debug.h (debug_printf): Don't declare.
11996 * debug.c (debug_printf): Renamed and rewritten as...
11997 (debug_vprintf): New function.
11998
11999 2014-08-19 Gary Benson <gbenson@redhat.com>
12000
12001 * utils.h: Do not include print-utils.h.
12002
12003 2014-08-19 Tom Tromey <tromey@redhat.com>
12004 Gary Benson <gbenson@redhat.com>
12005
12006 * server.h: Add static assertion.
12007 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12008
12009 2014-08-19 Tom Tromey <tromey@redhat.com>
12010 Gary Benson <gbenson@redhat.com>
12011
12012 * Makefile.in (SFILES): Add common/errors.c.
12013 (OBS): Add errors.o.
12014 (IPA_OBS): Add errors-ipa.o.
12015 (errors.o): New rule.
12016 (errors-ipa.o): Likewise.
12017 * utils.h (perror_with_name, error, warning): Don't declare.
12018 * utils.c (warning): Renamed and rewritten as...
12019 (vwarning): New function.
12020 (error): Renamed and rewritten as...
12021 (verror): New function.
12022 (internal_error): Renamed and rewritten as...
12023 (internal_verror): New function.
12024
12025 2014-08-07 Gary Benson <gbenson@redhat.com>
12026
12027 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12028 * configure: Regenerate.
12029 * config.in: Likewise.
12030 * server.h: Do not include errno.h.
12031 * event-loop.c: Likewise.
12032 * hostio-errno.c: Likewise.
12033 * linux-low.c: Likewise.
12034 * remote-utils.c: Likewise.
12035 * spu-low.c: Likewise.
12036 * utils.c: Likewise.
12037 * gdbreplay.c: Unconditionally include errno.h.
12038
12039 2014-08-07 Gary Benson <gbenson@redhat.com>
12040
12041 * server.h: Do not include string.h.
12042 * event-loop.c: Likewise.
12043 * linux-low.c: Likewise.
12044 * regcache.c: Likewise.
12045 * remote-utils.c: Likewise.
12046 * spu-low.c: Likewise.
12047 * utils.c: Likewise.
12048
12049 2014-08-07 Gary Benson <gbenson@redhat.com>
12050
12051 * server.h: Do not include gdb_assert.h.
12052
12053 2014-08-07 Gary Benson <gbenson@redhat.com>
12054
12055 * server.h: Do not include common-utils.h.
12056
12057 2014-08-07 Gary Benson <gbenson@redhat.com>
12058
12059 * server.h: Do not include ptid.h.
12060 * notif.h: Likewise.
12061
12062 2014-08-07 Gary Benson <gbenson@redhat.com>
12063
12064 * server.h: Do not include gdb_locale.h.
12065
12066 2014-08-07 Gary Benson <gbenson@redhat.com>
12067
12068 * server.h: Do not include gdb/signals.h.
12069 * win32-low.c: Likewise.
12070
12071 2014-08-07 Gary Benson <gbenson@redhat.com>
12072
12073 * server.h: Do not include pathmax.h.
12074
12075 2014-08-07 Gary Benson <gbenson@redhat.com>
12076
12077 * server.h: Do not include libiberty.h.
12078 * linux-bfin-low.c: Likewise.
12079
12080 2014-08-07 Gary Benson <gbenson@redhat.com>
12081
12082 * server.h: Do not include ansidecl.h.
12083
12084 2014-08-07 Gary Benson <gbenson@redhat.com>
12085
12086 * linux-x86-low.c: Do not include stddef.h.
12087 * lynx-ppc-low.c: Likewise.
12088 * tracepoint.c: Likewise.
12089
12090 2014-08-07 Gary Benson <gbenson@redhat.com>
12091
12092 * server.h: Do not include stdarg.h.
12093 * nto-low.c: Likewise.
12094
12095 2014-08-07 Gary Benson <gbenson@redhat.com>
12096
12097 * server.h: Do not include stdlib.h.
12098 * inferiors.c: Likewise.
12099 * linux-low.c: Likewise.
12100 * regcache.c: Likewise.
12101 * spu-low.c: Likewise.
12102 * tracepoint.c: Likewise.
12103 * utils.c: Likewise.
12104
12105 2014-08-07 Gary Benson <gbenson@redhat.com>
12106
12107 * server.h: Do not include stdio.h.
12108 * linux-low.c: Likewise.
12109 * remote-utils.c: Likewise.
12110 * spu-low.c: Likewise.
12111 * utils.c: Likewise.
12112 * wincecompat.c: Likewise.
12113
12114 2014-08-06 Gary Benson <gbenson@redhat.com>
12115
12116 * regcache.c (init_register_cache): Move conditionals inside if.
12117
12118 2014-08-06 Gary Benson <gbenson@redhat.com>
12119
12120 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12121
12122 2014-07-31 Gary Benson <gbenson@redhat.com>
12123
12124 * ax.h: Do not include server.h.
12125 * gdbthread.h: Likewise.
12126 * lynx-low.h: Likewise.
12127 * notif.h: Likewise.
12128
12129 2014-07-30 Gary Benson <gbenson@redhat.com>
12130
12131 * server.h: Include common-defs.h.
12132 Do not include config.h or build-gnulib-gdbserver/config.h.
12133
12134 2014-07-30 Gary Benson <gbenson@redhat.com>
12135
12136 * hostio-errno.c: Move server.h to top of includes list.
12137 * inferiors.c: Likewise.
12138 * linux-x86-low.c: Likewise.
12139 * notif.c: Include server.h.
12140
12141 2014-07-24 Tom Tromey <tromey@redhat.com>
12142 Gary Benson <gbenson@redhat.com>
12143
12144 * server.h (CORE_ADDR): Now unsigned.
12145
12146 2014-07-16 Pedro Alves <palves@redhat.com>
12147
12148 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12149
12150 2014-07-15 Pedro Alves <palves@redhat.com>
12151
12152 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12153 copy.
12154
12155 2014-07-11 Pedro Alves <palves@redhat.com>
12156
12157 * linux-low.c (kill_wait_lwp): New function, based on
12158 kill_one_lwp_callback, but use my_waitpid directly.
12159 (kill_one_lwp_callback, linux_kill): Use it.
12160
12161 2014-06-23 Pedro Alves <palves@redhat.com>
12162
12163 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12164 before setting DR0..DR3.
12165
12166 2014-06-20 Gary Benson <gbenson@redhat.com>
12167
12168 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12169 * configure: Regenerated.
12170 * config.in: Likewise.
12171
12172 2014-06-20 Gary Benson <gbenson@redhat.com>
12173
12174 * Makefile.in (SFILES): Update locations for files moved
12175 from common to nat.
12176 (object file files): Reordered.
12177
12178 2014-06-20 Gary Benson <gbenson@redhat.com>
12179
12180 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12181 (i386_dr_low_set_addr): Likewise.
12182 (i386_dr_low_get_addr): Likewise.
12183 (i386_dr_low_can_set_control): Likewise.
12184 (i386_dr_low_set_control): Likewise.
12185 (i386_dr_low_get_control): Likewise.
12186 (i386_dr_low_get_status): Likewise.
12187 (i386_get_debug_register_length): Likewise.
12188 * linux-x86-low.c (i386_dr_low_set_addr):
12189 Changed signature. Made static.
12190 (i386_dr_low_get_addr): Likewise.
12191 (i386_dr_low_set_control): Likewise.
12192 (i386_dr_low_get_control): Likewise.
12193 (i386_dr_low_get_status): Likewise.
12194 (i386_dr_low): New global variable.
12195 * win32-i386-low.c (i386_dr_low_set_addr):
12196 Changed signature. Made static.
12197 (i386_dr_low_get_addr): Likewise.
12198 (i386_dr_low_set_control): Likewise.
12199 (i386_dr_low_get_control): Likewise.
12200 (i386_dr_low_get_status): Likewise.
12201 (i386_dr_low): New global variable.
12202
12203 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12204
12205 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12206 * Makefile.in (AR, AR_FLAGS): Define.
12207 * configure: Regenerate.
12208
12209 2014-06-19 Gary Benson <gbenson@redhat.com>
12210
12211 * Makefile.in (i386-dregs.o): New rule.
12212 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12213 * i386-low.c (target.h): Remove include.
12214 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12215 (DR_CONTROL_SHIFT): Likewise.
12216 (DR_CONTROL_SIZE): Likewise.
12217 (DR_RW_EXECUTE): Likewise.
12218 (DR_RW_WRITE): Likewise.
12219 (DR_RW_READ): Likewise.
12220 (DR_RW_IORW): Likewise.
12221 (DR_LEN_1): Likewise.
12222 (DR_LEN_2): Likewise.
12223 (DR_LEN_4): Likewise.
12224 (DR_LEN_8): Likewise.
12225 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12226 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12227 (DR_ENABLE_SIZE): Likewise.
12228 (DR_LOCAL_SLOWDOWN): Likewise.
12229 (DR_GLOBAL_SLOWDOWN): Likewise.
12230 (DR_CONTROL_RESERVED): Likewise.
12231 (I386_DR_CONTROL_MASK): Likewise.
12232 (I386_DR_VACANT): Likewise.
12233 (I386_DR_LOCAL_ENABLE): Likewise.
12234 (I386_DR_GLOBAL_ENABLE): Likewise.
12235 (I386_DR_DISABLE): Likewise.
12236 (I386_DR_SET_RW_LEN): Likewise.
12237 (I386_DR_GET_RW_LEN): Likewise.
12238 (I386_DR_WATCH_HIT): Likewise.
12239 (i386_wp_op_t): Likewise.
12240 (i386_show_dr): Likewise.
12241 (i386_length_and_rw_bits): Likewise.
12242 (i386_insert_aligned_watchpoint): Likewise.
12243 (i386_remove_aligned_watchpoint): Likewise.
12244 (i386_handle_nonaligned_watchpoint): Likewise.
12245 i386_update_inferior_debug_regs(): Likewise.
12246 (i386_dr_insert_watchpoint): Likewise.
12247 (i386_dr_remove_watchpoint): Likewise.
12248 (i386_dr_region_ok_for_watchpoint): Likewise.
12249 (i386_dr_stopped_data_address): Likewise.
12250 (i386_dr_stopped_by_watchpoint): Likewise.
12251
12252 2014-06-19 Gary Benson <gbenson@redhat.com>
12253
12254 * i386-low.c (i386_dr_show): Renamed to
12255 i386_show_dr and made static. All uses updated.
12256 (i386_dr_length_and_rw_bits): Renamed to
12257 i386_length_and_rw_bits and made static.
12258 All uses updated.
12259 (i386_dr_insert_aligned_watchpoint): Renamed to
12260 i386_insert_aligned_watchpoint and made static.
12261 All uses updated.
12262 (i386_dr_remove_aligned_watchpoint): Renamed to
12263 i386_remove_aligned_watchpoint and made static.
12264 All uses updated.
12265 (i386_dr_update_inferior_debug_regs): Renamed to
12266 i386_update_inferior_debug_regs and made static.
12267 All uses updated.
12268
12269 2014-06-18 Gary Benson <gbenson@redhat.com>
12270
12271 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12272 (i386_dr_low_can_set_control): Likewise.
12273 (i386_get_debug_register_length): Likewise.
12274 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12275 (i386_dr_low_can_set_control): Likewise.
12276 (i386_get_debug_register_length): Likewise.
12277
12278 2014-06-17 Gary Benson <gbenson@redhat.com>
12279
12280 * i386-low.h (i386-dregs.h): New include.
12281 (DR_FIRSTADDR): Now in i386-dregs.h.
12282 (DR_LASTADDR): Likewise.
12283 (DR_NADDR): Likewise.
12284 (DR_STATUS): Likewise.
12285 (DR_CONTROL): Likewise.
12286 (i386_debug_reg_state): Likewise.
12287 (i386_dr_insert_watchpoint): Likewise.
12288 (i386_dr_remove_watchpoint): Likewise.
12289 (i386_dr_region_ok_for_watchpoint): Likewise.
12290 (i386_dr_stopped_data_address): Likewise.
12291 (i386_dr_stopped_by_watchpoint): Likewise.
12292 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12293
12294 2014-06-18 Gary Benson <gbenson@redhat.com>
12295
12296 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12297 i386_dr_insert_watchpoint.
12298 (i386_low_remove_watchpoint): Renamed to
12299 i386_dr_remove_watchpoint.
12300 (i386_low_region_ok_for_watchpoint): Renamed to
12301 i386_dr_region_ok_for_watchpoint.
12302 (i386_low_stopped_data_address): Renamed to
12303 i386_dr_stopped_data_address.
12304 (i386_low_stopped_by_watchpoint): Renamed to
12305 i386_dr_stopped_by_watchpoint.
12306 * i386-low.c (i386_show_dr): Renamed to
12307 i386_dr_show and made nonstatic. All uses updated.
12308 (i386_length_and_rw_bits): Renamed to
12309 i386_dr_length_and_rw_bits and made nonstatic.
12310 All uses updated.
12311 (i386_insert_aligned_watchpoint): Renamed to
12312 i386_dr_insert_aligned_watchpoint and made nonstatic.
12313 All uses updated.
12314 (i386_remove_aligned_watchpoint): Renamed to
12315 i386_dr_remove_aligned_watchpoint and made nonstatic.
12316 All uses updated.
12317 (i386_update_inferior_debug_regs): Renamed to
12318 i386_dr_update_inferior_debug_regs and made nonstatic.
12319 All uses updated.
12320 (i386_low_insert_watchpoint): Renamed to
12321 i386_dr_insert_watchpoint. All uses updated.
12322 (i386_low_remove_watchpoint): Renamed to
12323 i386_dr_remove_watchpoint. All uses updated.
12324 (i386_low_region_ok_for_watchpoint): Renamed to
12325 i386_dr_region_ok_for_watchpoint. All uses updated.
12326 (i386_low_stopped_data_address): Renamed to
12327 i386_dr_stopped_data_address. All uses updated.
12328 (i386_low_stopped_by_watchpoint): Renamed to
12329 i386_dr_stopped_by_watchpoint. All uses updated.
12330
12331 2014-06-18 Gary Benson <gbenson@redhat.com>
12332
12333 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12334 (i386_dr_low_can_set_control): Likewise.
12335 (i386_insert_aligned_watchpoint): New check.
12336
12337 2014-06-18 Gary Benson <gbenson@redhat.com>
12338
12339 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12340 Renamed to state.
12341
12342 2014-06-18 Gary Benson <gbenson@redhat.com>
12343
12344 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12345 instead of fatal and error.
12346 (i386_handle_nonaligned_watchpoint): Likewise.
12347
12348 2014-06-18 Gary Benson <gbenson@redhat.com>
12349
12350 * i386-low.c (i386_get_debug_register_length): New macro.
12351 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12352 (i386_show_dr): Use debug_printf instead of fprintf. Use
12353 phex to format values.
12354
12355 2014-06-18 Gary Benson <gbenson@redhat.com>
12356
12357 * i386-low.h: Comment changes.
12358 * i386-low.c: Likewise.
12359
12360 2014-06-18 Gary Benson <gbenson@redhat.com>
12361
12362 * i386-low.c: Whitespace changes.
12363
12364 2014-06-12 Tom Tromey <tromey@redhat.com>
12365
12366 * utils.c (freeargv): Remove.
12367
12368 2014-06-12 Tom Tromey <tromey@redhat.com>
12369
12370 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12371 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12372 (parse_debug_format_options): Likewise.
12373 (gdbserver_usage): Likewise.
12374 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12375 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12376 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12377 against libiberty.
12378 ($(LIBGNU)): Depend on libiberty.
12379 (all-lib): Recurse into all subdirs.
12380 (install-only): Invoke "install" target in subdirs.
12381 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12382 targets.
12383 * configure: Rebuild.
12384 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12385 for vasprintf, vsnprintf, or gettimeofday.
12386 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12387 srv_tgtobj.
12388
12389 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12390
12391 * development.sh: Delete.
12392 * Makefile.in (config.status): Adjust dependency on development.sh.
12393 * configure.ac: Adjust development.sh source call.
12394 * configure: Regenerate.
12395
12396 2014-06-02 Pedro Alves <palves@redhat.com>
12397
12398 * ax.c (gdb_free_agent_expr): New function.
12399 * ax.h (gdb_free_agent_expr): New declaration.
12400 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12401 list.
12402 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12403 static.
12404 (clear_breakpoint_conditions_and_commands): New function.
12405 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12406 (clear_breakpoint_conditions_and_commands): New declaration.
12407
12408 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12409
12410 * linux-aarch64-low.c (asm/ptrace.h): Include.
12411
12412 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12413
12414 Fix TLS access for -static -pthread.
12415 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12416 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12417 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12418
12419 2014-05-20 Pedro Alves <palves@redhat.com>
12420
12421 * linux-aarch64-low.c (aarch64_insert_point)
12422 (aarch64_remove_point): No longer check whether the type is
12423 supported here. Adjust to new interface.
12424 (the_low_target): Install aarch64_supports_z_point_type as
12425 supports_z_point_type method.
12426 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12427 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12428 instead of a Z packet char. Adjust.
12429 (arm_supports_z_point_type): New function.
12430 (arm_insert_point, arm_remove_point): Adjust to new interface.
12431 (the_low_target): Install arm_supports_z_point_type.
12432 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12433 (cris_insert_point, cris_remove_point): Adjust to new interface.
12434 Don't check whether the type is supported here.
12435 (the_low_target): Install cris_supports_z_point_type.
12436 * linux-low.c (linux_supports_z_point_type): New function.
12437 (linux_insert_point, linux_remove_point): Adjust to new interface.
12438 * linux-low.h (struct linux_target_ops) <insert_point,
12439 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12440 raw_breakpoint pointer parameter.
12441 <supports_z_point_type>: New method.
12442 * linux-mips-low.c (mips_supports_z_point_type): New function.
12443 (mips_insert_point, mips_remove_point): Adjust to new interface.
12444 Use mips_supports_z_point_type.
12445 (the_low_target): Install mips_supports_z_point_type.
12446 * linux-ppc-low.c (the_low_target): Install NULL as
12447 supports_z_point_type method.
12448 * linux-s390-low.c (the_low_target): Install NULL as
12449 supports_z_point_type method.
12450 * linux-sparc-low.c (the_low_target): Install NULL as
12451 supports_z_point_type method.
12452 * linux-x86-low.c (x86_supports_z_point_type): New function.
12453 (x86_insert_point): Adjust to new insert_point interface. Use
12454 insert_memory_breakpoint. Adjust to new
12455 i386_low_insert_watchpoint interface.
12456 (x86_remove_point): Adjust to remove_point interface. Use
12457 remove_memory_breakpoint. Adjust to new
12458 i386_low_remove_watchpoint interface.
12459 (the_low_target): Install x86_supports_z_point_type.
12460 * lynx-low.c (lynx_target_ops): Install NULL as
12461 supports_z_point_type callback.
12462 * nto-low.c (nto_supports_z_point_type): New.
12463 (nto_insert_point, nto_remove_point): Adjust to new interface.
12464 (nto_target_ops): Install nto_supports_z_point_type.
12465 * mem-break.c: Adjust intro comment.
12466 (struct raw_breakpoint) <raw_type, size>: New fields.
12467 <inserted>: Update comment.
12468 <shlib_disabled>: Delete field.
12469 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12470 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12471 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12472 (raw_bkpt_type_to_target_hw_bp_type): New function.
12473 (find_enabled_raw_code_breakpoint_at): New function.
12474 (find_raw_breakpoint_at): New type and size parameters. Use them.
12475 (insert_memory_breakpoint): New function, based off
12476 set_raw_breakpoint_at.
12477 (remove_memory_breakpoint): New function.
12478 (set_raw_breakpoint_at): Reimplement.
12479 (set_breakpoint): New, based on set_breakpoint_at.
12480 (set_breakpoint_at): Reimplement.
12481 (delete_raw_breakpoint): Go through the_target->remove_point
12482 instead of assuming memory breakpoints.
12483 (find_gdb_breakpoint_at): Delete.
12484 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12485 (find_gdb_breakpoint): New function.
12486 (set_gdb_breakpoint_at): Delete.
12487 (z_type_supported): New function.
12488 (set_gdb_breakpoint_1): New function, loosely based off
12489 set_gdb_breakpoint_at.
12490 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12491 (delete_gdb_breakpoint_at): Delete.
12492 (delete_gdb_breakpoint_1): New function, loosely based off
12493 delete_gdb_breakpoint_at.
12494 (delete_gdb_breakpoint): New function.
12495 (clear_gdb_breakpoint_conditions): Rename to ...
12496 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12497 breakpoint.
12498 (add_condition_to_breakpoint): Make static.
12499 (add_breakpoint_condition): Take a struct breakpoint pointer
12500 instead of an address. Adjust.
12501 (gdb_condition_true_at_breakpoint): Rename to ...
12502 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12503 z_type parameter.
12504 (gdb_condition_true_at_breakpoint): Reimplement.
12505 (add_breakpoint_commands): Take a struct breakpoint pointer
12506 instead of an address. Adjust.
12507 (gdb_no_commands_at_breakpoint): Rename to ...
12508 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12509 parameter. Return true if no breakpoint was found. Change debug
12510 output.
12511 (gdb_no_commands_at_breakpoint): Reimplement.
12512 (run_breakpoint_commands): Rename to ...
12513 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12514 and change return type to boolean.
12515 (run_breakpoint_commands): New function.
12516 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12517 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12518 breakpoint. Go through the_target->remove_point instead of
12519 assuming memory breakpoint.
12520 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12521 software and hardware breakpoints.
12522 (reinsert_raw_breakpoint): Go through the_target->insert_point
12523 instead of assuming memory breakpoint.
12524 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12525 software and hardware breakpoints.
12526 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12527 Check both software and hardware breakpoints.
12528 (validate_inserted_breakpoint): Assert the breakpoint is a
12529 software breakpoint. Set the inserted flag to -1 instead of
12530 setting shlib_disabled.
12531 (delete_disabled_breakpoints): Adjust.
12532 (validate_breakpoints): Only validate software breakpoints.
12533 Adjust to inserted flag change.
12534 (check_mem_read, check_mem_write): Skip breakpoint types other
12535 than software breakpoints. Adjust to inserted flag change.
12536 * mem-break.h (enum raw_bkpt_type): New enum.
12537 (raw_breakpoint, struct process_info): Forward declare.
12538 (Z_packet_to_target_hw_bp_type): Delete declaration.
12539 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12540 (set_gdb_breakpoint, delete_gdb_breakpoint)
12541 (clear_breakpoint_conditions): New declarations.
12542 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12543 (breakpoint_inserted_here): Update comment.
12544 (add_breakpoint_condition, add_breakpoint_commands): Replace
12545 address parameter with a breakpoint pointer parameter.
12546 (gdb_breakpoint_here): Update comment.
12547 (delete_gdb_breakpoint_at): Delete.
12548 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12549 * server.c (process_point_options): Take a struct breakpoint
12550 pointer instead of an address. Adjust.
12551 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12552 delete_gdb_breakpoint.
12553 * spu-low.c (spu_target_ops): Install NULL as
12554 supports_z_point_type method.
12555 * target.h: Include mem-break.h.
12556 (struct target_ops) <prepare_to_access_memory>: Update comment.
12557 <supports_z_point_type>: New field.
12558 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12559 instead of a char. Also take a raw breakpoint pointer.
12560 * win32-arm-low.c (the_low_target): Install NULL as
12561 supports_z_point_type.
12562 * win32-i386-low.c (i386_supports_z_point_type): New function.
12563 (i386_insert_point, i386_remove_point): Adjust to new interface.
12564 (the_low_target): Install i386_supports_z_point_type.
12565 * win32-low.c (win32_supports_z_point_type): New function.
12566 (win32_insert_point, win32_remove_point): Adjust to new interface.
12567 (win32_target_ops): Install win32_supports_z_point_type.
12568 * win32-low.h (struct win32_target_ops):
12569 <supports_z_point_type>: New method.
12570 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12571 instead of a char. Also take a raw breakpoint pointer.
12572
12573 2014-05-20 Pedro Alves <palves@redhat.com>
12574
12575 * mem-break.h: Include break-common.h.
12576 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12577 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12578 (Z_packet_to_target_hw_bp_type): New declaration.
12579 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12580 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12581 (Z_PACKET_ACCESS_WP): Delete macros.
12582 (Z_packet_to_hw_type): Delete function.
12583 * i386-low.h: Don't include break-common.h here.
12584 (Z_packet_to_hw_type): Delete declaration.
12585 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12586 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12587 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12588 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12589 * linux-aarch64-low.c: Don't include break-common.h here.
12590 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12591 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12592 (Z_packet_to_target_hw_bp_type): Delete function.
12593 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12594 function.
12595 (mips_insert_point, mips_remove_point): Use
12596 Z_packet_to_target_hw_bp_type.
12597
12598 2014-05-20 Pedro Alves <palves@redhat.com>
12599
12600 * linux-aarch64-low.c: Include break-common.h.
12601 (enum target_point_type): Delete.
12602 (Z_packet_to_point_type): Rename to ...
12603 (Z_packet_to_target_hw_bp_type): ... this, and return a
12604 target_hw_bp_type instead.
12605 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12606 instead of an enum target_point_type.
12607 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12608 breakpoint type.
12609 (aarch64_dr_state_insert_one_point)
12610 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12611 (aarch64_handle_aligned_watchpoint)
12612 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12613 Take an enum target_hw_bp_type instead of an enum
12614 target_point_type.
12615 (aarch64_supports_z_point_type): New function.
12616 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12617 use Z_packet_to_target_hw_bp_type.
12618
12619 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12620
12621 * configure.ac: Only use -Werror by default when DEVELOPMENT
12622 is true.
12623 * configure: Regenerate.
12624
12625 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12626
12627 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12628 * linux-x86-low.c (X86_64_USER_REGS): New.
12629 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12630
12631 2014-04-28 Yao Qi <yao@codesourcery.com>
12632
12633 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12634 name.
12635
12636 2014-04-25 Pedro Alves <palves@redhat.com>
12637
12638 PR server/16255
12639 * linux-low.c (linux_attach_fail_reason_string): New function.
12640 (linux_attach_lwp): Delete.
12641 (linux_attach_lwp_1): Rename to ...
12642 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12643 argument. Remove "initial" parameter. Return int instead of
12644 void. Don't error or warn here.
12645 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12646 failure to attach to the tgid. Call warning when failing to
12647 attach to an lwp.
12648 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12649 argument. Remove "initial" parameter. Return int instead of
12650 void. Don't error or warn here.
12651 (linux_attach_fail_reason_string): New declaration.
12652 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12653 interface change. Use linux_attach_fail_reason_string.
12654
12655 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12656 Walfred Tedeschi <walfred.tedeschi@intel.com>
12657
12658 * Makefile.in: Added rules to handle new files
12659 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12660 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12661 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12662 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12663 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12664 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12665 x32-avx512-linux.o.
12666 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12667 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12668 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12669 i386/x32-avx512.xml.
12670 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12671 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12672 i386/x32-avx512-linux.xml.
12673 * i387-fp.c (num_avx512_k_registers): New constant for number
12674 of K registers.
12675 (num_avx512_zmmh_low_registers): New constant for number of
12676 lower ZMM registers (0-15).
12677 (num_avx512_zmmh_high_registers): New constant for number of
12678 higher ZMM registers (16-31).
12679 (num_avx512_ymmh_registers): New contant for number of higher
12680 YMM registers (ymm16-31 added by avx521 on x86_64).
12681 (num_avx512_xmm_registers): New constant for number of higher
12682 XMM registers (xmm16-31 added by AVX512 on x86_64).
12683 (struct i387_xsave): Add space for AVX512 registers.
12684 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12685 Add code to handle AVX512 registers.
12686 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12687 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12688 prototypei from generated file.
12689 (tdesc_amd64_avx512_linux): Likewise.
12690 (init_registers_x32_avx512_linux): Likewise.
12691 (tdesc_x32_avx512_linux): Likewise.
12692 (init_registers_i386_avx512_linux): Likewise.
12693 (tdesc_i386_avx512_linux): Likewise.
12694 (x86_64_regmap): Add AVX512 registers.
12695 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12696 mask.
12697 (initialize_low_arch): Add code to initialize AVX512 registers.
12698
12699 2014-04-23 Pedro Alves <palves@redhat.com>
12700
12701 * mem-break.c (find_gdb_breakpoint_at): Make static.
12702 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12703
12704 2014-04-23 Pedro Alves <palves@redhat.com>
12705
12706 * i386-low.c: Don't include break-common.h here.
12707 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12708 prototype to take target_hw_bp_type as argument instead of a Z
12709 packet char.
12710 * i386-low.h: Include break-common.h here.
12711 (Z_packet_to_hw_type): Declare.
12712 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12713 prototypes.
12714 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12715 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12716 (x86_remove_point): Convert the packet number to a
12717 target_hw_bp_type before calling i386_low_remove_watchpoint.
12718 * win32-i386-low.c (i386_insert_point): Convert the packet number
12719 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12720 (i386_remove_point): Convert the packet number to a
12721 target_hw_bp_type before calling i386_low_remove_watchpoint.
12722
12723 2014-04-23 Pedro Alves <palves@redhat.com>
12724
12725 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12726
12727 2014-04-10 Pedro Alves <palves@redhat.com>
12728
12729 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12730 Check if the condition or command is NULL before checking if the
12731 breakpoint is known. On success, return true.
12732 * mem-break.h (add_breakpoint_condition): Document return.
12733 (add_breakpoint_commands): Add describing comment.
12734 * server.c (skip_to_semicolon): New function.
12735 (process_point_options): Use it.
12736
12737 2014-04-09 Pedro Alves <palves@redhat.com>
12738
12739 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12740 to lwpid_of.
12741
12742 2014-02-27 Pedro Alves <palves@redhat.com>
12743
12744 PR 12702
12745 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12746 macros.
12747 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12748 output.
12749 (last_thread_of_process_p): Take a PID argument instead of a
12750 thread pointer.
12751 (linux_wait_for_lwp): Delete.
12752 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12753 functions.
12754 (linux_low_filter_event): New function, party factored out from
12755 linux_wait_for_event.
12756 (linux_wait_for_event): Rename to ...
12757 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12758 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12759 sigsuspend. Check for zombie leaders.
12760 (linux_wait_for_event): Reimplement as wrapper around
12761 linux_wait_for_event_filtered.
12762 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12763 a normal or signal exit is seen, it's the whole process exiting.
12764 (wait_for_sigstop): No longer a for_each_inferior callback.
12765 Rewrite on top of linux_wait_for_event_filtered.
12766 (stop_all_lwps): Call wait_for_sigstop directly.
12767 * server.c (resume, handle_target_event): Handle
12768 TARGET_WAITKIND_NO_RESUMED.
12769
12770 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12771
12772 * win32-low.c (psapi_get_dll_name,
12773 * win32_CreateToolhelp32Snapshot): Delete.
12774 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12775 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12776 Delete.
12777 (handle_load_dll): Add function description.
12778 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12779
12780 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12781
12782 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12783 Add comment.
12784 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12785 base address when calling win32_add_one_solib.
12786 (handle_load_dll): Delete local variable load_addr.
12787 Remove 0x1000 offset applied to DLL base address when calling
12788 win32_add_one_solib.
12789 (handle_unload_dll): Add comment.
12790
12791 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12792
12793 * win32-low.c (win32_add_all_dlls): Renames
12794 win32_ensure_ntdll_loaded. Rewrite function documentation.
12795 Adjust implementation to always load all DLLs.
12796 Add 0x1000 offset to DLL base address when calling
12797 win32_add_one_solib.
12798 (child_initialization_done): New static global.
12799 (do_initial_child_stuff): Set child_initialization_done to
12800 zero during child initialization, and 1 after. Replace call
12801 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12802 Add comment.
12803 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12804 (handle_unload_dll): Add function documentation.
12805 (get_child_debug_event): Ignore load and unload DLL events
12806 during child initialization.
12807
12808 2014-02-20 Doug Evans <dje@google.com>
12809
12810 Remove global all_lwps.
12811 * inferiors.h (ptid_of): Move here from linux-low.h.
12812 (pid_of, lwpid_of): Ditto.
12813 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12814 parameter is a struct thread_info * now.
12815 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12816 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12817 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12818 directly.
12819 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12820 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12821 * linux-arm-low.c (update_registers_callback): Update, "entry"
12822 parameter is a struct thread_info * now.
12823 Fetch lwpid from current_inferior directly.
12824 (arm_insert_point): Pass &all_threads to find_inferior instead of
12825 &all_lwps.
12826 (arm_remove_point): Ditto.
12827 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12828 (arm_prepare_to_resume): Fetch pid from thread.
12829 (arm_read_description): Fetch lwpid from current_inferior directly.
12830 * linux-low.c (all_lwps): Delete.
12831 (delete_lwp): Delete call to remove_inferior.
12832 (handle_extended_wait): Fetch lwpid from thread.
12833 (add_lwp): Don't set lwp->entry.id. Remove call to
12834 add_inferior_to_list.
12835 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12836 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12837 (kill_one_lwp_callback): Ditto.
12838 (linux_kill): Don't dereference NULL pointer.
12839 Fetch ptid,lwpid from thread.
12840 (get_detach_signal): Fetch ptid from thread.
12841 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12842 Simplify call to regcache_invalidate_thread.
12843 (delete_lwp_callback): Update, "entry" parameter is a
12844 struct thread_info * now. Fetch pid from thread.
12845 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12846 (status_pending_p_callback): Update, "entry" parameter is a
12847 struct thread_info * now. Fetch ptid from thread.
12848 (find_lwp_pid): Update, "entry" parameter is a
12849 struct thread_info * now.
12850 (linux_wait_for_lwp): Fetch pid from thread.
12851 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12852 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12853 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12854 (dequeue_one_deferred_signal): Ditto.
12855 (cancel_breakpoint): Fetch ptid from current_inferior.
12856 (linux_wait_for_event): Pass &all_threads to find_inferior,
12857 not &all_lwps. Fetch ptid, lwpid from thread.
12858 (count_events_callback): Update, "entry" parameter is a
12859 struct thread_info * now.
12860 (select_singlestep_lwp_callback): Ditto.
12861 (select_event_lwp_callback): Ditto.
12862 (cancel_breakpoints_callback): Ditto.
12863 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12864 not &all_lwps.
12865 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12866 (unsuspend_one_lwp): Update, "entry" parameter is a
12867 struct thread_info * now.
12868 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12869 not &all_lwps.
12870 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12871 Fetch lwpid from thread, not lwp.
12872 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12873 Pass &all_threads to find_inferior, not &all_lwps.
12874 (send_sigstop): Fetch lwpid from thread, not lwp.
12875 (send_sigstop_callback): Update, "entry" parameter is a
12876 struct thread_info * now.
12877 (suspend_and_send_sigstop_callback): Ditto.
12878 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12879 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12880 struct thread_info * now.
12881 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12882 from thread, lwp.
12883 (lwp_running): Update, "entry" parameter is a
12884 struct thread_info * now.
12885 (stop_all_lwps): Fetch ptid from thread.
12886 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12887 (linux_resume_one_lwp): Fetch lwpid from thread.
12888 (linux_set_resume_request): Update, "entry" parameter is a
12889 struct thread_info * now. Fetch pid, lwpid from thread.
12890 (resume_status_pending_p): Update, "entry" parameter is a
12891 struct thread_info * now.
12892 (need_step_over_p): Ditto. Fetch lwpid from thread.
12893 (start_step_over): Fetch lwpid from thread.
12894 (linux_resume_one_thread): Update, "entry" parameter is a
12895 struct thread_info * now. Fetch lwpid from thread.
12896 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12897 (proceed_one_lwp): Update, "entry" parameter is a
12898 struct thread_info * now. Fetch lwpid from thread.
12899 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12900 struct thread_info * now.
12901 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12902 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12903 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12904 directly.
12905 (regsets_store_inferior_registers): Ditto.
12906 (fetch_register, store_register): Ditto.
12907 (linux_read_memory, linux_write_memory): Ditto.
12908 (linux_request_interrupt): Ditto.
12909 (linux_read_auxv): Ditto.
12910 (linux_xfer_siginfo): Ditto.
12911 (linux_qxfer_spu): Ditto.
12912 (linux_qxfer_libraries_svr4): Ditto.
12913 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12914 moved to inferiors.h.
12915 (get_lwp): Delete.
12916 (get_thread_lwp): Update.
12917 (struct lwp_info): Delete member "entry". Simplify comment for
12918 member "thread".
12919 (all_lwps): Delete.
12920 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12921 current_inferior directly.
12922 (update_watch_registers_callback): Update, "entry" parameter is a
12923 struct thread_info * now. Fetch pid from thread.
12924 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12925 (mips_insert_point): Fetch lwpid from current_inferior.
12926 Pass &all_threads to find_inferior, not &all_lwps.
12927 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12928 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12929 directly.
12930 (mips_stopped_data_address): Ditto.
12931 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12932 directly.
12933 * linux-tile-low.c (tile_arch_setup): Ditto.
12934 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12935 (update_debug_registers_callback): Update, "entry" parameter is a
12936 struct thread_info * now. Fetch pid from thread.
12937 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12938 Pass &all_threads to find_inferior, not &all_lwps.
12939 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12940 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12941 Pass &all_threads to find_inferior, not &all_lwps.
12942 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12943 (i386_dr_low_get_status): Ditto.
12944 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12945 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12946 (x86_linux_read_description): Ditto.
12947 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12948
12949 2014-02-20 Doug Evans <dje@google.com>
12950
12951 * inferiors.c (get_first_inferior): Fix buglet.
12952
12953 2014-02-19 Doug Evans <dje@google.com>
12954
12955 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12956 * inferiors.c (add_thread): Change result type to struct thread_info *.
12957 All callers updated.
12958 (add_lwp): Call add_thread here instead of in callers.
12959 All callers updated.
12960 * linux-low.h (get_lwp_thread): Rewrite.
12961 (struct lwp_info): New member "thread".
12962
12963 2014-02-19 Doug Evans <dje@google.com>
12964
12965 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12966 All callers updated.
12967
12968 2014-02-19 Doug Evans <dje@google.com>
12969
12970 * inferiors.c (add_thread): Fix whitespace.
12971
12972 2014-02-19 Doug Evans <dje@google.com>
12973
12974 * dll.c (clear_dlls): Replace accessing list implemention details
12975 with API function.
12976 * gdbthread.h (get_first_thread): Declare.
12977 * inferiors.c (for_each_inferior_with_data): New function.
12978 (get_first_thread): New function.
12979 (find_thread_ptid): Simplify.
12980 (get_first_inferior): New function.
12981 (clear_list): Delete.
12982 (one_inferior_p): New function.
12983 (clear_inferior_list): New function.
12984 (clear_inferiors): Update.
12985 * inferiors.h (for_each_inferior_with_data): Declare.
12986 (clear_inferior_list): Declare.
12987 (one_inferior_p): Declare.
12988 (get_first_inferior): Declare.
12989 * linux-low.c (linux_wait_for_event): Replace accessing list
12990 implemention details with API function.
12991 * server.c (target_running): Ditto.
12992 (accumulate_file_name_length): New function.
12993 (emit_dll_description): New function.
12994 (handle_qxfer_libraries): Replace accessing list implemention
12995 details with API function.
12996 (handle_qxfer_threads_worker): New function.
12997 (handle_qxfer_threads_proper): Replace accessing list implemention
12998 details with API function.
12999 (handle_query): Ditto.
13000 (visit_actioned_threads_callback_ftype): New typedef.
13001 (visit_actioned_threads_data): New struct.
13002 (visit_actioned_threads): Rewrite to be find_inferior callback.
13003 (resume): Call find_inferior.
13004 (handle_status): Replace accessing list implemention
13005 details with API function.
13006 (process_serial_event): Replace accessing list implemention details
13007 with API function.
13008 * target.c (set_desired_inferior): Replace accessing list implemention
13009 details with API function.
13010 * tracepoint.c (same_process_p): New function.
13011 (gdb_agent_about_to_close): Replace accessing list implemention
13012 details with API function.
13013 * win32-low.c (child_delete_thread): Replace accessing list
13014 implemention details with API function.
13015 (match_dll_by_basename): New function.
13016 (dll_is_loaded_by_basename): New function.
13017 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13018 details call to dll_is_loaded_by_basename.
13019
13020 2014-02-19 Doug Evans <dje@google.com>
13021
13022 * dll.h (struct dll_info): Add comment.
13023 * gdbthread.h (struct thread_info): Add comment.
13024 (current_ptid): Simplify.
13025 * inferiors.c (add_process): Update.
13026 (remove_process): Update.
13027 * inferiors.h (struct process_info): Rename member "head" to "entry".
13028 * linux-low.c (delete_lwp): Update.
13029 (add_lwp): Update.
13030 (last_thread_of_process_p): Update.
13031 (kill_one_lwp_callback, linux_kill): Update.
13032 (status_pending_p_callback): Update.
13033 (wait_for_sigstop): Update. Simplify read of ptid.
13034 (start_step_over): Update.
13035 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13036 (get_lwp_thread): Update.
13037 (struct lwp_info): Rename member "head" to "entry".
13038 * regcache.h (inferior_list_entry): Delete.
13039 * server.c (kill_inferior_callback): Update.
13040 (detach_or_kill_inferior_callback): Update.
13041 (print_started_pid): Update.
13042 (print_attached_pid): Update.
13043 (process_serial_event): Simplify read of ptid.
13044 * thread-db.c (thread_db_create_event): Update.
13045 (thread_db_get_tls_address): Update.
13046 * win32-low.c (current_inferior_ptid): Simplify.
13047
13048 2014-02-19 Tom Tromey <tromey@redhat.com>
13049
13050 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13051 argument.
13052 (target_supports_btrace): Update.
13053
13054 2014-02-14 Yao Qi <yao@codesourcery.com>
13055
13056 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13057 (rsp-low-ipa.o): New target.
13058
13059 2014-02-12 Tom Tromey <tromey@redhat.com>
13060
13061 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13062 convert_ascii_to_int.
13063 * regcache.c (registers_to_string): Likewise.
13064 * remote-utils.c (decode_M_packet): Likewise.
13065 * server.c (process_serial_event): Likewise.
13066
13067 2014-02-12 Tom Tromey <tromey@redhat.com>
13068
13069 * server.c (handle_query, handle_v_run): Use hex2bin, not
13070 unhexify.
13071 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13072
13073 2014-02-12 Tom Tromey <tromey@redhat.com>
13074
13075 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13076 convert_int_to_ascii.
13077 * regcache.c (registers_to_string, collect_register_as_string):
13078 Likewise.
13079 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13080 Likewise.
13081 * server.c (process_serial_event): Likewise.
13082 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13083 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13084
13085 2014-02-12 Tom Tromey <tromey@redhat.com>
13086
13087 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13088 bin2hex, not hexify.
13089 * tracepoint.c (cmd_qtstatus): Likewise.
13090
13091 2014-02-12 Tom Tromey <tromey@redhat.com>
13092
13093 * remote-utils.c (monitor_output): Pass explicit length to
13094 hexify.
13095
13096 2014-02-12 Tom Tromey <tromey@redhat.com>
13097
13098 * tracepoint.c: Include rsp-low.h.
13099 * server.c: Include rsp-low.h.
13100 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13101 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13102 declare.
13103 * remote-utils.c: Include rsp-low.h.
13104 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13105 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13106 (convert_int_to_ascii, convert_ascii_to_int): Move to
13107 common/rsp-low.c.
13108 * regcache.c: Include rsp-low.h.
13109 * ax.c: Include rsp-low.h.
13110 * Makefile.in (SFILES): Add common/rsp-low.c.
13111 (OBS): Add rsp-low.o.
13112 (rsp-low.o): New target.
13113
13114 2014-02-12 Tom Tromey <tromey@redhat.com>
13115
13116 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13117 Include print-utils.h.
13118 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13119 (plongest, thirty_two, phex_nz): Remove.
13120 * Makefile.in (SFILES): Add common/print-utils.c.
13121 (OBS): Add print-utils.o.
13122 (print-utils-ipa.o): New target.
13123 (print-utils.o): New target.
13124 (IPA_OBJS): Add print-utils-ipa.o.
13125
13126 2014-02-06 Tom Tromey <tromey@redhat.com>
13127
13128 * Makefile.in (SFILES): Fix indentation.
13129
13130 2014-02-05 Doug Evans <dje@google.com>
13131
13132 * linux-low.c (linux_wait_for_event): Improve comment.
13133 (linux_wait_1): Keep current_inferior in sync with event_child.
13134
13135 2014-01-22 Doug Evans <dje@google.com>
13136
13137 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13138
13139 2014-01-22 Doug Evans <dje@google.com>
13140
13141 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13142 * configure: Regenerate.
13143 * config.in: Regenerate.
13144 * Makefile.in (SFILES): Add debug.c.
13145 (OBS): Add debug.o.
13146 * debug.c: New file.
13147 * debug.h: New file.
13148 * linux-aarch64-low.c (*): Update all debugging printfs to use
13149 debug_printf instead of fprintf.
13150 * linux-arm-low.c (*): Ditto.
13151 * linux-cris-low.c (*): Ditto.
13152 * linux-crisv32-low.c (*): Ditto.
13153 * linux-m32r-low.c (*): Ditto.
13154 * linux-sparc-low.c (*): Ditto.
13155 * linux-x86.c (*): Ditto.
13156 * linux-low.c (*): Ditto.
13157 (linux_wait_1): Add calls to debug_enter, debug_exit.
13158 (linux_wait): Remove redundant debugging printf.
13159 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13160 (linux_resume, unstop_all_lwps): Ditto.
13161 * mem-break.c (*): Update all debugging printfs to use
13162 debug_printf instead of fprintf.
13163 * remote-utils.c (*): Ditto.
13164 * thread-db.c (*): Ditto.
13165 * server.c #include <ctype.h>, "gdb_vecs.h".
13166 (debug_threads): Moved to debug.c.
13167 (*): Update all debugging printfs to use debug_printf instead of
13168 fprintf.
13169 (start_inferior): Replace call to fflush with call to debug_flush.
13170 (monitor_show_help): Mention set debug-format.
13171 (parse_debug_format_options): New function.
13172 (handle_monitor_command): Handle "monitor set debug-format".
13173 (gdbserver_usage): Mention --debug-format.
13174 (main): Parse --debug-format.
13175 * server.h (debug_threads): Declaration moved to debug.h.
13176 #include "debug.h".
13177 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13178 trace_debug_1 that uses debug_printf.
13179 (tracepoint_look_up_symbols): Update all debugging printfs to use
13180 debug_printf instead of fprintf.
13181
13182 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13183
13184 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13185 sys/ptrace.h.
13186
13187 2014-01-17 Pedro Alves <palves@redhat.com>
13188
13189 PR build/16445
13190 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13191 defined after including gdb_proc_service.h.
13192
13193 2014-01-16 Doug Evans <dje@google.com>
13194
13195 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13196 (match_dll): Use it.
13197
13198 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13199
13200 * target.h (target_ops) <read_btrace>: Change parameters and
13201 return type to allow error reporting.
13202 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13203 trace reading errors on.
13204 * linux-low.c (linux_low_read_btrace): Pass trace reading
13205 errors on.
13206 (linux_low_disable_btrace): New.
13207
13208 2014-01-15 Doug Evans <dje@google.com>
13209
13210 * inferiors.c (thread_id_to_gdb_id): Delete.
13211 * inferiors.h (thread_id_to_gdb_id): Delete.
13212
13213 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13214
13215 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13216 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13217 versions.
13218
13219 2014-01-08 Pedro Alves <palves@redhat.com>
13220
13221 * server.c (handle_status): Don't discard previous queued stop
13222 replies or thread's pending status here.
13223 (main) <disconnection>: Do it here instead.
13224
13225 2014-01-08 Pedro Alves <palves@redhat.com>
13226
13227 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13228 * server.c (visit_actioned_threads, handle_pending_status): New
13229 function.
13230 (handle_v_cont): Factor out parts to ...
13231 (resume): ... this new function. If in all-stop, and a thread
13232 being resumed has a pending status, report it without actually
13233 resuming.
13234 (myresume): Adjust to use the new 'resume' function.
13235 (clear_pending_status_callback, set_pending_status_callback)
13236 (find_status_pending_thread_callback): New functions.
13237 (handle_status): Handle the case of multiple threads having
13238 interesting statuses to report. Report threads' real last signal
13239 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13240 with an interesting thread to report the status for, instead of
13241 always reporting the status of the first thread.
13242
13243 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13244
13245 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13246 * gdbreplay.c (gdbreplay_version): Likewise.
13247
13248 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13249
13250 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13251 iov.iov_len with the real length in use.
13252
13253 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13254
13255 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13256 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13257 for all targets that use win32-low.c.
13258 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13259 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13260
13261 2013-12-13 Pedro Alves <palves@redhat.com>
13262
13263 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13264 if equal to TARGET_WAITKIND_LOADED.
13265 * win32-low.c (cached_status): New static global.
13266 (win32_wait): Add declaration.
13267 (do_initial_child_stuff): Flush all initial pending debug events
13268 up to the initial breakpoint.
13269 (win32_wait): If CACHED_STATUS was set, return that instead
13270 of doing a real wait. Remove the code resuming the execution
13271 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13272 during the initial phase. Also remove the code changing
13273 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13274 TARGET_WAITKIND_STOPPED.
13275
13276 2013-12-11 Yao Qi <yao@codesourcery.com>
13277
13278 * notif.c (handle_notif_ack): Return 0 if no notification
13279 matches.
13280
13281 2013-11-20 Doug Evans <dje@google.com>
13282
13283 * linux-low.c (linux_set_resume_request): Fix comment.
13284
13285 2013-11-20 Doug Evans <dje@google.com>
13286
13287 * linux-low.c (resume_status_pending_p): Tweak comment.
13288
13289 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13290
13291 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13292 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13293 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13294 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13295 (srv_amd64_regobj): Add amd64-mpx.o.
13296 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13297 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13298 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13299 * i387-fp.c (num_pl_bnd_register) Added constant.
13300 (num_pl_bnd_cfg_registers) Added constant.
13301 (struct i387_xsave) Added reserved area and MPX fields.
13302 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13303 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13304 function.
13305 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13306 (init_registers_amd64_mpx_linux): Declare new function.
13307 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13308 (x86_64_regmap): Add MPX registers.
13309 (x86_linux_read_description): Add MPX case.
13310 (initialize_low_arch): Initialize MPX targets.
13311
13312 2013-11-18 Tom Tromey <tromey@redhat.com>
13313
13314 * configure: Rebuild.
13315 * configure.ac: Don't check for stdlib.h.
13316 * gdbreplay.c: Unconditionally include stdlib.h.
13317
13318 2013-11-18 Tom Tromey <tromey@redhat.com>
13319
13320 * config.in: Rebuild.
13321 * configure: Rebuild.
13322 * configure.ac: Don't use AC_HEADER_DIRENT.
13323
13324 2013-11-18 Tom Tromey <tromey@redhat.com>
13325
13326 * server.h: Don't check HAVE_STRING_H.
13327 * gdbreplay.c: Don't check HAVE_STRING_H.
13328 * configure: Rebuild.
13329
13330 2013-11-18 Tom Tromey <tromey@redhat.com>
13331
13332 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13333 LIBGNU.
13334
13335 2013-11-08 Tom Tromey <tromey@redhat.com>
13336
13337 * configure, config.in: Rebuild.
13338 * configure.ac: Remove unused configury.
13339
13340 2013-11-08 Tom Tromey <tromey@redhat.com>
13341
13342 * acinclude.m4: Include common.m4, codeset.m4.
13343 * configure, config.in: Rebuild.
13344 * configure.ac: Use GDB_AC_COMMON.
13345
13346 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13347
13348 * linux-s390-low.c (HWCAP_S390_TE): New define.
13349 (s390_arch_setup): Consider the TE field in the HWCAP for
13350 determining 'have_regset_tdb'.
13351
13352 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13353
13354 PR gdb/16014
13355 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13356 call to sizeof.
13357
13358 2013-10-02 Pedro Alves <palves@redhat.com>
13359
13360 * server.c (process_serial_event): Don't output "GDBserver
13361 exiting" if GDB is connected through stdio.
13362 * target.c (mywait): Likewise, be silent if GDB is connected
13363 through stdio.
13364
13365 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13366
13367 * lynx-low.c (lynx_add_threads_after_attach): New function.
13368 (lynx_attach): Remove call to add_thread. Add call to
13369 lynx_add_threads_after_attach instead.
13370
13371 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13372
13373 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13374 * config.in, configure: Regenerated.
13375
13376 2013-09-18 Yao Qi <yao@codesourcery.com>
13377
13378 PR server/15959
13379 * server.c (start_inferior): Clear 'resume_info'.
13380
13381 2013-09-16 Jiong Wang <jiwang@tilera.com>
13382
13383 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13384 for each register.
13385
13386 2013-09-16 Jiong Wang <jiwang@tilera.com>
13387
13388 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13389 linux-tile-low.o to srv_tgtobj.
13390
13391 2013-09-16 Will Newton <will.newton@linaro.org>
13392
13393 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13394 out regs.
13395
13396 2013-09-06 Pedro Alves <palves@redhat.com>
13397
13398 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13399 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13400 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13401 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13402 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13403 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13404
13405 2013-09-06 Pedro Alves <palves@redhat.com>
13406
13407 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13408 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13409
13410 2013-09-06 Pedro Alves <palves@redhat.com>
13411
13412 * linux-amd64-ipa.c: Include tracepoint.h.
13413 * linux-i386-ipa.c: Include tracepoint.h.
13414
13415 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13416
13417 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13418 (ps_get_thread_area): New function.
13419
13420 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13421
13422 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13423 (initialize_low_arch): Call init_registers_crisv32 rather than
13424 init_register_crisv32.
13425
13426 2013-09-05 Pedro Alves <palves@redhat.com>
13427
13428 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13429 to ...
13430 * hostio.h: ... this new file.
13431 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13432 win32-low.c: Include hostio.h.
13433
13434 2013-09-05 Pedro Alves <palves@redhat.com>
13435
13436 * server.h (gdb_client_data, handler_func, callback_handler_func)
13437 (delete_file_handler, add_file_handler, append_callback_event)
13438 (delete_callback_event, start_event_loop, initialize_event_loop):
13439 Move to event-loop.h and include it.
13440 * event-loop.h: New file.
13441
13442 2013-09-05 Pedro Alves <palves@redhat.com>
13443
13444 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13445 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13446 (loaded_dll, unloaded_dll): Move to ...
13447 * dll.h: ... this new file.
13448 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13449
13450 2013-09-05 Pedro Alves <palves@redhat.com>
13451
13452 * server.h (current_process, get_thread_process, all_processes)
13453 (add_inferior_to_list, for_each_inferior, current_inferior)
13454 (remove_inferior, add_process, remove_process, find_process_pid)
13455 (have_started_inferiors_p, have_attached_inferiors_p)
13456 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13457 (clear_inferiors, find_inferior, find_inferior_id)
13458 (inferior_target_data, set_inferior_target_data)
13459 (inferior_regcache_data, set_inferior_regcache_data): Move to
13460 inferiors.h, and include it.
13461 * inferiors.h: New file.
13462
13463 2013-09-05 Pedro Alves <palves@redhat.com>
13464
13465 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13466 Move ...
13467 * ax.h: ... here.
13468
13469 2013-09-05 Pedro Alves <palves@redhat.com>
13470
13471 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13472 tracepoint.h.
13473 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13474 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13475 (handle_tracepoint_general_set, handle_tracepoint_query)
13476 (tracepoint_finished_step, tracepoint_was_hit)
13477 (release_while_stepping_state_list, current_traceframe)
13478 (in_readonly_region, traceframe_read_mem)
13479 (fetch_traceframe_registers, traceframe_read_sdata)
13480 (traceframe_read_info, struct fast_tpoint_collect_status)
13481 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13482 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13483 (supply_fast_tracepoint_registers)
13484 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13485 (ipa_tdesc, claim_trampoline_space)
13486 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13487 (agent_mem_read, agent_get_trace_state_variable_value)
13488 (agent_set_trace_state_variable_value, agent_tsv_read)
13489 (agent_mem_read_string, get_raw_reg_func_addr)
13490 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13491 * tracepoint.h: ... this new file.
13492
13493 2013-09-05 Pedro Alves <palves@redhat.com>
13494
13495 * server.h (perror_with_name, error, fatal, warning, paddress)
13496 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13497 include it.
13498 * utils.h: New file.
13499
13500 2013-09-05 Pedro Alves <palves@redhat.com>
13501
13502 * server.h (remote_debug, noack_mode, transport_is_reliable)
13503 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13504 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13505 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13506 (write_enn, initialize_async_io, enable_async_io)
13507 (disable_async_io, check_remote_input_interrupt_request)
13508 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13509 (dead_thread_notify, prepare_resume_reply)
13510 (decode_address_to_semicolon, decode_address, decode_m_packet)
13511 (decode_M_packet, decode_X_packet, decode_xfer_write)
13512 (decode_search_memory_packet, unhexify, hexify)
13513 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13514 (look_up_one_symbol, relocate_instruction)
13515 (monitor_output): Move to remote-utils.h, and include it.
13516 * remote-utils.h: New file.
13517
13518 2013-09-05 Pedro Alves <palves@redhat.com>
13519
13520 * server.h (_): Delete.
13521
13522 2013-09-02 Pedro Alves <palves@redhat.com>
13523
13524 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13525 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13526 allocated.
13527 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13528
13529 2013-09-02 Pierre Muller <muller@sourceware.org>
13530
13531 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13532 or WriteProcessMemory complete successfully and handle
13533 ERROR_PARTIAL_COPY error.
13534
13535 2013-09-02 Pedro Alves <palves@redhat.com>
13536
13537 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13538 error instead of EIO.
13539
13540 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13541
13542 PR server/15604
13543 * linux-low.c: Include filestuff.h.
13544 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13545 * lynx-low.c: Include filestuff.h.
13546 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13547 * server.c: Include filestuff.h.
13548 (main): Call notice_open_fds.
13549 * spu-low.c: Include filestuff.h.
13550 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13551
13552 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13553
13554 * Makefile.in: Explain why ../target and ../nat are not
13555 listed as include file search paths.
13556 (linux-waitpid.o): New object file rule.
13557 * configure.srv (srv_native_linux_obj): New variable.
13558 Replace all occurrences of linux native object files with
13559 $srv_native_linux_obj.
13560 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13561 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13562 (linux_enable_event_reporting): Remove declaration.
13563 (my_waitpid): Moved to common/linux-waitpid.c.
13564 (linux_wait_for_event): Pass ptid when calling
13565 linux_enable_event_reporting.
13566 (linux_supports_tracefork_flag): Remove.
13567 (linux_enable_event_reporting): Likewise.
13568 (linux_tracefork_grandchild): Remove.
13569 (STACK_SIZE): Moved to common/linux-ptrace.c.
13570 (linux_tracefork_child): Remove.
13571 (linux_test_for_tracefork): Remove.
13572 (linux_look_up_symbols): Call linux_supports_traceclone.
13573 (initialize_low): Remove call to linux_test_for_tracefork.
13574 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13575 common/linux-ptrace.h.
13576 (PTRACE_TYPE_ARG4): Likewise.
13577 Include linux-ptrace.h.
13578
13579 2013-08-21 Pedro Alves <palves@redhat.com>
13580
13581 * config.in: Renegerate.
13582
13583 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13584
13585 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13586 (SFILES): Remove $(srcdir)/common/target-common.c and
13587 add $(srcdir)/target/waitstatus.c.
13588 (OBS): Remove target-common.o and add waitstatus.o.
13589 (server_h): Remove $(srcdir)/../common/target-common.h and
13590 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13591 and $(srcdir)/../target/waitstatus.h.
13592 (target-common.o): Remove.
13593 (waitstatus.o): New target object file.
13594 * target.h: Do not include target-common.h and
13595 include target/resume.h, target/wait.h and
13596 target/waitstatus.h.
13597
13598 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13599
13600 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13601 to PTRACE_TYPE_ARG3.
13602 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13603 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13604 PTRACE_TYPE_ARG4.
13605 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13606 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13607
13608 2013-07-27 Jie Zhang <jie@codesourcery.com>
13609 Daniel Jacobowitz <dan@codesourcery.com>
13610 Yao Qi <yao@codesourcery.com>
13611
13612 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13613 (mips-linux-watch.o): New rule.
13614 (mips_linux_watch_h): New variable.
13615 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13616 srv_tgtobj.
13617 * linux-mips-low.c: Include mips-linux-watch.h.
13618 (struct arch_process_info, struct arch_lwp_info): New.
13619 (update_watch_registers_callback): New function.
13620 (mips_linux_new_process, mips_linux_new_thread) New functions.
13621 (mips_linux_prepare_to_resume, mips_insert_point): New
13622 functions.
13623 (mips_remove_point, mips_stopped_by_watchpoint): New
13624 functions.
13625 (rsp_bp_type_to_target_hw_bp_type): New function.
13626 (mips_stopped_data_address): New function.
13627 (the_low_target): Add watchpoint support functions.
13628
13629 2013-07-27 Yao Qi <yao@codesourcery.com>
13630
13631 * i386-low.c: Include break-common.h.
13632 (enum target_hw_bp_type): Remove.
13633
13634 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13635
13636 * Makefile.in (SFILES): /common/target-common.c.
13637 (OBS): Add target-common.o.
13638 (server_h): Add $(srcdir)/../common/target-common.h.
13639 (target-common.o): New target.
13640 * server.c (queue_stop_reply_callback): Free
13641 status string after use.
13642 * target.c (target_waitstatus_to_string): Remove.
13643 * target.h: Include target-common.h.
13644 (resume_kind): Likewise.
13645 (target_waitkind): Likewise.
13646 (target_waitstatus): Likewise.
13647 (TARGET_WNOHANG): Likewise.
13648
13649 2013-07-04 Yao Qi <yao@codesourcery.com>
13650
13651 * Makefile.in (host_alias): Use @host_noncanonical@.
13652 (target_alias): Use @target_noncanonical@.
13653 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13654 ACX_NONCANONICAL_HOST.
13655 * configure: Regenerated.
13656
13657 Revert:
13658 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13659
13660 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13661 * configure: Rebuild.
13662 * Makefile.in (version_host, version_target): Get from configure.
13663 (version.c): Use $(version_host) and $(version_target).
13664
13665 2013-07-03 Pedro Alves <palves@redhat.com>
13666
13667 * Makefile.in (config.status): Depend on development.sh.
13668 * acinclude.m4: Include libmcheck.m4.
13669 * configure: Regenerate.
13670
13671 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13672
13673 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13674 attribute inside the parentheses.
13675 (winapi_DebugSetProcessKillOnExit): Ditto.
13676 (winapi_DebugBreakProcess): Ditto.
13677 (winapi_GenerateConsoleCtrlEvent): Ditto.
13678
13679 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13680
13681 * notif.h (notif_event): Add a dummy member to avoid compiler
13682 errors.
13683
13684 2013-07-01 Pedro Alves <palves@redhat.com>
13685
13686 * hostio.c (HOSTIO_PATH_MAX): Define.
13687 (require_filename, handle_open, handle_unlink, handle_readlink):
13688 Use it.
13689
13690 2013-07-01 Pedro Alves <palves@redhat.com>
13691
13692 * server.h: Include "pathmax.h".
13693 * linux-low.c: Don't include sys/param.h.
13694 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13695 MAXPATHLEN.
13696 * win32-low.c: Don't include sys/param.h.
13697 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13698
13699 2013-07-01 Pedro Alves <palves@redhat.com>
13700
13701 * event-loop.c: Don't check HAVE_UNISTD_H before including
13702 <unistd.h>.
13703 * gdbreplay.c: Likewise.
13704 * remote-utils.c: Likewise.
13705 * server.c: Likewise.
13706 * configure.ac: Don't check for unistd.h.
13707 * configure: Regenerate.
13708
13709 2013-06-28 Tom Tromey <tromey@redhat.com>
13710
13711 * Makefile.in (version.c): Use version.in, not
13712 common/version.in.
13713
13714 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13715
13716 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13717 * configure: Rebuild.
13718 * Makefile.in (version_host, version_target): Get from configure.
13719 (version.c): Use $(version_host) and $(version_target).
13720
13721 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13722
13723 Fix trace-status to output user name without trailing colon.
13724 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13725
13726 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13727
13728 Fix trace-status to output proper start-time and stop-time.
13729 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13730 output start time and stop time in hex as gdb expects.
13731
13732 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13733
13734 * tracepoint.c (build_traceframe_info_xml): Output trace state
13735 variables present in the trace buffer.
13736
13737 2013-06-24 Tom Tromey <tromey@redhat.com>
13738
13739 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13740 create-version.sh.
13741 (version.o): Remove.
13742 * gdbreplay.c: Include version.h.
13743 (version, host_name): Don't declare.
13744 * server.h: Include version.h.
13745 (version, host_name): Don't declare.
13746
13747 2013-06-12 Pedro Alves <palves@redhat.com>
13748
13749 * linux-x86-low.c (linux_is_elf64): Delete global.
13750 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13751 with local linux_pid_exe_is_elf_64_file use.
13752
13753 2013-06-11 Pedro Alves <palves@redhat.com>
13754
13755 * linux-low.c (regset_disabled, disable_regset): New functions.
13756 (regsets_fetch_inferior_registers)
13757 (regsets_store_inferior_registers): Use them.
13758 (initialize_regsets_info); Don't allocate the disabled_regsets
13759 array here.
13760 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13761 comment.
13762
13763 2013-06-11 Pedro Alves <palves@redhat.com>
13764
13765 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13766 xmalloc.
13767
13768 2013-06-11 Pedro Alves <palves@redhat.com>
13769
13770 * linux-x86-low.c (initialize_low_arch): Call
13771 init_registers_x32_avx_linux.
13772
13773 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13774
13775 Fix compatibility with Android Bionic.
13776 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13777 it is not empty.
13778
13779 2013-06-07 Pedro Alves <palves@redhat.com>
13780
13781 PR server/14823
13782 * Makefile.in (OBS): Add tdesc.o.
13783 (IPA_OBJS): Add tdesc-ipa.o.
13784 (tdesc-ipa.o): New rule.
13785 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13786 interface.
13787 * linux-low.c (new_inferior): Delete.
13788 (disabled_regsets, num_regsets): Delete.
13789 (linux_add_process): Adjust to set the new per-process
13790 new_inferior flag.
13791 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13792 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13793 was a stop. When calling arch_setup, switch the current inferior
13794 to the thread that got an event.
13795 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13796 (regsets_fetch_inferior_registers)
13797 (regsets_store_inferior_registers): New regsets_info parameter.
13798 Adjust to use it.
13799 (linux_register_in_regsets): New regs_info parameter. Adjust to
13800 use it.
13801 (register_addr, fetch_register, store_register): New usrregs_info
13802 parameter. Adjust to use it.
13803 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13804 parameter regs_info. Adjust to use it.
13805 (linux_fetch_registers): Get the current inferior's regs_info, and
13806 adjust to use it.
13807 (linux_store_registers): Ditto.
13808 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13809 (initialize_low): Don't initialize the target_regsets here. Call
13810 initialize_low_arch.
13811 * linux-low.h (target_regsets): Delete declaration.
13812 (struct regsets_info): New.
13813 (struct usrregs_info): New.
13814 (struct regs_info): New.
13815 (struct process_info_private) <new_inferior>: New field.
13816 (struct linux_target_ops): Delete the num_regs, regmap, and
13817 regset_bitmap fields. New field regs_info.
13818 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13819 * i387-fp.c (num_xmm_registers): Delete.
13820 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13821 calls to new interface.
13822 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13823 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13824 Infer the number of xmm registers from the regcache's target
13825 description.
13826 * i387-fp.h (num_xmm_registers): Delete.
13827 * inferiors.c (add_thread): Don't install the thread's regcache
13828 here.
13829 * proc-service.c (gregset_info): Fetch the current inferior's
13830 regs_info. Adjust to use it.
13831 * regcache.c: Include tdesc.h.
13832 (register_bytes, reg_defs, num_registers)
13833 (gdbserver_expedite_regs): Delete.
13834 (get_thread_regcache): If the thread doesn't have a regcache yet,
13835 create one, instead of aborting gdbserver.
13836 (regcache_invalidate_one): Rename to ...
13837 (regcache_invalidate_thread): ... this.
13838 (regcache_invalidate_one): New.
13839 (regcache_invalidate): Only invalidate registers of the current
13840 process.
13841 (init_register_cache): Add target_desc parameter, and use it.
13842 (new_register_cache): Ditto. Assert the target description has a
13843 non zero registers_size.
13844 (regcache_cpy): Add assertions. Adjust.
13845 (realloc_register_cache, set_register_cache): Delete.
13846 (registers_to_string, registers_from_string): Adjust.
13847 (find_register_by_name, find_regno, find_register_by_number)
13848 (register_cache_size): Add target_desc parameter, and use it.
13849 (free_register_cache_thread, free_register_cache_thread_one)
13850 (regcache_release, register_cache_size): New.
13851 (register_size): Add target_desc parameter, and use it.
13852 (register_data, supply_register, supply_register_zeroed)
13853 (supply_regblock, supply_register_by_name, collect_register)
13854 (collect_register_as_string, collect_register_by_name): Adjust.
13855 * regcache.h (struct target_desc): Forward declare.
13856 (struct regcache) <tdesc>: New field.
13857 (init_register_cache, new_register_cache): Add target_desc
13858 parameter.
13859 (regcache_invalidate_thread): Declare.
13860 (regcache_invalidate_one): Delete declaration.
13861 (regcache_release): Declare.
13862 (find_register_by_number, register_cache_size, register_size)
13863 (find_regno): Add target_desc parameter.
13864 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13865 declarations.
13866 * remote-utils.c: Include tdesc.h.
13867 (outreg, prepare_resume_reply): Adjust.
13868 * server.c: Include tdesc.h.
13869 (gdbserver_xmltarget): Delete declaration.
13870 (get_features_xml, process_serial_event): Adjust.
13871 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13872 declare.
13873 (struct process_info) <tdesc>: New field.
13874 (ipa_tdesc): Declare.
13875 * tdesc.c: New file.
13876 * tdesc.h: New file.
13877 * tracepoint.c: Include tdesc.h.
13878 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13879 (get_context_regcache): Adjust to pass ipa_tdesc down.
13880 (do_action_at_tracepoint): Adjust to get the register cache size
13881 from the context regcache's description.
13882 (traceframe_walk_blocks): Adjust to get the register cache size
13883 from the current trace frame's description.
13884 (traceframe_get_pc): Adjust to get current trace frame's
13885 description and pass it down.
13886 (gdb_collect): Adjust to get the register cache size from the
13887 IPA's description.
13888 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13889 (gdbserver_xmltarget): Delete.
13890 (initialize_low_tracepoint): Set the ipa's target description.
13891 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13892 (initialize_low_tracepoint): Set the ipa's target description.
13893 * linux-x86-low.c: Include tdesc.h.
13894 [__x86_64__] (is_64bit_tdesc): New.
13895 (ps_get_thread_area, x86_get_thread_area): Use it.
13896 (i386_cannot_store_register): Rename to ...
13897 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13898 (i386_cannot_fetch_register): Rename to ...
13899 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13900 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13901 to new interface.
13902 (target_regsets): Rename to ...
13903 (x86_regsets): ... this.
13904 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13905 interface.
13906 (x86_siginfo_fixup): Use is_64bit_tdesc.
13907 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13908 (tdesc_x32_avx_linux, tdesc_x32_linux)
13909 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13910 Declare.
13911 (x86_linux_update_xmltarget): Delete.
13912 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13913 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13914 (AMD64_LINUX_USER64_CS): New.
13915 (x86_linux_read_description): New, based on
13916 x86_linux_update_xmltarget.
13917 (same_process_callback): New.
13918 (x86_arch_setup_process_callback): New.
13919 (x86_linux_update_xmltarget): New.
13920 (x86_regsets_info): New.
13921 (amd64_linux_regs_info): New.
13922 (i386_linux_usrregs_info): New.
13923 (i386_linux_regs_info): New.
13924 (x86_linux_regs_info): New.
13925 (x86_arch_setup): Reimplement.
13926 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13927 (x86_emit_ops): Ditto.
13928 (the_low_target): Adjust. Install x86_linux_regs_info,
13929 x86_cannot_fetch_register, and x86_cannot_store_register.
13930 (initialize_low_arch): New.
13931 * linux-ia64-low.c (tdesc_ia64): Declare.
13932 (ia64_fetch_register): Adjust.
13933 (ia64_usrregs_info, regs_info): New globals.
13934 (ia64_regs_info): New function.
13935 (the_low_target): Adjust.
13936 (initialize_low_arch): New function.
13937 * linux-sparc-low.c (tdesc_sparc64): Declare.
13938 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13939 Adjust.
13940 (sparc_arch_setup): New function.
13941 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13942 (the_low_target): Adjust.
13943 (initialize_low_arch): New function.
13944 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13945 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13946 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13947 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13948 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13949 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13950 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13951 (tdesc_powerpc_isa205_vsx64l): Declare.
13952 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13953 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13954 (ppc_set_pc, ppc_get_hwcap): Adjust.
13955 (ppc_usrregs_info): Forward declare.
13956 (!__powerpc64__) ppc_regmap_adjusted: New global.
13957 (ppc_arch_setup): Adjust to the current process'es target
13958 description.
13959 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13960 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13961 (ppc_store_evrregset): Adjust.
13962 (target_regsets): Rename to ...
13963 (ppc_regsets): ... this, and make static.
13964 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13965 (ppc_regs_info): New function.
13966 (the_low_target): Adjust.
13967 (initialize_low_arch): New function.
13968 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13969 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13970 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13971 (tdesc_s390x_linux64v2): Declare.
13972 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13973 (s390_fill_gregset, s390_store_last_break): Adjust.
13974 (target_regsets): Rename to ...
13975 (s390_regsets): ... this, and make static.
13976 (s390_get_pc, s390_set_pc): Adjust.
13977 (s390_get_hwcap): New target_desc parameter, and use it.
13978 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13979 (s390_arch_setup): Adjust to set the current process'es target
13980 description. Don't adjust the regmap.
13981 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13982 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13983 (regs_info_3264): New globals.
13984 (s390_regs_info): New function.
13985 (the_low_target): Adjust.
13986 (initialize_low_arch): New function.
13987 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
13988 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
13989 [__mips64] (init_registers_mips_linux)
13990 (init_registers_mips_dsp_linux): Delete defines.
13991 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
13992 (have_dsp): New global.
13993 (mips_read_description): New, based on mips_arch_setup.
13994 (mips_arch_setup): Reimplement.
13995 (get_usrregs_info): New function.
13996 (mips_cannot_fetch_register, mips_cannot_store_register)
13997 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
13998 (mips_fill_fpregset, mips_store_fpregset): Adjust.
13999 (target_regsets): Rename to ...
14000 (mips_regsets): ... this, and make static.
14001 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14002 (dsp_regs_info, regs_info): New globals.
14003 (mips_regs_info): New function.
14004 (the_low_target): Adjust.
14005 (initialize_low_arch): New function.
14006 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14007 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14008 Declare.
14009 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14010 (arm_read_description): New, with bits factored from
14011 arm_arch_setup.
14012 (arm_arch_setup): Reimplement.
14013 (target_regsets): Rename to ...
14014 (arm_regsets): ... this, and make static.
14015 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14016 (arm_regs_info): New function.
14017 (the_low_target): Adjust.
14018 (initialize_low_arch): New function.
14019 * linux-m68k-low.c (tdesc_m68k): Declare.
14020 (target_regsets): Rename to ...
14021 (m68k_regsets): ... this, and make static.
14022 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14023 (m68k_regs_info): New function.
14024 (m68k_arch_setup): New function.
14025 (the_low_target): Adjust.
14026 (initialize_low_arch): New function.
14027 * linux-sh-low.c (tdesc_sharch): Declare.
14028 (target_regsets): Rename to ...
14029 (sh_regsets): ... this, and make static.
14030 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14031 (sh_regs_info, sh_arch_setup): New functions.
14032 (the_low_target): Adjust.
14033 (initialize_low_arch): New function.
14034 * linux-bfin-low.c (tdesc_bfin): Declare.
14035 (bfin_arch_setup): New function.
14036 (bfin_usrregs_info, regs_info): New globals.
14037 (bfin_regs_info): New function.
14038 (the_low_target): Adjust.
14039 (initialize_low_arch): New function.
14040 * linux-cris-low.c (tdesc_cris): Declare.
14041 (cris_arch_setup): New function.
14042 (cris_usrregs_info, regs_info): New globals.
14043 (cris_regs_info): New function.
14044 (the_low_target): Adjust.
14045 (initialize_low_arch): New function.
14046 * linux-cris-low.c (tdesc_crisv32): Declare.
14047 (cris_arch_setup): New function.
14048 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14049 (cris_regs_info): New function.
14050 (the_low_target): Adjust.
14051 (initialize_low_arch): New function.
14052 * linux-m32r-low.c (tdesc_m32r): Declare.
14053 (m32r_arch_setup): New function.
14054 (m32r_usrregs_info, regs_info): New globals.
14055 (m32r_regs_info): Adjust.
14056 (initialize_low_arch): New function.
14057 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14058 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14059 (tic6x_usrregs_info): Forward declare.
14060 (tic6x_read_description): New function, based on ...
14061 (tic6x_arch_setup): ... this. Reimplement.
14062 (target_regsets): Rename to ...
14063 (tic6x_regsets): ... this, and make static.
14064 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14065 (tic6x_regs_info): New function.
14066 (the_low_target): Adjust.
14067 (initialize_low_arch): New function.
14068 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14069 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14070 (target_regsets): Rename to ...
14071 (xtensa_regsets): ... this, and make static.
14072 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14073 globals.
14074 (xtensa_arch_setup, xtensa_regs_info): New functions.
14075 (the_low_target): Adjust.
14076 (initialize_low_arch): New function.
14077 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14078 (nios2_arch_setup): Set the current process'es tdesc.
14079 (target_regsets): Rename to ...
14080 (nios2_regsets): ... this.
14081 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14082 (nios2_regs_info): New function.
14083 (the_low_target): Adjust.
14084 (initialize_low_arch): New function.
14085 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14086 (aarch64_arch_setup): Set the current process'es tdesc.
14087 (target_regsets): Rename to ...
14088 (aarch64_regsets): ... this.
14089 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14090 (aarch64_regs_info): New function.
14091 (the_low_target): Adjust.
14092 (initialize_low_arch): New function.
14093 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14094 globals.
14095 (target_regsets): Rename to ...
14096 (tile_regsets): ... this.
14097 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14098 (tile_regs_info): New function.
14099 (tile_arch_setup): Set the current process'es tdesc.
14100 (the_low_target): Adjust.
14101 (initialize_low_arch): New function.
14102 * spu-low.c (tdesc_spu): Declare.
14103 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14104 * win32-arm-low.c (tdesc_arm): Declare.
14105 (arm_arch_setup): New function.
14106 (the_low_target): Install arm_arch_setup instead of
14107 init_registers_arm.
14108 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14109 (init_windows_x86): Rename to ...
14110 (i386_arch_setup): ... this. Set `win32_tdesc'.
14111 (the_low_target): Adjust.
14112 * win32-low.c (win32_tdesc): New global.
14113 (child_add_thread): Don't create the thread cache here.
14114 (do_initial_child_stuff): Set the new process'es tdesc.
14115 * win32-low.h (struct target_desc): Forward declare.
14116 (win32_tdesc): Declare.
14117 * lynx-i386-low.c (tdesc_i386): Declare global.
14118 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14119 * lynx-low.c (lynx_tdesc): New global.
14120 (lynx_add_process): Set the new process'es tdesc.
14121 * lynx-low.h (struct target_desc): Forward declare.
14122 (lynx_tdesc): Declare global.
14123 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14124 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14125 * nto-low.c (nto_tdesc): New global.
14126 (do_attach): Set the new process'es tdesc.
14127 * nto-low.h (struct target_desc): Forward declare.
14128 (nto_tdesc): Declare.
14129 * nto-x86-low.c (tdesc_i386): Declare.
14130 (nto_x86_arch_setup): Set `nto_tdesc'.
14131
14132 2013-06-04 Gary Benson <gbenson@redhat.com>
14133
14134 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14135 to qSupported response when appropriate.
14136 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14137 with nonzero-length annex.
14138 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14139 arguments supplied in annex.
14140
14141 2013-05-31 Doug Evans <dje@google.com>
14142
14143 PR server/15594
14144 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14145 64 bits in 64-cross-32 environment.
14146
14147 2013-05-28 Pedro Alves <palves@redhat.com>
14148
14149 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14150 (aarch64-without-fpu.c): Delete rule.
14151 * configure.srv (aarch64*-*-linux*): Remove references to
14152 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14153 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14154 declaration.
14155
14156 2013-05-24 Pedro Alves <palves@redhat.com>
14157
14158 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14159 instead of strchr/decode_address. Error if the range isn't split
14160 with a ','. Don't assume there's be a ':' in the action.
14161
14162 2013-05-23 Yao Qi <yao@codesourcery.com>
14163 Pedro Alves <palves@redhat.com>
14164
14165 * linux-low.c (lwp_in_step_range): New function.
14166 (linux_wait_1): If the thread was range stepping and stopped
14167 outside the stepping range, report the stop to GDB. Otherwise,
14168 continue stepping. Add range stepping debug output.
14169 (linux_set_resume_request): Copy the step range from the resume
14170 request to the lwp.
14171 (linux_supports_range_stepping): New.
14172 (linux_target_ops) <supports_range_stepping>: Set to
14173 linux_supports_range_stepping.
14174 * linux-low.h (struct linux_target_ops)
14175 <supports_range_stepping>: New field.
14176 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14177 * linux-x86-low.c (x86_supports_range_stepping): New.
14178 (the_low_target) <supports_range_stepping>: Set to
14179 x86_supports_range_stepping.
14180 * server.c (handle_v_cont): Handle 'r' action.
14181 (handle_v_requests): Append ";r" if the target supports range
14182 stepping.
14183 * target.h (struct thread_resume) <step_range_start,
14184 step_range_end>: New fields.
14185 (struct target_ops) <supports_range_stepping>:
14186 New field.
14187 (target_supports_range_stepping): New macro.
14188
14189 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14190
14191 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14192 confusion in comment.
14193
14194 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14195
14196 * lynx-low.c (struct process_info_private): New type.
14197 (lynx_add_process): New function.
14198 (lynx_create_inferior, lynx_attach): Replace calls to
14199 add_process by calls to lynx_add_process.
14200 (lynx_resume): If PTID is null, then try using
14201 current_process()->private->last_wait_event_ptid.
14202 Add comments.
14203 (lynx_clear_inferiors): Delete. The contents of that function
14204 has been inlined in lynx_mourn;
14205 (lynx_wait_1): Save the ptid in the process's private data.
14206 (lynx_mourn): Free the process' private data. Replace call
14207 to lynx_clear_inferiors by call to clear_inferiors.
14208
14209 2013-05-17 Yao Qi <yao@codesourcery.com>
14210
14211 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14212 the right place.
14213
14214 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14215
14216 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14217 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14218 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14219 PT_TEXT_END_ADDR guards. Update comments.
14220 (linux_target_op) <read_offsets>: Conditionally define to
14221 linux_read_offsets if the target is UCLIBC and if it defines
14222 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14223
14224 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14225 Andrew Jenner <andrew@codesourcery.com>
14226
14227 * Makefile.in (SFILES): Add linux-nios2-low.c.
14228 (clean): Add action to delete nios2-linux.c.
14229 (nios2-linux.c): New rule.
14230 * configure.srv: Add nios2*-*-linux*.
14231 * linux-nios2-low.c: New.
14232
14233 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14234
14235 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14236
14237 2013-04-25 Hui Zhu <hui@codesourcery.com>
14238
14239 PR gdb/15186
14240 * ax.c (ax_printf): Add fflush.
14241
14242 2013-04-22 Tom Tromey <tromey@redhat.com>
14243
14244 * Makefile.in (SFILES): Add filestuff.c.
14245 (OBS): Add filestuff.o.
14246 (filestuff.o): New target.
14247 * config.in, configure: Rebuild.
14248 * configure.ac: Check for fdwalk, pipe2.
14249
14250 2013-04-17 Pedro Alves <palves@redhat.com>
14251
14252 * configure.ac (USE_THREAD_DB): Delete variable.
14253 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14254 Don't AC_SUBST USE_THREAD_DB.
14255 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14256 * config.in, configure: Regenerate.
14257
14258 2013-04-16 Pedro Alves <palves@redhat.com>
14259
14260 * linux-low.h (struct lwp_info) <thread_known>: Move under
14261 the USE_THREAD_DB #ifdef.
14262
14263 2013-04-16 Pedro Alves <palves@redhat.com>
14264
14265 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14266 (linux-low.o): Delete rule.
14267 * linux-low.h: Always include "gdb_thread_db.h" instead of
14268 conditionally including thread_db.h.
14269 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14270 HAVE_THREAD_DB_H.
14271
14272 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14273
14274 * Makefile.in (install-only): Fix make install regression.
14275
14276 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14277
14278 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14279 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14280 installation.
14281 * gdbserver.1: Remove.
14282
14283 2013-03-22 Pedro Alves <palves@redhat.com>
14284
14285 * linux-low.c (handle_extended_wait): Don't call
14286 linux_enable_event_reporting.
14287
14288 2013-03-15 Tony Theodore <tonyt@logyst.com>
14289
14290 PR build/9098:
14291 * Makefile.in (SHELL): Use @SHELL@.
14292
14293 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14294
14295 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14296 compiler warning.
14297
14298 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14299
14300 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14301 Remove extraneous NULL element.
14302
14303 2013-03-13 Yao Qi <yao@codesourcery.com>
14304
14305 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14306 'V' block in trace frame.
14307
14308 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14309
14310 * target.h (struct target_ops): Add btrace ops.
14311 (target_supports_btrace): New macro.
14312 (target_enable_btrace): New macro.
14313 (target_disable_btrace): New macro.
14314 (target_read_btrace): New macro.
14315 * gdbthread.h (struct thread_info): Add btrace field.
14316 * server.c: Include btrace-common.h.
14317 (handle_btrace_general_set): New function.
14318 (handle_btrace_enable): New function.
14319 (handle_btrace_disable): New function.
14320 (handle_general_set): Call handle_btrace_general_set.
14321 (handle_qxfer_btrace): New function.
14322 (struct qxfer qxfer_packets[]): Add btrace entry.
14323 * inferiors.c (remove_thread): Disable btrace.
14324 * linux-low: Include linux-btrace.h.
14325 (linux_low_enable_btrace): New function.
14326 (linux_low_read_btrace): New function.
14327 (linux_target_ops): Add btrace ops.
14328 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14329 Add srv_linux_btrace=yes.
14330 (x86_64-*-linux*): Add linux-btrace.o.
14331 Add srv_linux_btrace=yes.
14332 * configure.ac: Define HAVE_LINUX_BTRACE.
14333 * config.in: Regenerated.
14334 * configure: Regenerated.
14335
14336 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14337
14338 * server.c (handle_qxfer): Preserve error message if -3 is
14339 returned.
14340 (qxfer): Document the -3 return value.
14341
14342 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14343
14344 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14345 (linux_btrace_h): New variable.
14346 (linux-btrace.o): New rule.
14347
14348 2013-03-08 Stan Shebs <stan@codesourcery.com>
14349 Hafiz Abid Qadeer <abidh@codesourcery.com>
14350
14351 * tracepoint.c (trace_buffer_size): New global.
14352 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14353 (init_trace_buffer): Change to one-argument function. Allocate
14354 trace buffer memory.
14355 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14356 handle QTBuffer:size packet.
14357 (cmd_bigqtbuffer_size): New function.
14358 (initialize_tracepoint): Call init_trace_buffer with
14359 DEFAULT_TRACE_BUFFER_SIZE.
14360 * server.c (handle_query): Add QTBuffer:size in the
14361 supported packets.
14362
14363 2013-03-07 Yao Qi <yao@codesourcery.com>
14364
14365 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14366 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14367 of -1.
14368 (cmd_qtsp): Adjust condition. Do post increment.
14369 Set cur_action and cur_step_action back to 0.
14370
14371 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14372
14373 PR server/15236
14374 * linux-low.c (linux_write_memory): Return early success if LEN is
14375 zero.
14376
14377 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14378
14379 * configure.srv: Add x86_64-*-cygwin* as target.
14380
14381 2013-02-28 Tom Tromey <tromey@redhat.com>
14382
14383 * configure.ac: Invoke AC_SYS_LARGEFILE.
14384 * configure, config.in: Rebuild.
14385
14386 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14387
14388 * win32-low.c: Throughout, fix format strings and casts of
14389 printf-like functions to avoid type related warnings on all
14390 platforms.
14391 (get_child_debug_event): Print dwDebugEventCode as hex since
14392 that's how it's usually documented.
14393
14394 2013-02-28 Yao Qi <yao@codesourcery.com>
14395
14396 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14397 pulongest.
14398
14399 2013-02-27 Jiong Wang <jiwang@tilera.com>
14400
14401 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14402 (reg-tilegx32.c): New rule.
14403 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14404 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14405 different register info initializer according to elf class.
14406 (init_registers_tilgx32): New function. The tilegx32 register info
14407 initializer.
14408 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14409 (tile_store_gregset): Likewise.
14410
14411 2013-02-27 Yao Qi <yao@codesourcery.com>
14412
14413 * server.c (process_point_options): Print debug message when
14414 debug_threads is true.
14415
14416 2013-02-26 Yao Qi <yao@codesourcery.com>
14417
14418 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14419
14420 2013-02-19 Pedro Alves <palves@redhat.com>
14421 Kai Tietz <ktietz@redhat.com>
14422
14423 PR gdb/15161
14424
14425 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14426 instead of strtoul to extract address from packet.
14427 (process_serial_event) <'z'>: Likewise.
14428
14429 2013-02-18 Yao Qi <yao@codesourcery.com>
14430
14431 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14432
14433 2013-02-14 Pedro Alves <palves@redhat.com>
14434
14435 Plug memory leak.
14436
14437 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14438 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14439
14440 2013-02-14 Pedro Alves <palves@redhat.com>
14441
14442 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14443
14444 2013-02-14 Pedro Alves <palves@redhat.com>
14445
14446 * tracepoint.c (save_string): Delete.
14447 (add_tracepoint_action): Use savestring instead of save_string.
14448
14449 2013-02-12 Pedro Alves <palves@redhat.com>
14450
14451 * linux-xtensa-low.c: Ditto.
14452 * xtensa-xtregs.c: Ditto.
14453
14454 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14455
14456 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14457 thread_db.
14458
14459 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14460
14461 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14462 aarch64_num_wp_regs and aarch64_num_bp_regs to
14463 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14464
14465 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14466
14467 * linux-aarch64-low.c (ps_get_thread_area): Replace
14468 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14469
14470 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14471 Marcus Shawcroft <marcus.shawcroft@arm.com>
14472 Nigel Stephens <nigel.stephens@arm.com>
14473 Yufeng Zhang <yufeng.zhang@arm.com>
14474
14475 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14476 (aarch64.c, aarch64-without-fpu.c): New targets.
14477 * configure.srv (aarch64*-*-linux*): New.
14478 * linux-aarch64-low.c: New file.
14479
14480 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14481
14482 * linux-low.c (handle_extended_wait, linux_create_inferior)
14483 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14484 (dequeue_one_deferred_signal, linux_resume_one_thread)
14485 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14486 (linux_tracefork_grandchild, linux_test_for_tracefork)
14487 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14488 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14489 where the argument is 0.
14490
14491 2013-01-25 Yao Qi <yao@codesourcery.com>
14492
14493 * event-loop.c: Include "queue.h".
14494 (gdb_event_p): New typedef.
14495 (struct gdb_event) <next_event>: Remove.
14496 (event_queue): Change to QUEUE(gdb_event_p).
14497 (async_queue_event): Remove.
14498 (gdb_event_xfree): New.
14499 (initialize_event_loop): New.
14500 (process_event): Use API from QUEUE.
14501 (wait_for_event): Likewise.
14502 * server.c (main): Call initialize_event_loop.
14503 * server.h (initialize_event_loop): Declare.
14504
14505 2013-01-18 Yao Qi <yao@codesourcery.com>
14506
14507 * ax.h (struct eval_agent_expr_context): New.
14508 (gdb_eval_agent_expr): Update declaration.
14509 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14510 TFRAME. Add new argument CTX.
14511 * server.h (struct eval_agent_expr_context): Declare.
14512 (agent_mem_read, agent_tsv_read): Update declaration.
14513 (agent_mem_read_string): Likewise.
14514 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14515 (add_traceframe_block): Add new argument TPOINT.
14516 Increase TPOINT->traceframe_usage.
14517 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14518 eval_tracepoint_agent_expr.
14519 (condition_true_at_tracepoint): Likewise.
14520 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14521 (agent_mem_read_string, agent_tsv_read): Likewise.
14522
14523 2013-01-16 Yao Qi <yao@codesourcery.com>
14524
14525 * linux-low.c (linux_resume_one_lwp): Don't check
14526 'lwp->bp_reinsert != 0'.
14527
14528 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14529 Pedro Alves <palves@redhat.com>
14530
14531 * lynx-low.c (ptrace_request_to_str): Define a temporary
14532 macro and use it to simplify this function's implementation.
14533
14534 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14535
14536 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14537 sets errno.
14538
14539 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14540
14541 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14542
14543 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14544
14545 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14546
14547 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14548
14549 * lynx-low.c (lynx_resume): Use the resume_info parameter
14550 to determine the ptid for the lynx_ptrace call, unless
14551 it is equal to minus_one_ptid, in which case we use the
14552 ptid of the current_inferior.
14553 (lynx_wait_1): After having received a thread create/exit
14554 event, resume the inferior's execution using the signaling
14555 thread's ptid, rather than the old ptid.
14556
14557 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14558
14559 * lynx-low.c (lynx_resume): Delete variable ret.
14560
14561 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14562
14563 * gdbreplay.c (gdbreplay_version): Update copyright year.
14564 * server.c (gdbserver_version): Likewise.
14565
14566 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14567
14568 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14569 new thread.
14570
14571 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14572
14573 * lynx-low.c (ptrace_request_to_str): Add handling for
14574 PTRACE_GETTRACESIG.
14575
14576 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14577
14578 * lynx-low.c (lynx_attach): Delete variable new_process.
14579
14580 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14581
14582 * lynx-low.c (lynx_create_inferior): Delete variable
14583 new_process.
14584
14585 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14586
14587 * lynx-low.c (ptrace_request_to_str): Do not handle
14588 PTRACE_GETTHREADLIST if this macro does not exist.
14589
14590 2012-12-15 Yao Qi <yao@codesourcery.com>
14591
14592 * Makefile.in (OBS): Add notif.o.
14593 * notif.c, notif.h: New.
14594 * server.c: Include "notif.h".
14595 (struct vstop_notif) <next>: Remove.
14596 <base>: New field.
14597 (queue_stop_reply): Update.
14598 (push_event, send_next_stop_reply): Remove.
14599 (discard_queued_stop_replies): Update.
14600 (notif_stop): New variable.
14601 (handle_v_stopped): Remove.
14602 (handle_v_requests): Don't call handle_v_stopped. Call
14603 handle_ack_notif instead.
14604 (queue_stop_reply_callback): Call notif_event_enque instead
14605 of queue_stop_reply.
14606 (handle_status): Don't call send_next_stop_reply, call
14607 notif_write_event instead.
14608 (kill_inferior_callback): Likewise.
14609 (detach_or_kill_inferior_callback): Likewise.
14610 (main): Call initialize_notif.
14611 (process_serial_event): Call QUEUE_is_empty.
14612 (handle_target_event): Call notif_push instead of push event.
14613 * server.h (push_event): Remove declaration.
14614
14615 2012-12-10 Tom Tromey <tromey@redhat.com>
14616
14617 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14618 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14619 macros.
14620 (.c.o): Rewrite.
14621 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14622 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14623 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14624 (amd64-linux-ipa.o, ax.o): Rewrite.
14625 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14626 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14627 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14628 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14629 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14630 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14631 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14632 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14633 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14634 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14635 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14636 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14637 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14638 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14639 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14640 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14641 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14642 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14643 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14644 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14645 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14646 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14647 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14648 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14649 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14650 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14651 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14652 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14653 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14654 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14655 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14656 (reg-tilegx.o): Remove.
14657 (all_object_files): New macro.
14658 Include .deps files.
14659 * aclocal.m4, configure: Rebuild.
14660 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14661 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14662 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14663
14664 2012-12-05 Tom Tromey <tromey@redhat.com>
14665
14666 PR gdb/14917:
14667 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14668
14669 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14670
14671 * configure.ac: Check for linux/perf_event.h.
14672 * config.in: Regenerated.
14673 * configure: Regenerated.
14674
14675 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14676
14677 * hostio.c (handle_readlink): Decrease buffer size
14678 parameter passed to readlink by one byte.
14679
14680 2012-11-26 Yao Qi <yao@codesourcery.com>
14681
14682 * configure.ac (build_warnings): Append '-Wempty-body'.
14683 * configure: Regenerated.
14684 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14685 body.
14686
14687 2012-11-15 Pierre Muller <muller@sourceware.org>
14688
14689 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14690 * config.in: Regenerate.
14691 * configure: Regenerate.
14692 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14693 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14694 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14695 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14696 header.
14697 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14698 instead of <sys/wait.h> header.
14699 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14700
14701 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14702
14703 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14704 (various make rules): Remove -DGDBSERVER
14705
14706 2012-11-09 Yao Qi <yao@codesourcery.com>
14707
14708 * spu-low.c (current_ptid): Move it to ..
14709 * gdbthread.h: ... here. New.
14710 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14711 * server.c (myresume, process_serial_event): Likewise.
14712 * thread-db.c (thread_db_find_new_threads): Likewise.
14713 * tracepoint.c (run_inferior_command): Likewise.
14714
14715 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14716
14717 * server.c (handle_search_memory_1): Include access length in
14718 warning message.
14719
14720 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14721
14722 * linux-crisv32-low.c: Fix compile errors.
14723
14724 2012-09-04 Yao Qi <yao@codesourcery.com>
14725
14726 * tracepoint.c (cmd_qtsv): Adjust debug message.
14727 Don't check CUR_TPOINT.
14728
14729 2012-08-28 Yao Qi <yao@codesourcery.com>
14730
14731 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14732 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14733 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14734 Remove declarations of xmalloc, xreallloc, xstrdup and
14735 freeargv.
14736 * Makefile.in (libiberty_h): New.
14737 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14738 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14739
14740 2012-08-23 Yao Qi <yao@codesourcery.com>
14741
14742 * server.h: Remove declaration of 'xsnprintf'.
14743
14744 2012-08-22 Keith Seitz <keiths@redhat.com>
14745
14746 * server.h: Include build-gnulib-gbserver/config.h.
14747 * gdbreplay.c: Likewise.
14748
14749 2012-08-08 Doug Evans <dje@google.com>
14750
14751 * Makefile.in (SFILES): Add gdb_vecs.c.
14752 (OBS): Add gdb_vecs.o.
14753 (gdb_vecs_h, host_defs_h): New variables.
14754 (thread-db.o): Add $(gdb_vecs_h) dependency.
14755 (gdb_vecs.o): New rule.
14756 * thread-db.c: #include "gdb_vecs.h".
14757 (thread_db_load_search): Use a vector to iterate over path elements.
14758 Handle text appearing after "$pdir".
14759
14760 * configure.ac: Add check for strstr.
14761 * config.in: Regenerate.
14762 * configure: Regenerate.
14763
14764 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14765
14766 * hostio.c (handle_pread): If pread fails, fall back to attempting
14767 lseek/read.
14768 (handle_pwrite): Likewise for pwrite.
14769
14770 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14771
14772 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14773 between unsupported TYPE and unimplementable ADDR/LEN combination.
14774 (arm_insert_point): Act on new return value.
14775
14776 2012-07-31 Pedro Alves <palves@redhat.com>
14777
14778 * server.c (process_point_options): Only skip tokens if we find
14779 one that is unrecognized. Don't treat 'X' specially while
14780 skipping unrecognized tokens.
14781
14782 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14783
14784 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14785 to 4-byte-align HW breakpoint addresses for Thumb.
14786
14787 2012-07-27 Yao Qi <yao@codesourcery.com>
14788
14789 PR remote/14161.
14790
14791 * server.h: Declare gdb_agent_about_to_close.
14792 * target.c (kill_inferior): Include "agent.h".
14793 New. Send command 'kill'.
14794 * target.h (kill_inferior): Removed macro.
14795 * tracepoint.c (gdb_agent_about_to_close): New.
14796 (gdb_agent_helper_thread): Handle command 'close'.
14797 Wait endlessly until the inferior stops.
14798 Install gdb_agent_remove_socket to atexit hook.
14799 (agent_socket_name): New static variable.
14800 (gdb_agent_socket_init): Replace local variable 'name' with
14801 'agent_socket_name'.
14802 (gdb_agent_remove_socket): New.
14803
14804 2012-07-27 Yao Qi <yao@codesourcery.com>
14805
14806 * server.c (process_point_options): Stop at 'X' when parsing.
14807
14808 2012-07-19 Michael Eager <eager@eagercon.com>
14809
14810 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14811 to hw_execute.
14812 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14813 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14814 hardware breakpoint.
14815
14816 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14817
14818 * gdbserver/linux-low.c (initialize_low): Call
14819 linux_ptrace_init_warnings.
14820
14821 2012-07-02 Doug Evans <dje@google.com>
14822
14823 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14824 pointer to int.
14825
14826 2012-07-02 Stan Shebs <stan@codesourcery.com>
14827
14828 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14829 (ax.o): Add it to build rule.
14830 (ax-ipa.o): Ditto.
14831 (OBS): Add format.o.
14832 (IPA_OBS): Add format.o.
14833 * server.c (handle_query): Claim support for breakpoint commands.
14834 (process_point_options): Add command case.
14835 (process_serial_event): Leave running if there are printfs in
14836 effect.
14837 * mem-break.h (any_persistent_commands): Declare.
14838 (add_breakpoint_commands): Declare.
14839 (gdb_no_commands_at_breakpoint): Declare.
14840 (run_breakpoint_commands): Declare.
14841 * mem-break.c (struct point_command_list): New struct.
14842 (struct breakpoint): New field command_list.
14843 (any_persistent_commands): New function.
14844 (add_commands_to_breakpoint): New function.
14845 (add_breakpoint_commands): New function.
14846 (gdb_no_commands_at_breakpoint): New function.
14847 (run_breakpoint_commands): New function.
14848 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14849 locally.
14850 * ax.c: Include format.h.
14851 (ax_printf): New function.
14852 (gdb_eval_agent_expr): Add printf opcode.
14853
14854 2012-06-13 Yao Qi <yao@codesourcery.com>
14855
14856 * server.c (start_inferior): Remove duplicated writes to fields
14857 'last_resume_kind' and 'last_status' of 'current_inferior'.
14858
14859 2012-06-12 Yao Qi <yao@codesourcery.com>
14860 Pedro Alves <palves@redhat.com>
14861
14862 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14863 comment.
14864 * server.c (handle_v_cont): Extend comment.
14865
14866 2012-06-11 Yao Qi <yao@codesourcery.com>
14867
14868 * linux-low.c (linux_attach): Add 'static'.
14869
14870 2012-06-06 Yao Qi <yao@codesourcery.com>
14871
14872 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14873
14874 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14875
14876 Fix gcc -flto compilation warning.
14877 * server.c (main): Make variable multi_mode and attach volatile.
14878
14879 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14880
14881 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14882 if the platform doesn't know about it.
14883
14884 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14885
14886 * Makefile.in (SFILES): Add linux-tile-low.c.
14887 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14888 * configure.srv: Handle tilegx-*-linux*.
14889 * linux-tile-low.c: New file.
14890
14891 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14892
14893 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14894
14895 2012-05-24 Pedro Alves <palves@redhat.com>
14896
14897 PR gdb/7205
14898
14899 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14900
14901 2012-05-24 Pedro Alves <palves@redhat.com>
14902
14903 PR gdb/7205
14904
14905 Replace target_signal with gdb_signal throughout.
14906
14907 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14908
14909 * linux-low.c (linux_store_registers): Avoid the copying sequence
14910 when no data has been retrieved by ptrace.
14911
14912 2012-05-22 Will Deacon <will.deacon@arm.com>
14913
14914 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14915 Include asm/ptrace.h.
14916 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14917 already defined.
14918
14919 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14920
14921 * linux-low.c (linux_store_registers): Don't re-retrieve data
14922 with ptrace that has already been obtained from /proc. Always
14923 copy any data retrieved with ptrace to the buffer supplied.
14924
14925 2012-05-11 Yao Qi <yao@codesourcery.com>
14926 Pedro Alves <palves@redhat.com>
14927
14928 * linux-low.c (enum stopping_threads_kind): New.
14929 (stopping_threads): Change type to `enum stopping_threads_kind'.
14930 (handle_extended_wait): If stopping and suspending threads, leave
14931 the new_lwp suspended too.
14932 (linux_wait_for_event): Adjust.
14933 (stop_all_lwps): Set `stopping_threads' to
14934 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14935 whether we're suspending threads or just stopping them. Assert no
14936 recursion happens.
14937
14938 2012-04-29 Yao Qi <yao@codesourcery.com>
14939
14940 * server.h: Move some code to ...
14941 * gdbthread.h: ... here. New.
14942 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14943 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14944 (nto-low.o, win32-low.o): Likewise.
14945 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14946 * regcache.c, remote-utils.c, server.c: Likewise.
14947 * target.c, tracepoint.c, win32-low.c: Likewise.
14948
14949 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14950
14951 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14952 (PTRACE_ARG4_TYPE): Likewise.
14953 (PTRACE_XFER_TYPE): Likewise.
14954 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14955 ptrace to PTRACE_ARG3_TYPE.
14956 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14957 (PTRACE_ARG4_TYPE): Likewise.
14958 (PTRACE_XFER_TYPE): Likewise.
14959 (linux_detach_one_lwp): Cast fourth argument of
14960 ptrace to long then PTRACE_ARG4_TYPE.
14961 (regsets_fetch_inferior_registers): Cast third argument of
14962 ptrace to long then PTRACE_ARG3_TYPE.
14963 (regsets_store_inferior_registers): Likewise.
14964
14965 2012-04-20 Pedro Alves <palves@redhat.com>
14966
14967 * configure: Regenerate.
14968
14969 2012-04-19 Pedro Alves <palves@redhat.com>
14970
14971 * Makefile.in (GNULIB_BUILDDIR): New.
14972 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14973 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14974 (all, install-only, uninstall, clean-info, all-lib, clean): No
14975 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14976 (maintainer-clean realclean distclean): Use subdir_do.
14977 (subdir_do): New.
14978 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14979 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14980 * acinclude.m4: Include acx_configure_dir.m4.
14981 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14982 calls. Call AC_PROG_RANLIB. Configure gnulib using
14983 ACX_CONFIGURE_DIR.
14984 (GNULIB): New.
14985 (GNULIB_STDINT_H): Adjust.
14986 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
14987 * gdbreplay.c: Include build-gnulib/config.h.
14988 * server.h: Likewise.
14989 * aclocal.m4: Regenerate.
14990 * config.in: Regenerate.
14991 * configure: Regenerate.
14992
14993 2012-04-19 Pedro Alves <palves@redhat.com>
14994
14995 * Makefile.in (LIBGNU, INCGNU): Adjust.
14996 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
14997 (all, install-only, uninstall, clean-info, all-lib, clean)
14998 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
14999 * configure.ac: Adjust AC_OUTPUT output.
15000 * aclocal.m4: Regenerate.
15001 * configure: Regenerate.
15002
15003 2012-04-19 Pedro Alves <palves@redhat.com>
15004
15005 * Makefile.in (generated_files): New.
15006 (server_h): Remove the explicit dependency on config.h, and depend
15007 on $generated_files.
15008
15009 2012-04-19 Pedro Alves <palves@redhat.com>
15010
15011 * Makefile.in (INCGNU): Add -Ignulib.
15012
15013 2012-04-19 Pedro Alves <palves@redhat.com>
15014
15015 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15016 (INCGNU): ... this, and spell out -I here.
15017 (GNULIB_LIB): Rename to ...
15018 (LIBGNU): ... this.
15019 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15020
15021 2012-04-19 Pedro Alves <palves@redhat.com>
15022
15023 * config.in: Regenerate.
15024
15025 2012-04-19 Pedro Alves <palves@redhat.com>
15026
15027 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15028 * server.h (memmem): Remove declaration.
15029 * config.in: Regenerate.
15030 * configure: Regenerate.
15031
15032 2012-04-19 Yao Qi <yao@codesourcery.com>
15033
15034 * Makefile.in (SFILES): Add common/vec.c.
15035 (OBS): Add vec.o.
15036 (vec.o): New rule.
15037
15038 2012-04-19 Yao Qi <yao@codesourcery.com>
15039
15040 * remote-utils.c (prepare_resume_reply): Replace with macro
15041 target_core_of_thread.
15042 * server.c (handle_qxfer_threads_proper): Likewise.
15043 * target.h (traget_core_of_thread): New macro.
15044
15045 2012-04-18 Pedro Alves <palves@redhat.com>
15046
15047 * aclocal.m4: Regenerate.
15048 * configure: Regenerate.
15049
15050 2012-04-16 Yao Qi <yao@codesourcery.com>
15051
15052 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15053 duplicated on address.
15054
15055 2012-04-16 Yao Qi <yao@codesourcery.com>
15056
15057 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15058 (struct tracepoint_action_ops) <send>: New field.
15059 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15060 (agent_expr_send, x_tracepoint_action_send): New.
15061 (l_tracepoint_action_send): New.
15062 (cmd_qtdp): Download and install tracepoint
15063 according to `use_agent'.
15064 (run_inferior_command): Add one more parameter `len'.
15065 Update callers.
15066 (tracepoint_send_agent): New.
15067 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15068
15069 2012-04-16 Yao Qi <yao@codesourcery.com>
15070
15071 * tracepoint.c (download_tracepoints): Moved to ...
15072 (cmd_qtstart): ... here.
15073
15074 2012-04-14 Yao Qi <yao@codesourcery.com>
15075
15076 * tracepoint.c: Include inttypes.h.
15077 (struct collect_memory_action): Use sized types.
15078 (struct tracepoint): Likewise.
15079 (cmd_qtdp, stop_tracing): Update print specifiers.
15080 (cmd_qtp, response_tracepoint): Likewise.
15081 (collect_data_at_tracepoint): Likewise.
15082 (collect_data_at_step): Likewise.
15083
15084 2012-04-14 Yao Qi <yao@codesourcery.com>
15085
15086 Import gnulib module inttypes.
15087 * aclocal.m4, config.in, configure: Regenerated.
15088
15089 2012-04-14 Yao Qi <yao@codesourcery.com>
15090
15091 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15092 Makefile and config.status at last.
15093
15094 2012-04-13 Yao Qi <yao@codesourcery.com>
15095
15096 * tracepoint.c: Include stdint.h unconditionally.
15097
15098 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15099
15100 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15101 on BFD_HAVE_SYS_PROCFS_TYPE.
15102 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15103 * configure: Regenerate.
15104 * config.in: Likewise.
15105
15106 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15107
15108 * Makefile.in (clean): Also remove x32.c x32-linux.c
15109 x32-avx.c x32-avx-linux.c.
15110 (x32.o): New target.
15111 (x32.c): Likewise.
15112 (x32-linux.o): Likewise.
15113 (x32-linux.c): Likewise.
15114 (x32-avx.o): Likewise.
15115 (x32-avx.c): Likewise.
15116 (x32-avx-linux.o): Likewise.
15117 (x32-avx-linux.c): Likewise.
15118
15119 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15120 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15121 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15122 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15123 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15124 i386/x32-avx-linux.xml.
15125
15126 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15127 (init_registers_x32_avx_linux): Likwise.
15128 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15129 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15130
15131 2012-04-13 Pedro Alves <palves@redhat.com>
15132
15133 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15134 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15135 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15136 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15137 the sub-make.
15138
15139 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15140
15141 * linux-x86-low.c (compat_x32_clock_t): New.
15142 (compat_x32_siginfo_t): Likewise.
15143 (compat_x32_siginfo_from_siginfo): Likewise.
15144 (siginfo_from_compat_x32_siginfo): Likewise.
15145 (linux_is_elf64): Likewise.
15146 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15147 and siginfo_from_compat_x32_siginfo for x32.
15148 (x86_arch_setup): Set linux_is_elf64.
15149
15150 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15151
15152 PR gdb/13969
15153 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15154 e_machine field.
15155 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15156 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15157 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15158 compatible with process.
15159
15160 2012-04-12 Yao Qi <yao@codesourcery.com>
15161
15162 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15163 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15164 (install-only, install-info, clean): Handle sub dir gnulib.
15165 (all-lib, am--refresh): New targets.
15166 (memmem.o): Remove target.
15167 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15168 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15169 (AC_REPLACE_FUNCS): Remove memmem.
15170 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15171 (AC_OUTPUT): Generate Makefile in gnulib/.
15172 * aclocal.m4, config.in, configure: Regenerated.
15173
15174 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15175
15176 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15177
15178 2012-04-05 Pedro Alves <palves@redhat.com>
15179
15180 -Werror=strict-aliasing
15181
15182 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15183 pointer.
15184
15185 2012-04-04 Pedro Alves <palves@redhat.com>
15186
15187 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15188 (sparc_store_gregset_from_stack, sparc_store_gregset)
15189 (sparc_breakpoint_at): Fix formatting.
15190
15191 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15192
15193 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15194 are available.
15195 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15196 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15197 * config.in: Regenerate.
15198 * configure: Likewise.
15199
15200 2012-03-29 Pedro Alves <palves@redhat.com>
15201
15202 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15203 Correct ptrace arguments.
15204
15205 2012-03-28 Pedro Alves <palves@redhat.com>
15206
15207 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15208 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15209 (IA64_FR1_REGNUM): New defines.
15210 (ia64_fetch_register): New.
15211 (the_low_target): Install it.
15212 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15213 field.
15214 * linux-low.c (linux_fetch_registers): Try the
15215 the_low_target.fetch_register hook first.
15216
15217 * linux-arm-low.c (the_low_target): Adjust.
15218 * linux-bfin-low.c (the_low_target): Adjust.
15219 * linux-cris-low.c (the_low_target): Adjust.
15220 * linux-crisv32-low.c (the_low_target): Adjust.
15221 * linux-m32r-low.c (the_low_target): Adjust.
15222 * linux-m68k-low.c (the_low_target): Adjust.
15223 * linux-mips-low.c (the_low_target): Adjust.
15224 * linux-ppc-low.c (the_low_target): Adjust.
15225 * linux-s390-low.c (the_low_target): Adjust.
15226 * linux-sh-low.c (the_low_target): Adjust.
15227 * linux-sparc-low.c (the_low_target): Adjust.
15228 * linux-tic6x-low.c (the_low_target): Adjust.
15229 * linux-x86-low.c (the_low_target): Adjust.
15230 * linux-xtensa-low.c (the_low_target): Adjust.
15231
15232 2012-03-26 Pedro Alves <palves@redhat.com>
15233
15234 * server.c (handle_qxfer_libraries): Don't bail early if
15235 the_target->qxfer_libraries_svr4 is not NULL.
15236
15237 2012-03-26 Pedro Alves <palves@redhat.com>
15238
15239 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15240
15241 2012-03-23 Pedro Alves <palves@redhat.com>
15242
15243 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15244 "library-list-svr4" element's start tag when the the DSO list is
15245 empty.
15246
15247 2012-03-23 Pedro Alves <palves@redhat.com>
15248
15249 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15250 a variable whose type size is the same as the inferior's pointer
15251 size.
15252
15253 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15254
15255 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15256 struct siginfo.
15257 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15258 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15259 * linux-low.h: Include <signal.h>.
15260 (struct siginfo): Remove forward declaration.
15261 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15262 struct siginfo.
15263
15264 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15265
15266 * .gitignore: Ignore more files.
15267
15268 2012-03-19 Pedro Alves <palves@redhat.com>
15269 Jan Kratochvil <jan.kratochvil@redhat.com>
15270
15271 * server.c (cont_thread, general_thread): Add describing comments.
15272 (start_inferior): Clear `cont_thread'.
15273 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15274 of a process.
15275
15276 2012-03-15 Yao Qi <yao@codesourcery.com>
15277
15278 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15279 handling to ...
15280 (cmd_qtdp): ... here.
15281
15282 2012-03-15 Yao Qi <yao@codesourcery.com>
15283
15284 * tracepoint.c (struct tracepoint_action_ops): New.
15285 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15286 (m_tracepoint_action_download): New.
15287 (r_tracepoint_action_download): New.
15288 (x_tracepoint_action_download): New.
15289 (l_tracepoint_action_download): New.
15290 (add_tracepoint_action): Install `action->ops' according type.
15291 (download_tracepoint_1): Move code `download' function pointer
15292 of various tracepoint_action_ops.
15293
15294 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15295
15296 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15297 linux_ptrace_attach_warnings.
15298
15299 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15300
15301 * Makefile.in (linux-ptrace.o): New.
15302 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15303 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15304 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15305 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15306 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15307 of these targets.
15308 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15309
15310 2012-03-08 Yao Qi <yao@codesourcery.com>
15311 Pedro Alves <palves@redhat.com>
15312
15313 Fix PR server/13392.
15314 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15315 offset of JMP insn.
15316 * tracepoint.c (remove_tracepoint): New.
15317 (cmd_qtdp): Call remove_tracepoint when failed to install.
15318
15319 2012-03-07 Pedro Alves <palves@redhat.com>
15320
15321 * linux-low.c (get_detach_signal): New.
15322 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15323 Pass on pending signals to PTRACE_DETACH. Check the result of the
15324 ptrace call.
15325 * server.c (program_signals, program_signals_p): New.
15326 (handle_general_set): Handle QProgramSignals.
15327 * server.h (program_signals, program_signals_p): Declare.
15328
15329 2012-03-05 Pedro Alves <palves@redhat.com>
15330 Jan Kratochvil <jan.kratochvil@redhat.com>
15331
15332 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15333 New comment why.
15334
15335 2012-03-03 Yao Qi <yao@codesourcery.com>
15336
15337 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15338 agent_look_up_symbols.
15339
15340 2012-03-03 Yao Qi <yao@codesourcery.com>
15341
15342 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15343 (linux-x86-low.o): Likewise.
15344 * server.h: Remove in_process_agent_loaded.
15345 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15346 common/agent.c.
15347 Update callers.
15348
15349 2012-03-03 Yao Qi <yao@codesourcery.com>
15350
15351 * tracepoint.c (gdb_agent_capability): New global.
15352 (in_process_agent_loaded_ust): Renamed to
15353 `in_process_agent_supports_ust'.
15354 Update callers.
15355 (in_process_agent_supports_ust): Call agent_capability_check.
15356 (clear_installed_tracepoints): Assert that agent supports
15357 agent.
15358
15359 2012-03-03 Yao Qi <yao@codesourcery.com>
15360
15361 * linux-low.c (linux_supports_agent): New.
15362 (linux_target_ops): Initialize field `supports_agent' with
15363 linux_supports_agent.
15364 * target.h (struct target_ops) <supports_agent>: New.
15365 (target_supports_agent): New macro.
15366 * server.c (handle_general_set): Handle packet 'QAgent'.
15367 (handle_query): Send `QAgent+'.
15368 * Makefile.in (server.o): Depends on agent.h.
15369
15370 2012-03-03 Yao Qi <yao@codesourcery.com>
15371
15372 * Makefile.in (OBS): Add agent.o.
15373 Add new rule for agent.o.
15374 Track dependence of tracepoint.c on agent.h.
15375 * tracepoint.c (run_inferior_command_1):
15376 (run_inferior_command): Call agent_run_command.
15377 (gdb_ust_connect_sync_socket): Deleted. Move it to
15378 common/agent.c.
15379 (resume_thread, stop_thread): Likewise.
15380 (gdb_ust_socket_init): Renamed to ...
15381 (gdb_agent_socket_init): ... New.
15382 (gdb_ust_thread): Renamed to ...
15383 (gdb_agent_helper_thread): ... New.
15384 (gdb_ust_init): Move some code to ...
15385 (gdb_agent_init): ... here. New.
15386 [HAVE_UST]: Call gdb_ust_init.
15387 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15388 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15389 * config.in, configure: Regenerated.
15390
15391 2012-03-02 Pedro Alves <palves@redhat.com>
15392
15393 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15394 * linux-low.c (struct simple_pid_list): New.
15395 (stopped_pids): New a struct simple_pid_list pointer.
15396 (add_to_pid_list, pull_pid_from_list): New.
15397 (handle_extended_wait): Don't assume the first signal new children
15398 report is SIGSTOP. Adjust call to pull_pid_from_list.
15399 (linux_wait_for_lwp): Adjust.
15400
15401 2012-03-02 Yao Qi <yao@codesourcery.com>
15402
15403 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15404 debug log.
15405
15406 2012-03-02 Yao Qi <yao@codesourcery.com>
15407
15408 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15409 `stop_pc' and `tpoint'. Update caller.
15410
15411 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15412
15413 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15414 * linux-low.c (use_linux_regsets): New macro.
15415 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15416 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15417 (linux_register_in_regsets): New function.
15418 (usr_fetch_inferior_registers): Skip registers covered by
15419 regsets.
15420 (usr_store_inferior_registers): Likewise.
15421 (usr_fetch_inferior_registers): New macro.
15422 (usr_store_inferior_registers): Likewise.
15423 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15424 (linux_store_registers): Likewise.
15425 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15426 prototype.
15427 (init_registers_mips64_dsp_linux): Likewise.
15428 (init_registers_mips_linux): New macro.
15429 (init_registers_mips_dsp_linux): Likewise.
15430 (mips_dsp_num_regs): Likewise.
15431 (DSP_BASE, DSP_CONTROL): New fallback macros.
15432 (mips_base_regs): New macro.
15433 (mips_regmap): Use it. Fix the size.
15434 (mips_dsp_regmap): New variable.
15435 (mips_dsp_regset_bitmap): Likewise.
15436 (mips_arch_setup): New function.
15437 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15438 than mips_regmap.
15439 (mips_cannot_store_register): Likewise.
15440 (the_low_target): Update .arch_setup, .num_regs and .regmap
15441 initializers. Add .regset_bitmap initializer.
15442 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15443 initializer.
15444 * linux-bfin-low.c (the_low_target): Likewise.
15445 * linux-cris-low.c (the_low_target): Likewise.
15446 * linux-crisv32-low.c (the_low_target): Likewise.
15447 * linux-ia64-low.c (the_low_target): Likewise.
15448 * linux-m32r-low.c (the_low_target): Likewise.
15449 * linux-m68k-low.c (the_low_target): Likewise.
15450 * linux-ppc-low.c (the_low_target): Likewise.
15451 * linux-s390-low.c (the_low_target): Likewise.
15452 * linux-sh-low.c (the_low_target): Likewise.
15453 * linux-sparc-low.c (the_low_target): Likewise.
15454 * linux-tic6x-low.c (the_low_target): Likewise.
15455 * linux-x86-low.c (the_low_target): Likewise.
15456 * linux-xtensa-low.c (the_low_target): Likewise.
15457 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15458 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15459 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15460 srv_xmlfiles.
15461 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15462 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15463
15464 2012-02-29 Yao Qi <yao@codesourcery.com>
15465 Pedro Alves <palves@redhat.com>
15466
15467 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15468 `step_over_finished' is true.
15469
15470 2012-02-27 Pedro Alves <palves@redhat.com>
15471
15472 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15473 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15474
15475 2012-02-27 Pedro Alves <palves@redhat.com>
15476
15477 PR server/9684
15478 * linux-low.c (pid_is_stopped): New.
15479 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15480
15481 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15482
15483 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15484 of conditions.
15485
15486 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15487
15488 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15489
15490 2012-02-24 Luis Machado <lgustavo@codesourcery>
15491
15492 * server.c (handle_query): Advertise support for target-side
15493 breakpoint condition evaluation.
15494 (process_point_options): New function.
15495 (process_serial_event): When inserting a breakpoint, check for
15496 a target-side condition that should be evaluated.
15497
15498 * mem-break.c: Include regcache.h and ax.h.
15499 (point_cond_list_t): New data structure.
15500 (breakpoint) <cond_list>: New field.
15501 (find_gdb_breakpoint_at): Make non-static.
15502 (delete_gdb_breakpoint_at): Clear any target-side
15503 conditions.
15504 (clear_gdb_breakpoint_conditions): New function.
15505 (add_condition_to_breakpoint): Likewise.
15506 (add_breakpoint_condition): Likewise.
15507 (gdb_condition_true_at_breakpoint): Likewise.
15508 (gdb_breakpoint_here): Return result directly instead
15509 of going through a local variable.
15510
15511 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15512 (clear_gdb_breakpoint_conditions): Likewise.
15513 (add_breakpoint_condition): Likewise.
15514 (gdb_condition_true_at_breakpoint): Likewise.
15515
15516 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15517 (need_step_over_p): Take target-side breakpoint condition into
15518 consideration.
15519
15520 2012-02-24 Luis Machado <lgustavo@codesourcery>
15521
15522 * server.h: Include tracepoint.h.
15523 (agent_mem_read, agent_get_trace_state_variable_value,
15524 agent_set_trace_state_variable_value,
15525 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15526 get_set_tsv_func_addr): New prototypes.
15527
15528 * ax.h: New include file.
15529 * ax.c: New source file.
15530
15531 * tracepoint.c: Include ax.h.
15532 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15533 agent_expr, eval_result_type): Move to ax.h.
15534 (parse_agent_expr): Rename to ...
15535 (gdb_parse_agent_expr): ... this, make it non-static and move
15536 to ax.h.
15537 (unparse_agent_expr) Rename to ...
15538 (gdb_unparse_agent_expr): ... this, make it non-static and move
15539 to ax.h.
15540 (eval_agent_expr): Rename to ...
15541 (eval_tracepoint_agent_expr): ... this.
15542 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15543 forward declarations.
15544 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15545 (agent_get_trace_state_variable_value): New function.
15546 (agent_set_trace_state_variable_value): New function.
15547 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15548 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15549 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15550 (condition_true_at_tracepoint): Likewise.
15551 (parse_agent_expr): Rename to ...
15552 (gdb_parse_agent_expr): ... this and move to ax.c.
15553 (unparse_agent_expr): Rename to ...
15554 (gdb_unparse_agent_expr): ... this and move to ax.c.
15555 (gdb_agent_op_name): Move to ax.c.
15556 (eval_agent_expr): Rename to ...
15557 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15558 and move to ax.c.
15559 (eval_tracepoint_agent_expr): New function.
15560 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15561 non-static.
15562 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15563 ax.c.
15564 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15565 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15566 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15567 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15568 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15569 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15570 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15571 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15572 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15573 (compile_bytecodes): Remove forward declaration.
15574 (is_goto_target): Move to ax.c.
15575 (compile_bytecodes): Move to ax.c and call
15576 agent_get_trace_state_variable_value (...) and
15577 agent_set_trace_state_variable_value (...).
15578
15579 * Makefile.in: Update ax.c and IPA dependencies.
15580
15581 2012-02-24 Pedro Alves <palves@redhat.com>
15582
15583 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15584 (cmd_bigqtbuffer_circular): ... this. Only handle
15585 'QTBuffer:circular:'.
15586 (handle_tracepoint_general_set): Adjust.
15587
15588 2012-02-16 Yao Qi <yao@codesourcery.com>
15589
15590 * inferiors.c: Move code to ...
15591 * dll.c: .... here. New.
15592 * server.h: Declare clear_dlls.
15593 * Makefile.in (SFILES): Add dll.c.
15594 (OBS): Add dll.o
15595 (dll.o): New rule.
15596
15597 2012-02-11 Yao Qi <yao@codesourcery.com>
15598
15599 * server.c: (handle_monitor_command): Add a new parameter
15600 `own_buf'.
15601 (handle_query): Update caller.
15602
15603 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15604
15605 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15606 * configure, config.in: Regenerate.
15607 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15608 is not defined.
15609
15610 2012-02-02 Pedro Alves <palves@redhat.com>
15611
15612 Try SIGKILL first, then PTRACE_KILL.
15613 * linux-low.c (linux_kill_one_lwp): New.
15614 (linux_kill_one_lwp): Rename to ...
15615 (kill_one_lwp_callback): ... this. Use the new
15616 linux_kill_one_lwp.
15617
15618 2012-02-02 Pedro Alves <palves@redhat.com>
15619
15620 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15621 inferior.
15622
15623 2012-01-27 Pedro Alves <palves@redhat.com>
15624
15625 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15626 (elf_64_file_p): Make static.
15627 (linux_pid_exe_is_elf_64_file): New.
15628 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15629 Delete declarations.
15630 (linux_pid_exe_is_elf_64_file): Declare.
15631 * linux-x86-low.c (x86_arch_setup): Use
15632 linux_pid_exe_is_elf_64_file.
15633
15634 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15635
15636 * linux-low.c (linux_wait_for_event_1): Rename to ...
15637 (linux_wait_for_event): ... here and merge it with former
15638 linux_wait_for_event - new variable wait_ptid, use it.
15639 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15640
15641 2012-01-23 Pedro Alves <palves@redhat.com>
15642
15643 * server.c (main): Avoid yet another case of infinite loop while
15644 detaching/killing after a longjmp.
15645
15646 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15647
15648 Code cleanup.
15649 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15650
15651 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15652
15653 * hostio.c (handle_readlink): New function.
15654 (handle_vFile): Call it to handle "vFile:readlink" packets.
15655
15656 2012-01-20 Pedro Alves <palves@redhat.com>
15657 Ulrich Weigand <ulrich.weigand@linaro.org>
15658
15659 * server.c (handle_v_requests): Only support vAttach and vRun to
15660 start multiple processes when in extended protocol mode.
15661
15662 2012-01-17 Pedro Alves <palves@redhat.com>
15663
15664 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15665 memalign plus mprotect to allocate the scratch buffer.
15666
15667 2012-01-13 Pedro Alves <palves@redhat.com>
15668
15669 * server.c (attach_inferior): Clear `cont_thread'.
15670
15671 2012-01-13 Pedro Alves <palves@redhat.com>
15672
15673 * server.c (main): Avoid infinite loop while detaching/killing
15674 after a longjmp.
15675
15676 2012-01-09 Doug Evans <dje@google.com>
15677
15678 * server.c (start_inferior): Set last_ptid in --wrapper case.
15679
15680 2012-01-06 Yao Qi <yao@codesourcery.com>
15681
15682 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15683 defined.
15684 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15685
15686 2012-01-04 Yao Qi <yao@codesourcery.com>
15687
15688 * tracepoint.c (cmd_qtdp): Print debug message
15689 for static tracepoint.
15690
15691 2012-01-04 Yao Qi <yao@codesourcery.com>
15692
15693 * tracepoint.c (trace_vdebug): Differentiate debug message
15694 between gdbserver and IPA.
15695
15696 2012-01-03 Yao Qi <yao@codesourcery.com>
15697
15698 * tracepoint.c (tracepoint_was_hit): Don't collect for
15699 static tracepoint.
15700
15701 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15702
15703 * terminal.h: Reformat copyright header.
15704
15705 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15706
15707 * server.c (gdbserver_version): Update copyright year.
15708 * gdbreplay.c (gdbreplay_version): Likewise.
15709
15710 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15711
15712 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15713
15714 Revert:
15715 2011-12-18 Hui Zhu <teawater@gmail.com>
15716 * linux-low.c (linux_create_inferior): Save return value to ret.
15717
15718 2011-12-18 Hui Zhu <teawater@gmail.com>
15719
15720 * linux-low.c (linux_create_inferior): Save return value to ret.
15721
15722 2011-12-16 Doug Evans <dje@google.com>
15723
15724 * linux-low.c (linux_create_inferior): If stdio connection,
15725 redirect stdin from /dev/null, stdout to stderr.
15726 * remote-utils.c (remote_is_stdio): New static global.
15727 (remote_connection_is_stdio): New function.
15728 (remote_prepare): Handle stdio connection.
15729 (remote_open): Ditto.
15730 (remote_close): Don't close stdin for stdio connections.
15731 (read_prim,write_prim): New functions. Replace all calls to
15732 read/write to these.
15733 * server.c (main): Watch for "-" argument. Move call to
15734 remote_prepare before start_inferior.
15735 * server.h (STDIO_CONNECTION_NAME): New macro.
15736 (remote_connection_is_stdio): Declare.
15737
15738 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15739 in debugging output.
15740
15741 2011-12-15 Yao Qi <yao@codesourcery.com>
15742
15743 * tracepoint.c: Include sys/syscall.h.
15744 (gdb_ust_thread): Remove preprocessor conditional.
15745
15746 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15747
15748 * linux-low.c (linux_detach_one_lwp): Call
15749 the_low_target.prepare_to_resume before detaching.
15750
15751 2011-12-14 Yao Qi <yao@codesourcery.com>
15752
15753 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15754 of write.
15755
15756 2011-12-14 Yao Qi <yao@codesourcery.com>
15757
15758 * i386-low.c (i386_low_stopped_data_address): Initialize local
15759 variable `control'.
15760
15761 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15762
15763 PR remote/13492
15764
15765 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15766 DR_CONTROL unless necessary. Extend comments.
15767 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15768 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15769
15770 2011-12-13 Yao Qi <yao@codesourcery.com>
15771
15772 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15773 macros.
15774 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15775
15776 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15777
15778 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15779 Print new debug message for such case.
15780
15781 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15782
15783 Fix overlapping memcpy.
15784 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15785 the read_inferior_memory transfer.
15786 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15787 write_inferior_memory transfer.
15788 (set_fast_tracepoint_jump): New variable buf. Use it for the
15789 read_inferior_memory and write_inferior_memory transfers.
15790 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15791 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15792 Use it for the write_inferior_memory transfer.
15793 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15794 buffers.
15795
15796 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15797
15798 * linux-low.c (fetch_register, store_register): Make code
15799 consistent, fix formatting.
15800
15801 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15802
15803 * linux-low.c (usr_store_inferior_registers): Factor out code
15804 to handle individual registers into...
15805 (store_register): ... this new function.
15806
15807 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15808
15809 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15810 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15811 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15812 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15813 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15814 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15815 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15816 (srv_xmlfiles): Add new XML files.
15817
15818 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15819 and <sys/uio.h>.
15820 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15821 (init_registers_s390_linux32v1): Add prototype.
15822 (init_registers_s390_linux32v2): Likewise.
15823 (init_registers_s390_linux64v1): Likewise.
15824 (init_registers_s390_linux64v2): Likewise.
15825 (init_registers_s390x_linux64v1): Likewise.
15826 (init_registers_s390x_linux64v2): Likewise.
15827 (s390_num_regs): Increment to 52.
15828 (s390_regmap): Add orig_r2 register.
15829 (s390_num_regs_3264): Increment to 68.
15830 (s390_regmap_3264): Add orig_r2 register.
15831 (s390_collect_ptrace_register): Handle orig_r2 register.
15832 (s390_supply_ptrace_register): Likewise.
15833 (s390_fill_last_break): New function.
15834 (s390_store_last_break): Likewise.
15835 (s390_fill_system_call): New function.
15836 (s390_store_system_call): Likewise.
15837 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15838 register sets.
15839 (s390_check_regset): New function.
15840 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15841 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15842 Update target_regsets for available register sets.
15843
15844 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15845 Jan Kratochvil <jan.kratochvil@redhat.com>
15846
15847 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15848 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15849 New.
15850 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15851 * linux-low.h (struct process_info_private): New member r_debug.
15852 * server.c (handle_qxfer_libraries): Call
15853 the_target->qxfer_libraries_svr4.
15854 (handle_qxfer_libraries_svr4): New function.
15855 (qxfer_packets): New entry "libraries-svr4".
15856 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15857 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15858 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15859 PACKET_qXfer_libraries_svr4.
15860
15861 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15862
15863 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15864 PSW address/mask between 8-byte and 16-byte formats.
15865 (s390_supply_ptrace_register): Likewise.
15866 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15867 basic addressing mode bit.
15868
15869 2011-11-24 Stan Shebs <stan@codesourcery.com>
15870
15871 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15872
15873 2011-11-17 Stan Shebs <stan@codesourcery.com>
15874
15875 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15876 (tracing_start_time): New global.
15877 (tracing_stop_time): New global.
15878 (tracing_user_name): New global.
15879 (tracing_notes): New global.
15880 (tracing_stop_note): New global.
15881 (cmd_qtstart): Set traceframe_usage, start_time.
15882 (stop_tracing): Set stop_time.
15883 (cmd_qtstatus): Report additional status.
15884 (cmd_qtp): New function.
15885 (handle_tracepoint_query): Call it.
15886 (cmd_qtnotes): New function.
15887 (handle_tracepoint_general_set): Call it.
15888 (get_timestamp): Rename from tsv_get_timestamp.
15889
15890 2011-11-14 Stan Shebs <stan@codesourcery.com>
15891 Kwok Cheung Yeung <kcy@codesourcery.com>
15892
15893 * linux-x86-low.c (small_jump_insn): New.
15894 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15895 trampoline and error message, build a trampoline and issue a small
15896 jump instruction to it.
15897 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15898 trampoline and error message.
15899 (x86_get_min_fast_tracepoint_insn_len): New.
15900 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15901 * linux-low.h (struct linux_target_ops): Add arguments to
15902 install_fast_tracepoint_jump_pad operation, add new operation.
15903 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15904 arguments.
15905 (linux_get_min_fast_tracepoint_insn_len): New function.
15906 (linux_target_op): Add new operation.
15907 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15908 (gdb_trampoline_buffer_end): Ditto.
15909 (gdb_trampoline_buffer_error): Ditto.
15910 (struct ipa_sym_addresses): Add fields for new IPA variables.
15911 (symbol_list): Add entries for new IPA variables.
15912 (struct tracepoint): Add fields to hold the address range of the
15913 trampoline used by the tracepoint.
15914 (trampoline_buffer_head): New static variable.
15915 (trampoline_buffer_tail): Ditto.
15916 (claim_trampoline_space): New function.
15917 (have_fast_tracepoint_trampoline_buffer): New function.
15918 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15919 structure.
15920 (install_fast_tracepoint): Ditto, also add error buffer argument.
15921 (cmd_qtminftpilen): New function.
15922 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15923 (fast_tracepoint_from_trampoline_address): New function.
15924 (fast_tracepoint_collecting): Handle trampoline as part of jump
15925 pad space.
15926 (set_trampoline_buffer_space): New function.
15927 (initialize_tracepoint): Initialize new IPA variables.
15928 * target.h (struct target_ops): Add arguments to
15929 install_fast_tracepoint_jump_pad operation, add new
15930 get_min_fast_tracepoint_insn_len operation.
15931 (target_get_min_fast_tracepoint_insn_len): New.
15932 (install_fast_tracepoint_jump_pad): Add arguments.
15933 * server.h (IPA_BUFSIZ): Define.
15934 * linux-i386-ipa.c: Include extra header files.
15935 (initialize_fast_tracepoint_trampoline_buffer): New function.
15936 (initialize_low_tracepoint): Call it.
15937 * server.h (set_trampoline_buffer_space): Declare.
15938 (claim_trampoline_space): Ditto.
15939 (have_fast_tracepoint_trampoline_buffer): Ditto.
15940
15941 2011-11-14 Yao Qi <yao@codesourcery.com>
15942
15943 * server.c (handle_query): Handle InstallInTrace for qSupported.
15944 * tracepoint.c (add_tracepoint): Sort list.
15945 (install_tracepoint, download_tracepoint): New.
15946 (cmd_qtdp): Call them to install and download tracepoints.
15947 (sort_tracepoints): Removed.
15948 (cmd_qtstart): Update.
15949
15950 2011-11-14 Yao Qi <yao@codesourcery.com>
15951
15952 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15953 * mem-break.h: Declare.
15954 * tracepoint.c (cmd_qtstart): Move some code to ...
15955 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15956 New.
15957 (download_tracepoints): Move some code to ...
15958 (download_tracepoint_1): ... here. New.
15959
15960 2011-11-08 Yao Qi <yao@codesourcery.com>
15961
15962 * remote-utils.c (relocate_instruction): A comment fix.
15963
15964 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15965
15966 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15967 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15968 dr_status_mirror and dr_control_mirror from debug_reg_state.
15969 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15970 (i386_initial_stuff): Remove use of deleted globals.
15971 (i386_get_thread_context, i386_set_thread_context,
15972 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15973 from debug_reg_state.
15974
15975 2011-11-05 Yao Qi <yao@codesourcery.com>
15976
15977 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15978 address as TPOINT's.
15979
15980 2011-11-02 Stan Shebs <stan@codesourcery.com>
15981
15982 * tracepoint.c (agent_mem_read_string): New function.
15983 (eval_agent_expr): Call it for tracenz.
15984 * server.c (handle_query): Report support for tracenz.
15985
15986 2011-11-02 Yao Qi <yao@codesourcery.com>
15987
15988 * tracepoint.c (cmd_qtstart): Remove unused local variables.
15989
15990 2011-11-02 Yao Qi <yao@codesourcery.com>
15991
15992 * target.h: Fix a typo in comment.
15993
15994 2011-10-31 Pedro Alves <pedro@codesourcery.com>
15995
15996 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
15997 clobber the breakpoints' shadows with fast tracepoint jumps.
15998 * mem-break.h (check_mem_write): Add `myaddr' parameter.
15999 * target.c (write_inferior_memory): Also pass MYADDR down to
16000 check_mem_write.
16001
16002 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16003
16004 * configure.ac: Check support for personality routine.
16005 * configure: Regenerate.
16006 * config.in: Likewise.
16007 * linux-low.c: Include <sys/personality.h>.
16008 Define ADDR_NO_RANDOMIZE if necessary.
16009 (linux_create_inferior): Disable address space randomization when
16010 forking inferior, if requested.
16011 (linux_supports_disable_randomization): New function.
16012 (linux_target_ops): Install it.
16013 * server.h (disable_randomization): Declare.
16014 * server.c (disable_randomization): New global variable.
16015 (handle_general_set): Handle QDisableRandomization.
16016 (handle_query): Likewise for qSupported.
16017 (main): Support --disable-randomization and --no-disable-randomization
16018 command line arguments.
16019 * target.h (struct target_ops): Add supports_disable_randomization.
16020 (target_supports_disable_randomization): New macro.
16021
16022 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16023
16024 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16025 ifdef check.
16026 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16027 [!PT_GETDSBT] (target_loadmap): New definition.
16028 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16029 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16030 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16031 and PT_GETDSBT to LINUX_LOADMAP.
16032 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16033 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16034
16035 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16036
16037 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16038 (arm_linux_hwbp_cap): New static variable.
16039 (arm_linux_get_hwbp_cap): Replace by ...
16040 (arm_linux_init_hwbp_cap): ... this new function.
16041 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16042 (arm_linux_get_hw_watchpoint_count): Likewise.
16043 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16044 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16045 (arm_prepare_to_resume): Use perror_with_name instead of error.
16046
16047 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16048
16049 * linux-arm-low.c: Include <signal.h>.
16050 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16051 (struct arm_linux_hwbp_cap): New data type.
16052 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16053 (struct arm_linux_hw_breakpoint): New data type.
16054 (MAX_BPTS, MAX_WPTS): Define.
16055 (struct arch_process_info, struct arch_lwp_info): New data types.
16056 (arm_linux_get_hwbp_cap): New function.
16057 (arm_linux_get_hw_breakpoint_count): Likewise.
16058 (arm_linux_get_hw_watchpoint_count): Likewise.
16059 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16060 (arm_hwbp_control_initialize): Likewise.
16061 (arm_hwbp_control_is_enabled): Likewise.
16062 (arm_hwbp_control_is_initialized): Likewise.
16063 (arm_hwbp_control_disable): Likewise.
16064 (arm_linux_hw_breakpoint_equal): Likewise.
16065 (arm_linux_hw_point_initialize): Likewise.
16066 (struct update_registers_data): New data structure.
16067 (update_registers_callback: New function.
16068 (arm_insert_point): Likewise.
16069 (arm_remove_point): Likewise.
16070 (arm_stopped_by_watchpoint): Likewise.
16071 (arm_stopped_data_address): Likewise.
16072 (arm_new_process): Likewise.
16073 (arm_new_thread): Likewise.
16074 (arm_prepare_to_resume): Likewise.
16075 (the_low_target): Register arm_insert_point, arm_remove_point,
16076 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16077 arm_new_thread, and arm_prepare_to_resume.
16078
16079 2011-09-15 Stan Shebs <stan@codesourcery.com>
16080
16081 * server.h (struct emit_ops): Add compare-goto fields.
16082 * tracepoint.c (gdb_agent_op_sizes): New table.
16083 (emit_eq_goto): New function.
16084 (emit_ne_goto): New function.
16085 (emit_lt_goto): New function.
16086 (emit_le_goto): New function.
16087 (emit_gt_goto): New function.
16088 (emit_ge_goto): New function.
16089 (is_goto_target): New function.
16090 (compile_bytecodes): Recognize special cases of compare-goto
16091 combinations and call specialized emitters for them.
16092 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16093 (amd64_emit_ne_goto): New function.
16094 (amd64_emit_lt_goto): New function.
16095 (amd64_emit_le_goto): New function.
16096 (amd64_emit_gt_goto): New function.
16097 (amd64_emit_ge_goto): New function.
16098 (amd64_emit_ops): Add the new functions.
16099 (i386_emit_eq_goto): New function.
16100 (i386_emit_ne_goto): New function.
16101 (i386_emit_lt_goto): New function.
16102 (i386_emit_le_goto): New function.
16103 (i386_emit_gt_goto): New function.
16104 (i386_emit_ge_goto): New function.
16105 (i386_emit_ops): Add the new functions.
16106
16107 2011-09-08 Stan Shebs <stan@codesourcery.com>
16108
16109 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16110 (i386_emit_epilogue): Restore %ebx.
16111
16112 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16113
16114 * server.c (step_thread): Remove definition.
16115 (process_serial_event): Don't handle Hs.
16116 * server.h (step_thread): Remove declaration.
16117 * target.c (set_desired_inferior): Remove use of step_thread.
16118
16119 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16120
16121 * linux-low.c: Include linux-procfs.h.
16122 (linux_attach_lwp_1): Update comments.
16123 (linux_attach): Scan for existing threads when attaching to a
16124 process that is the tgid.
16125 * Makefile.in: Update dependencies.
16126
16127 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16128
16129 * configure.srv: Add linux-procfs.o dependencies.
16130
16131 2011-08-14 Yao Qi <yao@codesourcery.com>
16132
16133 * target.h (struct target_ops): Fix indent.
16134 * win32-low.c (win32_target_ops): Fix comment.
16135
16136 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16137 Yao Qi <yao@codesourcery.com>
16138
16139 * Makefile.in (clean): Remove tic6x-*.c files.
16140 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16141 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16142 (tic6x-c64xp-linux.c): Likewise.
16143 * configure.srv: Add support for tic6x-*-uclinux.
16144 * linux-tic6x-low.c: New.
16145 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16146
16147 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16148 Yao Qi <yao@codesourcery.com>
16149
16150 * target.h (struct target_ops): Add read_loadmap.
16151 * linux-low.c (struct target_loadseg): New type.
16152 (struct target_loadmap): New type.
16153 (linux_read_loadmap): New function.
16154 (linux_target_ops): Add linux_read_loadmap.
16155 * server.c (handle_query): Support qXfer:fdpic:read packet.
16156 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16157 to NULL.
16158
16159 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16160
16161 * win32-low.c: Include <stdint.h>.
16162
16163 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16164
16165 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16166 to the inferior here.
16167 (i386_remove_aligned_watchpoint): Ditto.
16168 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16169 fit part of the watchpoint in the debug registers.
16170 (i386_update_inferior_debug_regs): New.
16171 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16172 registers, and only update the inferior on success.
16173 (i386_low_remove_watchpoint): Ditto.
16174
16175 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16176
16177 * linux-low.c (compare_ints, unique, list_threads, show_process,
16178 linux_core_of_thread): Delete.
16179 (linux_target_ops): Change linux_core_of_thread to
16180 linux_common_core_of_thread.
16181 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16182 * utils.c (malloc_failure): Change type of argument.
16183 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16184 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16185 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16186 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16187 (IPA_OBJS): Add common-utils-ipa.o.
16188 (ptid_h, linux_osdata_h): New macros.
16189 (server_h): Add common/common-utils.h, common/xml-utils.h,
16190 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16191 common/ptid.h.
16192 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16193 ptid.o, buffer.o): New rules.
16194 (linux-low.o): Add common/linux-osdata.h as a dependency.
16195 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16196 * configure.ac: Add AC_HEADER_DIRENT check.
16197 * config.in: Regenerate.
16198 * configure: Regenerate.
16199 * remote-utils.c (xml_escape_text): Delete.
16200 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16201 buffer_xml_printf): Move to common/buffer.c.
16202 * server.c (main): Remove call to initialize_inferiors.
16203 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16204 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16205 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16206 internal_error, gdb_assert, gdb_assert_fail): Delete.
16207 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16208 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16209 common/buffer.h.
16210 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16211 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16212 initialize_inferiors): Delete.
16213
16214 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16215
16216 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16217 symbol error.
16218
16219 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16220
16221 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16222 assertion.
16223 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16224
16225 2011-05-26 Yao Qi <yao@codesourcery.com>
16226
16227 * Makefile.in (thread-db.o): Track dependence to
16228 common/gdb_thread_db.h.
16229 * thread-db.c: include gdb_thread_db.h from right place.
16230
16231 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16232
16233 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16234 __FILE__ and __LINE__ to internal_error.
16235
16236 2011-05-13 Doug Evans <dje@google.com>
16237
16238 * thread-db.c (try_thread_db_load_from_sdir): New function.
16239 (try_thread_db_load_from_dir): New function.
16240 (thread_db_load_search): Handle $sdir, ignore $pdir.
16241 Remove trying of system directories if search of
16242 libthread-db-search-path fails, that is now done via $sdir.
16243
16244 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16245
16246 * server.c (handle_query): Add EnableDisableTracepoints to the list
16247 of supported features.
16248 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16249 tracepoints.
16250 (cmd_qtenable_disable): New.
16251 (cmd_qtstart): Install tracepoints even if disabled.
16252 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16253 receiving a QTEnable or QTDisable packet.
16254 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16255 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16256 tracepoints.
16257 (gdb_probe): Skip data collection if static tracepoint is disabled.
16258
16259 2011-05-10 Doug Evans <dje@google.com>
16260
16261 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16262
16263 2011-05-04 Doug Evans <dje@google.com>
16264
16265 * linux-low.c (linux_join): Skip process lookup.
16266 * spu-low.c (spu_join): Ditto.
16267 * server.c (join_inferiors_callback): Delete.
16268 (process_serial_event): For 'D' packet (detach) call join_inferior
16269 directly.
16270
16271 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16272
16273 * README: Don't mention xscale*-*-linux*.
16274 * configure.srv (xscale*-*-linux*): Don't handle target.
16275
16276 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16277
16278 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16279 casting pointers.
16280 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16281 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16282 (i386_emit_void_call_2): Likewise.
16283
16284 2011-04-26 Yao Qi <yao@codesourcery.com>
16285
16286 * linux-low.c: Move common macros to linux-ptrace.h.
16287 Include linux-ptrace.h.
16288 * Makefile.in (linux_ptrace_h): New.
16289 (linux-low.o): Depends on linux-ptrace.h.
16290
16291 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16292
16293 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16294 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16295 (remote_prepare): New function with most of the TCP code from ...
16296 (remote_open): ... here. Detect PORT here unconditionally. Move also
16297 setting transport_is_reliable.
16298 * server.c (run_once): New variable.
16299 (gdbserver_usage): Document it.
16300 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16301 the first run if RUN_ONCE.
16302 * server.h (run_once, remote_prepare): New declarations.
16303
16304 2011-04-19 Tom Tromey <tromey@redhat.com>
16305
16306 * win32-low.c (handle_load_dll): Remove duplicate "the".
16307
16308 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16309
16310 Remove support for old Cygwin 1.5 versions.
16311 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16312 function to avoid warning.
16313 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16314 warning.
16315
16316 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16317
16318 * gdbserver/server.h (Macro _): Define it if not available.
16319
16320 2011-03-14 Michael Snyder <msnyder@vmware.com>
16321
16322 * hostio.c (handle_close): Remove unnecessary null test.
16323
16324 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16325
16326 * Makefile.in (maintainer-clean realclean distclean): Remove
16327 "make ... subdir_do" command.
16328
16329 2011-03-10 Michael Snyder <msnyder@vmware.com>
16330
16331 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16332
16333 * server.c (handle_v_run): Free alloced buffer on early return.
16334
16335 2011-03-09 Yao Qi <yao@codesourcery.com>
16336
16337 Revert:
16338 2011-03-04 Yao Qi <yao@codesourcery.com>
16339
16340 * Makefile.in: Remove GNU make feature --directory.
16341
16342 2011-03-05 Yao Qi <yao@codesourcery.com>
16343
16344 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16345 (subdir_do): New make target. Copied from gdb/Makefile.
16346 (maintainer-clean, realclean, distclean, clean): Call corresponding
16347 make targets in common/Makefile.
16348
16349 2011-02-11 Yao Qi <yao@codesourcery.com>
16350
16351 * configure.ac: Call AC_PROG_RANLIB.
16352 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16353 * configure: Regenerate.
16354
16355 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16356
16357 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16358
16359 2011-03-06 Yao Qi <yao@codesourcery.com>
16360
16361 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16362
16363 2011-03-05 Yao Qi <yao@codesourcery.com>
16364
16365 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16366 (subdir_do): New make target. Copied from gdb/Makefile.
16367 (maintainer-clean, realclean, distclean, clean): Call corresponding
16368 make targets in common/Makefile.
16369
16370 2011-03-04 Yao Qi <yao@codesourcery.com>
16371
16372 * Makefile.in: Remove GNU make feature --directory.
16373
16374 2011-03-04 Michael Snyder <msnyder@vmware.com>
16375
16376 * server.c (queue_stop_reply): Call xmalloc not malloc.
16377
16378 2011-03-02 Michael Snyder <msnyder@vmware.com>
16379
16380 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16381
16382 2011-02-28 Michael Snyder <msnyder@vmware.com>
16383
16384 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16385 (cmd_qtframe): Ditto.
16386 (cmd_qtbuffer): Ditto.
16387 (cmd_bigqtbuffer): Ditto.
16388
16389 * utils.c (decimal2str): Initialize 'width' to nine, then
16390 don't mess with it.
16391
16392 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16393
16394 * hostio.c (require_data): Free *data, not data.
16395
16396 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16397
16398 * hostio.c (require_data): Use free, not xfree.
16399
16400 2011-02-27 Michael Snyder <msnyder@vmware.com>
16401
16402 * server.c (handle_query): Discard unused value.
16403
16404 * hostio.c (require_data): Free malloc memory before returning
16405 error.
16406
16407 2011-02-26 Michael Snyder <msnyder@vmware.com>
16408
16409 * linux-low.c (list_threads): Call closedir for dirent.
16410
16411 2011-02-27 Michael Snyder <msnyder@vmware.com>
16412
16413 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16414 a case statement falls through.
16415
16416 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16417
16418 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16419 in comparison.
16420
16421 2011-02-26 Michael Snyder <msnyder@vmware.com>
16422
16423 * utils.c (decimal2str): Eliminate dead code and dead param.
16424 (pulongest): Drop dead param from call to decimal2str.
16425 (plongest): Ditto.
16426
16427 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16428
16429 Revert the following patch (not approved yet):
16430 2011-02-21 Hui Zhu <teawater@gmail.com>
16431 * tracepoint.c (tp_printf): New function.
16432 (eval_agent_expr): Handle gdb_agent_op_printf.
16433
16434 2011-02-21 Hui Zhu <teawater@gmail.com>
16435
16436 * tracepoint.c (tp_printf): New function.
16437 (eval_agent_expr): Handle gdb_agent_op_printf.
16438
16439 2011-02-18 Tom Tromey <tromey@redhat.com>
16440
16441 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16442 (tracepoint.o): Likewise.
16443 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16444 (gdb_agent_op_names): Likewise.
16445
16446 2011-02-18 Tom Tromey <tromey@redhat.com>
16447
16448 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16449 gdb_agent_op_rot>: New constants.
16450 (gdb_agent_op_names): Add pick and roll.
16451 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16452 cases.
16453
16454 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16455
16456 * aclocal.m4: Regenerated with aclocal-1.11.1.
16457
16458 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16459
16460 * server.c (handle_qxfer_traceframe_info): New.
16461 (qxfer_packets): Register "traceframe-info".
16462 (handle_query): Report support for qXfer:traceframe-info:read+.
16463 * tracepoint.c (match_blocktype): New.
16464 (traceframe_find_block_type): Rename to ...
16465 (traceframe_walk_blocks): ... this. Add callback filter argument,
16466 and use it.
16467 (traceframe_find_block_type): New, reimplemented on top of
16468 traceframe_walk_blocks.
16469 (build_traceframe_info_xml): New.
16470 (traceframe_read_info): New.
16471 * server.h (traceframe_read_info): Declare.
16472
16473 2011-02-11 Yao Qi <yao@codesourcery.com>
16474
16475 * configure.ac: Call AC_PROG_RANLIB.
16476 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16477 * configure: Regenerate.
16478
16479 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16480
16481 * server.c (gdb_read_memory): Change return semantics to allow
16482 partial transfers.
16483 (handle_search_memory_1): Adjust.
16484 (process_serial_event) <'m' packet>: Handle partial transfers.
16485 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16486
16487 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16488
16489 * regcache.c (init_register_cache): Initialize
16490 regcache->register_status.
16491 (free_register_cache): Release regcache->register_status.
16492 (regcache_cpy): Copy register_status.
16493 (registers_to_string): Print 'x's for unavailable registers.
16494 (supply_register): Mark the register's status valid or
16495 unavailable, depending on whether a buffer was passed in or not.
16496 (supply_register_zeroed): New.
16497 (supply_regblock): Mark the registers' status valid or
16498 unavailable, depending on whether a buffer was passed in or not.
16499 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16500 (struct regcache): New `register_status' field.
16501 (supply_register_zeroed): Declare.
16502 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16503 supply_register_zeroed, rather than passing a NULL buffer to
16504 supply_register.
16505 * tracepoint.c (fetch_traceframe_registers): Update comment.
16506
16507 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16508
16509 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16510 buffer explicit.
16511
16512 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16513
16514 * server.h (decode_xfer_write): Change prototype.
16515 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16516 and don't extract the annex here.
16517 * server.c (decode_xfer_read): Remove `annex' parameter,
16518 and don't extract the annex here.
16519 (decode_xfer): New.
16520 (struct qxfer): New.
16521 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16522 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16523 (handle_qxfer_statictrace): New functions, abstracted out from
16524 handle_query, and made to use the struct qxfer interface.
16525 (handle_threads_qxfer_proper): Rename to ...
16526 (handle_qxfer_threads_proper): ... this.
16527 (handle_threads_qxfer): Rename to ...
16528 (handle_qxfer_threads): ... this. Adjust.
16529 (qxfer_packets): New array.
16530 (handle_qxfer): New function.
16531 (handle_query): Use handle_qxfer.
16532
16533 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16534
16535 * gdbreplay.c: Shorten lines of >= 80 columns.
16536 * linux-low.c: Ditto.
16537 * linux-ppc-low.c: Ditto.
16538 * linux-s390-low.c: Ditto.
16539 * linux-sparc-low.c: Ditto.
16540 * linux-x86-low.c: Ditto.
16541 * linux-xtensa-low.c: Ditto.
16542 * mem-break.c: Ditto.
16543 * nto-low.c: Ditto.
16544 * regcache.h: Ditto.
16545 * remote-utils.c: Ditto.
16546 * server.c: Ditto.
16547 * server.h: Ditto.
16548 * thread-db.c: Ditto.
16549 * tracepoint.c: Ditto.
16550 * utils.c: Ditto.
16551 * win32-low.h: Ditto.
16552
16553 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16554
16555 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16556 update.
16557
16558 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16559
16560 * server.c (gdbserver_version): Update copyright year in version
16561 output.
16562 * gdbreplay.c (gdbreplay_version): Ditto.
16563
16564 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16565
16566 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16567 * linux-bfin-low.c: New file.
16568 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16569 PT_DATA_ADDR for BFIN targets.
16570 * Makefile.in (SFILES): Add linux-bfin-low.c.
16571 (clean): Remove reg-bfin.c.
16572 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16573 * README: Mention supported Blackfin targets.
16574
16575 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16576
16577 * .gitignore: New file.
16578
16579 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16580
16581 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16582
16583 2010-10-22 Jie Zhang <jie@codesourcery.com>
16584
16585 * Makefile.in: Add FLAGS_TO_PASS variable.
16586 (install): Remove dependency of install-only and recursively
16587 invoke make for install-only.
16588
16589 2010-10-04 Doug Evans <dje@google.com>
16590
16591 * Makefile.in (uninstall): Use $(DESTDIR).
16592
16593 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16594
16595 PR gdb/11842
16596
16597 * linux-x86-low.c (compat_siginfo_from_siginfo)
16598 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16599 si_code is < 0. Check for si_code == SI_TIMER before checking for
16600 si_code < 0.
16601
16602 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16603
16604 * lynx-i386-low.c: New file.
16605 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16606
16607 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16608
16609 * lynx-low.c (ptrace_request_to_str): Remove handling for
16610 request values that have been removed in LynxOS 5.x.
16611
16612 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16613
16614 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16615 <ptrace.h>
16616
16617 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16618
16619 * configure.ac: Add --enable-inprocess-agent option.
16620 * configure: Rebuilt.
16621
16622 2010-09-06 Yao Qi <yao@codesourcery.com>
16623
16624 * linux-low.c (linux_kill): Remove unused variable.
16625 (linux_stabilize_threads): Likewise.
16626 * server.c (start_inferior): Likewise.
16627 (queue_stop_reply_callback): Likewise.
16628 * tracepoint.c (do_action_at_tracepoint): Likewise.
16629
16630 2010-09-06 Yao Qi <yao@codesourcery.com>
16631
16632 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16633 on return.
16634
16635 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16636
16637 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16638
16639 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16640
16641 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16642 "$(IPA_DEPFILES)".
16643
16644 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16645
16646 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16647 gdbserver/lynx-ppc-low.c: New files.
16648 * Makefile.in (lynx_low_h): New variable.
16649 (lynx-low.o, lynx-ppc-low.o): New rules.
16650 * configure.ac: On LynxOS, link with -lnetinet.
16651 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16652 * configure: regenerate.
16653
16654 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16655
16656 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16657 * configure.ac: Add check for vasprintf and vsnprintf.
16658 * configure, config.in: Regenerate.
16659 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16660
16661 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16662
16663 * gdbreplay.c: Move include of alloca.h up, next to include of
16664 malloc.h.
16665 * server.h: Add include of malloc.h.
16666 * mem-break.c: Remove include of malloc.h.
16667 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16668
16669 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16670
16671 * Makefile.in (memmem.o): Build with -Wno-error.
16672
16673 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16674
16675 * utils.c (xsnprintf): Make non-static.
16676 * server.h: Add xsnprintf declaration.
16677 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16678 replace calls to snprintf by calls to xsnprintf throughout.
16679
16680 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16681
16682 * configure.ac: Add configure check for alloca.
16683 * configure, config.in: Regenerate.
16684 * server.h: Include alloca.h if it exists.
16685 * gdbreplay.c: Include alloca.h if it exists.
16686
16687 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16688
16689 * linux-low.c (__SIGRTMIN): Define if not already defined.
16690 (linux_create_inferior): Check for __ANDROID__ rather than
16691 __SIGRTMIN.
16692 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16693 are already deferred.
16694 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16695 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16696 stopped and already has a pending signal to report.
16697 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16698 a pending signal to report or is moving out of a jump pad.
16699 (linux_init_signals): Check for __ANDROID__ rather than
16700 __SIGRTMIN.
16701
16702 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16703
16704 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16705 debug_threads check. Avoid a linear search when not doing debug
16706 output.
16707
16708 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16709
16710 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16711 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16712 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16713 (process_event): Change local fd's type to gdb_fildes_t.
16714 (create_file_handler): Adjust prototype.
16715 (delete_file_handler): Adjust prototype.
16716 (handle_file_event): Adjust prototype. Use pfildes.
16717 (create_file_event): Adjsut prototype.
16718 * remote-utils.c (remote_desc, listen_desc): Change type to
16719 gdb_fildes_t.
16720 * server.h: New gdb_fildes_t typedef.
16721 [USE_WIN32API]: Include winsock2.h.
16722 (delete_file_handler, add_file_handler): Adjust prototypes.
16723 (pfildes): Declare.
16724 * utils.c (pfildes): New.
16725
16726 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16727
16728 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16729 * configure: Regenerate.
16730
16731 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16732
16733 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16734 (linux_done_accessing_memory): ... this.
16735 (linux_target_ops): Adjust.
16736 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16737 * nto-low.c (nto_target_ops): Adjust comment.
16738 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16739 * spu-low.c (spu_target_ops): Adjust comment.
16740 * target.h (target_ops): Rename unprepare_to_access_memory field
16741 to done_accessing_memory.
16742 (unprepare_to_access_memory): Rename to ...
16743 (done_accessing_memory): ... this.
16744
16745 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16746
16747 * linux-low.c (linux_prepare_to_access_memory): New.
16748 (linux_unprepare_to_access_memory): New.
16749 (linux_target_ops): Install them.
16750 * server.c (read_memory): Rename to ...
16751 (gdb_read_memory): ... this. Use
16752 prepare_to_access_memory/prepare_to_access_memory.
16753 (write_memory): Rename to ...
16754 (gdb_write_memory): ... this. Use
16755 prepare_to_access_memory/prepare_to_access_memory.
16756 (handle_search_memory_1): Adjust.
16757 (process_serial_event): Adjust.
16758 * target.h (struct target_ops): New fields
16759 prepare_to_access_memory and unprepare_to_access_memory.
16760 (prepare_to_access_memory, unprepare_to_access_memory): New.
16761 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16762 prepare_to_access_memory/prepare_to_access_memory.
16763 * nto-low.c (nto_target_ops): Adjust.
16764 * spu-low.c (spu_target_ops): Adjust.
16765 * win32-low.c (win32_target_ops): Adjust.
16766
16767 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16768
16769 * Makefile.in (WARN_CFLAGS): Get it from configure.
16770 (WERROR_CFLAGS): New.
16771 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16772 * configure.ac: Introduce --enable-werror, which adds -Werror to
16773 the compiler command line. Enabled by default. Disable with
16774 --disable-werror. Add -Wdeclaration-after-statement
16775 Wpointer-arith and -Wformat-nonliteral to warning flags.
16776 * configure: Regenerate.
16777
16778 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16779
16780 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16781
16782 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16783
16784 * gdbreplay.c (remote_error): New.
16785 (gdbchar): New.
16786 (expect): Use gdbchar. Check for error reading from GDB.
16787 Clarify sync error output.
16788 (play): Check for errors writing to GDB.
16789 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16790 * remote-utils.c (getpkt): Check for errors writing to the remote
16791 descriptor.
16792
16793 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16794
16795 * linux-low.c (linux_wait_1): Move non-debugging code out of
16796 `debug_threads' control.
16797
16798 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16799
16800 * linux-low.c (linux_wait_1): Don't set last_status here.
16801 * server.c (push_event, queue_stop_reply_callback): Assert we're
16802 not pushing a TARGET_WAITKIND_IGNORE event.
16803 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16804 (myresume, handle_target_event): Set the thread's last_resume_kind
16805 and last_status from the target returned status.
16806
16807 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16808
16809 PR threads/10729
16810
16811 * linux-x86-low.c (update_debug_registers_callback): New.
16812 (i386_dr_low_set_addr): Use it.
16813 (i386_dr_low_get_addr): New.
16814 (i386_dr_low_set_control): Use update_debug_registers_callback.
16815 (i386_dr_low_get_control): New.
16816 (i386_dr_low_get_status): Adjust.
16817 * linux-low.c (linux_stop_lwp): New.
16818 * linux-low.h (linux_stop_lwp): Declare.
16819
16820 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16821 argument instead of a i386_debug_reg_state.
16822 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16823 a i386_debug_reg_state.
16824 (i386_insert_aligned_watchpoint): Adjust.
16825 (i386_remove_aligned_watchpoint): Adjust.
16826 (i386_low_stopped_data_address): Read the debug registers from the
16827 inferior instead of from the mirrors.
16828 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16829 (i386_dr_low_get_addr): Declare.
16830 (i386_dr_low_get_control): Declare.
16831 (i386_dr_low_get_status): Change prototype.
16832
16833 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16834 (i386_dr_low_get_addr): New.
16835 (i386_dr_low_get_control): New.
16836 (i386_dr_low_get_status): Adjust prototype. Return
16837 dr_status_mirror.
16838 (i386_initial_stuff): Clear dr_status_mirror and
16839 dr_control_mirror.
16840 (i386_get_thread_context): Adjust.
16841 (i386_set_thread_context): Adjust.
16842 (i386_thread_added): Adjust.
16843
16844 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16845
16846 * linux-low.h (linux_thread_area): Delete declaration.
16847
16848 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16849
16850 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16851 after its termination.
16852
16853 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16854
16855 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16856 (gdb_wants_all_stopped): Delete.
16857 (linux_wait_1): Don't call them.
16858 * server.c (handle_v_cont): Tag all threads as want-stopped.
16859 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16860 stopped as "client-wants-stopped".
16861
16862 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16863
16864 * Makefile.in (signals_h): New.
16865 (server_h): Depend on it.
16866 (server.o): Don't depend on $(signals_def).
16867 (signals.o): Depend on $(signals_def).
16868
16869 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16870
16871 * Makefile.in (signals_def): New.
16872 (server_h): Append include/gdb/signals.h and signals_def.
16873 (server.o): Append signals_def.
16874
16875 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16876
16877 * server.c (handle_target_event): Use target_signal_to_host for
16878 resume_info.sig initialization.
16879 * target.h (struct thread_resume) <sig>: New comment.
16880
16881 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16882
16883 * server.c (handle_query): strcpy() the returned string from paddress()
16884 instead of sprintf().
16885 * utils.c (paddress): Return phex_nz().
16886
16887 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16888
16889 * server.c (handle_v_cont): Call mourn_inferior if process
16890 just exited.
16891 (myresume): Likewise.
16892
16893 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16894
16895 Static tracepoints, and integration with UST.
16896
16897 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16898 * mem-break.c (uninsert_all_breakpoints)
16899 (reinsert_all_breakpoints): New.
16900 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16901 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16902 (gdb_agent_ust_loaded, helper_thread_id)
16903 (gdb_agent_helper_thread_id): New macros.
16904 (struct ipa_sym_addresses): Add addr_ust_loaded,
16905 addr_helper_thread_id, addr_cmd_buf.
16906 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16907 (in_process_agent_loaded_ust): New.
16908 (write_e_ust_not_loaded): New.
16909 (maybe_write_ipa_ust_not_loaded): New.
16910 (struct collect_static_trace_data_action): New.
16911 (enum tracepoint_type) <static_tracepoint>: New.
16912 (struct tracepoint) <handle>: Mention static tracepoints.
16913 (struct static_tracepoint_ctx): New.
16914 (CMD_BUF_SIZE): New.
16915 (add_tracepoint_action): Handle static tracepoint actions.
16916 (unprobe_marker_at): New.
16917 (clear_installed_tracepoints): Handle static tracepoints.
16918 (cmd_qtdp): Handle static tracepoints.
16919 (probe_marker_at): New.
16920 (cmd_qtstart): Handle static tracepoints.
16921 (response_tracepoint): Handle static tracepoints.
16922 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16923 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16924 (get_context_regcache): Handle static tracepoints.
16925 (do_action_at_tracepoint): Handle static tracepoint actions.
16926 (traceframe_find_block_type): Handle static trace data blocks.
16927 (traceframe_read_sdata): New.
16928 (download_tracepoints): Download static tracepoint actions.
16929 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16930 (GDB_PROBE_NAME): New.
16931 (ust_ops): New.
16932 (GET_UST_SYM): New.
16933 (USTF): New.
16934 (dlsym_ust): New.
16935 (ust_marker_to_static_tracepoint): New.
16936 (gdb_probe): New.
16937 (collect_ust_data_at_tracepoint): New.
16938 (gdb_ust_probe): New.
16939 (UNIX_PATH_MAX, SOCK_DIR): New.
16940 (gdb_ust_connect_sync_socket): New.
16941 (resume_thread, stop_thread): New.
16942 (run_inferior_command): New.
16943 (init_named_socket): New.
16944 (gdb_ust_socket_init): New.
16945 (cstr_to_hexstr): New.
16946 (next_st): New.
16947 (first_marker, next_marker): New.
16948 (response_ust_marker): New.
16949 (cmd_qtfstm, cmd_qtsstm): New.
16950 (unprobe_marker_at, probe_marker_at): New.
16951 (cmd_qtstmat, gdb_ust_thread): New.
16952 (gdb_ust_init): New.
16953 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16954 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16955 (ST_REGENTRY): New.
16956 (x86_64_st_collect_regmap): New.
16957 (X86_64_NUM_ST_COLLECT_GREGS): New.
16958 (AMD64_RIP_REGNUM): New.
16959 (supply_static_tracepoint_registers): New.
16960 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16961 (ST_REGENTRY): New.
16962 (i386_st_collect_regmap): New.
16963 (i386_NUM_ST_COLLECT_GREGS): New.
16964 (supply_static_tracepoint_registers): New.
16965 * server.c (handle_query): Handle qXfer:statictrace:read.
16966 <qSupported>: Report support for StaticTracepoints, and
16967 qXfer:statictrace:read features.
16968 * server.h (traceframe_read_sdata)
16969 (supply_static_tracepoint_registers): Declare.
16970 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16971 (unpack_varlen_hex): Include in IPA build.
16972 * Makefile.in (ustlibs, ustinc): New.
16973 (IPA_OBJS): Add remote-utils-ipa.o.
16974 ($(IPA_LIB)): Link -ldl and -lpthread.
16975 (UST_CFLAGS): New.
16976 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16977 * config.in, configure: Regenerate.
16978
16979 2010-06-20 Ian Lance Taylor <iant@google.com>
16980 Pedro Alves <pedro@codesourcery.com>
16981
16982 * linux-x86-low.c (always_true): Delete.
16983 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16984 trying to fool the compiler with always_true.
16985
16986 2010-06-20 Pedro Alves <pedro@codesourcery.com>
16987
16988 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
16989 conditions in gdbserver.
16990
16991 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
16992
16993 * spu-low.c (spu_read_memory): Wrap around local store limit.
16994 (spu_write_memory): Likewise.
16995
16996 2010-06-15 Pedro Alves <pedro@codesourcery.com>
16997
16998 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
16999 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17000 LONGEST uses.
17001 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17002 uses.
17003 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17004 uses with LONGEST uses.
17005
17006 2010-06-14 Stan Shebs <stan@codesourcery.com>
17007 Pedro Alves <pedro@codesourcery.com>
17008
17009 Bytecode compiler.
17010
17011 * linux-x86-low.c: Include limits.h.
17012 (add_insns): New.
17013 (always_true): New.
17014 (EMIT_ASM): New.
17015 (EMIT_ASM32): New.
17016 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17017 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17018 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17019 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17020 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17021 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17022 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17023 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17024 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17025 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17026 (amd64_emit_void_call_2): New.
17027 (amd64_emit_ops): New.
17028 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17029 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17030 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17031 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17032 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17033 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17034 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17035 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17036 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17037 (i386_emit_stack_adjust, i386_emit_int_call_1)
17038 (i386_emit_void_call_2): New.
17039 (i386_emit_ops): New.
17040 (x86_emit_ops): New.
17041 (the_low_target): Install x86_emit_ops.
17042 * server.h (struct emit_ops): New.
17043 (get_raw_reg_func_addr): Declare.
17044 (current_insn_ptr, emit_error): Declare.
17045 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17046 (set_trace_state_variable_value): New defines.
17047 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17048 addr_get_trace_state_variable_value and
17049 addr_set_trace_state_variable_value.
17050 (symbol_list): New fields for get_raw_reg,
17051 get_trace_state_variable_value and set_trace_state_variable_value.
17052 (condfn): New typedef.
17053 (struct tracepoint): New field `compiled_cond'.
17054 (do_action_at_tracepoint): Clear compiled_cond.
17055 (get_trace_state_variable_value, set_trace_state_variable_value):
17056 Export in the IPA.
17057 (condition_true_at_tracepoint): If there's a compiled condition,
17058 run that.
17059 (current_insn_ptr, emit_error): New globals.
17060 (struct bytecode_address): New.
17061 (get_raw_reg_func_addr): New.
17062 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17063 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17064 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17065 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17066 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17067 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17068 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17069 (compile_tracepoint_condition, compile_bytecodes): New.
17070 * target.h (emit_ops): Forward declare.
17071 (struct target_ops): New field emit_ops.
17072 (target_emit_ops): New.
17073 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17074 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17075 * linux-low.c (linux_emit_ops): New.
17076 (linux_target_ops): Install it.
17077 * linux-low.h (struct linux_target_ops): New field emit_ops.
17078
17079 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17080
17081 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17082 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17083
17084 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17085 Stan Shebs <stan@codesourcery.com>
17086
17087 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17088 (all): Depend on $(extra_libraries).
17089 (install-only): Install the IPA.
17090 (IPA_OBJS, IPA_LIB): New.
17091 (clean): Remove the IPA lib.
17092 (IPAGENT_CFLAGS): New.
17093 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17094 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17095 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17096 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17097 * configure.ac: Check for atomic builtins support in the compiler.
17098 (IPA_DEPFILES, extra_libraries): Define.
17099 * configure.srv (ipa_obj): Add description.
17100 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17101 (i[34567]86-*-linux*): Set ipa_obj.
17102 (x86_64-*-linux*): Set ipa_obj.
17103 * linux-low.c (stabilizing_threads): New.
17104 (supports_fast_tracepoints): New.
17105 (linux_detach): Stabilize threads before detaching.
17106 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17107 the lwp is either not stabilizing, or is moving out of a jump pad.
17108 (linux_fast_tracepoint_collecting): New.
17109 (maybe_move_out_of_jump_pad): New.
17110 (enqueue_one_deferred_signal): New.
17111 (dequeue_one_deferred_signal): New.
17112 (linux_wait_for_event_1): If moving out of a jump pad, defer
17113 pending signals to later.
17114 (linux_stabilize_threads): New.
17115 (linux_wait_1): Check if threads need moving out of jump pads, and
17116 do it if so.
17117 (stuck_in_jump_pad_callback): New.
17118 (move_out_of_jump_pad_callback): New.
17119 (lwp_running): New.
17120 (linux_resume_one_lwp): Handle moving out of jump pads.
17121 (linux_set_resume_request): Dequeue deferred signals.
17122 (need_step_over_p): Also step over fast tracepoint jumps.
17123 (start_step_over): Also uninsert fast tracepoint jumps.
17124 (finish_step_over): Also reinsert fast tracepoint jumps.
17125 (linux_install_fast_tracepoint_jump): New.
17126 (linux_target_ops): Install linux_stabilize_threads and
17127 linux_install_fast_tracepoint_jump_pad.
17128 * linux-low.h (linux_target_ops) <get_thread_area,
17129 install_fast_tracepoint_jump_pad>: New fields.
17130 (struct lwp_info) <collecting_fast_tracepoint,
17131 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17132 (linux_get_thread_area): Declare.
17133 * linux-x86-low.c (jump_insn): New.
17134 (x86_get_thread_area): New.
17135 (append_insns): New.
17136 (push_opcode): New.
17137 (amd64_install_fast_tracepoint_jump_pad): New.
17138 (i386_install_fast_tracepoint_jump_pad): New.
17139 (x86_install_fast_tracepoint_jump_pad): New.
17140 (the_low_target): Install x86_get_thread_area and
17141 x86_install_fast_tracepoint_jump_pad.
17142 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17143 (struct fast_tracepoint_jump): New.
17144 (fast_tracepoint_jump_insn): New.
17145 (fast_tracepoint_jump_shadow): New.
17146 (find_fast_tracepoint_jump_at): New.
17147 (fast_tracepoint_jump_here): New.
17148 (delete_fast_tracepoint_jump): New.
17149 (set_fast_tracepoint_jump): New.
17150 (uninsert_fast_tracepoint_jumps_at): New.
17151 (reinsert_fast_tracepoint_jumps_at): New.
17152 (set_breakpoint_at): Use write_inferior_memory.
17153 (uninsert_raw_breakpoint): Use write_inferior_memory.
17154 (check_mem_read): Mask out fast tracepoint jumps.
17155 (check_mem_write): Mask out fast tracepoint jumps.
17156 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17157 (set_fast_tracepoint_jump): Declare.
17158 (delete_fast_tracepoint_jump)
17159 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17160 (reinsert_fast_tracepoint_jumps_at): Declare.
17161 * regcache.c: Don't compile many functions when building the
17162 in-process agent library.
17163 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17164 the register buffer in the heap.
17165 (free_register_cache): If the register buffer isn't owned by the
17166 regcache, don't free it.
17167 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17168 pre-existing register caches.
17169 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17170 type.
17171 (convert_ascii_to_int): : Constify `from' parameter type.
17172 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17173 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17174 the needed buffer in-place.
17175 (relocate_instruction): New.
17176 * server.c (handle_query) <qSymbols>: If the target supports
17177 tracepoints, give it a chance of looking up symbols. Report
17178 support for fast tracepoints.
17179 (handle_status): Stabilize threads.
17180 (process_serial_event): Adjust.
17181 * server.h (struct fast_tracepoint_jump): Forward declare.
17182 (struct process_info) <fast_tracepoint_jumps>: New field.
17183 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17184 (decode_X_packet, decode_M_packet): Adjust.
17185 (relocate_instruction): Declare.
17186 (in_process_agent_loaded): Declare.
17187 (tracepoint_look_up_symbols): Declare.
17188 (struct fast_tpoint_collect_status): Declare.
17189 (fast_tracepoint_collecting): Declare.
17190 (force_unlock_trace_buffer): Declare.
17191 (handle_tracepoint_bkpts): Declare.
17192 (initialize_low_tracepoint)
17193 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17194 * target.h (struct target_ops) <stabilize_threads,
17195 install_fast_tracepoint_jump_pad>: New fields.
17196 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17197 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17198 [HAVE_STDINT_H]: Include stdint.h.
17199 (trace_debug_1): Rename to ...
17200 (trace_vdebug): ... this.
17201 (trace_debug): Rename to ...
17202 (trace_debug_1): ... this. Add `level' parameter.
17203 (trace_debug): New.
17204 (ATTR_USED, ATTR_NOINLINE): New.
17205 (IP_AGENT_EXPORT): New.
17206 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17207 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17208 (about_to_request_buffer_space, trace_buffer_is_full)
17209 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17210 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17211 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17212 (traceframe_write_count, traceframes_created)
17213 (trace_state_variables)
17214 New renaming defines.
17215 (struct ipa_sym_addresses): New.
17216 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17217 (symbol_list): New.
17218 (ipa_sym_addrs): New.
17219 (all_tracepoint_symbols_looked_up): New.
17220 (in_process_agent_loaded): New.
17221 (write_e_ipa_not_loaded): New.
17222 (maybe_write_ipa_not_loaded): New.
17223 (tracepoint_look_up_symbols): New.
17224 (debug_threads) [IN_PROCESS_AGENT]: New.
17225 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17226 (UNKNOWN_SIDE_EFFECTS): New.
17227 (stop_tracing): New.
17228 (flush_trace_buffer): New.
17229 (stop_tracing_bkpt): New.
17230 (flush_trace_buffer_bkpt): New.
17231 (read_inferior_integer): New.
17232 (read_inferior_uinteger): New.
17233 (read_inferior_data_pointer): New.
17234 (write_inferior_data_pointer): New.
17235 (write_inferior_integer): New.
17236 (write_inferior_uinteger): New.
17237 (struct collect_static_trace_data_action): Delete.
17238 (enum tracepoint_type): New.
17239 (struct tracepoint) <type>: New field `type'.
17240 <actions_str, step_actions, step_actions_str>: Only include in
17241 GDBserver.
17242 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17243 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17244 (tracepoints): Use IP_AGENT_EXPORT.
17245 (last_tracepoint): Don't include in the IPA.
17246 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17247 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17248 (alloced_trace_state_variables): New.
17249 (trace_state_variables): Use IP_AGENT_EXPORT.
17250 (traceframe_t): Delete unused variable.
17251 (circular_trace_buffer): Don't include in the IPA.
17252 (trace_buffer_start): Delete.
17253 (struct trace_buffer_control): New.
17254 (trace_buffer_free): Delete.
17255 (struct ipa_trace_buffer_control): New.
17256 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17257 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17258 New.
17259 (trace_buffer_ctrl): New.
17260 (TRACE_BUFFER_CTRL_CURR): New.
17261 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17262 Reimplement as macros.
17263 (trace_buffer_wrap): Delete.
17264 (traceframe_write_count, traceframe_read_count)
17265 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17266 (struct tracepoint_hit_ctx) <type>: New field.
17267 (struct fast_tracepoint_ctx): New.
17268 (memory_barrier): New.
17269 (cmpxchg): New.
17270 (record_tracepoint_error): Update atomically in the IPA.
17271 (clear_inferior_trace_buffer): New.
17272 (about_to_request_buffer_space): New.
17273 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17274 updating the same buffer.
17275 (add_tracepoint): Default the tracepoint's type to trap
17276 tracepoint, and orig_size to -1.
17277 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17278 internal variables.
17279 (create_trace_state_variable): New parameter `gdb'. Handle it.
17280 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17281 (cmd_qtdp): Handle fast tracepoints.
17282 (cmd_qtdv): Adjust.
17283 (max_jump_pad_size): New.
17284 (gdb_jump_pad_head): New.
17285 (get_jump_space_head): New.
17286 (claim_jump_space): New.
17287 (sort_tracepoints): New.
17288 (MAX_JUMP_SIZE): New.
17289 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17290 IPA.
17291 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17292 support. Upload fast traceframes, and delete internal IPA
17293 breakpoints.
17294 (stop_tracing_handler): New.
17295 (flush_trace_buffer_handler): New.
17296 (cmd_qtstop): Upload fast tracepoints.
17297 (response_tracepoint): Handle fast tracepoints.
17298 (tracepoint_finished_step): Upload fast traceframes. Set the
17299 tracepoint hit context's tracepoint type.
17300 (handle_tracepoint_bkpts): New.
17301 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17302 type. Add comment about fast tracepoints.
17303 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17304 non-existing action_str field.
17305 (get_context_regcache): Handle fast tracepoints.
17306 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17307 to the regcache.
17308 (fast_tracepoint_from_jump_pad_address): New.
17309 (fast_tracepoint_from_ipa_tpoint_address): New.
17310 (collecting_t): New.
17311 (force_unlock_trace_buffer): New.
17312 (fast_tracepoint_collecting): New.
17313 (collecting): New.
17314 (gdb_collect): New.
17315 (write_inferior_data_ptr): New.
17316 (target_tp_heap): New.
17317 (target_malloc): New.
17318 (download_agent_expr): New.
17319 (UALIGN): New.
17320 (download_tracepoints): New.
17321 (download_trace_state_variables): New.
17322 (upload_fast_traceframes): New.
17323 (IPA_FIRST_TRACEFRAME): New.
17324 (IPA_NEXT_TRACEFRAME_1): New.
17325 (IPA_NEXT_TRACEFRAME): New.
17326 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17327 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17328 (gdb_jump_pad_buffer_end): New.
17329 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17330 (initialize_tracepoint): Adjust.
17331 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17332 buffer. Initialize the low module.
17333 * utils.c (PREFIX, TOOLNAME): New.
17334 (malloc_failure): Use PREFIX.
17335 (error): In the IPA, an error causes an exit.
17336 (fatal, warning): Use PREFIX.
17337 (internal_error): Use TOOLNAME.
17338 (NUMCELLS): Increase to 10.
17339 * configure, config.in: Regenerate.
17340
17341 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17342
17343 * server.c (handle_query) <qSupported>: Do two passes over the
17344 qSupported string to avoid nesting strtok.
17345
17346 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17347
17348 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17349 (CDEPS): New.
17350 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17351 -Wl,--dynamic-list.
17352 * configure: Regenerate.
17353 * proc-service.list: New.
17354
17355 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17356
17357 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17358 New comment.
17359
17360 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17361
17362 * gdbreplay.c (remote_open): Check error return from socket() call by
17363 its equality to -1 not by it being negative.
17364 * remote-utils.c (remote_open): Likewise.
17365
17366 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17367
17368 * config.h: Regenerate.
17369
17370 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17371
17372 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17373 doesn't provide PTRACE_GET_THREAD_AREA.
17374
17375 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17376
17377 * linux-m68k-low.c: Include <asm/ptrace.h>
17378 (ps_get_thread_area): Implement.
17379
17380 2010-05-03 Doug Evans <dje@google.com>
17381
17382 * event-loop.c (struct callback_event): New struct.
17383 (callback_list): New global.
17384 (append_callback_event, delete_callback_event): New functions.
17385 (process_callback): New function.
17386 (start_event_loop): Call it.
17387 * remote-utils.c (NOT_SCHEDULED): Define.
17388 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17389 moved out of readchar.
17390 (readchar): Rewrite. Call reschedule before returning.
17391 (reset_readchar): New function.
17392 (remote_close): Call it.
17393 (process_remaining, reschedule): New functions.
17394 * server.h (callback_handler_func): New typedef.
17395 (append_callback_event, delete_callback_event): Declare.
17396
17397 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17398
17399 * proc-service.c (ps_pglobal_lookup): Use
17400 thread_db_look_up_one_symbol.
17401 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17402 parameter. Use it instead of all_symbols_looked_up.
17403 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17404 field.
17405 (all_symbols_looked_up): Don't declare.
17406 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17407 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17408 field.
17409 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17410 Set all_symbols_looked_up here.
17411 (thread_db_look_up_one_symbol): New.
17412 (thread_db_get_tls_address): Adjust.
17413 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17414 thread_db object on the heap, and tentatively set it in the
17415 process structure.
17416 (thread_db_init): Don't set all_symbols_looked_up here.
17417 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17418
17419 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17420
17421 * linux-low.c (linux_kill, linux_detach): Adjust.
17422 (status_pending_p_callback): Remove redundant statement. Check
17423 for !TARGET_WAITIKIND_IGNORE, instead of
17424 TARGET_WAITKIND_STOPPED.
17425 (handle_tracepoints): Make sure LWP is locked. Adjust.
17426 (linux_wait_for_event_1): Adjust.
17427 (linux_cancel_breakpoints): New.
17428 (unsuspend_one_lwp): New.
17429 (unsuspend_all_lwps): New.
17430 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17431 (send_sigstop_callback): Change return type to int, add new
17432 `except' parameter and handle it.
17433 (suspend_and_send_sigstop_callback): New.
17434 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17435 pass them down. If SUSPEND, also increment the lwp's suspend
17436 count.
17437 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17438 (need_step_over_p): Don't consider suspended LWPs.
17439 (start_step_over): Adjust.
17440 (proceed_one_lwp): Change return type to int, add new `except'
17441 parameter and handle it.
17442 (unsuspend_and_proceed_one_lwp): New.
17443 (proceed_all_lwps): Use find_inferior instead of
17444 for_each_inferior.
17445 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17446 also decrement the suspend count of LWPs. Pass `except' down,
17447 instead of hacking its suspend count.
17448 (linux_pause_all): Add `freeze' parameter. Adjust.
17449 (linux_unpause_all): New.
17450 (linux_target_ops): Install linux_unpause_all.
17451 * server.c (handle_status): Adjust.
17452 * target.h (struct target_ops): New fields `unpause_all' and
17453 `cancel_breakpoints'. Add new parameter to `pause_all'.
17454 (pause_all): Add new `freeze' parameter.
17455 (unpause_all): New.
17456 (cancel_breakpoints): New.
17457 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17458 cancel breakpoints.
17459 (cmd_qtstart): Pause threads.
17460 (stop_tracing): Pause threads, and cancel breakpoints.
17461 * win32-low.c (win32_target_ops): Adjust.
17462
17463 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17464
17465 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17466 the inferior right away from here...
17467 (linux_wait_1): ... to here, and adjust to check the thread's
17468 last_resume_kind instead of the lwp's step or stop_expected flags.
17469
17470 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17471
17472 * README: Use consistent `GDB' and `GDBserver' spellings.
17473
17474 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17475
17476 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17477 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17478 (linux_detach_one_lwp): Assume the lwp is stopped.
17479 (any_thread_of): Delete.
17480 (linux_detach): Stop all lwps here. Don't blindly delete all
17481 breakpoints.
17482 (delete_lwp_callback): New.
17483 (linux_mourn): Delete all lwps of the process that is gone.
17484 (linux_wait_1): Don't delete the last lwp of the process here.
17485 * mem-break.h (mark_breakpoints_out): Declare.
17486 * mem-break.c (mark_breakpoints_out): New.
17487 (free_all_breakpoints): Use it.
17488 * server.c (handle_target_event): If the process is gone, mark
17489 breakpoints out.
17490 * thread-db.c (struct thread_db) <create_bp>: New field.
17491 (thread_db_enable_reporting): Fix prototype. Store a thread event
17492 breakpoint reference in the thread_db struct.
17493 (thread_db_load_search): Clear the thread_db object.
17494 (try_thread_db_load_1): Ditto.
17495 (switch_to_process): New.
17496 (disable_thread_event_reporting): Use it.
17497 (remove_thread_event_breakpoints): New.
17498 (thread_db_detach, thread_db_mourn): Use it.
17499
17500 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17501
17502 * linux-low.c (linux_enable_event_reporting): New.
17503 (linux_wait_for_event_1, handle_extended_wait): Use it.
17504
17505 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17506
17507 * linux-low.c (linux_kill_one_lwp, linux_kill)
17508 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17509 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17510 SIGSTOP even if the LWP is stopped.
17511 (send_sigstop_callback): New.
17512 (stop_all_lwps): Use send_sigstop_callback instead.
17513 (linux_resume_one_thread): Adjust.
17514 (proceed_one_lwp): Still proceed an LWP that the client has
17515 requested to stop, if we haven't reported it as stopped yet. Make
17516 sure that LWPs the client want stopped, have a pending SIGSTOP.
17517
17518 2010-04-26 Doug Evans <dje@google.com>
17519
17520 * server.c (handle_general_set): Make static.
17521
17522 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17523 Print received char after testing for error/eof instead of before.
17524 (input_interrupt): Tweak comment.
17525
17526 2010-04-23 Doug Evans <dje@google.com>
17527
17528 * server.c (start_inferior): Print inferior argv if --debug.
17529
17530 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17531
17532 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17533 * nto-x86-low.c: Include server.h
17534
17535 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17536
17537 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17538 be consistent with other sources of this directory.
17539 (init_registers_amd64): Correct name of source file of this function
17540 in the comment.
17541
17542 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17543
17544 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17545 64-bit executables.
17546
17547 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17548
17549 * win32-i386-low.c: Add 64-bit support.
17550 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17551 (init_registers_amd64): Declare.
17552 (mappings): Add 64-bit version of array.
17553 (init_windows_x86): New function.
17554 (the_low_target): Change init_arch field to init_windows_x86.
17555
17556 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17557
17558 * win32-low.c: Adapt to support also 64-bit architecture.
17559 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17560 (get_image_name): Use SIZE_T type for local variable `done'.
17561 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17562 (toolhelp_get_dll_name): Idem.
17563 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17564 Use uintptr_t typecast to avoid warning.
17565 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17566 (handle_exception): Use phex_nz to avoid warning.
17567 (win32_wait): Remove unused local variable `process'.
17568
17569 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17570
17571 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17572 `amd64-avx.o'.
17573
17574 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17575
17576 * configure.ac: Use `ws2_32' library for srv_mingw.
17577 * configure: Regenerate.
17578 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17579 * remote-utils.c: Likewise.
17580
17581 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17582
17583 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17584 if __x86_64__ is defined.
17585
17586 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17587
17588 * configure: Regenerate.
17589
17590 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17591
17592 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17593 * target.h (target_ops): New get_tib_address field.
17594 * win32-low.h (win32_thread_info): Add thread_local_base field.
17595 * win32-low.c (child_add_thread): Add tlb argument.
17596 Set thread_local_base field to TLB.
17597 (get_child_debug_event): Adapt to child_add_thread change.
17598 (win32_get_tib_address): New function.
17599 (win32_target_ops): Set get_tib_address field to
17600 win32_get_tib_address.
17601 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17602
17603 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17604
17605 * linux-low.c (linux_mourn): Also remove the process.
17606 * server.c (handle_target_event): Don't remove the process here.
17607 * nto-low.c (nto_mourn): New.
17608 (nto_target_ops): Install it.
17609 * spu-low.c (spu_mourn): New.
17610 (spu_target_ops): Install it.
17611 * win32-low.c (win32_mourn): New.
17612 (win32_target_ops): Install it.
17613
17614 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17615
17616 * server.h (buffer_xml_printf): Remove redundant `;'.
17617
17618 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17619
17620 * regcache.c (set_register_cache): Invalidate regcaches before
17621 changing the register cache layout.
17622 (regcache_invalidate_one): Allow a NULL regcache.
17623 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17624 regcaches before changing the register cache layout or the target
17625 regsets.
17626
17627 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17628
17629 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17630 variable warning on Linux/x86-64.
17631
17632 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17633
17634 GDBserver disconnected tracing support.
17635
17636 * linux-low.c (linux_remove_process): Delete.
17637 (add_lwp): Don't set last_resume_kind here.
17638 (linux_kill): Use `mourn'.
17639 (linux_detach): Use `thread_db_detach', and `mourn'.
17640 (linux_mourn): New.
17641 (linux_attach_lwp_1): Adjust comment.
17642 (linux_attach): last_resume_kind moved the thread_info; adjust.
17643 (status_pending_p_callback): Adjust.
17644 (linux_wait_for_event_1): Adjust.
17645 (count_events_callback, select_singlestep_lwp_callback)
17646 (select_event_lwp_callback, cancel_breakpoints_callback)
17647 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17648 (proceed_one_lwp): Adjust.
17649 (linux_async): Add debug output.
17650 (linux_thread_stopped): New.
17651 (linux_pause_all): New.
17652 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17653 linux_pause_all.
17654 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17655 (thread_db_free): Delete declaration.
17656 (thread_db_detach, thread_db_mourn): Declare.
17657 * thread-db.c (thread_db_init): Use thread_db_mourn.
17658 (thread_db_free): Delete, split in two.
17659 (disable_thread_event_reporting): New.
17660 (thread_db_detach): New.
17661 (thread_db_mourn): New.
17662
17663 * server.h (struct thread_info) <last_resume_kind>: New field.
17664 <attached>: Add comment.
17665 <gdb_detached>: New field.
17666 (handler_func): Change return type to int.
17667 (handle_serial_event, handle_target_event): Ditto.
17668 (gdb_connected): Declare.
17669 (tracing): Delete.
17670 (disconnected_tracing): Declare.
17671 (stop_tracing): Declare.
17672
17673 * server.c (handle_query) <qSupported>: Report support for
17674 disconnected tracing.
17675 (queue_stop_reply_callback): Account for running threads.
17676 (gdb_wants_thread_stopped): New.
17677 (gdb_wants_all_threads_stopped): New.
17678 (gdb_reattached_process): New.
17679 (handle_status): Clear the `gdb_detached' flag of all processes.
17680 In all-stop, stop all threads.
17681 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17682 (process_serial_event): If the remote connection breaks, or if an
17683 exit was forced with "monitor exit", force an event loop exit.
17684 Handle disconnected tracing on detach.
17685 (handle_serial_event): Adjust.
17686 (handle_target_event): If GDB isn't connected, forward events back
17687 to the inferior, unless the last process exited, in which case,
17688 exit gdbserver. Adjust interface.
17689
17690 * remote-utils.c (remote_open): Don't block in accept. Instead
17691 register an event loop source on the listen socket file
17692 descriptor. Refactor bits into ...
17693 (listen_desc): ... this new global.
17694 (gdb_connected): ... this new function.
17695 (enable_async_notification): ... this new function.
17696 (handle_accept_event): ... this new function.
17697 (remote_close): Clear remote_desc.
17698
17699 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17700
17701 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17702 New fields.
17703 (mourn_inferior): Define.
17704 (target_process_qsupported): Avoid the dangling else problem.
17705 (thread_stopped): Define.
17706 (pause_all): Define.
17707 (target_waitstatus_to_string): Declare.
17708 * target.c (target_waitstatus_to_string): New.
17709
17710 * tracepoint.c (tracing): Make extern.
17711 (disconnected_tracing): New.
17712 (stop_tracing): Make extern. Handle tracing stops due to GDB
17713 disconnecting.
17714 (cmd_qtdisconnected): New.
17715 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17716 (handle_tracepoint_general_set): Handle QTDisconnected.
17717
17718 * event-loop.c (event_handler_func): Change return type to int.
17719 (process_event): Bail out if the event handler wants the event
17720 loop to stop.
17721 (handle_file_event): Ditto.
17722 (start_event_loop): Bail out if the event handler wants the event
17723 loop to stop.
17724
17725 * nto-low.c (nto_target_ops): Adjust.
17726 * spu-low.c (spu_wait): Don't remove the process here.
17727 (spu_target_ops): Adjust.
17728 * win32-low.c (win32_wait): Don't remove the process here.
17729 (win32_target_ops): Adjust.
17730
17731 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17732
17733 * regcache.c (realloc_register_cache): Invalidate inferior's
17734 regcache before recreating it.
17735
17736 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17737
17738 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17739
17740 2010-04-09 Stan Shebs <stan@codesourcery.com>
17741 Pedro Alves <pedro@codesourcery.com>
17742
17743 * server.h (LONGEST): New.
17744 (struct thread_info) <while_stepping>: New field.
17745 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17746 Declare.
17747 (initialize_tracepoint, handle_tracepoint_general_set)
17748 (handle_tracepoint_query, tracepoint_finished_step)
17749 (tracepoint_was_hit, release_while_stepping_state_list):
17750 (current_traceframe): Declare.
17751 * server.c (handle_general_set): Handle tracepoint packets.
17752 (read_memory): New.
17753 (write_memory): New.
17754 (handle_search_memory_1): Use read_memory.
17755 (handle_query): Report support for conditional tracepoints, trace
17756 state variables, and tracepoint sources. Handle tracepoint
17757 queries.
17758 (main): Initialize the tracepoints module.
17759 (process_serial_event): Handle traceframe reads/writes.
17760
17761 * linux-low.c (handle_tracepoints): New.
17762 (linux_wait_1): Call it.
17763 (linux_resume_one_lwp): Handle while-stepping.
17764 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17765 (linux_target_ops): Install them.
17766 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17767 New field.
17768 * linux-x86-low.c (x86_supports_tracepoints): New.
17769 (the_low_target). Install it.
17770
17771 * mem-break.h (delete_breakpoint): Declare.
17772 * mem-break.c (delete_breakpoint): Make external.
17773
17774 * target.h (struct target_ops): Add `supports_tracepoints',
17775 `read_pc', and `write_pc' fields.
17776 (target_supports_tracepoints): Define.
17777 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17778 (phex_nz): New.
17779
17780 * regcache.h (struct regcache) <registers_owned>: New field.
17781 (init_register_cache, regcache_cpy): Declare.
17782 (regcache_read_pc, regcache_write_pc): Declare.
17783 (register_cache_size): Declare.
17784 (supply_regblock): Declare.
17785 * regcache.c (init_register_cache): New.
17786 (new_register_cache): Use it.
17787 (regcache_cpy): New.
17788 (register_cache_size): New.
17789 (supply_regblock): New.
17790 (regcache_read_pc, regcache_write_pc): New.
17791
17792 * tracepoint.c: New.
17793
17794 * Makefile.in (OBS): Add tracepoint.o.
17795 (tracepoint.o): New rule.
17796
17797 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17798
17799 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17800 (i386-mmx.o): New.
17801 (i386-mmx.c): Likewise.
17802 (i386-mmx-linux.o): Likewise.
17803 (i386-mmx-linux.c): Likewise.
17804
17805 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17806 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17807 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17808 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17809
17810 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17811 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17812 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17813
17814 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17815
17816 * Makefile.in (clean): Updated.
17817 (i386-avx.o): New.
17818 (i386-avx.c): Likewise.
17819 (i386-avx-linux.o): Likewise.
17820 (i386-avx-linux.c): Likewise.
17821 (amd64-avx.o): Likewise.
17822 (amd64-avx.c): Likewise.
17823 (amd64-avx-linux.o): Likewise.
17824 (amd64-avx-linux.c): Likewise.
17825
17826 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17827 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17828 (srv_amd64_regobj): Add amd64-avx.o.
17829 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17830 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17831 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17832 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17833 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17834 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17835 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17836
17837 * i387-fp.c: Include "i386-xstate.h".
17838 (i387_xsave): New.
17839 (i387_cache_to_xsave): Likewise.
17840 (i387_xsave_to_cache): Likewise.
17841 (x86_xcr0): Likewise.
17842
17843 * i387-fp.h (i387_cache_to_xsave): Likewise.
17844 (i387_xsave_to_cache): Likewise.
17845 (x86_xcr0): Likewise.
17846
17847 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17848 * linux-crisv32-low.c (target_regsets): Likewise.
17849 * linux-m68k-low.c (target_regsets): Likewise.
17850 * linux-mips-low.c (target_regsets): Likewise.
17851 * linux-ppc-low.c (target_regsets): Likewise.
17852 * linux-s390-low.c (target_regsets): Likewise.
17853 * linux-sh-low.c (target_regsets): Likewise.
17854 * linux-sparc-low.c (target_regsets): Likewise.
17855 * linux-xtensa-low.c (target_regsets): Likewise.
17856
17857 * linux-low.c: Include <sys/uio.h>.
17858 (regsets_fetch_inferior_registers): Support nt_type.
17859 (regsets_store_inferior_registers): Likewise.
17860 (linux_process_qsupported): New.
17861 (linux_target_ops): Add linux_process_qsupported.
17862
17863 * linux-low.h (regset_info): Add nt_type.
17864 (linux_target_ops): Add process_qsupported.
17865
17866 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17867 and <sys/uio.h>.
17868 (init_registers_i386_avx_linux): New.
17869 (init_registers_amd64_avx_linux): Likewise.
17870 (xmltarget_i386_linux_no_xml): Likewise.
17871 (xmltarget_amd64_linux_no_xml): Likewise.
17872 (PTRACE_GETREGSET): Likewise.
17873 (PTRACE_SETREGSET): Likewise.
17874 (x86_fill_xstateregset): Likewise.
17875 (x86_store_xstateregset): Likewise.
17876 (use_xml): Likewise.
17877 (x86_linux_update_xmltarget): Likewise.
17878 (x86_linux_process_qsupported): Likewise.
17879 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17880 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17881 init_registers_i386_linux here. Call
17882 x86_linux_update_xmltarget.
17883 (the_low_target): Add x86_linux_process_qsupported.
17884
17885 * server.c (handle_query): Call target_process_qsupported.
17886
17887 * target.h (target_ops): Add process_qsupported.
17888 (target_process_qsupported): New.
17889
17890 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17891
17892 * inferiors.c (add_thread): Set last_status kind to
17893 TARGET_WAITKIND_IGNORE.
17894 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17895 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17896 (linux_wait_1): Move `thread' local definition to block that uses
17897 it. Don't NULL initialize `event_child'.
17898 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17899 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17900 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17901
17902 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17903
17904 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17905 an extended waitstatus, or by a watchpoint.
17906 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17907 thread was stepping or has been stopped by a watchpoint.
17908
17909 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17910
17911 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17912 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17913 of another, then delete the previous, and validate all
17914 breakpoints.
17915 (validate_inserted_breakpoint): New.
17916 (delete_disabled_breakpoints): New.
17917 (validate_breakpoints): New.
17918 (check_mem_read): Validate breakpoints before trusting their
17919 shadow. Delete disabled breakpoints.
17920 (check_mem_write): Validate breakpoints before trusting they
17921 should be inserted. Delete disabled breakpoints.
17922 * mem-break.h (validate_breakpoints):
17923 * server.c (handle_query): Validate breakpoints when we see a
17924 qSymbol query.
17925
17926 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17927
17928 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17929 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17930 if we could tell there's a GDB breakpoint at stop_pc.
17931 (need_step_over_p): Don't do a step over if we find a GDB
17932 breakpoint at the resume PC.
17933
17934 * mem-break.c (struct raw_breakpoint): New.
17935 (enum bkpt_type): New type `gdb_breakpoint'.
17936 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17937 fields. New field `raw'.
17938 (find_raw_breakpoint_at): New.
17939 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17940 breakpoint instead.
17941 (set_breakpoint_at): Adjust.
17942 (delete_raw_breakpoint): New.
17943 (release_breakpoint): New.
17944 (delete_breakpoint): Rename to...
17945 (delete_breakpoint_1): ... this. Add proc parameter. Use
17946 release_breakpoint. Return ENOENT.
17947 (delete_breakpoint): Reimplement.
17948 (find_breakpoint_at): Delete.
17949 (find_gdb_breakpoint_at): New.
17950 (delete_breakpoint_at): Delete.
17951 (set_gdb_breakpoint_at): New.
17952 (delete_gdb_breakpoint_at): New.
17953 (gdb_breakpoint_here): New.
17954 (set_reinsert_breakpoint): Use release_breakpoint.
17955 (uninsert_breakpoint): Rename to ...
17956 (uninsert_raw_breakpoint): ... this.
17957 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17958 (reinsert_raw_breakpoint): Change parameter type to
17959 raw_breakpoint.
17960 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17961 instead.
17962 (check_breakpoints): Adjust. Use release_breakpoint.
17963 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17964 (breakpoint_inserted_here): Ditto.
17965 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17966 Don't trust the breakpoint's shadow if it is not inserted.
17967 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17968 (delete_all_breakpoints): Adjust.
17969 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17970 use delete_breakpoint_1.
17971
17972 * mem-break.h (breakpoints_supported): Delete declaration.
17973 (set_gdb_breakpoint_at): Declare.
17974 (gdb_breakpoint_here): Declare.
17975 (delete_breakpoint_at): Delete.
17976 (delete_gdb_breakpoint_at): Declare.
17977
17978 * server.h (struct raw_breakpoint): Forward declare.
17979 (struct process_info): New field `raw_breakpoints'.
17980
17981 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17982 breakpoints.
17983
17984 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17985
17986 * linux-low.c (status_pending_p_callback): Fix comment.
17987 (linux_wait_for_event_1): Move most of the internal breakpoint
17988 handling from here...
17989 (linux_wait_1): ... to here.
17990 (count_events_callback): New.
17991 (select_singlestep_lwp_callback): New.
17992 (select_event_lwp_callback): New.
17993 (cancel_breakpoints_callback): New.
17994 (select_event_lwp): New.
17995 (linux_wait_1): Simplify internal breakpoint handling. Give equal
17996 priority to all LWPs that have had events that should be reported
17997 to the client. Cancel breakpoints when about to reporting the
17998 event to the client, not while stopping lwps. No longer cancel
17999 finished single-steps here.
18000 (cancel_finished_single_step): Delete.
18001 (cancel_finished_single_steps): Delete.
18002
18003 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18004
18005 * mem-break.c (enum bkpt_type): New.
18006 (struct breakpoint): New field `type'.
18007 (set_breakpoint_at): Change return type to struct breakpoint
18008 pointer. Set type to `other_breakpoint' by default.
18009 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18010 in the breakpoint list.
18011 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18012 (reinsert_breakpoint): Rename to ...
18013 (reinsert_raw_breakpoint): ... this.
18014 (reinsert_breakpoints_at): Adjust.
18015 * mem-break.h (struct breakpoint): Declare.
18016 (set_breakpoint_at): Change return type to struct breakpoint
18017 pointer.
18018
18019 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18020
18021 * server.c (handle_query): Assign, not compare.
18022
18023 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18024
18025 Teach linux gdbserver to step-over-breakpoints.
18026
18027 * linux-low.c (can_hardware_single_step): New.
18028 (supports_breakpoints): New.
18029 (handle_extended_wait): If stopping threads, read the stop pc of
18030 the new cloned LWP.
18031 (get_pc): New.
18032 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18033 low target doesn't support retrieving the PC.
18034 (add_lwp): Set last_resume_kind to resume_continue.
18035 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18036 (linux_attach): Don't clear stop_expected. Set the lwp's
18037 last_resume_kind to resume_stop.
18038 (linux_detach_one_lwp): Don't check for removed breakpoints.
18039 (check_removed_breakpoint): Delete.
18040 (status_pending_p): Rename to ...
18041 (status_pending_p_callback): ... this. Don't check for removed
18042 breakpoints. Don't consider threads that are stopped from GDB's
18043 perspective.
18044 (linux_wait_for_lwp): Always read the stop_pc here.
18045 (cancel_breakpoint): New.
18046 (step_over_bkpt): New global.
18047 (linux_wait_for_event_1): Implement stepping over breakpoints.
18048 (gdb_wants_lwp_stopped): New.
18049 (gdb_wants_all_stopped): New.
18050 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18051 single-step traps here. Store the thread's last reported target
18052 wait status.
18053 (send_sigstop): Don't clear stop_expected. Always set it,
18054 instead.
18055 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18056 (cancel_finished_single_step): New.
18057 (cancel_finished_single_steps): New.
18058 (wait_for_sigstop): Don't cancel finished single-step traps here.
18059 (linux_resume_one_lwp): Don't check for removed breakpoints.
18060 Don't set `step' on non-hardware step archs.
18061 (linux_set_resume_request): Ignore resume_stop requests if already
18062 stopping or stopped. Set the lwp's last_resume_kind.
18063 (resume_status_pending_p): Don't check for removed breakpoints.
18064 (need_step_over_p): New.
18065 (start_step_over): New.
18066 (finish_step_over): New.
18067 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18068 requests. Clear the thread's last reported target waitstatus.
18069 Don't use the `suspended' flag. Don't consider pending breakpoints.
18070 (linux_resume): Start a step-over if necessary.
18071 (proceed_one_lwp): New.
18072 (proceed_all_lwps): New.
18073 (unstop_all_lwps): New.
18074 * linux-low.h (struct lwp_info): Rewrite comment for the
18075 `suspended' flag. Add the `stop_pc' field. Delete the
18076 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18077 Add `'last_resume_kind' and `need_step_over' fields.
18078 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18079 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18080 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18081 (set_raw_breakpoint_at): New.
18082 (set_breakpoint_at): Rewrite to use it.
18083 (reinsert_breakpoint_handler): Delete.
18084 (set_reinsert_breakpoint): New.
18085 (reinsert_breakpoint_by_bp): Delete.
18086 (delete_reinsert_breakpoints): New.
18087 (uninsert_breakpoint): Rewrite.
18088 (uninsert_breakpoints_at): New.
18089 (reinsert_breakpoint): Rewrite.
18090 (reinsert_breakpoints_at): New.
18091 (check_breakpoints): Rewrite.
18092 (breakpoint_here): New.
18093 (breakpoint_inserted_here): New.
18094 (check_mem_read): Adjust.
18095 * mem-break.h (breakpoints_supported, breakpoint_here)
18096 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18097 (reinsert_breakpoint_by_bp): Delete declaration.
18098 (delete_reinsert_breakpoints): Declare.
18099 (reinsert_breakpoint): Delete declaration.
18100 (reinsert_breakpoints_at): Declare.
18101 (uninsert_breakpoint): Delete declaration.
18102 (uninsert_breakpoints_at): Declare.
18103 (check_breakpoints): Adjust prototype.
18104 * server.h: Adjust include order.
18105 (struct thread_info): Declare here. Add a `last_status' field.
18106
18107 2010-03-23 Michael Snyder <msnyder@vmware.com>
18108
18109 * server.c (crc32): New function.
18110 (handle_query): Add handling for 'qCRC:' request.
18111
18112 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18113
18114 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18115 lwp had been stopped by a watchpoint.
18116
18117 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18118
18119 * server.h (internal_error): Declare.
18120 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18121 * utils.c (internal_error): New function.
18122
18123 2010-03-15 Andreas Schwab <schwab@redhat.com>
18124
18125 * configure.srv: Fix typo setting srv_regobj.
18126
18127 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18128
18129 * linux-low.c (fetch_register): Avoid passing a non string literal
18130 format to `error'.
18131 (usr_store_inferior_registers): Ditto.
18132
18133 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18134
18135 * linux-low.c (linux_write_memory): Bail out early if peeking
18136 memory failed.
18137
18138 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18139
18140 * linux-low.h (struct lwp_info): New fields
18141 `stopped_by_watchpoint' and `stopped_data_address'.
18142 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18143 here, and cache them in the lwp object.
18144 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18145 directly.
18146 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18147 field.
18148 (linux_stopped_by_watchpoint): Rewrite.
18149 (linux_stopped_data_address): Rewrite.
18150
18151 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18152
18153 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18154 switching the current inferior, not before.
18155
18156 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18157
18158 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18159 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18160 i386-linux.c and amd64-linux.c.
18161 (reg-i386.o): Removed.
18162 (reg-i386.c): Likewise.
18163 (reg-i386-linux.o): Likewise.
18164 (reg-i386-linux.c): Likewise.
18165 (reg-x86-64.o): Likewise.
18166 (reg-x86-64.c): Likewise.
18167 (reg-x86-64-linux.o): Likewise.
18168 (reg-x86-64-linux.c): Likewise.
18169 (i386.o): New.
18170 (i386.c): Likewise.
18171 (i386-linux.o): Likewise.
18172 (i386-linux.c): Likewise.
18173 (amd64.o): Likewise.
18174 (amd64.c): Likewise.
18175 (amd64-linux.o): Likewise.
18176 (amd64-linux.c): Likewise.
18177
18178 * configure.srv (srv_i386_regobj): New.
18179 (srv_i386_linux_regobj): Likewise.
18180 (srv_amd64_regobj): Likewise.
18181 (srv_amd64_linux_regobj): Likewise.
18182 (srv_i386_32bit_xmlfiles): Likewise.
18183 (srv_i386_64bit_xmlfiles): Likewise.
18184 (srv_i386_xmlfiles): Likewise.
18185 (srv_amd64_xmlfiles): Likewise.
18186 (srv_i386_linux_xmlfiles): Likewise.
18187 (srv_amd64_linux_xmlfiles): Likewise.
18188 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18189 srv_xmlfiles to $srv_i386_xmlfiles.
18190 (i[34567]86-*-mingw32ce*): Likewise.
18191 (i[34567]86-*-mingw*): Likewise.
18192 (i[34567]86-*-nto*): Likewise.
18193 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18194 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18195 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18196 (x86_64-*-linux*): Likewise.
18197
18198 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18199 (init_registers_amd64_linux): New.
18200 (x86_arch_setup): Replace init_registers_x86_64_linux with
18201 init_registers_amd64_linux.
18202
18203 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18204
18205 * configure.ac: Check for libdl. If it is not available link against
18206 static libthread_db.
18207 * configure: Regenerate.
18208
18209 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18210
18211 PR9605
18212
18213 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18214 handing a read watchpoint.
18215 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18216
18217 2010-02-12 Doug Evans <dje@google.com>
18218
18219 * linux-low.c (linux_supports_tracefork_flag): Document.
18220 (linux_look_up_symbols): Add comment.
18221
18222 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18223
18224 * regcache.c (supply_register): Clear regcache if buf is NULL.
18225
18226 2010-02-02 Nicolas Roche <roche@sourceware.org>
18227 Joel Brobecker <brobecker@adacore.com>
18228
18229 * inferiors.c (find_inferior): Add function documentation.
18230 (unloaded_dll): Handle the case where the unloaded dll has not
18231 been previously registered in the dll list.
18232
18233 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18234
18235 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18236 (thumb2_breakpoint): New.
18237 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18238
18239 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18240
18241 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18242 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18243 breakpoints.
18244
18245 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18246
18247 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18248
18249 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18250
18251 * linux-s390-low.c (s390_collect_ptrace_register)
18252 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18253
18254 2010-01-21 Doug Evans <dje@google.com>
18255
18256 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18257 (PTRACE_ARG4_TYPE): New macro.
18258 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18259 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18260 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18261 (usr_store_inferior_registers): Ditto.
18262 (linux_read_memory, linux_write_memory): Ditto.
18263 (linux_test_for_tracefork): Ditto.
18264
18265 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18266 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18267
18268 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18269
18270 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18271 target.
18272
18273 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18274
18275 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18276 prototype to take a regcache. Adjust.
18277
18278 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18279
18280 * regcache.h (struct thread_info): Forward declare.
18281 (struct regcache): New.
18282 (new_register_cache): Adjust prototype.
18283 (get_thread_regcache): Declare.
18284 (free_register_cache): Adjust prototype.
18285 (registers_to_string, registers_from_string): Ditto.
18286 (supply_register, supply_register_by_name, collect_register)
18287 (collect_register_as_string, collect_register_by_name): Ditto.
18288 * regcache.c (struct inferior_regcache_data): Delete.
18289 (get_regcache): Rename to ...
18290 (get_thread_regcache): ... this. Adjust. Switch inferior before
18291 fetching registers.
18292 (regcache_invalidate_one): Adjust.
18293 (regcache_invalidate): Fix prototype.
18294 (new_register_cache): Return the new register cache.
18295 (free_register_cache): Change prototype.
18296 (realloc_register_cache): Adjust.
18297 (registers_to_string): Change prototype to take a regcache. Adjust.
18298 (registers_from_string): Ditto.
18299 (register_data): Ditto.
18300 (supply_register): Ditto.
18301 (supply_register_by_name): Ditto.
18302 (collect_register): Ditto.
18303 (collect_register_as_string): Ditto.
18304 (collect_register_by_name): Ditto.
18305 * server.c (process_serial_event): Adjust.
18306 * linux-low.h (regset_fill_func, regset_store_func): Change
18307 prototype.
18308 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18309 Change prototype.
18310 * linux-low.c (get_stop_pc): Adjust.
18311 (check_removed_breakpoint): Adjust.
18312 (linux_wait_for_event): Adjust.
18313 (linux_resume_one_lwp): Adjust.
18314 (fetch_register): Add regcache parameter. Adjust.
18315 (usr_store_inferior_registers): Ditto.
18316 (regsets_fetch_inferior_registers): Ditto.
18317 (regsets_store_inferior_registers): Ditto.
18318 (linux_fetch_registers, linux_store_registers): Ditto.
18319 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18320 regcache. Adjust.
18321 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18322 Ditto.
18323 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18324 prototype to take a regcache.
18325 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18326 * remote-utils.c (convert_ascii_to_int, outreg)
18327 (prepare_resume_reply): Change prototype to take a regcache.
18328 Adjust.
18329 * target.h (struct target_ops) <fetch_registers, store_registers>:
18330 Change prototype to take a regcache.
18331 (fetch_inferior_registers, store_inferior_registers): Change
18332 prototype to take a regcache. Adjust.
18333 * proc-service.c (ps_lgetregs): Adjust.
18334 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18335 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18336 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18337 take a regcache. Adjust.
18338 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18339 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18340 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18341 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18342 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18343 (cris_cannot_fetch_register):
18344 (cris_breakpoint_at): Change prototype to take a regcache.
18345 Adjust.
18346 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18347 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18348 to take a regcache. Adjust.
18349 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18350 Adjust.
18351 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18352 take a regcache. Adjust.
18353 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18354 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18355 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18356 * linux-mips-low.c (mips_get_pc):
18357 (mips_set_pc): Change prototype to take a regcache. Adjust.
18358 (mips_reinsert_addr): Adjust.
18359 (mips_collect_register): Change prototype to take a regcache.
18360 Adjust.
18361 (mips_supply_register):
18362 (mips_collect_register_32bit, mips_supply_register_32bit)
18363 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18364 (mips_store_fpregset): Ditto.
18365 * linux-ppc-low.c (ppc_supply_ptrace_register)
18366 (ppc_supply_ptrace_register): Ditto.
18367 (parse_spufs_run): Adjust.
18368 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18369 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18370 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18371 take a regcache. Adjust.
18372 * linux-s390-low.c (s390_collect_ptrace_register)
18373 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18374 (s390_set_pc): Change prototype to take a regcache. Adjust.
18375 (s390_arch_setup): Adjust.
18376 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18377 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18378 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18379 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18380 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18381 regcache. Adjust.
18382 (sparc_breakpoint_at): Adjust.
18383 * linux-xtensa-low.c (xtensa_fill_gregset):
18384 (xtensa_store_gregset):
18385 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18386 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18387 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18388 prototype to take a regcache. Adjust.
18389 * win32-arm-low.c (arm_fetch_inferior_register)
18390 (arm_store_inferior_register): Change prototype to take a
18391 regcache. Adjust.
18392 * win32-i386-low.c (i386_fetch_inferior_register)
18393 (i386_store_inferior_register): Change prototype to take a
18394 regcache. Adjust.
18395 * win32-low.c (child_fetch_inferior_registers)
18396 (child_store_inferior_registers): Change prototype to take a
18397 regcache. Adjust.
18398 (win32_wait): Adjust.
18399 (win32_fetch_inferior_registers): Change prototype to take a
18400 regcache. Adjust.
18401 (win32_store_inferior_registers): Adjust.
18402 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18403 store_inferior_register>: Change prototype to take a regcache.
18404
18405 2010-01-20 Doug Evans <dje@google.com>
18406
18407 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18408 #ifdef.
18409 (linux_wait_for_event1, linux_init_signals): Ditto.
18410 (W_STOPCODE): Provide definition if missing.
18411
18412 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18413
18414 * linux-low.c (linux_core_of_thread): New.
18415 (compare_ints, show_process, list_threads): New.
18416 (linux_qxfer_osdata): Report threads and cores.
18417 (linux_target_op): Register linux_core_of_thread.
18418 * remote-utils.c (prepare_resume_reply): Report the core.
18419 (buffer_xml_printf): Support %d specifier.
18420 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18421 New.
18422 (handle_query): Handle qXfer:threads. Announce availability
18423 thereof.
18424 * target.h (struct target_ops): New field core_of_thread.
18425
18426 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18427
18428 * Makefile.in (clean): Remove new generated files.
18429 (reg-s390.o, reg-s390.c): Remove rules.
18430 (reg-s390x.o, reg-s390x.c): Likewise.
18431 (s390-linux32.o, s390-linux32.c): Add rules.
18432 (s390-linux64.o, s390-linux64.c): Likewise.
18433 (s390x-linux64.o, s390x-linux64.c): Likewise.
18434 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18435 * linux-s390-low.c: Include <elf.h>.
18436 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18437 (init_registers_s390): Remove prototype.
18438 (init_registers_s390x): Likewise.
18439 (init_registers_s390_linux32): Add prototype.
18440 (init_registers_s390_linux64): Likewise.
18441 (init_registers_s390x_linux64): Likewise.
18442 (s390_num_regs_3264): New define.
18443 (s390_regmap_3264): New global variable.
18444 (s390_cannot_fetch_register): Remove obsolete check.
18445 (s390_cannot_store_register): Likewise.
18446 (s390_collect_ptrace_register): Handle upper/lower register halves.
18447 (s390_supply_ptrace_register): Likewise.
18448 (s390_fill_gregset): Update to register number changes.
18449 (s390_get_hwcap): New routine.
18450 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18451 Install appropriate regmap and register set.
18452
18453 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18454
18455 * server.c (gdbserver_version): Update copyright year to 2010.
18456 * gdbreplay.c (gdbreplay_version): Likewise.
18457
18458 2009-12-28 Doug Evans <dje@google.com>
18459
18460 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18461 elf/external.h. Include <elf.h> instead but only if necessary.
18462
18463 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18464
18465 * linux-low.c (linux_remove_process): Remove `detaching'
18466 parameter. Don't release/detach from thread_db here.
18467 (linux_kill): Release/detach from thread_db here, ...
18468 (linux_detach): ... and here, before actually detaching.
18469 (linux_wait_1): ... and here, when a process exits.
18470 * thread-db.c (any_thread_of): New.
18471 (thread_db_free): Switch the current inferior to a thread of the
18472 passed in process.
18473
18474 2009-12-21 Doug Evans <dje@google.com>
18475
18476 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18477
18478 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18479 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18480 warning ifndef __NR_tkill. Move setting of errno there too.
18481 Delete unnecessary resetting of errno after syscall.
18482 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18483
18484 * configure.ac: Check for dladdr.
18485 * config.in: Regenerate.
18486 * configure: Regenerate.
18487 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18488 (try_thread_db_load): Update.
18489
18490 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18491
18492 2009-12-18 Doug Evans <dje@google.com>
18493
18494 * event-loop.c: Include unistd.h if it exists.
18495
18496 * linux-low.c (my_waitpid): Move definition away from being in
18497 between linux_tracefork_child/linux_test_for_tracefork.
18498
18499 * gdb_proc_service.h (psaddr_t): Fix type.
18500 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18501 signature to match glibc.
18502
18503 2009-12-16 Doug Evans <dje@google.com>
18504
18505 * linux-low.c (linux_read_memory): Fix argument to read.
18506
18507 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18508
18509 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18510 events, don't leave current_inferior pointing at null.
18511
18512 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18513
18514 * win32-low.c (LOG): Delete.
18515 (OUTMSG): Output to stderr.
18516 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18517 on compile time LOG macro.
18518 (win32_wait): Fix debug output.
18519
18520 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18521
18522 * win32-low.c (win32_add_one_solib): If the dll name is
18523 "ntdll.dll", prepend the system directory to the dll path.
18524
18525 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18526
18527 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18528
18529 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18530 Vladimir Prus <vladimir@codesourcery.com>
18531
18532 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18533 * configure.ac: Check for __mcoldfire__ and set
18534 gdb_cv_m68k_is_coldfire.
18535 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18536 reg-cf.o and reg-m68k.o.
18537 * configure: Regenerated.
18538
18539 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18540
18541 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18542 Pass it to thread_db_free.
18543 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18544 proper `detaching' argument to linux_remove_process.
18545 * linux-low.h (thread_db_free): Add `detaching' parameter.
18546 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18547 to thread_db_free.
18548 (thread_db_free): Add `detaching' parameter. Only
18549 call td_ta_clear_event if detaching from process.
18550
18551 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18552
18553 * thread-db.c (thread_db_free): Fix typo.
18554
18555 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18556
18557 PR gdb/10838
18558 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18559
18560 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18561
18562 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18563 with an i686 compiler.
18564 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18565 needed.
18566 * configure: Rebuilt.
18567
18568 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18569
18570 PR gdb/10783
18571
18572 * server.c (handle_search_memory_1): Correct read_addr initialization
18573 in loop for searching subsequent chunks.
18574
18575 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18576
18577 * configure.ac: New --with-libthread-db option.
18578 * thread-db.c: Allow direct dependence on libthread_db.
18579 (thread_db_free): Adjust.
18580 * config.in: Regenerate.
18581 * configure: Likewise.
18582
18583 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18584
18585 PR gdb/10757
18586 * thread-db.c (attach_thread): New function.
18587 (maybe_attach_thread): Return success/failure.
18588 (find_new_threads_callback): Adjust.
18589 (thread_db_find_new_threads): Loop until no new threads.
18590
18591 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18592
18593 * proc-service.c (ps_lgetregs): Formatting.
18594
18595 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18596
18597 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18598 * configure.ac: Adjust.
18599 * linux-low.h (struct process_info_private): Move members to struct
18600 thread_db.
18601 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18602 * linux-low.c (linux_remove_process): Adjust.
18603 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18604 * server.c (handle_query): Move code ...
18605 (handle_monitor_command): ... here. New function.
18606 * target.h (struct target_ops): New member.
18607 * thread-db.c (struct thread_db): New.
18608 (libthread_db_search_path): New variable.
18609 (thread_db_create_event, thread_db_enable_reporting)
18610 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18611 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18612 (try_thread_db_load_1, dladdr_to_soname): New functions.
18613 (try_thread_db_load, thread_db_load_search): New functions.
18614 (thread_db_init): Search for libthread_db.
18615 (thread_db_free): New function.
18616 (thread_db_handle_monitor_command): Likewise.
18617 * config.in: Regenerate.
18618 * configure: Regenerate.
18619
18620 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18621
18622 * spu-low.c (spu_kill): Wait for inferior to terminate.
18623 Call clear_inferiors.
18624 (spu_detach): Call clear_inferiors.
18625
18626 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18627
18628 * aclocal.m4: Regenerate.
18629 * config.in: Likewise.
18630 * configure: Likewise.
18631
18632 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18633
18634 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18635 (parse_spufs_run): New function.
18636 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18637 (ppc_breakpoint_at): Handle SPU breakpoints.
18638
18639 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18640
18641 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18642 (SPUFS_MAGIC): Define.
18643 (spu_enumerate_spu_ids): New function.
18644 (linux_qxfer_spu): New function.
18645 (linux_target_ops): Install linux_qxfer_spu.
18646
18647 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18648
18649 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18650 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18651 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18652 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18653 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18654 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18655 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18656 (init_registers_powerpc_cell32l): Add prototype.
18657 (init_registers_powerpc_cell64l): Likewise.
18658 (ppc_arch_setup): Detect Cell/B.E. architecture.
18659
18660 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18661
18662 * Makefile.in (datarootdir): New variable.
18663
18664 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18665
18666 * linux-low.c (linux_write_memory): Update debugging output.
18667 * Makefile.in (clean): Add new descriptions.
18668 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18669 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18670 * configure.srv: Add new files for arm*-*-linux*.
18671 * linux-arm-low.c: Add new declarations.
18672 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18673 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18674 (HWCAP_VFPv3D16): New.
18675 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18676 instead of __IWMMXT__.
18677 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18678 (arm_arch_setup): New.
18679 (target_regsets): Remove #ifdef. Add VFP regset.
18680 (the_low_target): Use arm_arch_setup.
18681
18682 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18683
18684 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18685 the main thread again.
18686
18687 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18688
18689 Adding Neutrino gdbserver.
18690 * configure: Regenerated.
18691 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18692 * configure.srv (i[34567]86-*-nto*): New target.
18693 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18694 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18695 (nto_comctrl) [__QNX__]: New function.
18696 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18697
18698 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18699
18700 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18701 srv_tgtobj.
18702
18703 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18704 Pedro Alves <pedro@codesourcery.com>
18705
18706 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18707 don't support CONTEXT_EXTENDED_REGISTERS.
18708 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18709 (the_low_target): Install them.
18710 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18711 failing with ERROR_PIPE_NOT_CONNECTED.
18712
18713 2009-06-30 Doug Evans <dje@google.com>
18714 Pierre Muller <muller@ics.u-strasbg.fr>
18715
18716 Add h/w watchpoint support to x86-linux, win32-i386.
18717 * Makefile.in (SFILES): Add i386-low.c
18718 (i386_low_h): Define.
18719 (i386-low.o): Add dependencies.
18720 (linux-x86-low.o): Add i386-low.h dependency.
18721 (win32-i386-low.o): Ditto.
18722 * i386-low.c: New file.
18723 * i386-low.h: New file.
18724 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18725 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18726 * linux-low.c (linux_add_process): Initialize arch_private.
18727 (linux_remove_process): Free arch_private.
18728 (add_lwp): Initialize arch_private.
18729 (delete_lwp): Free arch_private.
18730 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18731 provided.
18732 * linux-low.h (process_info_private): New member arch_private.
18733 (lwp_info): New member arch_private.
18734 (linux_target_ops): New members new_process, new_thread,
18735 prepare_to_resume.
18736 (ptid_of): New macro.
18737 * linux-x86-low.c: Include stddef.h, i386-low.h.
18738 (arch_process_info): New struct.
18739 (arch_lwp_info): New struct.
18740 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18741 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18742 (i386_dr_low_get_status): New function.
18743 (x86_insert_point, x86_remove_point): New functions.
18744 (x86_stopped_by_watchpoint): New function.
18745 (x86_stopped_data_address): New function.
18746 (x86_linux_new_process, x86_linux_new_thread): New functions.
18747 (x86_linux_prepare_to_resume): New function.
18748 (the_low_target): Add entries for insert_point, remove_point,
18749 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18750 prepare_to_resume.
18751 * server.c (debug_hw_points): New global.
18752 (monitor_show_help): Document set debug-hw-points.
18753 (handle_query): Process "set debug-hw-points".
18754 * server.h (debug_hw_points): Declare.
18755 (paddress): Declare.
18756 * utils.c (NUMCELLS, CELLSIZE): New macros.
18757 (get_sell, xsnprintf, paddress): New functions.
18758 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18759 remove_point, stopped_by_watchpoint, stopped_data_address.
18760 * win32-i386-low.c: Include i386-low.h.
18761 (debug_reg_state): Replaces dr.
18762 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18763 (i386_dr_low_get_status): New function.
18764 (i386_insert_point, i386_remove_point): New functions.
18765 (i386_stopped_by_watchpoint): New function.
18766 (i386_stopped_data_address): New function.
18767 (i386_initial_stuff): Update.
18768 (get_thread_context,set_thread_context,i386_thread_added): Update.
18769 (the_low_target): Add entries for insert_point,
18770 remove_point, stopped_by_watchpoint, stopped_data_address.
18771 * win32-low.c (win32_insert_watchpoint): New function.
18772 (win32_remove_watchpoint): New function.
18773 (win32_stopped_by_watchpoint): New function.
18774 (win32_stopped_data_address): New function.
18775 (win32_target_ops): Add entries for insert_watchpoint,
18776 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18777 * win32-low.h (win32_target_ops): New members insert_point,
18778 remove_point, stopped_by_watchpoint, stopped_data_address.
18779
18780 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18781
18782 * server.c (process_serial_event): Re-return unsupported, not
18783 error, if the type isn't recognized. Re-allow supporting only
18784 insert or remove packets. Also call require_running for
18785 breakpoints. Add missing break statement to default case. Tidy.
18786 * target.h (struct target_ops): Rename insert_watchpoint to
18787 insert_point, and remove_watchpoint to remove_point.
18788
18789 * linux-low.h (struct linux_target_ops): Likewise.
18790 * linux-low.c (linux_insert_watchpoint): Rename to ...
18791 (linux_insert_point): ... this. Adjust.
18792 (linux_remove_watchpoint): Rename to ...
18793 (linux_remove_point): ... this. Adjust.
18794 (linux_target_ops): Adjust.
18795 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18796 (cris_insert_point): ... this.
18797 (cris_remove_watchpoint): Rename to ...
18798 (cris_remove_point): ... this.
18799 (the_low_target): Adjust.
18800
18801 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18802
18803 * server.c (handle_v_kill): Pass signal_pid to
18804 kill_inferior if multi_process is zero.
18805
18806 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18807
18808 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18809 * target.h (target_ops): Comment for *_watchpoint to make it clear
18810 the functions can get types '0' and '1'.
18811
18812 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18813
18814 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18815 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18816 * regcache.c (get_regcache): Likewise.
18817 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18818 * win32-low.c (child_fetch_inferior_registers): Remove check for
18819 regno 0.
18820
18821 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18822 Pedro Alves <pedro@codesourcery.com>
18823
18824 * target.h (struct target_ops) <supports_multi_process>: New
18825 callback.
18826 (target_supports_multi_process): New.
18827 * server.c (handle_query): Even if GDB reports support, only
18828 enable multi-process if the target also supports it. Report
18829 multi-process support only if the target backend supports it.
18830 * linux-low.c (linux_supports_multi_process): New function.
18831 (linux_target_ops): Install it as target_supports_multi_process
18832 callback.
18833
18834 2009-05-24 Doug Evans <dje@google.com>
18835
18836 Global renaming of find_thread_pid to find_thread_ptid.
18837 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18838 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18839 All callers updated.
18840
18841 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18842 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18843 directly.
18844
18845 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18846 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18847 (linux_resume_one_lwp): Ditto.
18848
18849 2009-05-23 Doug Evans <dje@google.com>
18850
18851 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18852 from struct inferior_list_entry * to struct lwp_info *.
18853 All callers updated.
18854
18855 2009-05-13 Doug Evans <dje@google.com>
18856
18857 * linux-x86-low.c: Don't include assert.h.
18858 (x86_siginfo_fixup): Use fatal, not assert.
18859 (x86_arch_setup): Fix comment.
18860
18861 2009-05-12 Doug Evans <dje@google.com>
18862
18863 Biarch support for i386/amd64 gdbserver.
18864 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18865 Add linux-x86-low.c.
18866 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18867 (linux-x86-low.o): Add.
18868 * linux-x86-64-low.c: Delete.
18869 * linux-i386-low.c: Delete.
18870 * linux-x86-low.c: New file.
18871 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18872 linux-x86-low.o.
18873 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18874 linux-x86-low.o.
18875 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18876 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18877 (linux_child_pid_to_exec_file): New function.
18878 (elf_64_header_p, elf_64_file_p): New functions.
18879 (siginfo_fixup): New function.
18880 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18881 give target a chance to convert layout.
18882 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18883 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18884
18885 2009-05-07 Doug Evans <dje@google.com>
18886
18887 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18888 (regsets_store_inferior_registers): Ditto.
18889
18890 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18891
18892 PR server/10048
18893
18894 * linux-low.c (must_set_ptrace_flags): Delete.
18895 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18896 of the global.
18897 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18898 `lwp->must_set_ptrace_flags' instead.
18899 (linux_wait_for_event_1): Set ptrace options here.
18900 (linux_wait_1): ... not here.
18901
18902 2009-04-30 Doug Evans <dje@google.com>
18903
18904 * inferiors.c (started_inferior_callback): New function.
18905 (attached_inferior_callback): New function.
18906 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18907 * server.c (print_started_pid, print_attached_pid): New functions.
18908 (detach_or_kill_for_exit): New function.
18909 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18910 * server.h (have_started_inferiors_p): Declare.
18911 (have_attached_inferiors_p): Declare.
18912
18913 * inferiors.c (remove_process): Fix memory leak, free process.
18914 * linux-low.c (linux_remove_process): New function.
18915 (linux_kill): Call it instead of remove_process.
18916 (linux_detach, linux_wait_1): Ditto.
18917
18918 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18919
18920 * configure.srv: Add x86 Windows CE target.
18921
18922 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18923
18924 * inferiors.c (get_thread_process): Make global.
18925 * server.h (get_thread_process): Add prototype.
18926 * thread-db.c (find_one_thread): Use get_thread_process
18927 instead of current_process.
18928 (thread_db_get_tls_address): Do not crash if called when
18929 thread layer is not yet initialized.
18930
18931 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18932
18933 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18934 * spu-low.c (current_tid): Rename to ...
18935 (current_ptid): ... this.
18936 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18937 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18938 ptid_get_lwp (current_ptid) instead of current_tid.
18939 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18940 instead of current_tid. Use find_process_pid to verify pid
18941 argument is valid. Pass proper argument to remove_process.
18942 (spu_thread_alive): Compare current_ptid instead of current_tid.
18943 (spu_resume): Likewise.
18944
18945 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18946
18947 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18948 variable.
18949
18950 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18951
18952 Implement the multiprocess extensions, and add linux multiprocess
18953 support.
18954
18955 * server.h (ULONGEST): Declare.
18956 (struct ptid, ptid_t): New.
18957 (minus_one_ptid, null_ptid): Declare.
18958 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18959 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18960 (struct inferior_list_entry): Change `id' type from unsigned from
18961 to ptid_t.
18962 (struct sym_cache, struct breakpoint, struct
18963 process_info_private): Forward declare.
18964 (struct process_info): Declare.
18965 (current_process): Declare.
18966 (all_processes): Declare.
18967 (initialize_inferiors): Declare.
18968 (add_thread): Adjust to use ptid_t.
18969 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18970 (add_process, remove_process, find_thread_pid): Declare.
18971 (find_inferior_id): Adjust to use ptid_t.
18972 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18973 (multi_process): Declare.
18974 (push_event): Adjust to use ptid_t.
18975 (read_ptid, write_ptid): Declare.
18976 (prepare_resume_reply): Adjust to use ptid_t.
18977 (clear_symbol_cache): Declare.
18978 * inferiors.c (all_processes): New.
18979 (null_ptid, minus_one_ptid): New.
18980 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18981 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18982 (add_thread): Change unsigned long to ptid. Remove gdb_id
18983 parameter. Adjust.
18984 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18985 (gdb_id_to_thread): Rename to ...
18986 (find_thread_pid): ... this. Change unsigned long to ptid.
18987 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
18988 (loaded_dll, pull_pid_from_list): Adjust.
18989 (add_process, remove_process, find_process_pid)
18990 (get_thread_process, current_process, initialize_inferiors): New.
18991 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
18992 (struct target_waitstatus) <related_pid>: Ditto.
18993 (struct target_ops) <kill, detach>: Add `pid' argument. Change
18994 return type to int.
18995 (struct target_ops) <join>: Add `pid' argument.
18996 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
18997 (struct target_ops) <wait>: Add `ptid' field. Change return type
18998 to ptid.
18999 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19000 (mywait): Add `ptid' argument. Change return type to ptid_t.
19001 (target_pid_to_str): Declare.
19002 * target.c (set_desired_inferior): Adjust to use ptids.
19003 (mywait): Add new `ptid' argument. Adjust.
19004 (target_pid_to_str): New.
19005 * mem-break.h (free_all_breakpoints): Declare.
19006 * mem-break.c (breakpoints): Delelete.
19007 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19008 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19009 to use per-process breakpoint list.
19010 (free_all_breakpoints): New.
19011 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19012 (symbol_cache, all_symbols_looked_up): Delete.
19013 (hexchars): New.
19014 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19015 read_ptid): New.
19016 (prepare_resume_reply): Change ptid argument's type from unsigned
19017 long to ptid_t. Adjust. Implement W;process and X;process.
19018 (free_sym_cache, clear_symbol_cache): New.
19019 (look_up_one_symbol): Adjust to per-process symbol cache. *
19020 * server.c (cont_thread, general_thread, step_thread): Change type
19021 to ptid_t.
19022 (attached): Delete.
19023 (multi_process): New.
19024 (last_ptid): Change type to ptid_t.
19025 (struct vstop_notif) <ptid>: Change type to ptid_t.
19026 (queue_stop_reply, push_event): Change `ptid' argument's type to
19027 ptid_t.
19028 (discard_queued_stop_replies): Add `pid' argument.
19029 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19030 changes. Don't reference the `attached' global.
19031 (attach_inferior): Adjust to mywait interface changes.
19032 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19033 features. Handle and report "multiprocess+". Handle
19034 "qAttached:PID".
19035 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19036 changes.
19037 (handle_v_kill): New.
19038 (handle_v_stopped): Adjust to use target_pid_to_str.
19039 (handle_v_requests): Allow multiple attaches and runs when
19040 multiprocess extensions are in effect. Handle "vKill".
19041 (myresume): Adjust to use ptids.
19042 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19043 (handle_status): Adjust to discard_queued_stop_replies interface
19044 change.
19045 (first_thread_of, kill_inferior_callback)
19046 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19047 (main): Call initialize_inferiors. Adjust to use ptids, killing
19048 and detaching from all inferiors. Handle multiprocess packet
19049 variants.
19050 * linux-low.h: Include gdb_proc_service.h.
19051 (struct process_info_private): New.
19052 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19053 <lwpid_of>: Use ptid_get_lwp.
19054 (get_lwp_thread): Adjust.
19055 (struct lwp_info): Add `dead' member.
19056 (find_lwp_pid): Declare.
19057 * linux-low.c (thread_db_active): Delete.
19058 (new_inferior): Adjust comment.
19059 (inferior_pid): Delete.
19060 (linux_add_process): New.
19061 (handle_extended_wait): Adjust.
19062 (add_lwp): Change unsigned long to ptid.
19063 (linux_create_inferior): Add process to processes table. Adjust
19064 to use ptids. Don't set new_inferior here.
19065 (linux_attach_lwp): Rename to ...
19066 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19067 it. Adjust to use ptids.
19068 (linux_attach_lwp): New.
19069 (linux_attach): Add process to processes table. Don't set
19070 new_inferior here.
19071 (struct counter): New.
19072 (second_thread_of_pid_p, last_thread_of_process_p): New.
19073 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19074 multiple processes.
19075 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19076 processes. Remove process from process table.
19077 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19078 to multiple processes.
19079 (any_thread_of): New.
19080 (linux_detach): Add `pid' argument, and handle it. Remove process
19081 from processes table.
19082 (linux_join): Add `pid' argument. Handle it.
19083 (linux_thread_alive): Change unsighed long argument to ptid_t.
19084 Consider dead lwps as not being alive.
19085 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19086 threads we're not interested in.
19087 (same_lwp, find_lwp_pid): New.
19088 (linux_wait_for_lwp): Change `pid' argument's type from int to
19089 ptid_t. Adjust.
19090 (linux_wait_for_event): Rename to ...
19091 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19092 from int to ptid_t. Adjust.
19093 (linux_wait_for_event): New.
19094 (linux_wait_1): Add `ptid' argument. Change return type to
19095 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19096 that exit from the process table.
19097 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19098 Adjust.
19099 (mark_lwp_dead): New.
19100 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19101 stopping all threads, mark its main lwp as dead.
19102 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19103 ptids.
19104 (fetch_register, usr_store_inferior_registers)
19105 (regsets_fetch_inferior_registers)
19106 (regsets_store_inferior_registers, linux_read_memory)
19107 (linux_write_memory): Inline `inferior_pid'.
19108 (linux_look_up_symbols): Adjust to use per-process
19109 `thread_db_active'.
19110 (linux_request_interrupt): Adjust to use ptids.
19111 (linux_read_auxv): Inline `inferior_pid'.
19112 (initialize_low): Don't reference thread_db_active.
19113 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19114 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19115 (ps_getpid): Return the pid of the current inferior.
19116 * thread-db.c (proc_handle, thread_agent): Delete.
19117 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19118 per-process data.
19119 (find_one_thread): Change argument type to ptid_t. Adjust to
19120 per-process data.
19121 (maybe_attach_thread): Adjust to per-process data and ptids.
19122 (thread_db_find_new_threads): Ditto.
19123 (thread_db_init): Ditto.
19124 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19125 processes table. Adjust to use ptids.
19126 (spu_kill, spu_detach): Adjust interface. Remove process from
19127 processes table.
19128 (spu_join, spu_thread_alive): Adjust interface.
19129 (spu_wait): Adjust interface. Remove process from processes
19130 table. Adjust to use ptids.
19131 * win32-low.c (current_inferior_tid): Delete.
19132 (current_inferior_ptid): New.
19133 (debug_event_ptid): New.
19134 (thread_rec): Take a ptid. Adjust.
19135 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19136 (child_delete_thread): Ditto.
19137 (do_initial_child_stuff): Add `attached' argument. Add process to
19138 processes table.
19139 (child_fetch_inferior_registers, child_store_inferior_registers):
19140 Adjust.
19141 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19142 (win32_attach): Pass 1 to do_initial_child_stuff.
19143 (win32_kill): Adjust interface. Remove process from processes
19144 table.
19145 (win32_detach): Ditto.
19146 (win32_join): Adjust interface.
19147 (win32_thread_alive): Take a ptid.
19148 (win32_resume): Adjust to use ptids.
19149 (get_child_debug_event): Ditto.
19150 (win32_wait): Adjust interface. Remove exiting process from
19151 processes table.
19152
19153 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19154
19155 Non-stop mode support.
19156
19157 * server.h (non_stop): Declare.
19158 (gdb_client_data, handler_func): Declare.
19159 (delete_file_handler, add_file_handler, start_event_loop):
19160 Declare.
19161 (handle_serial_event, handle_target_event, push_event)
19162 (putpkt_notif): Declare.
19163 * target.h (enum resume_kind): New.
19164 (struct thread_resume): Replace `step' field by `kind' field.
19165 (TARGET_WNOHANG): Define.
19166 (struct target_ops) <wait>: Add `options' argument.
19167 <supports_non_stop, async, start_non_stop>: New fields.
19168 (target_supports_non_stop, target_async): New.
19169 (start_non_stop): Declare.
19170 (mywait): Add `options' argument.
19171 * target.c (mywait): Add `options' argument. Print child exit
19172 notifications here.
19173 (start_non_stop): New.
19174 * server.c (non_stop, own_buf, mem_buf): New globals.
19175 (struct vstop_notif): New.
19176 (notif_queue): New global.
19177 (queue_stop_reply, push_event, discard_queued_stop_replies)
19178 (send_next_stop_reply): New.
19179 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19180 interface changes.
19181 (attach_inferior): In non-stop mode, don't wait for the target
19182 here.
19183 (handle_general_set): Handle QNonStop.
19184 (handle_query): When handling qC, return the current general
19185 thread, instead of the first thread of the list.
19186 (handle_query): If the backend supports non-stop mode, include
19187 QNonStop+ in the qSupported query response.
19188 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19189 and non-stop mode.
19190 (handle_v_attach, handle_v_run): Handle non-stop mode.
19191 (handle_v_stopped): New.
19192 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19193 (myresume): Adjust to use resume_kind. Handle non-stop.
19194 (queue_stop_reply_callback): New.
19195 (handle_status): Handle non-stop mode.
19196 (main): Clear non_stop flag on reconnection. Use the event-loop.
19197 Refactor serial protocol handling from here ...
19198 (process_serial_event): ... to this new function. When GDB
19199 selects any thread, select one here. In non-stop mode, wait until
19200 GDB acks all pending events before exiting.
19201 (handle_serial_event, handle_target_event): New.
19202 * remote-utils.c (remote_open): Install remote_desc in the event
19203 loop.
19204 (remote_close): Remove remote_desc from the event loop.
19205 (putpkt_binary): Rename to...
19206 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19207 (putpkt_binary): New as wrapper around putpkt_binary_1.
19208 (putpkt_notif): New.
19209 (prepare_resume_reply): In non-stop mode, don't change the
19210 general_thread.
19211 * event-loop.c: New.
19212 * Makefile.in (OBJ): Add event-loop.o.
19213 (event-loop.o): New rule.
19214
19215 * linux-low.h (pid_of): Moved here.
19216 (lwpid_of): New.
19217 (get_lwp_thread): Use lwpid_of.
19218 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19219 * linux-low.c (pid_of): Delete.
19220 (inferior_pid): Use lwpid_of.
19221 (linux_event_pipe): New.
19222 (target_is_async_p): New.
19223 (delete_lwp): New.
19224 (handle_extended_wait): Use lwpid_of.
19225 (add_lwp): Don't set lwpid field.
19226 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19227 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19228 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19229 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19230 first. Adjust to linux_wait_for_event interface changes. Use
19231 lwpid_of.
19232 (linux_detach): Don't delete the main lwp here.
19233 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19234 (status_pending_p): Don't consider explicitly suspended lwps.
19235 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19236 pointer. Add OPTIONS argument. Change return type to int. Use
19237 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19238 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19239 pointer. Add status pointer argument. Return a pid instead of a
19240 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19241 changes. In non-stop mode, don't switch to a random thread.
19242 (linux_wait): Rename to...
19243 (linux_wait_1): ... this. Add target_options argument, and handle
19244 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19245 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19246 clean exit and signal exit code. Don't stop all threads in
19247 non-stop mode. In all-stop mode, only stop all threads when
19248 reporting a stop to GDB. Handle explicit thread stop requests.
19249 (async_file_flush, async_file_mark): New.
19250 (linux_wait): New.
19251 (send_sigstop): Use lwpid_of.
19252 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19253 interface changes. In non-stop mode, don't switch to a random
19254 thread.
19255 (linux_resume_one_lwp): Use lwpid_of.
19256 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19257 (linux_resume_one_thread): ... this. Handle resume_stop. In
19258 non-stop mode, don't look for pending flag in all threads.
19259 (resume_status_pending_p): Don't consider explicitly suspended
19260 threads.
19261 (my_waitpid): Reimplement. Emulate __WALL.
19262 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19263 Use lwpid_of.
19264 (sigchld_handler, linux_supports_non_stop, linux_async)
19265 (linux_start_non_stop): New.
19266 (linux_target_ops): Register linux_supports_non_stop, linux_async
19267 and linux_start_non_stop.
19268 (initialize_low): Install SIGCHLD handler.
19269 * thread-db.c (thread_db_create_event, find_one_thread)
19270 (thread_db_get_tls_address): Use lwpid_of.
19271 * win32-low.c (win32_detach): Adjust to use resume_kind.
19272 (win32_wait): Add `options' argument.
19273 * spu-low.c (spu_resume): Adjust to use resume_kind.
19274 (spu_wait): Add `options' argument.
19275
19276 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19277
19278 Decouple target code from remote protocol.
19279
19280 * target.h (enum target_waitkind): New.
19281 (struct target_waitstatus): New.
19282 (struct target_ops) <wait>: Return an unsigned long. Take a
19283 target_waitstatus pointer instead of a char pointer.
19284 (mywait): Likewise.
19285 * target.c (mywait): Change prototype to return an unsigned long.
19286 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19287 * server.h (thread_from_wait, old_thread_from_wait): Delete
19288 declarations.
19289 (prepare_resume_reply): Change prototype to take a
19290 target_waitstatus.
19291 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19292 (last_status, last_ptid): New.
19293 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19294 pid instead of a signal.
19295 (attach_inferior): Remove "status" and "signal" parameters.
19296 Adjust.
19297 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19298 not as an address.
19299 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19300 (handle_v_requests, myresume): Remove "status" and "signal"
19301 parameters. Adjust.
19302 (handle_status): New.
19303 (main): Delete local `status'. Adjust.
19304 * remote-utils.c: Include target.h.
19305 (prepare_resume_reply): Change prototype to take a
19306 target_waitstatus. Adjust.
19307
19308 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19309 interface.
19310 * spu-low.c (spu_wait): Adjust.
19311 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19312 Delete.
19313 (win32_wait): Adjust.
19314
19315 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19316
19317 * target.h (struct thread_resume): Delete leave_stopped member.
19318 (struct target_ops): Add a `n' argument to the `resume' callback.
19319 * server.c (start_inferior): Adjust.
19320 (handle_v_cont, myresume): Adjust.
19321 * linux-low.c (check_removed_breakpoint): Adjust to resume
19322 interface change, and to removed leave_stopped field.
19323 (resume_ptr): Delete.
19324 (struct thread_resume_array): New.
19325 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19326 resume interface change.
19327 (linux_continue_one_thread, linux_queue_one_thread)
19328 (resume_status_pending_p): Check if the resume field is NULL
19329 instead of checking the leave_stopped member.
19330 (linux_resume): Adjust to the target resume interface change.
19331 * spu-low.c (spu_resume): Adjust to the target resume interface
19332 change.
19333 * win32-low.c (win32_detach, win32_resume): Ditto.
19334
19335 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19336
19337 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19338 flag.
19339 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19340 pending.
19341 (linux_continue_one_thread): Only preserve the stepping flag if
19342 there's a pending breakpoint.
19343
19344 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19345
19346 * server.c (main): After the inferior having exited, call
19347 remote_close before exiting gdbserver.
19348
19349 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19350
19351 Fix size of FPSCR in Power 7 processors.
19352 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19353 (PPC_FEATURE_HAS_DFP): New #define.
19354 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19355 size of the FPSCR.
19356
19357 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19358
19359 * server.c (handle_query) Whitespace and formatting.
19360
19361 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19362
19363 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19364 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19365 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19366 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19367 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19368 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19369 Makefile.in, configure.ac: Fix whitespace throughout.
19370 * configure: Regenerate.
19371
19372 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19373
19374 * inferiors.c (find_inferior): Make it safe for the callback
19375 function to delete the currently iterated inferior.
19376
19377 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19378
19379 * Makefile.in (linuw_low_h): Move higher.
19380 (thread-db.o): Depend on $(linux_low_h).
19381
19382 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19383
19384 Rename "process" to "lwp" throughout.
19385
19386 * linux-low.c (all_processes): Rename to...
19387 (all_lwps): ... this.
19388 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19389 (add_process): Rename to ...
19390 (add_lwp): ... this. Adjust.
19391 (linux_create_inferior): Adjust.
19392 (linux_attach_lwp): Adjust.
19393 (linux_attach): Adjust.
19394 (linux_kill_one_process): Rename to ...
19395 (linux_kill_one_lwp): ... this. Adjust.
19396 (linux_kill): Adjust.
19397 (linux_detach_one_process): Rename to ...
19398 (linux_detach_one_lwp): ... this. Adjust.
19399 (linux_detach): Adjust.
19400 (check_removed_breakpoint): Adjust.
19401 (status_pending_p): Adjust.
19402 (linux_wait_for_process): Rename to ...
19403 (linux_wait_for_lwp): ... this. Adjust.
19404 (linux_wait_for_event): Adjust.
19405 (send_sigstop): Adjust.
19406 (wait_for_sigstop): Adjust.
19407 (stop_all_processes): Rename to ...
19408 (stop_all_lwps): ... this.
19409 (linux_resume_one_process): Rename to ...
19410 (linux_resume_one_lwp): ... this. Adjust.
19411 (linux_set_resume_request, linux_continue_one_thread)
19412 (linux_queue_one_thread, resume_status_pending_p)
19413 (usr_store_inferior_registers, regsets_store_inferior_registers)
19414 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19415 Adjust.
19416 * linux-low.h (get_process): Rename to ...
19417 (get_lwp): ... this. Adjust.
19418 (get_thread_process): Rename to ...
19419 (get_thread_lwp): ... this. Adjust.
19420 (get_process_thread): Rename to ...
19421 (get_lwp_thread): ... this. Adjust.
19422 (struct process_info): Rename to ...
19423 (struct lwp_info): ... this.
19424 (all_processes): Rename to ...
19425 (all_lwps): ... this.
19426 * proc-service.c (ps_lgetregs): Adjust.
19427 * thread-db.c (thread_db_create_event, find_one_thread)
19428 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19429
19430 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19431
19432 * server.c (handle_query): Handle "qAttached".
19433
19434 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19435
19436 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19437 GPLv3, update license URL.
19438
19439 2009-03-01 Doug Evans <dje@google.com>
19440
19441 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19442 (server_h): Add gdb_signals.h.
19443 (signals.o): Update.
19444 * server.h (target_signal_from_host,target_signal_to_host_p)
19445 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19446
19447 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19448
19449 * remote-utils.c (getpkt): Also generate remote-debug
19450 information if noack_mode is set.
19451
19452 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19453
19454 * server.c (handle_query): Report qXfer:siginfo:read and
19455 qXfer:siginfo:write as supported and handle them.
19456 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19457 * linux-low.c (linux_xfer_siginfo): New.
19458 (linux_target_ops): Set it.
19459
19460 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19461
19462 * server.c (gdbserver_usage): Mention --remote-debug.
19463 (main): Accept '--remote-debug' switch.
19464
19465 2009-01-18 Doug Evans <dje@google.com>
19466
19467 * regcache.c (new_register_cache): No need to check result of xcalloc.
19468 * server.c (handle_search_memory): Back out calls to xmalloc,
19469 result is checked and error is returned to user upon failure.
19470 (handle_query): Ditto. Add more checks for result of malloc.
19471 (handle_v_cont): Check result of malloc, report error back to
19472 user upon failure.
19473 (handle_v_run): Ditto. Call freeargv.
19474 * server.h (freeargv): Declare.
19475 * utils.c (freeargv): New fn.
19476
19477 2009-01-15 Doug Evans <dje@google.com>
19478
19479 * gdbreplay.c (perror_with_name): Make arg const char *.
19480 * server.h (target_signal_to_name): Make return type const char *.
19481 * thread-db.c (thread_db_err_str): Make return type const char *.
19482 * utils.c (perror_with_name): Make arg const char *.
19483
19484 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19485
19486 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19487 when handling a EXIT_PROCESS_DEBUG_EVENT.
19488
19489 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19490
19491 * gdbreplay.c (gdbreplay_version): Update copyright year.
19492 * server.c (gdbserver_version): Likewise.
19493
19494 2009-01-05 Doug Evans <dje@google.com>
19495
19496 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19497 (handle_extended_wait): Improve comment.
19498
19499 2008-12-13 Doug Evans <dje@google.com>
19500
19501 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19502 * server.h (ATTR_MALLOC): New macro.
19503 (xmalloc,xcalloc,xstrdup): Declare.
19504 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19505 * inferiors.c: Ditto.
19506 * linux-low.c: Ditto.
19507 * mem-break.c: Ditto.
19508 * regcache.c: Ditto.
19509 * remote-utils.c: Ditto.
19510 * server.c: Ditto.
19511 * target.c: Ditto.
19512 * win32-low.c: Ditto.
19513
19514 2008-12-12 Doug Evans <dje@google.com>
19515
19516 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19517 in debugging printf.
19518
19519 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19520
19521 2008-12-09 Doug Evans <dje@google.com>
19522
19523 * linux-low.h (struct process_info): Delete member tid, unused.
19524 * thread-db.c (find_one_thread): Update.
19525 (maybe_attach_thread): Update.
19526
19527 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19528
19529 * target.h (struct target_ops): Add qxfer_osdata member.
19530 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19531 and dirent.h.
19532 (linux_qxfer_osdata): New functions.
19533 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19534 callback.
19535 * server.c (handle_query): Handle "qXfer:osdata:read:".
19536 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19537 (buffer_xml_printf): New functions.
19538 * server.h (struct buffer): New.
19539 (buffer_grow_str, buffer_grow_str0): New macros.
19540 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19541 (buffer_xml_printf): Declare.
19542
19543 2008-11-24 Doug Evans <dje@google.com>
19544
19545 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19546
19547 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19548
19549 * server.c (handle_v_run): Always use the supplied argument list.
19550
19551 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19552
19553 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19554 (xtensa_regmap_table): Add entry for scompare1.
19555
19556 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19557
19558 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19559 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19560 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19561 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19562 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19563 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19564 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19565 XML target descriptions.
19566 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19567 when inferior is running on an ISA 2.05 or later processor. Add
19568 special case to return offset for full 64-bit slot of FPSCR when
19569 in 32-bits.
19570
19571 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19572
19573 * Makefile.in (SFILES, clean): Added sparc64 files.
19574 (reg-sparc64.o, reg-sparc64.c): New.
19575 * configure.srv (sparc*-*-linux*): New configuration.
19576 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19577 syscall arguments for SPARC.
19578 (regsets_store_inferior_registers): Likewise.
19579 * linux-sparc-low.c: New file.
19580
19581 2008-10-21 Doug Evans <dje@google.com>
19582
19583 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19584 (READLINE_DIR,READLINE_DEP): Delete.
19585 (INTERNAL_CFLAGS): Update.
19586 (LINTFLAGS): Update.
19587
19588 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19589
19590 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19591 whole argv from the last run, not just argv[0].
19592
19593 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19594
19595 * regcache.c (new_register_cache): Return NULL if the register
19596 cache size isn't known yet.
19597 (free_register_cache): Avoid dereferencing a NULL regcache.
19598
19599 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19600
19601 * configure.srv: Merge MIPS and MIPS64.
19602
19603 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19604
19605 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19606
19607 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19608
19609 * Makefile.in: Add required vsx dependencies.
19610
19611 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19612 Declare init_registers_powerpc_vsx32l.
19613 Declare init_registers_powerpc_vsx64l.
19614 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19615 (ppc_arch_setup): Check for VSX in hwcap.
19616 (ppc_fill_vsxregset): New function.
19617 (ppc_store_vsxregset): New function.
19618 Add new VSX entry in regset_info target_regsets.
19619
19620 * configure.srv: Add new VSX dependencies.
19621
19622 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19623
19624 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19625 (remote_open): Set or clear transport_is_reliable.
19626 (putpkt_binary): Don't expect acks in noack mode.
19627 (getpkt): Don't send ack/nac in noack mode.
19628 * server.c (handle_general_set): Handle QStartNoAckMode.
19629 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19630 qSupported.
19631 (main): Reset noack_mode on every connection.
19632 * server.h (noack_mode): Declare.
19633
19634 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19635
19636 * Makefile.in (GDBREPLAY_OBS): New variable.
19637 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19638
19639 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19640 Daniel Jacobowitz <dan@codesourcery.com>
19641
19642 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19643 (usr_store_inferior_registers): Likewise.
19644 (regsets_store_inferior_registers): Likewise.
19645
19646 2008-07-31 Rolf Jansen <rj@surtec.com>
19647 Pedro Alves <pedro@codesourcery.com>
19648
19649 * configure.ac: Check for memmem declaration.
19650 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19651 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19652 (disable_packet_qfThreadInfo): Unconditionally compile.
19653 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19654 * configure, config.in: Regenerate.
19655
19656 2008-07-28 Doug Kwan <dougkwan@google.com>
19657
19658 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19659 (linux_write_memory): Remove declaration of errno.
19660
19661 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19662
19663 * linux-low.c (handle_extended_wait): Do not use "status"
19664 variable uninitialized.
19665
19666 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19667
19668 * server.c (handle_v_attach): Inhibit reporting dll changes.
19669
19670 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19671
19672 * remote-utils.c (prepare_resume_reply): If requested, don't
19673 output "thread:TID" in the T stop reply.
19674
19675 * server.c (disable_packet_vCont, disable_packet_Tthread)
19676 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19677 (handle_query): If requested, disable support for qC, qfThreadInfo
19678 and qsThreadInfo.
19679 (handle_v_requests): If requested, disable support for vCont.
19680 (gdbserver_show_disableable): New.
19681 (main): Handle --disable-packet and --disable-packet=LIST.
19682
19683 * server.h (disable_packet_vCont, disable_packet_Tthread)
19684 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19685
19686 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19687
19688 * server.c (gdbserver_usage): Mention --version.
19689
19690 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19691
19692 * Makefile.in (gdbreplay.o): New rule.
19693
19694 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19695
19696 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19697 message, not gdbserver.
19698
19699 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19700 Nathan Sidwell <nathan@codesourcery.com>
19701 Joseph Myers <joseph@codesourcery.com>
19702
19703 * acinclude.m4: Include ../../config/acx.m4.
19704 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19705 * configure, config.in: Regenerate.
19706 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19707 * server.c (gdbserver_version): Print PKGVERSION.
19708 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19709 (main): Adjust gdbserver_usage calls.
19710 * gdbreplay.c (version, host_name): Add declarations.
19711 (gdbreplay_version, gdbreplay_usage): New.
19712 (main): Accept --version and --help options.
19713
19714 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19715
19716 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19717 (arm_breakpoint_at): Handle Thumb.
19718 (the_low_target): Add comment.
19719
19720 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19721
19722 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19723
19724 2008-05-09 Doug Evans <dje@google.com>
19725
19726 * server.h (decode_search_memory_packet): Declare.
19727 * remote-utils.c (decode_search_memory_packet): New fn.
19728 * server.c (handle_search_memory_1): New fn.
19729 (handle_search_memory): New fn.
19730 (handle_query): Process qSearch:memory packets.
19731
19732 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19733
19734 * regcache.c (registers_length): Remove.
19735 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19736 full register packet.
19737 * regcache.h (registers_length): Remove prototype.
19738 * server.h (PBUFSIZ): Define to 16384.
19739
19740 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19741
19742 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19743 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19744 powerpc-64l.o, and powerpc-altivec64l.o.
19745 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19746 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19747 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19748 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19749 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19750 to srv_xmlfiles.
19751
19752 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19753 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19754 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19755 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19756 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19757 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19758 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19759 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19760 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19761 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19762 (clean): Update.
19763
19764 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19765 (init_registers_powerpc_32l): ... this new prototype.
19766 (init_registers_powerpc_32): Remove, replace by ...
19767 (init_registers_powerpc_altivec32l): ... this new prototype.
19768 (init_registers_powerpc_e500): Remove, replace by ...
19769 (init_registers_powerpc_e500l): ... this new prototype.
19770 (init_registers_ppc64): Remove, replace by ...
19771 (init_registers_powerpc_64l): ... this new prototype.
19772 (init_registers_powerpc_64): Remove, replace by ...
19773 (init_registers_powerpc_altivec64l): ... this new prototype.
19774 (ppc_num_regs): Set to 73.
19775 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19776 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19777 (ppc_cannot_store_register): Handle orig_r3 and trap.
19778 (ppc_arch_setup): Update init_registers_... calls.
19779 (ppc_fill_gregset): Handle orig_r3 and trap.
19780
19781 * inferiors.c (clear_inferiors): Reset current_inferior.
19782
19783 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19784
19785 * acinclude.m4: Add override.m4.
19786 * configure: Regenerate.
19787
19788 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19789
19790 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19791 initial call to init_register_ppc64.
19792
19793 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19794
19795 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19796 single powerpc*-*-linux* case.
19797 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19798
19799 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19800
19801 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19802 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19803 from reg_xmlfiles.
19804 * linux-ppc-low.c: Include <elf.h>.
19805 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19806 (ppc_hwcap): New global variable.
19807 (ppc_regmap): Remove __SPE__ #ifdef sections.
19808 (ppc_regmap_e500): New global variable.
19809 (ppc_cannot_store_register): Update __SPE__ special case.
19810 (ppc_get_hwcap): New function.
19811 (ppc_arch_setup): Use it to determine whether inferior supports
19812 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19813 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19814 Do not access registers if target does not support AltiVec.
19815 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19816 Do not access registers if target does not support SPE.
19817 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19818
19819 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19820
19821 * linux-low.c (disabled_regsets, num_regsets): New.
19822 (use_regsets_p): Delete.
19823 (linux_wait_for_process): Clear disabled_regsets.
19824 (regsets_fetch_inferior_registers): Check and set it.
19825 (regsets_store_inferior_registers): Likewise.
19826 (linux_fetch_registers, linux_store_registers): Do not use
19827 use_regsets_p.
19828 (initialize_low): Allocate disabled_regsets.
19829
19830 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19831
19832 * Makefile.in (LIBOBJS): New.
19833 (OBS): Use LIBOBJS.
19834 (memmem.o): New rule.
19835 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19836 * configure: Regenerated.
19837
19838 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19839
19840 * server.c (handle_query): Never return "unsupported" for
19841 qXfer:features:read queries.
19842
19843 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19844
19845 * server.c (get_features_xml): Fix inverted condition.
19846 (handle_query): Always support qXfer:feature:read.
19847
19848 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19849
19850 * server.c (wrapper_argv): New.
19851 (start_inferior): Handle wrapper_argv. If set, expect an extra
19852 trap.
19853 (gdbserver_usage): Document --wrapper.
19854 (main): Parse --wrapper.
19855
19856 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19857
19858 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19859 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19860 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19861 (ppc_set_pc): Likewise.
19862 (ppc_arch_setup): New function.
19863 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19864 of collect_register.
19865 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19866
19867 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19868
19869 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19870 instead of linux-ppc64-low.o.
19871 * linux-ppc64-low.c: Remove file.
19872 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19873 (linux-ppc64-low.o): Remove rule.
19874
19875 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19876 (init_registers_powerpc_64): Likewise.
19877 (ppc_regmap): Conditionally define depending on __powerpc64__.
19878 (ppc_cannot_store_register): Do not special-case "fpscr" when
19879 compiled on __powerpc64__.
19880 (ppc_collect_ptrace_register): New function.
19881 (ppc_supply_ptrace_register): New function.
19882 (ppc_breakpoint): Change type to "unsigned int".
19883 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19884 (the_low_target): Conditionally provide initializers for the
19885 arch_setup member depending on __powerpc64__. Install
19886 collect_ptrace_register and supply_ptrace_register members.
19887
19888 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19889
19890 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19891 * server.c (gdbserver_xmltarget): Define.
19892 (get_features_xml): Use it to replace "target.xml" and arch_string.
19893
19894 * configure.srv: Remove srv_xmltarget. Add XML files that were
19895 mentioned there to srv_xmlfiles instead. Remove conditional tests
19896 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19897 srv_xmlfiles and srv_regobj to include all possible choices.
19898 * configure.ac (srv_xmltarget): Remove.
19899 (srv_xmlfiles): Do not add "target.xml".
19900 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19901 checks for supplementary target information.
19902 * configure: Regenerate.
19903 * Makefile.in (XML_TARGET): Remove.
19904 (target.xml): Remove rule.
19905 (clean): Do not clean up target.xml.
19906 (.PRECIOUS): Do not mention target.xml.
19907
19908 * target.h (struct target_ops): Remove arch_string member.
19909 * linux-low.c (linux_arch_string): Remove.
19910 (linux_target_ops): Remove arch_string initializer.
19911 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19912 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19913 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19914 * spu-low.c (spu_arch_string): Remove.
19915 (spu_target_ops): Remove arch_string initializer.
19916 * win32-low.c (win32_arch_string): Remove.
19917 (win32_target_ops): Remove arch_string initializer.
19918 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19919 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19920 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19921
19922 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19923
19924 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19925 by collect_ptrace_register and supply_ptrace_register hooks.
19926 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19927 instead of checking for the_low_target.left_pad_xfer.
19928 (usr_store_inferior_registers): Use collect_ptrace_register callback
19929 instead of checking for the_low_target.left_pad_xfer.
19930
19931 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19932 (s390_supply_ptrace_register): Likewise.
19933 (s390_fill_gregset): Call s390_collect_ptrace_register.
19934 (the_low_target): Update.
19935
19936 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19937 (ppc_supply_ptrace_register): Likewise.
19938 (the_low_target): Update.
19939
19940 * linux-i386-low.c (the_low_target): Update.
19941 * linux-x86-64-low.c (the_low_target): Update.
19942
19943 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19944
19945 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19946 reg-s390.o and reg-s390x.o.
19947
19948 * linux-low.c (new_inferior): New global variable.
19949 (linux_create_inferior, linux_attach): Set it.
19950 (linux_wait_for_process): Call the_low_target.arch_setup after the
19951 target has stopped for the first time.
19952 (initialize_low): Do not call the_low_target.arch_setup.
19953
19954 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19955 (s390_set_pc): Likewise.
19956 (s390_arch_setup): New function.
19957 (the_low_target): Use s390_arch_setup as arch_setup routine.
19958
19959 * regcache.c (realloc_register_cache): New function.
19960 (set_register_cache): Call it for each existing regcache.
19961
19962 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19963
19964 * server.h (init_registers): Remove prototype.
19965
19966 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19967 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19968 instead of init_registers ().
19969 * linux-arm-low.c (init_registers_arm): Add prototype.
19970 (init_registers_arm_with_iwmmxt): Likewise.
19971 (the_low_target): Add initializer for arch_setup field.
19972 * linux-cris-low.c (init_registers_cris): Add prototype.
19973 (the_low_target): Add initializer for arch_setup field.
19974 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19975 (the_low_target): Add initializer for arch_setup field.
19976 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19977 (the_low_target): Add initializer for arch_setup field.
19978 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19979 (the_low_target): Add initializer for arch_setup field.
19980 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19981 (the_low_target): Add initializer for arch_setup field.
19982 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19983 (the_low_target): Add initializer for arch_setup field.
19984 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19985 (init_registers_mips64_linux): Likewise.
19986 (the_low_target): Add initializer for arch_setup field.
19987 * linux-ppc-low.c (init_registers_ppc): Add prototype.
19988 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
19989 (the_low_target): Add initializer for arch_setup field.
19990 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
19991 (init_registers_powerpc_64): Likewise.
19992 (the_low_target): Add initializer for arch_setup field.
19993 * linux-s390-low.c (init_registers_s390): Add prototype.
19994 (init_registers_s390x): Likewise.
19995 (the_low_target): Add initializer for arch_setup field.
19996 * linux-sh-low.c (init_registers_sh): Add prototype.
19997 (the_low_target): Add initializer for arch_setup field.
19998 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
19999 (the_low_target): Add initializer for arch_setup field.
20000 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20001 (the_low_target): Add initializer for arch_setup field.
20002
20003 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20004 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20005 instead of init_registers ().
20006 * win32-arm-low.c (init_registers_arm): Add prototype.
20007 (the_low_target): Add initializer for arch_setup field.
20008 * win32-i386-low.c (init_registers_i386): Add prototype.
20009 (the_low_target): Add initializer for arch_setup field.
20010
20011 * spu-low.c (init_registers_spu): Add prototype.
20012 (initialize_low): Call initialie_registers_spu () instead of
20013 initialize_registers ().
20014
20015 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20016
20017 * server.c (handle_v_requests): When handling the vRun and vAttach
20018 packets, if already debugging a process, don't kill it. Return an
20019 error instead.
20020
20021 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20022
20023 * server.c (handle_query): Correct length check.
20024
20025 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20026
20027 * win32-low.c (do_initial_child_stuff): Add process handle
20028 parameter. Set current_process_handle and current_process_id from the
20029 parameters. Clear globals.
20030 (win32_create_inferior): Don't set current_process_handle and
20031 current_process_id here. Instead pass them on the call to
20032 do_initial_child_stuff.
20033 (win32_attach): Likewise.
20034 (win32_clear_inferiors): New.
20035 (win32_kill): Don't close the current process handle or the
20036 current thread handle here. Instead call win32_clear_inferiors.
20037 (win32_detach): Don't open a new handle to the process. Call
20038 win32_clear_inferiors.
20039 (win32_join): Don't rely on current_process_handle; open a new
20040 handle using the process id.
20041 (win32_wait): Call win32_clear_inferiors when the inferior process
20042 has exited.
20043
20044 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20045
20046 * server.c (monitor_show_help): Add "exit".
20047
20048 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20049
20050 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20051 (clean): Add reg-xtensa.c.
20052 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20053 * configure.srv (xtensa*-*-linux*) New target.
20054 * linux-xtensa-low.c: New.
20055 * xtensa-xtregs.c: New.
20056
20057 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20058
20059 * hostio.c: Don't include errno.h.
20060 (errno_to_fileio_errno): Move to hostio-errno.
20061 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20062 error number outputting to the target->hostio_last_error callback.
20063 (hostio_packet_error): Use FILEIO_EINVAL directly.
20064 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20065 calls to hostio_error.
20066 * hostio-errno.c: New.
20067 * server.h (hostio_last_error_from_errno): Declare.
20068 * target.h (target_ops): Add hostio_last_error member.
20069 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20070 as hostio_last_error handler.
20071 * spu-low.c (spu_target_ops): Likewise.
20072 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20073 (wince_hostio_last_error): New functions.
20074 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20075 as hostio_last_error handler.
20076 (win32_target_ops) [!_WIN32_WCE]: Register
20077 hostio_last_error_from_errno as hostio_last_error handler.
20078 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20079 (hostio-errno.o): New rule.
20080 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20081 * configure.srv (srv_hostio_err_objs): New variable. Default to
20082 hostio-errno.o.
20083 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20084 * configure: Regenerate.
20085
20086 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20087
20088 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20089 (linux_kill, linux_detach): Clean up the process list.
20090 * remote-utils.c (remote_open): Improve port number parsing.
20091 (putpkt_binary, input_interrupt): Only send interrupts if the target
20092 is running.
20093 * server.c (extended_protocol): Make static.
20094 (attached): Define earlier.
20095 (exit_requested, response_needed, program_argv): New variables.
20096 (target_running): New.
20097 (start_inferior): Clear attached here.
20098 (attach_inferior): Set attached here.
20099 (require_running): Define.
20100 (handle_query): Use require_running and target_running. Implement
20101 "monitor exit".
20102 (handle_v_attach, handle_v_run): New.
20103 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20104 (gdbserver_usage): Update.
20105 (main): Redo argument parsing. Handle --debug and --multi. Handle
20106 --attach along with other options or after the port. Save
20107 program_argv. Support no initial program. Resynchronize
20108 communication with GDB after an error. Handle "monitor exit".
20109 Use require_running and target_running. Always allow the extended
20110 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20111 restart in extended mode.
20112 * README: Refer to the GDB manual. Update --attach usage.
20113
20114 2007-12-20 Andreas Schwab <schwab@suse.de>
20115
20116 * linux-low.c (STACK_SIZE): Define.
20117 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20118 (linux_test_for_tracefork): Likewise.
20119
20120 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20121
20122 * linux-low.c (linux_wait_for_event): Update messages. Do not
20123 reinsert auto-delete breakpoints.
20124 * mem-break.c (struct breakpoint): Change return type of handler to
20125 int.
20126 (set_breakpoint_at): Update handler type.
20127 (reinsert_breakpoint_handler): Return 1 instead of calling
20128 delete_breakpoint.
20129 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20130 setting a new one.
20131 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20132 * mem-break.h (set_breakpoint_at): Update handler type.
20133 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20134 * win32-low.c (auto_delete_breakpoint): New.
20135 (get_child_debug_event): Use it.
20136
20137 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20138
20139 * configure.ac: Check for pread and pwrite.
20140 * hostio.c (handle_pread): Fall back to lseek and read.
20141 (handle_pwrite): Fall back to lseek and write.
20142 * config.in, configure: Regenerated.
20143
20144 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20145
20146 * server.c (myresume): Add own_buf argument.
20147 (main): Update calls.
20148
20149 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20150
20151 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20152 * remote-utils.c (remote_open): Do not call disable_async_io.
20153 (block_async_io): Delete.
20154 (unblock_async_io): Make static.
20155 (initialize_async_io): New.
20156 * server.c (handle_v_cont): Handle async I/O here.
20157 (myresume): Likewise. Move other common resume tasks here...
20158 (main): ... from here. Call initialize_async_io. Disable async
20159 I/O before the main loop.
20160 * server.h (initialize_async_io): Declare.
20161 (block_async_io, unblock_async_io): Delete prototypes.
20162 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20163
20164 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20165
20166 * remote-utils.c (readchar): Allow binary data in received messages.
20167
20168 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20169
20170 * win32-low.c (attaching): New global.
20171 (win32_create_inferior): Clear the `attaching' global.
20172 (win32_attach): Set the `attaching' global.
20173 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20174 attaching. Only set a breakpoint at the entry point if not
20175 attaching.
20176
20177 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20178
20179 * server.c (main): Don't report dll events on the initial
20180 connection on attaches.
20181
20182 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20183
20184 * server.c (main): Relax numerical bases supported for the pid of
20185 the --attach command line argument.
20186
20187 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20188
20189 * win32-low.c (win32_attach): Call OpenProcess before
20190 DebugActiveProcess, not after. Add last error output to error
20191 call.
20192
20193 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20194
20195 * win32-low.c (win32_get_thread_context)
20196 (win32_set_thread_context): New functions.
20197 (thread_rec): Use win32_get_thread_context.
20198 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20199 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20200 field.
20201
20202 2007-12-03 Leo Zayas
20203 Pedro Alves <pedro_alves@portugalmail.pt>
20204
20205 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20206 global variables.
20207 (child_add_thread): Minor cleanup.
20208 (child_continue): Resume artificially suspended threads before
20209 calling ContinueDebugEvent.
20210 (suspend_one_thread): New.
20211 (fake_breakpoint_event): New.
20212 (get_child_debug_event): Change return type to int. Check here if
20213 gdb sent an interrupt request. If a soft interrupt was requested,
20214 fake a breakpoint event. Return 0 if there is no event to handle,
20215 and 1 otherwise.
20216 (win32_wait): Don't check here if gdb sent an interrupt request.
20217 Ensure there is a valid event to handle.
20218 (win32_request_interrupt): Add soft interruption method as last
20219 resort.
20220
20221 2007-12-03 Leo Zayas
20222 Pedro Alves <pedro_alves@portugalmail.pt>
20223
20224 * win32-low.h (win32_thread_info): Add descriptions to the
20225 structure members. Replace `suspend_count' counter by a
20226 `suspended' flag.
20227 * win32-low.c (thread_rec): Update condition of when to get the
20228 context from the inferior. Rely on ContextFlags being set if it
20229 has already been retrieved. Only suspend the inferior thread if
20230 we haven't already. Warn if that fails.
20231 (continue_one_thread): s/suspend_count/suspended/. Only call
20232 ResumeThread once. Warn if that fails.
20233
20234 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20235
20236 * win32-low.c (win32_wait): Don't read from the inferior when it
20237 has already exited.
20238
20239 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20240
20241 * Makefile.in (win32_low_h): New variable.
20242 (win32-low.o): Add dependency on $(win32_low_h).
20243 (win32-arm-low.o, win32-i386-low.o): New rules.
20244
20245 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20246
20247 * hostio.c: Correct copyright year.
20248
20249 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20250
20251 * Makefile.in (OBS): Add hostio.o.
20252 (hostio.o): New rule.
20253 * server.h (handle_vFile): Declare.
20254 * hostio.c: New file.
20255 * server.c (handle_v_requests): Take packet_len and new_packet_len
20256 for binary packets. Call handle_vFile.
20257 (main): Update call to handle_v_requests.
20258
20259 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20260
20261 * linux-low.c: Include <sched.h>.
20262
20263 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20264
20265 * linux-low.c (linux_tracefork_grandchild): New.
20266 (linux_tracefork_child): Use clone.
20267 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20268
20269 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20270
20271 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20272
20273 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20274
20275 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20276
20277 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20278
20279 * inferiors.c (change_inferior_id): Delete.
20280 (add_pid_to_list, pull_pid_from_list): New.
20281 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20282 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20283 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20284 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20285 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20286 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20287 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20288 (using_threads): Always set to 1.
20289 (handle_extended_wait): New.
20290 (add_process): Do not set TID.
20291 (linux_create_inferior): Set must_set_ptrace_flags.
20292 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20293 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20294 (linux_thread_alive): Rename TID argument to LWPID.
20295 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20296 (linux_wait_for_event): Do not use TID or check using_threads. Update
20297 call to dead_thread_notify. Call handle_extended_wait.
20298 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20299 (send_sigstop): Delete sigstop_sent.
20300 (wait_for_sigstop): Avoid TID.
20301 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20302 (linux_test_for_tracefork): New.
20303 (linux_lookup_signals): Use thread_db_active and
20304 linux_supports_tracefork_flag.
20305 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20306 * linux-low.h (get_process_thread): Avoid TID.
20307 (struct process_ifo): Move thread_known and tid to the end. Remove
20308 sigstop_sent.
20309 (linux_attach_lwp, thread_db_init): Update prototypes.
20310 * server.h (change_inferior_id): Delete prototype.
20311 (add_pid_to_list, pull_pid_from_list): New prototypes.
20312 * thread-db.c (thread_db_use_events): New.
20313 (find_first_thread): Rename to...
20314 (find_one_thread): ...this. Update callers and messages. Do not
20315 call fatal. Check thread_db_use_events. Do not call
20316 change_inferior_id or new_thread_notify.
20317 (maybe_attach_thread): Update. Do not call new_thread_notify.
20318 (thread_db_init): Set thread_db_use_events. Check use_events.
20319 * utils.c (fatal, warning): Correct message prefix.
20320
20321 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20322
20323 * Makefile.in (clean): Remove new files.
20324 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20325 (powerpc-64.o, powerpc-64.c): New rules.
20326 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20327 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20328 with SPE.
20329 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20330 SPE targets.
20331 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20332 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20333 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20334 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20335 (target_regsets): Add AltiVec and SPE register sets.
20336 * configure.ac: Check for AltiVec and SPE.
20337 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20338 (ppc_fill_vrregset, ppc_store_vrregset): New.
20339 (target_regsets): Add AltiVec register set.
20340 * configure: Regenerated.
20341
20342 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20343
20344 * linux-low.c (O_LARGEFILE): Define.
20345 (linux_read_memory): Use /proc/PID/mem.
20346 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20347 * configure, config.in: Regenerated.
20348
20349 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20350
20351 * linux-low.c (linux_wait_for_event): Do not pass signals while
20352 single-stepping.
20353
20354 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20355
20356 * win32-low.c (create_process): New.
20357 (win32_create_inferior): Use create_process instead of
20358 CreateProcess. If create_process failed retry appending an ".exe"
20359 suffix. Store the GetLastError result immediatelly after
20360 create_process calls and use it on the call to error.
20361
20362 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20363
20364 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20365
20366 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20367
20368 * configure.ac: Switch license to GPLv3.
20369
20370 2007-08-01 Michael Snyder <msnyder@access-company.com>
20371
20372 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20373
20374 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20375
20376 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20377 typedef.
20378 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20379 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20380 CloseToolhelp32Snapshot.
20381 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20382 CloseToolhelp32Snapshot.
20383
20384 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20385
20386 * server.c (main): Check for inferior exit before main loop.
20387
20388 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20389
20390 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20391 instead of on tmp_desc.
20392
20393 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20394 Daniel Jacobowitz <dan@codesourcery.com>
20395
20396 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20397 (add_thread): Minor cleanups.
20398 (clear_inferiors): Move lower in the file. Clear the DLL
20399 list.
20400 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20401 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20402 (xml_escape_text): New.
20403 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20404 for qSupported.
20405 (handle_v_cont): Report errors.
20406 (gdbserver_version): Update.
20407 (main): Correct size of own_buf. Do not report initial DLL events.
20408 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20409 (unloaded_dll, xml_escape_text): New.
20410 * win32-low.c (enum target_waitkind): Update comments.
20411 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20412 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20413 (win32_EnumProcessModules, win32_GetModuleInformation)
20414 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20415 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20416 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20417 (win32_Module32First, win32_Module32Next, load_toolhelp)
20418 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20419 (get_child_debug_event): Handle DLL events.
20420 (win32_wait): Likewise.
20421
20422 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20423
20424 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20425 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20426
20427 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20428
20429 * win32-low.c (handle_output_debug_string): Ignore event if not
20430 waiting.
20431
20432 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20433
20434 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20435
20436 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20437
20438 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20439
20440 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20441
20442 * inferiors.c (change_inferior_id): Add comment.
20443 * linux-low.c (check_removed_breakpoint): Add an early
20444 prototype. Improve debug output.
20445 (linux_attach): Doc update.
20446 (linux_detach_one_process, linux_detach): Clean up before releasing
20447 each process.
20448 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20449 * linux-low.h (struct process_info): Doc improvement.
20450 * mem-break.c (delete_all_breakpoints): New.
20451 * mem-break.h (delete_all_breakpoints): New prototype.
20452 * thread-db.c (find_first_thread): New.
20453 (thread_db_create_event): Call it instead of
20454 thread_db_find_new_threads. Clean up unused variables.
20455 (maybe_attach_thread): Remove first thread handling.
20456 (thread_db_find_new_threads): Use find_first_thread.
20457 (thread_db_get_tls_address): Likewise.
20458
20459 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20460
20461 * thread-db.c (thread_db_find_new_threads): Add prototype.
20462 (thread_db_create_event): Check for the main thread before adding
20463 a new thread.
20464 (maybe_attach_thread): Only enable event reporting if TID == 0.
20465 (thread_db_get_tls_address): Check for new threads.
20466
20467 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20468
20469 * linux-low.c (linux_create_inferior): Try execv before execvp.
20470 * spu-low.c (spu_create_inferior): Likewise.
20471
20472 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20473
20474 * linux-low.c (linux_create_inferior): Change execv to execvp.
20475 * spu-low.c (spu_create_inferior): Likewies.
20476
20477 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20478
20479 * Makefile.in (clean): Clean new files instead of deleted ones.
20480 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20481 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20482 rules.
20483 * configure.srv: Specify XML files and new regformats for MIPS and
20484 MIPS64 GNU/Linux.
20485 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20486 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20487 an entry for the restart register.
20488 (mips_cannot_fetch_register, mips_cannot_store_register)
20489 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20490 register names to match the XML descriptions.
20491 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20492 restart register instead of $0.
20493
20494 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20495 Markus Deuling <deuling@de.ibm.com>
20496
20497 * remote-utils.c (decode_xfer_write): New function.
20498 * server.h (decode_xfer_write): Add prototype.
20499 * server.c (handle_query): Add PACKET_LEN argument. Support
20500 qXfer:spu:read and qXfer:spu:write packets.
20501 (main): Pass packet_len to handle_query.
20502 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20503 * target.h (target_ops): Add qxfer_spu.
20504
20505 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20506
20507 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20508 accessing non-seekable spufs files.
20509
20510 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20511
20512 * server.c (handle_query): Add reply for qC packet.
20513
20514 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20515 Leo Zayas <lerele@champenstudios@com>
20516
20517 * server.h (check_remote_input_interrupt_request): New function.
20518 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20519 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20520 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20521 (check_remote_input_interrupt_request): New function.
20522 * server.h (check_remote_input_interrupt_request): Declare.
20523 * win32-low.c (winapi_DebugBreakProcess,
20524 winapi_GenerateConsoleCtrlEvent): New typedefs.
20525 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20526 to 250 ms.
20527 (win32_wait): Check for remote interrupt request
20528 with check_remote_input_interrupt_request.
20529 (win32_request_interrupt): New function.
20530 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20531
20532 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20533
20534 * win32-low.c (debug_registers_changed,
20535 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20536 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20537 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20538 (thread_rec): Get context using the low target.
20539 (child_add_thread): Call thread_added on the low target,
20540 which does the same thing.
20541 (regptr): Delete.
20542 (do_initial_child_stuff): Remove debug registers references.
20543 Set context using the low target. Resume threads after
20544 setting the contexts.
20545 (child_continue): Remove dead variable. Remove debug
20546 registers references.
20547 (child_fetch_inferior_registers): Go through the low target.
20548 (do_child_store_inferior_registers): Remove.
20549 (child_store_inferior_registers): Go through the low target.
20550 (win32_resume): Remove debug registers references.
20551 Set context using the low target.
20552 (handle_exception): Change return type to void. Don't record
20553 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20554 first chance exception.
20555 (get_child_debug_event): Change return type to void. Remove
20556 goto loop. Always return after waiting for debug event.
20557 (win32_wait): Convert to switch statement. Handle spurious
20558 events.
20559
20560 * win32-i386-low.c (debug_registers_changed,
20561 debug_registers_used): New.
20562 (initial_stuff): Rename to ...
20563 (i386_initial_stuff): ... this. Clear debug registers
20564 state variables.
20565 (store_debug_registers): Delete.
20566 (i386_get_thread_context): New.
20567 (load_debug_registers): Delete.
20568 (i386_set_thread_context): New.
20569 (i386_thread_added): New.
20570 (single_step): Rename to ...
20571 (i386_single_step): ... this.
20572 (do_fetch_inferior_registers): Rename to ...
20573 (i386_fetch_inferior_register): ... this.
20574 (i386_store_inferior_register): New.
20575 (the_low_target): Adapt to new interface.
20576
20577 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20578 (arm_get_thread_context): New.
20579 (arm_set_thread_context): New.
20580 (regptr): New.
20581 (do_fetch_inferior_registers): Rename to ...
20582 (arm_fetch_inferior_register): ... this.
20583 (arm_store_inferior_register): New.
20584 (arm_wince_breakpoint): Reimplement as unsigned long.
20585 (arm_wince_breakpoint_len): Define.
20586 (the_low_target): Adapt to new interface.
20587
20588 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20589 load_debug_registers. Add get_thread_context, set_thread_context,
20590 thread_added and store_inferior_register. Rename
20591 fetch_inferior_registers to fetch_inferior_register.
20592 (regptr): Remove declaration.
20593
20594 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20595
20596 * linux-low.c (linux_detach): Change return type to int. Return 0.
20597 * spu-low.c (spu_detach): Likewise.
20598
20599 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20600
20601 * target.h (target_ops): Change return type of detach to int.
20602 Add join.
20603 (join_inferior): New.
20604 * server.c (main): Don't skip detach support on mingw32.
20605 If the inferior doesn't support detaching return error.
20606 Call join_inferior instead of using waitpid.
20607 * linux-low.c (linux_join): New.
20608 (linux_target_op): Add linux_join.
20609 * spu-low.c (spu_join): New.
20610 (spu_target_ops): Add spu_join.
20611 * win32-low.c (win32_detach): Adapt to new interface.
20612 Reopen current_process_handle before detaching. Issue a child
20613 resume before detaching.
20614 (win32_join): New.
20615 (win32_target_op): Add win32_join.
20616
20617 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20618
20619 * win32-low.c (win32-attach): Fix return value.
20620 * target.h (target_ops): Describe ATTACH return values.
20621
20622 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20623
20624 * win32-low.c (GETPROCADDRESS): Define.
20625 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20626 (winapi_DebugSetProcessKillOnExit): Likewise.
20627 (win32_create_inferior): Force usage of ansi CreateProcessA.
20628 (win32_attach): Use GETPROCADDRESS.
20629 (win32_detach): Likewise.
20630
20631 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20632
20633 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20634
20635 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20636
20637 * win32-low.c: Commit leftover changes from 2007-03-29.
20638
20639 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20640
20641 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20642 fields short instead of int. Add explicit padding.
20643 (i387_cache_to_fsave): Remove unnecessary casts.
20644 (i387_fsave_to_cache): Doc fix.
20645 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20646
20647 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20648
20649 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20650 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20651
20652 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20653
20654 * configure.srv (arm*-*-mingw32ce*): Move near the other
20655 arm targets.
20656
20657 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20658
20659 * configure.ac: Add errno checking.
20660 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20661 sys/file.h and malloc.h.
20662 (AC_CHECK_DECLS): Add perror.
20663 (srv_mingwce): Handle.
20664 * configure.srv (i[34567]86-*-cygwin*): Add
20665 win32-i386-low.o to srv_tgtobj.
20666 (i[34567]86-*-mingw*): Likewise.
20667 (arm*-*-mingw32ce*): Add case.
20668 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20669 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20670 [__MINGW32CE__] (strerror): New function.
20671 [__MINGW32CE__] (errno): Define to GetLastError.
20672 [__MINGW32CE__] (COUNTOF): New macro.
20673 (remote_open): Remove extra close call.
20674 * mem-break.c (delete_breakpoint_at): New function.
20675 * mem-break.h (delete_breakpoint_at): Declare.
20676 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20677 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20678 [USE_WIN32API] (read, write): Add char* casts.
20679 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20680 * server.h: Include wincecompat.h on Windows CE.
20681 [HAVE_ERRNO_H]: Check.
20682 (perror): Declare if not declared.
20683 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20684 (perror_with_name): Remove errno declaration.
20685 * wincecompat.h: New.
20686 * wincecompat.c: New.
20687 * win32-low.h: New.
20688 * win32-arm-low.c: New.
20689 * win32-i386-low.c: New.
20690 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20691 (OUTMSG2): Make it safe.
20692 (_T): New macro.
20693 (COUNTOF): New macro.
20694 (NUM_REGS): Get it from the low target.
20695 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20696 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20697 (thread_rec): Let low target handle debug registers.
20698 (child_add_thread): Likewise.
20699 (child_init_thread_list): Likewise.
20700 (continue_one_thread): Likewise.
20701 (regptr): New.
20702 (do_child_fetch_inferior_registers): Move to ...
20703 * win32-i386-low.c: ... here, and rename to ...
20704 (do_fetch_inferior_registers): ... this.
20705 * win32-low.c (child_fetch_inferior_registers):
20706 Go through the low target.
20707 (do_child_store_inferior_registers): Use regptr.
20708 (strwinerror): New function.
20709 (win32_create_inferior): Handle Windows CE.
20710 Use strwinerror instead of strerror on Windows error
20711 codes. Add program to the error output.
20712 Don't close the main thread handle on Windows CE.
20713 (win32_attach): Use coredll.dll on Windows CE.
20714 (win32_kill): Close current process and current
20715 thread handles.
20716 (win32_detach): Use coredll.dll on Windows CE.
20717 (win32_resume): Let low target handle debug registers, and
20718 step request.
20719 (handle_exception): Add/Remove initial breakpoint. Avoid
20720 non-existant WSTOPSIG on Windows CE.
20721 (win32_read_inferior_memory): Cast to remove warning.
20722 (win32_arch_string): Go through the low target.
20723 (initialize_low): Call set_breakpoint_data with the low
20724 target's breakpoint.
20725 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20726 FOP_REGNUM, mappings): Move to ...
20727 * win32-i386-low.c: ... here.
20728 * win32-low.c (win32_thread_info): Move to ...
20729 * win32-low.h: ... here.
20730 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20731 win32-arm-low.c and wincecompat.c.
20732 (all:): Add $EXEEXT.
20733 (install-only:): Likewise.
20734 (gdbserver:): Likewise.
20735 (gdbreplay:): Likewise.
20736 * config.in: Regenerate.
20737 * configure: Regenerate.
20738
20739 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20740
20741 * win32-low.c: Rename typedef thread_info to
20742 win32_thread_info throughout.
20743
20744 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20745
20746 * win32-i386-low.c: Rename to ...
20747 * win32-low.c: ... this.
20748 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20749 * Makefile.in: Likewise.
20750
20751 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20752
20753 * remote-utils.c (monitor_output): Constify msg parameter.
20754 * server.h (monitor_output): Likewise.
20755 * win32-i386-low.c (handle_output_debug_string): New.
20756 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20757 handle_output_debug_string.
20758 (get_child_debug_event): Likewise.
20759
20760 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20761
20762 * server.c (main): Correct strtoul check.
20763
20764 2007-03-27 Jon Ringle <jon@ringle.org>
20765
20766 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20767
20768 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20769
20770 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20771
20772 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20773
20774 * terminal.h: Check HAVE_SGTTY_H.
20775
20776 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20777
20778 * remote-utils.c (remote_open): Print out the assigned port number.
20779
20780 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20781
20782 * remote-utils.c (monitor_output): New function.
20783 * server.c (debug_threads): Define here.
20784 (monitor_show_help): New function.
20785 (handle_query): Handle qRcmd.
20786 (main): Do not handle 'd' packet.
20787 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20788 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20789 of debug_threads.
20790
20791 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20792
20793 * Makefile.in (EXEEXT): New.
20794 (clean): Use $(EXEEXT).
20795
20796 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20797
20798 * target.h (target_ops): Rename send_signal to request_interrupt,
20799 and remove enum target_signal parameter.
20800 * linux-low.c (linux_request_interrupt): Rename from
20801 linux_send_signal, and always send SIGINT.
20802 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20803 and always send SIGINT.
20804 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20805 of send_signal.
20806 (input_interrupt): Likewise.
20807
20808 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20809
20810 * server.c (get_features_xml): Check if target implemented
20811 arch_string.
20812 * win32-i386-low.c (win32_arch_string): New.
20813 (win32_target_ops): Add win32_arch_string as arch_string member.
20814
20815 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20816
20817 * spu-low.c (spu_arch_string): New.
20818 (spu_target_ops): Add spu_arch_string.
20819
20820 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20821
20822 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20823 * configure.ac: Do not check for terminal.h.
20824 * configure, config.in: Regenerated.
20825
20826 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20827
20828 * Makefile.in (OBS): Add $(XML_BUILTIN).
20829 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20830 (clean): Update.
20831 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20832 (arm-with-iwmmxt.c): New.
20833 * config.in, configure: Regenerate.
20834 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20835 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20836 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20837 (arm*-*-linux*): Add iWMMXt and regset support.
20838 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20839 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20840 (arm_store_wmmxregset, target_regsets): New.
20841 * server.c (get_features_xml): Take annex argument. Check builtin
20842 XML documents.
20843 (handle_query): Handle multiple annexes.
20844
20845 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20846
20847 * remote-utils.c [USE_WIN32API] (read, write): Define.
20848 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20849 write.
20850
20851 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20852
20853 * linux-i386-low.c (the_low_target): Set arch_string.
20854 * linux-x86-64-low.c (the_low_target): Likewise.
20855 * linux-low.c (linux_arch_string): New.
20856 (linux_target_ops): Add it.
20857 * linux-low.h (struct linux_target_ops): Add arch_string.
20858 * server.c (write_qxfer_response): Use const void * for DATA.
20859 (get_features_xml): New.
20860 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20861 * target.h (struct target_ops): Add arch_string method.
20862
20863 2007-01-03 Denis Pilat <denis.pilat@st.com>
20864 Daniel Jacobowitz <dan@codesourcery.com>
20865
20866 * linux-low.c (linux_kill): Handle being called with no threads.
20867 * win32-i386-low.c (win32_kill): Likewise.
20868 (get_child_debug_event): Clear current_process_handle.
20869
20870 2006-12-30 Denis PILAT <denis.pilat@st.com>
20871 Daniel Jacobowitz <dan@codesourcery.com>
20872
20873 * remote-utils.c (remote_open): Check the type of specified
20874 serial port devices before opening them.
20875 * server.c (main): Kill the inferior if an error occurs during
20876 the first remote_open.
20877
20878 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20879
20880 * README: Update supported targets.
20881
20882 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20883
20884 * Makefile.in (clean): Remove reg-mips64.c.
20885 (reg-mips64.c, reg-mips64.o): New rules.
20886 * configure.srv: Handle mips64. Include regset support for mips.
20887 * linux-mips-low.c (union mips_register): New.
20888 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20889 (mips_breakpoint, mips_breakpoint_at): Use int.
20890 (mips_collect_register, mips_supply_register)
20891 (mips_collect_register_32bit, mips_supply_register_32bit)
20892 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20893 (mips_store_fpregset, target_regsets): New.
20894 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20895
20896 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20897
20898 * configure.srv: Add target "spu*-*-*".
20899 * Makefile.in (clean): Remove reg-spu.c.
20900 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20901 * spu-low.c: New file.
20902
20903 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20904
20905 * configure.ac: Correct td_thr_tls_get_addr test.
20906 * configure: Regenerated.
20907
20908 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20909
20910 * linux-low.c (linux_wait_for_event): Reformat. Use the
20911 pass_signals array.
20912 * remote-utils.c (decode_address_to_semicolon): New.
20913 * server.c (pass_signals, handle_general_set): New.
20914 (handle_query): Mention QPassSignals for qSupported.
20915 (main): Call handle_general_set.
20916 * server.h (pass_signals, decode_address_to_semicolon): New.
20917
20918 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20919
20920 * server.c (handle_query): Correct error handling for read_auxv.
20921
20922 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20923
20924 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20925 and srv_linux_thread_db to yes.
20926 * linux-s390-low.c (s390_fill_gregset): New function.
20927 (target_regsets): Define data structure.
20928
20929 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20930
20931 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20932 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20933 * config.in, configure: Regenerated.
20934 * inferiors.c (gdb_id_to_thread): New function.
20935 (gdb_id_to_thread_id): Use it.
20936 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20937 * linux-low.h (struct process_info): Add th member.
20938 (thread_db_get_tls_address): New prototype.
20939 * remote-utils.c (decode_address): Make non-static.
20940 * server.c (handle_query): Handle qGetTLSAddr.
20941 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20942 * target.h (struct target_ops): Add get_tls_address.
20943 * thread-db.c (maybe_attach_thread): Save the thread handle.
20944 (thread_db_get_tls_address): New.
20945
20946 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20947
20948 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20949 (linux_resume_one_process): Take a siginfo_t *. Update all
20950 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20951 (struct pending_signals): Add a siginfo_t.
20952 (linux_wait_for_process): Always set last_status.
20953 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20954 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20955 * linux-low.h (struct process_info): Add last_status.
20956
20957 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20958
20959 * remote-utils.c (try_rle): New function.
20960 (putpkt_binary): Use it.
20961
20962 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20963
20964 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20965 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20966 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20967 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20968 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20969 point registers.
20970
20971 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20972
20973 * server.c (terminal_fd): New variable.
20974 (old_foreground_pgrp): Likewise.
20975 (restore_old_foreground_pgrp): New function.
20976 (start_inferior): Record the terminal file descriptor in terminal_fd
20977 and its original foreground group in old_foreground_pgrp. Register
20978 restore_old_foreground_pgrp with atexit().
20979
20980 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20981
20982 * server.c (handle_query): Correct qPart to qXfer.
20983
20984 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20985
20986 * configure.ac: Check for more headers which are missing on
20987 Windows. Automatically supply -lwsock32 and USE_WIN32API.
20988 * configure.srv: Add Cygwin and mingw32.
20989 * remote-utils.c: Don't include headers unconditionally which
20990 are missing on mingw32. Include <winsock.h> for mingw32.
20991 (remote_open): Adjust for mingw32 support. Flush
20992 standard error after writing to it.
20993 (remote_close, putpkt_binary, input_interrupt, block_async_io)
20994 (unblock_async_io, enable_async_io, disable_async_io)
20995 (readchar, getpkt): Update for Winsock support.
20996 (prepare_resume_reply): Expect a protocol signal number.
20997 * server.c: Disable <sys/wait.h> on mingw32.
20998 (start_inferior): Adjust for mingw32 support. Flush
20999 standard error after writing to it.
21000 (attach_inferior): Likewise. Use protocol signal
21001 numbers.
21002 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21003 and names.
21004 * win32-i386-low.c: New file.
21005 * Makefile.in (XM_CLIBS): Set.
21006 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21007 (win32-i386-low.o): New dependency rule.
21008 * linux-low.c (linux_wait): Use target signal numbers.
21009 * target.h (struct target_ops): Doc fix.
21010 * server.h (target_signal_to_name): New prototype.
21011 * gdbreplay.c: Don't include headers unconditionally which
21012 are missing on mingw32. Include <winsock.h> for mingw32.
21013 (remote_close, remote_open): Adjust for Winsock support.
21014 * configure, config.in: Regenerated.
21015
21016 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21017
21018 * server.c (decode_xfer_read, write_qxfer_response): New.
21019 (handle_query): Take a packet length argument. Handle
21020 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21021 the qSupported response.
21022 (main): Update call to handle_query.
21023
21024 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21025
21026 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21027 (putpkt_binary): Renamed from putpkt and adjusted for binary
21028 data.
21029 (putpkt): New wrapper for putpkt_binary.
21030 (readchar): Don't mask off the high bit.
21031 (decode_X_packet): New function.
21032 * server.c (main): Call putpkt_binary if a handler sets the packet
21033 length. Save the length of the incoming packet. Handle 'X'.
21034 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21035
21036 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21037
21038 * server.c (handle_query): Handle qSupported.
21039
21040 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21041
21042 * remote-utils.c (all_symbols_looked_up): New variable.
21043 (look_up_one_symbol): Check it.
21044 * server.h (look_up_one_symbol): New declaration.
21045 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21046
21047 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21048
21049 * Makefile.in (linux-arm-low.o): Update dependencies.
21050 * linux-arm-low.c: Include "gdb_proc_service.h".
21051 (PTRACE_GET_THREAD_AREA): Define.
21052 (ps_get_thread_area): New function.
21053
21054 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21055
21056 * configure.srv (m68k*-*-uclinux*): New target.
21057 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21058 (linux_resume_one_process): Remove extraneous cast.
21059 (linux_read_offsets): New.
21060 (linux_target_op): Add linux_read_offsets on mmuless systems.
21061 * server.c (handle_query): Add qOffsets logic.
21062 * target.h (struct target_ops): Add read_offsets.
21063
21064 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21065
21066 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21067 (PTRACE_GET_THREAD_AREA): Define.
21068 (ps_get_thread_area): New function.
21069 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21070 (linux-x86-64-low.o): Update.
21071
21072 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21073
21074 * configure.ac: Remove checks for prfpregset_t.
21075 * gdb_proc_service.h: New file.
21076 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21077 new "gdb_proc_service.h".
21078 * proc-service.c: Likewise.
21079 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21080 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21081 * Makefile.in (gdb_proc_service_h): Updated.
21082 * configure, config.in: Regenerated.
21083
21084 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21085
21086 * remote-utils.c (prepare_resume_reply): Move declaration
21087 of gdb_id_from_wait to the top of the block.
21088
21089 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21090
21091 * linux-low.c (regsets_store_inferior_registers): Read the regset
21092 from the target before filling it.
21093
21094 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21095
21096 * server.c (attach_inferior): Return SIGTRAP for a successful
21097 attach.
21098
21099 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21100
21101 * Makefile.in (OBS): Add version.o.
21102 (STAGESTUFF): Delete.
21103 (version.o): Add dependencies.
21104 (version.c): Replace rule.
21105 (clean): Remove version.c.
21106 * server.c (gdbserver_version): New.
21107 (gdbserver_usage): Use printf.
21108 (main): Handle --version and --help.
21109 * server.h (version, host_name): Add declarations.
21110
21111 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21112
21113 * linux-arm-low.c:
21114 * linux-arm-low.c:
21115 * inferiors.c:
21116 * i387-fp.h:
21117 * i387-fp.c:
21118 * gdbreplay.c:
21119 * regcache.c:
21120 * proc-service.c:
21121 * mem-break.h:
21122 * mem-break.c:
21123 * linux-x86-64-low.c:
21124 * linux-sh-low.c:
21125 * linux-s390-low.c:
21126 * linux-ppc64-low.c:
21127 * linux-ppc-low.c:
21128 * linux-mips-low.c:
21129 * linux-m68k-low.c:
21130 * linux-m32r-low.c:
21131 * linux-low.h:
21132 * linux-low.c:
21133 * linux-ia64-low.c:
21134 * linux-i386-low.c:
21135 * linux-crisv32-low.c:
21136 * thread-db.c:
21137 * terminal.h:
21138 * target.h:
21139 * target.c:
21140 * server.h:
21141 * server.c:
21142 * remote-utils.c:
21143 * regcache.h:
21144 * utils.c:
21145 * Makefile.in:
21146 * configure.ac:
21147 * gdbserver.1: Add (C) after Copyright. Update the FSF
21148 address.
21149
21150 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21151
21152 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21153 (arm_breakpoint_at): Recognize both breakpoints.
21154 (the_low_target): Use the correct breakpoint instruction.
21155
21156 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21157
21158 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21159 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21160 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21161 (the_low_target): Update.
21162
21163 2005-10-25 Andreas Schwab <schwab@suse.de>
21164
21165 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21166
21167 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21168 (ia64_num_regs): Reduce to 462.
21169
21170 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21171
21172 * acinclude.m4: Correct quoting.
21173 * aclocal.m4: Regenerated.
21174
21175 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21176 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21177 (thread_db_init): Call thread_db_err_str.
21178 * configure.ac: Check for TD_VERSION.
21179 * config.in, configure: Regenerated.
21180
21181 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21182
21183 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21184
21185 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21186
21187 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21188 is not available. Define HAVE_PTRACE_GETREGS if it is.
21189 * config.in, configure: Regenerated.
21190 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21191 * linux-i386-low.c, linux-m68k-low.c: Update to use
21192 HAVE_PTRACE_GETREGS.
21193 * linux-low.c (regsets_fetch_inferior_registers)
21194 (regsets_store_inferior_registers): Only return 0 if we processed
21195 GENERAL_REGS.
21196 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21197 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21198
21199 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21200
21201 * inferiors.c (struct thread_info): Add gdb_id.
21202 (add_thread): Add gdb_id argument.
21203 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21204 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21205 calls to add_thread.
21206 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21207 * server.c (handle_query): Use thread_to_gdb_id.
21208 (handle_v_cont, main): Use gdb_id_to_thread_id.
21209 * server.h (add_thread): Update prototype.
21210 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21211 prototypes.
21212
21213 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21214
21215 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21216 left-padded registers.
21217 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21218 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21219
21220 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21221
21222 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21223 * configure: Regenerate.
21224 * config.in: Regenerate.
21225 * server.h (NEED_DECLARATION_STRERROR):
21226 Replace with !HAVE_DECL_STRERROR.
21227
21228 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21229
21230 * linux-low.c (linux_wait, linux_send_signal): Don't test
21231 an unsigned long variable for > 0 if it could be MAX_ULONG.
21232 * server.c (myresume): Likewise.
21233 * target.c (set_desired_inferior): Likewise.
21234
21235 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21236
21237 * configure.ac: Simplify and improve check for socklen_t.
21238 * configure, config.in: Regenerate.
21239
21240 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21241
21242 * acconfig.h: Remove.
21243 * configure.ac: Add a test for socklen_t. Use three-argument
21244 AC_DEFINE throughout.
21245 * config.in: Regenerated using autoheader 2.59.
21246 * configure: Regenerated.
21247
21248 * gdbreplay.c (socklen_t): Provide a default.
21249 (remote_open): Use socklen_t.
21250 * remote-utils.c (socklen_t): Provide a default.
21251 (remote_open): Use socklen_t.
21252 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21253 unsigned char.
21254
21255 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21256 char for buffers.
21257 * linux-low.c (linux_read_memory, linux_write_memory)
21258 (linux_read_auxv): Likewise.
21259 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21260 (check_mem_write): Likewise.
21261 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21262 Likewise.
21263 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21264 (registers_from_string, register_data): Likewise.
21265 * server.c (handle_query, main): Likewise.
21266 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21267 (decode_M_packet): Likewise.
21268 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21269 * target.h (struct target_ops): Update read_memory, write_memory,
21270 and read_auxv.
21271 (read_inferior_memory, write_inferior_memory): Update.
21272 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21273 to unsigned char *.
21274 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21275 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21276 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21277 linux-s390-low.c, linux-sh-low.c: Update for changes in
21278 read_inferior_memory and the_low_target->breakpoint.
21279
21280 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21281
21282 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21283 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21284 * configure.srv: Add powerpc64-*-linux*.
21285 * linux-ppc64-low.c: New file.
21286
21287 2005-05-23 Orjan Friberg <orjanf@axis.com>
21288
21289 * linux-cris-low.c: New file with support for CRIS.
21290 * linux-crisv32-low.c: Ditto for CRISv32.
21291 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21292 (clean): Add reg-cris.c and reg-crisv32.c.
21293 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21294 reg-crisv32.o, and reg-crisv32.c to make rules.
21295 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21296 recognized targets.
21297
21298 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21299
21300 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21301 of sizeof (PTRACE_XFER_TYPE).
21302 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21303
21304 2005-05-12 Orjan Friberg <orjanf@axis.com>
21305
21306 * target.h (struct target_ops): Add insert_watchpoint,
21307 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21308 pointers for hardware watchpoint support.
21309 * linux-low.h (struct linux_target_ops): Ditto.
21310 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21311 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21312 to linux_target_ops.
21313 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21314 reply packet.
21315 * server.c (main): Recognize 'Z' and 'z' packets.
21316
21317 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21318
21319 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21320 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21321 (the_low_target): Add new members.
21322
21323 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21324
21325 * proc-service.c (ps_lgetregs): Search all_processes instead of
21326 all_threads.
21327
21328 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21329
21330 * server.c (start_inferior): Change return type to int.
21331 (attach_inferior): Change sigptr to int *.
21332 (handle_v_cont, handle_v_requests): Change signal to int *.
21333 (main): Change signal to int.
21334
21335 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21336
21337 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21338 * configure.srv: Add m32r*-*-linux*.
21339 * linux-m32r-low.c: New file.
21340
21341 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21342
21343 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21344
21345 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21346
21347 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21348 Take unsigned long arguments for PIDs.
21349 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21350 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21351 (wait_for_sigstop, linux_resume_one_process)
21352 (regsets_fetch_inferior_registers, linux_send_signal)
21353 (linux_read_auxv): Likewise. Update the types of variables holding
21354 PIDs. Update format string specifiers.
21355 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21356 * remote-utils.c (prepare_resume_reply): Likewise.
21357 * server.c (cont_thread, general_thread, step_thread)
21358 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21359 unsigned long.
21360 (handle_query): Update format specifiers.
21361 (handle_v_cont, main): Use strtoul for thread IDs.
21362 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21363 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21364 (general_thread, step_thread, thread_from_wait)
21365 (old_thread_from_wait): Update.
21366 * target.h (struct thread_resume): Use unsigned long for THREAD.
21367 (struct target_ops): Use unsigned long for arguments to attach and
21368 thread_alive.
21369
21370 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21371
21372 * acinclude.m4: Include bfd/bfd.m4 directly.
21373 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21374 <agriffis@toolchain.org>.
21375 * aclocal.m4, configure: Regenerated.
21376
21377 2005-01-07 Andrew Cagney <cagney@gnu.org>
21378
21379 * configure.ac: Rename configure.in, require autoconf 2.59.
21380 * configure: Re-generate.
21381
21382 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21383
21384 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21385 LIBS when finished.
21386 * aclocal.m4: Regenerated.
21387 * configure: Regenerated.
21388
21389 2004-11-21 Andreas Schwab <schwab@suse.de>
21390
21391 * linux-m68k-low.c (m68k_num_gregs): Define.
21392 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21393 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21394 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21395 (m68k_breakpoint_at): New. Add to the_low_target.
21396
21397 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21398 srv_linux_thread_db to yes.
21399
21400 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21401
21402 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21403 (ARCH_SET_FS): Likewise.
21404 (ARCH_GET_FS): Likewise.
21405 (ARCH_GET_GS): Likewise.
21406
21407 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21408
21409 * linux-i386-low.c (ps_get_thread_area): New.
21410 * linux-x86-64-low.c (ps_get_thread_area): New.
21411 * linux-low.c: Include <sys/syscall.h>.
21412 (linux_kill_one_process): Don't kill the first thread here.
21413 (linux_kill): Kill the first thread here.
21414 (kill_lwp): New function.
21415 (send_sigstop, linux_send_signal): Use it.
21416 * proc-service.c: Clean up #ifdefs.
21417 (fpregset_info): Delete.
21418 (ps_lgetregs): Update and enable implementation.
21419 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21420 implementations.
21421 * remote-utils.c (struct sym_cache, symbol_cache): New.
21422 (input_interrupt): Print a clearer message.
21423 (async_io_enabled): New variable.
21424 (enable_async_io, disable_async_io): Use it. Update comments.
21425 (look_up_one_symbol): Use the symbol cache.
21426 * thread-db.c (thread_db_look_up_symbols): New function.
21427 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21428
21429 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21430
21431 * configure.in: Test for -rdynamic.
21432 * configure: Regenerated.
21433 * Makefile (INTERNAL_LDFLAGS): New.
21434 (gdbserver, gdbreplay): Use it.
21435
21436 2004-09-02 Andrew Cagney <cagney@gnu.org>
21437
21438 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21439
21440 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21441
21442 * linux-low.c (linux_wait): Clear all_processes list also.
21443
21444 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21445
21446 * linux-low.c: Include <errno.h>. Remove extern declaration of
21447 errno.
21448
21449 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21450
21451 * gdbreplay.c, server.h, utils.c: Update copyright years.
21452
21453 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21454
21455 * server.c (main): Print child status or termination signal from
21456 variable 'signal', not 'sig'.
21457
21458 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21459
21460 * linux-low.c (linux_read_memory): Change return type to
21461 int. Check for and return error from ptrace().
21462 * target.c (read_inferior_memory): Change return type to int. Pass
21463 back return status from the_target->read_memory().
21464 * target.h (struct target_ops): Adapt *read_memory() prototype.
21465 Update comment.
21466 (read_inferior_memory): Adapt prototype.
21467 * server.c (main): Return an error packet if
21468 read_inferior_memory() returns an error.
21469
21470 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21471
21472 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21473 Unify with other clean targets.
21474
21475 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21476
21477 * server.c (handle_v_cont): Call set_desired_inferior.
21478
21479 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21480
21481 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21482
21483 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21484
21485 * linux-low.c (linux_wait): Unblock async I/O.
21486 (linux_resume): Block and enable async I/O.
21487 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21488 * server.h (block_async_io, unblock_async_io): Add prototypes.
21489
21490 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21491
21492 * remote-utils.c (remote_open): Print a status notice after
21493 opening a TCP port.
21494 * server.c (attach_inferior): Print a status notice after
21495 attaching.
21496
21497 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21498
21499 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21500
21501 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21502
21503 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21504 error packet.
21505 * server.c, target.h: Update copyright years.
21506
21507 2004-02-25 Roland McGrath <roland@redhat.com>
21508
21509 * target.h (struct target_ops): New member `read_auxv'.
21510 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21511 * linux-low.c (linux_read_auxv): New function.
21512 (linux_target_ops): Initialize `read_auxv' member to that.
21513
21514 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21515
21516 Committed by Jim Blandy <jimb@redhat.com>.
21517
21518 * linux-s390-low.c (s390_num_regs): Update.
21519 (s390_regmap): Remove control registers. Use __s390x__ predefine
21520 instead of GPR_SIZE to distiguish s390 and s390x targets.
21521
21522 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21523
21524 * linux-low.c: Update copyright year.
21525 (check_removed_breakpoint): Clear pending_is_breakpoint.
21526 (linux_set_resume_request, linux_queue_one_thread)
21527 (resume_status_pending_p): New functions.
21528 (linux_continue_one_thread): Use process->resume.
21529 (linux_resume): Only resume threads if there are no pending events.
21530 * linux-low.h (struct process_info): Add resume request
21531 pointer.
21532
21533 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21534
21535 * regcache.c (new_register_cache): Clear the allocated register
21536 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21537
21538 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21539
21540 * linux-low.c (linux_resume): Take a struct thread_resume *
21541 argument.
21542 (linux_wait): Update call.
21543 (resume_ptr): New static variable.
21544 (linux_continue_one_thread): Renamed from
21545 linux_continue_one_process. Use resume_ptr.
21546 (linux_resume): Use linux_continue_one_thread.
21547 * server.c (handle_v_cont, handle_v_requests): New functions.
21548 (myresume): New function.
21549 (main): Handle 'v' case.
21550 * target.h (struct thread_resume): New type.
21551 (struct target_ops): Change argument of "resume" to struct
21552 thread_resume *.
21553 (myresume): Delete macro.
21554
21555 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21556
21557 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21558 (uninstall): Support DESTDIR.
21559
21560 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21561
21562 * configure.srv: Add xscale*linux copy of arm*linux entry.
21563
21564 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21565
21566 * linux-arm-low.c (arm_reinsert_addr): New function.
21567 (the_low_target): Add arm_reinsert_addr.
21568
21569 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21570
21571 * mem-break.c: Remove whitespace at end of file.
21572
21573 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21574
21575 * configure.in: Check whether we need to prototype strerror.
21576 * server.h: Optionally prototype strerror.
21577 * gdbreplay.c (perror_with_name): Use strerror.
21578 * linux-low.c (linux_attach_lwp): Use strerror.
21579 * utils.c (perror_with_name): Use strerror.
21580 * config.in, configure: Regenerated.
21581
21582 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21583
21584 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21585 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21586
21587 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21588
21589 * Makefile.in (SFILES): Update.
21590 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21591 low-sun3.c: Remove files.
21592
21593 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21594
21595 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21596 (linux_detach_one_process, linux_detach): New functions.
21597 (linux_target_ops): Add linux_detach.
21598 * server.c (main): Handle 'D' packet.
21599 * target.h (struct target_ops): Add "detach" member.
21600 (detach_inferior): Define.
21601
21602 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21603
21604 From Kelley Cook <kelleycook@wideopenwest.com>:
21605 * configure.srv: Accept i[34567]86 variants.
21606
21607 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21608
21609 * linux-low.c (linux_wait_for_event): Correct comment typos.
21610 (linux_resume_one_process): Call check_removed_breakpoint.
21611 (linux_send_signal): New function.
21612 (linux_target_ops): Add linux_send_signal.
21613 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21614 of kill.
21615 * target.h (struct target_ops): Add send_signal.
21616
21617 2003-05-29 Jim Blandy <jimb@redhat.com>
21618
21619 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21620 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21621 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21622 away part of the register's value.
21623
21624 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21625
21626 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21627 (linux_wait_for_event, linux_init_signals): Likewise.
21628
21629 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21630
21631 * configure.in: Check for stdlib.h.
21632 * configure: Regenerated.
21633 * config.in: Regenerated.
21634
21635 2003-01-04 Andreas Schwab <schwab@suse.de>
21636
21637 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21638
21639 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21640
21641 * Makefile.in: Remove obsolete code.
21642
21643 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21644
21645 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21646 defined(PT_FPR0_HI).
21647
21648 2002-11-17 Stuart Hughes <seh@zee2.com>
21649
21650 * linux-arm-low.c (arm_num_regs): Increase.
21651 (arm_regmap): Include status register.
21652
21653 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21654
21655 * linux-low.c (register_addr): Remove incorrect -1 check.
21656
21657 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21658
21659 * linux-low.c (linux_create_inferior): Call setpgid. Return
21660 the new PID.
21661 (unstopped_p, linux_signal_pid): Remove.
21662 (linux_target_ops): Remove linux_signal_pid.
21663 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21664 global instead of target method.
21665 * target.h (struct target_ops): Remove signal_pid. Update comment
21666 for create_inferior.
21667 * server.c (signal_pid): New variable.
21668 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21669 gdbserver. Set the child to be the foreground process group.
21670 (attach_inferior): Set signal_pid.
21671
21672 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21673
21674 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21675
21676 2002-08-20 Jim Blandy <jimb@redhat.com>
21677
21678 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21679 default for this.
21680
21681 2002-08-01 Andrew Cagney <cagney@redhat.com>
21682
21683 * Makefile.in: Make chill references obsolete.
21684
21685 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21686
21687 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21688 * configure: Regenerate.
21689 * config.in: Regenerate.
21690
21691 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21692
21693 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21694 (perror_with_name, remote_close, remote_open, expect, play): Static.
21695
21696 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21697
21698 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21699 byte offsets instead of an array of indexes.
21700 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21701
21702 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21703
21704 * regcache.c: Add comment.
21705
21706 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21707
21708 * thread-db.c: New file.
21709 * proc-service.c: New file.
21710 * acinclude.m4: New file.
21711 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21712 proc-service.o, and thread-db.o.
21713 (linux-low.o): Add USE_THREAD_DB.
21714 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21715 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21716 * aclocal.m4: Regenerated.
21717 * config.in: Regenerated.
21718 * configure: Regenerated.
21719 * configure.in: Check for proc_service.h, sys/procfs.h,
21720 thread_db.h, and linux/elf.h headrs.
21721 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21722 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21723 Check for -lthread_db and thread support.
21724 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21725 PowerPC, and SuperH.
21726 * i387-fp.c: Constify arguments.
21727 * i387-fp.h: Likewise.
21728 * inferiors.c: (struct thread_info): Renamed from
21729 `struct inferior_info'. Remove PID member. Use generic inferior
21730 list header. All uses updated.
21731 (inferiors, signal_pid): Removed.
21732 (all_threads): New variable.
21733 (get_thread): Define.
21734 (add_inferior_to_list): New function.
21735 (for_each_inferior): New function.
21736 (change_inferior_id): New function.
21737 (add_inferior): Removed.
21738 (remove_inferior): New function.
21739 (add_thread): New function.
21740 (free_one_thread): New function.
21741 (remove_thread): New function.
21742 (clear_inferiors): Use for_each_inferior and free_one_thread.
21743 (find_inferior): New function.
21744 (find_inferior_id): New function.
21745 (inferior_target_data): Update argument type.
21746 (set_inferior_target_data): Likewise.
21747 (inferior_regcache_data): Likewise.
21748 (set_inferior_regcache_data): Likewise.
21749 * linux-low.c (linux_bp_reinsert): Remove.
21750 (all_processes, stopping_threads, using_thrads)
21751 (struct pending_signals, debug_threads, pid_of): New.
21752 (inferior_pid): Replace with macro.
21753 (struct inferior_linux_data): Remove.
21754 (get_stop_pc, add_process): New functions.
21755 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21756 Use add_process and add_thread.
21757 (linux_attach_lwp): New function, based on old linux_attach. Use
21758 add_process and add_thread. Set stop_expected for new threads.
21759 (linux_attach): New function.
21760 (linux_kill_one_process): New function.
21761 (linux_kill): Kill all LWPs.
21762 (linux_thread_alive): Use find_inferior_id.
21763 (check_removed_breakpoints, status_pending_p): New functions.
21764 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21765 Update. Use WNOHANG. Wait for cloned processes also. Update process
21766 struct for the found process.
21767 (linux_wait_for_event): New function.
21768 (linux_wait): Use it. Support LWPs.
21769 (send_sigstop, wait_for_sigstop, stop_all_processes)
21770 (linux_resume_one_process, linux_continue_one_process): New functions.
21771 (linux_resume): Support LWPs.
21772 (REGISTER_RAW_SIZE): Remove.
21773 (fetch_register): Use register_size instead. Call supply_register.
21774 (usr_store_inferior_registers): Likewise. Call collect_register.
21775 Fix recursive case.
21776 (regsets_fetch_inferior_registers): Improve error message.
21777 (regsets_store_inferior_registers): Add debugging.
21778 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21779 (unstopped_p, linux_signal_pid): New functions.
21780 (linux_target_ops): Add linux_signal_pid.
21781 (linux_init_signals): New function.
21782 (initialize_low): Call it. Initialize using_threads.
21783 * regcache.c (inferior_regcache_data): Add valid
21784 flag.
21785 (get_regcache): Fetch registers lazily. Add fetch argument
21786 and update all callers.
21787 (regcache_invalidate_one, regcache_invalidate): New
21788 functions.
21789 (new_register_cache): Renamed from create_register_cache.
21790 Return the new regcache.
21791 (free_register_cache): Change argument to a void *.
21792 (registers_to_string, registers_from_string): Call get_regcache
21793 with fetch flag set.
21794 (register_data): Make static. Pass fetch flag to get_regcache.
21795 (supply_register): Call get_regcache with fetch flag clear.
21796 (collect_register): Call get_regcache with fetch flag set.
21797 (collect_register_as_string): New function.
21798 * regcache.h: Update.
21799 * remote-utils.c (putpkt): Flush after debug output and use
21800 stderr.
21801 Handle input interrupts while waiting for an ACK.
21802 (input_interrupt): Use signal_pid method.
21803 (getpkt): Flush after debug output and use stderr.
21804 (outreg): Use collect_register_as_string.
21805 (new_thread_notify, dead_thread_notify): New functions.
21806 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21807 and general_thread.
21808 (look_up_one_symbol): Flush after debug output.
21809 * server.c (step_thread, server_waiting): New variables.
21810 (start_inferior): Don't use signal_pid. Update call to mywait.
21811 (attach_inferior): Update call to mywait.
21812 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21813 (main): Don't fetch/store registers explicitly. Use
21814 set_desired_inferior. Support proposed ``Hs'' packet. Update
21815 calls to mywait.
21816 * server.h: Update.
21817 (struct inferior_list, struct_inferior_list_entry): New.
21818 * target.c (set_desired_inferior): New.
21819 (write_inferior_memory): Constify.
21820 (mywait): New function.
21821 * target.h: Update.
21822 (struct target_ops): New signal_pid method.
21823 (mywait): Removed macro, added prototype.
21824
21825 * linux-low.h (regset_func): Removed.
21826 (regset_fill_func, regset_store_func): New.
21827 (enum regset_type): New.
21828 (struct regset_info): Add type field. Use new operation types.
21829 (struct linux_target_ops): stop_pc renamed to get_pc.
21830 Add decr_pc_after_break and breakpoint_at.
21831 (get_process, get_thread_proess, get_process_thread)
21832 (strut process_info, all_processes, linux_attach_lwp)
21833 (thread_db_init): New.
21834
21835 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21836 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21837 (the_low_target): Add new members.
21838 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21839 (i386_store_fpxregset): Constify.
21840 (target_regsets): Add new kind identifier.
21841 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21842 (i386_set_pc): Add debugging.
21843 (i386_breakpoint_at): New function.
21844 (the_low_target): Add new members.
21845 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21846 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21847 (mips_breakpoint_at): New.
21848 (the_low_target): Add new members.
21849 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21850 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21851 (the_low_target): Add new members.
21852 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21853 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21854 (the_low_target): Add new members.
21855 * linux-x86-64-low.c (target_regsets): Add new kind
21856 identifier.
21857
21858 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21859
21860 From Martin Pool <mbp@samba.org>:
21861 * server.c (gdbserver_usage): New function.
21862 (main): Call it.
21863
21864 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21865
21866 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21867 stop_at -> stop_pc.
21868
21869 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21870
21871 * Makefile.in: Remove obsolete code.
21872
21873 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21874
21875 * linux-low.c (regsets_fetch_inferior_registers),
21876 (regsets_store_inferior_registers): Removed cast to int from
21877 ptrace() calls.
21878 * regcache.h: Added declaration of struct inferior_info.
21879
21880 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21881
21882 * inferiors.c (struct inferior_info): Add regcache_data.
21883 (add_inferior): Call create_register_cache.
21884 (clear_inferiors): Call free_register_cache.
21885 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21886 * regcache.c (struct inferior_regcache_data): New.
21887 (registers): Remove.
21888 (get_regcache): New function.
21889 (create_register_cache, free_register_cache): New functions.
21890 (set_register_cache): Don't initialize the register cache here.
21891 (registers_to_string, registers_from_string, register_data): Call
21892 get_regcache.
21893 * regcache.h: Add prototypes.
21894 * server.h: Likewise.
21895
21896 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21897
21898 * mem-break.c: New file.
21899 * mem-break.h: New file.
21900 * Makefile.in: Add mem-break.o rule; update server.h
21901 dependencies.
21902 * inferiors.c (struct inferior_info): Add target_data
21903 member.
21904 (clear_inferiors): Free target_data member if set.
21905 (inferior_target_data, set_inferior_target_data): New functions.
21906 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21907 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21908 * linux-low.c (linux_bp_reinsert): New variable.
21909 (struct inferior_linux_data): New.
21910 (linux_create_inferior): Use set_inferior_target_data.
21911 (linux_attach): Likewise. Call add_inferior.
21912 (linux_wait_for_one_inferior): New function.
21913 (linux_wait): Call it.
21914 (linux_write_memory): Add const.
21915 (initialize_low): Call set_breakpoint_data.
21916 * linux-low.h (struct linux_target_ops): Add breakpoint
21917 handling members.
21918 * server.c (attach_inferior): Remove extra add_inferior
21919 call.
21920 * server.h: Include mem-break.h. Update inferior.c
21921 prototypes.
21922 * target.c (read_inferior_memory)
21923 (write_inferior_memory): New functions.
21924 * target.h (read_inferior_memory)
21925 (write_inferior_memory): Change macros to prototypes.
21926 (struct target_ops): Update comments. Add const to write_memory
21927 definition.
21928
21929 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21930
21931 * linux-low.c (usr_store_inferior_registers): Support
21932 registers which are allowed to fail to store.
21933 * linux-low.h (linux_target_ops): Likewise.
21934 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21935 (ppc_cannot_store_register): FPSCR may not be storable.
21936
21937 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21938
21939 * server.h: Include <string.h> if HAVE_STRING_H.
21940 * ChangeLog: Correct paths in last ChangeLog entry.
21941
21942 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21943
21944 * linux-low.h: Remove obsolete prototypes.
21945 (struct linux_target_ops): New.
21946 (extern the_low_target): New.
21947 * linux-low.c (num_regs, regmap): Remove declarations.
21948 (register_addr): Use the_low_target explicitly.
21949 (fetch_register): Likewise.
21950 (usr_fetch_inferior_registers): Likewise.
21951 (usr_store_inferior_registers): Likewise.
21952 * linux-arm-low.c (num_regs): Remove.
21953 (arm_num_regs): Define.
21954 (arm_regmap): Renamed from regmap, made static.
21955 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21956 made static.
21957 (arm_cannot_store_register): Renamed from cannot_store_register,
21958 made static.
21959 (the_low_target): New.
21960 * linux-i386-low.c (num_regs): Remove.
21961 (i386_num_regs): Define.
21962 (i386_regmap): Renamed from regmap, made static.
21963 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21964 made static.
21965 (i386_cannot_store_register): Renamed from cannot_store_register,
21966 made static.
21967 (the_low_target): New.
21968 * linux-ia64-low.c (num_regs): Remove.
21969 (ia64_num_regs): Define.
21970 (ia64_regmap): Renamed from regmap, made static.
21971 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21972 made static.
21973 (ia64_cannot_store_register): Renamed from cannot_store_register,
21974 made static.
21975 (the_low_target): New.
21976 * linux-m68k-low.c (num_regs): Remove.
21977 (m68k_num_regs): Define.
21978 (m68k_regmap): Renamed from regmap, made static.
21979 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21980 made static.
21981 (m68k_cannot_store_register): Renamed from cannot_store_register,
21982 made static.
21983 (the_low_target): New.
21984 * linux-mips-low.c (num_regs): Remove.
21985 (mips_num_regs): Define.
21986 (mips_regmap): Renamed from regmap, made static.
21987 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
21988 made static.
21989 (mips_cannot_store_register): Renamed from cannot_store_register,
21990 made static.
21991 (the_low_target): New.
21992 * linux-ppc-low.c (num_regs): Remove.
21993 (ppc_num_regs): Define.
21994 (ppc_regmap): Renamed from regmap, made static.
21995 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
21996 made static.
21997 (ppc_cannot_store_register): Renamed from cannot_store_register,
21998 made static.
21999 (the_low_target): New.
22000 * linux-s390-low.c (num_regs): Remove.
22001 (s390_num_regs): Define.
22002 (s390_regmap): Renamed from regmap, made static.
22003 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22004 made static.
22005 (s390_cannot_store_register): Renamed from cannot_store_register,
22006 made static.
22007 (the_low_target): New.
22008 * linux-sh-low.c (num_regs): Remove.
22009 (sh_num_regs): Define.
22010 (sh_regmap): Renamed from regmap, made static.
22011 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22012 made static.
22013 (sh_cannot_store_register): Renamed from cannot_store_register,
22014 made static.
22015 (the_low_target): New.
22016 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22017 (the_low_target): New.
22018
22019 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22020
22021 * Makefile.in: Add stamp-h target.
22022 * configure.in: Create stamp-h.
22023 * configure: Regenerated.
22024
22025 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22026
22027 * inferiors.c: New file.
22028 * target.c: New file.
22029 * target.h: New file.
22030 * Makefile.in: Add target.o and inferiors.o. Update
22031 dependencies.
22032 * linux-low.c (inferior_pid): New static variable,
22033 moved from server.c.
22034 (linux_create_inferior): Renamed from create_inferior.
22035 Call add_inferior. Return 0 on success instead of a PID.
22036 (linux_attach): Renamed from myattach.
22037 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22038 (linux_thread_alive): Renamed from mythread_alive.
22039 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22040 child dies.
22041 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22042 (regsets_store_inferior_registers): Correct error message.
22043 Add missing ``return 0''.
22044 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22045 (linux_store_registers): Renamed from store_inferior_registers.
22046 (linux_read_memory): Renamed from read_inferior_memory.
22047 (linux_write_memory): Renamed from write_inferior_memory.
22048 (linux_target_ops): New structure.
22049 (initialize_low): Call set_target_ops ().
22050 * remote-utils.c (unhexify): New function.
22051 (hexify): New function.
22052 (input_interrupt): Send signals to ``signal_pid''.
22053 * server.c (inferior_pid): Remove.
22054 (start_inferior): Update create_inferior call.
22055 (attach_inferior): Call add_inferior.
22056 (handle_query): New function.
22057 (main): Call handle_query for `q' packets.
22058 * server.h: Include "target.h". Remove obsolete prototypes.
22059 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22060
22061 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22062
22063 * Makefile.in: Add WARN_CFLAGS. Update configury
22064 dependencies.
22065 * configure.in: Check for <string.h>
22066 * configure: Regenerate.
22067 * config.in: Regenerate.
22068 * gdbreplay.c: Include needed system headers.
22069 (remote_open): Remove strchr prototype.
22070 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22071 * regcache.c (supply_register): Change buf argument to const void *.
22072 (supply_register_by_name): Likewise.
22073 (collect_register): Change buf argument to void *.
22074 (collect_register_by_name): Likewise.
22075 * regcache.h: Add missing prototypes.
22076 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22077 * server.c (handle_query): New function.
22078 (attached): New static variable, moved out of main.
22079 (main): Quiet longjmp clobber warnings.
22080 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22081 * utils.c (error): Remove NORETURN.
22082 (fatal): Likewise.