Expand dynamic type documentation
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
2
3 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
4 comparison.
5
6 2020-04-16 Tom Tromey <tromey@adacore.com>
7
8 * win32-low.cc (windows_nat::handle_access_violation): New
9 function.
10
11 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * win32-low.cc (get_child_debug_event): Fix format string warning.
14
15 2020-04-13 Tom Tromey <tom@tromey.com>
16
17 * server.h (gdb_fildes_t): Remove typedef.
18 * remote-utils.c (remote_desc, list_desc): Now int.
19 (INVALID_DESCRIPTOR): Remove.
20 (gdb_connected, remote_close)
21 (check_remote_input_interrupt_request): Update.
22 * utils.h (pfildes): Don't declare.
23 * utils.c (pfildes): Remove.
24
25 2020-04-13 Tom Tromey <tom@tromey.com>
26
27 * server.h (handle_serial_event, handle_target_event): Update.
28 * server.c: Don't call initialize_event_loop.
29 (keep_processing_events): New global.
30 (handle_serial_event): Return void. Set keep_processing_events.
31 (handle_target_event): Return void.
32 (start_event_loop): Move from event-loop.c. Rewrite.
33 * remote-utils.c (handle_accept_event): Return void.
34 (reset_readchar): Use delete_timer.
35 (process_remaining): Return void.
36 (reschedule): Use create_timer.
37 * event-loop.h: Remove.
38 * event-loop.cc: Remove.
39 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
40
41 2020-04-13 Tom Tromey <tom@tromey.com>
42
43 * server.c (invoke_async_signal_handlers)
44 (check_async_event_handlers, flush_streams, gdb_select): New
45 functions.
46
47 2020-04-13 Tom Tromey <tom@tromey.com>
48
49 * configure: Rebuild.
50 * config.in: Rebuild.
51
52 2020-04-08 Tom Tromey <tromey@adacore.com>
53
54 PR gdb/22992
55 * win32-low.c (child_continue): Call matching_pending_stop.
56 (get_child_debug_event): Call fetch_pending_stop. Push pending
57 stop when needed.
58
59 2020-04-08 Tom Tromey <tromey@adacore.com>
60
61 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
62 (win32_process_target::supports_stopped_by_sw_breakpoint):
63 Declare.
64 * win32-low.c (win32_supports_z_point_type): Always handle
65 Z_PACKET_SW_BP.
66 (win32_insert_point): Call insert_memory_breakpoint when needed.
67 (win32_remove_point): Call remove_memory_breakpoint when needed.
68 (win32_process_target::stopped_by_sw_breakpoint)
69 (win32_process_target::supports_stopped_by_sw_breakpoint): New
70 methods.
71 (win32_target_ops): Update.
72 (maybe_adjust_pc): New function.
73 (win32_wait): Call maybe_adjust_pc.
74
75 2020-04-08 Tom Tromey <tromey@adacore.com>
76
77 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
78 field.
79 * win32-i386-low.c (the_low_target): Update.
80 * win32-arm-low.c (the_low_target): Update.
81
82 2020-04-08 Tom Tromey <tromey@adacore.com>
83
84 * win32-low.h (win32_process_target::read_pc)
85 (win32_process_target::write_pc): Declare.
86 * win32-low.c (win32_process_target::read_pc)
87 (win32_process_target::write_pc): New methods.
88 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
89 functions.
90 (the_low_target): Update.
91 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
92 functions.
93 (the_low_target): Update.
94
95 2020-04-08 Tom Tromey <tromey@adacore.com>
96
97 * win32-low.c (win32_kill, get_child_debug_event): Use
98 wait_for_debug_event.
99
100 2020-04-08 Tom Tromey <tromey@adacore.com>
101
102 * win32-low.c (child_continue): Call continue_last_debug_event.
103
104 2020-04-08 Tom Tromey <tromey@adacore.com>
105
106 * win32-low.c (handle_exception): Remove.
107 (windows_nat::handle_ms_vc_exception): New function.
108 (get_child_debug_event): Add "continue_status" parameter.
109 Update.
110 (win32_wait): Update.
111
112 2020-04-08 Tom Tromey <tromey@adacore.com>
113
114 * win32-low.c (windows_nat::handle_load_dll): Rename from
115 handle_load_dll. No longer static.
116 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
117 No longer static.
118
119 2020-04-08 Tom Tromey <tromey@adacore.com>
120
121 * win32-low.c (handle_output_debug_string): Add parameter. Change
122 return type.
123 (win32_kill, get_child_debug_event): Update.
124
125 2020-04-08 Tom Tromey <tromey@adacore.com>
126
127 * win32-low.c (current_process_handle, current_process_id)
128 (main_thread_id, last_sig, current_event, siginfo_er): Move to
129 nat/windows-nat.c.
130
131 2020-04-08 Tom Tromey <tromey@adacore.com>
132
133 * win32-low.c (get_image_name): Remove.
134 (handle_load_dll): Update.
135
136 2020-04-08 Tom Tromey <tromey@adacore.com>
137
138 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
139 No longer static. Change parameters.
140 (child_add_thread, child_fetch_inferior_registers)
141 (child_store_inferior_registers, win32_resume)
142 (win32_get_tib_address): Update.
143
144 2020-04-08 Tom Tromey <tromey@adacore.com>
145
146 * win32-low.h (struct win32_target_ops): Use qualified names where
147 needed.
148 * win32-i386-low.c: Add "using namespace".
149 * win32-low.c: Add "using namespace".
150 * win32-arm-low.c: Add "using namespace".
151
152 2020-04-08 Tom Tromey <tromey@adacore.com>
153
154 * win32-low.c (delete_thread_info): Don't call CloseHandle.
155
156 2020-04-08 Tom Tromey <tromey@adacore.com>
157
158 * win32-low.c (win32_require_context, suspend_one_thread): Use
159 windows_thread_info::suspend.
160 (continue_one_thread): Use windows_thread_info::resume.
161 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
162
163 2020-04-08 Tom Tromey <tromey@adacore.com>
164
165 * win32-i386-low.c (update_debug_registers)
166 (i386_prepare_to_resume, i386_thread_added): Update.
167
168 2020-04-08 Tom Tromey <tromey@adacore.com>
169
170 * win32-low.c (child_add_thread): Use new.
171 (delete_thread_info): Use delete.
172
173 2020-04-08 Tom Tromey <tromey@adacore.com>
174
175 * win32-low.h (struct windows_thread_info): Remove.
176
177 2020-04-08 Tom Tromey <tromey@adacore.com>
178
179 * win32-low.h (struct windows_thread_info): Rename from
180 win32_thread_info. Remove typedef.
181 (struct win32_target_ops, win32_require_context): Update.
182 * win32-low.c (win32_get_thread_context)
183 (win32_set_thread_context, win32_prepare_to_resume)
184 (win32_require_context, thread_rec, child_add_thread)
185 (delete_thread_info, continue_one_thread)
186 (child_fetch_inferior_registers, child_store_inferior_registers)
187 (win32_resume, suspend_one_thread, win32_get_tib_address):
188 Update.
189 * win32-i386-low.c (update_debug_registers)
190 (win32_get_current_dr, i386_get_thread_context)
191 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
192 (i386_fetch_inferior_register, i386_store_inferior_register):
193 Update.
194 * win32-arm-low.c (arm_get_thread_context)
195 (arm_fetch_inferior_register, arm_store_inferior_register):
196 Update.
197
198 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
199
200 * linux-low.h (struct linux_target_ops): Remove.
201 (the_low_target): Remove.
202 * linux-x86-low.cc (the_low_target): Remove.
203 * linux-aarch64-low.cc (the_low_target): Ditto.
204 * linux-arm-low.cc (the_low_target): Ditto.
205 * linux-bfin-low.cc (the_low_target): Ditto.
206 * linux-cris-low.cc (the_low_target): Ditto.
207 * linux-crisv32-low.cc (the_low_target): Ditto.
208 * linux-ia64-low.cc (the_low_target): Ditto.
209 * linux-m32r-low.cc (the_low_target): Ditto.
210 * linux-m68k-low.cc (the_low_target): Ditto.
211 * linux-mips-low.cc (the_low_target): Ditto.
212 * linux-nios2-low.cc (the_low_target): Ditto.
213 * linux-ppc-low.cc (the_low_target): Ditto.
214 * linux-riscv-low.cc (the_low_target): Ditto.
215 * linux-s390-low.cc (the_low_target): Ditto.
216 * linux-sh-low.cc (the_low_target): Ditto.
217 * linux-sparc-low.cc (the_low_target): Ditto.
218 * linux-tic6x-low.cc (the_low_target): Ditto.
219 * linux-tile-low.cc (the_low_target): Ditto.
220 * linux-xtensa-low.cc (the_low_target): Ditto.
221
222 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
223
224 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
225 linux target define the op by overriding the declaration in
226 process_stratum_target.
227
228 * linux-low.h (struct linux_target_ops): Remove the op.
229 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
230 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
231 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
232 (x86_get_ipa_tdesc_idx): Turn into...
233 (x86_target::get_ipa_tdesc_idx): ...this.
234 (the_low_target): Remove the op field.
235 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
236 (ppc_get_ipa_tdesc_idx): Turn into...
237 (ppc_target::get_ipa_tdesc_idx): ...this.
238 (the_low_target): Remove the op field.
239 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
240 (s390_get_ipa_tdesc_idx): Turn into...
241 (s390_target::get_ipa_tdesc_idx): ...this.
242 (the_low_target): Remove the op field.
243
244 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
245
246 Turn the 'get_syscall_trapinfo' linux target op into a method
247 of process_stratum_target.
248
249 * linux-low.h (struct linux_target_ops): Remove the op.
250 (class linux_process_target) <get_syscall_trapinfo>
251 <gdb_catch_this_syscall>
252 <low_supports_catch_syscall>
253 <low_get_syscall_trapinfo>: Declare.
254 * linux-low.cc (get_syscall_trapinfo): Turn into...
255 (linux_process_target::get_syscall_trapinfo): ...this.
256 (linux_process_target::low_get_syscall_trapinfo): Define.
257 (gdb_catch_this_syscall_p): Turn into...
258 (linux_process_target::gdb_catch_this_syscall): ...this.
259 (linux_process_target::low_supports_catch_syscall): Define.
260
261 Update the callers below.
262
263 (linux_process_target::wait_1)
264 (linux_process_target::supports_catch_syscall)
265
266 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
267 <low_get_syscall_trapinfo>: Declare.
268 (x86_target::low_supports_catch_syscall): Define.
269 (x86_get_syscall_trapinfo): Turn into...
270 (x86_target::low_get_syscall_trapinfo): ...this.
271 (the_low_target): Remove the op field.
272 * linux-aarch64-low.cc (class aarch64_target)
273 <low_supports_catch_syscall>
274 <low_get_syscall_trapinfo>: Declare.
275 (aarch64_target::low_supports_catch_syscall): Define.
276 (aarch64_get_syscall_trapinfo): Turn into...
277 (aarch64_target::low_get_syscall_trapinfo): ...this.
278 (the_low_target): Remove the op field.
279 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
280 <low_get_syscall_trapinfo>: Declare.
281 (arm_target::low_supports_catch_syscall): Define.
282 (arm_get_syscall_trapinfo): Turn into...
283 (arm_target::low_get_syscall_trapinfo): ...this.
284 (the_low_target): Remove the op field.
285 * linux-ppc-low.cc (the_low_target): Remove the op field.
286 * linux-s390-low.cc (the_low_target): Remove the op field.
287
288 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
289
290 Remove the 'supports_hardware_single_step' linux target op and
291 override the process_stratum_target's op definition in
292 linux_process_target to return true.
293
294 * linux-low.h (struct linux_target_ops): Remove the op.
295 (class linux_process_target) <finish_step_over>
296 <maybe_hw_step>: Declare.
297 * linux-low.cc (can_hardware_single_step): Remove.
298 (maybe_hw_step): Turn into...
299 (linux_process_target::maybe_hw_step): ...this.
300 (finish_step_over): Turn into...
301 (linux_process_target::finish_step_over): ...this.
302 (linux_process_target::supports_hardware_single_step): Update
303 to return true.
304
305 Update the callers below.
306
307 (linux_process_target::single_step)
308 (linux_process_target::resume_one_lwp_throw)
309
310 * linux-arm-low.cc (class arm_target)
311 <supports_hardware_single_step>: Declare.
312 (arm_supports_hardware_single_step): Turn into...
313 (arm_target::supports_hardware_single_step): ...this.
314 (the_low_target): Remove the op field.
315 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
316 (the_low_target): Remove the op field.
317 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
318 Remove.
319 (the_low_target): Remove the op field.
320 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
321 (the_low_target): Remove the op field.
322 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
323 (the_low_target): Remove the op field.
324 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
325 (the_low_target): Remove the op field.
326 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
327 (the_low_target): Remove the op field.
328 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
329 (the_low_target): Remove the op field.
330 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
331 (the_low_target): Remove the op field.
332 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
333 (the_low_target): Remove the op field.
334 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
335 (the_low_target): Remove the op field.
336 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
337 (the_low_target): Remove the op field.
338 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
339 Remove.
340 (the_low_target): Remove the op field.
341
342 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
343
344 Turn the 'supports_range_stepping' linux target op into a method
345 of linux_process_target.
346
347 * linux-low.h (struct linux_target_ops): Remove the op.
348 (class linux_process_target) <low_supports_range_stepping>: Declare.
349 * linux-low.cc (linux_process_target::low_supports_range_stepping):
350 Define.
351 (linux_process_target::supports_range_stepping): Update the call
352 site.
353 * linux-x86-low.cc (class x86_target)
354 <low_supports_range_stepping>: Declare.
355 (x86_supports_range_stepping): Turn into...
356 (x86_target::low_supports_range_stepping): ...this.
357 (the_low_target): Remove the op field.
358 * linux-aarch64-low.cc (class aarch64_target)
359 <low_supports_range_stepping>: Declare.
360 (aarch64_supports_range_stepping): Turn into...
361 (aarch64_target::low_supports_range_stepping): ...this.
362 (the_low_target): Remove the op field.
363 * linux-arm-low.cc (the_low_target): Remove the op field.
364 * linux-bfin-low.cc (the_low_target): Ditto.
365 * linux-crisv32-low.cc (the_low_target): Ditto.
366 * linux-m32r-low.cc (the_low_target): Ditto.
367 * linux-m68k-low.cc (the_low_target): Ditto.
368 * linux-ppc-low.cc (the_low_target): Ditto.
369 * linux-s390-low.cc (the_low_target): Ditto.
370 * linux-sh-low.cc (the_low_target): Ditto.
371 * linux-tic6x-low.cc (the_low_target): Ditto.
372 * linux-tile-low.cc (the_low_target): Ditto.
373 * linux-xtensa-low.cc (the_low_target): Ditto.
374
375 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
376
377 Remove the 'emit_ops' linux target ops and let the concrete
378 linux target define the op by overriding the declaration of
379 process_stratum_target.
380
381 * linux-low.h (struct linux_target_ops): Remove the op.
382 (class linux_process_target) <emit_ops>: Remove.
383 * linux-low.cc (linux_process_target::emit_ops): Remove.
384 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
385 (x86_emit_ops): Turn into...
386 (x86_target::emit_ops): ...this.
387 (the_low_target): Remove the op field.
388 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
389 (aarch64_emit_ops): Turn into...
390 (aarch64_target::emit_ops): ...this.
391 (the_low_target): Remove the op field.
392 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
393 (ppc_emit_ops): Turn into...
394 (ppc_target::emit_ops): ...this.
395 (the_low_target): Remove the op field.
396 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
397 (s390_emit_ops): Turn into...
398 (s390_target::emit_ops): ...this.
399 (the_low_target): Remove the op field.
400 * linux-arm-low.cc (the_low_target): Remove the op field.
401 * linux-bfin-low.cc (the_low_target): Ditto.
402 * linux-crisv32-low.cc (the_low_target): Ditto.
403 * linux-m32r-low.cc (the_low_target): Ditto.
404 * linux-m68k-low.cc (the_low_target): Ditto.
405 * linux-sh-low.cc (the_low_target): Ditto.
406 * linux-tic6x-low.cc (the_low_target): Ditto.
407 * linux-tile-low.cc (the_low_target): Ditto.
408 * linux-xtensa-low.cc (the_low_target): Ditto.
409
410 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
411
412 Remove the 'install_fast_tracepoint_jump_pad' and
413 'get_min_fast_tracepoint_insn_len' linux target ops to let the
414 concrete linux target define the ops by overriding the declarations
415 of process_stratum_target.
416
417 * linux-low.h (struct linux_target_ops): Remove the ops.
418 (class linux_process_target) <supports_fast_tracepoints>
419 <install_fast_tracepoint_jump_pad>
420 <get_min_fast_tracepoint_insn_len>: Remove.
421 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
422 (linux_process_target::install_fast_tracepoint_jump_pad)
423 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
424 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
425 <install_fast_tracepoint_jump_pad>
426 <get_min_fast_tracepoint_insn_len>: Declare.
427 (x86_target::supports_fast_tracepoints): Define.
428 (x86_install_fast_tracepoint_jump_pad): Turn into...
429 (x86_target::install_fast_tracepoint_jump_pad): ...this.
430 (x86_get_min_fast_tracepoint_insn_len): Turn into...
431 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
432 (the_low_target): Remove the op fields.
433 * linux-aarch64-low.cc (class aarch64_target)
434 <supports_fast_tracepoints>
435 <install_fast_tracepoint_jump_pad>
436 <get_min_fast_tracepoint_insn_len>: Declare.
437 (aarch64_target::supports_fast_tracepoints): Define.
438 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
439 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
440 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
441 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
442 (the_low_target): Remove the op fields.
443 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
444 <install_fast_tracepoint_jump_pad>
445 <get_min_fast_tracepoint_insn_len>: Declare.
446 (ppc_target::supports_fast_tracepoints): Define.
447 (ppc_install_fast_tracepoint_jump_pad): Turn into...
448 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
449 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
450 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
451 (the_low_target): Remove the op fields.
452 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
453 <install_fast_tracepoint_jump_pad>
454 <get_min_fast_tracepoint_insn_len>: Declare.
455 (s390_target::supports_fast_tracepoints): Define.
456 (s390_install_fast_tracepoint_jump_pad): Turn into...
457 (s390_target::install_fast_tracepoint_jump_pad): ...this.
458 (s390_get_min_fast_tracepoint_insn_len): Turn into...
459 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
460 (the_low_target): Remove the op fields.
461 * linux-arm-low.cc (the_low_target): Remove the op fields.
462 * linux-bfin-low.cc (the_low_target): Ditto.
463 * linux-crisv32-low.cc (the_low_target): Ditto.
464 * linux-m32r-low.cc (the_low_target): Ditto.
465 * linux-m68k-low.cc (the_low_target): Ditto.
466 * linux-sh-low.cc (the_low_target): Ditto.
467 * linux-tic6x-low.cc (the_low_target): Ditto.
468 * linux-tile-low.cc (the_low_target): Ditto.
469 * linux-xtensa-low.cc (the_low_target): Ditto.
470
471 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
472
473 Turn the 'get_thread_area' linux target op into a method of
474 process_stratum_target.
475
476 * linux-low.h (struct linux_target_ops): Remove the op.
477 (class linux_process_target) <stuck_in_jump_pad>
478 <linux_fast_tracepoint_collecting>
479 <low_get_thread_area>: Declare.
480 * linux-low.cc (supports_fast_tracepoints): Remove.
481 (linux_fast_tracepoint_collecting): Turn into...
482 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
483 (linux_process_target::low_get_thread_area): Define.
484 (stuck_in_jump_pad_callback): Turn into...
485 (linux_process_target::stuck_in_jump_pad): ...this.
486
487 Update the caller below.
488
489 (linux_process_target::stabilize_threads)
490
491 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
492 Declare.
493 (x86_get_thread_area): Turn into...
494 (x86_target::low_get_thread_area): ...this.
495 (the_low_target): Remove the op field.
496 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
497 Declare.
498 (aarch64_get_thread_area): Turn into...
499 (aarch64_target::low_get_thread_area): ...this.
500 (the_low_target): Remove the op field.
501 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
502 Declare.
503 (ppc_get_thread_area): Turn into...
504 (ppc_target::low_get_thread_area): ...this.
505 (the_low_target): Remove the op field.
506 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
507 Declare.
508 (s390_get_thread_area): Turn into...
509 (s390_target::low_get_thread_area): ...this.
510 (the_low_target): Remove the op field.
511 * linux-arm-low.cc (the_low_target): Remove the op field.
512 * linux-bfin-low.cc (the_low_target): Ditto.
513 * linux-crisv32-low.cc (the_low_target): Ditto.
514 * linux-m32r-low.cc (the_low_target): Ditto.
515 * linux-m68k-low.cc (the_low_target): Ditto.
516 * linux-sh-low.cc (the_low_target): Ditto.
517 * linux-tic6x-low.cc (the_low_target): Ditto.
518 * linux-tile-low.cc (the_low_target): Ditto.
519 * linux-xtensa-low.cc (the_low_target): Ditto.
520
521 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
522
523 Remote the 'supports_tracepoints' linux target op and let the
524 concrete linux target define it by overriding the op declared in
525 process_stratum_target.
526
527 * linux-low.h (struct linux_target_ops): Remove the op.
528 (class linux_process_target) <supports_tracepoints>: Remove.
529 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
530 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
531 Declare.
532 (x86_supports_tracepoints): Turn into...
533 (x86_target::supports_tracepoints): ...this.
534 (the_low_target): Remove the op field.
535 * linux-aarch64-low.cc (class aarch64_target)
536 <supports_tracepoints>: Declare.
537 (aarch64_supports_tracepoints): Turn into...
538 (aarch64_target::supports_tracepoints): ...this.
539 (the_low_target): Remove the op field.
540 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
541 Declare.
542 (ppc_supports_tracepoints): Turn into...
543 (ppc_target::supports_tracepoints): ...this.
544 (the_low_target): Remove the op field.
545 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
546 Declare.
547 (s390_supports_tracepoints): Turn into...
548 (s390_target::supports_tracepoints): ...this.
549 (the_low_target): Remove the op field.
550 * linux-arm-low.cc (the_low_target): Remove the op field.
551 * linux-bfin-low.cc (the_low_target): Ditto.
552 * linux-crisv32-low.cc (the_low_target): Ditto.
553 * linux-m32r-low.cc (the_low_target): Ditto.
554 * linux-m68k-low.cc (the_low_target): Ditto.
555 * linux-sh-low.cc (the_low_target): Ditto.
556 * linux-tic6x-low.cc (the_low_target): Ditto.
557 * linux-tile-low.cc (the_low_target): Ditto.
558 * linux-xtensa-low.cc (the_low_target): Ditto.
559
560 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
561
562 Remove the 'process_qsupported' linux target op and let a concrete
563 linux target define the op by overriding the op declaration in
564 process_stratum_target.
565
566 * linux-low.h (struct linux_target_ops): Remove the op.
567 (class linux_process_target) <process_qsupported>: Remove.
568 * linux-low.cc (linux_process_target::process_qsupported): Remove.
569 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
570 (x86_linux_process_qsupported): Turn into...
571 (x86_target::process_qsupported): ...this.
572 (the_low_target): Remove the op field.
573 * linux-aarch64-low.cc (the_low_target): Remove the op
574 field.
575 * linux-arm-low.cc (the_low_target): Ditto.
576 * linux-bfin-low.cc (the_low_target): Ditto.
577 * linux-crisv32-low.cc (the_low_target): Ditto.
578 * linux-m32r-low.cc (the_low_target): Ditto.
579 * linux-m68k-low.cc (the_low_target): Ditto.
580 * linux-ppc-low.cc (the_low_target): Ditto.
581 * linux-s390-low.cc (the_low_target): Ditto.
582 * linux-sh-low.cc (the_low_target): Ditto.
583 * linux-tic6x-low.cc (the_low_target): Ditto.
584 * linux-tile-low.cc (the_low_target): Ditto.
585 * linux-xtensa-low.cc (the_low_target): Ditto.
586
587 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
588
589 Turn the 'prepare_to_resume' linux target op into a method of
590 linux_process_target.
591
592 * linux-low.h (struct linux_target_ops): Remove the op.
593 (class linux_process_target) <low_prepare_to_resume>: Declare.
594 * linux-low.cc (linux_process_target::low_prepare_to_resume):
595 Define.
596
597 Update the callers below:
598
599 (linux_process_target::resume_one_lwp_throw)
600 (linux_process_target::low_prepare_to_resume)
601
602 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
603 Declare.
604 (x86_target::low_prepare_to_resume): Define.
605 (the_low_target): Remove the op field.
606 * linux-aarch64-low.cc (class aarch64_target)
607 <low_prepare_to_resume>: Declare.
608 (aarch64_target::low_prepare_to_resume): Define.
609 (the_low_target): Remove the op field.
610 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
611 Declare.
612 (arm_prepare_to_resume): Turn into...
613 (arm_target::low_prepare_to_resume): ...this.
614 (the_low_target): Remove the op field.
615 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
616 Declare.
617 (mips_linux_prepare_to_resume): Turn into...
618 (mips_target::low_prepare_to_resume): ...this.
619 (the_low_target): Remove the op field.
620 * linux-bfin-low.cc (the_low_target): Remove the op field.
621 * linux-crisv32-low.cc (the_low_target): Ditto.
622 * linux-m32r-low.cc (the_low_target): Ditto.
623 * linux-m68k-low.cc (the_low_target): Ditto.
624 * linux-ppc-low.cc (the_low_target): Ditto.
625 * linux-s390-low.cc (the_low_target): Ditto.
626 * linux-sh-low.cc (the_low_target): Ditto.
627 * linux-tic6x-low.cc (the_low_target): Ditto.
628 * linux-tile-low.cc (the_low_target): Ditto.
629 * linux-xtensa-low.cc (the_low_target): Ditto.
630
631 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
632
633 Turn the 'new_process', 'delete_process', 'new_thread',
634 'delete_thread', and 'new_fork' linux target ops into methods
635 of linux_process_target.
636
637 * linux-low.h (struct linux_target_ops): Remove the ops.
638 (class linux_process_target) <add_linux_process>
639 <add_lwp>
640 <delete_lwp>
641 <attach_lwp>
642 <detach_one_lwp>
643 <check_zombie_leaders>
644 <filter_exit_event>
645 <low_new_process>
646 <low_delete_process>
647 <low_new_thread>
648 <low_delete_thread>
649 <low_new_fork>: Declare.
650 * linux-low.cc (delete_lwp): Turn into...
651 (linux_process_target::delete_lwp): ...this.
652 (linux_process_target::low_delete_thread): Define.
653 (linux_add_process): Turn into...
654 (linux_process_target::add_linux_process): ...this.
655 (linux_process_target::low_new_process): Define.
656 (linux_process_target::low_delete_process): Define.
657 (linux_process_target::low_new_fork): Define.
658 (add_lwp): Turn into...
659 (linux_process_target::add_lwp): ...this.
660 (linux_process_target::low_new_thread): Define.
661 (linux_attach_lwp): Turn into...
662 (linux_process_target::attach_lwp): ...this.
663 (linux_detach_one_lwp): Turn into...
664 (linux_process_target::detach_one_lwp): ...this.
665 (linux_detach_lwp_callback): Remove and inline...
666 (linux_process_target::detach): ...here.
667 (check_zombie_leaders): Turn into...
668 (linux_process_target::check_zombie_leaders): ...this.
669 (filter_exit_event): Turn into...
670 (linux_process_target::filter_exit_event): ...this.
671
672 Update the callers below.
673
674 (linux_process_target::handle_extended_wait)
675 (linux_process_target::create_inferior)
676 (attach_proc_task_lwp_callback)
677 (linux_process_target::attach)
678 (linux_process_target::detach)
679 (linux_process_target::mourn)
680 * thread-db.cc (attach_thread)
681
682 * linux-x86-low.cc (class x86_target) <low_new_process>
683 <low_delete_process>
684 <low_new_thread>
685 <low_delete_thread>
686 <low_new_fork>: Declare.
687 (x86_linux_new_process): Turn into...
688 (x86_target::low_new_process): ...this.
689 (x86_linux_delete_process): Turn into...
690 (x86_target::low_delete_process): ...this.
691 (x86_target::low_new_thread): Define.
692 (x86_target::low_delete_thread): Define.
693 (x86_linux_new_fork): Turn into...
694 (x86_target::low_new_fork): ...this.
695 (the_low_target): Remove the op fields.
696 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
697 <low_delete_process>
698 <low_new_thread>
699 <low_delete_thread>
700 <low_new_fork>: Declare.
701 (aarch64_linux_new_process): Turn into...
702 (aarch64_target::low_new_process): ...this.
703 (aarch64_linux_delete_process): Turn into...
704 (aarch64_target::low_delete_process): ...this.
705 (aarch64_target::low_new_thread): Define.
706 (aarch64_target::low_delete_thread): Define.
707 (aarch64_linux_new_fork): Turn into...
708 (aarch64_target::low_new_fork): ...this.
709 (the_low_target): Remove the op fields.
710 * linux-arm-low.cc (class arm_target) <low_new_process>
711 <low_delete_process>
712 <low_new_thread>
713 <low_delete_thread>
714 <low_new_fork>: Declare.
715 (arm_new_process): Turn into...
716 (arm_target::low_new_process): ...this.
717 (arm_delete_process): Turn into...
718 (arm_target::low_delete_process): ...this.
719 (arm_new_thread): Turn into...
720 (arm_target::low_new_thread): ...this.
721 (arm_delete_thread): Turn into...
722 (arm_target::low_delete_thread): ...this.
723 (arm_new_fork): Turn into...
724 (arm_target::low_new_fork): ...this.
725 (the_low_target): Remove the op fields.
726 * linux-mips-low.cc (class mips_target) <low_new_process>
727 <low_delete_process>
728 <low_new_thread>
729 <low_delete_thread>
730 <low_new_fork>: Declare.
731 (mips_linux_new_process): Turn into...
732 (mips_target::low_new_process): ...this.
733 (mips_linux_delete_process): Turn into...
734 (mips_target::low_delete_process): ...this.
735 (mips_linux_new_thread): Turn into...
736 (mips_target::low_new_thread): ...this.
737 (mips_linux_delete_thread): Turn into...
738 (mips_target::low_delete_thread): ...this.
739 (mips_linux_new_fork): Turn into...
740 (mips_target::low_new_fork): ...this.
741 (the_low_target): Remove the op fields.
742 * linux-bfin-low.cc (the_low_target): Remove the op fields.
743 * linux-crisv32-low.cc (the_low_target): Ditto.
744 * linux-m32r-low.cc (the_low_target): Ditto.
745 * linux-m68k-low.cc (the_low_target): Ditto.
746 * linux-ppc-low.cc (the_low_target): Ditto.
747 * linux-s390-low.cc (the_low_target): Ditto.
748 * linux-sh-low.cc (the_low_target): Ditto.
749 * linux-tic6x-low.cc (the_low_target): Ditto.
750 * linux-tile-low.cc (the_low_target): Ditto.
751 * linux-xtensa-low.cc (the_low_target): Ditto.
752
753 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
754
755 Turn the 'siginfo_fixup' linux target op into a method of
756 linux_process_target.
757
758 * linux-low.h (struct linux_target_ops): Remove the op.
759 (class linux_process_target) <siginfo_fixup>
760 <low_siginfo_fixup>: Declare.
761 * linux-low.cc (siginfo_fixup): Turn into...
762 (linux_process_target::siginfo_fixup): ...this.
763 (linux_process_target::low_siginfo_fixup): Define.
764 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
765 (x86_siginfo_fixup): Turn into...
766 (x86_target::low_siginfo_fixup): ...this.
767 (the_low_target): Remove the op field.
768 * linux-aarch64-low.cc (class aarch64_target):
769 <low_siginfo_fixup>: Declare.
770 (aarch64_linux_siginfo_fixup): Turn into...
771 (aarch64_target::low_siginfo_fixup): ...this.
772 (the_low_target): Remove the op field.
773 * linux-arm-low.cc (the_low_target): Remove the op field.
774 * linux-bfin-low.cc (the_low_target): Ditto.
775 * linux-crisv32-low.cc (the_low_target): Ditto.
776 * linux-m32r-low.cc (the_low_target): Ditto.
777 * linux-m68k-low.cc (the_low_target): Ditto.
778 * linux-mips-low.cc (the_low_target): Ditto.
779 * linux-ppc-low.cc (the_low_target): Ditto.
780 * linux-s390-low.cc (the_low_target): Ditto.
781 * linux-sh-low.cc (the_low_target): Ditto.
782 * linux-tic6x-low.cc (the_low_target): Ditto.
783 * linux-tile-low.cc (the_low_target): Ditto.
784 * linux-xtensa-low.cc (the_low_target): Ditto.
785
786 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
787
788 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
789 linux target ops into methods of linux_process_target.
790
791 * linux-low.h (struct linux_target_ops): Remove the ops.
792 (class linux_process_target) <low_collect_ptrace_register>
793 <low_store_ptrace_register>: Declare.
794 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
795 (linux_process_target::low_supply_ptrace_register): Define.
796
797 Update the callers below.
798
799 (linux_process_target::fetch_register)
800 (linux_process_target::store_register)
801
802 * linux-x86-low.cc (the_low_target): Remove the op fields.
803 * linux-aarch64-low.cc (the_low_target): Ditto.
804 * linux-arm-low.cc (the_low_target): Ditto.
805 * linux-bfin-low.cc (the_low_target): Ditto.
806 * linux-crisv32-low.cc (the_low_target): Ditto.
807 * linux-m32r-low.cc (the_low_target): Ditto.
808 * linux-m68k-low.cc (the_low_target): Ditto.
809 * linux-sh-low.cc (the_low_target): Ditto.
810 * linux-sparc-low.cc (the_low_target): Ditto.
811 * linux-tic6x-low.cc (the_low_target): Ditto.
812 * linux-tile-low.cc (the_low_target): Ditto.
813 * linux-xtensa-low.cc (the_low_target): Ditto.
814 * linux-mips-low.cc (class mips_target)
815 <low_collect_ptrace_register>
816 <low_supply_ptrace_register>: Declare.
817 (mips_collect_ptrace_register): Turn into ...
818 (mips_target::low_collect_ptrace_register): ...this.
819 (mips_supply_ptrace_register): Turn into...
820 (mips_target::low_supply_ptrace_register): ...this.
821 (the_low_target): Remove the op fields.
822 * linux-ppc-low.cc (class ppc_target)
823 <low_collect_ptrace_register>
824 <low_supply_ptrace_register>: Declare.
825 (ppc_collect_ptrace_register): Turn into ...
826 (ppc_target::low_collect_ptrace_register): ...this.
827 (ppc_supply_ptrace_register): Turn into ...
828 (ppc_target::low_supply_ptrace_register): ...this.
829 (ppc_fill_gregset): Update for the calls to
830 low_collect_ptrace_register.
831 (the_low_target): Remove the op fields.
832 * linux-s390-low.cc (class s390_target)
833 <low_collect_ptrace_register>
834 <low_supply_ptrace_register>: Declare.
835 (s390_collect_ptrace_register): Turn into ...
836 (s390_target::low_collect_ptrace_register): ...this.
837 (s390_supply_ptrace_register): Turn into ...
838 (s390_target::low_supply_ptrace_register): ...this.
839 (s390_fill_gregset): Update for the calls to
840 low_collect_ptrace_register.
841 (the_low_target): Remove the op fields.
842
843 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
844
845 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
846 target ops into methods of linux_process_target.
847
848 * linux-low.h (struct linux_target_ops): Remove the ops.
849 (class linux_process_target) <check_stopped_by_watchpoint>
850 <low_stopped_by_watchpoint>
851 <low_stopped_data_address>: Declare.
852 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
853 (linux_process_target::check_stopped_by_watchpoint): ...this.
854 (linux_process_target::low_stopped_by_watchpoint): Define.
855 (linux_process_target::low_stopped_data_address): Define.
856 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
857 <low_stopped_data_address>: Declare.
858 (x86_stopped_by_watchpoint): Turn into...
859 (x86_target::low_stopped_by_watchpoint): ...this.
860 (x86_stopped_data_address): Turn into...
861 (x86_target::low_stopped_data_address): ...this.
862 (the_low_target): Remove the op fields.
863 * linux-aarch64-low.cc (class aarch64_target)
864 <low_stopped_by_watchpoint>
865 <low_stopped_data_address>: Declare.
866 (aarch64_stopped_by_watchpoint): Turn into...
867 (aarch64_target::low_stopped_by_watchpoint): ...this.
868 (aarch64_stopped_data_address): Turn into...
869 (aarch64_target::low_stopped_data_address): ...this.
870 (the_low_target): Remove the op fields.
871 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
872 <low_stopped_data_address>: Declare.
873 (arm_stopped_by_watchpoint): Turn into...
874 (arm_target::low_stopped_by_watchpoint): ...this.
875 (arm_stopped_data_address): Turn into...
876 (arm_target::low_stopped_data_address): ...this.
877 (the_low_target): Remove the op fields.
878 * linux-crisv32-low.cc (class crisv32_target)
879 <low_stopped_by_watchpoint>
880 <low_stopped_data_address>: Declare.
881 (cris_stopped_by_watchpoint): Turn into...
882 (crisv32_target::low_stopped_by_watchpoint): ...this.
883 (cris_stopped_data_address): Turn into...
884 (crisv32_target::low_stopped_data_address): ...this.
885 (the_low_target): Remove the op fields.
886 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
887 <low_stopped_data_address>: Declare.
888 (mips_stopped_by_watchpoint): Turn into...
889 (mips_target::low_stopped_by_watchpoint): ...this.
890 (mips_stopped_data_address): Turn into...
891 (mips_target::low_stopped_data_address): ...this.
892 (the_low_target): Remove the op fields.
893 * linux-bfin-low.cc (the_low_target): Remove the op fields.
894 * linux-m32r-low.cc (the_low_target): Ditto.
895 * linux-m68k-low.cc (the_low_target): Ditto.
896 * linux-ppc-low.cc (the_low_target): Ditto.
897 * linux-s390-low.cc (the_low_target): Ditto.
898 * linux-sh-low.cc (the_low_target): Ditto.
899 * linux-sparc-low.cc (the_low_target): Ditto.
900 * linux-tic6x-low.cc (the_low_target): Ditto.
901 * linux-tile-low.cc (the_low_target): Ditto.
902 * linux-xtensa-low.cc (the_low_target): Ditto.
903
904 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
905
906 Turn the 'insert_point' and 'remove_point' linux target ops into
907 methods of linux_process_target.
908
909 * linux-low.h (struct linux_target_ops): Remove the ops.
910 (class linux_process_target) <low_insert_point>
911 <low_remove_point>: Declare.
912 * linux-low.cc (linux_process_target::low_insert_point)
913 (linux_process_target::low_remove_point): Define.
914 (linux_process_target::insert_point)
915 (linux_process_target::remove_point): Update for calls to
916 low_insert_point and low_remove_point.
917 * linux-x86-low.cc (class x86_target) <low_insert_point>
918 <low_remove_point>: Declare.
919 (x86_insert_point): Turn into...
920 (x86_target::low_insert_point): ...this.
921 (x86_remove_point): Turn into...
922 (x86_target::low_remove_point): ...this.
923 (the_low_target): Remove the op fields.
924 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
925 <low_remove_point>: Declare.
926 (aarch64_insert_point): Turn into...
927 (aarch64_target::low_insert_point): ...this.
928 (aarch64_remove_point): Turn into...
929 (aarch64_target::low_remove_point): ...this.
930 (the_low_target): Remove the op fields.
931 * linux-arm-low.cc (class arm_target) <low_insert_point>
932 <low_remove_point>: Declare.
933 (arm_insert_point): Turn into...
934 (arm_target::low_insert_point): ...this.
935 (arm_remove_point): Turn into...
936 (arm_target::low_remove_point): ...this.
937 (the_low_target): Remove the op fields.
938 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
939 <low_remove_point>: Declare.
940 (crisv32_insert_point): Turn into...
941 (crisv32_target::low_insert_point): ...this.
942 (crisv32_remove_point): Turn into...
943 (crisv32_target::low_remove_point): ...this.
944 (the_low_target): Remove the op fields.
945 * linux-mips-low.cc (class mips_target) <low_insert_point>
946 <low_remove_point>: Declare.
947 (mips_insert_point): Turn into...
948 (mips_target::low_insert_point): ...this.
949 (mips_remove_point): Turn into...
950 (mips_target::low_remove_point): ...this.
951 (the_low_target): Remove the op fields.
952 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
953 <low_remove_point>: Declare.
954 (ppc_insert_point): Turn into...
955 (ppc_target::low_insert_point): ...this.
956 (ppc_remove_point): Turn into...
957 (ppc_target::low_remove_point): ...this.
958 (the_low_target): Remove the op fields.
959 * linux-bfin-low.cc (the_low_target): Remove the op fields.
960 * linux-m32r-low.cc (the_low_target): Ditto.
961 * linux-m68k-low.cc (the_low_target): Ditto.
962 * linux-s390-low.cc (the_low_target): Ditto.
963 * linux-sh-low.cc (the_low_target): Ditto.
964 * linux-sparc-low.cc (the_low_target): Ditto.
965 * linux-tic6x-low.cc (the_low_target): Ditto.
966 * linux-tile-low.cc (the_low_target): Ditto.
967 * linux-xtensa-low.cc (the_low_target): Ditto.
968
969 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
970
971 Remove the 'supports_z_point_type' linux target op and let the
972 concrete linux target define it by overriding the op declared in
973 process_stratum_target.
974
975 * linux-low.cc (linux_process_target::supports_z_point_type):
976 Remove.
977 * linux-low.h (struct linux_target_ops): Remove the op.
978 (class linux_process_target) <supports_z_point_type>: Remove.
979 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
980 Declare.
981 (x86_supports_z_point_type): Turn into...
982 (x86_target::supports_z_point_type): ...this.
983 (the_low_target): Remove the op field.
984 * linux-aarch64-low.cc (class aarch64_target)
985 <supports_z_point_type>: Declare.
986 (aarch64_supports_z_point_type): Turn into...
987 (aarch64_target::supports_z_point_type): ...this.
988 (the_low_target): Remove the op field.
989 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
990 Declare.
991 (arm_supports_z_point_type): Turn into...
992 (arm_target::supports_z_point_type): ...this.
993 (the_low_target): Remove the op field.
994 * linux-crisv32-low.cc (class crisv32_target)
995 <supports_z_point_type>: Declare.
996 (cris_supports_z_point_type): Turn into...
997 (crisv32_target::supports_z_point_type): ...this.
998 (the_low_target): Remove the op field.
999 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1000 Declare.
1001 (mips_supports_z_point_type): Turn into...
1002 (mips_target::supports_z_point_type): ...this.
1003 (the_low_target): Remove the op field.
1004 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1005 Declare.
1006 (ppc_supports_z_point_type): Turn into...
1007 (ppc_target::supports_z_point_type): ...this.
1008 (the_low_target): Remove the op field.
1009 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1010 Declare.
1011 (s390_supports_z_point_type): Turn into...
1012 (s390_target::supports_z_point_type): ...this.
1013 (the_low_target): Remove the op field.
1014 * linux-bfin-low.cc (the_low_target): Remove the op field.
1015 * linux-m32r-low.cc (the_low_target): Ditto.
1016 * linux-m68k-low.cc (the_low_target): Ditto.
1017 * linux-sh-low.cc (the_low_target): Ditto.
1018 * linux-sparc-low.cc (the_low_target): Ditto.
1019 * linux-tic6x-low.cc (the_low_target): Ditto.
1020 * linux-tile-low.cc (the_low_target): Ditto.
1021 * linux-xtensa-low.cc (the_low_target): Ditto.
1022
1023 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1024
1025 Turn the 'breakpoint_at' linux target op into a method of
1026 linux_process_target.
1027
1028 * linux-low.h (struct linux_target_ops): Remove the op.
1029 (class linux_process_target) <low_breakpoint_at>: Declare.
1030
1031 Update the callers below:
1032
1033 * linux-low.cc (linux_process_target::save_stop_reason)
1034 (linux_process_target::thread_still_has_status_pending)
1035 (linux_process_target::wait_1)
1036
1037 * linux-x86-low.cc (class x86_target)
1038 <low_breakpoint_at>: Declare.
1039 (x86_breakpoint_at): Turn into...
1040 (x86_target::low_breakpoint_at): ...this.
1041 (the_low_target): Remove the op field.
1042 * linux-aarch64-low.cc (class aarch64_target)
1043 <low_breakpoint_at>: Declare.
1044 (aarch64_breakpoint_at): Turn into...
1045 (aarch64_target::low_breakpoint_at): ...this.
1046 (the_low_target): Remove the op field.
1047 * linux-arm-low.cc (class arm_target)
1048 <low_breakpoint_at>: Declare.
1049 (arm_target::low_breakpoint_at): Define.
1050 (the_low_target): Remove the op field.
1051 * linux-bfin-low.cc (class bfin_target)
1052 <low_breakpoint_at>: Declare.
1053 (bfin_breakpoint_at): Turn into...
1054 (bfin_target::low_breakpoint_at): ...this.
1055 (the_low_target): Remove the op field.
1056 * linux-cris-low.cc (class cris_target)
1057 <low_breakpoint_at>: Declare.
1058 (cris_breakpoint_at): Turn into...
1059 (cris_target::low_breakpoint_at): ...this.
1060 (the_low_target): Remove the op field.
1061 * linux-crisv32-low.cc (class crisv32_target)
1062 <low_breakpoint_at>: Declare.
1063 (crisv32_breakpoint_at): Turn into...
1064 (crisv32_target::low_breakpoint_at): ...this.
1065 (the_low_target): Remove the op field.
1066 * linux-ia64-low.cc (class ia64_target)
1067 <low_breakpoint_at>: Declare.
1068 (ia64_target::low_breakpoint_at): Define.
1069 * linux-m32r-low.cc (class m32r_target)
1070 <low_breakpoint_at>: Declare.
1071 (m32r_breakpoint_at): Turn into...
1072 (m32r_target::low_breakpoint_at): ...this.
1073 (the_low_target): Remove the op field.
1074 * linux-m68k-low.cc (class m68k_target)
1075 <low_breakpoint_at>: Declare.
1076 (m68k_breakpoint_at): Turn into...
1077 (m68k_target::low_breakpoint_at): ...this.
1078 (the_low_target): Remove the op field.
1079 * linux-mips-low.cc (class mips_target)
1080 <low_breakpoint_at>: Declare.
1081 (mips_breakpoint_at): Turn into...
1082 (mips_target::low_breakpoint_at): ...this.
1083 (the_low_target): Remove the op field.
1084 * linux-nios2-low.cc (class nios2_target)
1085 <low_breakpoint_at>: Declare.
1086 (nios2_breakpoint_at): Turn into...
1087 (nios2_target::low_breakpoint_at): ...this.
1088 (the_low_target): Remove the op field.
1089 * linux-ppc-low.cc (class ppc_target)
1090 <low_breakpoint_at>: Declare.
1091 (ppc_breakpoint_at): Turn into...
1092 (ppc_target::low_breakpoint_at): ...this.
1093 (the_low_target): Remove the op field.
1094 * linux-riscv-low.cc (class riscv_target)
1095 <low_breakpoint_at>: Declare.
1096 (riscv_breakpoint_at): Turn into...
1097 (riscv_target::low_breakpoint_at): ...this.
1098 (the_low_target): Remove the op field.
1099 * linux-s390-low.cc (class s390_target)
1100 <low_breakpoint_at>: Declare.
1101 (s390_breakpoint_at): Turn into...
1102 (s390_target::low_breakpoint_at): ...this.
1103 (the_low_target): Remove the op field.
1104 * linux-sh-low.cc (class sh_target)
1105 <low_breakpoint_at>: Declare.
1106 (sh_breakpoint_at): Turn into...
1107 (sh_target::low_breakpoint_at): ...this.
1108 (the_low_target): Remove the op field.
1109 * linux-sparc-low.cc (class sparc_target)
1110 <low_breakpoint_at>: Declare.
1111 (sparc_breakpoint_at): Turn into...
1112 (sparc_target::low_breakpoint_at): ...this.
1113 (the_low_target): Remove the op field.
1114 * linux-tic6x-low.cc (class tic6x_target)
1115 <low_breakpoint_at>: Declare.
1116 (tic6x_breakpoint_at): Turn into...
1117 (tic6x_target::low_breakpoint_at): ...this.
1118 (the_low_target): Remove the op field.
1119 * linux-tile-low.cc (class tile_target)
1120 <low_breakpoint_at>: Declare.
1121 (tile_breakpoint_at): Turn into...
1122 (tile_target::low_breakpoint_at): ...this.
1123 (the_low_target): Remove the op field.
1124 * linux-xtensa-low.cc (class xtensa_target)
1125 <low_breakpoint_at>: Declare.
1126 (xtensa_breakpoint_at): Turn into...
1127 (xtensa_target::low_breakpoint_at): ...this.
1128 (the_low_target): Remove the op field.
1129
1130 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1131
1132 Turn the 'decr_pc_after_break' linux_target_ops field into
1133 a method of linux_process_target.
1134
1135 * linux-low.h (struct linux_target_ops)
1136 <decr_pc_after_break>: Remove.
1137 (class linux_process_target) <low_decr_pc_after_break>: New method
1138 declaration.
1139 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1140 New method implementation.
1141
1142 Update the users below.
1143
1144 (linux_process_target::save_stop_reason)
1145 (linux_process_target::wait_1)
1146 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1147 New declaration.
1148 (x86_target::low_decr_pc_after_break): New method implementation.
1149 (the_low_target): Remove the field.
1150 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1151 New declaration.
1152 (bfin_target::low_decr_pc_after_break): New method implementation.
1153 (the_low_target): Remove the field.
1154 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1155 New declaration.
1156 (m68k_target::low_decr_pc_after_break): New method implementation.
1157 (the_low_target): Remove the field.
1158 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1159 New declaration.
1160 (s390_target::low_decr_pc_after_break): New method implementation.
1161 (the_low_target): Remove the field.
1162 * linux-aarch64-low.cc (the_low_target): Remove the field.
1163 * linux-arm-low.cc (the_low_target): Remove the field.
1164 * linux-cris-low.cc (the_low_target): Remove the field.
1165 * linux-crisv32-low.cc (the_low_target): Remove the field.
1166 * linux-m32r-low.cc (the_low_target): Remove the field.
1167 * linux-mips-low.cc (the_low_target): Remove the field.
1168 * linux-nios2-low.cc (the_low_target): Remove the field.
1169 * linux-ppc-low.cc (the_low_target): Remove the field.
1170 * linux-riscv-low.cc (the_low_target): Remove the field.
1171 * linux-sh-low.cc (the_low_target): Remove the field.
1172 * linux-sparc-low.cc (the_low_target): Remove the field.
1173 * linux-tic6x-low.cc (the_low_target): Remove the field.
1174 * linux-tile-low.cc (the_low_target): Remove the field.
1175 * linux-xtensa-low.cc (the_low_target): Remove the field.
1176
1177 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1178
1179 Remove the 'supports_software_single_step' linux target op and let
1180 the concrete linux target define it by overriding the op in
1181 process_stratum_target.
1182 Turn the 'get_next_pcs' linux target op into a method of
1183 linux_process_target.
1184
1185 * linux-low.h (struct linux_target_ops): Remove the ops.
1186 (class linux_process_target) <supports_software_single_step>:
1187 Remove.
1188 <low_get_next_pcs>: Declare.
1189 * linux-low.cc (can_software_single_step): Remove.
1190 (linux_process_target::low_get_next_pcs): Define.
1191 (linux_process_target::supports_software_single_step): Remove.
1192
1193 Update the callers below.
1194
1195 (linux_process_target::handle_extended_wait)
1196 (linux_process_target::wait_1)
1197 (linux_process_target::install_software_single_step_breakpoints)
1198 (linux_process_target::single_step)
1199 (linux_process_target::thread_needs_step_over)
1200 (linux_process_target::proceed_one_lwp)
1201 (linux_process_target::supports_range_stepping)
1202
1203 * linux-x86-low.cc (the_low_target): Remove the op field.
1204 * linux-aarch64-low.cc (the_low_target): Ditto.
1205 * linux-bfin-low.cc (the_low_target): Ditto.
1206 * linux-cris-low.cc (the_low_target): Ditto.
1207 * linux-crisv32-low.cc (the_low_target): Ditto.
1208 * linux-m32r-low.cc (the_low_target): Ditto.
1209 * linux-m68k-low.cc (the_low_target): Ditto.
1210 * linux-mips-low.cc (the_low_target): Ditto.
1211 * linux-nios2-low.cc (the_low_target): Ditto.
1212 * linux-ppc-low.cc (the_low_target): Ditto.
1213 * linux-riscv-low.cc (the_low_target): Ditto.
1214 * linux-s390-low.cc (the_low_target): Ditto.
1215 * linux-sh-low.cc (the_low_target): Ditto.
1216 * linux-sparc-low.cc (the_low_target): Ditto.
1217 * linux-tic6x-low.cc (the_low_target): Ditto.
1218 * linux-tile-low.cc (the_low_target): Ditto.
1219 * linux-xtensa-low.cc (the_low_target): Ditto.
1220 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1221 <supports_software_single_step>: Declare.
1222 (arm_target::supports_software_single_step): Define.
1223 (arm_gdbserver_get_next_pcs): Turn into...
1224 (arm_target::low_get_next_pcs): ...this.
1225 (the_low_target): Remove the op field.
1226
1227 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1228
1229 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1230 the concrete linux target define it by overriding the op
1231 in process_stratum_target.
1232
1233 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1234 Remove.
1235 * linux-low.h (struct linux_target_ops): Remove the op.
1236 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1237 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1238 Declare.
1239 (x86_sw_breakpoint_from_kind): Turn into...
1240 (x86_target::sw_breakpoint_from_kind): ...this.
1241 (the_low_target): Remove the op field.
1242 * linux-aarch64-low.cc (class aarch64_target)
1243 <sw_breakpoint_from_kind>: Declare.
1244 (aarch64_sw_breakpoint_from_kind): Turn into...
1245 (aarch64_target::sw_breakpoint_from_kind): ...this.
1246 (the_low_target): Remove the op field.
1247 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1248 Declare.
1249 (arm_target::sw_breakpoint_from_kind): Define.
1250 (the_low_target): Remove the op field.
1251 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1252 Declare.
1253 (bfin_sw_breakpoint_from_kind): Turn into...
1254 (bfin_target::sw_breakpoint_from_kind): ...this.
1255 (the_low_target): Remove the op field.
1256 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1257 Declare.
1258 (cris_sw_breakpoint_from_kind): Turn into...
1259 (cris_target::sw_breakpoint_from_kind): ...this.
1260 (the_low_target): Remove the op field.
1261 * linux-crisv32-low.cc (class crisv32_target)
1262 <sw_breakpoint_from_kind>: Declare.
1263 (cris_sw_breakpoint_from_kind): Turn into...
1264 (crisv32_target::sw_breakpoint_from_kind): ...this.
1265 (the_low_target): Remove the op field.
1266 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1267 Declare.
1268 (ia64_target::sw_breakpoint_from_kind): Define.
1269 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1270 Declare.
1271 (m32r_sw_breakpoint_from_kind): Turn into...
1272 (m32r_target::sw_breakpoint_from_kind): ...this.
1273 (the_low_target): Remove the op field.
1274 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1275 Declare.
1276 (m68k_sw_breakpoint_from_kind): Turn into...
1277 (m68k_target::sw_breakpoint_from_kind): ...this.
1278 (the_low_target): Remove the op field.
1279 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1280 Declare.
1281 (mips_sw_breakpoint_from_kind): Turn into...
1282 (mips_target::sw_breakpoint_from_kind): ...this.
1283 (the_low_target): Remove the op field.
1284 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1285 Declare.
1286 (nios2_sw_breakpoint_from_kind): Turn into...
1287 (nios2_target::sw_breakpoint_from_kind): ...this.
1288 (the_low_target): Remove the op field.
1289 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1290 Declare.
1291 (ppc_sw_breakpoint_from_kind): Turn into...
1292 (ppc_target::sw_breakpoint_from_kind): ...this.
1293 (the_low_target): Remove the op field.
1294 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1295 Declare.
1296 (riscv_sw_breakpoint_from_kind): Turn into...
1297 (riscv_target::sw_breakpoint_from_kind): ...this.
1298 (the_low_target): Remove the op field.
1299 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1300 Declare.
1301 (s390_sw_breakpoint_from_kind): Turn into...
1302 (s390_target::sw_breakpoint_from_kind): ...this.
1303 (the_low_target): Remove the op field.
1304 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1305 Declare.
1306 (sh_sw_breakpoint_from_kind): Turn into...
1307 (sh_target::sw_breakpoint_from_kind): ...this.
1308 (the_low_target): Remove the op field.
1309 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1310 Declare.
1311 (sparc_sw_breakpoint_from_kind): Turn into...
1312 (sparc_target::sw_breakpoint_from_kind): ...this.
1313 (the_low_target): Remove the op field.
1314 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1315 Declare.
1316 (tic6x_sw_breakpoint_from_kind): Turn into...
1317 (tic6x_target::sw_breakpoint_from_kind): ...this.
1318 (the_low_target): Remove the op field.
1319 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1320 Declare.
1321 (tile_sw_breakpoint_from_kind): Turn into...
1322 (tile_target::sw_breakpoint_from_kind): ...this.
1323 (the_low_target): Remove the op field.
1324 * linux-xtensa-low.cc (class xtensa_target)
1325 <sw_breakpoint_from_kind>: Declare.
1326 (xtensa_sw_breakpoint_from_kind): Turn into...
1327 (xtensa_target::sw_breakpoint_from_kind): ...this.
1328 (the_low_target): Remove the op field.
1329
1330 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1331
1332 Remove the 'breakpoint_kind_from_pc' and
1333 'breakpoint_kind_from_current_state' linux target ops, and let the
1334 concrete linux target define them by overriding the ops of
1335 process_stratum_target.
1336
1337 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1338 Remove.
1339 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1340 * linux-low.h (struct linux_target_ops): Remove ops.
1341 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1342 <breakpoint_kind_from_current_state>: Remove.
1343 * linux-x86-low.cc (the_low_target): Remove the op fields.
1344 * linux-bfin-low.cc (the_low_target): Ditto.
1345 * linux-cris-low.cc (the_low_target): Ditto.
1346 * linux-crisv32-low.cc (the_low_target): Ditto.
1347 * linux-m32r-low.cc (the_low_target): Ditto.
1348 * linux-m68k-low.cc (the_low_target): Ditto.
1349 * linux-mips-low.cc (the_low_target): Ditto.
1350 * linux-nios2-low.cc (the_low_target): Ditto.
1351 * linux-ppc-low.cc (the_low_target): Ditto.
1352 * linux-s390-low.cc (the_low_target): Ditto.
1353 * linux-sh-low.cc (the_low_target): Ditto.
1354 * linux-sparc-low.cc (the_low_target): Ditto.
1355 * linux-tic6x-low.cc (the_low_target): Ditto.
1356 * linux-tile-low.cc (the_low_target): Ditto.
1357 * linux-xtensa-low.cc (the_low_target): Ditto.
1358 * linux-aarch64-low.cc (class aarch64_target)
1359 <breakpoint_kind_from_pc>
1360 <breakpoint_kind_from_current_state>: Declare.
1361 (aarch64_breakpoint_kind_from_pc): Turn into...
1362 (aarch64_target::breakpoint_kind_from_pc): ...this.
1363 (aarch64_breakpoint_kind_from_current_state): Turn into...
1364 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1365 (the_low_target): Remove the op fields.
1366 * linux-arm-low.cc (class arm_target):
1367 <breakpoint_kind_from_pc>
1368 <breakpoint_kind_from_current_state>: Declare.
1369 (arm_target::breakpoint_kind_from_pc): Define.
1370 (arm_target::breakpoint_kind_from_current_state): Define.
1371 (the_low_target): Remove the op fields.
1372 * linux-riscv-low.cc (class riscv_target):
1373 <breakpoint_kind_from_pc>: Declare.
1374 (riscv_breakpoint_kind_from_pc): Turn into...
1375 (riscv_target::breakpoint_kind_from_pc): ...this.
1376 (the_low_target): Remove the op fields.
1377
1378 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1379
1380 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1381 of linux_process_target.
1382
1383 * linux-low.h (struct linux_target_ops): Remove the ops.
1384 (class linux_process_target) <low_supports_breakpoints>
1385 <low_get_pc>
1386 <low_set_pc>: Declare.
1387 * linux-low.cc (supports_breakpoints): Turn into...
1388 (linux_process_target::low_supports_breakpoints): ...this.
1389 (linux_process_target::low_get_pc): Define.
1390 (linux_process_target::low_set_pc): Define.
1391
1392 Update the callers below.
1393
1394 (linux_process_target::get_pc)
1395 (linux_process_target::save_stop_reason)
1396 (linux_process_target::maybe_move_out_of_jump_pad)
1397 (linux_process_target::wait_1)
1398 (linux_process_target::resume_one_lwp_throw)
1399 (linux_process_target::resume)
1400 (linux_process_target::proceed_all_lwps)
1401 (linux_process_target::read_pc)
1402 (linux_process_target::write_pc)
1403
1404 * linux-x86-low.cc (class linux_process_target)
1405 <low_supports_breakpoints>
1406 <low_get_pc>
1407 <low_set_pc>: Declare.
1408 (x86_target::low_supports_breakpoints): Define.
1409 (x86_get_pc): Turn into...
1410 (x86_target::low_get_pc): ...this.
1411 (x86_set_pc): Turn into...
1412 (x86_target::low_set_pc): ...this.
1413 (the_low_target): Remove the op fields.
1414 * linux-arm-low.cc (class arm_target)
1415 <low_supports_breakpoints>
1416 <low_get_pc>
1417 <low_set_pc>: Declare.
1418 (arm_target::low_supports_breakpoints)
1419 (arm_target::low_get_pc)
1420 (arm_target::low_set_pc): Define.
1421 (the_low_target): Remove the op fields.
1422 * linux-bfin-low.cc (class bfin_target)
1423 <low_supports_breakpoints>
1424 <low_get_pc>
1425 <low_set_pc>: Declare.
1426 (bfin_target::low_supports_breakpoints)
1427 (bfin_target::low_get_pc)
1428 (bfin_target::low_set_pc): Define.
1429 (the_low_target): Remove the op fields.
1430 * linux-cris-low.cc (class cris_target)
1431 <low_supports_breakpoints>
1432 <low_get_pc>
1433 <low_set_pc>: Declare.
1434 (cris_target::low_supports_breakpoints)
1435 (cris_target::low_get_pc)
1436 (cris_target::low_set_pc): Define.
1437 (the_low_target): Remove the op fields.
1438 * linux-crisv32-low.cc (class crisv32_target)
1439 <low_supports_breakpoints>
1440 <low_get_pc>
1441 <low_set_pc>: Declare.
1442 (crisv32_target::low_supports_breakpoints)
1443 (crisv32_target::low_get_pc)
1444 (crisv32_target::low_set_pc): Define.
1445 (the_low_target): Remove the op fields.
1446 * linux-m32r-low.cc (class m32r_target)
1447 <low_supports_breakpoints>
1448 <low_get_pc>
1449 <low_set_pc>: Declare.
1450 (m32r_target::low_supports_breakpoints)
1451 (m32r_target::low_get_pc)
1452 (m32r_target::low_set_pc): Define.
1453 (the_low_target): Remove the op fields.
1454 * linux-m68k-low.cc (class m68k_target)
1455 <low_supports_breakpoints>
1456 <low_get_pc>
1457 <low_set_pc>: Declare.
1458 (m68k_target::low_supports_breakpoints)
1459 (m68k_target::low_get_pc)
1460 (m68k_target::low_set_pc): Define.
1461 (the_low_target): Remove the op fields.
1462 * linux-nios2-low.cc (class nios2_target)
1463 <low_supports_breakpoints>
1464 <low_get_pc>
1465 <low_set_pc>: Declare.
1466 (nios2_target::low_supports_breakpoints)
1467 (nios2_target::low_get_pc)
1468 (nios2_target::low_set_pc): Define.
1469 (the_low_target): Remove the op fields.
1470 * linux-sh-low.cc (class sh_target)
1471 <low_supports_breakpoints>
1472 <low_get_pc>
1473 <low_set_pc>: Declare.
1474 (sh_target::low_supports_breakpoints)
1475 (sh_target::low_get_pc)
1476 (sh_target::low_set_pc): Define.
1477 (the_low_target): Remove the op fields.
1478 * linux-xtensa-low.cc (class xtensa_target)
1479 <low_supports_breakpoints>
1480 <low_get_pc>
1481 <low_set_pc>: Declare.
1482 (xtensa_target::low_supports_breakpoints)
1483 (xtensa_target::low_get_pc)
1484 (xtensa_target::low_set_pc): Define.
1485 (the_low_target): Remove the op fields.
1486 * linux-sparc-low.cc (class sparc_target)
1487 <low_supports_breakpoints>
1488 <low_get_pc>: Declare.
1489 (sparc_target::low_supports_breakpoints)
1490 (sparc_target::low_get_pc): Define.
1491 (the_low_target): Remove the op fields.
1492 * linux-tile-low.cc (class tile_target)
1493 <low_supports_breakpoints>
1494 <low_get_pc>
1495 <low_set_pc>: Declare.
1496 (tile_target::low_supports_breakpoints)
1497 (tile_target::low_get_pc)
1498 (tile_target::low_set_pc): Define.
1499 (the_low_target): Remove the op fields.
1500 * linux-aarch64-low.cc (class aarch64_target)
1501 <low_supports_breakpoints>
1502 <low_get_pc>
1503 <low_set_pc>: Declare.
1504 (aarch64_target::low_supports_breakpoints): Define.
1505 (aarch64_get_pc): Turn into...
1506 (aarch64_target::low_get_pc): ...this.
1507 (aarch64_set_pc): Turn into...
1508 (aarch64_target::low_set_pc): ...this.
1509 (the_low_target): Remove the op fields.
1510 * linux-mips-low.cc (class mips_target)
1511 <low_supports_breakpoints>
1512 <low_get_pc>
1513 <low_set_pc>: Declare.
1514 (mips_target::low_supports_breakpoints): Define.
1515 (mips_get_pc): Turn into...
1516 (mips_target::low_get_pc): ...this.
1517 (mips_set_pc): Turn into...
1518 (mips_target::low_set_pc): ...this.
1519 (the_low_target): Remove the op fields.
1520 * linux-ppc-low.cc (class ppc_target)
1521 <low_supports_breakpoints>
1522 <low_get_pc>
1523 <low_set_pc>: Declare.
1524 (ppc_target::low_supports_breakpoints): Define.
1525 (ppc_get_pc): Turn into...
1526 (ppc_target::low_get_pc): ...this.
1527 (ppc_set_pc): Turn into...
1528 (ppc_target::low_set_pc): ...this.
1529 (the_low_target): Remove the op fields.
1530 * linux-riscv-low.cc (class riscv_target)
1531 <low_supports_breakpoints>
1532 <low_get_pc>
1533 <low_set_pc>: Declare.
1534 (riscv_target::low_supports_breakpoints): Define.
1535 (riscv_get_pc): Turn into...
1536 (riscv_target::low_get_pc): ...this.
1537 (riscv_set_pc): Turn into...
1538 (riscv_target::low_set_pc): ...this.
1539 (the_low_target): Remove the op fields.
1540 * linux-s390-low.cc (class s390_target)
1541 <low_supports_breakpoints>
1542 <low_get_pc>
1543 <low_set_pc>: Declare.
1544 (s390_target::low_supports_breakpoints): Define.
1545 (s390_get_pc): Turn into...
1546 (s390_target::low_get_pc): ...this.
1547 (s390_set_pc): Turn into...
1548 (s390_target::low_set_pc): ...this.
1549 (the_low_target): Remove the op fields.
1550 * linux-tic6x-low.cc (class tic6x_target)
1551 <low_supports_breakpoints>
1552 <low_get_pc>
1553 <low_set_pc>: Declare.
1554 (tic6x_target::low_supports_breakpoints): Define.
1555 (tic6x_get_pc): Turn into...
1556 (tic6x_target::low_get_pc): ...this.
1557 (tic6x_set_pc): Turn into...
1558 (tic6x_target::low_set_pc): ...this.
1559 (the_low_target): Remove the op fields.
1560
1561 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1562
1563 Turn some more static methods in linux-low into private methods
1564 of linux_process_target.
1565
1566 * linux-low.cc (get_pc): Turn into...
1567 (linux_process_target::get_pc): ...this.
1568 (save_stop_reason): Turn into...
1569 (linux_process_target::save_stop_reason): ...this.
1570 (thread_still_has_status_pending_p): Turn into...
1571 (linux_process_target::thread_still_has_status_pending): ...this.
1572 (status_pending_p_callback): Turn into...
1573 (linux_process_target::status_pending_p_callback): ...this.
1574 (resume_stopped_resumed_lwps): Turn into...
1575 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1576 (install_software_single_step_breakpoints): Turn into...
1577 (linux_process_target::install_software_single_step_breakpoints):
1578 ...this.
1579 (single_step): Turn into...
1580 (linux_process_target::single_step): ...this.
1581 (linux_resume_one_lwp_throw): Turn into...
1582 (linux_process_target::resume_one_lwp_throw): ...this.
1583 (linux_resume_one_lwp): Turn into...
1584 (linux_process_target::resume_one_lwp): ...this.
1585 (resume_status_pending_p): Turn into...
1586 (linux_process_target::resume_status_pending): ...this.
1587 (need_step_over_p): Turn into...
1588 (linux_process_target::thread_needs_step_over): ...this.
1589 (linux_resume_one_thread): Turn into...
1590 (linux_process_target::resume_one_thread): ...this.
1591 (proceed_one_lwp): Turn into...
1592 (linux_process_target::proceed_one_lwp): ...this.
1593 (unsuspend_and_proceed_one_lwp): Turn into...
1594 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1595
1596 Update the calls/references to the above functions below.
1597
1598 (linux_process_target::handle_extended_wait)
1599 (linux_process_target::filter_event)
1600 (linux_process_target::wait_for_event_filtered)
1601 (linux_process_target::wait_1)
1602 (linux_process_target::move_out_of_jump_pad)
1603 (linux_process_target::start_step_over)
1604 (linux_process_target::resume)
1605 (linux_process_target::proceed_all_lwps)
1606 (regsets_store_inferior_registers)
1607 (linux_process_target::store_register)
1608
1609 * linux-low.h (class linux_process_target)
1610 <get_pc>
1611 <save_stop_reason>
1612 <thread_still_has_status_pending>
1613 <status_pending_p_callback>
1614 <resume_stopped_resumed_lwps>
1615 <install_software_single_step_breakpoints>
1616 <single_step>
1617 <resume_one_lwp_throw>
1618 <resume_one_lwp>
1619 <resume_status_pending>
1620 <thread_needs_step_over>
1621 <resume_one_thread>
1622 <proceed_one_lwp>
1623 <unsuspend_and_proceed_one_lwp>: Declare.
1624
1625 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1626
1627 Turn the 'fetch_register' linux target op into a method of
1628 linux_process_target.
1629
1630 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1631 (class linux_process_target) <low_fetch_register>: Declare.
1632 * linux-x86-low.cc (the_low_target)
1633 * linux-aarch64-low.cc (the_low_target)
1634 * linux-arm-low.cc (the_low_target)
1635 * linux-bfin-low.cc (the_low_target)
1636 * linux-cris-low.cc (the_low_target)
1637 * linux-crisv32-low.cc (the_low_target)
1638 * linux-m32r-low.cc (the_low_target)
1639 * linux-m68k-low.cc (the_low_target)
1640 * linux-nios2-low.cc (the_low_target)
1641 * linux-ppc-low.cc (the_low_target)
1642 * linux-s390-low.cc (the_low_target)
1643 * linux-sh-low.cc (the_low_target)
1644 * linux-sparc-low.cc (the_low_target)
1645 * linux-tic6x-low.cc (the_low_target)
1646 * linux-tile-low.cc (the_low_target)
1647 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1648 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1649 Declare.
1650 (ia64_fetch_register): Turn into...
1651 (ia64_target::low_fetch_register): ...this.
1652 (the_low_target): Remove the op field.
1653 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1654 Declare.
1655 (mips_fetch_register): Turn into...
1656 (mips_target::low_fetch_register): ...this.
1657 (the_low_target): Remove the op field.
1658 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1659 Declare.
1660 (riscv_fetch_register): Turn into...
1661 (riscv_target::low_fetch_register): ...this.
1662 (the_low_target): Remove the op field.
1663
1664 Update the callers below.
1665
1666 * linux-low.cc (linux_process_target::fetch_registers)
1667 (linux_process_target::low_fetch_register)
1668
1669 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1670
1671 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1672 linux target ops into methods of linux_process_target.
1673
1674 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1675 (class linux_process_target) <fetch_register>
1676 <store_register>
1677 <usr_fetch_inferior_registers>
1678 <usr_store_inferior_registers>
1679 <low_cannot_fetch_register>
1680 <low_cannot_fetch_register> Declare.
1681 * linux-low.cc (fetch_register): Turn into...
1682 (linux_process_target::fetch_register): ...this.
1683 (store_register): Turn into ...
1684 (linux_process_target::store_register): ...this.
1685 (usr_fetch_inferior_registers): Turn into...
1686 (linux_process_target::usr_fetch_inferior_registers): ...this.
1687 (usr_store_inferior_registers): Turn into...
1688 (linux_process_target::usr_store_inferior_registers): ...this.
1689 * linux-x86-low.cc (class x86_target)
1690 <low_cannot_fetch_register>
1691 <low_cannot_store_register>: Declare.
1692 (x86_cannot_store_register): Turn into...
1693 (x86_target::low_cannot_store_register): ...this.
1694 (x86_cannot_fetch_register): Turn into...
1695 (x86_target::low_cannot_fetch_register): ...this.
1696 (the_low_target): Remove the target op fields.
1697 * linux-aarch64-low.cc (class aarch64_target)
1698 <low_cannot_fetch_register>
1699 <low_cannot_store_register>: Declare.
1700 (aarch64_target::low_cannot_fetch_register)
1701 (aarch64_target::low_cannot_store_register): Define.
1702 (the_low_target): Remove the op fields.
1703 * linux-arm-low.cc (class arm_target)
1704 <low_cannot_fetch_register>
1705 <low_cannot_store_register>: Declare.
1706 (arm_cannot_fetch_register): Turn into...
1707 (arm_target::low_cannot_fetch_register): ...this.
1708 (arm_cannot_store_register): Turn into...
1709 (arm_target::low_cannot_store_register): ...this.
1710 (the_low_target): Remove the op fields.
1711 * linux-bfin-low.cc (class bfin_target)
1712 <low_cannot_fetch_register>
1713 <low_cannot_store_register>: Declare.
1714 (bfin_cannot_fetch_register): Turn into...
1715 (bfin_target::low_cannot_fetch_register): ...this.
1716 (bfin_cannot_store_register): Turn into...
1717 (bfin_target::low_cannot_store_register): ...this.
1718 (the_low_target): Remove the op fields.
1719 * linux-cris-low.cc (class cris_target)
1720 <low_cannot_fetch_register>
1721 <low_cannot_store_register>: Declare.
1722 (cris_cannot_fetch_register): Turn into...
1723 (cris_target::low_cannot_fetch_register): ...this.
1724 (cris_cannot_store_register): Turn into...
1725 (cris_target::low_cannot_store_register): ...this.
1726 (the_low_target): Remove the op fields.
1727 * linux-crisv32-low.cc (class crisv32_target)
1728 <low_cannot_fetch_register>
1729 <low_cannot_store_register>: Declare.
1730 (crisv32_target::low_cannot_fetch_register)
1731 (crisv32_target::low_cannot_store_register): Define.
1732 (the_low_target): Remove the op fields.
1733 * linux-ia64-low.cc (class ia64_target)
1734 <low_cannot_fetch_register>
1735 <low_cannot_store_register>: Declare.
1736 (ia64_cannot_fetch_register): Turn into...
1737 (ia64_target::low_cannot_fetch_register): ...this.
1738 (ia64_cannot_store_register): Turn into...
1739 (ia64_target::low_cannot_store_register): ...this.
1740 (the_low_target): Remove the op fields.
1741 * linux-m32r-low.cc (class m32r_target)
1742 <low_cannot_fetch_register>
1743 <low_cannot_store_register>: Declare.
1744 (m32r_cannot_fetch_register): Turn into...
1745 (m32r_target::low_cannot_fetch_register): ...this.
1746 (m32r_cannot_store_register): Turn into...
1747 (m32r_target::low_cannot_store_register): ...this.
1748 (the_low_target): Remove the op fields.
1749 * linux-m68k-low.cc (class m68k_target)
1750 <low_cannot_fetch_register>
1751 <low_cannot_store_register>: Declare.
1752 (m68k_cannot_fetch_register): Turn into...
1753 (m68k_target::low_cannot_fetch_register): ...this.
1754 (m68k_cannot_store_register): Turn into...
1755 (m68k_target::low_cannot_store_register): ...this.
1756 (the_low_target): Remove the op fields.
1757 * linux-mips-low.cc (class mips_target)
1758 <low_cannot_fetch_register>
1759 <low_cannot_store_register>: Declare.
1760 (mips_cannot_fetch_register): Turn into...
1761 (mips_target::low_cannot_fetch_register): ...this.
1762 (mips_cannot_store_register): Turn into...
1763 (mips_target::low_cannot_store_register): ...this.
1764 (get_usrregs_info): Inline at the call sites in
1765 low_cannot_fetch_register and low_cannot_store_register,
1766 and remove.
1767 (the_low_target): Remove the op fields.
1768 * linux-nios2-low.cc (class nios2_target)
1769 <low_cannot_fetch_register>
1770 <low_cannot_store_register>: Declare.
1771 (nios2_cannot_fetch_register): Turn into...
1772 (nios2_target::low_cannot_fetch_register): ...this.
1773 (nios2_cannot_store_register): Turn into...
1774 (nios2_target::low_cannot_store_register): ...this.
1775 (the_low_target): Remove the op fields.
1776 * linux-ppc-low.cc (class ppc_target)
1777 <low_cannot_fetch_register>
1778 <low_cannot_store_register>: Declare.
1779 (ppc_cannot_fetch_register): Turn into...
1780 (ppc_target::low_cannot_fetch_register): ...this.
1781 (ppc_cannot_store_register): Turn into...
1782 (ppc_target::low_cannot_store_register): ...this.
1783 (the_low_target): Remove the op fields.
1784 * linux-riscv-low.cc (class riscv_target)
1785 <low_cannot_fetch_register>
1786 <low_cannot_store_register>: Declare.
1787 (riscv_target::low_cannot_fetch_register)
1788 (riscv_target::low_cannot_store_register): Define.
1789 (the_low_target): Remove the op fields.
1790 * linux-s390-low.cc (class s390_target)
1791 <low_cannot_fetch_register>
1792 <low_cannot_store_register>: Declare.
1793 (s390_cannot_fetch_register): Turn into...
1794 (s390_target::low_cannot_fetch_register): ...this.
1795 (s390_cannot_store_register): Turn into...
1796 (s390_target::low_cannot_store_register): ...this.
1797 (the_low_target): Remove the op fields.
1798 * linux-sh-low.cc (class sh_target)
1799 <low_cannot_fetch_register>
1800 <low_cannot_store_register>: Declare.
1801 (sh_cannot_fetch_register): Turn into...
1802 (sh_target::low_cannot_fetch_register): ...this.
1803 (sh_cannot_store_register): Turn into...
1804 (sh_target::low_cannot_store_register): ...this.
1805 (the_low_target): Remove the op fields.
1806 * linux-sparc-low.cc (class sparc_target)
1807 <low_cannot_fetch_register>
1808 <low_cannot_store_register>: Declare.
1809 (sparc_cannot_fetch_register): Turn into...
1810 (sparc_target::low_cannot_fetch_register): ...this.
1811 (sparc_cannot_store_register): Turn into...
1812 (sparc_target::low_cannot_store_register): ...this.
1813 (the_low_target): Remove the op fields.
1814 * linux-tic6x-low.cc (class tic6x_target)
1815 <low_cannot_fetch_register>
1816 <low_cannot_store_register>: Declare.
1817 (tic6x_cannot_fetch_register): Turn into...
1818 (tic6x_target::low_cannot_fetch_register): ...this.
1819 (tic6x_cannot_store_register): Turn into...
1820 (tic6x_target::low_cannot_store_register): ...this.
1821 (the_low_target): Remove the op fields.
1822 * linux-tile-low.cc (class tile_target)
1823 <low_cannot_fetch_register>
1824 <low_cannot_store_register>: Declare.
1825 (tile_cannot_fetch_register): Turn into...
1826 (tile_target::low_cannot_fetch_register): ...this.
1827 (tile_cannot_store_register): Turn into...
1828 (tile_target::low_cannot_store_register): ...this.
1829 (the_low_target): Remove the op fields.
1830 * linux-xtensa-low.cc (class xtensa_target)
1831 <low_cannot_fetch_register>
1832 <low_cannot_store_register>: Declare.
1833 (xtensa_target::low_cannot_fetch_register)
1834 (xtensa_target::low_cannot_store_register): Define.
1835 (the_low_target): Remove the op fields.
1836
1837 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1838
1839 Turn the 'regs_info' linux target op into a method of
1840 linux_process_target.
1841
1842 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1843 (class linux_process_target) <get_regs_info>: Define.
1844
1845 Update the callers below.
1846
1847 * linux-low.cc (linux_process_target::fetch_registers)
1848 (linux_process_target::store_registers)
1849 * proc-service.cc (gregset_info)
1850
1851 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1852 (x86_linux_regs_info): Turn into ...
1853 (x86_target::get_regs_info): ...this.
1854 (the_low_target): Remove the op field.
1855 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1856 Declare.
1857 (aarch64_regs_info): Turn into ...
1858 (aarch64_target::get_regs_info): ...this.
1859 (the_low_target): Remove the op field.
1860 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1861 (arm_regs_info): Turn into ...
1862 (arm_target::get_regs_info): ...this.
1863 (the_low_target): Remove the op field.
1864 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1865 (bfin_regs_info): Turn into ...
1866 (bfin_target::get_regs_info): ...this.
1867 (the_low_target): Remove the op field.
1868 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1869 (cris_regs_info): Turn into ...
1870 (cris_target::get_regs_info): ...this.
1871 (the_low_target): Remove the op field.
1872 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1873 Declare.
1874 (crisv32_regs_info): Turn into ...
1875 (crisv32_target::get_regs_info): ...this.
1876 (the_low_target): Remove the op field.
1877 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
1878 (ia64_regs_info): Turn into ...
1879 (ia64_target::get_regs_info): ...this.
1880 (the_low_target): Remove the op field.
1881 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
1882 (m32r_regs_info): Turn into ...
1883 (m32r_target::get_regs_info): ...this.
1884 (the_low_target): Remove the op field.
1885 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
1886 (m68k_regs_info): Turn into ...
1887 (m68k_target::get_regs_info): ...this.
1888 (the_low_target): Remove the op field.
1889 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
1890 (mips_regs_info): Turn into ...
1891 (mips_target::get_regs_info): ...this.
1892 (the_low_target): Remove the op field.
1893 (get_usrregs_info): Update the call to the op.
1894 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
1895 (nios2_regs_info): Turn into ...
1896 (nios2_target::get_regs_info): ...this.
1897 (the_low_target): Remove the op field.
1898 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
1899 (ppc_regs_info): Turn into ...
1900 (ppc_target::get_regs_info): ...this.
1901 (the_low_target): Remove the op field.
1902 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
1903 (riscv_regs_info): Turn into ...
1904 (riscv_target::get_regs_info): ...this.
1905 (the_low_target): Remove the op field.
1906 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
1907 (s390_regs_info): Turn into ...
1908 (s390_target::get_regs_info): ...this.
1909 (the_low_target): Remove the op field.
1910 (s390_collect_ptrace_register)
1911 (s390_supply_ptrace_register)
1912 (s390_fill_gregset): Update the call to the op.
1913 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
1914 (sh_regs_info): Turn into ...
1915 (sh_target::get_regs_info): ...this.
1916 (the_low_target): Remove the op field.
1917 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
1918 (sparc_regs_info): Turn into ...
1919 (sparc_target::get_regs_info): ...this.
1920 (the_low_target): Remove the op field.
1921 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
1922 (tic6x_regs_info): Turn into ...
1923 (tic6x_target::get_regs_info): ...this.
1924 (the_low_target): Remove the op field.
1925 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
1926 (tile_regs_info): Turn into ...
1927 (tile_target::get_regs_info): ...this.
1928 (the_low_target): Remove the op field.
1929 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
1930 Declare.
1931 (xtensa_regs_info): Turn into ...
1932 (xtensa_target::get_regs_info): ...this.
1933 (the_low_target): Remove the op field.
1934
1935 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1936
1937 Turn the 'arch_setup' linux target op into a method of
1938 linux_process_target.
1939
1940 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
1941 (class linux_process_target) <arch_setup_thread>
1942 <low_arch_setup>: New declarations.
1943 * linux-low.cc (linux_arch_setup): Delete.
1944 (linux_arch_setup_thread): Turn into...
1945 (linux_process_target::arch_setup_thread): ... this.
1946
1947 Update the callers below.
1948
1949 (linux_process_target::handle_extended_wait)
1950 (linux_process_target::post_create_inferior)
1951 (linux_process_target::filter_event)
1952
1953 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
1954 declaration.
1955 (x86_linux_update_xmltarget): Turn into...
1956 (x86_target::update_xmltarget): ...this.
1957 (x86_linux_process_qsupported): Update the call to
1958 x86_linux_update_xmltarget.
1959 (x86_arch_setup): Turn into ...
1960 (x86_target::low_arch_setup): ...this.
1961 (the_low_target): Remove the op field.
1962 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
1963 declaration.
1964 (aarch64_arch_setup): Turn into ...
1965 (aarch64_target::low_arch_setup): ...this.
1966 (the_low_target): Remove the op field.
1967 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
1968 declaration.
1969 (arm_arch_setup): Turn into ...
1970 (arm_target::low_arch_setup): ...this.
1971 (the_low_target): Remove the op field.
1972 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
1973 declaration.
1974 (bfin_arch_setup): Turn into ...
1975 (bfin_target::low_arch_setup): ...this.
1976 (the_low_target): Remove the op field.
1977 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
1978 declaration.
1979 (cris_arch_setup): Turn into ...
1980 (cris_target::low_arch_setup): ...this.
1981 (the_low_target): Remove the op field.
1982 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
1983 declaration.
1984 (crisv32_arch_setup): Turn into ...
1985 (crisv32_target::low_arch_setup): ...this.
1986 (the_low_target): Remove the op field.
1987 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
1988 declaration.
1989 (ia64_arch_setup): Turn into ...
1990 (ia64_target::low_arch_setup): ...this.
1991 (the_low_target): Remove the op field.
1992 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
1993 declaration.
1994 (m32r_arch_setup): Turn into ...
1995 (m32r_target::low_arch_setup): ...this.
1996 (the_low_target): Remove the op field.
1997 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
1998 declaration.
1999 (m68k_arch_setup): Turn into ...
2000 (m68k_target::low_arch_setup): ...this.
2001 (the_low_target): Remove the op field.
2002 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2003 declaration.
2004 (mips_arch_setup): Turn into ...
2005 (mips_target::low_arch_setup): ...this.
2006 (the_low_target): Remove the op field.
2007 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2008 declaration.
2009 (nios2_arch_setup): Turn into ...
2010 (nios2_target::low_arch_setup): ...this.
2011 (the_low_target): Remove the op field.
2012 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2013 declaration.
2014 (ppc_arch_setup): Turn into ...
2015 (ppc_target::low_arch_setup): ...this.
2016 (the_low_target): Remove the op field.
2017 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2018 declaration.
2019 (riscv_arch_setup): Turn into ...
2020 (riscv_target::low_arch_setup): ...this.
2021 (the_low_target): Remove the op field.
2022 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2023 declaration.
2024 (s390_arch_setup): Turn into ...
2025 (s390_target::low_arch_setup): ...this.
2026 (the_low_target): Remove the op field.
2027 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2028 declaration.
2029 (sh_arch_setup): Turn into ...
2030 (sh_target::low_arch_setup): ...this.
2031 (the_low_target): Remove the op field.
2032 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2033 declaration.
2034 (sparc_arch_setup): Turn into ...
2035 (sparc_target::low_arch_setup): ...this.
2036 (the_low_target): Remove the op field.
2037 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2038 declaration.
2039 (tic6x_arch_setup): Turn into ...
2040 (tic6x_target::low_arch_setup): ...this.
2041 (the_low_target): Remove the op field.
2042 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2043 declaration.
2044 (tile_arch_setup): Turn into ...
2045 (tile_target::low_arch_setup): ...this.
2046 (the_low_target): Remove the op field.
2047 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2048 declaration.
2049 (xtensa_arch_setup): Turn into ...
2050 (xtensa_target::low_arch_setup): ...this.
2051 (the_low_target): Remove the op field.
2052
2053 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2054
2055 * linux-low.h (the_linux_target): New extern declaration.
2056 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2057 'the_target'.
2058 (the_linux_target): Remove.
2059 * linux-x86-low.cc (class x86_target): New class.
2060 (the_x86_target): New static object.
2061 (the_linux_target): Define as pointer to the_x86_target.
2062 * linux-aarch64-low.cc (class aarch64_target): New class.
2063 (the_aarch64_target): New static object.
2064 (the_linux_target): Define as pointer to the_aarch64_target.
2065 * linux-arm-low.cc (class arm_target): New class.
2066 (the_arm_target): New static object.
2067 (the_linux_target): Define as pointer to the_arm_target.
2068 * linux-bfin-low.cc (class bfin_target): New class.
2069 (the_bfin_target): New static object.
2070 (the_linux_target): Define as pointer to the_bfin_target.
2071 * linux-cris-low.cc (class cris_target): New class.
2072 (the_cris_target): New static object.
2073 (the_linux_target): Define as pointer to the_cris_target.
2074 * linux-crisv32-low.cc (class crisv32_target): New class.
2075 (the_crisv32_target): New static object.
2076 (the_linux_target): Define as pointer to the_crisv32_target.
2077 * linux-ia64-low.cc (class ia64_target): New class.
2078 (the_ia64_target): New static object.
2079 (the_linux_target): Define as pointer to the_ia64_target.
2080 * linux-m32r-low.cc (class m32r_target): New class.
2081 (the_m32r_target): New static object.
2082 (the_linux_target): Define as pointer to the_m32r_target.
2083 * linux-m68k-low.cc (class m68k_target): New class.
2084 (the_m68k_target): New static object.
2085 (the_linux_target): Define as pointer to the_m68k_target.
2086 * linux-mips-low.cc (class mips_target): New class.
2087 (the_mips_target): New static object.
2088 (the_linux_target): Define as pointer to the_mips_target.
2089 * linux-nios2-low.cc (class nios2_target): New class.
2090 (the_nios2_target): New static object.
2091 (the_linux_target): Define as pointer to the_nios2_target.
2092 * linux-ppc-low.cc (class ppc_target): New class.
2093 (the_ppc_target): New static object.
2094 (the_linux_target): Define as pointer to the_ppc_target.
2095 * linux-riscv-low.cc (class riscv_target): New class.
2096 (the_riscv_target): New static object.
2097 (the_linux_target): Define as pointer to the_riscv_target.
2098 * linux-s390-low.cc (class s390_target): New class.
2099 (the_s390_target): New static object.
2100 (the_linux_target): Define as pointer to the_s390_target.
2101 * linux-sh-low.cc (class sh_target): New class.
2102 (the_sh_target): New static object.
2103 (the_linux_target): Define as pointer to the_sh_target.
2104 * linux-sparc-low.cc (class sparc_target): New class.
2105 (the_sparc_target): New static object.
2106 (the_linux_target): Define as pointer to the_sparc_target.
2107 * linux-tic6x-low.cc (class tic6x_target): New class.
2108 (the_tic6x_target): New static object.
2109 (the_linux_target): Define as pointer to the_tic6x_target.
2110 * linux-tile-low.cc (class tile_target): New class.
2111 (the_tile_target): New static object.
2112 (the_linux_target): Define as pointer to the_tile_target.
2113 * linux-xtensa-low.cc (class xtensa_target): New class.
2114 (the_xtensa_target): New static object.
2115 (the_linux_target): Define as pointer to the_xtensa_target.
2116
2117 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2118
2119 Turn some static functions in linux-low.cc into private methods of
2120 linux_process_target.
2121
2122 * linux-low.cc (handle_extended_wait): Turn into ...
2123 (linux_process_target::handle_extended_wait): ...this. Call
2124 'mourn' on 'this' object instead of 'the_target'.
2125 (maybe_move_out_of_jump_pad): Turn into...
2126 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2127 (linux_low_filter_event): Turn into...
2128 (linux_process_target::filter_event): ...this.
2129 (linux_wait_for_event_filtered): Turn into...
2130 (linux_process_target::wait_for_event_filtered): ...this.
2131 (linux_wait_for_event): Turn into...
2132 (linux_process_target::wait_for_event): ...this.
2133 (linux_wait_1): Turn into...
2134 (linux_process_target::wait_1): ...this.
2135 (wait_for_sigstop): Turn into...
2136 (linux_process_target::wait_for_sigstop): ...this.
2137 (move_out_of_jump_pad_callback): Turn into...
2138 (linux_process_target::move_out_of_jump_pad): ...this.
2139 (stop_all_lwps): Turn into...
2140 (linux_process_target::stop_all_lwps): ...this.
2141 (start_step_over): Turn into...
2142 (linux_process_target::start_step_over): ...this.
2143 (complete_ongoing_step_over): Turn into...
2144 (linux_process_target::complete_ongoing_step_over): ...this.
2145 (proceed_all_lwps): Turn into...
2146 (linux_process_target::proceed_all_lwps): ...this.
2147 (unstop_all_lwps): Turn into...
2148 (linux_process_target::unstop_all_lwps): ...this.
2149
2150 * linux-low.h (class linux_process_target)
2151 <handle_extended_wait>
2152 <maybe_move_out_of_jump_pad>
2153 filter_event>
2154 <wait_for_event_filtered>
2155 <wait_for_event>
2156 <wait_1>
2157 <wait_for_sigstop>
2158 <move_out_of_jump_pad>
2159 <stop_all_lwps>
2160 <start_step_over>
2161 <complete_ongoing_step_over>
2162 <proceed_all_lwps>
2163 <unstop_all_lwps>: Declare.
2164
2165 Update the callers below.
2166
2167 * linux-low.cc (linux_process_target::attach): Update.
2168 (linux_process_target::stabilize_threads): Ditto.
2169 (linux_process_target::wait): Ditto.
2170
2171 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2172
2173 * linux-low.h (struct linux_target_ops): Update the comment for
2174 'cannot_store_register' to return 0 or 1.
2175 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2176 of 2.
2177
2178 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2179
2180 * config.in: Re-generate.
2181 * configure: Re-generate.
2182
2183 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2184
2185 * regcache.cc (find_register_by_number): Update.
2186 * tdesc.cc (init_target_desc): Likewise.
2187 * tdesc.h (target_desc::reg_defs): Likewise.
2188
2189 2020-03-12 Tom Tromey <tom@tromey.com>
2190
2191 * configure: Rebuild.
2192 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2193 (WIN32APILIBS): New subst.
2194 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2195 gdbsupport files.
2196 (gdbsupport/%.o): Remove target.
2197 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2198 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2199 (WIN32APILIBS): New variable.
2200 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2201 (gdbreplay$(EXEEXT)): Likewise.
2202
2203 2020-03-12 Tom Tromey <tom@tromey.com>
2204
2205 * config.in, configure: Rebuild.
2206 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2207 * acinclude.m4: Include gettext-sister.m4.
2208 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2209 variables.
2210 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2211 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2212
2213 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2214
2215 * acinclude.m4: Update path to selftest.m4.
2216
2217 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2218
2219 * configure.ac: Don't source bfd/development.sh, move
2220 GDB_AC_COMMON higher.
2221 * configure: Re-generate.
2222
2223 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2224
2225 * configure: Re-generate.
2226
2227 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2228
2229 * configure: Re-generate.
2230
2231 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2232
2233 * .dir-locals.el: New file.
2234
2235 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2236
2237 * .gitattributes: New file.
2238
2239 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2240
2241 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2242 reply into an S reply.
2243 * server.cc (disable_packet_T): New global.
2244 (captured_main): Set new global when appropriate.
2245 * server.h (disable_packet_T): Declare.
2246
2247 2020-02-21 Tom Tromey <tom@tromey.com>
2248
2249 * Makefile.in (mostlyclean): New target.
2250
2251 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2252
2253 * target.h (struct process_stratum_target): Remove.
2254 (class process_target): Rename to ...
2255 (class process_stratum_target): ... this.
2256 * linux-low.h (class linux_process_target): Derive from
2257 'process_stratum_target'.
2258 * linux-low.cc (linux_target_ops): Remove.
2259 (initialize_low): Set the_target to the singleton instance of
2260 linux_process_target.
2261 * lynx-low.h (class lynx_process_target): Derive from
2262 'process_stratum_target'.
2263 * lynx-low.cc (lynx_target_ops): Remove.
2264 (initialize_low): Set the_target to the singleton instance of
2265 lynx_process_target.
2266 * nto-low.h (class nto_process_target): Derive from
2267 'process_stratum_target'.
2268 * nto-low.cc (nto_target_ops): Remove.
2269 (initialize_low): Set the_target to the singleton instance of
2270 nto_process_target.
2271 * win32-low.h (class win32_process_target): Derive from
2272 'process_stratum_target'.
2273 * win32-low.cc (win32_target_ops): Remove.
2274 (initialize_low): Set the_target to the singleton instance of
2275 win32_process_target.
2276
2277 Replace 'the_target->pt' with 'the_target' in the uses below.
2278
2279 * hostio.cc (hostio_error)
2280 (handle_setfs)
2281 (handle_open)
2282 (handle_unlink)
2283 (handle_readlink)
2284 * linux-aarch32-low.cc (arm_breakpoint_at)
2285 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2286 * linux-arm-low.cc (arm_sigreturn_next_pc)
2287 (arm_get_hwcap)
2288 (arm_get_syscall_trapinfo)
2289 * linux-cris-low.cc (cris_breakpoint_at)
2290 * linux-crisv32-low.cc (cris_breakpoint_at)
2291 * linux-low.cc (handle_extended_wait)
2292 (linux_wait_1)
2293 (linux_read_memory)
2294 (linux_process_target::breakpoint_kind_from_pc)
2295 (linux_get_auxv)
2296 * linux-m32r-low.cc (m32r_breakpoint_at)
2297 * linux-mips-low.cc (mips_breakpoint_at)
2298 * linux-nios2-low.cc (nios2_breakpoint_at)
2299 * linux-ppc-low.cc (ppc_breakpoint_at)
2300 * linux-s390-low.cc (s390_get_hwcap)
2301 * linux-sh-low.cc (sh_breakpoint_at)
2302 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2303 (sparc_store_gregset_from_stack)
2304 (sparc_breakpoint_at)
2305 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2306 * linux-tile-low.cc (tile_breakpoint_at)
2307 * linux-x86-low.cc (x86_breakpoint_at)
2308 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2309 * mem-break.cc (bp_size)
2310 (bp_opcode)
2311 (insert_memory_breakpoint)
2312 (set_raw_breakpoint_at)
2313 (delete_raw_breakpoint)
2314 (z_type_supported)
2315 (uninsert_raw_breakpoint)
2316 (reinsert_raw_breakpoint)
2317 (validate_inserted_breakpoint)
2318 * regcache.cc (regcache_read_pc)
2319 (regcache_write_pc)
2320 * remote-utils.cc (putpkt_binary_1)
2321 (input_interrupt)
2322 (getpkt)
2323 (prepare_resume_reply)
2324 * server.cc (handle_general_set)
2325 (handle_detach)
2326 (handle_qxfer_auxv)
2327 (handle_qxfer_exec_file)
2328 (handle_qxfer_libraries_svr4)
2329 (handle_qxfer_osdata)
2330 (handle_qxfer_siginfo)
2331 (handle_qxfer_fdpic)
2332 (handle_query)
2333 (resume)
2334 (handle_v_requests)
2335 (queue_stop_reply_callback)
2336 (captured_main)
2337 * target.cc (prepare_to_access_memory)
2338 (done_accessing_memory)
2339 (read_inferior_memory)
2340 (target_write_memory)
2341 (target_stop_and_wait)
2342 (target_wait)
2343 (target_mourn_inferior)
2344 (target_continue_no_signal)
2345 (target_continue)
2346 (target_supports_multi_process)
2347 (kill_inferior)
2348 * target.h
2349 (target_create_inferior)
2350 (target_post_create_inferior)
2351 (myattach)
2352 (target_supports_fork_events)
2353 (target_supports_vfork_events)
2354 (target_supports_exec_events)
2355 (target_handle_new_gdb_connection)
2356 (detach_inferior)
2357 (mythread_alive)
2358 (fetch_inferior_registers)
2359 (store_inferior_registers)
2360 (join_inferior)
2361 (target_supports_non_stop)
2362 (target_async)
2363 (target_process_qsupported)
2364 (target_supports_catch_syscall)
2365 (target_get_ipa_tdesc_idx)
2366 (target_supports_tracepoints)
2367 (target_supports_fast_tracepoints)
2368 (target_get_min_fast_tracepoint_insn_len)
2369 (target_thread_stopped)
2370 (target_pause_all)
2371 (target_unpause_all)
2372 (target_stabilize_threads)
2373 (target_install_fast_tracepoint_jump_pad)
2374 (target_emit_ops)
2375 (target_supports_disable_randomization)
2376 (target_supports_agent)
2377 (target_enable_btrace)
2378 (target_disable_btrace)
2379 (target_read_btrace)
2380 (target_read_btrace_conf)
2381 (target_supports_range_stepping)
2382 (target_supports_stopped_by_sw_breakpoint)
2383 (target_stopped_by_sw_breakpoint)
2384 (target_supports_stopped_by_hw_breakpoint)
2385 (target_supports_hardware_single_step)
2386 (target_stopped_by_hw_breakpoint)
2387 (target_breakpoint_kind_from_pc)
2388 (target_breakpoint_kind_from_current_state)
2389 (target_supports_software_single_step)
2390 (target_core_of_thread)
2391 (target_thread_name)
2392 (target_thread_handle)
2393 * win32-low.cc (do_initial_child_stuff)
2394
2395 Rename target op default definitions listed below.
2396
2397 * target.cc (process_target::post_create_inferior): Rename as ...
2398 (process_stratum_target::post_create_inferior): ... this.
2399 (process_target::prepare_to_access_memory): Rename as ...
2400 (process_stratum_target::prepare_to_access_memory): ... this.
2401 (process_target::done_accessing_memory): Rename as ...
2402 (process_stratum_target::done_accessing_memory): ... this.
2403 (process_target::look_up_symbols): Rename as ...
2404 (process_stratum_target::look_up_symbols): ... this.
2405 (process_target::supports_read_auxv): Rename as ...
2406 (process_stratum_target::supports_read_auxv): ... this.
2407 (process_target::read_auxv): Rename as ...
2408 (process_stratum_target::read_auxv): ... this.
2409 (process_target::supports_z_point_type): Rename as ...
2410 (process_stratum_target::supports_z_point_type): ... this.
2411 (process_target::insert_point): Rename as ...
2412 (process_stratum_target::insert_point): ... this.
2413 (process_target::remove_point): Rename as ...
2414 (process_stratum_target::remove_point): ... this.
2415 (process_target::stopped_by_sw_breakpoint): Rename as ...
2416 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2417 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2418 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2419 (process_target::stopped_by_hw_breakpoint): Rename as ...
2420 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2421 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2422 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2423 (process_target::supports_hardware_single_step): Rename as ...
2424 (process_stratum_target::supports_hardware_single_step): ... this.
2425 (process_target::stopped_by_watchpoint): Rename as ...
2426 (process_stratum_target::stopped_by_watchpoint): ... this.
2427 (process_target::stopped_data_address): Rename as ...
2428 (process_stratum_target::stopped_data_address): ... this.
2429 (process_target::supports_read_offsets): Rename as ...
2430 (process_stratum_target::supports_read_offsets): ... this.
2431 (process_target::read_offsets): Rename as ...
2432 (process_stratum_target::read_offsets): ... this.
2433 (process_target::supports_get_tls_address): Rename as ...
2434 (process_stratum_target::supports_get_tls_address): ... this.
2435 (process_target::get_tls_address): Rename as ...
2436 (process_stratum_target::get_tls_address): ... this.
2437 (process_target::hostio_last_error): Rename as ...
2438 (process_stratum_target::hostio_last_error): ... this.
2439 (process_target::supports_qxfer_osdata): Rename as ...
2440 (process_stratum_target::supports_qxfer_osdata): ... this.
2441 (process_target::qxfer_osdata): Rename as ...
2442 (process_stratum_target::qxfer_osdata): ... this.
2443 (process_target::supports_qxfer_siginfo): Rename as ...
2444 (process_stratum_target::supports_qxfer_siginfo): ... this.
2445 (process_target::qxfer_siginfo): Rename as ...
2446 (process_stratum_target::qxfer_siginfo): ... this.
2447 (process_target::supports_non_stop): Rename as ...
2448 (process_stratum_target::supports_non_stop): ... this.
2449 (process_target::async): Rename as ...
2450 (process_stratum_target::async): ... this.
2451 (process_target::start_non_stop): Rename as ...
2452 (process_stratum_target::start_non_stop): ... this.
2453 (process_target::supports_multi_process): Rename as ...
2454 (process_stratum_target::supports_multi_process): ... this.
2455 (process_target::supports_fork_events): Rename as ...
2456 (process_stratum_target::supports_fork_events): ... this.
2457 (process_target::supports_vfork_events): Rename as ...
2458 (process_stratum_target::supports_vfork_events): ... this.
2459 (process_target::supports_exec_events): Rename as ...
2460 (process_stratum_target::supports_exec_events): ... this.
2461 (process_target::handle_new_gdb_connection): Rename as ...
2462 (process_stratum_target::handle_new_gdb_connection): ... this.
2463 (process_target::handle_monitor_command): Rename as ...
2464 (process_stratum_target::handle_monitor_command): ... this.
2465 (process_target::core_of_thread): Rename as ...
2466 (process_stratum_target::core_of_thread): ... this.
2467 (process_target::supports_read_loadmap): Rename as ...
2468 (process_stratum_target::supports_read_loadmap): ... this.
2469 (process_target::read_loadmap): Rename as ...
2470 (process_stratum_target::read_loadmap): ... this.
2471 (process_target::process_qsupported): Rename as ...
2472 (process_stratum_target::process_qsupported): ... this.
2473 (process_target::supports_tracepoints): Rename as ...
2474 (process_stratum_target::supports_tracepoints): ... this.
2475 (process_target::read_pc): Rename as ...
2476 (process_stratum_target::read_pc): ... this.
2477 (process_target::write_pc): Rename as ...
2478 (process_stratum_target::write_pc): ... this.
2479 (process_target::supports_thread_stopped): Rename as ...
2480 (process_stratum_target::supports_thread_stopped): ... this.
2481 (process_target::thread_stopped): Rename as ...
2482 (process_stratum_target::thread_stopped): ... this.
2483 (process_target::supports_get_tib_address): Rename as ...
2484 (process_stratum_target::supports_get_tib_address): ... this.
2485 (process_target::get_tib_address): Rename as ...
2486 (process_stratum_target::get_tib_address): ... this.
2487 (process_target::pause_all): Rename as ...
2488 (process_stratum_target::pause_all): ... this.
2489 (process_target::unpause_all): Rename as ...
2490 (process_stratum_target::unpause_all): ... this.
2491 (process_target::stabilize_threads): Rename as ...
2492 (process_stratum_target::stabilize_threads): ... this.
2493 (process_target::supports_fast_tracepoints): Rename as ...
2494 (process_stratum_target::supports_fast_tracepoints): ... this.
2495 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2496 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2497 (process_target::emit_ops): Rename as ...
2498 (process_stratum_target::emit_ops): ... this.
2499 (process_target::supports_disable_randomization): Rename as ...
2500 (process_stratum_target::supports_disable_randomization): ... this.
2501 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2502 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2503 (process_target::qxfer_libraries_svr4): Rename as ...
2504 (process_stratum_target::qxfer_libraries_svr4): ... this.
2505 (process_target::supports_agent): Rename as ...
2506 (process_stratum_target::supports_agent): ... this.
2507 (process_target::enable_btrace): Rename as ...
2508 (process_stratum_target::enable_btrace): ... this.
2509 (process_target::disable_btrace): Rename as ...
2510 (process_stratum_target::disable_btrace): ... this.
2511 (process_target::read_btrace): Rename as ...
2512 (process_stratum_target::read_btrace): ... this.
2513 (process_target::read_btrace_conf): Rename as ...
2514 (process_stratum_target::read_btrace_conf): ... this.
2515 (process_target::supports_range_stepping): Rename as ...
2516 (process_stratum_target::supports_range_stepping): ... this.
2517 (process_target::supports_pid_to_exec_file): Rename as ...
2518 (process_stratum_target::supports_pid_to_exec_file): ... this.
2519 (process_target::pid_to_exec_file): Rename as ...
2520 (process_stratum_target::pid_to_exec_file): ... this.
2521 (process_target::supports_multifs): Rename as ...
2522 (process_stratum_target::supports_multifs): ... this.
2523 (process_target::multifs_open): Rename as ...
2524 (process_stratum_target::multifs_open): ... this.
2525 (process_target::multifs_unlink): Rename as ...
2526 (process_stratum_target::multifs_unlink): ... this.
2527 (process_target::multifs_readlink): Rename as ...
2528 (process_stratum_target::multifs_readlink): ... this.
2529 (process_target::breakpoint_kind_from_pc): Rename as ...
2530 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2531 (process_target::breakpoint_kind_from_current_state): Rename as ...
2532 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2533 (process_target::thread_name): Rename as ...
2534 (process_stratum_target::thread_name): ... this.
2535 (process_target::thread_handle): Rename as ...
2536 (process_stratum_target::thread_handle): ... this.
2537 (process_target::supports_software_single_step): Rename as ...
2538 (process_stratum_target::supports_software_single_step): ... this.
2539 (process_target::supports_catch_syscall): Rename as ...
2540 (process_stratum_target::supports_catch_syscall): ... this.
2541 (process_target::get_ipa_tdesc_idx): Rename as ...
2542 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2543
2544 2020-02-20 Pedro Alves <palves@redhat.com>
2545
2546 * target.cc (set_target_ops): Simply copy the given target pointer
2547 instead of creating a copy of the pointed object.
2548
2549 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2550
2551 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2552 of process_target.
2553
2554 * target.h (struct process_stratum_target): Remove the target op.
2555 (class process_target): Add the target op.
2556 (target_get_ipa_tdesc_idx): Update the macro.
2557 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2558
2559 Update the derived classes and callers below.
2560
2561 * linux-low.cc (linux_target_ops): Update.
2562 (linux_get_ipa_tdesc_idx): Turn into ...
2563 (linux_process_target::get_ipa_tdesc_idx): ... this.
2564 * linux-low.h (class linux_process_target): Update.
2565 * lynx-low.cc (lynx_target_ops): Update.
2566 * nto-low.cc (nto_target_ops): Update.
2567 * win32-low.cc (win32_target_ops): Update.
2568
2569 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2570
2571 Turn process_stratum_target's supports_catch_syscall op into a
2572 method of process_target.
2573
2574 * target.h (struct process_stratum_target): Remove the target op.
2575 (class process_target): Add the target op.
2576 (target_supports_catch_syscall): Update the macro.
2577 * target.cc (process_target::supports_catch_syscall): Define.
2578
2579 Update the derived classes and callers below.
2580
2581 * linux-low.cc (linux_target_ops): Update.
2582 (linux_supports_catch_syscall): Turn into ...
2583 (linux_process_target::supports_catch_syscall): ... this.
2584 * linux-low.h (class linux_process_target): Update.
2585 * lynx-low.cc (lynx_target_ops): Update.
2586 * nto-low.cc (nto_target_ops): Update.
2587 * win32-low.cc (win32_target_ops): Update.
2588
2589 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2590
2591 Turn process_stratum_target's supports_software_single_step op
2592 into a method of process_target.
2593
2594 * target.h (struct process_stratum_target): Remove the target op.
2595 (class process_target): Add the target op.
2596 (target_supports_software_single_step): Update the macro.
2597 * target.cc (process_target::supports_software_single_step): Define.
2598
2599 Update the derived classes and callers below.
2600
2601 * linux-low.cc (linux_target_ops): Update.
2602 (linux_supports_software_single_step): Turn into ...
2603 (linux_process_target::supports_software_single_step): ... this.
2604 * linux-low.h (class linux_process_target): Update.
2605 * lynx-low.cc (lynx_target_ops): Update.
2606 * nto-low.cc (nto_target_ops): Update.
2607 * win32-low.cc (win32_target_ops): Update.
2608
2609 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2610
2611 Turn process_stratum_target's thread_name and thread_handle ops
2612 into methods of process_target.
2613
2614 * target.h (struct process_stratum_target): Remove the target ops.
2615 (class process_target): Add the target ops.
2616 (target_thread_name): Update the macro.
2617 (target_thread_handle): Update the macro.
2618 * target.cc (process_target::thread_name): Define.
2619 (process_target::thread_handle): Define.
2620
2621 Update the derived classes and callers below.
2622
2623 * linux-low.cc (linux_target_ops): Update.
2624 (linux_process_target::thread_name): Define.
2625 (linux_process_target::thread_handle): Define.
2626 * linux-low.h (class linux_process_target): Update.
2627 * lynx-low.cc (lynx_target_ops): Update.
2628 * nto-low.cc (nto_target_ops): Update.
2629 * win32-low.cc (win32_target_ops): Update.
2630
2631 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2632
2633 Turn process_stratum_target's breakpoint_kind_from_pc,
2634 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2635 ops into methods of process_target.
2636
2637 * target.h (struct process_stratum_target): Remove the target op.
2638 (class process_target): Add the target op.
2639 (target_breakpoint_kind_from_pc): Update the macro.
2640 (target_breakpoint_kind_from_current_state): Update the macro.
2641 (default_breakpoint_kind_from_pc): Remove declaration.
2642 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2643 (process_target::breakpoint_kind_from_pc): ... this.
2644 (process_target::breakpoint_kind_from_current_state): Define.
2645
2646 Update the derived classes and callers below.
2647
2648 * mem-break.cc (bp_size): Update.
2649 (bp_opcode): Update.
2650 * linux-low.cc (linux_target_ops): Update.
2651 (linux_wait_1): Update.
2652 (linux_breakpoint_kind_from_pc): Turn into ...
2653 (linux_process_target::breakpoint_kind_from_pc): ... this.
2654 (linux_sw_breakpoint_from_kind): Turn into ...
2655 (linux_process_target::sw_breakpoint_from_kind): ... this.
2656 (linux_breakpoint_kind_from_current_state): Turn into ...
2657 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2658 * linux-low.h (class linux_process_target): Update.
2659 * lynx-low.cc (lynx_target_ops): Update.
2660 (lynx_process_target::sw_breakpoint_from_kind): Define.
2661 * lynx-low.h (class lynx_process_target): Update.
2662 * nto-low.cc (nto_target_ops): Update.
2663 (nto_sw_breakpoint_from_kind): Turn into ...
2664 (nto_process_target::sw_breakpoint_from_kind): ... this.
2665 * nto-low.h (class nto_process_target): Update.
2666 * win32-low.cc (win32_target_ops): Update.
2667 (win32_sw_breakpoint_from_kind): Turn into ...
2668 (win32_process_target::sw_breakpoint_from_kind): ... this.
2669 * win32-low.h (class win32_process_target): Update.
2670
2671 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2672
2673 Turn process_stratum_target's multifs_open, multifs_readlink,
2674 multifs_unlink ops into methods of process_target.
2675
2676 * target.h (struct process_stratum_target): Remove the target ops.
2677 (class process_target): Add the target ops. Also add
2678 'supports_multifs'.
2679 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2680 "sys/stat.h".
2681 (process_target::supports_multifs): Define.
2682 (process_target::multifs_open): Define.
2683 (process_target::multifs_readlink): Define.
2684 (process_target::multifs_unlink): Define.
2685
2686 Update the derived classes and callers below.
2687
2688 * hostio.cc (handle_setfs): Update.
2689 (handle_open): Update.
2690 (handle_unlink): Update.
2691 (handle_readlink): Update.
2692 * linux-low.cc (linux_target_ops): Update.
2693 (linux_process_target::supports_multifs): Define.
2694 (linux_process_target::multifs_open): Define.
2695 (linux_process_target::multifs_readlink): Define.
2696 (linux_process_target::multifs_unlink): Define.
2697 * linux-low.h (class linux_process_target): Update.
2698 * lynx-low.cc (lynx_target_ops): Update.
2699 * nto-low.cc (nto_target_ops): Update.
2700 * win32-low.cc (win32_target_ops): Update.
2701
2702 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2703
2704 Turn process_stratum_target's pid_to_exec_file op into a method
2705 of process_target.
2706
2707 * target.h (struct process_stratum_target): Remove the target op.
2708 (class process_target): Add the target op. Also add
2709 'supports_pid_to_exec_file'.
2710 * target.cc (process_target::pid_to_exec_file): Define.
2711 (process_target::supports_pid_to_exec_file): Define.
2712
2713 Update the derived classes and callers below.
2714
2715 * server.cc (handle_qxfer_exec_file): Update.
2716 (handle_query): Update.
2717 * linux-low.cc (linux_target_ops): Update.
2718 (linux_process_target::supports_pid_to_exec_file): Define.
2719 (linux_process_target::pid_to_exec_file): Define.
2720 * linux-low.h (class linux_process_target): Update.
2721 * lynx-low.cc (lynx_target_ops): Update.
2722 * nto-low.cc (nto_target_ops): Update.
2723 * win32-low.cc (win32_target_ops): Update.
2724
2725 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2726
2727 Turn process_stratum_target's supports_range_stepping op into a
2728 method of process_target.
2729
2730 * target.h (struct process_stratum_target): Remove the target op.
2731 (class process_target): Add the target op.
2732 (target_supports_range_stepping): Update the macro.
2733 * target.cc (process_target::supports_range_stepping): Define.
2734
2735 Update the derived classes and callers below.
2736
2737 * linux-low.cc (linux_target_ops): Update.
2738 (linux_supports_range_stepping): Turn into ...
2739 (linux_process_target::supports_range_stepping): ... this.
2740 * linux-low.h (class linux_process_target): Update.
2741 * lynx-low.cc (lynx_target_ops): Update.
2742 * nto-low.cc (nto_target_ops): Update.
2743 * win32-low.cc (win32_target_ops): Update.
2744
2745 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2746
2747 Turn process_stratum_target's btrace-related ops (enable_btrace,
2748 disable_btrace, read_btrace, read_btrace_conf) into methods of
2749 process_target.
2750
2751 * target.h (struct process_stratum_target): Remove the target ops.
2752 (class process_target): Add the target ops.
2753 (target_enable_btrace): Update.
2754 (target_disable_btrace): Update.
2755 (target_read_btrace): Update.
2756 (target_read_btrace_conf): Update.
2757 * target.cc (process_target::enable_btrace): Define.
2758 (process_target::disable_btrace): Define.
2759 (process_target::read_btrace): Define.
2760 (process_target::read_btrace_conf): Define.
2761
2762 Update the derived classes and callers below.
2763
2764 * linux-low.cc (linux_target_ops): Update.
2765 (linux_process_target:enable_btrace): Define as a wrapper around
2766 linux_enable_btrace.
2767 (linux_low_disable_btrace): Turn into ...
2768 (linux_process_target::disable_btrace): ... this.
2769 (linux_low_read_btrace): Turn into ...
2770 (linux_process_target::read_btrace): ... this.
2771 (linux_low_btrace_conf): Turn into ...
2772 (linux_process_target::read_btrace_conf): ... this.
2773 * linux-low.h (class linux_process_target): Update.
2774 * lynx-low.cc (lynx_target_ops): Update.
2775 * nto-low.cc (nto_target_ops): Update.
2776 * win32-low.cc (win32_target_ops): Update.
2777
2778 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2779
2780 Turn process_stratum_target's supports_agent op into a method of
2781 process_target.
2782
2783 * target.h (struct process_stratum_target): Remove the target op.
2784 (class process_target): Add the target op.
2785 (target_supports_agent): Update the macro.
2786 * target.cc (process_target::supports_agent): Define.
2787
2788 Update the derived classes and callers below.
2789
2790 * linux-low.cc (linux_target_ops): Update.
2791 (linux_supports_agent): Turn into ...
2792 (linux_process_target::supports_agent): ... this.
2793 * linux-low.h (class linux_process_target): Update.
2794 * lynx-low.cc (lynx_target_ops): Update.
2795 * nto-low.cc (nto_target_ops): Update.
2796 * win32-low.cc (win32_target_ops): Update.
2797
2798 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2799
2800 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2801 method of process_target.
2802
2803 * target.h (struct process_stratum_target): Remove the target op.
2804 (class process_target): Add the target op. Also add
2805 'supports_qxfer_libraries_svr4'.
2806 * target.cc (process_target::qxfer_libraries_svr4): Define.
2807 (process_target::supports_qxfer_libraries_svr4): Define.
2808
2809 Update the derived classes and callers below.
2810
2811 * server.cc (handle_qxfer_libraries_svr4): Update.
2812 (handle_query): Update.
2813 * linux-low.cc (linux_target_ops): Update.
2814 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2815 (linux_qxfer_libraries_svr4): Turn into ...
2816 (linux_process_target::qxfer_libraries_svr4): ... this.
2817 * linux-low.h (class linux_process_target): Update.
2818 * lynx-low.cc (lynx_target_ops): Update.
2819 * nto-low.cc (nto_target_ops): Update.
2820 * win32-low.cc (win32_target_ops): Update.
2821
2822 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2823
2824 Turn process_stratum_target's supports_disable_randomization op
2825 into a method of process_target.
2826
2827 * target.h (struct process_stratum_target): Remove the target op.
2828 (class process_target): Add the target op.
2829 (target_supports_disable_randomization): Update the macro.
2830 * target.cc (process_target::supports_disable_randomization): Define.
2831
2832 Update the derived classes and callers below.
2833
2834 * linux-low.cc (linux_target_ops): Update.
2835 (linux_supports_disable_randomization): Turn into ...
2836 (linux_process_target::supports_disable_randomization): ... this.
2837 * linux-low.h (class linux_process_target): Update.
2838 * lynx-low.cc (lynx_target_ops): Update.
2839 * nto-low.cc (nto_target_ops): Update.
2840 * win32-low.cc (win32_target_ops): Update.
2841
2842 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2843
2844 Turn process_stratum_target's emit_ops op into a method of
2845 process_target.
2846
2847 * target.h (struct process_stratum_target): Remove the target op.
2848 (class process_target): Add the target op.
2849 (target_emit_ops): Update the macro.
2850 * target.cc (process_target::emit_ops): Define.
2851
2852 Update the derived classes and callers below.
2853
2854 * linux-low.cc (linux_target_ops): Update.
2855 (linux_emit_ops): Turn into ...
2856 (linux_process_target::emit_ops): ... this.
2857 * linux-low.h (class linux_process_target): Update.
2858 * lynx-low.cc (lynx_target_ops): Update.
2859 * nto-low.cc (nto_target_ops): Update.
2860 * win32-low.cc (win32_target_ops): Update.
2861
2862 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2863
2864 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2865 and get_min_fast_tracepoint_insn_len ops into methods of
2866 process_target.
2867
2868 * target.h (struct process_stratum_target): Remove the target ops.
2869 (class process_target): Add the target ops. Also add
2870 'supports_fast_tracepoints'.
2871 (target_supports_fast_tracepoints): Update the macro.
2872 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2873 (install_fast_tracepoint_jump_pad): Update and rename the macro
2874 to ...
2875 (target_install_fast_tracepoint_jump_pad): ... this.
2876 * target.cc (process_target::supports_fast_tracepoints): Define.
2877 (process_target::install_fast_tracepoint_jump_pad): Define.
2878 (process_target::get_min_fast_tracepoint_insn_len): Define.
2879
2880 Update the derived classes and callers below.
2881
2882 * tracepoint.cc (install_fast_tracepoint): Update.
2883 * linux-low.cc (linux_target_ops): Update.
2884 (linux_process_target::supports_fast_tracepoints): Define.
2885 (linux_install_fast_tracepoint_jump_pad): Turn into ...
2886 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
2887 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
2888 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
2889 * linux-low.h (class linux_process_target): Update.
2890 * lynx-low.cc (lynx_target_ops): Update.
2891 * nto-low.cc (nto_target_ops): Update.
2892 * win32-low.cc (win32_target_ops): Update.
2893
2894 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2895
2896 Turn process_stratum_target's stabilize_threads op into a
2897 method of process_target.
2898
2899 * target.h (struct process_stratum_target): Remove the target op.
2900 (class process_target): Add the target op.
2901 (target_stabilize_threads): Update the macro.
2902 * target.cc (process_target::stabilize_threads): Define.
2903
2904 Update the derived classes and callers below.
2905
2906 * server.cc (handle_status): Update.
2907 * tracepoint.cc (cmd_qtdp): Update.
2908 (cmd_qtstart): Update.
2909 * linux-low.cc (linux_target_ops): Update.
2910 (linux_stabilize_threads): Turn into ...
2911 (linux_process_target::stabilize_threads): ... this.
2912 (linux_wait_1): Update.
2913 * linux-low.h (class linux_process_target): Update.
2914 * lynx-low.cc (lynx_target_ops): Update.
2915 * nto-low.cc (nto_target_ops): Update.
2916 * win32-low.cc (win32_target_ops): Update.
2917
2918 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2919
2920 Turn process_stratum_target's pause_all and unpause_all ops
2921 into methods of process_target.
2922
2923 * target.h (struct process_stratum_target): Remove the target ops.
2924 (class process_target): Add the target ops.
2925 (pause_all): Update the macro and rename to...
2926 (target_pause_all): ... this.
2927 (unpause_all): Update the macro and rename to...
2928 (target_unpause_all): ... this.
2929 * target.cc (process_target::pause_all): Define.
2930 (process_target::unpause_all): Define.
2931
2932 Update the derived classes and callers below.
2933
2934 * server.cc (handle_status): Update.
2935 * tracepoint.cc (clear_installed_tracepoints): Update.
2936 (cmd_qtdp): Update.
2937 (cmd_qtstart): Update.
2938 (stop_tracing): Update.
2939 (cmd_qtstatus): Update.
2940 (upload_fast_traceframes): Update.
2941 (run_inferior_command): Update.
2942 * linux-low.cc (linux_target_ops): Update.
2943 (linux_pause_all): Turn into ...
2944 (linux_process_target::pause_all): ... this.
2945 (linux_unpause_all): Turn into ...
2946 (linux_process_target::unpause_all): ... this.
2947 (linux_process_target::prepare_to_access_memory): Update.
2948 (linux_process_target::done_accessing_memory): Update.
2949 * linux-low.h (class linux_process_target): Update.
2950 * lynx-low.cc (lynx_target_ops): Update.
2951 * nto-low.cc (nto_target_ops): Update.
2952 * win32-low.cc (win32_target_ops): Update.
2953
2954 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2955
2956 Turn process_stratum_target's get_tib_address op into a method of
2957 process_target.
2958
2959 * target.h (struct process_stratum_target): Remove the target op.
2960 (class process_target): Add the target op. Also add
2961 'supports_get_tib_address'.
2962 * target.cc (process_target::get_tib_address): Define.
2963 (process_target::supports_get_tib_address): Define.
2964
2965 Update the derived classes and callers below.
2966
2967 * server.cc (handle_query): Update.
2968 * linux-low.cc (win32_target_ops): Update.
2969 * lynx-low.cc (lynx_target_ops): Update.
2970 * nto-low.cc (nto_target_ops): Update.
2971 * win32-low.cc (win32_target_ops): Update.
2972 (win32_process_target::supports_get_tib_address): Define.
2973 (win32_get_tib_address): Turn into ...
2974 (win32_process_target::get_tib_address): ... this.
2975 * win32-low.h (class win32_process_target): Update.
2976
2977 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2978
2979 Turn process_stratum_target's thread_stopped op into a method of
2980 process_target.
2981
2982 * target.h (struct process_stratum_target): Remove the target op.
2983 (class process_target): Add the target op. Also add
2984 'supports_thread_stopped'.
2985 (target_thread_stopped): Update the macro.
2986 * target.cc (process_target::thread_stopped): Define.
2987 (process_target::supports_thread_stopped): Define.
2988 (prepare_to_access_memory): Update.
2989
2990 Update the derived classes and callers below.
2991
2992 * server.cc (queue_stop_reply_callback): Update.
2993 * linux-low.cc (linux_target_ops): Update.
2994 (linux_process_target::supports_thread_stopped): Define.
2995 (linux_thread_stopped): Turn into ...
2996 (linux_process_target::thread_stopped): ... this.
2997 * linux-low.h (class linux_process_target): Update.
2998 * lynx-low.cc (lynx_target_ops): Update.
2999 * nto-low.cc (nto_target_ops): Update.
3000 * win32-low.cc (win32_target_ops): Update.
3001
3002 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3003
3004 Turn process_stratum_target's read_pc and write_pc ops into
3005 methods of process_target.
3006
3007 * target.h (struct process_stratum_target): Remove the target ops.
3008 (class process_target): Add the target ops.
3009 * target.cc (process_target::read_pc): Define.
3010 (process_target::write_pc): Define.
3011
3012 Update the derived classes and callers below.
3013
3014 * regcache.cc (regcache_read_pc): Update.
3015 (regcache_write_pc): Update.
3016 * linux-low.cc (linux_target_ops): Update.
3017 (linux_read_pc): Turn into ...
3018 (linux_process_target::read_pc): ... this.
3019 (linux_write_pc): Turn into ...
3020 (linux_process_target::write_pc): ... this.
3021 * linux-low.h (class linux_process_target): Update.
3022 * lynx-low.cc (lynx_target_ops): Update.
3023 * nto-low.cc (nto_target_ops): Update.
3024 * win32-low.cc (win32_target_ops): Update.
3025
3026 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3027
3028 Turn process_stratum_target's supports_tracepoints op into a
3029 method of process_target.
3030
3031 * target.h (struct process_stratum_target): Remove the target op.
3032 (class process_target): Add the target op.
3033 (target_supports_tracepoints): Update the macro.
3034 * target.cc (process_target::supports_tracepoints): Define.
3035
3036 Update the derived classes and callers below.
3037
3038 * linux-low.cc (linux_target_ops): Update.
3039 (linux_supports_tracepoints): Turn into ...
3040 (linux_process_target::supports_tracepoints): ... this.
3041 * linux-low.h (class linux_process_target): Update.
3042 * lynx-low.cc (lynx_target_ops): Update.
3043 * nto-low.cc (nto_target_ops): Update.
3044 * win32-low.cc (win32_target_ops): Update.
3045
3046 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3047
3048 Turn process_stratum_target's process_qsupported op into a method
3049 of process_target.
3050
3051 * target.h (struct process_stratum_target): Remove the target op.
3052 (class process_target): Add the target op.
3053 (target_process_qsupported): Update the macro.
3054 * target.cc (process_target::process_qsupported): Define.
3055
3056 Update the derived classes and callers below.
3057
3058 * linux-low.cc (linux_target_ops): Update.
3059 (linux_process_qsupported): Turn into ...
3060 (linux_process_target::process_qsupported): ... this.
3061 * linux-low.h (class linux_process_target): Update.
3062 * lynx-low.cc (lynx_target_ops): Update.
3063 * nto-low.cc (nto_target_ops): Update.
3064 * win32-low.cc (win32_target_ops): Update.
3065
3066 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3067
3068 Turn process_stratum_target's read_loadmap op into a method of
3069 process_target.
3070
3071 * target.h (struct process_stratum_target): Remove the target op.
3072 (class process_target): Add the target op. Also add
3073 'supports_read_loadmap'.
3074 * target.cc (process_target::read_loadmap): Define.
3075 (process_target::supports_read_loadmap): Define.
3076
3077 Update the derived classes and callers below.
3078
3079 * server.cc (handle_qxfer_fdpic): Update.
3080 (handle_query): Update.
3081 * linux-low.cc (linux_target_ops): Update.
3082 (linux_process_target::supports_read_loadmap): Define.
3083 (linux_read_loadmap): Turn into ...
3084 (linux_process_target::read_loadmap): ... this.
3085 * linux-low.h (class linux_process_target): Update.
3086 * lynx-low.cc (lynx_target_ops): Update.
3087 * nto-low.cc (nto_target_ops): Update.
3088 * win32-low.cc (win32_target_ops): Update.
3089
3090 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3091
3092 Turn process_stratum_target's core_of_thread op into a method of
3093 process_target.
3094
3095 * target.h (struct process_stratum_target): Remove the target op.
3096 (class process_target): Add the target op.
3097 (target_core_of_thread): Update the macro.
3098 * target.cc (process_target::core_of_thread): Define.
3099
3100 Update the derived classes and callers below.
3101
3102 * linux-low.cc (linux_target_ops): Update.
3103 (linux_process_target::core_of_thread): Define.
3104 * linux-low.h (class linux_process_target): Update.
3105 * lynx-low.cc (lynx_target_ops): Update.
3106 * nto-low.cc (nto_target_ops): Update.
3107 * win32-low.cc (win32_target_ops): Update.
3108
3109 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3110
3111 Turn process_stratum_target's handle_monitor_command op into a
3112 method of process_target.
3113
3114 * target.h (struct process_stratum_target): Remove the target op.
3115 (class process_target): Add the target op.
3116 (target_handle_monitor_command): Update the macro.
3117 * target.cc (process_target::handle_monitor_command): Define.
3118
3119 Update the derived classes and callers below.
3120
3121 * server.cc (handle_query): Update.
3122 * linux-low.cc (linux_target_ops): Update.
3123 (linux_process_target::handle_monitor_command): Define.
3124 * linux-low.h (class linux_process_target): Update.
3125 * lynx-low.cc (lynx_target_ops): Update.
3126 * nto-low.cc (nto_target_ops): Update.
3127 * win32-low.cc (win32_target_ops): Update.
3128
3129 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3130
3131 Turn process_stratum_target's handle_new_gdb_connection op into a
3132 method of process_target.
3133
3134 * target.h (struct process_stratum_target): Remove the target op.
3135 (class process_target): Add the target op.
3136 (target_handle_new_gdb_connection): Update the macro.
3137 * target.cc (process_target::handle_new_gdb_connection): Define.
3138
3139 Update the derived classes and callers below.
3140
3141 * linux-low.cc (linux_target_ops): Update.
3142 (linux_handle_new_gdb_connection): Turn into ...
3143 (linux_process_target::handle_new_gdb_connection): ... this.
3144 * linux-low.h (class linux_process_target): Update.
3145 * lynx-low.cc (lynx_target_ops): Update.
3146 * nto-low.cc (nto_target_ops): Update.
3147 * win32-low.cc (win32_target_ops): Update.
3148
3149 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3150
3151 Turn process_stratum_target's supports_fork_events,
3152 supports_vfork_events, and supports_exec_events ops into methods
3153 of process_target.
3154
3155 * target.h (struct process_stratum_target): Remove the target ops.
3156 (class process_target): Add the target ops.
3157 (target_supports_fork_events): Update the macro.
3158 (target_supports_vfork_events): Update the macro.
3159 (target_supports_exec_events): Update the macro.
3160 * target.cc (process_target::supports_fork_events): Define.
3161 (process_target::supports_vfork_events): Define.
3162 (process_target::supports_exec_events): Define.
3163
3164 Update the derived classes and callers below.
3165
3166 * linux-low.cc (linux_target_ops): Update.
3167 (linux_supports_fork_events): Turn into ...
3168 (linux_process_target::supports_fork_events): ... this.
3169 (linux_supports_vfork_events): Turn into ...
3170 (linux_process_target::supports_vfork_events): ... this.
3171 (linux_supports_exec_events): Turn into ...
3172 (linux_process_target::supports_exec_events): ... this.
3173 * linux-low.h (class linux_process_target): Update.
3174 * lynx-low.cc (lynx_target_ops): Update.
3175 * nto-low.cc (nto_target_ops): Update.
3176 * win32-low.cc (win32_target_ops): Update.
3177
3178 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3179
3180 Turn process_stratum_target's supports_multi_process op into a
3181 method of process_target.
3182
3183 * target.h (struct process_stratum_target): Remove the target op.
3184 (class process_target): Add the target op.
3185 * target.cc (process_target::supports_multi_process): Define.
3186 (target_supports_multi_process): Update.
3187
3188 Update the derived classes and callers below.
3189
3190 * linux-low.cc (linux_target_ops): Update.
3191 (linux_supports_multi_process): Turn into ...
3192 (linux_process_target::supports_multi_process): ... this.
3193 * linux-low.h (class linux_process_target): Update.
3194 * lynx-low.cc (lynx_target_ops): Update.
3195 * nto-low.cc (nto_target_ops): Update.
3196 * win32-low.cc (win32_target_ops): Update.
3197
3198 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3199
3200 Turn process_stratum_target's supports_non_stop, async, and
3201 start_non_stop ops into methods of process_target.
3202
3203 * target.h (struct process_stratum_target): Remove the target ops.
3204 (class process_target): Add the target ops.
3205 (target_supports_non_stop): Update the macro.
3206 (target_async): Update the macro.
3207 (start_non_stop): Remove declaration.
3208 * target.cc (process_target::supports_non_stop): Define.
3209 (process_target::async): Define.
3210 (process_target::start_non_stop): Define.
3211 (start_non_stop): Remove.
3212
3213 Update the derived classes and callers below.
3214
3215 * server.cc (handle_qxfer_siginfo): Update.
3216 (handle_query): Update.
3217 * linux-low.cc (linux_target_ops): Update.
3218 (linux_supports_non_stop): Turn into ...
3219 (linux_process_target::supports_non_stop): ... this.
3220 (linux_async): Turn into ...
3221 (linux_process_target::async): ... this.
3222 (linux_start_non_stop): Turn into ...
3223 (linux_process_target::start_non_stop): ... this.
3224 * linux-low.h (class linux_process_target): Update.
3225 * lynx-low.cc (lynx_target_ops): Update.
3226 * nto-low.cc (nto_target_ops): Update.
3227 (nto_supports_non_stop): Remove; rely on the default behavior
3228 instead.
3229 * win32-low.cc (win32_target_ops): Update.
3230
3231 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3232
3233 Turn process_stratum_target's qxfer_siginfo op into a method of
3234 process_target.
3235
3236 * target.h (struct process_stratum_target): Remove the target op.
3237 (class process_target): Add the target op. Also add
3238 'supports_qxfer_siginfo'.
3239 * target.cc (process_target::qxfer_siginfo): Define.
3240 (process_target::supports_qxfer_siginfo): Define.
3241
3242 Update the derived classes and callers below.
3243
3244 * server.cc (handle_qxfer_siginfo): Update.
3245 (handle_query): Update.
3246 * linux-low.cc (linux_target_ops): Update.
3247 (linux_process_target::supports_qxfer_siginfo): Define.
3248 (linux_xfer_siginfo): Turn into ...
3249 (linux_process_target::qxfer_siginfo): ... this.
3250 * linux-low.h (class linux_process_target): Update.
3251 * lynx-low.cc (lynx_target_ops): Update.
3252 * nto-low.cc (nto_target_ops): Update.
3253 * win32-low.cc (win32_target_ops): Update.
3254
3255 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3256
3257 Turn process_stratum_target's qxfer_osdata op into a method of
3258 process_target.
3259
3260 * target.h (struct process_stratum_target): Remove the target op.
3261 (class process_target): Add the target op. Also add
3262 'supports_qxfer_osdata'.
3263 * target.cc (process_target::qxfer_osdata): Define.
3264 (process_target::supports_qxfer_osdata): Define.
3265
3266 Update the derived classes and callers below.
3267
3268 * server.cc (handle_qxfer_osdata): Update.
3269 (handle_query): Update.
3270 * linux-low.cc (linux_target_ops): Update.
3271 (linux_process_target::supports_qxfer_osdata): Define.
3272 (linux_qxfer_osdata): Turn into ...
3273 (linux_process_target::qxfer_osdata): ... this.
3274 * linux-low.h (class linux_process_target): Update.
3275 * lynx-low.cc (lynx_target_ops): Update.
3276 * nto-low.cc (nto_target_ops): Update.
3277 * win32-low.cc (win32_target_ops): Update.
3278
3279 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3280
3281 Turn process_stratum_target's hostio_last_error op into a
3282 method of process_target.
3283
3284 * target.h (struct process_stratum_target): Remove the target op.
3285 (class process_target): Add the target op.
3286 * target.cc: Add "hostio.h" to includes.
3287 (process_target::hostio_last_error): Define.
3288
3289 Update the derived classes and callers below.
3290
3291 * hostio.cc (hostio_error): Update.
3292 * linux-low.cc: Remove "hostio.h" from includes.
3293 (linux_target_ops): Update.
3294 * lynx-low.cc (lynx_target_ops): Update.
3295 * nto-low.cc (nto_target_ops): Update.
3296 * win32-low.h (class win32_process_target): Update.
3297 * win32-low.cc (win32_target_ops): Update.
3298 (wince_hostio_last_error): Turn into ...
3299 (win32_process_target::hostio_last_error): ... this.
3300
3301 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3302
3303 Turn process_stratum_target's get_tls_address op into a method of
3304 process_target.
3305
3306 * target.h (struct process_stratum_target): Remove the target op.
3307 (class process_target): Add the target op. Also add
3308 'supports_get_tls_address'.
3309 * target.cc (process_target::get_tls_address): Define.
3310 (process_target::supports_get_tls_address): Define.
3311
3312 Update the derived classes and callers below.
3313
3314 * server.cc (handle_query): Update.
3315 * linux-low.cc (linux_target_ops): Update.
3316 (linux_process_target::supports_get_tls_address): Define.
3317 (linux_process_target::get_tls_address): Define.
3318 * linux-low.h (class linux_process_target): Update.
3319 * lynx-low.cc (lynx_target_ops): Update.
3320 * nto-low.cc (nto_target_ops): Update.
3321 * win32-low.cc (win32_target_ops): Update.
3322
3323 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3324
3325 Turn process_stratum_target's read_offsets op into a method of
3326 process_target.
3327
3328 * target.h (struct process_stratum_target): Remove the target op.
3329 (class process_target): Add the target op. Also add
3330 'supports_read_offsets'.
3331 * target.cc (process_target::read_offsets): Define.
3332 (process_target::supports_read_offsets): Define.
3333
3334 Update the derived classes and callers below.
3335
3336 * server.cc (handle_query): Update.
3337 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3338 (linux_target_ops): Update.
3339 (linux_process_target::supports_read_offsets): Define.
3340 (linux_read_offsets): Turn into ...
3341 (linux_process_target::read_offsets): ... this.
3342 * linux-low.h (class linux_process_target): Update.
3343 * lynx-low.cc (lynx_target_ops): Update.
3344 * nto-low.cc (nto_target_ops): Update.
3345 * win32-low.cc (win32_target_ops): Update.
3346
3347 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3348
3349 Turn process_stratum_target's stopped_by_watchpoint and
3350 stopped_data_address ops into methods of process_target.
3351
3352 * target.h (struct process_stratum_target): Remove the target ops.
3353 (class process_target): Add the target ops.
3354 * target.cc (process_target::stopped_by_watchpoint): Define.
3355 (process_target::stopped_data_address): Define.
3356
3357 Update the derived classes and callers below.
3358
3359 * remote-utils.cc (prepare_resume_reply): Update.
3360 * linux-low.cc (linux_target_ops): Update.
3361 (linux_stopped_by_watchpoint): Turn into ...
3362 (linux_process_target::stopped_by_watchpoint): ... this.
3363 (linux_stopped_data_address): Turn into ...
3364 (linux_process_target::stopped_data_address): ... this.
3365 * linux-low.h (class linux_process_target): Update.
3366 * lynx-low.cc (lynx_target_ops): Update.
3367 * nto-low.cc (nto_target_ops): Update.
3368 (nto_stopped_by_watchpoint): Turn into ...
3369 (nto_process_target::stopped_by_watchpoint): ... this.
3370 (nto_stopped_data_address): Turn into ...
3371 (nto_process_target::stopped_data_address): ... this.
3372 * nto-low.h (class nto_process_target): Update.
3373 * win32-low.cc (win32_target_ops): Update.
3374 (win32_stopped_by_watchpoint): Turn into ...
3375 (win32_process_target::stopped_by_watchpoint): ... this.
3376 (win32_stopped_data_address): Turn into ...
3377 (win32_process_target::stopped_data_address): ... this.
3378 * win32-low.h (class win32_process_target): Update.
3379
3380 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3381
3382 Turn process_stratum_target's supports_hardware_single_step op into
3383 a method of process_target.
3384
3385 * target.h (struct process_stratum_target): Remove the target op.
3386 (class process_target): Add the target op.
3387 (target_supports_hardware_single_step): Update the macro.
3388 (target_can_do_hardware_single_step): Remove declaration.
3389 * target.cc (process_target::supports_hardware_single_step): Define.
3390 (target_can_do_hardware_single_step): Remove.
3391
3392 Update the derived classes and callers below.
3393
3394 * linux-low.h (class linux_process_target): Update.
3395 * linux-low.cc (linux_target_ops): Update.
3396 (linux_supports_hardware_single_step): Turn into ...
3397 (linux_process_target::supports_hardware_single_step): ... this.
3398 * lynx-low.h (class lynx_process_target): Update.
3399 * lynx-low.cc (lynx_target_ops): Update.
3400 (lynx_process_target::supports_hardware_single_step): Define.
3401 * nto-low.h (class nto_process_target): Update.
3402 * nto-low.cc (nto_target_ops): Update.
3403 (nto_process_target::supports_hardware_single_step): Define.
3404 * win32-low.h (class win32_process_target): Update.
3405 * win32-low.cc (win32_target_ops): Update.
3406 (win32_process_target::supports_hardware_single_step): Define.
3407
3408 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3409
3410 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3411 ops into methods of process_target.
3412
3413 * target.h (struct process_stratum_target): Remove the target ops.
3414 (class process_target): Add the target ops.
3415 (target_stopped_by_hw_breakpoint): Update the macro.
3416 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3417 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3418 (process_target::supports_stopped_by_hw_breakpoint): Define.
3419
3420 Update the derived classes and callers below.
3421
3422 * linux-low.cc (linux_target_ops): Update.
3423 (linux_stopped_by_hw_breakpoint): Turn into ...
3424 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3425 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3426 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3427 * linux-low.h (class linux_process_target): Update.
3428 * lynx-low.cc (lynx_target_ops): Update.
3429 * nto-low.cc (nto_target_ops): Update.
3430 * win32-low.cc (win32_target_ops): Update.
3431
3432 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3433
3434 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3435 ops into methods of process_target.
3436
3437 * target.h (struct process_stratum_target): Remove the target ops.
3438 (class process_target): Add the target ops.
3439 (target_stopped_by_sw_breakpoint): Update the macro.
3440 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3441 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3442 (process_target::supports_stopped_by_sw_breakpoint): Define.
3443
3444 Update the derived classes and callers below.
3445
3446 * linux-low.cc (linux_target_ops): Update.
3447 (linux_stopped_by_sw_breakpoint): Turn into ...
3448 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3449 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3450 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3451 * linux-low.h (class linux_process_target): Update.
3452 * lynx-low.cc (lynx_target_ops): Update.
3453 * nto-low.cc (nto_target_ops): Update.
3454 * win32-low.cc (win32_target_ops): Update.
3455
3456 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3457
3458 Turn process_stratum_target's insert_point and remove_point ops
3459 into methods of process_target.
3460
3461 * target.h (struct process_stratum_target): Remove the target ops.
3462 (class process_target): Add the target ops.
3463 * target.cc (process_target::insert_point): Define.
3464 (process_target::remove_point): Define.
3465
3466 Update the derived classes and callers below.
3467
3468 * mem-break.cc (set_raw_breakpoint_at): Update.
3469 (delete_raw_breakpoint): Update.
3470 (uninsert_raw_breakpoint): Update.
3471 (reinsert_raw_breakpoint): Update.
3472 * linux-low.cc (linux_target_ops): Update.
3473 (linux_insert_point): Turn into ...
3474 (linux_process_target::insert_point): ... this.
3475 (linux_remove_point): Turn into ...
3476 (linux_process_target::remove_point): ... this.
3477 * linux-low.h (class linux_process_target): Update.
3478 * lynx-low.cc (lynx_target_ops): Update.
3479 * nto-low.cc (nto_target_ops): Update.
3480 (nto_insert_point): Turn into ...
3481 (nto_process_target::insert_point): ... this.
3482 (nto_remove_point): Turn into ...
3483 (nto_process_target::remove_point): ... this.
3484 * nto-low.h (class nto_process_target): Update.
3485 * win32-low.cc (win32_target_ops): Update.
3486 (win32_insert_point): Turn into ...
3487 (win32_process_target::insert_point): ... this.
3488 (win32_remove_point): Turn into ...
3489 (win32_process_target::remove_point): ... this.
3490 * win32-low.h (class win32_process_target): Update.
3491
3492 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3493
3494 Turn process_stratum_target's supports_z_point_type op into a
3495 method of process_target.
3496
3497 * target.h (struct process_stratum_target): Remove the target op.
3498 (class process_target): Add the target op.
3499 * target.cc (process_target::supports_z_point_type): Define.
3500
3501 Update the derived classes and callers below.
3502
3503 * mem-break.cc (z_type_supported): Update.
3504 * linux-low.cc (linux_target_ops): Update.
3505 (linux_supports_z_point_type): Turn into ...
3506 (linux_process_target::supports_z_point_type): ... this.
3507 * linux-low.h (class linux_process_target): Update.
3508 * lynx-low.cc (lynx_target_ops): Update.
3509 * nto-low.cc (nto_target_ops): Update.
3510 (nto_supports_z_point_type): Turn into ...
3511 (nto_process_target::supports_z_point_type): ... this.
3512 * nto-low.h (class nto_process_target): Update.
3513 * win32-low.cc (win32_target_ops): Update.
3514 (win32_supports_z_point_type): Turn into ...
3515 (win32_process_target::supports_z_point_type): ... this.
3516 * win32-low.h (class win32_process_target): Update.
3517
3518 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3519
3520 Turn process_stratum_target's read_auxv op into a method of
3521 process_target.
3522
3523 * target.h (class process_stratum_target): Remove the target op.
3524 (struct process_target): Add the target op. Also add
3525 'supports_read_auxv'.
3526 * target.cc (process_target::read_auxv): Define.
3527 (process_target::supports_read_auxv): Define.
3528
3529 Update the derived classes and callers below.
3530
3531 * server.cc (handle_qxfer_auxv): Update.
3532 (handle_query): Update.
3533 * linux-low.cc (linux_target_ops): Update.
3534 (linux_process_target::supports_read_auxv): Define.
3535 (linux_read_auxv): Turn into ...
3536 (linux_process_target::read_auxv): ... this.
3537 * linux-low.h (class linux_process_target): Update.
3538 * lynx-low.cc (lynx_target_ops): Update.
3539 * nto-low.cc (nto_target_ops): Update.
3540 (nto_process_target::supports_read_auxv): Define.
3541 (nto_read_auxv): Turn into ...
3542 (nto_process_target::read_auxv): ... this.
3543 * nto-low.h (class nto_process_target): Update.
3544 * win32-low.cc (win32_target_ops): Update.
3545
3546 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3547
3548 Turn process_stratum_target's request_interrupt op into a method of
3549 process_target.
3550
3551 * target.h (struct process_stratum_target): Remove the target op.
3552 (class process_target): Add the target op.
3553
3554 Update the derived classes and callers below.
3555
3556 * remote-utils.cc (putpkt_binary_1): Update.
3557 (input_interrupt): Update.
3558 (getpkt): Update.
3559 * server.cc (handle_v_requests): Update.
3560 * linux-low.cc (linux_target_ops): Update.
3561 (linux_request_interrupt): Turn into ...
3562 (linux_process_target::request_interrupt): ... this.
3563 * linux-low.h (class linux_process_target): Update.
3564 * lynx-low.cc (lynx_target_ops): Update.
3565 (lynx_request_interrupt): Turn into ...
3566 (lynx_process_target::request_interrupt): ... this.
3567 * lynx-low.h (class lynx_process_target): Update.
3568 * nto-low.cc (nto_target_ops): Update.
3569 (nto_request_interrupt): Turn into ...
3570 (nto_process_target::request_interrupt): ... this.
3571 * nto-low.h (class nto_process_target): Update.
3572 * win32-low.cc (win32_target_ops): Update.
3573 (win32_request_interrupt): Turn into ...
3574 (win32_process_target::request_interrupt): ... this.
3575 * win32-low.h (class win32_process_target): Update.
3576
3577 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3578
3579 Turn process_stratum_target's look_up_symbols op into a method of
3580 process_target.
3581
3582 * target.h (struct process_stratum_target): Remove the target op.
3583 (class process_target): Add the target op.
3584 * target.cc (process_target::look_up_symbols): Define.
3585
3586 Update the derived classes and callers below.
3587
3588 * server.cc (handle_query): Update.
3589 * linux-low.cc (linux_target_ops): Update.
3590 (linux_look_up_symbols): Turn into ...
3591 (linux_process_target::look_up_symbols): ... this.
3592 * linux-low.h (class linux_process_target): Update.
3593 * lynx-low.cc (lynx_target_ops): Update.
3594 * nto-low.cc (nto_target_ops): Update.
3595 * win32-low.cc (win32_target_ops): Update.
3596
3597 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3598
3599 Turn process_stratum_target's read_memory and write_memory
3600 ops into methods of process_target.
3601
3602 * target.h (struct process_stratum_target): Remove the target ops.
3603 (class process_target): Add the target ops.
3604
3605 Update the derived classes and callers below.
3606
3607 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3608 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3609 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3610 (arm_get_syscall_trapinfo): Update.
3611 * linux-cris-low.cc (cris_breakpoint_at): Update.
3612 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3613 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3614 * linux-mips-low.cc (mips_breakpoint_at): Update.
3615 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3616 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3617 * linux-sh-low.cc (sh_breakpoint_at): Update.
3618 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3619 (sparc_store_gregset_from_stack): Update.
3620 (sparc_breakpoint_at): Update.
3621 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3622 * linux-tile-low.cc (tile_breakpoint_at): Update.
3623 * linux-x86-low.cc (x86_breakpoint_at): Update.
3624 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3625 * mem-brea.cc (insert_memory_breakpoint): Update.
3626 (validate_inserted_breakpoint): Update.
3627 * target.cc (read_inferior_memory): Update.
3628 (target_write_memory): Update.
3629 * linux-low.cc (linux_target_ops): Update.
3630 (linux_read_memory): Make a wrapper around the read_memory target
3631 op call.
3632 (linux_process_target::read_memory): Rename from linux_read_memory.
3633 (linux_write_memory): Turn into ...
3634 (linux_process_target::write_memory): ... this.
3635 * linux-low.h (class linux_process_target): Update.
3636 * lynx-low.cc (lynx_target_ops): Update.
3637 (lynx_read_memory): Turn into ...
3638 (lynx_process_target::read_memory): ... this.
3639 (lynx_write_memory): Turn into ...
3640 (lynx_process_target::write_memory): ... this.
3641 * lynx-low.h (class lynx_process_target): Update.
3642 * nto-low.cc (nto_target_ops): Update.
3643 (nto_read_memory): Turn into ...
3644 (nto_process_target::read_memory): ... this.
3645 (nto_write_memory): Turn into ...
3646 (nto_process_target::write_memory): ... this.
3647 * nto-low.h (class nto_process_target): Update.
3648 * win32-low.cc (win32_target_ops): Update.
3649 (win32_read_inferior_memory): Turn into ...
3650 (win32_process_target::read_memory): ... this.
3651 (win32_write_inferior_memory): Turn into ...
3652 (win32_process_target::write_memory): ... this.
3653 * win32-low.h (class win32_process_target): Update.
3654
3655 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3656
3657 Turn process_stratum_target's prepare_to_access_memory and
3658 done_accessing_memory ops into methods of process_target.
3659
3660 * target.h (struct process_stratum_target): Remove the target ops.
3661 (class process_target): Add the target ops.
3662 * target.cc (process_target::prepare_to_access_memory): Define.
3663 (process_target::done_accessing_memory): Define.
3664 (prepare_to_access_memory): Update.
3665 (done_accessing_memory): Update.
3666
3667 Update the derived classes and callers below.
3668
3669 * linux-low.cc (linux_target_ops): Update.
3670 (linux_prepare_to_access_memory): Turn into ...
3671 (linux_process_target::prepare_to_access_memory): ... this.
3672 (linux_done_accessing_memory): Turn into ...
3673 (linux_process_target::done_accessing_memory): ... this.
3674 * linux-low.h (class linux_process_target): Update.
3675 * lynx-low.cc (lynx_target_ops): Update.
3676 * nto-low.cc (nto_target_ops): Update.
3677 * win32-low.cc (win32_target_ops): Update.
3678
3679 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3680
3681 Turn process_stratum_target's fetch_registers and store_registers
3682 ops into methods of process_target.
3683
3684 * target.h (struct process_stratum_target): Remove the target ops.
3685 (class process_target): Add the target ops.
3686 (fetch_inferior_registers): Update the macro.
3687 (store_inferior_registers): Update the macro.
3688
3689 Update the derived classes and callers below.
3690
3691 * linux-low.cc (linux_target_ops): Update.
3692 (linux_fetch_registers): Turn into ...
3693 (linux_process_target::fetch_registers): ... this.
3694 (linux_store_registers): Turn into ...
3695 (linux_process_target::store_registers): ... this.
3696 * linux-low.h (class linux_process_target): Update.
3697 * lynx-low.cc (lynx_target_ops): Update.
3698 (lynx_fetch_registers): Turn into ...
3699 (lynx_process_target::fetch_registers): ... this.
3700 (lynx_store_registers): Turn into ...
3701 (lynx_process_target::store_registers): ... this.
3702 * lynx-low.h (class lynx_process_target): Update.
3703 * nto-low.cc (nto_target_ops): Update.
3704 (nto_fetch_registers): Turn into ...
3705 (nto_process_target::fetch_registers): ... this.
3706 (nto_store_registers): Turn into ...
3707 (nto_process_target::store_registers): ... this.
3708 * nto-low.h (class nto_process_target): Update.
3709 * win32-low.cc (win32_target_ops): Update.
3710 (win32_fetch_inferior_registers): Turn into ...
3711 (win32_process_target::fetch_registers): ... this.
3712 (win32_store_inferior_registers): Turn into ...
3713 (win32_process_target::store_registers): ... this.
3714 * win32-low.h (class win32_process_target): Update.
3715
3716 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3717
3718 Turn process_stratum_target's wait op into a method of
3719 process_target.
3720
3721 * target.h (struct process_stratum_target): Remove the target op.
3722 (class process_target): Add the target op.
3723
3724 Update the derived classes and callers below.
3725
3726 * target.cc (target_wait): Update.
3727 * linux-low.cc (linux_target_ops): Update.
3728 (linux_wait): Turn into ...
3729 (linux_process_target::wait): ... this.
3730 * linux-low.h (class linux_process_target): Update.
3731 * lynx-low.cc (lynx_target_ops): Update.
3732 (lynx_wait): Turn into ...
3733 (lynx_process_target::wait): ... this.
3734 * lynx-low.h (class lynx_process_target): Update.
3735 * nto-low.cc (nto_target_ops): Update.
3736 (nto_wait): Turn into ...
3737 (nto_process_target::wait): ... this.
3738 * nto-low.h (class nto_process_target): Update.
3739 * win32-low.cc (win32_target_ops): Update.
3740 (win32_wait): Turn into ...
3741 (win32_process_target::wait): ... this.
3742 (do_initial_child_stuff): Update.
3743 * win32-low.h (class win32_process_target): Update.
3744
3745 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3746
3747 Turn process_stratum_target's resume op into a method of
3748 process_target.
3749
3750 * target.h (struct process_stratum_target): Remove the target op.
3751 (class process_target): Add the target op.
3752
3753 Update the derived classes and callers below.
3754
3755 * server.cc (resume): Update.
3756 * target.cc (target_stop_and_wait): Update.
3757 (target_continue_no_signal): Update.
3758 (target_continue): Update.
3759 * linux-low.cc (linux_target_ops): Update.
3760 (linux_resume): Turn into ...
3761 (linux_process_target::resume): ... this.
3762 * linux-low.h (class linux_process_target): Update.
3763 * lynx-low.cc (lynx_target_ops): Update.
3764 (lynx_resume): Turn into ...
3765 (lynx_process_target::resume): ... this.
3766 * lynx-low.h (class lynx_process_target): Update.
3767 * nto-low.cc (nto_target_ops): Update.
3768 (nto_resume): Turn into ...
3769 (nto_process_target::resume): ... this.
3770 * nto-low.h (class nto_process_target): Update.
3771 * win32-low.cc (win32_target_ops): Update.
3772 (win32_resume): Turn into ...
3773 (win32_process_target::resume): ... this.
3774 (win32_process_target::detach): Update.
3775 (do_initial_child_stuff): Update.
3776 * win32-low.h (class win32_process_target): Update.
3777
3778 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3779
3780 Turn process_stratum_target's thread_alive op into a method of
3781 process_target.
3782
3783 * target.h (struct process_stratum_target): Remove the target op.
3784 (class process_target): Add the target op.
3785 (mythread_alive): Update the macro.
3786
3787 Update the derived classes and callers below.
3788
3789 * linux-low.cc (linux_target_ops): Update.
3790 (linux_thread_alive): Turn into ...
3791 (linux_process_target::thread_alive): ... this.
3792 (wait_for_sigstop): Update.
3793 * linux-low.h (class linux_process_target): Update.
3794 * lynx-low.cc (lynx_target_ops): Update.
3795 (lynx_thread_alive): Turn into ...
3796 (lynx_process_target::thread_alive): ... this.
3797 * lynx-low.h (class lynx_process_target): Update.
3798 * nto-low.cc (nto_target_ops): Update.
3799 (nto_thread_alive): Turn into ...
3800 (nto_process_target::thread_alive): ... this.
3801 * nto-low.h (class nto_process_target): Update.
3802 * win32-low.cc (win32_target_ops): Update.
3803 (win32_thread_alive): Turn into ...
3804 (win32_process_target::thread_alive): ... this.
3805 * win32-low.h (class win32_process_target): Update.
3806
3807 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3808
3809 Turn process_stratum_target's join op into a method of
3810 process_target.
3811
3812 * target.h (struct process_stratum_target): Remove the target op.
3813 (class process_target): Add the target op.
3814 (join_inferior): Update the macro.
3815
3816 Update the derived classes and callers below.
3817
3818 * linux-low.cc (linux_target_ops): Update.
3819 (linux_join): Turn into ...
3820 (linux_process_target::join): ... this.
3821 * linux-low.h (class linux_process_target): Update.
3822 * lynx-low.cc (lynx_target_ops): Update.
3823 (lynx_join): Turn into ...
3824 (lynx_process_target::join): ... this.
3825 * lynx-low.h (class lynx_process_target): Update.
3826 * nto-low.cc (nto_target_ops): Update.
3827 (nto_process_target::join): Define.
3828 * nto-low.h (class nto_process_target): Update.
3829 * win32-low.cc (win32_target_ops): Update.
3830 (win32_join): Turn into ...
3831 (win32_process_target::join): ... this.
3832 * win32-low.h (class win32_process_target): Update.
3833
3834 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3835
3836 Turn process_stratum_target's mourn op into a method of
3837 process_target.
3838
3839 * target.h (struct process_stratum_target): Remove the target op.
3840 (class process_target): Add the target op.
3841
3842 Update the derived classes and callers below.
3843
3844 * target.cc (target_mourn_inferior): Update.
3845 * linux-low.cc (linux_target_ops): Update.
3846 (linux_mourn): Turn into ...
3847 (linux_process_target::mourn): ... this.
3848 (handle_extended_wait): Update.
3849 (linux_process_target::kill): Update.
3850 (linux_process_target::detach): Update.
3851 * linux-low.h (class linux_process_target): Update.
3852 * lynx-low.cc (lynx_target_ops): Update.
3853 (lynx_mourn): Turn into ...
3854 (lynx_process_target::mourn): ... this.
3855 * lynx-low.h (class lynx_process_target): Update.
3856 * nto-low.cc (nto_target_ops): Update.
3857 (nto_mourn): Turn into ...
3858 (nto_process_target::mourn): ... this.
3859 * nto-low.h (class nto_process_target): Update.
3860 * win32-low.cc (win32_target_ops): Update.
3861 (win32_mourn): Turn into ...
3862 (win32_process_target::mourn): ... this.
3863 * win32-low.h (class win32_process_target): Update.
3864
3865 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3866
3867 Turn process_stratum_target's detach op into a method of
3868 process_target.
3869
3870 * target.h (struct process_stratum_target): Remove the target op.
3871 (class process_target): Add the target op.
3872 (detach_inferior): Update the macro.
3873
3874 Update the derived classes and callers below.
3875
3876 * linux-low.cc (linux_target_ops): Update.
3877 (linux_detach): Turn into ...
3878 (linux_process_target::detach): ... this.
3879 * linux-low.h (class linux_process_target): Update.
3880 * lynx-low.cc (lynx_target_ops): Update.
3881 (lynx_detach): Turn into ...
3882 (lynx_process_target::detach): ... this.
3883 * lynx-low.h (class lynx_process_target): Update.
3884 * nto-low.cc (nto_target_ops): Update.
3885 (nto_detach): Turn into ...
3886 (nto_process_target::detach): ... this.
3887 * nto-low.h (class nto_process_target): Update.
3888 * win32-low.cc (win32_target_ops): Update.
3889 (win32_detach): Turn into ...
3890 (win32_process_target::detach): ... this.
3891 * win32-low.h (class win32_process_target): Update.
3892
3893 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3894
3895 Turn process_stratum_target's kill op into a method of
3896 process_target.
3897
3898 * target.h (struct process_stratum_target): Remove the target op.
3899 (class process_target): Add the target op.
3900
3901 Update the derived classes and callers below.
3902
3903 * target.cc (kill_inferior): Update.
3904 * linux-low.cc (linux_target_ops): Update.
3905 (linux_kill): Turn into ...
3906 (linux_process_target::kill): ... this.
3907 * linux-low.h (class linux_process_target): Update.
3908 * lynx-low.cc (lynx_target_ops): Update.
3909 (lynx_kill): Turn into ...
3910 (lynx_process_target::kill): ... this.
3911 * lynx-low.h (class lynx_process_target): Update.
3912 * nto-low.cc (nto_target_ops): Update.
3913 (nto_kill): Turn into ...
3914 (nto_process_target::kill): ... this.
3915 * nto-low.h (class nto_process_target): Update.
3916 * win32-low.cc (win32_target_ops): Update.
3917 (win32_kill): Turn into ...
3918 (win32_process_target::kill): ... this.
3919 * win32-low.h (class win32_process_target): Update.
3920
3921 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3922
3923 Turn process_stratum_target's attach op into a method of
3924 process_target.
3925
3926 * target.h (struct process_stratum_target): Remove the target op.
3927 (class process_target): Add the target op.
3928 (myattach): Update the macro.
3929
3930 Update the derived classes and callers below.
3931
3932 * linux-low.cc (linux_target_ops): Update.
3933 (linux_attach): Turn into ...
3934 (linux_process_target::attach): ... this.
3935 * linux-low.h (class linux_process_target): Update.
3936 * lynx-low.cc (lynx_target_ops): Update.
3937 (lynx_attach): Turn into ...
3938 (lynx_process_target::attach): ... this.
3939 * lynx-low.h (class lynx_process_target): Update.
3940 * nto-low.cc (nto_target_ops): Update.
3941 (nto_attach): Turn into ...
3942 (nto_process_target::attach): ... this.
3943 * nto-low.h (class nto_process_target): Update.
3944 * win32-low.cc (win32_target_ops): Update.
3945 (win32_attach): Turn into ...
3946 (win32_process_target::attach): ... this.
3947 * win32-low.h (class win32_process_target): Update.
3948
3949 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3950
3951 Turn process_stratum_target's post_create_inferior op into a method
3952 of process_target.
3953
3954 * target.h (struct process_stratum_target): Remove the target op.
3955 (class process_target): Add the target op.
3956 (target_post_create_inferior): Update the macro.
3957 * target.cc (process_target::post_create_inferior): Define.
3958
3959 Update the derived classes and callers below.
3960
3961 * linux-low.cc (linux_target_ops): Update.
3962 (linux_post_create_inferior): Turn into ...
3963 (linux_process_target::post_create_inferior): ... this.
3964 * linux-low.h (class linux_process_target): Update.
3965 * lynx-low.cc (lynx_target_ops): Update.
3966 * nto-low.cc (nto_target_ops): Update.
3967 * win32-low.cc (win32_target_ops): Update.
3968
3969 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3970
3971 Turn process_stratum_target's create_inferior op into a method of
3972 process_target.
3973
3974 * target.h (struct process_stratum_target): Remove the target op.
3975 (class process_target): Add the target op.
3976 (create_inferior): Rename the macro to ...
3977 (target_create_inferior): ... this.
3978
3979 Update the derived classes and callers below.
3980
3981 * server.cc (handle_v_run): Update.
3982 (captured_main): Update.
3983 (process_serial_event): Update.
3984 * linux-low.cc (linux_target_ops): Update.
3985 (linux_create_inferior): Turn into ...
3986 (linux_process_target::create_inferior): ... this.
3987 * linux-low.h (class linux_process_target): Update.
3988 * lynx-low.cc (lynx_target_ops): Update.
3989 (lynx_create_inferior): Turn into ...
3990 (lynx_process_target::create_inferior): ... this.
3991 * lynx-low.h (class lynx_process_target): Update.
3992 * nto-low.cc (nto_target_ops): Update.
3993 (nto_create_inferior): Turn into ...
3994 (nto_process_target::create_inferior): ... this.
3995 * nto-low.h (class nto_process_target): Update.
3996 * win32-low.cc (win32_target_ops): Update.
3997 (win32_create_inferior): Turn into ...
3998 (win32_process_target::create_inferior): ... this.
3999 * win32-low.h (class win32_process_target): Update.
4000
4001 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4002
4003 * target.h (class process_target): New class definition.
4004 (struct process_stratum_target) <pt>: New field with type
4005 'process_target*'.
4006 * linux-low.h (class linux_process_target): Define as a derived
4007 class of 'process_target'.
4008 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4009 as the 'pt' field.
4010 * lynx-low.h (class lynx_process_target): Define as a derived
4011 class of 'process_target'.
4012 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4013 as the 'pt' field.
4014 * nto-low.h (class nto_process_target): Define as a derived
4015 class of 'process_target'.
4016 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4017 as the 'pt' field.
4018 * win32-low.h (class win32_process_target): Define as a derived
4019 class of 'process_target'.
4020 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4021 as the 'pt' field.
4022
4023 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4024
4025 * configure: Regenerate.
4026
4027 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4028 Andrew Burgess <andrew.burgess@embecosm.com>
4029
4030 * linux-riscv-low.cc: New file.
4031 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4032 and nat/riscv-linux-tdesc.c.
4033 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4034 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4035 Define.
4036
4037 2020-02-14 Tom Tromey <tom@tromey.com>
4038
4039 * acinclude.m4: Don't include acx_configure_dir.m4.
4040 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4041 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4042 (all, install-only, uninstall, clean-info, clean)
4043 (maintainer-clean): Don't recurse.
4044 (subdir_do, all-lib): Remove.
4045 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4046 (GNULIB_H): Remove.
4047 (generated_files): Update.
4048 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4049 * configure: Rebuild.
4050 * configure.ac: Don't configure gnulib or libiberty.
4051 (GNULIB): Update.
4052
4053 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4054
4055 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4056 preparing the command line for CreateProcess.
4057 (win32_create_inferior): Reflect the program name in debugging
4058 output that shows the process and its command line.
4059
4060 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4061
4062 * Makefile.in: Rename source files from .c to .cc.
4063 * %.c: Rename to %.cc.
4064 * configure.ac: Rename server.c to server.cc.
4065 * configure: Re-generate.
4066
4067 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4068
4069 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4070
4071 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4072
4073 * win32-low.c (win32_create_inferior): Set signal_pid.
4074
4075 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4076 Pedro Alves <palves@redhat.com>
4077
4078 Skip building gdbserver in a cross-configuration.
4079 * configure.srv: Set $gdbserver_host depending on whether $target
4080 is $host. Use $gdbserver_host instead of $host.
4081
4082 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4083
4084 * configure: Re-generate.
4085
4086 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4087
4088 * configure: Re-generate.
4089
4090 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4091
4092 * acinclude.m4: Update warning.m4 path.
4093
4094 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4095
4096 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4097 (handle_exception): Set siginfo_er.
4098 (win32_xfer_siginfo): New function.
4099
4100 2020-02-07 Tom Tromey <tom@tromey.com>
4101 Pedro Alves <palves@redhat.com>
4102
4103 * README: Update build documentation.
4104 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4105 host, not target.
4106 * configure.ac: Update paths.
4107 * configure: Rebuild.
4108 * acinclude.m4: Update paths.
4109 * Makefile.in: Update include paths.
4110 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4111 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4112 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4113 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4114 (%-generated.c): Update paths.
4115 * Move entire directory from ../gdb/gdbserver.
4116
4117 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4118
4119 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4120
4121 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4122
4123 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4124 assignment instead of srv_linux_obj.
4125
4126 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4127
4128 * server.c (handle_qxfer_libraries): Write segment-address with
4129 paddress.
4130
4131 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4132
4133 * Makefile.in (install-strip): New target.
4134 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4135 * aclocal.m4: Regenerate.
4136 * configure: Regenerate.
4137 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4138
4139 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4140
4141 * Makefile.in (SFILES): Adjust paths to point to real files.
4142 (OBS): Move waitstatus.o to target/waitstatus.o.
4143 (TAGS): Transform paths appropriately.
4144 (%.o): Rename to...
4145 (nat/%.o): ... this pattern rule.
4146 (%.o): Rename to...
4147 (target/%.o): ... this pattern rule.
4148 * configure.srv: Adjust paths throughout to include nat/ prefix
4149 with the revant files.
4150 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4151 * configure: Regenerate.
4152
4153 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4154
4155 * Makefile.in (TAGS): Remove config files from the recipe.
4156
4157 2020-01-14 Tom Tromey <tom@tromey.com>
4158
4159 * configure: Rebuild.
4160 * configure.ac: Remove any checks that were added to common.m4.
4161 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4162 lib-link.m4.
4163
4164 2020-01-14 Tom Tromey <tom@tromey.com>
4165
4166 * server.h: Include config.h.
4167 * gdbreplay.c: Include config.h.
4168 * configure: Rebuild.
4169 * configure.ac: Don't source common.host.
4170 * acinclude.m4: Update path.
4171 * Makefile.in (INCSUPPORT): New variable.
4172 (INCLUDE_CFLAGS): Add INCSUPPORT.
4173 (SFILES): Update paths.
4174 (version-generated.c): Update path to create-version.sh.
4175 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4176
4177 2020-01-14 Tom Tromey <tom@tromey.com>
4178
4179 * configure.ac (LIBS): Use WIN32APILIBS.
4180 (USE_WIN32API): Don't define.
4181 * configure: Rebuild.
4182
4183 2020-01-14 Tom Tromey <tom@tromey.com>
4184
4185 * configure: Rebuild.
4186
4187 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4188
4189 * Makefile.in (%-generated.c): Remove rule for files from
4190 regformats/i386.
4191
4192 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4193
4194 * configure: Re-generate.
4195
4196 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4197
4198 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4199 Define to static.
4200 * tracepoint.c (stop_tracing, flush_trace_buffer,
4201 about_to_request_buffer_space, get_trace_state_variable_value,
4202 set_trace_state_variable_value, gdb_collect): Add declaration.
4203
4204 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4205
4206 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4207 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4208 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4209 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4210 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4211 static.
4212
4213 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4214
4215 * inferiors.c: Include gdbsupport/common-inferior.h.
4216
4217 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4218
4219 * hostio-errno.c: Include hostio.h.
4220
4221 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4222
4223 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4224 prerequisite.
4225
4226 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4227
4228 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4229 * linux-arm-tdesc.h: Include arch/arm.h.
4230
4231 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4232
4233 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4234
4235 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4236
4237 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4238 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4239
4240 2020-01-10 Pedro Alves <palves@redhat.com>
4241
4242 * fork-child.c (post_fork_inferior): Pass target down to
4243 startup_inferior.
4244 * inferiors.c (switch_to_thread): Add process_stratum_target
4245 parameter.
4246 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4247 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4248 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4249 * remote-utils.c (prepare_resume_reply): Pass the target to
4250 switch_to_thread.
4251 * target.c (the_target): Now a process_stratum_target.
4252 (done_accessing_memory): Pass the target to switch_to_thread.
4253 (set_target_ops): Ajust to use process_stratum_target.
4254 * target.h (struct target_ops): Rename to ...
4255 (struct process_stratum_target): ... this.
4256 (the_target, set_target_ops): Adjust.
4257 (prepare_to_access_memory): Adjust comment.
4258 * win32-low.c (child_xfer_memory): Adjust to use
4259 process_stratum_target.
4260 (win32_target_ops): Now a process_stratum_target.
4261
4262 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4263 Pedro Alves <palves@redhat.com>
4264
4265 * win32-low.c (get_child_debug_event): Extract the fatal exception
4266 from the exit status and convert to the equivalent Posix signal
4267 number.
4268 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4269 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4270
4271 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4272
4273 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4274
4275 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4276
4277 * server.c (gdbserver_version): Change copyright year to 2020.
4278 * gdbreplay.c (gdbreplay_version): Likewise.
4279
4280 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4281
4282 * configure: Regenerate.
4283 * configure.ac: Quote variable arguments of test.
4284
4285 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4286
4287 * Makefile.in: Fix build with GNU Make 3.81
4288
4289 2019-12-16 Tom Tromey <tromey@adacore.com>
4290
4291 * server.c (get_exec_file): Constify result.
4292
4293 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4294
4295 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4296 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4297 * config.in: Regenerate.
4298 * configure: Regenerate.
4299 * configure.ac: Don't check for strerror.
4300 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4301 Call safe_strerror instead of strerror.
4302 * server.h (strerror): Remove this now-unnecessary declaration.
4303 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4304 strerror.
4305 (gdb_agent_helper_thread): Likewise.
4306 * utils.c (perror_with_name): Likewise.
4307
4308 2019-11-26 Tom Tromey <tom@tromey.com>
4309
4310 * configure, config.in: Rebuild.
4311
4312 2019-11-26 Tom Tromey <tom@tromey.com>
4313
4314 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4315 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4316 gdb_sigmask.
4317 * configure, config.in: Rebuild.
4318
4319 2019-11-26 Tom Tromey <tom@tromey.com>
4320
4321 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4322 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4323 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4324 * acinclude.m4: Include ax_pthread.m4.
4325 * config.in, configure: Rebuild.
4326
4327 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4328
4329 * debug.c (debug_set_output): Call safe_strerror instead of
4330 strerror.
4331 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4332 (linux_kill_one_lwp): Likewise.
4333 (linux_detach_one_lwp): Likewise.
4334 (linux_wait_for_event_filtered): Likewise.
4335 (store_register): Likewise.
4336 * lynx-low.c (lynx_attach): Likewise.
4337 * mem-break.c (insert_memory_breakpoint): Likewise.
4338 (remove_memory_breakpoint): Likewise.
4339 (delete_fast_tracepoint_jump): Likewise.
4340 (set_fast_tracepoint_jump): Likewise.
4341 (uninsert_fast_tracepoint_jumps_at): Likewise.
4342 (reinsert_fast_tracepoint_jumps_at): Likewise.
4343 * nto-low.c (nto_xfer_memory): Likewise.
4344 (nto_resume): Likewise.
4345
4346 2019-11-20 Luis Machado <luis.machado@linaro.org>
4347
4348 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4349 instead of register count.
4350 * tdesc.c (tdesc_contains_feature): New function.
4351 * tdesc.h (tdesc_contains_feature): New prototype.
4352
4353 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4354
4355 * Makefile.in: Add safe-strerror.c.
4356 * configure: Regenerate.
4357 * configure.ac: Don't source common.host.
4358
4359 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4360
4361 * config.in: Regenerate.
4362 * configure: Regenerate.
4363
4364 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4365
4366 * ax.c (ax_printf): Handle size_t_arg.
4367
4368 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4369
4370 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4371 * mi/mi-main.c (output_cores): Likewise.
4372 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4373 (linux_xfer_osdata_modules): Likewise.
4374 * remote.c (register_remote_support_xml): Likewise.
4375 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4376 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4377
4378 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4379
4380 * configure: Regenerate.
4381 * configure.ac: Remove check for strerror_r.
4382
4383 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4384
4385 * config.in: Regenerate.
4386 * configure: Regenerate.
4387 * configure.ac: Also check for strerror_r.
4388
4389 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4390
4391 * ax.h (debug_agent): Remove duplicate declaration.
4392
4393 2019-10-26 Tom de Vries <tdevries@suse.de>
4394
4395 * linux-aarch64-low.c: Fix typos in comments.
4396 * linux-arm-low.c: Same.
4397 * linux-low.c: Same.
4398 * linux-ppc-low.c: Same.
4399 * proc-service.c: Same.
4400 * regcache.h: Same.
4401 * server.c: Same.
4402 * tracepoint.c: Same.
4403 * win32-low.c: Same.
4404
4405 2019-10-25 Tom Tromey <tromey@adacore.com>
4406
4407 * utils.c (xstrdup): Remove.
4408
4409 2019-10-23 Tom Tromey <tom@tromey.com>
4410
4411 * configure, config.in: Rebuild.
4412
4413 2019-10-23 Tom Tromey <tom@tromey.com>
4414
4415 * configure: Rebuild.
4416 * acinclude.m4: Use m4_include, not sinclude.
4417
4418 2019-10-17 Tom Tromey <tromey@adacore.com>
4419
4420 * configure: Rebuild.
4421 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4422 in AC_CONFIG_FILES invocation.
4423 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4424 invocation.
4425
4426 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4427
4428 * server.c: Include xml-builtin.h.
4429 (get_xml_features): Don't declare xml_builtins here.
4430
4431 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4432
4433 * Makefile.in: Remove references to vec-ipa.o.
4434
4435 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4436
4437 * Makefile.in: Remove references to vec.c.
4438
4439 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4440
4441 * server.c (server_waiting): Change to bool.
4442 (extended_protocol): Likewise.
4443 (response_needed): Likewise.
4444 (exit_requested): Likewise.
4445 (run_once): Likewise.
4446 (report_no_resumed): Likewise.
4447 (non_stop): Likewise.
4448 (disable_packet_vCont): Likewise.
4449 (disable_packet_Tthread): Likewise.
4450 (disable_packet_qC): Likewise.
4451 (disable_packet_qfThreadInfo): Likewise.
4452 (handle_general_set): Update.
4453 (handle_detach): Update.
4454 (handle_monitor_command): Update.
4455 (handle_query): Update.
4456 (captured_main): Update.
4457 (process_serial_event): Update.
4458 * server.h (server_waiting): Change to bool.
4459 (disable_packet_vCont): Likewise.
4460 (disable_packet_Tthread): Likewise.
4461 (disable_packet_qC): Likewise.
4462 (disable_packet_qfThreadInfo): Likewise.
4463 (run_once): Likewise.
4464 (non_stop): Likewise.
4465 * target.c (target_stop_and_wait): Update.
4466
4467 2019-10-02 Tom Tromey <tromey@adacore.com>
4468
4469 * Makefile.in (SFILES): Add common-inferior.c.
4470 (OBS): Add common-inferior.o.
4471 * server.c (startup_with_shell): Don't define.
4472
4473 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4474
4475 * linux-low.c (linux_low_read_btrace): Update for change to
4476 std::vector.
4477
4478 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4479
4480 * debug.c (debug_threads): Remove comment in favor of the header.
4481 * debug.h (using_threads): Add declaration.
4482 (debug_threads): Add comment.
4483 * linux-aarch64-low.c: Include debug.h and remove declaration of
4484 debug_threads.
4485 * nto-low.c: Likewise.
4486 * remote-utils.c: Likewise.
4487 * thread-db.c: Likewise.
4488
4489 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4490
4491 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4492 and powerpc-cell64l-ipa.o.
4493 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4494 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4495 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4496 (spu*-*-*): Remove.
4497
4498 * spu-low.c: Remove file.
4499
4500 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4501 (parse_spufs_run): Remove.
4502 (ppc_get_pc): Remove Cell/B.E. support.
4503 (ppc_set_pc): Likewise.
4504 (ppc_breakpoint_at): Likewise.
4505 (ppc_arch_setup): Likewise.
4506 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4507 tdesc_powerpc_cell32l.
4508 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4509 or init_registers_powerpc_cell32l.
4510 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4511 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4512 or init_registers_powerpc_cell32l.
4513 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4514 (init_registers_powerpc_cell32l): Remove prototype.
4515 (init_registers_powerpc_cell64l): Likewise.
4516
4517 * target.h (struct target_ops): Remove qxfer_spu member.
4518 * server.c (handle_qxfer_spu): Remove.
4519 (qxfer_packets): Remove entry for "spu".
4520 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4521 * linux-low.c (SPUFS_MAGIC): Remove.
4522 (spu_enumerate_spu_ids): Remove.
4523 (linux_qxfer_spu): Remove.
4524 (linux_target_ops): Remove qxfer_spu member.
4525 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4526 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4527 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4528
4529 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4530
4531 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4532 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4533 * config.in: Regenerate.
4534 * configure: Regenerate.
4535
4536 2019-08-15 Tom Tromey <tromey@adacore.com>
4537
4538 * target.c (target_write_memory): Use gdb::byte_vector.
4539
4540 2019-08-15 Tom Tromey <tromey@adacore.com>
4541
4542 * tracepoint.c (write_inferior_data_pointer)
4543 (write_inferior_integer, write_inferior_int8)
4544 (write_inferior_uinteger, m_tracepoint_action_download)
4545 (r_tracepoint_action_download, x_tracepoint_action_download)
4546 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4547 (download_agent_expr, download_tracepoint_1)
4548 (download_trace_state_variables, upload_fast_traceframes): Update.
4549 * server.c (gdb_write_memory): Update.
4550 * remote-utils.c (relocate_instruction): Update.
4551 * proc-service.c (ps_pdwrite): Update.
4552 * mem-break.c (remove_memory_breakpoint)
4553 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4554 (uninsert_fast_tracepoint_jumps_at)
4555 (reinsert_fast_tracepoint_jumps_at): Update.
4556 * linux-x86-low.c (append_insns)
4557 (i386_install_fast_tracepoint_jump_pad)
4558 (amd64_write_goto_address, i386_write_goto_address): Update.
4559 * linux-s390-low.c (append_insns, s390_write_goto_address):
4560 Update.
4561 * linux-ppc-low.c (ppc_relocate_instruction)
4562 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4563 (ppc_write_goto_address): Update.
4564 * linux-aarch64-low.c (append_insns): Update.
4565 * target.h (struct target_ops): Update.
4566 (write_inferior_memory): Don't declare.
4567 * target.c (target_write_memory): Rename from
4568 write_inferior_memory. Remove old target_write_memory.
4569
4570 2019-08-15 Tom Tromey <tromey@adacore.com>
4571
4572 * target.c (write_inferior_memory): Use std::vector.
4573
4574 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4575
4576 PR build/24886
4577 * configure.ac: Drop enable-libmcheck support.
4578 * configure, config.in: Rebuild.
4579 * acinclude.m4: Don't include it.
4580
4581 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4582
4583 * configure.srv: Remove Arm xml files.
4584
4585 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4586
4587 * configure.srv: Add new files. Remove xml generated files.
4588 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4589 registers.
4590 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4591 * linux-aarch32-tdesc.c: New file.
4592 * linux-aarch32-tdesc.h: New file.
4593 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4594 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4595 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4596 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4597 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4598 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4599 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4600 (arm_read_description): Call arm_linux_read_description.
4601 (initialize_low_arch): Don't init registers.
4602 * linux-arm-tdesc.c: New file.
4603 * linux-arm-tdesc.h: New file.
4604
4605 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4606
4607 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4608 Move counter inside for.
4609 (arm_read_description): Check ptrace earlier.
4610 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4611
4612 2019-07-09 Tom Tromey <tom@tromey.com>
4613
4614 * configure: Rebuild.
4615 * configure.ac: Change common to gdbsupport.
4616 * acinclude.m4: Change common to gdbsupport.
4617 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4618 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4619 common to gdbsupport.
4620 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4621 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4622 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4623 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4624 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4625 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4626 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4627 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4628 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4629 common to gdbsupport.
4630
4631 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4632
4633 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4634 defines.
4635 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4636
4637 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4638
4639 * configure.srv: Remove legacy xml.
4640 * linux-aarch64-low.c (initialize_low_arch): Remove
4641 initialize_low_tdesc call.
4642 * linux-aarch64-tdesc-selftest.c: Remove file.
4643 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4644 * linux-x86-low.c (initialize_low_arch): Remove
4645 initialize_low_tdesc call.
4646 * linux-x86-tdesc-selftest.c: Remove file.
4647 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4648
4649 2019-06-20 Tom de Vries <tdevries@suse.de>
4650
4651 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4652 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4653
4654 2019-06-19 Tom de Vries <tdevries@suse.de>
4655
4656 * debug.h (debug_write): Change return type to ssize_t.
4657 * debug.c (debug_write): Same.
4658
4659 2019-06-14 Tom Tromey <tom@tromey.com>
4660
4661 * configure.ac: Use new path to gnulib.
4662 * configure: Rebuild.
4663 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4664 to gnulib.
4665
4666 2019-06-11 Tom Tromey <tom@tromey.com>
4667
4668 * Makefile.in (SFILES): Add alloc.c.
4669 (OBS): Add alloc.o.
4670 (IPA_OBJS): Add alloc-ipa.o.
4671 (alloc-ipa.o): New target.
4672 (%.o: ../%.c): New pattern rule.
4673
4674 2019-06-10 Tom Tromey <tromey@adacore.com>
4675
4676 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4677 end warning with a newline.
4678 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4679 newline.
4680 * thread-db.c (attach_thread): Don't end warning with a newline.
4681 (thread_db_notice_clone): Likewise.
4682 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4683 newline.
4684 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4685 end warning with a newline.
4686
4687 2019-06-04 Pedro Alves <palves@redhat.com>
4688
4689 * server.c (captured_main): Use make_unique_xstrdup.
4690
4691 2019-06-02 Tom Tromey <tom@tromey.com>
4692
4693 * gdbreplay.c (fromhex): Remove.
4694 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4695
4696 2019-05-29 Tom Tromey <tromey@adacore.com>
4697
4698 * configure: Rebuild.
4699
4700 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4701
4702 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4703 sign extension code on 32-bit builds.
4704
4705 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4706
4707 * remote-utils.c:
4708 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4709
4710 2019-04-19 Tom Tromey <tom@tromey.com>
4711
4712 * server.c (struct vstop_notif): Derive from notif_event.
4713 <base>: Remove.
4714 (queue_stop_reply): Update.
4715 (remove_all_on_match_ptid): Change type. Rewrite.
4716 (discard_queued_stop_replies): Rewrite.
4717 (in_queued_stop_replies_ptid): Change type.
4718 (in_queued_stop_replies): Rewrite.
4719 (notif_stop): Update.
4720 (queue_stop_reply_callback): Update.
4721 (captured_main): Don't call initialize_notif.
4722 (push_stop_notification): Update.
4723 * notif.c (notif_write_event, handle_notif_ack)
4724 (notif_event_enque, notif_push): Update.
4725 (notif_event_xfree, initialize_notif): Remove.
4726 * notif.h (struct notif_event): Include <list>, not
4727 "common/queue.h".
4728 (struct notif_server) <queue>: Now a std::list.
4729 (notif_event_p): Remove typedef.
4730 (initialize_notif): Don't declare.
4731 (struct notif_event): Add virtual destructor.
4732
4733 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4734
4735 * ax.c (ax_vdebug): Call debug_printf.
4736 * debug.c (debug_write): New function.
4737 * debug.h (debug_write): New declaration.
4738 * linux-low.c (sigchld_handler): Call debug_write.
4739
4740 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4741
4742 * debug.c (debug_set_output): New function.
4743 (debug_vprintf): Send output to debug_file.
4744 (debug_flush): Likewise.
4745 * debug.h (debug_set_output): New declaration.
4746 * server.c (handle_monitor_command): Add debug-file option.
4747 (captured_main): Likewise.
4748
4749 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4750
4751 * debug.c (remote_debug): Add definition.
4752 * debug.h (remote_debug): Add declaration.
4753 * hostio.c (remote_debug): Remove declaration.
4754 * remote-utils.c (struct ui_file): Likewise.
4755 (remote_debug): Likewise.
4756 * remote-utils.h (remote_debug): Likewise,
4757 * server.c (remote_debug): Remove definition.
4758
4759 2019-04-10 Kevin Buettner <kevinb@redhat.com>
4760
4761 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4762 when using a 64-bit gdbserver.
4763
4764 2019-04-09 Tom Tromey <tromey@adacore.com>
4765
4766 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4767
4768 2019-04-08 Tom Tromey <tom@tromey.com>
4769
4770 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4771 throw.
4772 (linux_resume_one_lwp): Likewise.
4773
4774 2019-04-08 Tom Tromey <tom@tromey.com>
4775
4776 * gdbreplay.c: Update.
4777 * linux-low.c: Update.
4778 * server.c: Update.
4779
4780 2019-04-08 Tom Tromey <tom@tromey.com>
4781
4782 * server.c: Use C++ exception handling.
4783 * linux-low.c: Use C++ exception handling.
4784 * gdbreplay.c: Use C++ exception handling.
4785
4786 2019-04-08 Tom Tromey <tom@tromey.com>
4787
4788 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4789 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4790 (captured_main, main): Update.
4791 * gdbreplay.c (main): Update.
4792
4793 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4794
4795 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4796 value in argument pointer, return 1 if the entry is found and 0
4797 otherwise. Move comment.
4798 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4799 * linux-low.h (linux_get_auxv): Declare.
4800 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4801
4802 2019-04-05 Tom Tromey <tromey@adacore.com>
4803
4804 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4805 variables.
4806
4807 2019-03-28 Alan Hayward <alan.hayward@arm.com>
4808
4809 * linux-low.c (AT_HWCAP2): Add define if not already included.
4810
4811 2019-03-26 Alan Hayward <alan.hayward@arm.com>
4812
4813 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4814 (aarch64_arch_setup): Call linux_get_hwcap.
4815 * linux-arm-low.c (arm_get_hwcap): Remove function.
4816 (arm_read_description): Call linux_get_hwcap.
4817 * linux-low.c (linux_get_auxv): New function.
4818 (linux_get_hwcap): Likewise.
4819 (linux_get_hwcap2): Likewise.
4820 * linux-low.h (linux_get_hwcap): New declaration.
4821 (linux_get_hwcap2): Likewise.
4822 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4823 (ppc_arch_setup): Call linux_get_hwcap.
4824 * linux-s390-low.c (s390_get_hwcap): Remove function.
4825 (s390_arch_setup): Call linux_get_hwcap.
4826
4827 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4828 Jiong Wang <jiong.wang@arm.com>
4829
4830 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4831 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4832 to fail.
4833 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4834
4835 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4836 Jiong Wang <jiong.wang@arm.com>
4837
4838 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4839 (aarch64_get_hwcap): New function.
4840 (aarch64_arch_setup): Read APIA hwcap.
4841
4842 2019-03-22 Alan Hayward <alan.hayward@arm.com>
4843 Jiong Wang <jiong.wang@arm.com>
4844
4845 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4846 (initialize_low_tracepoint): Likewise.
4847 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4848 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4849 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4850 (aarch64_linux_read_description): Likewise.
4851 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4852
4853 2019-03-12 John Baldwin <jhb@FreeBSD.org>
4854
4855 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4856 i386_create_target_description for 'segments' parameter.
4857 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4858 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4859 * win32-i386-low.c (i386_arch_setup): Likewise.
4860
4861 2019-03-12 Tom Tromey <tromey@adacore.com>
4862
4863 * linux-low.c (iterate_over_lwps): Update.
4864
4865 2019-03-06 Tom Tromey <tom@tromey.com>
4866
4867 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4868 (captured_main): Use SCOPE_EXIT.
4869
4870 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4871
4872 * configure.srv: Use '$enable_unittest' instead of '$development'
4873 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
4874 case.
4875
4876 2019-02-27 Tom Tromey <tromey@adacore.com>
4877
4878 * gdbreplay.c (logchar): Handle \r\n.
4879
4880 2019-02-07 Alan Hayward <alan.hayward@arm.com>
4881
4882 * linux-low.c (linux_attach): Add process before lwp.
4883 * server.c (attach_inferior): Check if already attached.
4884
4885 2019-02-07 Tom Tromey <tom@tromey.com>
4886
4887 * x86-tdesc.h: Rename include guard.
4888 * x86-low.h: Add include guard.
4889 * wincecompat.h: Rename include guard.
4890 * win32-low.h: Add include guard.
4891 * utils.h: Rename include guard.
4892 * tracepoint.h: Rename include guard.
4893 * tdesc.h: Rename include guard.
4894 * target.h: Rename include guard.
4895 * server.h: Rename include guard.
4896 * remote-utils.h: Rename include guard.
4897 * regcache.h: Rename include guard.
4898 * nto-low.h: Rename include guard.
4899 * notif.h: Add include guard.
4900 * mem-break.h: Rename include guard.
4901 * lynx-low.h: Add include guard.
4902 * linux-x86-tdesc.h: Add include guard.
4903 * linux-s390-tdesc.h: Add include guard.
4904 * linux-ppc-tdesc-init.h: Add include guard.
4905 * linux-low.h: Add include guard.
4906 * linux-aarch64-tdesc.h: Add include guard.
4907 * linux-aarch32-low.h: Add include guard.
4908 * inferiors.h: Rename include guard.
4909 * i387-fp.h: Rename include guard.
4910 * hostio.h: Rename include guard.
4911 * gdbthread.h: Rename include guard.
4912 * gdb_proc_service.h: Rename include guard.
4913 * event-loop.h: Rename include guard.
4914 * dll.h: Rename include guard.
4915 * debug.h: Rename include guard.
4916 * ax.h: Rename include guard.
4917
4918 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
4919
4920 PR gdb/23985
4921 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
4922 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
4923
4924 2019-01-25 Tom Tromey <tom@tromey.com>
4925
4926 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
4927
4928 2019-01-25 Tom Tromey <tom@tromey.com>
4929
4930 * win32-low.c: Fix common/ includes.
4931 * win32-i386-low.c: Fix common/ includes.
4932 * tracepoint.c: Fix common/ includes.
4933 * thread-db.c: Fix common/ includes.
4934 * target.h: Fix common/ includes.
4935 * symbol.c: Fix common/ includes.
4936 * spu-low.c: Fix common/ includes.
4937 * server.h: Fix common/ includes.
4938 * server.c: Fix common/ includes.
4939 * remote-utils.c: Fix common/ includes.
4940 * regcache.h: Fix common/ includes.
4941 * regcache.c: Fix common/ includes.
4942 * nto-x86-low.c: Fix common/ includes.
4943 * notif.h: Fix common/ includes.
4944 * mem-break.h: Fix common/ includes.
4945 * lynx-low.c: Fix common/ includes.
4946 * lynx-i386-low.c: Fix common/ includes.
4947 * linux-x86-tdesc-selftest.c: Fix common/ includes.
4948 * linux-x86-low.c: Fix common/ includes.
4949 * linux-low.c: Fix common/ includes.
4950 * inferiors.h: Fix common/ includes.
4951 * i387-fp.c: Fix common/ includes.
4952 * hostio.c: Fix common/ includes.
4953 * hostio-errno.c: Fix common/ includes.
4954 * gdbthread.h: Fix common/ includes.
4955 * gdbreplay.c: Fix common/ includes.
4956 * fork-child.c: Fix common/ includes.
4957 * event-loop.c: Fix common/ includes.
4958 * ax.c:
4959 (enum gdb_agent_op): Fix common/ includes.
4960
4961 2019-01-21 Tom Tromey <tom@tromey.com>
4962
4963 * tracepoint.c: Fix includes.
4964 * remote-utils.c: Fix includes.
4965 * linux-x86-low.c: Fix includes.
4966
4967 2019-01-01 Joel Brobecker <brobecker@adacore.com>
4968
4969 * gdbreplay.c (gdbreplay_version): Update copyright year in
4970 version message.
4971 * server.c (gdbserver_version): Likewise.
4972
4973 2018-12-05 Alan Hayward <alan.hayward@arm.com>
4974
4975 * linux-low.c (add_lwp): Switch ordering.
4976
4977 2018-11-29 Tom Tromey <tom@tromey.com>
4978
4979 * win32-low.c (win32_join): Take pid, not process.
4980 * target.h (struct target_ops) <join>: Change argument type.
4981 (join_inferior): Change argument name.
4982 * spu-low.c (spu_join): Take pid, not process.
4983 * server.c (handle_detach): Preserve pid before destroying
4984 process.
4985 * lynx-low.c (lynx_join): Take pid, not process.
4986 * linux-low.c (linux_join): Take pid, not process.
4987
4988 2018-11-23 Alan Hayward <alan.hayward@arm.com>
4989
4990 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
4991 (aarch64_cannot_fetch_register): Likewise.
4992 (struct linux_target_ops): Update references.
4993
4994 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4995
4996 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4997
4998 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4999
5000 * configure.srv (ipa_ppc_linux_regobj): Add
5001 powerpc-isa207-htm-vsx32l-ipa.o and
5002 powerpc-isa207-htm-vsx64l-ipa.o.
5003 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5004 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5005 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5006 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5007 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5008 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5009 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5010 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5011 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5012 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5013 (init_registers_powerpc_isa207_htm_vsx32l)
5014 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5015 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5016 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5017 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5018 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5019 (ppc_store_tm_ctarregset): New functions.
5020 (ppc_regsets): Add entries for HTM regsets.
5021 (ppc_arch_setup): Set htm in features struct when needed. Set
5022 sizes for the HTM regsets.
5023 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5024 (initialize_low_arch): Call
5025 init_registers_powerpc_isa207_htm_vsx32l and
5026 init_registers_powerpc_isa207_htm_vsx64l.
5027 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5028 PPC_TDESC_ISA207_HTM_VSX.
5029 (initialize_low_tracepoint): Call
5030 init_registers_powerpc_isa207_htm_vsx32l and
5031 init_registers_powerpc_isa207_htm_vsx64l.
5032
5033 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5034
5035 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5036 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5037 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5038 (ppc_store_pmuregset): New functions.
5039 (ppc_regsets): Add entries for ebb and pmu regsets.
5040 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5041 pmu regsets are available. Set sizes for these regsets.
5042
5043 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5044
5045 * configure.srv (ipa_ppc_linux_regobj): Add
5046 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5047 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5048 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5049 rs6000/powerpc-isa207-vsx32l.xml, and
5050 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5051 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5052 <PPC_TDESC_ISA207_VSX>: New enum value.
5053 (init_registers_powerpc_isa207_vsx32l): Declare.
5054 (init_registers_powerpc_isa207_vsx64l): Declare.
5055 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5056 (ppc_store_tarregset): New function.
5057 (ppc_regsets): Add entry for the TAR regset.
5058 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5059 size for the TAR regsets.
5060 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5061 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5062 and init_registers_powerpc_isa207_vsx64l.
5063 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5064 (initialize_low_tracepoint): Call
5065 init_registers_powerpc_isa207_vsx32l and
5066 init_registers_powerpc_isa207_vsx64l.
5067
5068 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5069 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5070
5071 * configure.srv (ipa_ppc_linux_regobj): Add
5072 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5073 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5074 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5075 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5076 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5077 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5078 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5079 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5080 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5081 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5082 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5083 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5084 (ppc_hwcap): Add comment.
5085 (ppc_hwcap2): New global.
5086 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5087 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5088 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5089 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5090 when needed. Set sizes for the the DSCR and PPR regsets.
5091 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5092 (initialize_low_arch): Call
5093 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5094 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5095 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5096 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5097 (initialize_low_tracepoint): Call
5098 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5099 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5100
5101 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5102
5103 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5104
5105 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5106 Simon Marchi <simark@simark.ca>
5107
5108 * acinclude.m4: Include "../selftest.m4".
5109 * configure: Regenerate.
5110 * configure.ac: Use "GDB_AC_SELFTEST".
5111 * configure.srv: Use "$enable_unittests" instead of
5112 "$development" when checking whether unit tests have been
5113 enabled.
5114 * server.c (captured_main): Update message informing that
5115 selftests have been disabled.
5116
5117 2018-10-04 Tom Tromey <tom@tromey.com>
5118
5119 * configure: Rebuild.
5120
5121 2018-10-04 Tom Tromey <tom@tromey.com>
5122
5123 * server.c (handle_status): Rename inner "thread".
5124 (process_serial_event): Declare "res" in 'm' case.
5125 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5126 (iterate_over_lwps): Rename inner "thread".
5127 (linux_qxfer_libraries_svr4): Rename inner "len".
5128 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5129
5130 2018-10-01 Gary Benson <gbenson@redhat.com>
5131
5132 * gdb_proc_service.h: Moved common code to
5133 common/gdb_proc_service.h.
5134
5135 2018-10-01 Gary Benson <gbenson@redhat.com>
5136
5137 * gdb_proc_service.h: Synchronize comments and whitespace with
5138 GDB's version of this file.
5139
5140 2018-09-25 Tom Tromey <tom@tromey.com>
5141
5142 * configure: Rebuild.
5143 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5144
5145 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5146
5147 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5148 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5149 ($(IPA_LIB)): Sort IPA_OBJS.
5150
5151 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5152
5153 * Makefile.in: Remove references to $(ADD_DEPS).
5154
5155 2018-09-16 Tom Tromey <tom@tromey.com>
5156
5157 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5158 variables.
5159 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5160 variables.
5161
5162 2018-09-05 Tom Tromey <tom@tromey.com>
5163
5164 * configure: Rebuild.
5165
5166 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5167
5168 PR build/23399
5169 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5170
5171 2018-08-27 Tom Tromey <tom@tromey.com>
5172
5173 PR build/23087:
5174 * configure: Rebuild.
5175
5176 2018-08-27 Tom Tromey <tom@tromey.com>
5177
5178 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5179 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5180 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5181 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5182 (s390x_emit_stack_adjust): Add casts to unsigned char.
5183
5184 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5185
5186 PR gdb/23374
5187 PR gdb/23375
5188 * server.h (struct client_state) <disable_randomization>:
5189 Initialize to 1.
5190
5191 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5192
5193 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5194 variable.
5195 (mips_supply_ptrace_register): Likewise.
5196
5197 2018-07-22 Tom Tromey <tom@tromey.com>
5198
5199 * configure: Rebuild.
5200
5201 2018-07-22 Tom Tromey <tom@tromey.com>
5202
5203 * win32-low.c (win32_create_inferior): Remove unused variables.
5204 * gdbreplay.c (remote_open): Remove unused variable.
5205 * remote-utils.c (remote_prepare): Remove unused variable.
5206 * x86-tdesc.h (X86_TDESC_H): Define.
5207 (amd64_expedite_regs): Define conditionally.
5208 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5209 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5210 * remote-utils.c (readchar): Remove unused variable.
5211
5212 2018-07-13 Pedro Alves <palves@redhat.com>
5213
5214 * linux-low.c (linux_kill): Change parameter to process_info
5215 pointer instead of pid. Adjust.
5216 * lynx-low.c (lynx_kill): Likewise.
5217 * nto-low.c (nto_kill): Likewise.
5218 * spu-low.c (spu_kill): Likewise.
5219 * win32-low.c (win32_kill): Likewise.
5220 * server.c (handle_v_kill, kill_inferior_callback)
5221 (detach_or_kill_for_exit): Adjust.
5222 * target.c (kill_inferior): Change parameter to process_info
5223 pointer instead of pid. Adjust.
5224 * target.h (struct target_ops) <kill>: Change parameter to
5225 process_info pointer instead of pid. Adjust all implementations
5226 and callers.
5227 (kill_inferior): Likewise.
5228
5229 2018-07-13 Pedro Alves <palves@redhat.com>
5230
5231 * linux-low.c (linux_detach, linux_join): Change parameter to
5232 process_info pointer instead of pid. Adjust.
5233 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5234 * nto-low.c (nto_detach): Likewise.
5235 * spu-low.c (spu_detach, spu_join): Likewise.
5236 * win32-low.c (win32_detach, win32_join): Likewise.
5237 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5238 * target.h (struct target_ops) <detach, join>: Change parameter to
5239 process_info pointer instead of pid. Adjust all implementations
5240 and callers.
5241 (detach_inferior, join_inferior): Rename 'pid' parameter to
5242 'proc'.
5243
5244 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5245 Jan Kratochvil <jan.kratochvil@redhat.com>
5246 Paul Fertser <fercerpav@gmail.com>
5247 Tsutomu Seki <sekiriki@gmail.com>
5248
5249 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5250 (OBS): Add 'common/netstuff.o'.
5251 (GDBREPLAY_OBS): Likewise.
5252 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5253 (remote_open): Implement support for IPv6
5254 connections.
5255 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5256 and 'wspiapi.h'.
5257 (handle_accept_event): Accept connections from IPv6 sources.
5258 (remote_prepare): Handle IPv6-style hostnames; implement
5259 support for IPv6 connections.
5260 (remote_open): Implement support for printing connections from
5261 IPv6 sources.
5262
5263 2018-07-11 Pedro Alves <palves@redhat.com>
5264
5265 PR gdb/23377
5266 * mem-break.c (any_persistent_commands): Add process_info
5267 parameter and use it instead of relying on the current process.
5268 Change return type to bool.
5269 * mem-break.h (any_persistent_commands): Add process_info
5270 parameter and change return type to bool.
5271 * server.c (handle_detach): Remove require_running_or_return call.
5272 Look up the process_info for the process we're about to detach.
5273 If not found, return back error to GDB. Adjust
5274 any_persistent_commands call to pass down a process pointer.
5275
5276 2018-07-11 Pedro Alves <palves@redhat.com>
5277
5278 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5279 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5280 instead of collect_register_by_name.
5281 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5282 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5283
5284 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5285 Pedro Alves <palves@redhat.com>
5286
5287 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5288
5289 2018-07-03 Tom Tromey <tom@tromey.com>
5290
5291 * linux-low.c: Update.
5292 * lynx-low.c: Update.
5293 * mem-break.c: Update.
5294 * nto-low.c: Update.
5295 * remote-utils.c: Update.
5296 * server.c: Update.
5297 * spu-low.c: Update.
5298 * target.c: Update.
5299 * win32-low.c: Update.
5300
5301 2018-07-03 Tom Tromey <tom@tromey.com>
5302
5303 * server.c: Update.
5304
5305 2018-07-03 Tom Tromey <tom@tromey.com>
5306
5307 * linux-low.c: Update.
5308
5309 2018-07-03 Tom Tromey <tom@tromey.com>
5310
5311 * target.c: Update.
5312
5313 2018-07-03 Tom Tromey <tom@tromey.com>
5314
5315 * linux-low.c: Update.
5316 * linux-mips-low.c: Update.
5317 * lynx-low.c: Update.
5318 * nto-low.c: Update.
5319 * remote-utils.c: Update.
5320 * server.c: Update.
5321 * spu-low.c: Update.
5322 * target.c: Update.
5323 * thread-db.c: Update.
5324
5325 2018-07-03 Tom Tromey <tom@tromey.com>
5326
5327 * linux-low.c: Update.
5328 * linux-mips-low.c: Update.
5329 * lynx-low.c: Update.
5330 * mem-break.c: Update.
5331 * nto-low.c: Update.
5332 * remote-utils.c: Update.
5333 * server.c: Update.
5334 * spu-low.c: Update.
5335 * target.c: Update.
5336 * tracepoint.c: Update.
5337
5338 2018-07-03 Tom Tromey <tom@tromey.com>
5339
5340 * linux-low.c: Update.
5341 * linux-ppc-low.c: Update.
5342 * linux-x86-low.c: Update.
5343 * proc-service.c: Update.
5344 * server.c: Update.
5345 * spu-low.c: Update.
5346 * thread-db.c: Update.
5347 * win32-low.c: Update.
5348
5349 2018-07-03 Tom Tromey <tom@tromey.com>
5350
5351 * linux-low.c: Update.
5352 * lynx-low.c: Update.
5353 * nto-low.c: Update.
5354 * remote-utils.c: Update.
5355 * spu-low.c: Update.
5356 * thread-db.c: Update.
5357 * win32-low.c: Update.
5358
5359 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5360
5361 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5362 parameter in call to 'amd64_create_target_description'.
5363
5364 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5365
5366 * x86-tdesc.h: Remove executable permission flag.
5367
5368 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5369
5370 * configure.ac: Remove AC_PREREQ, add missing quoting.
5371 * configure: Re-generate.
5372 * config.in: Re-generate.
5373 * aclocal.m4: Re-generate.
5374
5375 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5376
5377 * tracepoint.h (current_traceframe): Remove declaration.
5378
5379 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5380
5381 * linux-aarch64-low.c (is_sve_tdesc): New function.
5382 (aarch64_sve_regs_copy_to_regcache): Likewise.
5383 (aarch64_sve_regs_copy_from_regcache): Likewise.
5384 (aarch64_regs_info): Add SVE checks.
5385 (initialize_low_arch): Initialize SVE.
5386
5387 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5388
5389 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5390
5391 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5392
5393 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5394 (initialize_low_tracepoint): Likewise
5395 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5396 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5397 param.
5398 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5399 checks.
5400 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5401
5402 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5403
5404 * server.h (PBUFSIZ): Increase size
5405
5406 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5407
5408 * regcache.c (regcache::raw_compare): New function.
5409 * regcache.h (regcache::raw_compare): New declaration.
5410
5411 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5412
5413 * regcache.c (new_register_cache): Use new.
5414 (free_register_cache): Use delete.
5415 (register_data): Use const.
5416 (supply_register): Move body inside regcache.
5417 (regcache::raw_supply): New override function.
5418 (collect_register): Move body inside regcache.
5419 (regcache::raw_collect): New override function.
5420 (regcache::get_register_status): New override function.
5421 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5422
5423 2018-06-09 Tom Tromey <tom@tromey.com>
5424
5425 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5426 declare queue.
5427 (event_queue): Use std::queue.
5428 (gdb_event_xfree): Remove.
5429 (initialize_event_loop, process_event, wait_for_event): Update.
5430
5431 2018-06-08 Stan Cox <scox@redhat.com>
5432
5433 * win32-low.c (win32_create_inferior): last_ptid and last_status
5434 moved to client_state.
5435
5436 2018-06-08 Pedro Alves <palves@redhat.com>
5437
5438 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5439 common/common-exceptions.o, common/common-utils.o,
5440 common/errors.o, common/print-utils.o and utils.o.
5441 * gdbreplay.c: Include "common-defs.h" instead of the two
5442 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5443 string.h or alloca.h.
5444 (perror_with_name): Delete.
5445 (remote_open): Use xstrdup instead of strdup.
5446 (main): Rename to ...
5447 (captured_main): ... this.
5448 (main): New.
5449
5450 2018-06-08 Tom Tromey <tom@tromey.com>
5451
5452 * linux-low.c (linux_low_read_btrace): Update.
5453
5454 2018-06-04 Stan Cox <scox@redhat.com>
5455
5456 * server.h (struct client_state): New.
5457 * server.c (cont_thread, general_thread, multi_process)
5458 (report_fork_events, report_vfork_events, report_exec_events)
5459 (report_thread_events, swbreak_feature, hwbreak_feature)
5460 (vCont_supported, disable_randomization, pass_signals)
5461 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5462 Moved to client_state.
5463 * remote-utils.c (remote_debug, noack_mode)
5464 (transport_is_reliable): Moved to client_state.
5465 * tracepoint.c (current_traceframe): Moved to client_state.
5466
5467 Update all callers.
5468 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5469 linux-low.c, remote-utils.h, target.c: Use client_state.
5470
5471 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5472
5473 * configure.srv: Add new c/h file.
5474
5475 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5476
5477 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5478 null VQ.
5479
5480 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5481
5482 * gdb.arch/mips-fpregset-core.exp: New test.
5483 * gdb.arch/mips-fpregset-core.c: New test source.
5484
5485 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5486
5487 PR server/23198
5488 * hostio.c (require_int): Do not report overflow for integers
5489 between 0xfffffff and 0x7fffffff.
5490
5491 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5492
5493 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5494 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5495 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5496 functions.
5497 (the_low_target): Wire them.
5498
5499 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5500
5501 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5502 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5503 mode. Call collect_register_by_name with vscr using
5504 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5505 (ppc_store_vrregset): Add and set vscr_offset variable as in
5506 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5507 vscr_offset.
5508
5509 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5510
5511 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5512 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5513 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5514
5515 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5516
5517 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5518 (ppc_store_vsxregset): Likewise.
5519 (ppc_fill_vrregset): Likewise.
5520 (ppc_store_vrregset): Likewise.
5521 (ppc_fill_evrregset): Likewise.
5522 (ppc_store_evrregset): Likewise.
5523 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5524 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5525 needed.
5526
5527 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5528
5529 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5530 wordsize of the inferior. Call ppc_linux_target_wordsize.
5531
5532 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5533
5534 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5535 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5536 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5537 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5538 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5539 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5540 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5541 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5542 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5543 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5544 (tdesc_powerpc_e500l): Remove.
5545 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5546 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5547 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5548 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5549 linux-ppc-tdesc.h.
5550 (ppc_arch_setup): Remove target description matching code. Fill a
5551 ppc_linux_features struct and call ppc_linux_match_description
5552 with it.
5553
5554 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5555
5556 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5557 width of the requested register exceeds the width of the
5558 `ptrace' data type.
5559 (mips_cannot_store_register): Likewise.
5560
5561 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5562
5563 * linux-mips-low.c (mips_fetch_register): New function. Update
5564 preceding comment.
5565 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5566 (the_low_target): Wire `mips_fetch_register'.
5567
5568 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5569
5570 * lynx-i386-low.c (LYNXOS_178): New macro.
5571 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5572 the layout on LynxOS-178.
5573 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5574 handle floating point registers that are not supported by
5575 LynxOS-178.
5576
5577 2018-05-10 Tom Tromey <tom@tromey.com>
5578
5579 * configure: Rebuild.
5580
5581 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5582
5583 PR server/23158:
5584 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5585 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5586 Use it to set the expedite_regs field in the given tdesc.
5587 * x86-tdesc.h: New file.
5588 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5589 Adjust following the addition of the new expedite_regs parameter
5590 to init_target_desc.
5591 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5592 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5593 (i386_linux_read_description, amd64_linux_read_description):
5594 Adjust following the addition of the new expedite_regs parameter
5595 to init_target_desc.
5596 * lynx-i386-low.c: #include "x86-tdesc.h".
5597 (lynx_i386_arch_setup): Adjust following the addition of the new
5598 expedite_regs parameter to init_target_desc.
5599 * nto-x86-low.c: #include "x86-tdesc.h".
5600 (nto_x86_arch_setup): Adjust following the addition of the new
5601 expedite_regs parameter to init_target_desc.
5602 * win32-i386-low.c: #include "x86-tdesc.h".
5603 (i386_arch_setup): Adjust following the addition of the new
5604 expedite_regs parameter to init_target_desc.
5605
5606 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5607
5608 PR server/23158:
5609 * win32-low.c (win32_create_inferior): Add call to my_wait
5610 setting last_status global.
5611
5612 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5613
5614 PR server/23158:
5615 * win32-low.c (create_process): Only call gdb_tilde_expand if
5616 inferior_cwd is not NULL.
5617
5618 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5619
5620 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5621 registers to the cache if their values have changed.
5622 (i387_xsave_to_cache): Provide default values for x87 control
5623 registers when these features are available, but disabled.
5624 * regcache.c (supply_register_by_name_zeroed): New function.
5625 * regcache.h (supply_register_by_name_zeroed): Declare new
5626 function.
5627
5628 2018-05-07 Tom Tromey <tom@tromey.com>
5629
5630 * configure: Rebuild.
5631
5632 2018-05-04 Tom Tromey <tom@tromey.com>
5633
5634 * configure: Rebuild.
5635
5636 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5637 Pedro Alves <palves@redhat.com>
5638
5639 * linux-aarch64-low.c (aarch64_stopped_data_address):
5640 Likewise.
5641
5642 2018-04-27 Tom Tromey <tom@tromey.com>
5643
5644 * configure: Rebuild.
5645
5646 2018-04-23 Tom Tromey <tom@tromey.com>
5647
5648 * configure: Rebuild.
5649
5650 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5651
5652 * Makefile.in (depcomp): Add "..".
5653 (all_deps_files): New and use it.
5654
5655 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5656
5657 * configure.srv (aarch64*-*-linux*): Don't include xml.
5658 (i[34567]86-*-cygwin*): Likewise.
5659 (i[34567]86-*-linux*): Likewise.
5660 (i[34567]86-*-lynxos*): Likewise.
5661 (i[34567]86-*-mingw32ce*): Likewise.
5662 (i[34567]86-*-mingw*): Likewise.
5663 (i[34567]86-*-nto*): Likewise.
5664 (tic6x-*-uclinux): Likewise.
5665 (x86_64-*-linux*): Likewise.
5666 (x86_64-*-mingw*): Likewise.
5667 (x86_64-*-cygwin*): Likewise.
5668
5669 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5670
5671 * tdesc.c: Remove xml parameter.
5672
5673 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5674
5675 * server.c (get_features_xml): Remove cast.
5676 * tdesc.c (void target_desc::accept): Fill in function.
5677 (tdesc_get_features_xml): Remove old xml creation.
5678 (print_xml_feature::visit_pre): Add xml vistor.
5679 * tdesc.h (struct target_desc): Make xmltarget mutable.
5680 (tdesc_get_features_xml): Remove declaration.
5681
5682 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5683
5684 * tdesc.c (tdesc_architecture_name): Add new function.
5685 (tdesc_osabi_name): Likewise.
5686 (tdesc_get_features_xml): Use new functions.
5687
5688 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5689
5690 * tdesc.c (tdesc_create_flags): Remove.
5691 (tdesc_add_flag): Likewise.
5692 (tdesc_named_type): Likewise.
5693 (tdesc_create_union): Likewise.
5694 (tdesc_create_struct): Likewise.
5695 (tdesc_create_vector): Likewise.
5696 (tdesc_add_bitfield): Likewise.
5697 (tdesc_add_field): Likewise.
5698 (tdesc_set_struct_size): Likewise.
5699
5700 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5701
5702 * tdesc.c (~target_desc): Remove implictly deleted items.
5703 (init_target_desc): Iterate all features.
5704 (tdesc_get_features_xml): Use vector.
5705 (tdesc_create_feature): Create feature.
5706 * tdesc.h (tdesc_feature) Remove
5707 (target_desc): Add features.
5708
5709 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5710
5711 * Makefile.in: Add common/tdesc.c
5712 * tdesc.c (init_target_desc): init all reg_defs from register
5713 vector.
5714 (tdesc_create_reg): Create tdesc_reg.
5715 * tdesc.h (tdesc_feature): Add register vector.
5716
5717 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5718
5719 * tdesc.h (struct target_desc) <features>: Change type to
5720 std::vector<std::string>.
5721 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5722 changes.
5723 (tdesc_get_features_xml): Likewise.
5724 (tdesc_create_feature): Likewise.
5725
5726 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5727
5728 * regcache.c (find_register_by_number): Return a ref.
5729 (find_regno): Use references.
5730 (register_size): Likewise.
5731 (register_data): Likewise.
5732 * tdesc.c (target_desc::~target_desc): Remove free calls.
5733 (target_desc::operator==): Use std::vector compare.
5734 (init_target_desc): Use reference.
5735 (tdesc_create_reg): Use reg constructors.
5736 * tdesc.h (struct target_desc): Replace pointer with object.
5737
5738 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5739
5740 * regcache.c (find_register_by_number): Make static.
5741 (find_regno): Use find_register_by_number
5742 * regcache.h (struct reg): Remove declaration.
5743
5744 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5745
5746 * tdesc.c (target_desc::~target_desc): Move to here.
5747 (target_desc::operator==): Likewise.
5748 * tdesc.h (target_desc::~target_desc): Move from here.
5749 (target_desc::operator==): Likewise.
5750
5751 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5752
5753 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5754
5755 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5756
5757 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5758 S390_TDESC_GS.
5759 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5760 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5761 and init_registers_s390_gs_linux64.
5762
5763 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5764
5765 * linux-s390-low.c (s390_fill_gs): Remove function.
5766 (s390_fill_gsbc): Remove function.
5767 (s390_regsets): Set fill functions for the guarded storage regsets
5768 to NULL.
5769
5770 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5771
5772 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5773 the word size. Add comment.
5774 (s390_get_wordsize): New function.
5775 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5776 pswm with it. Instead, use s390_get_wordsize to determine the
5777 word size first and derive the correct tdesc from that directly.
5778
5779 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5780
5781 * Makefile.in: Include silent-rules.mk.
5782 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5783 (COMPILE): Add ECHO_CXX.
5784 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5785 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5786 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5787 (version-generated.c): Add ECHO_GEN.
5788 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5789 (IPAGENT_COMPILE): Add ECHO_CXX.
5790 (%-generated.c): Add ECHO_REGDAT.
5791
5792 2018-03-14 Tom Tromey <tom@tromey.com>
5793
5794 PR cli/14977:
5795 * ax.c (ax_printf): Special case for NULL.
5796
5797 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5798
5799 * linux-low.c (linux_qxfer_libraries_svr4): Use
5800 xml_escape_text_append.
5801
5802 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5803
5804 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5805
5806 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5807
5808 * server.c (handle_general_set): Remove unnecessary xstrdup.
5809
5810 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5811
5812 * server.c (parse_debug_format_options): Adjust to
5813 delim_string_to_char_ptr_vec changes.
5814 * thread-db.c (thread_db_load_search): Adjust to
5815 dirnames_to_char_ptr_vec changes.
5816
5817 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5818
5819 * target.h (target_enable_btrace, target_disable_btrace)
5820 (target_read_btrace, target_read_btrace_conf): Turn macro into
5821 inline function. Throw error if target method is not defined.
5822 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5823 check for btrace target method. Be prepared to handle exceptions
5824 from btrace target methods.
5825
5826 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5827
5828 * server.c (captured_main): Change order of error message printed
5829 when the current working directory cannot be found.
5830
5831 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5832
5833 * server.c: Include "filenames.h" and "pathstuff.h".
5834 (program_name): Delete variable.
5835 (program_path): New anonymous class.
5836 (get_exec_wrapper): Use "program_path" instead of
5837 "program_name".
5838 (handle_v_run): Likewise.
5839 (captured_main): Likewise.
5840 (process_serial_event): Likewise.
5841
5842 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5843
5844 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5845 (OBJS): Add "pathstuff.o".
5846 * server.c (current_directory): New global variable.
5847 (captured_main): Initialize "current_directory".
5848
5849 2018-02-26 Alan Hayward <alan.hayward@arm.com>
5850
5851 * tdesc.c: Use common/tdesc.h.
5852 * tdesc.h: Likewise.
5853
5854 2018-02-20 Alan Hayward <alan.hayward@arm.com>
5855 Simon Marchi <simon.marchi@ericsson.com>
5856
5857 * Makefile.in: Switch order of make rules.
5858
5859 2018-02-19 Alan Hayward <alan.hayward@arm.com>
5860
5861 * Makefile.in: Add common directory in build.
5862 * configure.ac: Add common reference.
5863 * configure: Regenerate.
5864
5865 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5866
5867 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5868 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5869 * spu-low.c (spu_target_ops): Likewise.
5870 * win32-low.c (win32_target_ops): Likewise.
5871 * server.c (supported_btrace_packets): Report packets unconditionally.
5872 * target.h (target_ops) <supports_btrace>: Remove.
5873 (target_supports_btrace): Remove.
5874
5875 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5876
5877 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
5878 (handle_btrace_disable): Change return type to void. Use exceptions
5879 to report errors.
5880 (handle_btrace_general_set): Catch exception and copy message to
5881 return message.
5882
5883 2018-02-08 Tom Tromey <tom@tromey.com>
5884
5885 * linux-low.c (install_software_single_step_breakpoints): Use
5886 make_scoped_restore.
5887 * inferiors.c (make_cleanup_restore_current_thread): Remove.
5888 (do_restore_current_thread_cleanup): Remove.
5889 * gdbthread.h (make_cleanup_restore_current_thread): Don't
5890 declare.
5891
5892 2018-02-08 Tom Tromey <tom@tromey.com>
5893
5894 * mem-break.c (set_raw_breakpoint_at): Use
5895 gdb::unique_xmalloc_ptr.
5896
5897 2018-01-30 Pedro Alves <palves@redhat.com>
5898
5899 PR gdb/13211
5900 * target.c (target_terminal::terminal_state): Rename to ...
5901 (target_terminal::m_terminal_state): ... this.
5902
5903 2018-01-19 James Clarke <jrtc27@jrtc27.com>
5904
5905 * linux-low.c (handle_extended_wait): Surround call to
5906 thread_db_notice_clone with #ifdef USE_THREAD_DB.
5907
5908 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
5909
5910 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
5911 linux_ptrace_attach_fail_reason_string now returning an
5912 std::string.
5913 (linux_attach): Likewise.
5914 * thread-db.c (attach_thread): Likewise.
5915
5916 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
5917
5918 PR gdb/21559
5919 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
5920 checking for fs_base/gs_base fields in struct user_regs_struct.
5921 * configure: Regenerate.
5922
5923 2018-01-16 Yao Qi <yao.qi@linaro.org>
5924
5925 PR gdb/18749
5926 * linux-low.c (fetch_register): Call supply_register instead of
5927 error.
5928
5929 2018-01-08 Yao Qi <yao.qi@linaro.org>
5930 Simon Marchi <simon.marchi@ericsson.com>
5931
5932 * Makefile.in (OBS): Remove selftest.o.
5933 * configure.ac: Set srv_selftest_objs if $development is true.
5934 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
5935 * configure: Re-generated.
5936 * server.c (captured_main): Wrap variable selftest_filter with
5937 GDB_SELF_TEST.
5938
5939 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
5940
5941 * server.c (parse_debug_format_options): Return std::string.
5942 (handle_monitor_command, captured_main): Adjust.
5943
5944 2018-01-05 Pedro Alves <palves@redhat.com>
5945
5946 PR gdb/18653
5947 * server.c (captured_main): Pass quiet=false to
5948 save_original_signals_state.
5949
5950 2018-01-01 Joel Brobecker <brobecker@adacore.com>
5951
5952 * gdbreplay.c (gdbreplay_version): Update copyright year in
5953 version message.
5954 * server.c (gdbserver_version): Likewise.
5955
5956 2017-12-08 Tom Tromey <tom@tromey.com>
5957
5958 * ax.c (ax_printf): Update.
5959
5960 2017-12-07 Yao Qi <yao.qi@linaro.org>
5961
5962 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
5963 aarch64_linux_read_description.
5964 * linux-amd64-ipa.c (idx2mask): New array.
5965 (get_ipa_tdesc): Move idx2mask out.
5966 (initialize_low_tracepoint): Initialize target descriptions.
5967 * linux-i386-ipa.c (idx2mask): New array.
5968 (get_ipa_tdesc): Move idx2mask out.
5969 (initialize_low_tracepoint): Initialize target descriptions.
5970
5971 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
5972
5973 * tdesc.c (struct tdesc_type): Change return type.
5974 (tdesc_add_flag): Change parameter type.
5975 (tdesc_add_bitfield): Likewise.
5976 (tdesc_add_field): Likewise.
5977 (tdesc_set_struct_size): Likewise.
5978
5979 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
5980
5981 * regcache.c (registers_to_string): Remove unused variable.
5982
5983 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5984
5985 * inferiors.c (for_each_inferior_with_data): Remove.
5986 * inferiors.h (for_each_inferior_with_data): Remove.
5987 * server.c (handle_qxfer_threads_worker): Change parameter type.
5988 (handle_qxfer_threads_proper): Use for_each_thread.
5989
5990 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
5991
5992 * inferiors.c (for_each_inferior): Remove.
5993 (clear_inferiors): Use for_each_thread.
5994 * inferiors.h (for_each_inferior): Remove.
5995 * linux-low.c (linux_wait_for_event_filtered): Use
5996 for_each_thread.
5997 (linux_stabilize_threads): Likewise.
5998 * regcache.c (regcache_release): Likewise.
5999 * server.c (gdb_wants_all_threads_stopped): Likewise.
6000 (clear_pending_status_callback): Remove.
6001 (handle_status): Use for_each_thread.
6002 (captured_main): Likewise.
6003 * win32-low.c (child_init_thread_list): Likewise.
6004 (win32_clear_inferiors): Likewise.
6005 (fake_breakpoint_event): Likewise.
6006
6007 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6008
6009 * inferiors.h (find_inferior): Remove.
6010 * inferiors.c (find_inferior): Remove.
6011
6012 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6013
6014 * linux-low.c (resume_status_pending_p): Update comment.
6015 (need_step_over_p): Update comment.
6016
6017 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6018
6019 * linux-low.c (proceed_one_lwp): Return void, change parameter
6020 type.
6021 (unsuspend_and_proceed_one_lwp): Likewise.
6022 (proceed_all_lwps): Use for_each_thread.
6023 (unstop_all_lwps): Likewise.
6024
6025 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6026
6027 * linux-low.c (linux_resume_one_thread): Return void, take
6028 parameter directly.
6029 (linux_resume): Use for_each_thread.
6030
6031 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6032
6033 * linux-low.c (send_sigstop_callback): Return void, change
6034 parameter type. Rename to...
6035 (send_sigstop): ... this.
6036 (suspend_and_send_sigstop_callback): Return void, change parameter
6037 type. Rename to...
6038 (suspend_and_send_sigstop): ... this.
6039 (stop_all_lwps): Use for_each_thread.
6040
6041 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6042
6043 * linux-low.c (lwp_running): Return bool, remove unused
6044 argument.
6045 (linux_stabilize_threads): Use find_thread.
6046
6047 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6048
6049 * linux-low.c (select_singlestep_lwp_callback): Remove.
6050 (count_events_callback): Remove.
6051 (select_event_lwp_callback): Remove.
6052 (select_event_lwp): Use find_thread/for_each_thread.
6053
6054 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6055
6056 * linux-low.c (not_stopped_callback): Return bool, take filter
6057 argument directly.
6058 (linux_wait_for_event_filtered): Use find_thread.
6059 (linux_wait_1): Likewise.
6060
6061 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6062
6063 * linux-low.c (same_lwp): Remove.
6064 (find_lwp_pid): Use find_thread.
6065
6066 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6067
6068 * linux-low.c (delete_lwp_callback): Remove.
6069 (linux_mourn): Use for_each_thread.
6070
6071 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6072
6073 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6074 args parameter, don't check for pid.
6075 (linux_detach): Use for_each_thread.
6076
6077 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6078
6079 * linux-low.c (struct counter): Remove.
6080 (second_thread_of_pid_p): Remove.
6081 (last_thread_of_process_p): Use find_thread.
6082
6083 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6084
6085 * inferiors.c (find_inferior_in_random): Remove.
6086 * inferiors.h (find_inferior_in_random): Remove.
6087 * linux-low.c (status_pending_p_callback): Return bool, accept
6088 parameter ptid directly.
6089 (linux_wait_for_event_filtered): Use find_thread_in_random.
6090 (linux_wait_1): Likewise.
6091
6092 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6093
6094 * inferiors.c (find_inferior_id): Remove.
6095 (find_thread_ptid): Move implemention from find_inferior_id to
6096 here.
6097 * inferiors.h (find_inferior_id): Remove.
6098 * server.c (handle_status): Use find_thread_ptid.
6099 (process_serial_event): Likewise.
6100 * thread-db.c (find_one_thread): Likewise.
6101 (thread_db_thread_handle): Likewise.
6102 * win32-low.c (thread_rec): Likewise.
6103 (child_delete_thread): Likewise.
6104 (win32_thread_alive): Likewise.
6105 (get_child_debug_event): Likewise.
6106
6107 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6108
6109 * linux-mips-low.c (update_watch_registers_callback): Return
6110 void, remove pid_p parameter, don't check for pid.
6111 (mips_insert_point, mips_remove_point): Use for_each_thread.
6112
6113 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6114
6115 * lynx.low (lynx_delete_thread_callback): Remove.
6116 (lynx_mourn): Use for_each_thread.
6117
6118 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6119
6120 * regcache.c (regcache_invalidate_one): Remove.
6121 (regcache_invalidate_pid): use for_each_thread.
6122
6123 2017-11-26 Tom Tromey <tom@tromey.com>
6124
6125 * linux-low.c (linux_create_inferior): Update.
6126
6127 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6128
6129 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6130
6131 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6132
6133 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6134 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6135 * linux-aarch64-tdesc-selftest.c: New file.
6136 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6137
6138 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6139
6140 * configure.srv: Add new file.
6141 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6142 * linux-aarch64-tdesc-selftest.c: New file.
6143 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6144
6145 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6146
6147 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6148 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6149 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6150
6151 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6152
6153 * configure.srv: Add new files.
6154 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6155 aarch64_linux_read_description.
6156 * linux-aarch64-low.c (aarch64_linux_read_description):
6157 Merge with aarch64_arch_setup.
6158 (aarch64_arch_setup): Call aarch64_linux_read_description.
6159 * linux-aarch64-tdesc.c: New file.
6160 * linux-aarch64-tdesc.h: New file.
6161
6162 2017-11-24 Yao Qi <yao.qi@linaro.org>
6163
6164 * configure.srv: Set $srv_regobj for tic6x-linux.
6165 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6166 (tic6x_read_description): Move some code to tic6x_arch_setup.
6167 (tic6x_tdesc_test): New function.
6168 (initialize_low_arch): Call selftests::register_test.
6169
6170 2017-11-22 Yao Qi <yao.qi@linaro.org>
6171
6172 * remote-utils.c (prepare_resume_reply): Use memcpy.
6173
6174 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6175
6176 * linux-low.c (kill_one_lwp_callback): Return void, take
6177 argument directly, don't filter on pid.
6178 (linux_kill): Use for_each_thread.
6179
6180 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6181
6182 * linux-low.c (need_step_over_p): Return bool, remove dummy
6183 argument.
6184 (linux_resume, proceed_all_lwps): Use find_thread.
6185
6186 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6187
6188 * linux-low.c (resume_status_pending_p): Return bool, remove
6189 flag_p argument.
6190 (linux_resume): Use find_thread.
6191
6192 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6193
6194 * linux-low.c (struct thread_resume_array): Remove.
6195 (linux_set_resume_request): Return void, take arguments
6196 directly.
6197 (linux_resume): Use for_each_thread.
6198
6199 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6200
6201 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6202 return bool, remove data argument.
6203 (linux_stabilize_threads): Use find_thread.
6204
6205 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6206
6207 * linux-low.c (unsuspend_one_lwp): Remove.
6208 (unsuspend_all_lwps): Use for_each_thread, inline code from
6209 unsuspend_one_lwp.
6210
6211 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6212
6213 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6214 * linux-low.c (struct iterate_over_lwps_args): Remove.
6215 (iterate_over_lwps_filter): Remove.
6216 (iterate_over_lwps): Use find_thread.
6217
6218 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6219
6220 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6221 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6222 code from reset_lwp_ptrace_options_callback.
6223
6224 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6225
6226 * linux-arm-low.c (struct update_registers_data): Remove.
6227 (update_registers_callback): Return void, take arguments
6228 directly, don't check thread's pid.
6229 (arm_insert_point, arm_remove_point): Use for_each_thread.
6230
6231 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6232
6233 * win32-low.c (continue_one_thread): Return void, take argument
6234 directly.
6235 (child_continue): Use for_each_thread.
6236
6237 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6238
6239 * win32-i386-low.c (update_debug_registers_callback): Rename
6240 to ...
6241 (update_debug_registers): ... this, return void, remove pid_p arg.
6242 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6243
6244 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6245
6246 * inferiors.h (struct process_info): Add constructor, initialize
6247 fields..
6248 <syscalls_to_catch>: Change type to std::vector<int>.
6249 * inferiors.c (add_process): Allocate process_info with new.
6250 (remove_process): Free process_info with delete.
6251 * linux-low.c (handle_extended_wait): Adjust.
6252 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6253 * server.c (handle_general_set): Adjust.
6254
6255 2017-11-16 Pedro Alves <palves@redhat.com>
6256
6257 * remote-utils.c (remote_close): Block SIGIO signals instead of
6258 uninstalling the SIGIO handler.
6259
6260 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6261
6262 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6263
6264 2017-11-16 Yao Qi <yao.qi@linaro.org>
6265
6266 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6267 (tic6x_store_gregset): Likewise.
6268 (tic6x_usrregs_info): Move it up.
6269
6270 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6271
6272 * Makefile.in: Update arch rules.
6273 * configure.srv: Explicitly mark arch/ files.
6274
6275 2017-11-13 Andreas Schwab <schwab@suse.de>
6276
6277 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6278 function.
6279 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6280
6281 2017-11-06 Pedro Alves <palves@redhat.com>
6282
6283 * config.in, configure: Regenerate.
6284
6285 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6286
6287 * target.c (struct thread_search): Remove.
6288 (thread_search_callback): Remove.
6289 (prepare_to_access_memory): Use for_each_thread instead of
6290 find_inferior. Inline code from thread_search_callback.
6291
6292 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6293
6294 * server.c (struct visit_actioned_threads_data): Remove.
6295 (visit_actioned_threads): Change prototype to take arguments
6296 directly.
6297 (resume): Use find_thread instead of find_inferior.
6298
6299 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6300
6301 * server.c (queue_stop_reply_callback): Change prototype, return
6302 void.
6303 (find_status_pending_thread_callback): Remove.
6304 (handle_status): Replace find_inferior with find_thread and
6305 for_each_thread.
6306
6307 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6308
6309 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6310 with REGNO.
6311 (aarch64_store_gregset): Likewise.
6312 (aarch64_fill_fpregset): Likewise.
6313 (aarch64_store_fpregset): Likewise.
6314
6315 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6316
6317 * gdbthread.h (find_thread, for_each_thread): New functions.
6318 * inferiors.c (thread_of_pid): Remove.
6319 (find_any_thread_of_pid): Use find_thread.
6320 * linux-low.c (num_lwps): Use for_each_thread.
6321
6322 2017-10-17 Yao Qi <yao.qi@linaro.org>
6323
6324 * Makefile.in: Remove one rule.
6325 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6326
6327 2017-10-17 Yao Qi <yao.qi@linaro.org>
6328
6329 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6330 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6331
6332 2017-10-17 Yao Qi <yao.qi@linaro.org>
6333
6334 * configure.srv: Rename arm.o with arch/arm.o.
6335
6336 2017-10-17 Yao Qi <yao.qi@linaro.org>
6337
6338 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6339 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6340 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6341 (arch-i386.o, arch-amd64.o): Remove rules.
6342 (arch/%.o): New rule.
6343 Update POSTCOMPILE and COMPILE.pre.
6344 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6345 * configure: Re-generated.
6346 * configure.srv: Replace arch-i386.o with arch/i386.o.
6347 Replace arch-amd64.o with arch/amd64.o.
6348
6349 2017-10-16 Yao Qi <yao.qi@linaro.org>
6350
6351 * configure: Regenerated.
6352
6353 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6354
6355 * inferiors.h: (struct inferior_list): Remove.
6356 (struct inferior_list_entry); Remove.
6357 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6358 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6359 get_first_inferior): Remove.
6360 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6361 find_inferior_id, find_inferior_in_random): Change signature.
6362 * inferiors.c (all_threads): Change type to
6363 std::list<thread_info *>.
6364 (get_thread): Remove macro.
6365 (find_inferior, find_inferior_id): Change signature, implement
6366 using find_thread.
6367 (find_inferior_in_random): Change signature, implement using
6368 find_thread_in_random.
6369 (for_each_inferior, for_each_inferior_with_data): Change
6370 signature, implement using for_each_thread.
6371 (add_inferior_to_list, remove_inferior): Remove.
6372 (add_thread, get_first_thread, thread_of_pid,
6373 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6374 (get_first_inferior, one_inferior_p, clear_inferior_list):
6375 Remove.
6376 (clear_inferiors, get_thread_process): Update.
6377 * gdbthread.h: Include <list>.
6378 (struct thread_info) <entry>: Remove field.
6379 <id>: New field.
6380 (all_threads): Change type to std::list<thread_info *>.
6381 (get_first_inferior): Add doc.
6382 (find_thread, for_each_thread, find_thread_in_random): New
6383 functions.
6384 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6385 * linux-arm-low.c (update_registers_callback): Update.
6386 * linux-low.c (second_thread_of_pid_p): Update.
6387 (kill_one_lwp_callback, linux_detach_lwp_callback,
6388 delete_lwp_callback, status_pending_p_callback, same_lwp,
6389 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6390 iterate_over_lwps, not_stopped_callback,
6391 resume_stopped_resumed_lwps, count_events_callback,
6392 select_singlestep_lwp_callback, select_event_lwp_callback,
6393 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6394 suspend_and_send_sigstop_callback, wait_for_sigstop,
6395 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6396 lwp_running, linux_set_resume_request, resume_status_pending_p,
6397 need_step_over_p, start_step_over, linux_resume_one_thread,
6398 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6399 reset_lwp_ptrace_options_callback): Update.
6400 * linux-mips-low.c (update_watch_registers_callback): Update.
6401 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6402 Update.
6403 (free_register_cache_thread_one): Remove.
6404 (regcache_release): Update.
6405 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6406 handle_qxfer_threads_worker): Update.
6407 (handle_query): Update, use list iterator.
6408 (visit_actioned_threads, handle_pending_status,
6409 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6410 clear_pending_status_callback, set_pending_status_callback,
6411 find_status_pending_thread_callback, handle_status,
6412 process_serial_event): Update.
6413 * target.c (thread_search_callback): Update.
6414 * thread-db.c (thread_db_get_tls_address): Update.
6415 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6416 Update.
6417 * win32-i386-low.c (update_debug_registers_callback): Update.
6418 * win32-low.c (delete_thread_info, child_delete_thread,
6419 continue_one_thread, suspend_one_thread,
6420 get_child_debug_event): Adjust.
6421
6422 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6423
6424 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6425 * inferiors.h: Include <list>.
6426 (struct process_info) <entry>: Remove field.
6427 <pid>: New field.
6428 (pid_of): Change macro to function.
6429 (ptid_of, lwpid_of): Remove macro.
6430 (all_processes): Change type to std::list<process_info *>.
6431 (ALL_PROCESSES): Remove macro.
6432 (for_each_process, find_process): New function.
6433 * inferiors.c (all_processes): Change type to
6434 std::list<process_info *>.
6435 (find_thread_process): Adjust.
6436 (add_process): Likewise.
6437 (remove_process): Likewise.
6438 (find_process_pid): Likewise.
6439 (get_first_process): Likewise.
6440 (started_inferior_callback): Remove.
6441 (have_started_inferiors_p): Adjust.
6442 (attached_inferior_callback): Remove.
6443 (have_attached_inferiors_p): Adjust.
6444 * linux-low.c (check_zombie_leaders): Likewise.
6445 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6446 (x86_linux_update_xmltarget): Adjust.
6447 * server.c (handle_query): Likewise.
6448 (gdb_reattached_process): Remove.
6449 (handle_status): Adjust.
6450 (kill_inferior_callback): Likewise.
6451 (detach_or_kill_inferior): Remove.
6452 (print_started_pid): Likewise.
6453 (print_attached_pid): Likewise.
6454 (detach_or_kill_for_exit): Update.
6455 (process_serial_event): Likewise.
6456 * linux-arm-low.c (arm_new_fork): Likewise.
6457
6458 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6459
6460 * dll.h: Include <list>.
6461 (struct dll_info): Add constructor.
6462 <entry>: Remove field.
6463 (all_dlls): Change type to std::list<dll_info>.
6464 * dll.c: Include <algorithm>.
6465 (get_dll): Remove macro.
6466 (all_dlls): Change type to std::list<dll_info *>.
6467 (free_one_dll): Remove.
6468 (match_dll): Likewise.
6469 (loaded_dll): Adjust.
6470 (unloaded_dll): Adjust to all_dlls type change, use
6471 std::find_if. Inline code from match_dll.
6472 (clear_dlls): Adjust to all_dlls type change.
6473 * server.c (emit_dll_description): Remove.
6474 (handle_qxfer_libraries): Adjust to all_dlls type change,
6475 integrate emit_dll_description's functionality.
6476
6477 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6478
6479 * linux-low.h (struct linux_target_ops) <delete_process>: New
6480 field.
6481 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6482 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6483 (struct linux_target_ops): Add delete_process callback.
6484 * linux-arm-low.c (arm_delete_process): New.
6485 (struct linux_target_ops): Add delete_process callback.
6486 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6487 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6488 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6489 * linux-mips-low.c (mips_linux_delete_process): New.
6490 (struct linux_target_ops): Add delete_process callback.
6491 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6492 * linux-s390-low.c (struct linux_target_ops): Likewise.
6493 * linux-sh-low.c (struct linux_target_ops): Likewise.
6494 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6495 * linux-tile-low.c (struct linux_target_ops): Likewise.
6496 * linux-x86-low.c (x86_linux_delete_process): New.
6497 (struct linux_target_ops): Add delete_process callback.
6498 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6499
6500 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6501
6502 * linux-aarch64-low.c (the_low_target): Add thread delete
6503 callback.
6504 * linux-arm-low.c (arm_delete_thread): New function.
6505 (the_low_target): Add thread delete callback.
6506 * linux-bfin-low.c (the_low_target): Likewise.
6507 * linux-crisv32-low.c (the_low_target): Likewise.
6508 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6509 set.
6510 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6511 field.
6512 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6513 * linux-mips-low.c (mips_linux_delete_thread): New function.
6514 (the_low_target): Add thread delete callback.
6515 * linux-ppc-low.c (the_low_target): Likewise.
6516 * linux-s390-low.c (the_low_target): Likewise.
6517 * linux-sh-low.c (the_low_target): Likewise.
6518 * linux-tic6x-low.c (the_low_target): Likewise.
6519 * linux-tile-low.c (the_low_target): Likewise.
6520 * linux-x86-low.c (the_low_target): Likewise.
6521 * linux-xtensa-low.c (the_low_target): Likewise.
6522
6523 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6524
6525 * win32-low.c: Include "common-inferior.h".
6526
6527 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6528
6529 * inferiors.c (set_inferior_cwd): New function.
6530 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6531 (handle_query): Inform that QSetWorkingDir is supported.
6532 * win32-low.c (create_process): Pass the inferior's cwd to
6533 CreateProcess.
6534
6535 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6536
6537 * inferiors.c (current_inferior_cwd): New global variable.
6538 (get_inferior_cwd): New function.
6539 * inferiors.h (struct process_info) <cwd>: New field.
6540
6541 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6542
6543 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6544 (OBS): Add gdb_tilde_expand.o.
6545
6546 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6547
6548 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6549 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6550
6551 2017-09-29 Pedro Alves <palves@redhat.com>
6552
6553 * ax.c (gdb_parse_agent_expr): Constify.
6554 * ax.h (gdb_parse_agent_expr): Constify.
6555 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6556 Constify.
6557 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6558 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6559 * remote-utils.h (read_ptid): Constify.
6560 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6561 (process_point_options, process_serial_event): Constify.
6562 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6563 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6564 (cmd_qtbuffer): Constify.
6565
6566 2017-09-29 Pedro Alves <palves@redhat.com>
6567
6568 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6569 fails.
6570
6571 2017-09-29 Pedro Alves <palves@redhat.com>
6572
6573 * linux-low.c (handle_extended_wait): Pass parent thread instead
6574 of process to thread_db_notice_clone.
6575 * linux-low.h (thread_db_notice_clone): Replace parent process
6576 parameter with parent thread parameter.
6577 * thread-db.c (find_one_thread): Add comment.
6578 (thread_db_notice_clone): Replace parent process parameter with
6579 parent thread parameter. Temporarily switch to the parent thread.
6580
6581 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6582
6583 * gdbthread.h: Include "common-gdbthread.h".
6584 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6585 "if" when validating the ptid.
6586 * remote-utils.c: Include "gdbthread.h".
6587 (prepare_resume_reply): Use "switch_to_thread".
6588 * target.c (done_accessing_memory): Likewise.
6589
6590 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6591
6592 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6593 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6594 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6595 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6596 s390x-gs-linux64-ipa.o to ipa_obj.
6597 * linux-s390-low.c (HWCAP_S390_GS): New define.
6598 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6599 New functions.
6600 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6601 (s390_arch_setup): Check for guarded-storage support and choose
6602 appropriate tdesc.
6603 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6604 init_registers_s390x_gs_linux64.
6605 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6606 enum value.
6607 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6608 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6609
6610 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6611
6612 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6613
6614 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6615
6616 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6617 (thread_db_thread_handle): Declare.
6618 * linux-low.c (linux_target_ops): Initialize thread_handle.
6619 * server.c (handle_qxfer_threads_worker): Add support for
6620 "handle" attribute.
6621 * target.h (struct target_ops): Add new function pointer,
6622 thread_handle.
6623 (target_thread_handle): Define.
6624 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6625 field in lwp.
6626 (thread_db_thread_handle): New function.
6627
6628 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6629
6630 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6631 * linux-low.h (thread_db_notice_clone): Declare.
6632 * thread-db.c (thread_db_notice_clone): New function.
6633
6634 2017-09-21 Pedro Alves <palves@redhat.com>
6635
6636 * server.c (gdb_read_memory, handle_status, process_serial_event)
6637 (handle_serial_event, handle_target_event): Adjust to
6638 set_desired_thread prototype change.
6639 * target.c (set_desired_thread): Remove 'use_general' parameter
6640 and adjust.
6641 * target.h (set_desired_thread): Remove 'use_general' parameter.
6642
6643 2017-09-20 Tom Tromey <tom@tromey.com>
6644
6645 * target.c (target_terminal::terminal_state): Define.
6646 (target_terminal::init): Rename from target_terminal_init.
6647 (target_terminal::inferior): Rename from
6648 target_terminal_inferior.
6649 (target_terminal::ours): Rename from target_terminal_ours.
6650 (target_terminal::ours_for_output, target_terminal::info): New.
6651
6652 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6653
6654 * server.c (accumulate_file_name_length): Remove.
6655 (emit_dll_description): Adjust to std::string change.
6656 (handle_qxfer_libraries): Use std::string to hold document.
6657
6658 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6659
6660 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6661 return type of xml_escape_text.
6662 * server.c (emit_dll_description): Likewise.
6663
6664 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6665
6666 * server.c (captured_main): Accept argument for --selftest.
6667 Update run_tests call.
6668 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6669 when registering selftests.
6670
6671 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6672
6673 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6674 instead of "VEC" for "target_desc.reg_defs".
6675 (regcache_cpy): Likewise.
6676 (registers_to_string): Likewise.
6677 (registers_from_string): Likewise.
6678 (find_regno): Likewise.
6679 (supply_regblock): Likewise.
6680 (regcache_raw_read_unsigned): Likewise.
6681 * tdesc.c (init_target_desc): Likewise.
6682 (tdesc_create_reg): Likewise.
6683 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6684 (struct target_desc) <reg_defs>: Convert to "std::vector".
6685 (target_desc): Do not initialize "reg_defs".
6686 (~target_desc): Update code to use "std::vector" instead of "VEC"
6687 for "target_desc.reg_defs".
6688 (operator==): Likewise.
6689
6690 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6691
6692 * inferiors.h (thread_to_gdb_id): Remove.
6693 * inferiors.c (thread_to_gdb_id): Remove.
6694 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6695 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6696 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6697 Likewise.
6698 * nto-low.c (nto_fetch_registers, nto_store_registers,
6699 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6700
6701 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6702
6703 * inferiors.h (gdb_id_to_thread_id): Remove.
6704 * inferiors.c (gdb_id_to_thread_id): Remove.
6705 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6706 removal. Move pid declaration closer to where it's used.
6707
6708 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6709
6710 * server.c (handle_detach): New function.
6711 (process_serial_event): Move code out, call handle_detach.
6712
6713 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6714
6715 * server.c (require_running): Rename to ...
6716 (require_running_or_return): ... this ...
6717 (require_running_or_break): ... and this.
6718 (handle_query, process_serial_event): Adjust.
6719
6720 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6721
6722 * linux-low.c (linux_set_resume_request): Remove unused
6723 variables.
6724
6725 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6726
6727 * server.c (first_thread_of): Remove.
6728 (process_serial_event): Replace usage of first_thread_of with
6729 find_any_thread_of_pid.
6730 * tracepoint.c (same_process_p): Remove.
6731 (gdb_agent_about_to_close): Replace usage of same_process_p with
6732 find_any_thread_of_pid.
6733 * linux-x86-low.c (same_process_callback): Remove.
6734 (x86_arch_setup_process_callback): Replace usage of
6735 same_process_callback with find_any_thread_of_pid.
6736 * thread-db.c (any_thread_of): Remove.
6737 (switch_to_process): Replace usage of any_thread_of with
6738 find_any_thread_of_pid.
6739 * inferiors.c (thread_pid_matches_callback): Remove.
6740 (find_thread_process): Adjust to use find_any_thread_of_pid.
6741
6742 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6743
6744 * regcache.c (get_thread_regcache): Guard calls to "memset"
6745 with "!VEC_empty".
6746
6747 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6748
6749 * linux-low.c (handle_extended_wait): Use
6750 "allocate_target_description" instead of "XNEW".
6751 * linux-x86-low.c (initialize_low_arch): Likewise.
6752
6753 2017-09-05 Yao Qi <yao.qi@linaro.org>
6754
6755 * configure.srv (srv_i386_regobj): Remove.
6756 (srv_amd64_regobj): Remove.
6757 (srv_regobj): Set it to "" for x86 non-linux targets.
6758 * linux-x86-tdesc.c (i386_linux_read_description):
6759 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6760 (init_registers_i386): Remove the declaration.
6761 (tdesc_i386): Remove the declaration.
6762 (lynx_i386_arch_setup): Call i386_create_target_description.
6763 * nto-x86-low.c: Likewise.
6764 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6765 [!__x86_64__]: include arch/i386.h.
6766 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6767
6768 2017-09-05 Yao Qi <yao.qi@linaro.org>
6769
6770 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6771 i386/amd64-XXX-linux from it.
6772
6773 2017-09-05 Yao Qi <yao.qi@linaro.org>
6774
6775 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6776 false.
6777 (ipa_amd64_linux_regobj): Remove.
6778 (ipa_x32_linux_regobj): Remove.
6779
6780 2017-09-05 Yao Qi <yao.qi@linaro.org>
6781
6782 * Makefile.in (arch-amd64.o): New rule.
6783 * configure.srv: Append arch-amd64.o.
6784 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6785 (get_ipa_tdesc): Call amd64_linux_read_description.
6786 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6787 and init_registers_amd64_XXX.
6788 * linux-x86-low.c (x86_linux_read_description): Call
6789 amd64_linux_read_description.
6790 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6791 (initialize_low_arch): Don't call init_registers_x32_XXX and
6792 init_registers_amd64_XXX.
6793 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6794 and tdesc_amd64_XXX.
6795 [__x86_64__] (amd64_tdesc_test): New function.
6796 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6797 and init_registers_amd64_XXX.
6798 * linux-x86-tdesc.c: Include arch/amd64.h.
6799 (xcr0_to_tdesc_idx): New function.
6800 (i386_linux_read_description): New function.
6801 (amd64_get_ipa_tdesc_idx): New function.
6802 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6803 (amd64_get_ipa_tdesc): Declare.
6804
6805 2017-09-05 Yao Qi <yao.qi@linaro.org>
6806
6807 * configure.srv (srv_i386_linux_xmlfiles): Remove
6808 i386/i386-XXX-linux.xml from it.
6809
6810 2017-09-05 Yao Qi <yao.qi@linaro.org>
6811
6812 * configure.srv: Set srv_i386_linux_regobj empty if $development
6813 is false.
6814 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6815 initialize_low_tdesc.
6816 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6817 with #if initialize_low_tdesc.
6818 * linux-x86-tdesc-selftest.c: New file.
6819 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6820
6821 2017-09-05 Yao Qi <yao.qi@linaro.org>
6822
6823 * Makefile.in (arch-i386.o): New rule.
6824 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6825 (x86_64-*-linux*): Likewise.
6826 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6827 include arch/i386.h.
6828 (i386_linux_read_description): Remove code and call
6829 i386_create_target_description.
6830 * tdesc.c (allocate_target_description): New function.
6831 * tdesc.h (set_tdesc_architecture): Remove declaration.
6832 (set_tdesc_osabi): Likewise.
6833
6834 2017-09-05 Yao Qi <yao.qi@linaro.org>
6835
6836 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6837 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6838 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6839 .xmltarget.
6840 * server.c (get_features_xml): Call tdesc_get_features_xml.
6841 * tdesc.c (set_tdesc_architecture): New function.
6842 (set_tdesc_osabi): New function.
6843 (tdesc_get_features_xml): New function.
6844 (tdesc_create_feature): Add an argument.
6845 * tdesc.h (struct target_desc) <features>: New field.
6846 <arch, osabi>: New field.
6847 (~target_desc): xfree features, arch, and osabi.
6848 (target_desc::oerator==): Don't compare .xmltarget.
6849 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6850 (set_tdesc_osabi): Likewise.
6851 (tdesc_get_features_xml): Likewise.
6852
6853 2017-09-05 Yao Qi <yao.qi@linaro.org>
6854
6855 * linux-x86-tdesc.c: Include selftest.h.
6856 (i386_tdesc_test): New function.
6857 (initialize_low_tdesc): Call selftests::register_test.
6858 * tdesc.h: Include regdef.h.
6859 (target_desc): Override operator == and !=.
6860
6861 2017-09-05 Yao Qi <yao.qi@linaro.org>
6862
6863 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6864 (ipa_obj): Likewise.
6865 * linux-i386-ipa.c: Include common/x86-xstate.h
6866 (get_ipa_tdesc): Call i386_linux_read_description.
6867 (initialize_low_tracepoint): Don't call init_registers_XXX
6868 functions, call initialize_low_tdesc instead.
6869 * linux-x86-low.c (x86_linux_read_description): Call
6870 i386_linux_read_description.
6871 (initialize_low_arch): Don't call init_registers_i386_XXX
6872 functions, call initialize_low_tdesc.
6873 * linux-x86-tdesc.c: New file.
6874 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
6875 (i386_get_ipa_tdesc_idx): Declare.
6876 (i386_get_ipa_tdesc): Declare.
6877 (initialize_low_tdesc): Declare.
6878
6879 2017-09-05 Yao Qi <yao.qi@linaro.org>
6880
6881 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
6882 instead of 0.
6883
6884 2017-09-05 Yao Qi <yao.qi@linaro.org>
6885
6886 * Makefile.in (IPA_OBJS): Add vec-ipa.o
6887 * regcache.c (get_thread_regcache): Use VEC_length.
6888 (init_register_cache): Likewise.
6889 (regcache_cpy): Likewise.
6890 (registers_to_string): Iterate reg_defs via VEC_iterate.
6891 (find_regno): Likewise.
6892 (find_register_by_number): Use VEC_index.
6893 (register_size): Call find_register_by_number.
6894 (register_data): Call find_register_by_number.
6895 (supply_regblock): Use VEC_length.
6896 (regcache_raw_read_unsigned): Likewise.
6897 * tdesc.c (init_target_desc): Iterate reg_defs via
6898 VEC_iterate.
6899 (default_description): Update initializer.
6900 (copy_target_description): Don't update field num_registers.
6901 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
6902 <num_registers>: Remove.
6903
6904 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
6905
6906 * Makefile.in (.SECONDARY): Define target.
6907
6908 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
6909
6910 * linux-low.c (linux_wait_1): Adjust.
6911 * server.c (queue_stop_reply_callback): Adjust.
6912
6913 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
6914
6915 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
6916 QEnvironmentUnset and QEnvironmentReset packets.
6917 (handle_query): Inform remote that QEnvironmentHexEncoded,
6918 QEnvironmentUnset and QEnvironmentReset are supported.
6919
6920 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
6921
6922 * inferiors.h (inferior_target_data): Rename to ...
6923 (thread_target_data): ... this.
6924 (inferior_regcache_data): Rename to ...
6925 (thread_regcache_data): ... this.
6926 (set_inferior_regcache_data): Rename to ...
6927 (set_thread_regcache_data): ... this.
6928 * inferiors.c (inferior_target_data): Rename to ...
6929 (thread_target_data): ... this.
6930 (inferior_regcache_data): Rename to ...
6931 (thread_regcache_data): ... this.
6932 (set_inferior_regcache_data): Rename to ...
6933 (set_thread_regcache_data): ... this.
6934 (free_one_thread): Update.
6935 * linux-low.h (get_thread_lwp): Update.
6936 * regcache.c (get_thread_regcache): Update.
6937 (regcache_invalidate_thread): Update.
6938 (free_register_cache_thread): Update.
6939 * win32-i386-low.c (update_debug_registers_callback): Update.
6940 (win32_get_current_dr): Update.
6941 * win32-low.c (thread_rec): Update.
6942 (delete_thread_info): Update.
6943 (continue_one_thread): Update.
6944 (suspend_one_thread): Update.
6945
6946 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
6947
6948 * inferiors.c (set_inferior_target_data): Remove.
6949 * inferiors.h (set_inferior_target_data): Remove.
6950
6951 2017-08-18 Yao Qi <yao.qi@linaro.org>
6952
6953 * Makefile.in (OBS): Add selftest.o.
6954 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
6955 * configure, config.in: Re-generated.
6956 * server.c: Include common/sefltest.h.
6957 (captured_main): Handle option --selftest.
6958
6959 2017-08-09 Yao Qi <yao.qi@linaro.org>
6960
6961 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
6962 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
6963 i386-avx-mpx.o and i386-mmx.o.
6964 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
6965 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
6966 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
6967 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
6968 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
6969 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
6970 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
6971 i386/amd64-avx-mpx.xml.
6972
6973 2017-08-09 Yao Qi <yao.qi@linaro.org>
6974
6975 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
6976 and x32-avx-avx512.o.
6977 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
6978 i386/x32-avx-avx512.xml.
6979
6980 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
6981
6982 * tracepoint.h (enum class fast_tpoint_collect_result): New
6983 enumeration.
6984 (fast_tracepoint_collecting): Change return type to
6985 fast_tpoint_collect_result.
6986 * tracepoint.c (fast_tracepoint_collecting): Likewise.
6987 * linux-low.h: Include tracepoint.h.
6988 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
6989 fast_tpoint_collect_result.
6990 * linux-low.c (handle_tracepoints): Adjust.
6991 (linux_fast_tracepoint_collecting): Change return type to
6992 fast_tpoint_collect_result.
6993 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
6994 linux_wait_1, stuck_in_jump_pad_callback,
6995 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
6996 proceed_one_lwp): Adjust to type change.
6997
6998 2017-07-10 Yao Qi <yao.qi@linaro.org>
6999
7000 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7001
7002 2017-06-29 Yao Qi <yao.qi@linaro.org>
7003
7004 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7005 Remove.
7006 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7007
7008 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7009
7010 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7011
7012 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7013
7014 * linux-low.c (linux_create_inferior): Adjust code to access the
7015 environment information via 'gdb_environ' class.
7016 * lynx-low.c (lynx_create_inferior): Likewise.
7017 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7018 (get_environ): Return a pointer to 'our_environ'.
7019 (captured_main): Initialize 'our_environ'.
7020 * server.h (get_environ): Adjust prototype.
7021 * spu-low.c (spu_create_inferior): Adjust code to access the
7022 environment information via 'gdb_environ' class.
7023
7024 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7025
7026 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7027 usage of "register" keyword.
7028
7029 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7030
7031 * configure: Re-generate.
7032
7033 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7034
7035 * configure: Re-generate.
7036
7037 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7038
7039 * Makefile.in (COMPILE.pre): Add "-x c++".
7040
7041 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7042
7043 * fork-child.c: Conditionally include <signal.h>.
7044
7045 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7046
7047 * server.c (handle_general_set): Handle new packet
7048 "QStartupWithShell".
7049 (handle_query): Add "QStartupWithShell" to the list of supported
7050 packets.
7051 (gdbserver_usage): Add help text explaining the
7052 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7053 options.
7054 (captured_main): Recognize and act upon the presence of the new
7055 CLI options.
7056
7057 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7058 Pedro Alves <palves@redhat.com>
7059
7060 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7061 * configure: Regenerate.
7062 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7063 "fork-inferior.o".
7064 (i[34567]86-*-lynxos*): Likewise.
7065 (spu*-*-*): Likewise.
7066 * fork-child.c: New file.
7067 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7068 and "environ.h".
7069 (linux_ptrace_fun): New function.
7070 (linux_create_inferior): Adjust function prototype to reflect
7071 change on "target.h". Adjust function code to use
7072 "fork_inferior".
7073 (linux_request_interrupt): Delete "signal_pid".
7074 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7075 (lynx_ptrace_fun): New function.
7076 (lynx_create_inferior): Adjust function prototype to reflect
7077 change on "target.h". Adjust function code to use
7078 "fork_inferior".
7079 * nto-low.c (nto_create_inferior): Adjust function prototype and
7080 code to reflect change on "target.h". Update comments.
7081 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7082 "common-terminal.h" and "environ.h".
7083 (terminal_fd): Moved to fork-child.c.
7084 (old_foreground_pgrp): Likewise.
7085 (restore_old_foreground_pgrp): Likewise.
7086 (last_status): Make it global.
7087 (last_ptid): Likewise.
7088 (our_environ): New variable.
7089 (startup_with_shell): Likewise.
7090 (program_name): Likewise.
7091 (program_argv): Rename to...
7092 (program_args): ...this.
7093 (wrapper_argv): New variable.
7094 (start_inferior): Delete function.
7095 (get_exec_wrapper): New function.
7096 (get_exec_file): Likewise.
7097 (get_environ): Likewise.
7098 (prefork_hook): Likewise.
7099 (post_fork_inferior): Likewise.
7100 (postfork_hook): Likewise.
7101 (postfork_child_hook): Likewise.
7102 (handle_v_run): Update code to deal with arguments coming from the
7103 remote host. Update calls from "start_inferior" to
7104 "create_inferior".
7105 (captured_main): Likewise. Initialize environment variable. Call
7106 "have_job_control".
7107 * server.h (post_fork_inferior): New prototype.
7108 (get_environ): Likewise.
7109 (last_status): Declare.
7110 (last_ptid): Likewise.
7111 (signal_pid): Likewise.
7112 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7113 (spu_ptrace_fun): New function.
7114 (spu_create_inferior): Adjust function prototype to reflect change
7115 on "target.h". Adjust function code to use "fork_inferior".
7116 * target.c (target_terminal_init): New function.
7117 (target_terminal_inferior): Likewise.
7118 (target_terminal_ours): Likewise.
7119 * target.h: Include <vector>.
7120 (struct target_ops) <create_inferior>: Update prototype.
7121 (create_inferior): Update macro.
7122 * utils.c (gdb_flush_out_err): New function.
7123 * win32-low.c (win32_create_inferior): Adjust function prototype
7124 and code to reflect change on "target.h".
7125
7126 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7127
7128 * inferiors.c (switch_to_thread): New function.
7129
7130 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7131
7132 * Makefile.in (SFILE): Add "common/job-control.c".
7133 (OBS): Add "job-control.o".
7134
7135 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7136
7137 * Makefile: Remove "@host_makefile_frag@".
7138
7139 2017-05-05 Pedro Alves <palves@redhat.com>
7140
7141 * configure: Regenerate.
7142
7143 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7144
7145 * configure: Regenerate.
7146
7147 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7148
7149 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7150 software_single_step change of return type to
7151 std::vector<CORE_ADDR>.
7152 * linux-low.c (install_software_single_step_breakpoints):
7153 Likewise.
7154 * linux-low.h (install_software_single_step_breakpoints):
7155 Likewise.
7156
7157 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7158
7159 * remote-utils.c: Include "gdb_termios.h" instead of
7160 "terminal.h".
7161 * terminal.h: Delete file.
7162
7163 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7164
7165 * server.c: Include <vector>.
7166 <program_argv, wrapper_argv>: Convert to std::vector.
7167 (start_inferior): Rewrite function to use C++.
7168 (handle_v_run): Likewise. Update code that calculates the argv
7169 based on the vRun packet; use C++.
7170 (captured_main): Likewise.
7171
7172 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7173
7174 * server.c (handle_v_cont): Initialize thread_resume::thread
7175 with null_ptid.
7176
7177 2017-04-05 Pedro Alves <palves@redhat.com>
7178
7179 * configure: Regenerate.
7180
7181 2017-04-05 Pedro Alves <palves@redhat.com>
7182
7183 * gdbreplay.c (sync_error): Constify.
7184 * linux-x86-low.c (push_opcode): Constify.
7185
7186 2017-04-05 Pedro Alves <palves@redhat.com>
7187
7188 * win32-low.c (get_child_debug_event)
7189 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7190 Report TARGET_WAITKIND_SPURIOUS instead.
7191
7192 2017-04-05 Pedro Alves <palves@redhat.com>
7193
7194 * remote-utils.c (remote_prepare, remote_open): Constify.
7195 * remote-utils.h (remote_prepare, remote_open): Constify.
7196 * server.c (captured_main): Constify 'port' handling.
7197
7198 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7199
7200 * Makefile.in (clean): Clear .deps.
7201
7202 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7203
7204 * .gitignore: Remove generated files, replace with wildcard.
7205 * (clean): Replace removal of generated files with wildcard.
7206 (version.c): Replace with...
7207 (version-generated.c): ...this.
7208 (xml-builtin.c): Replace with...
7209 (xml-builtin-generated.c): ...this.
7210 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7211 (%.c: *regformats*): Replace with...
7212 (%-generated.c: *regformats*): ...this.
7213
7214 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7215
7216 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7217 (xtensa_fill_gregset): Call collect_register_by_name for
7218 threadptr register.
7219 (xtensa_store_gregset): Call supply_register_by_name for
7220 threadptr register.
7221
7222 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7223
7224 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7225 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7226 (xtensa_store_gregset): Call supply_register for all registers in
7227 a0_regnum..a0_regnum + C0_NREGS range.
7228
7229 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7230
7231 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7232 (ax-ipa.o: ax.c): Remove.
7233 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7234 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7235 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7236 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7237 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7238
7239 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7240
7241 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7242 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7243 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7244 (errors-ipa.o: ../common/errors.c): Remove.
7245 (format-ipa.o: ../common/format.c): Remove.
7246 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7247
7248 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7249
7250 * Makefile.in (%-ipa.o: %.c): New rule.
7251 (tracepoint-ipa.o: tracepoint.c): Remove.
7252 (utils-ipa.o: utils.c): Remove.
7253 (remote-utils-ipa.o: remote-utils.c): Remove.
7254 (regcache-ipa.o: regcache.c): Remove.
7255 (i386-linux-ipa.o: i386-linux.c): Remove.
7256 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7257 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7258 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7259 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7260 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7261 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7262 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7263 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7264 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7265 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7266 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7267 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7268 (aarch64-ipa.o: aarch64.c): Remove.
7269 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7270 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7271 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7272 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7273 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7274 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7275 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7276 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7277 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7278 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7279 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7280 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7281 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7282 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7283 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7284 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7285 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7286 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7287 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7288 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7289 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7290 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7291 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7292 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7293 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7294 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7295 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7296 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7297 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7298 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7299 (tdesc-ipa.o: tdesc.c): Remove.
7300 (x32-linux-ipa.o: x32-linux.c): Remove.
7301 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7302 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7303
7304 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7305
7306 * Makefile.in (%.o: ../arch/%.c): New rule.
7307 (arm.o: ../arch/arm.c): Remove.
7308 (arm-linux.o: ../arch/arm-linux.c): Remove.
7309 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7310 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7311
7312 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7313
7314 * Makefile.in (%.o: ../nat/%.c): New rule.
7315 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7316 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7317 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7318 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7319 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7320 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7321 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7322 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7323 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7324 (linux-personality.o: ../nat/linux-personality.c): Remove.
7325 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7326 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7327 (x86-linux.o: ../nat/x86-linux.c): Remove.
7328 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7329 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7330
7331 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7332
7333 * Makefile.in (%.o: ../common/%.c): New rule.
7334 (signals.o: ../common/signals.c): Remove.
7335 (print-utils.o: ../common/print-utils.c): Remove.
7336 (rsp-low.o: ../common/rsp-low.c): Remove.
7337 (common-utils.o: ../common/common-utils.c): Remove.
7338 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7339 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7340 (vec.o: ../common/vec.c): Remove.
7341 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7342 (xml-utils.o: ../common/xml-utils.c): Remove.
7343 (ptid.o: ../common/ptid.c): Remove.
7344 (buffer.o: ../common/buffer.c): Remove.
7345 (format.o: ../common/format.c): Remove.
7346 (filestuff.o: ../common/filestuff.c): Remove.
7347 (agent.o: ../common/agent.c): Remove.
7348 (errors.o: ../common/errors.c): Remove.
7349 (environ.o: ../common/environ.c): Remove.
7350 (common-debug.o: ../common/common-debug.c): Remove.
7351 (cleanups.o: ../common/cleanups.c): Remove.
7352 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7353 (fileio.o: ../common/fileio.c): Remove.
7354 (common-regcache.o: ../common/common-regcache.c): Remove.
7355 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7356 (new-op.o: ../common/new-op.c): Remove.
7357 (btrace-common.o: ../common/btrace-common.c): Remove.
7358
7359 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7360
7361 * Makefile.in (%.o: ../target/%.c): New rule.
7362 (waitstatus.o: ../target/waitstatus.c): Remove.
7363
7364 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7365
7366 * Makefile.in
7367 (%.c: ../regformats/%.dat,
7368 (%.c: ../regformats/arm/%.dat,
7369 (%.c: ../regformats/i386/%.dat,
7370 (%.c: ../regformats/rs6000/%.dat): New rules.
7371 (aarch64.c): Remove.
7372 (reg-arm.c): Remove.
7373 (arm-with-iwmmxt.c): Remove.
7374 (arm-with-vfpv2.c): Remove.
7375 (arm-with-vfpv3.c): Remove.
7376 (arm-with-neon.c): Remove.
7377 (reg-bfin.c): Remove.
7378 (reg-cris.c): Remove.
7379 (reg-crisv32.c): Remove.
7380 (i386.c): Remove.
7381 (i386-linux.c): Remove.
7382 (i386-avx.c): Remove.
7383 (i386-avx-linux.c): Remove.
7384 (i386-avx-avx512.c): Remove.
7385 (i386-avx-avx512-linux.c): Remove.
7386 (i386-mpx.c): Remove.
7387 (i386-mpx-linux.c): Remove.
7388 (i386-avx-mpx-avx512-pku.c): Remove.
7389 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7390 (i386-avx-mpx.c): Remove.
7391 (i386-avx-mpx-linux.c): Remove.
7392 (i386-mmx.c): Remove.
7393 (i386-mmx-linux.c): Remove.
7394 (reg-ia64.c): Remove.
7395 (reg-m32r.c): Remove.
7396 (reg-m68k.c): Remove.
7397 (reg-cf.c): Remove.
7398 (mips-linux.c): Remove.
7399 (mips-dsp-linux.c): Remove.
7400 (mips64-linux.c): Remove.
7401 (mips64-dsp-linux.c): Remove.
7402 (nios2-linux.c): Remove.
7403 (powerpc-32.c): Remove.
7404 (powerpc-32l.c): Remove.
7405 (powerpc-altivec32l.c): Remove.
7406 (powerpc-cell32l.c): Remove.
7407 (powerpc-vsx32l.c): Remove.
7408 (powerpc-isa205-32l.c): Remove.
7409 (powerpc-isa205-altivec32l.c): Remove.
7410 (powerpc-isa205-vsx32l.c): Remove.
7411 (powerpc-e500l.c): Remove.
7412 (powerpc-64l.c): Remove.
7413 (powerpc-altivec64l.c): Remove.
7414 (powerpc-cell64l.c): Remove.
7415 (powerpc-vsx64l.c): Remove.
7416 (powerpc-isa205-64l.c): Remove.
7417 (powerpc-isa205-altivec64l.c): Remove.
7418 (powerpc-isa205-vsx64l.c): Remove.
7419 (s390-linux32.c): Remove.
7420 (s390-linux32v1.c): Remove.
7421 (s390-linux32v2.c): Remove.
7422 (s390-linux64.c): Remove.
7423 (s390-linux64v1.c): Remove.
7424 (s390-linux64v2.c): Remove.
7425 (s390-te-linux64.c): Remove.
7426 (s390-vx-linux64.c): Remove.
7427 (s390-tevx-linux64.c): Remove.
7428 (s390x-linux64.c): Remove.
7429 (s390x-linux64v1.c): Remove.
7430 (s390x-linux64v2.c): Remove.
7431 (s390x-te-linux64.c): Remove.
7432 (s390x-vx-linux64.c): Remove.
7433 (s390x-tevx-linux64.c): Remove.
7434 (tic6x-c64xp-linux.c): Remove.
7435 (tic6x-c64x-linux.c): Remove.
7436 (tic6x-c62x-linux.c): Remove.
7437 (reg-sh.c): Remove.
7438 (reg-sparc64.c): Remove.
7439 (reg-spu.c): Remove.
7440 (amd64.c): Remove.
7441 (amd64-linux.c): Remove.
7442 (amd64-avx.c): Remove.
7443 (amd64-avx-linux.c): Remove.
7444 (amd64-avx-avx512.c): Remove.
7445 (amd64-avx-avx512-linux.c): Remove.
7446 (amd64-mpx.c): Remove.
7447 (amd64-mpx-linux.c): Remove.
7448 (amd64-avx-mpx-avx512-pku.c): Remove.
7449 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7450 (amd64-avx-mpx.c): Remove.
7451 (amd64-avx-mpx-linux.c): Remove.
7452 (x32.c): Remove.
7453 (x32-linux.c): Remove.
7454 (x32-avx.c): Remove.
7455 (x32-avx-linux.c): Remove.
7456 (x32-avx-avx512.c): Remove.
7457 (x32-avx-avx512-linux.c): Remove.
7458 (reg-xtensa.c): Remove.
7459 (reg-tilegx.c): Remove.
7460 (reg-tilegx32.c): Remove.
7461
7462 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7463
7464 * Makefile.in (SFILES): Add "common/environ.c".
7465 (OBJS): Add "common/environ.h".
7466
7467 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7468
7469 * configure.ac: Check if the fs_base and gs_base members of
7470 `struct user_regs_struct' exist.
7471 * config.in: Regenerated.
7472 * configure: Likewise.
7473
7474 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7475
7476 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7477 target_read_memory.
7478 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7479 (get_next_pcs_syscall_next_pc): Likewise.
7480
7481 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7482
7483 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7484 * nto-x86-low.c: Likewise.
7485
7486 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7487
7488 * Makefile.in: Include disable-implicit-rules.mk.
7489
7490 2016-11-23 Pedro Alves <palves@redhat.com>
7491
7492 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7493 (debug_vprintf): Use std::chrono::steady_clock instead of
7494 gettimeofday. Use '.' instead of ':'.
7495 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7496 (get_timestamp): Use std::chrono::steady_clock instead of
7497 gettimeofday.
7498
7499 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7500
7501 * Makefile.in: Fix whitespace formatting.
7502
7503 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7504
7505 * Makefile.in (SFILES, OBS): Flatten list and order
7506 alphabetically.
7507
7508 2016-11-23 Pedro Alves <palves@redhat.com>
7509
7510 * event-loop.c (handle_file_event): Use warning.
7511 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7512 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7513 Use warning.
7514
7515 2016-11-23 Pedro Alves <palves@redhat.com>
7516
7517 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7518 output.
7519 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7520 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7521 debug_printf and debug_flush for debug output.
7522 * server.c (handle_general_set): Likewise.
7523 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7524 output.
7525
7526 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7527
7528 * Makefile.in (.c.o): Replace rule with ...
7529 (%.o: %.c): ... this one.
7530
7531 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7532
7533 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7534 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7535 make.
7536 * configure.ac: Remove checks for the make program.
7537 * configure: Re-generate.
7538
7539 2016-10-28 Pedro Alves <palves@redhat.com>
7540
7541 * Makefile.in (CXX_DIALECT): Get from configure.
7542 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7543 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7544 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7545 * config.in: Regenerate.
7546 * configure: Regenerate.
7547
7548 2016-10-27 Yao Qi <yao.qi@linaro.org>
7549
7550 * linux-low.c (linux_supports_range_stepping): Return true if
7551 can_software_single_step return true.
7552
7553 2016-10-27 Yao Qi <yao.qi@linaro.org>
7554
7555 * inferiors.c (find_inferior_in_random): New function.
7556 * inferiors.h (find_inferior_in_random): Declare.
7557 * linux-low.c (linux_wait_for_event_filtered): Call
7558 find_inferior_in_random instead of find_inferior.
7559
7560 2016-10-27 Yao Qi <yao.qi@linaro.org>
7561
7562 * linux-low.c (linux_wait_1): If single-step breakpoints are
7563 inserted, remove them.
7564
7565 2016-10-26 Pedro Alves <palves@redhat.com>
7566
7567 * linux-low.c (handle_extended_wait): Link parent/child fork
7568 threads.
7569 (linux_wait_1): Unlink them.
7570 (linux_set_resume_request): Ignore resume requests for
7571 already-resumed and unhandled fork child threads.
7572 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7573 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7574 New functions.
7575 (handle_v_requests) <vCont>: Don't call require_running.
7576 * server.h (in_queued_stop_replies): New declaration.
7577
7578 2016-10-24 Yao Qi <yao.qi@linaro.org>
7579
7580 PR server/20733
7581 * linux-aarch64-low.c (append_insns): Cast the return value to
7582 'uint32_t *'.
7583
7584 2016-10-10 Yao Qi <yao.qi@linaro.org>
7585
7586 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7587
7588 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7589
7590 * target.c (target_supports_multi_process): New function, moved
7591 from...
7592 * target.h (target_supports_multi_process): ... here. Remove
7593 macro.
7594
7595 2016-10-05 Tom Tromey <tom@tromey.com>
7596
7597 PR remote/20655:
7598 * tracepoint.c (handle_tracepoint_bkpts): Check
7599 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7600
7601 2016-10-05 Yao Qi <yao.qi@linaro.org>
7602
7603 * configure.srv: Update the path of arm-*.xml files.
7604
7605 2016-10-05 Terry Guo <terry.guo@arm.com>
7606 Yao Qi <yao.qi@linaro.org>
7607
7608 * Makefile.in: Adjust the path of rules.
7609 * configure.srv: Update the path of xml files.
7610 * regformats/arm-with-iwmmxt.dat: Regenerated.
7611 * regformats/arm-with-neon.dat: Likewise.
7612 * regformats/arm-with-vfpv2.dat: Likewise.
7613 * regformats/arm-with-vfpv3.dat Likewise.
7614
7615 2016-09-30 Yao Qi <yao.qi@linaro.org>
7616
7617 PR gdbserver/20627
7618 * target.c (target_stop_and_wait): Don't call
7619 target_continue_no_signal, use resume_stop instead.
7620
7621 2016-09-26 Yao Qi <yao.qi@linaro.org>
7622
7623 * linux-low.c (linux_wait_1): Call debug_exit.
7624
7625 2016-09-23 Pedro Alves <palves@redhat.com>
7626
7627 * Makefile.in (SFILES): Add common/new-op.c.
7628 (OBS): Add common/new-op.o.
7629 (new-op.o): New rule.
7630
7631 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7632
7633 * .gitinore: Ignore more files.
7634
7635 2016-09-21 Yao Qi <yao.qi@linaro.org>
7636
7637 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7638 23.
7639
7640 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7641
7642 * server.c (start_inferior): Call target_mourn_inferior instead of
7643 mourn_inferior; pass ptid_t argument to it.
7644 (resume): Likewise.
7645 (handle_target_event): Likewise.
7646 * target.c (target_mourn_inferior): New function.
7647 * target.h (mourn_inferior): Delete macro.
7648
7649 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7650
7651 * linux-low.c (lwp_is_stepping): New function.
7652
7653 2016-09-06 Carl Love <cel@us.ibm.com>
7654
7655 * server.c (start_inferior): Fixed comment, requested comment change
7656 didn't get updated correctly. Removed reference to ptrace () call as
7657 it is only true on Linux systems.
7658
7659 2016-09-06 Carl Love <cel@us.ibm.com>
7660
7661 * server.c (start_inferior): Do not call
7662 function target_post_create_inferior () if the
7663 inferior process has already exited.
7664
7665 2016-09-05 Pedro Alves <palves@redhat.com>
7666
7667 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7668 (COMPILE.pre, CC_LD): Use CXX directly.
7669 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7670 * acinclude.m4: Don't include build-with-cxx.m4.
7671 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7672 * configure: Regenerate.
7673
7674 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7675
7676 PR gdb/19495
7677 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7678 call writing data to own_buf.
7679
7680 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7681
7682 * target.c (mywait): Call target_wait instead of
7683 the_target->wait.
7684 (target_wait): New function.
7685
7686 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7687
7688 * server.c (start_inferior): New variable 'ptid'. Replace calls
7689 to the_target->resume by target_continue{,_no_signal}, depending
7690 on the case.
7691 * target.c (target_stop_and_wait): Call target_continue_no_signal
7692 instead of the_target->resume.
7693 (target_continue): New function.
7694
7695 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7696
7697 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7698
7699 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7700
7701 PR server/20491
7702 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7703 ps_prochandle.
7704 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7705 * linux-arm-low.c (ps_get_thread_area): Likewise.
7706 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7707 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7708 * linux-mips-low.c (ps_get_thread_area): Likewise.
7709 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7710 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7711 * linux-x86-low.c (ps_get_thread_area): Likewise.
7712 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7713
7714 2016-08-19 Pedro Alves <palves@redhat.com>
7715
7716 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7717
7718 2016-08-19 Pedro Alves <palves@redhat.com>
7719
7720 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7721 comment. Use memcpy instead of casting through unsigned long.
7722
7723 2016-08-19 Pedro Alves <palves@redhat.com>
7724
7725 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7726 allocating around 0x80000000.
7727
7728 2016-08-19 Pedro Alves <palves@redhat.com>
7729
7730 PR gdb/20415
7731 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7732 (x32-avx512-linux-ipa.o): New rules.
7733 * configure.ac (x86_64-*-linux*): New x32 check.
7734 * configure.srv (ipa_x32_linux_regobj): New.
7735 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7736 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7737 descriptions.
7738 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7739 descriptions.
7740 * configure: Regenerate.
7741
7742 2016-08-09 Pedro Alves <palves@redhat.com>
7743
7744 PR gdb/18653
7745 * Makefile.in (OBS): Add signals-state-save-restore.o.
7746 (signals-state-save-restore.o): New rule.
7747 * config.in: Regenerate.
7748 * configure: Regenerate.
7749 * linux-low.c: Include "signals-state-save-restore.h".
7750 (linux_create_inferior): Call
7751 restore_original_signals_state.
7752 * server.c: Include "dispositions-save-restore.h".
7753 (captured_main): Call save_original_signals_state.
7754
7755 2016-08-05 Pedro Alves <palves@redhat.com>
7756
7757 * configure: Regenerate.
7758
7759 2016-08-04 Yao Qi <yao.qi@linaro.org>
7760
7761 * linux-low.c (regsets_fetch_inferior_registers): Check
7762 errno is ESRCH or not.
7763
7764 2016-08-02 Yao Qi <yao.qi@linaro.org>
7765
7766 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7767 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7768 (thread_db_load_search): Update.
7769 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7770 td_ta_set_event and td_ta_event_getmsg.
7771
7772 2016-07-26 Pedro Alves <palves@redhat.com>
7773
7774 PR server/20414
7775 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7776 of unsigned long for 64-bit registers and use uint32_t instead of
7777 unsigned int for 32-bit registers.
7778
7779 2016-07-26 Pedro Alves <palves@redhat.com>
7780
7781 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7782 to 'ptrace'.
7783
7784 2016-07-21 Tom Tromey <tom@tromey.com>
7785
7786 * configure: Rebuild.
7787
7788 2016-07-21 Yao Qi <yao.qi@linaro.org>
7789
7790 * mem-break.c (find_gdb_breakpoint): Cast bp to
7791 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7792
7793 2016-07-21 Yao Qi <yao.qi@linaro.org>
7794
7795 * server.c (handle_v_requests): Support s and S actions
7796 if target_supports_software_single_step return true.
7797
7798 2016-07-21 Yao Qi <yao.qi@linaro.org>
7799
7800 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7801 is resume_step, call maybe_hw_step.
7802 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7803 and unstop them.
7804 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7805 breakpoints or not.
7806 (proceed_one_lwp): If resume request is resume_step, install
7807 reinsert breakpoints and call maybe_hw_step.
7808
7809 2016-07-21 Yao Qi <yao.qi@linaro.org>
7810
7811 * linux-low.c (proceed_one_lwp): Declare.
7812 (linux_resume_one_thread): Remove local variable 'step'.
7813 Lift code enqueue signal. Call proceed_one_lwp instead of
7814 linux_resume_one_lwp.
7815
7816 2016-07-21 Yao Qi <yao.qi@linaro.org>
7817
7818 * linux-low.c (linux_resume_one_thread): Call
7819 enqueue_pending_signal.
7820
7821 2016-07-21 Yao Qi <yao.qi@linaro.org>
7822
7823 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7824 * inferiors.c (do_restore_current_thread_cleanup): New function.
7825 (make_cleanup_restore_current_thread): Likewise.
7826 * linux-low.c (install_software_single_step_breakpoints): Call
7827 make_cleanup_restore_current_thread. Switch current_thread to
7828 thread.
7829
7830 2016-07-21 Yao Qi <yao.qi@linaro.org>
7831
7832 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7833 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7834 (clone_one_breakpoint): Likewise.
7835 (delete_reinsert_breakpoints): Change parameter to thread.
7836 Callers updated.
7837 (has_reinsert_breakpoints): Likewise.
7838 (uninsert_reinsert_breakpoints): Likewise.
7839 (reinsert_reinsert_breakpoints): Likewise.
7840 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7841 (delete_reinsert_breakpoints): Likewise.
7842 (reinsert_reinsert_breakpoints): Likewise.
7843 (uninsert_reinsert_breakpoints): Likewise.
7844 (has_reinsert_breakpoints): Likewise.
7845
7846 2016-07-21 Yao Qi <yao.qi@linaro.org>
7847
7848 * inferiors.c (get_thread_process): Make parameter const.
7849 * inferiors.h (get_thread_process): Update declaration.
7850 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7851 Add new parameters child_thread and parent_thread. Callers
7852 updated.
7853 * mem-break.h (clone_all_breakpoints): Update declaration.
7854
7855 2016-07-21 Yao Qi <yao.qi@linaro.org>
7856
7857 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7858 <command_list, handler>: Remove.
7859 (struct gdb_breakpoint): New.
7860 (struct other_breakpoint): New.
7861 (struct reinsert_breakpoint): New.
7862 (is_gdb_breakpoint): New function.
7863 (any_persistent_commands): Update command_list if
7864 is_gdb_breakpoint returns true.
7865 (set_breakpoint): Create breakpoints according to their types.
7866 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7867 (set_gdb_breakpoint_1): Likewise.
7868 (set_gdb_breakpoint): Likewise.
7869 (clear_breakpoint_conditions): Change parameter type to
7870 'struct gdb_breakpoint *'.
7871 (clear_breakpoint_commands): Likewise.
7872 (clear_breakpoint_conditions_and_commands): Likewise.
7873 (add_condition_to_breakpoint): Likewise.
7874 (add_breakpoint_condition): Likewise.
7875 (add_commands_to_breakpoint): Likewise.
7876 (check_breakpoints): Check other_breakpoint.
7877 (clone_one_breakpoint): Clone breakpopint according to its type.
7878 * mem-break.h (struct gdb_breakpoint): Declare.
7879 (set_gdb_breakpoint): Update declaration.
7880 (clear_breakpoint_conditions_and_commands): Likewise.
7881 (add_breakpoint_condition): Likewise.
7882 (add_breakpoint_commands): Likewise.
7883 * server.c (process_point_options): Change parameter type to
7884 'struct gdb_breakpoint *'.
7885
7886 2016-07-21 Yao Qi <yao.qi@linaro.org>
7887
7888 * mem-break.c (set_breakpoint_at): Rename it to ...
7889 (set_breakpoint_type_at): ... it.
7890 (set_breakpoint_at): Call set_breakpoint_type_at.
7891 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
7892 * mem-break.h (set_breakpoint_at): Update comments.
7893
7894 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
7895
7896 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
7897 to buf parameter.
7898 (nios2_store_gregset): Likewise.
7899
7900 2016-07-01 Pedro Alves <palves@redhat.com>
7901 Antoine Tremblay <antoine.tremblay@ericsson.com>
7902
7903 * linux-low.c: Change interface to take the target lwp_info
7904 pointer directly and return void. Handle detaching from a zombie
7905 thread.
7906 (linux_detach_lwp_callback): New function.
7907 (linux_detach): Detach from the leader thread after detaching from
7908 the clone threads.
7909
7910 2016-06-28 Yao Qi <yao.qi@linaro.org>
7911
7912 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
7913 for variable new_offset.
7914 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7915 (aarch64_ftrace_insn_reloc_cb): Likewise.
7916 (aarch64_ftrace_insn_reloc_tb): Likewise.
7917 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
7918 PRIx64 instead of PRIx32.
7919
7920 2016-06-28 Yao Qi <yao.qi@linaro.org>
7921
7922 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
7923 (the_low_target): Install arm_get_syscall_trapinfo.
7924
7925 2016-06-28 Yao Qi <yao.qi@linaro.org>
7926
7927 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
7928 function.
7929 (the_low_target): Install aarch64_get_syscall_trapinfo.
7930
7931 2016-06-28 Yao Qi <yao.qi@linaro.org>
7932
7933 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
7934 Callers updated.
7935 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
7936 Remove parameter sysno.
7937 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
7938 sysret.
7939
7940 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
7941
7942 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
7943 (s390_emit_ne_goto): Likewise.
7944 (s390_emit_lt_goto): Likewise.
7945 (s390_emit_le_goto): Likewise.
7946 (s390_emit_gt_goto): Likewise.
7947 (s390_emit_ge_goto): Likewise.
7948 (s390x_emit_eq_goto): Likewise.
7949 (s390x_emit_ne_goto): Likewise.
7950 (s390x_emit_lt_goto): Likewise.
7951 (s390x_emit_le_goto): Likewise.
7952 (s390x_emit_gt_goto): Likewise.
7953 (s390x_emit_ge_goto): Likewise.
7954 (s390_emit_ops_impl): Mark variable static.
7955 (s390x_emit_ops): Likewise.
7956
7957 2016-06-17 Yao Qi <yao.qi@linaro.org>
7958
7959 * linux-low.c (handle_extended_wait): Call
7960 uninsert_reinsert_breakpoints for the parent process. Remove
7961 reinsert breakpoints from the child process. Reinsert them to
7962 the parent process when vfork is done.
7963 * mem-break.c (uninsert_reinsert_breakpoints): New function.
7964 (reinsert_reinsert_breakpoints): New function.
7965 * mem-break.h (uninsert_reinsert_breakpoints): Declare
7966 (reinsert_reinsert_breakpoints): Declare.
7967
7968 2016-06-17 Yao Qi <yao.qi@linaro.org>
7969
7970 * linux-low.c (handle_extended_wait): If the parent is doing
7971 step-over, remove the reinsert breakpoints from the forked child.
7972
7973 2016-06-17 Yao Qi <yao.qi@linaro.org>
7974
7975 * linux-low.c (unsuspend_all_lwps): Declare.
7976 (linux_low_filter_event): If thread exited, call finish_step_over.
7977 If step-over is finished, unsuspend other threads.
7978
7979 2016-06-17 Yao Qi <yao.qi@linaro.org>
7980
7981 * linux-low.c (linux_resume_one_lwp_throw): Assert
7982 has_reinsert_breakpoints returns false.
7983 * mem-break.c (delete_disabled_breakpoints): Assert
7984 bp type isn't reinsert_breakpoint.
7985
7986 2016-06-17 Yao Qi <yao.qi@linaro.org>
7987
7988 * linux-low.c (maybe_hw_step): New function.
7989 (linux_resume_one_lwp_throw): Call maybe_hw_step.
7990 (finish_step_over): Switch current_thread to lwp temporarily,
7991 and assert has_reinsert_breakpoints returns true.
7992 (proceed_one_lwp): Call maybe_hw_step.
7993 * mem-break.c (has_reinsert_breakpoints): New function.
7994 * mem-break.h (has_reinsert_breakpoints): Declare.
7995
7996 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
7997
7998 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
7999
8000 2016-05-17 Yao Qi <yao.qi@linaro.org>
8001
8002 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8003 instead of find_inferior.
8004
8005 2016-05-05 Yao Qi <yao.qi@linaro.org>
8006
8007 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8008 Initialize res to zero.
8009
8010 2016-05-05 Yao Qi <yao.qi@linaro.org>
8011
8012 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8013 to uint32_t.
8014
8015 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8016
8017 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8018 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8019 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8020
8021 2016-04-28 Par Olsson <par.olsson@windriver.com>
8022 Simon Marchi <simon.marchi@ericsson.com>
8023
8024 * tracepoint.c (write_inferior_int8): New function.
8025 (cmd_qtenable_disable): Write enable flag using
8026 write_inferior_int8.
8027
8028 2016-04-25 Yao Qi <yao.qi@linaro.org>
8029
8030 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8031 (need_step_over_p): Return zero if the LWP has pending signals
8032 can be delivered on software single step target.
8033
8034 2016-04-25 Yao Qi <yao.qi@linaro.org>
8035
8036 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8037 return instead of error.
8038
8039 2016-04-22 Yao Qi <yao.qi@linaro.org>
8040
8041 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8042 to 23.
8043
8044 2016-04-22 Yao Qi <yao.qi@linaro.org>
8045
8046 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8047 signal when stepping over breakpoint with software single
8048 step.
8049
8050 2016-04-21 Pedro Alves <palves@redhat.com>
8051
8052 * linux-s390-low.c (s390_collect_ptrace_register)
8053 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8054 add casts.
8055 (s390_check_regset): Use void * instead of gdb_byte *.
8056
8057 2016-04-20 Pedro Alves <palves@redhat.com>
8058
8059 * configure: Renegerate.
8060
8061 2016-04-20 Yao Qi <yao.qi@linaro.org>
8062
8063 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8064 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8065 number 16.
8066 (arm_store_gregset): Likewise.
8067
8068 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8069
8070 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8071 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8072 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8073 (amd64-avx-mpx-linux.c): New rules.
8074 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8075 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8076 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8077 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8078 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8079 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8080 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8081 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8082 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8083 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8084 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8085 * linux-x86-low.c (x86_linux_read_description): Add case for
8086 X86_XSTATE_AVX_MPX_MASK.
8087 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8088 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8089 init_registers_i386_avx_mpx_linux.
8090 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8091 (initialize_low_tracepoint): Call
8092 init_registers_i386_avx_mpx_linux.
8093 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8094 (initialize_low_tracepoint): Call
8095 init_registers_amd64_avx_mpx_linux.
8096 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8097 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8098 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8099 declarations.
8100
8101 2016-04-18 Pedro Alves <palves@redhat.com>
8102
8103 * configure: Regenerate.
8104
8105 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8106
8107 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8108 (aarch64_emit_sub): Likewise.
8109
8110 2016-04-12 Pedro Alves <palves@redhat.com>
8111
8112 * utils.c (prepare_to_throw_exception): Delete.
8113
8114 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8115
8116 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8117
8118 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8119
8120 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8121
8122 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8123
8124 * linux-aarch64-ipa.c: Add <elf.h> include.
8125 * linux-ppc-ipa.c: Add <elf.h> include.
8126 * linux-s390-ipa.c: Add <elf.h> include.
8127
8128 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8129
8130 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8131 (get_raw_reg_ptr): Likewise.
8132 (get_trace_state_variable_value_ptr): Likewise.
8133 (set_trace_state_variable_value_ptr): Likewise.
8134 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8135 char *.
8136
8137 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8138 Marcin Kościelnicki <koriakin@0x04.net>
8139
8140 PR/17221
8141 * linux-ppc-low.c (emit_insns): New function.
8142 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8143 (ppc_emit_prologue): New function.
8144 (ppc_emit_epilogue): New function.
8145 (ppc_emit_add): New function.
8146 (ppc_emit_sub): New function.
8147 (ppc_emit_mul): New function.
8148 (ppc_emit_lsh): New function.
8149 (ppc_emit_rsh_signed): New function.
8150 (ppc_emit_rsh_unsigned): New function.
8151 (ppc_emit_ext): New function.
8152 (ppc_emit_zero_ext): New function.
8153 (ppc_emit_log_not): New function.
8154 (ppc_emit_bit_and): New function.
8155 (ppc_emit_bit_or): New function.
8156 (ppc_emit_bit_xor): New function.
8157 (ppc_emit_bit_not): New function.
8158 (ppc_emit_equal): New function.
8159 (ppc_emit_less_signed): New function.
8160 (ppc_emit_less_unsigned): New function.
8161 (ppc_emit_ref): New function.
8162 (ppc_emit_const): New function.
8163 (ppc_emit_reg): New function.
8164 (ppc_emit_pop): New function.
8165 (ppc_emit_stack_flush): New function.
8166 (ppc_emit_swap): New function.
8167 (ppc_emit_stack_adjust): New function.
8168 (ppc_emit_call): New function.
8169 (ppc_emit_int_call_1): New function.
8170 (ppc_emit_void_call_2): New function.
8171 (ppc_emit_if_goto): New function.
8172 (ppc_emit_goto): New function.
8173 (ppc_emit_eq_goto): New function.
8174 (ppc_emit_ne_goto): New function.
8175 (ppc_emit_lt_goto): New function.
8176 (ppc_emit_le_goto): New function.
8177 (ppc_emit_gt_goto): New function.
8178 (ppc_emit_ge_goto): New function.
8179 (ppc_write_goto_address): New function.
8180 (ppc_emit_ops_impl): New static variable.
8181 (ppc64v1_emit_prologue): New function.
8182 (ppc64v2_emit_prologue): New function.
8183 (ppc64_emit_epilogue): New function.
8184 (ppc64_emit_add): New function.
8185 (ppc64_emit_sub): New function.
8186 (ppc64_emit_mul): New function.
8187 (ppc64_emit_lsh): New function.
8188 (ppc64_emit_rsh_signed): New function.
8189 (ppc64_emit_rsh_unsigned): New function.
8190 (ppc64_emit_ext): New function.
8191 (ppc64_emit_zero_ext): New function.
8192 (ppc64_emit_log_not): New function.
8193 (ppc64_emit_bit_and): New function.
8194 (ppc64_emit_bit_or): New function.
8195 (ppc64_emit_bit_xor): New function.
8196 (ppc64_emit_bit_not): New function.
8197 (ppc64_emit_equal): New function.
8198 (ppc64_emit_less_signed): New function.
8199 (ppc64_emit_less_unsigned): New function.
8200 (ppc64_emit_ref): New function.
8201 (ppc64_emit_const): New function.
8202 (ppc64v1_emit_reg): New function.
8203 (ppc64v2_emit_reg): New function.
8204 (ppc64_emit_pop): New function.
8205 (ppc64_emit_stack_flush): New function.
8206 (ppc64_emit_swap): New function.
8207 (ppc64v1_emit_call): New function.
8208 (ppc64v2_emit_call): New function.
8209 (ppc64v1_emit_int_call_1): New function.
8210 (ppc64v2_emit_int_call_1): New function.
8211 (ppc64v1_emit_void_call_2): New function.
8212 (ppc64v2_emit_void_call_2): New function.
8213 (ppc64_emit_if_goto): New function.
8214 (ppc64_emit_eq_goto): New function.
8215 (ppc64_emit_ne_goto): New function.
8216 (ppc64_emit_lt_goto): New function.
8217 (ppc64_emit_le_goto): New function.
8218 (ppc64_emit_gt_goto): New function.
8219 (ppc64_emit_ge_goto): New function.
8220 (ppc64v1_emit_ops_impl): New static variable.
8221 (ppc64v2_emit_ops_impl): New static variable.
8222 (ppc_emit_ops): New function.
8223 (linux_low_target): Wire in ppc_emit_ops.
8224
8225 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8226 Marcin Kościelnicki <koriakin@0x04.net>
8227
8228 PR/17221
8229 * Makefile.in: Add powerpc-*-ipa.o
8230 * configure.srv: Add ipa_obj for powerpc*-linux.
8231 * linux-ppc-ipa.c: New file.
8232 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8233 includes.
8234 (PPC_FIELD): New macro.
8235 (PPC_SEXT): New macro.
8236 (PPC_OP6): New macro.
8237 (PPC_BO): New macro.
8238 (PPC_LI): New macro.
8239 (PPC_BD): New macro.
8240 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8241 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8242 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8243 (ppc_get_thread_area): New function.
8244 (is_elfv2_inferior): New function.
8245 (gen_ds_form): New function.
8246 (GEN_STD): New macro.
8247 (GEN_STDU): New macro.
8248 (GEN_LD): New macro.
8249 (GEN_LDU): New macro.
8250 (gen_d_form): New function.
8251 (GEN_ADDI): New macro.
8252 (GEN_ADDIS): New macro.
8253 (GEN_LI): New macro.
8254 (GEN_LIS): New macro.
8255 (GEN_ORI): New macro.
8256 (GEN_ORIS): New macro.
8257 (GEN_LWZ): New macro.
8258 (GEN_STW): New macro.
8259 (GEN_STWU): New macro.
8260 (gen_xfx_form): New function.
8261 (GEN_MFSPR): New macro.
8262 (GEN_MTSPR): New macro.
8263 (GEN_MFCR): New macro.
8264 (GEN_MTCR): New macro.
8265 (GEN_SYNC): New macro.
8266 (GEN_LWSYNC): New macro.
8267 (gen_x_form): New function.
8268 (GEN_OR): New macro.
8269 (GEN_MR): New macro.
8270 (GEN_LWARX): New macro.
8271 (GEN_STWCX): New macro.
8272 (GEN_CMPW): New macro.
8273 (gen_md_form): New function.
8274 (GEN_RLDICL): New macro.
8275 (GEN_RLDICR): New macro.
8276 (gen_i_form): New function.
8277 (GEN_B): New macro.
8278 (GEN_BL): New macro.
8279 (gen_b_form): New function.
8280 (GEN_BNE): New macro.
8281 (GEN_LOAD): New macro.
8282 (GEN_STORE): New macro.
8283 (gen_limm): New function.
8284 (gen_atomic_xchg): New function.
8285 (gen_call): New function.
8286 (ppc_relocate_instruction): New function.
8287 (ppc_install_fast_tracepoint_jump_pad): New function.
8288 (ppc_get_min_fast_tracepoint_insn_len): New function.
8289 (ppc_get_ipa_tdesc_idx): New function.
8290 (the_low_target): Wire in the new functions.
8291 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8292 tdescs.
8293 * linux-ppc-tdesc.h: New file.
8294
8295 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8296
8297 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8298 (alloc_jump_pad_buffer): New function.
8299 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8300 (alloc_jump_pad_buffer): New function.
8301 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8302 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8303 (alloc_jump_pad_buffer): New function.
8304 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8305 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8306 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8307 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8308
8309 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8310
8311 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8312 * linux-amd64-ipa.c: Likewise.
8313 * linux-i386-ipa.c: Likewise.
8314 * linux-s390-ipa.c: Likewise.
8315 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8316 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8317 set_trace_state_variable_value_ptr.
8318 (struct ipa_sym_addresses): Likewise.
8319 (symbol_list): Likewise.
8320 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8321 accessing gdb_collect directly.
8322 (gdb_collect_ptr_type): New typedef.
8323 (get_raw_reg_ptr_type): New typedef.
8324 (get_trace_state_variable_value_ptr_type): New typedef.
8325 (set_trace_state_variable_value_ptr_type): New typedef.
8326 (gdb_collect_ptr): New global.
8327 (get_raw_reg_ptr): New global.
8328 (get_trace_state_variable_value_ptr): New global.
8329 (set_trace_state_variable_value_ptr): New global.
8330 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8331 accessing get_raw_reg directly.
8332 (get_get_tsv_func_addr): Likewise for
8333 get_trace_state_variable_value_ptr.
8334 (get_set_tsv_func_addr): Likewise for
8335 set_trace_state_variable_value_ptr.
8336 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8337
8338 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8339
8340 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8341
8342 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8343
8344 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8345 packets.
8346 (relocate_instruction): Remove own_buf.
8347 * server.c (own_buf): Make global.
8348 (handle_v_requests): Make global.
8349 * server.h (own_buf): New declaration.
8350 (handle_v_requests): New prototype.
8351
8352 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8353
8354 PR 18377
8355 * linux-s390-low.c (add_insns): New function.
8356 (s390_emit_prologue): New function.
8357 (s390_emit_epilogue): New function.
8358 (s390_emit_add): New function.
8359 (s390_emit_sub): New function.
8360 (s390_emit_mul): New function.
8361 (s390_emit_lsh): New function.
8362 (s390_emit_rsh_signed): New function.
8363 (s390_emit_rsh_unsigned): New function.
8364 (s390_emit_ext): New function.
8365 (s390_emit_log_not): New function.
8366 (s390_emit_bit_and): New function.
8367 (s390_emit_bit_or): New function.
8368 (s390_emit_bit_xor): New function.
8369 (s390_emit_bit_not): New function.
8370 (s390_emit_equal): New function.
8371 (s390_emit_less_signed): New function.
8372 (s390_emit_less_unsigned): New function.
8373 (s390_emit_ref): New function.
8374 (s390_emit_if_goto): New function.
8375 (s390_emit_goto): New function.
8376 (s390_write_goto_address): New function.
8377 (s390_emit_litpool): New function.
8378 (s390_emit_const): New function.
8379 (s390_emit_call): New function.
8380 (s390_emit_reg): New function.
8381 (s390_emit_pop): New function.
8382 (s390_emit_stack_flush): New function.
8383 (s390_emit_zero_ext): New function.
8384 (s390_emit_swap): New function.
8385 (s390_emit_stack_adjust): New function.
8386 (s390_emit_set_r2): New function.
8387 (s390_emit_int_call_1): New function.
8388 (s390_emit_void_call_2): New function.
8389 (s390_emit_eq_goto): New function.
8390 (s390_emit_ne_goto): New function.
8391 (s390_emit_lt_goto): New function.
8392 (s390_emit_le_goto): New function.
8393 (s390_emit_gt_goto): New function.
8394 (s390_emit_ge_goto): New function.
8395 (s390x_emit_prologue): New function.
8396 (s390x_emit_epilogue): New function.
8397 (s390x_emit_add): New function.
8398 (s390x_emit_sub): New function.
8399 (s390x_emit_mul): New function.
8400 (s390x_emit_lsh): New function.
8401 (s390x_emit_rsh_signed): New function.
8402 (s390x_emit_rsh_unsigned): New function.
8403 (s390x_emit_ext): New function.
8404 (s390x_emit_log_not): New function.
8405 (s390x_emit_bit_and): New function.
8406 (s390x_emit_bit_or): New function.
8407 (s390x_emit_bit_xor): New function.
8408 (s390x_emit_bit_not): New function.
8409 (s390x_emit_equal): New function.
8410 (s390x_emit_less_signed): New function.
8411 (s390x_emit_less_unsigned): New function.
8412 (s390x_emit_ref): New function.
8413 (s390x_emit_if_goto): New function.
8414 (s390x_emit_const): New function.
8415 (s390x_emit_call): New function.
8416 (s390x_emit_reg): New function.
8417 (s390x_emit_pop): New function.
8418 (s390x_emit_stack_flush): New function.
8419 (s390x_emit_zero_ext): New function.
8420 (s390x_emit_swap): New function.
8421 (s390x_emit_stack_adjust): New function.
8422 (s390x_emit_int_call_1): New function.
8423 (s390x_emit_void_call_2): New function.
8424 (s390x_emit_eq_goto): New function.
8425 (s390x_emit_ne_goto): New function.
8426 (s390x_emit_lt_goto): New function.
8427 (s390x_emit_le_goto): New function.
8428 (s390x_emit_gt_goto): New function.
8429 (s390x_emit_ge_goto): New function.
8430 (s390_emit_ops): New function.
8431 (struct linux_target_ops): Fill in emit_ops hook.
8432
8433 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8434
8435 PR 18377
8436 * Makefile.in: Add s390 IPA files.
8437 * configure.srv: Build IPA for s390.
8438 * linux-s390-ipa.c: New file.
8439 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8440 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8441 (tdesc_s390_linux32): Likewise.
8442 (init_registers_s390_linux32v1): Likewise.
8443 (tdesc_s390_linux32v1): Likewise.
8444 (init_registers_s390_linux32v2): Likewise.
8445 (tdesc_s390_linux32v2): Likewise.
8446 (init_registers_s390_linux64): Likewise.
8447 (tdesc_s390_linux64): Likewise.
8448 (init_registers_s390_linux64v1): Likewise.
8449 (tdesc_s390_linux64v1): Likewise.
8450 (init_registers_s390_linux64v2): Likewise.
8451 (tdesc_s390_linux64v2): Likewise.
8452 (init_registers_s390_te_linux64): Likewise.
8453 (tdesc_s390_te_linux64): Likewise.
8454 (init_registers_s390_vx_linux64): Likewise.
8455 (tdesc_s390_vx_linux64): Likewise.
8456 (init_registers_s390_tevx_linux64): Likewise.
8457 (tdesc_s390_tevx_linux64): Likewise.
8458 (init_registers_s390x_linux64): Likewise.
8459 (tdesc_s390x_linux64): Likewise.
8460 (init_registers_s390x_linux64v1): Likewise.
8461 (tdesc_s390x_linux64v1): Likewise.
8462 (init_registers_s390x_linux64v2): Likewise.
8463 (tdesc_s390x_linux64v2): Likewise.
8464 (init_registers_s390x_te_linux64): Likewise.
8465 (tdesc_s390x_te_linux64): Likewise.
8466 (init_registers_s390x_vx_linux64): Likewise.
8467 (tdesc_s390x_vx_linux64): Likewise.
8468 (init_registers_s390x_tevx_linux64): Likewise.
8469 (tdesc_s390x_tevx_linux64): Likewise.
8470 (have_hwcap_s390_vx): New static variable.
8471 (s390_arch_setup): Fill have_hwcap_s390_vx.
8472 (s390_get_thread_area): New function.
8473 (s390_ft_entry_gpr_esa): New const.
8474 (s390_ft_entry_gpr_zarch): New const.
8475 (s390_ft_entry_misc): New const.
8476 (s390_ft_entry_fr): New const.
8477 (s390_ft_entry_vr): New const.
8478 (s390_ft_main_31): New const.
8479 (s390_ft_main_64): New const.
8480 (s390_ft_exit_fr): New const.
8481 (s390_ft_exit_vr): New const.
8482 (s390_ft_exit_misc): New const.
8483 (s390_ft_exit_gpr_esa): New const.
8484 (s390_ft_exit_gpr_zarch): New const.
8485 (append_insns): New function.
8486 (s390_relocate_instruction): New function.
8487 (s390_install_fast_tracepoint_jump_pad): New function.
8488 (s390_get_min_fast_tracepoint_insn_len): New function.
8489 (s390_get_ipa_tdesc_idx): New function.
8490 (struct linux_target_ops): Wire in the above functions.
8491 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8492 * linux-s390-tdesc.h: New file.
8493
8494 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8495
8496 * linux-s390-low.c (s390_supports_tracepoints): New function.
8497 (struct linux_target_ops): Fill supports_tracepoints hook.
8498
8499 2016-03-18 Yao Qi <yao.qi@linaro.org>
8500
8501 * linux-low.c (lwp_signal_can_be_delivered): New function.
8502 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8503
8504 2016-03-18 Yao Qi <yao.qi@linaro.org>
8505
8506 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8507 0 if signal is enqueued. Remove 'signal' from one debugging
8508 message. Move one debugging message to some lines below.
8509 Remove code setting 'signal' to 0.
8510
8511 2016-03-18 Yao Qi <yao.qi@linaro.org>
8512
8513 * linux-low.c (linux_low_filter_event): Remove redundant
8514 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8515
8516 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8517
8518 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8519 (struct linux_target_ops): Wire in the above.
8520
8521 2016-03-03 Yao Qi <yao.qi@linaro.org>
8522
8523 * linux-low.c: Update comments to start_step_over.
8524
8525 2016-03-03 Yao Qi <yao.qi@linaro.org>
8526
8527 PR server/19736
8528 * linux-low.c (handle_extended_wait): Set child suspended
8529 if event_lwp->bp_reinsert isn't zero.
8530
8531 2016-03-02 Yao Qi <yao.qi@linaro.org>
8532
8533 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8534 enqueue_pending_signal.
8535
8536 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8537
8538 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8539 is actually loaded.
8540
8541 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8542
8543 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8544 (s390_regmap_3264) [!__s390x__]: New global.
8545 (s390_collect_ptrace_register): Skip map entries containing -1.
8546 (s390_supply_ptrace_register): Ditto.
8547 (s390_fill_gprs_high): New function.
8548 (s390_store_gprs_high): New function.
8549 (s390_regsets): Add NT_S390_HIGH_GPRS.
8550 (s390_get_hwcap): Enable on 31-bit.
8551 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8552 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8553 Detect NT_S390_HIGH_GPRS.
8554 (s390_usrregs_info_3264): Enable on 31-bit.
8555 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8556 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8557
8558 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8559
8560 PR gdb/13808
8561 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8562 * configure.srv: Ditto.
8563 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8564 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8565 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8566 (init_registers_amd64_linux): Remove prototype.
8567 (tdesc_amd64_linux): Remove declaration.
8568 (get_ipa_tdesc): New function.
8569 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8570 initialize remaining tdescs.
8571 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8572 (init_registers_i386_linux): Remove prototype.
8573 (tdesc_i386_linux): Remove declaration.
8574 (get_ipa_tdesc): New function.
8575 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8576 initialize remaining tdescs.
8577 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8578 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8579 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8580 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8581 (x86_get_ipa_tdesc_idx): New function.
8582 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8583 * linux-x86-tdesc.h: New file.
8584 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8585 (target_get_ipa_tdesc_idx): New macro.
8586 * tracepoint.c (ipa_tdesc_idx): New macro.
8587 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8588 (symbol_list): Add ipa_tdesc_idx.
8589 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8590 (ipa_tdesc): Remove.
8591 (ipa_tdesc_idx): New variable.
8592 (get_context_regcache): Use get_ipa_tdesc.
8593 (gdb_collect): Ditto.
8594 (gdb_probe): Ditto.
8595 * tracepoint.h (get_ipa_tdesc): New prototype.
8596 (ipa_tdesc): Remove.
8597
8598 2016-02-24 Pedro Alves <palves@redhat.com>
8599
8600 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8601 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8602 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8603 Factor out common code between the USE_SIGTRAP_SIGINFO and
8604 !USE_SIGTRAP_SIGINFO blocks.
8605 (linux_low_filter_event): Call save_stop_reason instead of
8606 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8607 Update comments.
8608 (linux_wait_1): Update comments.
8609
8610 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8611
8612 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8613 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8614 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8615 ppc_insert_point, ppc_remove_point.
8616
8617 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8618
8619 * linux-s390-low.c (s390_supports_z_point_type): New function.
8620 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8621
8622 2016-02-16 Yao Qi <yao.qi@linaro.org>
8623
8624 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8625 PC. Get pc from regcache_read_pc.
8626
8627 2016-02-12 Yao Qi <yao.qi@linaro.org>
8628
8629 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8630 or linux_get_pc_32bit.
8631 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8632
8633 2016-02-12 Yao Qi <yao.qi@linaro.org>
8634
8635 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8636 arm_linux_get_next_pcs_fixup.
8637
8638 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8639
8640 * tracepoint.c (x_tracepoint_action_download): Change
8641 write_inferior_data_ptr to write_inferior_data_pointer.
8642 (cmd_qtstart): Likewise.
8643 (write_inferior_data_ptr): Remove.
8644 (download_agent_expr): Change write_inferior_data_ptr to
8645 write_inferior_data_pointer.
8646 (download_tracepoint_1): Likewise.
8647 (download_tracepoint): Likewise.
8648 (download_trace_state_variables): Likewise.
8649
8650 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8651 Marcin Kościelnicki <koriakin@0x04.net>
8652
8653 * tracepoint.c (struct tracepoint_action_ops): Remove.
8654 (struct tracepoint_action): Remove ops.
8655 (m_tracepoint_action_download, r_tracepoint_action_download)
8656 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8657 size and offset accordingly.
8658 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8659 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8660 (tracepoint_action_send, tracepoint_action_download): New functions.
8661 Helpers for trace action handlers.
8662 (add_tracepoint_action): Remove setup actions ops.
8663 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8664
8665 2016-02-10 Yao Qi <yao.qi@linaro.org>
8666
8667 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8668
8669 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8670
8671 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8672 to AC_OUTPUT.
8673 * configure: Regenerate.
8674
8675 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8676
8677 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8678 void * to gdb_byte *.
8679 * linux-low.c (siginfo_fixup): Likewise.
8680 (linux_xfer_siginfo): Likewise.
8681 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8682 Likewise.
8683 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8684
8685 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8686
8687 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8688 to srv_tgtobj.
8689 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8690 to srv_tgtobj.
8691 * linux-x86-low.c [__x86_64__]: Include
8692 "nat/amd64-linux-siginfo.h".
8693 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8694 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8695 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8696 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8697 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8698 (cpt_si_fd, si_timerid, si_overrun): Move from
8699 nat/amd64-linux-siginfo.c.
8700 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8701
8702 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8703
8704 * server.c (skip_to_semicolon): Remove.
8705 (process_point_options): Use strchrnul instead of
8706 skip_to_semicolon.
8707
8708 2016-01-26 Yao Qi <yao.qi@linaro.org>
8709
8710 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8711 * linux-low.c (install_software_single_step_breakpoints): Don't
8712 call regcache_read_pc.
8713 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8714 argument pc.
8715
8716 2016-01-26 Yao Qi <yao.qi@linaro.org>
8717
8718 * linux-low.c (install_software_single_step_breakpoints): Call
8719 regcache_read_pc instead of get_pc.
8720
8721 2016-01-26 Yao Qi <yao.qi@linaro.org>
8722
8723 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8724 (unblock_async_io): Rename to ...
8725 (block_unblock_async_io): ... it. New function.
8726 (enable_async_io): Don't install SIGIO handler. Unblock it
8727 instead.
8728 (disable_async_io): Don't ignore SIGIO. Block it instead.
8729 (initialize_async_io): Install SIGIO handler. Don't call
8730 unblock_async_io.
8731
8732 2016-01-26 Yao Qi <yao.qi@linaro.org>
8733
8734 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8735 first character is '\003', call *the_target->request_interrupt.
8736
8737 2016-01-25 Yao Qi <yao.qi@linaro.org>
8738
8739 * remote-utils.c (new_thread_notify): Remove.
8740 (dead_thread_notify): Likewise.
8741 * remote-utils.h (new_thread_notify): Remove declaration.
8742 (dead_thread_notify): Likewise.
8743
8744 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8745
8746 * gdb.trace/pending.exp: Fix expected message on continue.
8747
8748 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8749
8750 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8751 it works properly on big-endian machines where sizeof (CORE_ADDR)
8752 != sizeof (void *).
8753
8754 2016-01-21 Pedro Alves <palves@redhat.com>
8755
8756 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8757 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8758 * configure: Regenerate.
8759
8760 2016-01-21 Yao Qi <yao.qi@linaro.org>
8761
8762 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8763 is_thumb and set it according to CPSR saved on the stack.
8764 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8765 arm_sigreturn_next_pc.
8766
8767 2016-01-18 Yao Qi <yao.qi@linaro.org>
8768
8769 * linux-low.c (linux_set_pc_64bit): New function.
8770 (linux_get_pc_64bit): New function.
8771 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8772 Declare.
8773 * linux-sparc-low.c (debug_threads): Remove declaration.
8774 (sparc_get_pc): Remove.
8775 (the_low_target): Use linux_get_pc_64bit instead of
8776 sparc_get_pc.
8777 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8778 (the_low_target): Use linux_get_pc_64bit and
8779 linux_set_pc_64bit.
8780
8781 2016-01-18 Yao Qi <yao.qi@linaro.org>
8782
8783 * linux-arm-low.c (debug_threads): Remove declaration.
8784 (arm_get_pc, arm_set_pc): Remove.
8785 (the_low_target): Use linux_get_pc_32bit and
8786 linux_set_pc_32bit.
8787 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8788 (the_low_target): Use linux_get_pc_32bit and
8789 linux_set_pc_32bit.
8790 * linux-cris-low.c (debug_threads): Remove declaration.
8791 (cris_get_pc, cris_set_pc,): Remove.
8792 (the_low_target): Use linux_get_pc_32bit and
8793 linux_set_pc_32bit.
8794 * linux-crisv32-low.c (debug_threads): Remove declaration.
8795 (cris_get_pc, cris_set_pc): Remove.
8796 (the_low_target): Use linux_get_pc_32bit and
8797 linux_set_pc_32bit.
8798 * linux-low.c: Include inttypes.h.
8799 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8800 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8801 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8802 (the_low_target): Use linux_get_pc_32bit and
8803 linux_set_pc_32bit.
8804 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8805 (the_low_target): Use linux_get_pc_32bit and
8806 linux_set_pc_32bit.
8807 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8808 (the_low_target): Use linux_get_pc_32bit and
8809 linux_set_pc_32bit.
8810 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8811 (the_low_target): Use linux_get_pc_32bit and
8812 linux_set_pc_32bit.
8813 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8814 (the_low_target): Use linux_get_pc_32bit and
8815 linux_set_pc_32bit.
8816
8817 2016-01-18 Gary Benson <gbenson@redhat.com>
8818
8819 * configure.ac (AC_FUNC_FORK): New check.
8820 * config.in: Regenerate.
8821 * configure: Likewise.
8822
8823 2016-01-14 Yao Qi <yao.qi@linaro.org>
8824
8825 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8826 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8827 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8828 arm_get_next_pcs_ctor.
8829
8830 2016-01-12 Josh Stone <jistone@redhat.com>
8831 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8832
8833 * inferiors.h: Include "gdb_vecs.h".
8834 (struct process_info): Add syscalls_to_catch.
8835 * inferiors.c (remove_process): Free syscalls_to_catch.
8836 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8837 syscall_return stops.
8838 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8839 * server.c (handle_general_set): Handle QCatchSyscalls.
8840 (handle_query): Report support for QCatchSyscalls.
8841 * target.h (struct target_ops): Add supports_catch_syscall.
8842 (target_supports_catch_syscall): New macro.
8843 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8844 (struct lwp_info): Add syscall_state.
8845 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8846 Maintain syscall_state and syscalls_to_catch across exec.
8847 (get_syscall_trapinfo): New function, proxy to the_low_target.
8848 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8849 (linux_low_filter_event): Toggle syscall_state entry/return for
8850 syscall traps, and set it ignored for all others.
8851 (gdb_catching_syscalls_p): New function.
8852 (gdb_catch_this_syscall_p): New function.
8853 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8854 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8855 (linux_supports_catch_syscall): New function.
8856 (linux_target_ops): Install it.
8857 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8858 (the_low_target): Install it.
8859
8860 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8861
8862 * acinclude.m4: Include new ../warning.m4 file.
8863 * configure: Regenerated.
8864 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8865
8866 2016-01-12 Mike Frysinger <vapier@gentoo.org>
8867
8868 * ax.c (is_goto_target): Mark static.
8869 * linux-low.c (register_addr): Likewise.
8870 (linux_fetch_registers, linux_store_registers): Likewise.
8871 * mem-break.c (any_persistent_commands): Fix old prototype.
8872 (add_commands_to_breakpoint): Mark static.
8873 * regcache.c (find_register_by_name): Delete unused func.
8874 * remote-utils.c (hex_or_minus_one): Mark static.
8875 * server.c (monitor_show_help): Mark static.
8876 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
8877 handle_v_requests): Likewise.
8878
8879 2016-01-12 Pedro Alves <palves@redhat.com>
8880
8881 Remove use of the registered trademark symbol throughout.
8882
8883 2016-01-08 Yao Qi <yao.qi@linaro.org>
8884
8885 * remote-utils.c (getpkt): If c is '\003', call target hook
8886 request_interrupt.
8887
8888 2016-01-06 Yao Qi <yao.qi@linaro.org>
8889
8890 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
8891 linux-aarch32-low.c.
8892 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8893 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8894 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8895 (thumb2_breakpoint): Declare.
8896 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
8897 linux-aarch32-low.h.
8898 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8899 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
8900 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
8901
8902 2016-01-01 Joel Brobecker <brobecker@adacore.com>
8903
8904 * gdbreplay.c (gdbreplay_version): Change copyright year in
8905 version message.
8906 * server.c (gdbserver_version): Likewise.
8907
8908 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
8909
8910 * server.c (crc32_table): Delete.
8911 (crc32): Use libiberty's xcrc32 function.
8912
8913 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8914
8915 * lynx-low.c (lynx_delete_thread_callback): New function.
8916 (lynx_mourn): Properly delete our process and all of its
8917 threads. Remove call to clear_inferiors.
8918
8919 2015-12-22 Joel Brobecker <brobecker@adacore.com>
8920
8921 * target.c (thread_search_callback): Add check that
8922 the thread_stopped target callback is not NULL before
8923 calling it.
8924
8925 2015-12-21 Yao Qi <yao.qi@linaro.org>
8926
8927 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
8928 arm breakpoint.
8929
8930 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8931
8932 * server.c (handle_query): Call target_supports_software_single_step.
8933
8934 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8935
8936 * linux-low.c (single_step): New function.
8937 (linux_resume_one_lwp_throw): Call single_step.
8938 (start_step_over): Likewise.
8939
8940 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8941
8942 * Makefile.in (SFILES): Append arch/arm-linux.c,
8943 arch/arm-get-next-pcs.c.
8944 (arm-linux.o): New rule.
8945 (arm-get-next-pcs.o): New rule.
8946 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
8947 arm-linux.o.
8948 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
8949 to linux-aarch32-low.c.
8950 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8951 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8952 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8953 (thumb2_breakpoint_len): Likewise.
8954 (arm_is_thumb_mode): Make non-static.
8955 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
8956 from linux-aarch32-low.c.
8957 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
8958 (arm_breakpoint_len, thumb_breakpoint): Likewise.
8959 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
8960 (thumb2_breakpoint_len): Likewise.
8961 (arm_is_thumb_mode): New declaration.
8962 * linux-arm-low.c: Include arch/arm-linux.h
8963 aarch/arm-get-next-pcs.h, sys/syscall.h.
8964 (get_next_pcs_ops): New struct.
8965 (get_next_pcs_addr_bits_remove): New function.
8966 (get_next_pcs_is_thumb): New function.
8967 (get_next_pcs_read_memory_unsigned_integer): Likewise.
8968 (arm_sigreturn_next_pc): Likewise.
8969 (get_next_pcs_syscall_next_pc): Likewise.
8970 (arm_gdbserver_get_next_pcs): Likewise.
8971 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
8972 Initialize.
8973 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
8974 * server.h: Include gdb_vecs.h.
8975
8976 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8977
8978 * Makefile.in (SFILES): Append common/common-regcache.c.
8979 (OBS): Append common-regcache.o.
8980 (common-regcache.o): New rule.
8981 * regcache.c (init_register_cache): Initialize cache to
8982 REG_UNAVAILABLE.
8983 (regcache_raw_read_unsigned): New function.
8984 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
8985 register_status enum.
8986
8987 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
8988
8989 * linux-aarch64-low.c (the_low_targets): Rename
8990 breakpoint_reinsert_addr to get_next_pcs.
8991 * linux-arm-low.c (the_low_targets): Likewise.
8992 * linux-bfin-low.c (the_low_targets): Likewise.
8993 * linux-cris-low.c (the_low_targets): Likewise.
8994 * linux-crisv32-low.c (the_low_targets): Likewise.
8995 * linux-low.c (can_software_single_step): Likewise.
8996 (install_software_single_step_breakpoints): New function.
8997 (start_step_over): Use install_software_single_step_breakpoints.
8998 * linux-low.h: New CORE_ADDR vector.
8999 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9000 get_next_pcs.
9001 * linux-mips-low.c (the_low_targets): Likewise.
9002 * linux-nios2-low.c (the_low_targets): Likewise.
9003 * linux-sparc-low.c (the_low_targets): Likewise.
9004
9005 2015-12-17 Pedro Alves <palves@redhat.com>
9006
9007 * linux-low.c (linux_kill_one_lwp): Remove references to
9008 LinuxThreads.
9009 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9010 to 'kill'.
9011 (linux_init_signals): Delete.
9012 (initialize_low): Adjust.
9013 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9014
9015 2015-12-16 Pedro Alves <palves@redhat.com>
9016
9017 * configure.ac (compiler warning flags): When testing a
9018 -Wno-foo option, check whether -Wfoo works instead.
9019 * configure: Regenerate.
9020
9021 2015-12-11 Don Breazeal <donb@codesourcery.com>
9022
9023 * server.c (process_serial_event): Don't exit from gdbserver
9024 in remote mode if there are still active inferiors.
9025
9026 2015-12-11 Yao Qi <yao.qi@linaro.org>
9027
9028 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9029 arm_breakpoint_at if the process is 32-bit.
9030
9031 2015-12-11 Yao Qi <yao.qi@linaro.org>
9032
9033 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9034 arm breakpoint.
9035
9036 2015-12-07 Yao Qi <yao.qi@linaro.org>
9037
9038 * configure.srv: Append arm.o to srv_tgtobj for
9039 aarch64*-*-linux* target.
9040 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9041 from linux-arm-low.c.
9042 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9043 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9044 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9045 (thumb2_breakpoint_len): Likewise.
9046 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9047 (arm_breakpoint_kinds): Likewise.
9048 (arm_breakpoint_kind_from_pc): Likewise.
9049 (arm_sw_breakpoint_from_kind): Likewise.
9050 (arm_breakpoint_kind_from_current_state): Likewise.
9051 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9052 (arm_sw_breakpoint_from_kind): Declare.
9053 (arm_breakpoint_kind_from_current_state): Declare.
9054 (arm_breakpoint_at): Declare.
9055 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9056 arm_sw_breakpoint_from_kind if process is 32-bit.
9057 (aarch64_breakpoint_kind_from_pc): New function.
9058 (aarch64_breakpoint_kind_from_current_state): New function.
9059 (the_low_target): Initialize fields breakpoint_kind_from_pc
9060 and breakpoint_kind_from_current_state.
9061 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9062 linux-aarch32-low.c.
9063 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9064 (arm_breakpoint, arm_breakpoint_len): Likewise.
9065 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9066 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9067 (arm_is_thumb_mode): Likewise.
9068 (arm_breakpoint_at): Likewise.
9069 (arm_breakpoint_kind_from_pc): Likewise.
9070 (arm_sw_breakpoint_from_kind): Likewise.
9071 (arm_breakpoint_kind_from_current_state): Likewise.
9072
9073 Revert:
9074 2015-08-04 Yao Qi <yao.qi@linaro.org>
9075
9076 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9077 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9078 * server.c (extended_protocol): Remove "static".
9079 * server.h (extended_protocol): Declare it.
9080
9081 2015-12-04 Josh Stone <jistone@redhat.com>
9082
9083 * target.h (struct target_ops) <arch_setup>: Rename to ...
9084 (struct target_ops) <post_create_inferior>: ... this.
9085 (target_arch_setup): Rename to ...
9086 (target_post_create_inferior): ... this, calling post_create_inferior.
9087 * server.c (start_inferior): Update target_arch_setup calls to
9088 target_post_create_inferior.
9089 * linux-low.c (linux_low_ptrace_options): Forward declare.
9090 (linux_arch_setup): Update its comment for general use.
9091 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9092 (struct linux_target_ops): Use linux_post_create_inferior.
9093 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9094 to post_create_inferior.
9095 * nto-low.c (struct nto_target_ops): Likewise.
9096 * spu-low.c (struct spu_target_ops): Likewise.
9097 * win32-low.c (struct win32_target_ops): Likewise.
9098
9099 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9100
9101 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9102
9103 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9104
9105 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9106 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9107 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9108 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9109 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9110 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9111 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9112 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9113 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9114 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9115 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9116 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9117
9118 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9119
9120 * linux-low.c (linux_look_up_symbols): Don't call
9121 linux_supports_traceclone.
9122 * linux-low.h (thread_db_init): Remove use_events argument.
9123 * thread-db.c (thread_db_use_event): Remove global variable.
9124 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9125 (struct thread_db) <td_create_bp>: Remove field.
9126 (thread_db_create_event): Remove function.
9127 (thread_db_enable_reporting): Likewise.
9128 (find_one_thread): Don't check for thread_db_use_events.
9129 (attach_thread): Likewise.
9130 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9131 (try_thread_db_load_1): Don't check for thread_db_use_events.
9132 (thread_db_init): Remove use_events argument and thread events
9133 handling.
9134 (remove_thread_event_breakpoints): Remove function.
9135 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9136
9137 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9138
9139 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9140 New function.
9141 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9142 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9143 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9144 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9145 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9146 Initialize.
9147 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9148 New function.
9149 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9150 * linux-low.c (can_hardware_single_step): Use
9151 supports_hardware_single_step.
9152 (can_software_single_step): New function.
9153 (start_step_over): Call can_software_single_step.
9154 (linux_supports_hardware_single_step): New function.
9155 (struct target_ops) <supports_software_single_step>: Initialize.
9156 * linux-low.h (struct linux_target_ops)
9157 <supports_hardware_single_step>: Initialize.
9158 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9159 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9160 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9161 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9162 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9163 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9164 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9165 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9166 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9167 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9168 Initialize.
9169 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9170 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9171 Initialize.
9172 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9173 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9174 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9175 New function.
9176 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9177 * target.h (struct target_ops): <supports_software_single_step>:
9178 New field.
9179 (target_supports_software_single_step): New macro.
9180
9181 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9182
9183 * linux-low.c (linux_wait_1): Fix pc advance condition.
9184 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9185 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9186
9187 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9188
9189 * linux-arm-low.c (arm_is_thumb_mode): New function.
9190 (arm_breakpoint_at): Use arm_is_thumb_mode.
9191 (arm_breakpoint_kind_from_current_state): New function.
9192 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9193 Initialize.
9194 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9195 (linux_breakpoint_kind_from_current_state): New function.
9196 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9197 * linux-low.h (struct linux_target_ops)
9198 <breakpoint_kind_from_current_state>: New field.
9199 * target.h (struct target_ops): Likewise.
9200 (target_breakpoint_kind_from_current_state): New macro.
9201
9202 2015-11-30 Pedro Alves <palves@redhat.com>
9203
9204 * linux-low.c (linux_resume): Wake up the event loop before
9205 returning.
9206
9207 2015-11-30 Pedro Alves <palves@redhat.com>
9208
9209 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9210 check.
9211 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9212 to -1.
9213 * target.c (struct thread_search): New structure.
9214 (thread_search_callback): New function.
9215 (prev_general_thread): New global.
9216 (prepare_to_access_memory, done_accessing_memory): New functions.
9217 * target.h (prepare_to_access_memory, done_accessing_memory):
9218 Replace macros with function declarations.
9219
9220 2015-11-30 Pedro Alves <palves@redhat.com>
9221
9222 PR 14618
9223 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9224 report TARGET_WAITKIND_NO_RESUMED.
9225 * remote-utils.c (prepare_resume_reply): Handle
9226 TARGET_WAITKIND_NO_RESUMED.
9227 * server.c (report_no_resumed): New global.
9228 (handle_query) <qSupported>: Handle "no-resumed+". Report
9229 "no-resumed+" support.
9230 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9231 return error if the client doesn't support no-resumed events.
9232 (push_stop_notification): New function.
9233 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9234 events if the client supports them.
9235
9236 2015-11-30 Pedro Alves <palves@redhat.com>
9237
9238 * linux-low.c (thread_still_has_status_pending_p): Don't check
9239 vCont;t here.
9240 (lwp_resumed): New function.
9241 (status_pending_p_callback): Return early if the LWP is not
9242 supposed to be resumed.
9243
9244 2015-11-30 Pedro Alves <palves@redhat.com>
9245
9246 * linux-low.c (handle_extended_wait): Assert that the LWP's
9247 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9248 thread create events, leave the new child's status pending.
9249 (linux_low_filter_event): If GDB wants to hear about thread exit
9250 events, leave the LWP marked dead and don't delete it.
9251 (linux_wait_for_event_filtered): Don't check for thread exit.
9252 (filter_exit_event): New function.
9253 (linux_wait_1): Use it, when returning an exit event.
9254 (linux_resume_one_lwp_throw): Assert that the LWP's
9255 waitstatus is TARGET_WAITKIND_IGNORE.
9256 * remote-utils.c (prepare_resume_reply): Handle
9257 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9258 * server.c (report_thread_events): New global.
9259 (handle_general_set): Handle QThreadEvents.
9260 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9261 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9262 TARGET_WAITKIND_THREAD_EXITED.
9263 * server.h (report_thread_events): Declare.
9264
9265 2015-11-30 Pedro Alves <palves@redhat.com>
9266
9267 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9268 the thread's last_resume_kind was resume_stop.
9269
9270 2015-11-30 Pedro Alves <palves@redhat.com>
9271
9272 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9273 before returning.
9274
9275 2015-11-30 Pedro Alves <palves@redhat.com>
9276
9277 * server.c (handle_v_requests): Handle vCtrlC.
9278
9279 2015-11-30 Pedro Alves <palves@redhat.com>
9280
9281 * gdbthread.h (find_any_thread_of_pid): Declare.
9282 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9283 functions.
9284 * server.c (handle_query): If current_thread is NULL, look for
9285 another thread of the selected process.
9286
9287 2015-11-26 Daniel Colascione <dancol@dancol.org>
9288 Simon Marchi <simon.marchi@ericsson.com>
9289
9290 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9291 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9292 name in reply.
9293 * target.h (struct target_ops) <thread_name>: New field.
9294 (target_thread_name): New macro.
9295
9296 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9297
9298 * regcache.h (regcache_invalidate_pid): Add declaration.
9299 * regcache.c (regcache_invalidate_pid): New function, extracted
9300 from regcache_invalidate.
9301 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9302 Add trivial documentation comment.
9303 * lynx-low.c: Use regcache_invalidate_pid instead of
9304 regcache_invalidate.
9305
9306 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9307
9308 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9309 and Elf64_auxv_t if the target is Android.
9310
9311 2015-11-22 Doug Evans <xdje42@gmail.com>
9312
9313 * target.h: #include <sys/types.h>.
9314
9315 2015-11-19 Pedro Alves <palves@redhat.com>
9316
9317 * linux-low.c (linux_process_qsupported): Change prototype.
9318 Adjust.
9319 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9320 Change prototype.
9321 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9322 and adjust to loop over all features.
9323 * server.c (handle_query) <qSupported>: Adjust to call
9324 target_process_qsupported once, passing it a vector of unprocessed
9325 features.
9326 * target.h (struct target_ops) <process_qsupported>: Change
9327 prototype.
9328 (target_process_qsupported): Adjust.
9329
9330 2015-11-19 Pedro Alves <palves@redhat.com>
9331
9332 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9333 mode.
9334 * configure: Regenerate.
9335
9336 2015-11-19 Pedro Alves <palves@redhat.com>
9337
9338 * configure: Regenerate.
9339
9340 2015-11-19 Yao Qi <yao.qi@linaro.org>
9341
9342 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9343 type to uint32_t.
9344
9345 2015-11-19 Yao Qi <yao.qi@linaro.org>
9346
9347 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9348 (struct aarch64_operand): Move enum out.
9349
9350 2015-11-19 Yao Qi <yao.qi@linaro.org>
9351
9352 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9353 struct user_fpsimd_state *.
9354 (aarch64_store_fpregset): Likewise.
9355
9356 2015-11-19 Yao Qi <yao.qi@linaro.org>
9357
9358 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9359 struct user_pt_regs *.
9360 (aarch64_store_gregset): Likewise.
9361
9362 2015-11-18 Pedro Alves <palves@redhat.com>
9363
9364 * Makefile.in (all_object_files): Add $IPA_OBJS.
9365
9366 2015-11-17 Pedro Alves <palves@redhat.com>
9367
9368 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9369 GDB_SIGNAL_0 and gdb_signal_to_string.
9370
9371 2015-11-17 Pedro Alves <palves@redhat.com>
9372
9373 * win32-low.c (handle_output_debug_string): Remove parameter.
9374 (win32_kill): Remove our_status local and adjust call to
9375 handle_output_debug_string.
9376 (get_child_debug_event): Adjust call to
9377 handle_output_debug_string.
9378
9379 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9380
9381 * linux-mips-low.c (mips_fill_gregset): Add cast.
9382 (mips_store_gregset): Likewise.
9383 (mips_fill_fpregset): Likewise.
9384 (mips_store_fpregset): Likewise.
9385
9386 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9387
9388 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9389 priv.
9390
9391 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9392
9393 * linux-mips-low.c (mips_linux_new_thread): Change type of
9394 watch_type to enum target_hw_bp_type.
9395
9396 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9397
9398 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9399 Change return type to arm_hwbp_type.
9400
9401 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9402
9403 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9404 (arm_store_gregset): Likewise.
9405 * linux-arm-low.c (arm_get_hwcap): Likewise.
9406 (arm_read_description): Likewise.
9407
9408 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9409
9410 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9411
9412 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9413
9414 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9415 (ppc_fill_vsxregset): Likewise.
9416 (ppc_store_vsxregset): Likewise.
9417 (ppc_fill_vrregset): Likewise.
9418 (ppc_store_vrregset): Likewise.
9419 (ppc_fill_evrregset): Likewise.
9420 (ppc_store_evrregset): Likewise.
9421
9422 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9423
9424 * linux-ppc-low.c (ppc_usrregs_info): Remove
9425 forward-declaration.
9426 (ppc_arch_setup): Move lower in file.
9427
9428 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9429
9430 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9431 (ps_pdwrite): Likewise.
9432
9433 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9434
9435 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9436 to after assert checks.
9437
9438 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9439
9440 * proc-service.c (ps_pdread): Add/adjust casts.
9441 (ps_pdwrite): Add/adjust casts.
9442
9443 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9444
9445 * server.c (handle_search_memory_1): Cast return value of
9446 memmem.
9447
9448 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9449
9450 * server.c (write_qxfer_response): Change type of data to
9451 gdb_byte *.
9452
9453 2015-10-29 Pedro Alves <palves@redhat.com>
9454
9455 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9456
9457 2015-10-29 Pedro Alves <palves@redhat.com>
9458
9459 * tracepoint.c (clear_installed_tracepoints): Add casts.
9460
9461 2015-10-29 Pedro Alves <palves@redhat.com>
9462
9463 * server.c (handle_v_cont, process_serial_event): Add enum
9464 gdb_signal casts to signal parsing code.
9465
9466 2015-10-29 Pedro Alves <palves@redhat.com>
9467
9468 * linux-low.h (NULL_REGSET): Define.
9469 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9470 * linux-arm-low.c (arm_regsets): Likewise.
9471 * linux-crisv32-low.c (cris_regsets): Likewise.
9472 * linux-m68k-low.c (m68k_regsets): Likewise.
9473 * linux-mips-low.c (mips_regsets): Likewise.
9474 * linux-nios2-low.c (nios2_regsets): Likewise.
9475 * linux-ppc-low.c (ppc_regsets): Likewise.
9476 * linux-s390-low.c (s390_regsets): Likewise.
9477 * linux-sh-low.c (sh_regsets): Likewise.
9478 * linux-sparc-low.c (sparc_regsets): Likewise.
9479 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9480 * linux-tile-low.c (tile_regsets): Likewise.
9481 * linux-x86-low.c (x86_regsets): Likewise.
9482 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9483
9484 2015-10-29 Pedro Alves <palves@redhat.com>
9485
9486 * linux-low.h (NULL_REGSET): Define.
9487 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9488 * linux-arm-low.c (arm_regsets): Likewise.
9489 * linux-crisv32-low.c (cris_regsets): Likewise.
9490 * linux-m68k-low.c (m68k_regsets): Likewise.
9491 * linux-mips-low.c (mips_regsets): Likewise.
9492 * linux-nios2-low.c (nios2_regsets): Likewise.
9493 * linux-ppc-low.c (ppc_regsets): Likewise.
9494 * linux-s390-low.c (s390_regsets): Likewise.
9495 * linux-sh-low.c (sh_regsets): Likewise.
9496 * linux-sparc-low.c (sparc_regsets): Likewise.
9497 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9498 * linux-tile-low.c (tile_regsets): Likewise.
9499 * linux-x86-low.c (x86_regsets): Likewise.
9500 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9501
9502 2015-10-26 Doug Evans <dje@google.com>
9503
9504 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9505
9506 2015-10-26 Doug Evans <dje@google.com>
9507
9508 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9509
9510 2015-10-26 Doug Evans <dje@google.com>
9511
9512 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9513 for debug_printf.
9514 (attach_thread, find_new_threads_callback): Ditto.
9515
9516 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9517
9518 * mem-break.h (set_breakpoint_data): Remove.
9519
9520 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9521
9522 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9523 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9524 (initialize_low): Remove set_breakpoint_data call.
9525 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9526 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9527 (initialize_low): Remove set_breakpoint_data call.
9528 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9529 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9530 (initialize_low): Remove set_breakpoint_data call.
9531
9532 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9533
9534 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9535 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9536 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9537 * target.h (target_breakpoint_kind_from_pc): New macro.
9538
9539 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9540
9541 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9542 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9543 the default breakpoint kind.
9544
9545 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9546
9547 * linux-arm-low.c (arm_supports_z_point_type): Add software
9548 breakpoint support.
9549
9550 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9551
9552 * linux-arm-low.c: Refactor breakpoint definitions.
9553 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9554 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9555
9556 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9557
9558 * Makefile.in: Add arm.c/o.
9559 * configure.srv: Likewise.
9560 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9561 (arm_breakpoint_kind_from_pc): New function.
9562 (arm_sw_breakpoint_from_kind): Return proper kind.
9563 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9564
9565 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9566
9567 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9568 removal.
9569 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9570 (struct raw_breakpoint) <size>: Remove.
9571 (struct raw_breakpoint) <kind>: Add.
9572 (bp_size): New function.
9573 (bp_opcode): Likewise.
9574 (find_raw_breakpoint_at): Adjust for kind.
9575 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9576 (remove_memory_breakpoint): Adjust for kind call bp_size.
9577 (set_raw_breakpoint_at): Adjust for kind.
9578 (set_breakpoint): Likewise.
9579 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9580 (delete_raw_breakpoint): Adjust for kind.
9581 (delete_breakpoint): Likewise.
9582 (find_gdb_breakpoint): Likewise.
9583 (set_gdb_breakpoint_1): Likewise.
9584 (set_gdb_breakpoint): Likewise.
9585 (delete_gdb_breakpoint_1): Likewise.
9586 (delete_gdb_breakpoint): Likewise.
9587 (uninsert_raw_breakpoint): Likewise.
9588 (reinsert_raw_breakpoint): Likewise.
9589 (set_breakpoint_data): Remove.
9590 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9591 (check_mem_read): Adjust for kind call bp_size.
9592 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9593 (clone_one_breakpoint): Adjust for kind.
9594 * mem-break.h (set_gdb_breakpoint): Likewise.
9595 (delete_gdb_breakpoint): Likewise.
9596 * server.c (process_serial_event): Likewise.
9597
9598 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9599
9600 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9601 (struct linux_target_ops) <breakpoint>: Remove.
9602 (struct linux_target_ops) <breakpoint_len>: Remove.
9603 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9604 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9605 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9606 (arm_sw_breakpoint_from_kind): New function.
9607 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9608 (struct linux_target_ops) <breakpoint>: Remove.
9609 (struct linux_target_ops) <breakpoint_len>: Remove.
9610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9612 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9613 (struct linux_target_ops) <breakpoint>: Remove.
9614 (struct linux_target_ops) <breakpoint_len>: Remove.
9615 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9616 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9617 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9618 (struct linux_target_ops) <breakpoint>: Remove.
9619 (struct linux_target_ops) <breakpoint_len>: Remove.
9620 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9621 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9622 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9623 and sw_breakpoint_from_kind to increment the pc.
9624 (linux_breakpoint_kind_from_pc): New function.
9625 (linux_sw_breakpoint_from_kind): New function.
9626 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9627 (initialize_low): Call breakpoint_kind_from_pc and
9628 sw_breakpoint_from_kind to replace breakpoint_data/len.
9629 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9630 New field.
9631 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9632 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9633 (struct linux_target_ops) <breakpoint>: Remove.
9634 (struct linux_target_ops) <breakpoint_len>: Remove.
9635 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9636 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9637 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9638 (struct linux_target_ops) <breakpoint>: Remove.
9639 (struct linux_target_ops) <breakpoint_len>: Remove.
9640 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9641 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9642 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9643 (struct linux_target_ops) <breakpoint>: Remove.
9644 (struct linux_target_ops) <breakpoint_len>: Remove.
9645 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9646 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9647 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9648 (struct linux_target_ops) <breakpoint>: Remove.
9649 (struct linux_target_ops) <breakpoint_len>: Remove.
9650 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9651 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9652 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9653 (struct linux_target_ops) <breakpoint>: Remove.
9654 (struct linux_target_ops) <breakpoint_len>: Remove.
9655 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9656 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9657 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9658 (struct linux_target_ops) <breakpoint>: Remove.
9659 (struct linux_target_ops) <breakpoint_len>: Remove.
9660 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9661 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9662 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9663 (struct linux_target_ops) <breakpoint>: Remove.
9664 (struct linux_target_ops) <breakpoint_len>: Remove.
9665 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9666 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9667 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9668 (struct linux_target_ops) <breakpoint>: Remove.
9669 (struct linux_target_ops) <breakpoint_len>: Remove.
9670 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9671 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9672 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9673 (struct linux_target_ops) <breakpoint>: Remove.
9674 (struct linux_target_ops) <breakpoint_len>: Remove.
9675 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9676 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9677 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9678 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9679 (struct linux_target_ops) <breakpoint>: Remove.
9680 (struct linux_target_ops) <breakpoint_len>: Remove.
9681 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9682 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9683 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9684 (struct linux_target_ops) <breakpoint>: Remove.
9685 (struct linux_target_ops) <breakpoint_len>: Remove.
9686 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9687 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9688
9689 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9690
9691 * linux-cris-low.c (cris_get_pc): Remove void arg.
9692
9693 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9694
9695 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9696 variable name.
9697
9698 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9699
9700 * inferiors.c (thread_pid_matches_callback): New function.
9701 (find_thread_process): New function.
9702 (remove_thread): Reset current_thread.
9703 (remove_process): Assert threads have been removed first.
9704
9705 2015-10-15 Yao Qi <yao.qi@linaro.org>
9706
9707 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9708 if it is 3.
9709 (aarch64_remove_point): Likewise.
9710 * regcache.c (regcache_register_size): New function.
9711
9712 2015-10-12 Yao Qi <yao.qi@linaro.org>
9713
9714 * linux-aarch64-low.c: Update all callers as emit_load_store
9715 is renamed to aarch64_emit_load_store.
9716
9717 2015-10-12 Yao Qi <yao.qi@linaro.org>
9718
9719 * linux-aarch64-low.c: Update all callers of function renaming
9720 from emit_insn to aarch64_emit_insn.
9721
9722 2015-10-12 Yao Qi <yao.qi@linaro.org>
9723
9724 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9725 arch/aarch64-insn.h.
9726 (struct aarch64_memory_operand): Likewise.
9727 (ENCODE): Likewise.
9728 (emit_insn): Move to arch/aarch64-insn.c.
9729 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9730 (emit_load_store): Move to arch/aarch64-insn.c.
9731 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9732 (can_encode_int32): Remove.
9733
9734 2015-10-12 Yao Qi <yao.qi@linaro.org>
9735
9736 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9737 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9738 (aarch64_relocate_instruction): Likewise.
9739 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9740 (struct aarch64_insn_visitor): Likewise.
9741
9742 2015-10-12 Yao Qi <yao.qi@linaro.org>
9743
9744 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9745 (struct aarch64_insn_visitor): New.
9746 (struct aarch64_insn_relocation_data): New.
9747 (aarch64_ftrace_insn_reloc_b): New function.
9748 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9749 (aarch64_ftrace_insn_reloc_cb): Likewise.
9750 (aarch64_ftrace_insn_reloc_tb): Likewise.
9751 (aarch64_ftrace_insn_reloc_adr): Likewise.
9752 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9753 (aarch64_ftrace_insn_reloc_others): Likewise.
9754 (visitor): New.
9755 (aarch64_relocate_instruction): Use visitor.
9756
9757 2015-10-12 Yao Qi <yao.qi@linaro.org>
9758
9759 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9760 int. Add argument buf.
9761 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9762 aarch64_relocate_instruction.
9763
9764 2015-10-12 Yao Qi <yao.qi@linaro.org>
9765
9766 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9767 argument insn. Remove local variable insn. Don't call
9768 target_read_uint32.
9769 (aarch64_install_fast_tracepoint_jump_pad): Call
9770 target_read_uint32.
9771
9772 2015-09-30 Yao Qi <yao.qi@linaro.org>
9773
9774 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9775 (emit_load_store_pair): Likewise.
9776
9777 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9778
9779 * dll.c (match_dll): Add cast(s).
9780 (unloaded_dll): Likewise.
9781 * linux-low.c (second_thread_of_pid_p): Likewise.
9782 (delete_lwp_callback): Likewise.
9783 (count_events_callback): Likewise.
9784 (select_event_lwp_callback): Likewise.
9785 (linux_set_resume_request): Likewise.
9786 * server.c (accumulate_file_name_length): Likewise.
9787 (emit_dll_description): Likewise.
9788 (handle_qxfer_threads_worker): Likewise.
9789 (visit_actioned_threads): Likewise.
9790 * thread-db.c (any_thread_of): Likewise.
9791 * tracepoint.c (same_process_p): Likewise.
9792 (match_blocktype): Likewise.
9793 (build_traceframe_info_xml): Likewise.
9794
9795 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9796
9797 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9798 assignment.
9799 (gdb_unparse_agent_expr): Likewise.
9800 * hostio.c (require_data): Likewise.
9801 (handle_pread): Likewise.
9802 * linux-low.c (disable_regset): Likewise.
9803 (fetch_register): Likewise.
9804 (store_register): Likewise.
9805 (get_dynamic): Likewise.
9806 (linux_qxfer_libraries_svr4): Likewise.
9807 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9808 (set_fast_tracepoint_jump): Likewise.
9809 (uninsert_fast_tracepoint_jumps_at): Likewise.
9810 (reinsert_fast_tracepoint_jumps_at): Likewise.
9811 (validate_inserted_breakpoint): Likewise.
9812 (clone_agent_expr): Likewise.
9813 * regcache.c (init_register_cache): Likewise.
9814 * remote-utils.c (putpkt_binary_1): Likewise.
9815 (decode_M_packet): Likewise.
9816 (decode_X_packet): Likewise.
9817 (look_up_one_symbol): Likewise.
9818 (relocate_instruction): Likewise.
9819 (monitor_output): Likewise.
9820 * server.c (handle_search_memory): Likewise.
9821 (handle_qxfer_exec_file): Likewise.
9822 (handle_qxfer_libraries): Likewise.
9823 (handle_qxfer): Likewise.
9824 (handle_query): Likewise.
9825 (handle_v_cont): Likewise.
9826 (handle_v_run): Likewise.
9827 (captured_main): Likewise.
9828 * target.c (write_inferior_memory): Likewise.
9829 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9830 * tracepoint.c (init_trace_buffer): Likewise.
9831 (add_tracepoint_action): Likewise.
9832 (add_traceframe): Likewise.
9833 (add_traceframe_block): Likewise.
9834 (cmd_qtdpsrc): Likewise.
9835 (cmd_qtdv): Likewise.
9836 (cmd_qtstatus): Likewise.
9837 (response_source): Likewise.
9838 (response_tsv): Likewise.
9839 (cmd_qtnotes): Likewise.
9840 (gdb_collect): Likewise.
9841 (initialize_tracepoint): Likewise.
9842
9843 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9844
9845 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9846 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9847 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9848 <NOP>: New.
9849 (enum aarch64_condition_codes): New enum.
9850 (w0): New static global.
9851 (fp): Likewise.
9852 (lr): Likewise.
9853 (struct aarch64_memory_operand) <type>: New
9854 MEMORY_OPERAND_POSTINDEX type.
9855 (postindex_memory_operand): New helper function.
9856 (emit_ret): New function.
9857 (emit_load_store_pair): New function, factored out of emit_stp
9858 with support for MEMORY_OPERAND_POSTINDEX.
9859 (emit_stp): Rewrite using emit_load_store_pair.
9860 (emit_ldp): New function.
9861 (emit_load_store): Likewise.
9862 (emit_ldr): Mention post-index instruction in comment.
9863 (emit_ldrh): New function.
9864 (emit_ldrb): New function.
9865 (emit_ldrsw): Mention post-index instruction in comment.
9866 (emit_str): Likewise.
9867 (emit_subs): New function.
9868 (emit_cmp): Likewise.
9869 (emit_and): Likewise.
9870 (emit_orr): Likewise.
9871 (emit_orn): Likewise.
9872 (emit_eor): Likewise.
9873 (emit_mvn): Likewise.
9874 (emit_lslv): Likewise.
9875 (emit_lsrv): Likewise.
9876 (emit_asrv): Likewise.
9877 (emit_mul): Likewise.
9878 (emit_sbfm): Likewise.
9879 (emit_sbfx): Likewise.
9880 (emit_ubfm): Likewise.
9881 (emit_ubfx): Likewise.
9882 (emit_csinc): Likewise.
9883 (emit_cset): Likewise.
9884 (emit_nop): Likewise.
9885 (emit_ops_insns): New helper function.
9886 (emit_pop): Likewise.
9887 (emit_push): Likewise.
9888 (aarch64_emit_prologue): New function.
9889 (aarch64_emit_epilogue): Likewise.
9890 (aarch64_emit_add): Likewise.
9891 (aarch64_emit_sub): Likewise.
9892 (aarch64_emit_mul): Likewise.
9893 (aarch64_emit_lsh): Likewise.
9894 (aarch64_emit_rsh_signed): Likewise.
9895 (aarch64_emit_rsh_unsigned): Likewise.
9896 (aarch64_emit_ext): Likewise.
9897 (aarch64_emit_log_not): Likewise.
9898 (aarch64_emit_bit_and): Likewise.
9899 (aarch64_emit_bit_or): Likewise.
9900 (aarch64_emit_bit_xor): Likewise.
9901 (aarch64_emit_bit_not): Likewise.
9902 (aarch64_emit_equal): Likewise.
9903 (aarch64_emit_less_signed): Likewise.
9904 (aarch64_emit_less_unsigned): Likewise.
9905 (aarch64_emit_ref): Likewise.
9906 (aarch64_emit_if_goto): Likewise.
9907 (aarch64_emit_goto): Likewise.
9908 (aarch64_write_goto_address): Likewise.
9909 (aarch64_emit_const): Likewise.
9910 (aarch64_emit_call): Likewise.
9911 (aarch64_emit_reg): Likewise.
9912 (aarch64_emit_pop): Likewise.
9913 (aarch64_emit_stack_flush): Likewise.
9914 (aarch64_emit_zero_ext): Likewise.
9915 (aarch64_emit_swap): Likewise.
9916 (aarch64_emit_stack_adjust): Likewise.
9917 (aarch64_emit_int_call_1): Likewise.
9918 (aarch64_emit_void_call_2): Likewise.
9919 (aarch64_emit_eq_goto): Likewise.
9920 (aarch64_emit_ne_goto): Likewise.
9921 (aarch64_emit_lt_goto): Likewise.
9922 (aarch64_emit_le_goto): Likewise.
9923 (aarch64_emit_gt_goto): Likewise.
9924 (aarch64_emit_ge_got): Likewise.
9925 (aarch64_emit_ops_impl): New static global variable.
9926 (aarch64_emit_ops): New target function, return
9927 &aarch64_emit_ops_impl.
9928 (struct linux_target_ops): Install it.
9929
9930 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9931
9932 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
9933 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
9934 aarch64-ipa.o.
9935 * linux-aarch64-ipa.c: New file.
9936 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
9937 and endian.h.
9938 (aarch64_get_thread_area): New target method.
9939 (extract_signed_bitfield): New helper function.
9940 (aarch64_decode_ldr_literal): New function.
9941 (enum aarch64_opcodes): New enum.
9942 (struct aarch64_register): New struct.
9943 (struct aarch64_operand): New struct.
9944 (x0): New static global.
9945 (x1): Likewise.
9946 (x2): Likewise.
9947 (x3): Likewise.
9948 (x4): Likewise.
9949 (w2): Likewise.
9950 (ip0): Likewise.
9951 (sp): Likewise.
9952 (xzr): Likewise.
9953 (aarch64_register): New helper function.
9954 (register_operand): Likewise.
9955 (immediate_operand): Likewise.
9956 (struct aarch64_memory_operand): New struct.
9957 (offset_memory_operand): New helper function.
9958 (preindex_memory_operand): Likewise.
9959 (enum aarch64_system_control_registers): New enum.
9960 (ENCODE): New macro.
9961 (emit_insn): New helper function.
9962 (emit_b): New function.
9963 (emit_bcond): Likewise.
9964 (emit_cb): Likewise.
9965 (emit_tb): Likewise.
9966 (emit_blr): Likewise.
9967 (emit_stp): Likewise.
9968 (emit_ldp_q_offset): Likewise.
9969 (emit_stp_q_offset): Likewise.
9970 (emit_load_store): Likewise.
9971 (emit_ldr): Likewise.
9972 (emit_ldrsw): Likewise.
9973 (emit_str): Likewise.
9974 (emit_ldaxr): Likewise.
9975 (emit_stxr): Likewise.
9976 (emit_stlr): Likewise.
9977 (emit_data_processing_reg): Likewise.
9978 (emit_data_processing): Likewise.
9979 (emit_add): Likewise.
9980 (emit_sub): Likewise.
9981 (emit_mov): Likewise.
9982 (emit_movk): Likewise.
9983 (emit_mov_addr): Likewise.
9984 (emit_mrs): Likewise.
9985 (emit_msr): Likewise.
9986 (emit_sevl): Likewise.
9987 (emit_wfe): Likewise.
9988 (append_insns): Likewise.
9989 (can_encode_int32_in): New helper function.
9990 (aarch64_relocate_instruction): New function.
9991 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
9992 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
9993 (struct linux_target_ops): Install aarch64_get_thread_area,
9994 aarch64_install_fast_tracepoint_jump_pad and
9995 aarch64_get_min_fast_tracepoint_insn_len.
9996
9997 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9998
9999 * Makefile.in (aarch64-insn.o): New rule.
10000 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10001
10002 2015-09-21 Yao Qi <yao.qi@linaro.org>
10003
10004 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10005
10006 2015-09-21 Yao Qi <yao.qi@linaro.org>
10007
10008 * tracepoint.c (max_jump_pad_size): Remove.
10009
10010 2015-09-18 Yao Qi <yao.qi@linaro.org>
10011
10012 * linux-aarch64-low.c: Don't include sys/uio.h.
10013 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10014
10015 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10016
10017 * tracepoint.c (eval_result_type): Change prototype.
10018 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10019
10020 2015-09-15 Pedro Alves <palves@redhat.com>
10021
10022 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10023 Check whether to report exec events instead of checking whether
10024 multiprocess is enabled.
10025
10026 2015-09-15 Pedro Alves <palves@redhat.com>
10027
10028 PR remote/18965
10029 * remote-utils.c (prepare_resume_reply): Merge
10030 TARGET_WAITKIND_VFORK_DONE switch case with the
10031 TARGET_WAITKIND_FORKED case.
10032
10033 2015-09-15 Yao Qi <yao.qi@linaro.org>
10034
10035 * server.c (handle_query): Check string comparison using
10036 "else if" instead of "if".
10037
10038 2015-09-15 Yao Qi <yao.qi@linaro.org>
10039
10040 * server.c (vCont_supported): New global variable.
10041 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10042 matches. Append ";vContSupported+" to own_buf.
10043 (handle_v_requests): Append ";s;S" to own_buf if target supports
10044 hardware single step or vCont_supported is false.
10045 (capture_main): Set vCont_supported to zero.
10046
10047 2015-09-15 Yao Qi <yao.qi@linaro.org>
10048
10049 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10050 it to ...
10051 (linux_supports_hardware_single_step): ... New function.
10052 (linux_target_ops): Update.
10053 * lynx-low.c (lynx_target_ops): Set field
10054 supports_hardware_single_step to target_can_do_hardware_single_step.
10055 * nto-low.c (nto_target_ops): Likewise.
10056 * spu-low.c (spu_target_ops): Likewise.
10057 * win32-low.c (win32_target_ops): Likewise.
10058 * target.c (target_can_do_hardware_single_step): New function.
10059 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10060 Remove. <supports_hardware_single_step>: New field.
10061 (target_supports_conditional_breakpoints): Remove.
10062 (target_supports_hardware_single_step): New macro.
10063 (target_can_do_hardware_single_step): Declare.
10064 * server.c (handle_query): Use target_supports_hardware_single_step
10065 instead of target_supports_conditional_breakpoints.
10066
10067 2015-09-15 Yao Qi <yao.qi@linaro.org>
10068
10069 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10070 function.
10071 (struct linux_target_ops the_low_target): Install
10072 aarch64_linux_siginfo_fixup.
10073
10074 2015-09-11 Don Breazeal <donb@codesourcery.com>
10075 Luis Machado <lgustavo@codesourcery.com>
10076
10077 * linux-low.c (linux_mourn): Static declaration.
10078 (linux_arch_setup): Move in front of
10079 handle_extended_wait.
10080 (linux_arch_setup_thread): New function.
10081 (handle_extended_wait): Handle exec events. Call
10082 linux_arch_setup_thread. Make event_lwp argument a
10083 pointer-to-a-pointer.
10084 (check_zombie_leaders): Do not check stopped threads.
10085 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10086 (linux_low_filter_event): Add lwp and thread for exec'ing
10087 non-leader thread if leader thread has been deleted.
10088 Refactor code into linux_arch_setup_thread and call it.
10089 Pass child lwp pointer by reference to handle_extended_wait.
10090 (linux_wait_for_event_filtered): Update comment.
10091 (linux_wait_1): Prevent clobbering exec event status.
10092 (linux_supports_exec_events): New function.
10093 (linux_target_ops) <supports_exec_events>: Initialize new member.
10094 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10095 new member.
10096 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10097 * server.c (report_exec_events): New global variable.
10098 (handle_query): Handle qSupported query for exec-events feature.
10099 (captured_main): Initialize report_exec_events.
10100 * server.h (report_exec_events): Declare new global variable.
10101 * target.h (struct target_ops) <supports_exec_events>: New
10102 member.
10103 (target_supports_exec_events): New macro.
10104 * win32-low.c (win32_target_ops) <supports_exec_events>:
10105 Initialize new member.
10106
10107 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10108
10109 * linux-low.c (linux_low_enable_btrace): Remove.
10110 (linux_target_ops): Replace linux_low_enable_btrace with
10111 linux_enable_btrace.
10112
10113 2015-09-03 Yao Qi <yao.qi@linaro.org>
10114
10115 * linux-aarch64-low.c (aarch64_insert_point): Call
10116 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10117 returns true.
10118
10119 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10120
10121 * linux-low.c (check_stopped_by_breakpoint): Use
10122 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10123
10124 2015-08-27 Pedro Alves <palves@redhat.com>
10125
10126 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10127
10128 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10129
10130 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10131 the XNEW-family equivalent.
10132 (compile_bytecodes): Likewise.
10133 * dll.c (loaded_dll): Likewise.
10134 * event-loop.c (append_callback_event): Likewise.
10135 (create_file_handler): Likewise.
10136 (create_file_event): Likewise.
10137 * hostio.c (handle_open): Likewise.
10138 * inferiors.c (add_thread): Likewise.
10139 (add_process): Likewise.
10140 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10141 * linux-arm-low.c (arm_new_process): Likewise.
10142 (arm_new_thread): Likewise.
10143 * linux-low.c (add_to_pid_list): Likewise.
10144 (linux_add_process): Likewise.
10145 (handle_extended_wait): Likewise.
10146 (add_lwp): Likewise.
10147 (enqueue_one_deferred_signal): Likewise.
10148 (enqueue_pending_signal): Likewise.
10149 (linux_resume_one_lwp_throw): Likewise.
10150 (linux_resume_one_thread): Likewise.
10151 (linux_read_memory): Likewise.
10152 (linux_write_memory): Likewise.
10153 * linux-mips-low.c (mips_linux_new_process): Likewise.
10154 (mips_linux_new_thread): Likewise.
10155 (mips_add_watchpoint): Likewise.
10156 * linux-x86-low.c (initialize_low_arch): Likewise.
10157 * lynx-low.c (lynx_add_process): Likewise.
10158 * mem-break.c (set_raw_breakpoint_at): Likewise.
10159 (set_breakpoint): Likewise.
10160 (add_condition_to_breakpoint): Likewise.
10161 (add_commands_to_breakpoint): Likewise.
10162 (clone_agent_expr): Likewise.
10163 (clone_one_breakpoint): Likewise.
10164 * regcache.c (new_register_cache): Likewise.
10165 * remote-utils.c (look_up_one_symbol): Likewise.
10166 * server.c (queue_stop_reply): Likewise.
10167 (start_inferior): Likewise.
10168 (queue_stop_reply_callback): Likewise.
10169 (handle_target_event): Likewise.
10170 * spu-low.c (fetch_ppc_memory): Likewise.
10171 (store_ppc_memory): Likewise.
10172 * target.c (set_target_ops): Likewise.
10173 * thread-db.c (thread_db_load_search): Likewise.
10174 (try_thread_db_load_1): Likewise.
10175 * tracepoint.c (add_tracepoint): Likewise.
10176 (add_tracepoint_action): Likewise.
10177 (create_trace_state_variable): Likewise.
10178 (cmd_qtdpsrc): Likewise.
10179 (cmd_qtro): Likewise.
10180 (add_while_stepping_state): Likewise.
10181 * win32-low.c (child_add_thread): Likewise.
10182 (get_image_name): Likewise.
10183
10184 2015-08-25 Yao Qi <yao.qi@linaro.org>
10185
10186 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10187
10188 2015-08-25 Yao Qi <yao.qi@linaro.org>
10189
10190 * Makefile.in (aarch64-linux.o): New rule.
10191 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10192 srv_tgtobj.
10193 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10194 (aarch64_init_debug_reg_state): Make it extern.
10195 (aarch64_linux_prepare_to_resume): Remove.
10196
10197 2015-08-25 Yao Qi <yao.qi@linaro.org>
10198
10199 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10200 lwp_arch_private_info and ptid_of_lwp.
10201
10202 2015-08-25 Yao Qi <yao.qi@linaro.org>
10203
10204 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10205 Find proc_info by find_process_pid. All callers updated.
10206
10207 2015-08-25 Yao Qi <yao.qi@linaro.org>
10208
10209 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10210 Remove.
10211 (debug_reg_change_callback): Remove.
10212 (aarch64_notify_debug_reg_change): Remove.
10213
10214 2015-08-25 Yao Qi <yao.qi@linaro.org>
10215
10216 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10217 Call current_lwp_ptid.
10218
10219 2015-08-25 Yao Qi <yao.qi@linaro.org>
10220
10221 * linux-aarch64-low.c (debug_reg_change_callback): Use
10222 debug_printf.
10223
10224 2015-08-25 Yao Qi <yao.qi@linaro.org>
10225
10226 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10227
10228 2015-08-25 Yao Qi <yao.qi@linaro.org>
10229
10230 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10231
10232 2015-08-25 Yao Qi <yao.qi@linaro.org>
10233
10234 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10235 the code.
10236
10237 2015-08-25 Yao Qi <yao.qi@linaro.org>
10238
10239 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10240 Remove.
10241 (debug_reg_change_callback): Remove argument entry and add argument
10242 lwp. Remove local variable thread. Don't print thread id in the
10243 debugging output. Don't check whether pid of thread equals to pid.
10244 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10245 iterate_over_lwps instead find_inferior.
10246
10247 2015-08-24 Pedro Alves <palves@redhat.com>
10248
10249 * inferiors.c (get_first_process): New function.
10250 * inferiors.h (get_first_process): New declaration.
10251 * remote-utils.c (read_ptid): Default to the first process in the
10252 list, instead of to the current thread's process.
10253
10254 2015-08-24 Pedro Alves <palves@redhat.com>
10255
10256 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10257 * event-loop.c: Likewise.
10258 * remote-utils.c: Likewise.
10259 * tracepoint.c: Likewise.
10260
10261 2015-08-24 Pedro Alves <palves@redhat.com>
10262
10263 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10264 ptid_get_lwp.
10265
10266 2015-08-21 Pedro Alves <palves@redhat.com>
10267
10268 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10269 instead of literal 1.
10270
10271 2015-08-21 Pedro Alves <palves@redhat.com>
10272
10273 * tdesc.c (default_description): Explicitly zero-initialize.
10274
10275 2015-08-21 Pedro Alves <palves@redhat.com>
10276
10277 PR gdb/18749
10278 * inferiors.c (remove_thread): Discard any pending stop reply for
10279 this thread.
10280 * server.c (remove_all_on_match_pid): Rename to ...
10281 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10282 instead of a pid.
10283 (discard_queued_stop_replies): Change parameter to a ptid. Now
10284 extern.
10285 (handle_v_kill, kill_inferior_callback, captured_main)
10286 (process_serial_event): Adjust.
10287 * server.h (discard_queued_stop_replies): Declare.
10288
10289 2015-08-21 Pedro Alves <palves@redhat.com>
10290
10291 * linux-low.c (wait_for_sigstop): Always switch to no thread
10292 selected if the previously current thread dies.
10293 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10294 process instead of the current thread's.
10295 * remote-utils.c (input_interrupt): Don't check if there's no
10296 current thread.
10297 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10298 current thread to the general thread fails, error out.
10299 (handle_qxfer_auxv, handle_qxfer_libraries)
10300 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10301 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10302 (handle_query): Check if there's a thread selected instead of
10303 checking whether there's any thread in the thread list.
10304 (handle_qxfer_threads, handle_qxfer_btrace)
10305 (handle_qxfer_btrace_conf): Don't error out early if there's no
10306 thread in the thread list.
10307 (handle_v_cont, myresume): Don't set the current thread to the
10308 continue thread.
10309 (process_serial_event) <Hg handling>: Also set thread_id if the
10310 previous general thread is still alive.
10311 (process_serial_event) <g/G handling>: If setting the current
10312 thread to the general thread fails, error out.
10313 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10314 thread's lwp instead of the current thread's.
10315 * target.c (set_desired_thread): If the desired thread was not
10316 found, leave the current thread pointing to NULL. Return an int
10317 (boolean) indicating success.
10318 * target.h (set_desired_thread): Change return type to int.
10319
10320 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10321
10322 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10323 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10324 #includes.
10325 (ps_get_thread_area): New function.
10326
10327 2015-08-19 Gary Benson <gbenson@redhat.com>
10328
10329 * hostio.c (handle_pread): Do not attempt to read more data
10330 than hostio_reply_with_data can fit in a packet.
10331
10332 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10333
10334 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10335
10336 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10337
10338 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10339
10340 2015-08-06 Pedro Alves <palves@redhat.com>
10341
10342 * tracepoint.c (expr_eval_result): Now an int.
10343
10344 2015-08-06 Pedro Alves <palves@redhat.com>
10345
10346 * gdbthread.h (struct regcache): Forward declare.
10347 (struct thread_info) <regcache_data>: Now a struct regcache
10348 pointer.
10349 * inferiors.c (inferior_regcache_data)
10350 (set_inferior_regcache_data): Now work with struct regcache
10351 pointers.
10352 * inferiors.h (struct regcache): Forward declare.
10353 (inferior_regcache_data, set_inferior_regcache_data): Now work
10354 with struct regcache pointers.
10355 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10356 (free_register_cache_thread): Remove struct regcache pointer
10357 casts.
10358
10359 2015-08-06 Pedro Alves <palves@redhat.com>
10360
10361 * server.c (captured_main): On error, print the exception message
10362 to stderr, and if run_once is set, throw a quit.
10363
10364 2015-08-06 Pedro Alves <palves@redhat.com>
10365
10366 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10367 the current thread.
10368
10369 2015-08-06 Pedro Alves <palves@redhat.com>
10370
10371 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10372 reading beyond the passed in buffer length.
10373
10374 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10375
10376 * tracepoint.c (symbol_list) <required>: Remove.
10377
10378 2015-08-06 Pedro Alves <palves@redhat.com>
10379
10380 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10381 count if stopping and suspending threads.
10382 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10383 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10384 (linux_detach): Complete an ongoing step-over.
10385 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10386 throughout.
10387 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10388 (linux_wait_1): If passing a signal to the inferior after
10389 finishing a step-over, unsuspend and re-resume all lwps. If we
10390 see a single-step event but the thread should be continuing, don't
10391 pass the trap to gdb.
10392 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10393 internal_error instead of gdb_assert.
10394 (enqueue_pending_signal): New function.
10395 (check_ptrace_stopped_lwp_gone): Add debug output.
10396 (start_step_over): Use internal_error instead of gdb_assert.
10397 (complete_ongoing_step_over): New function.
10398 (linux_resume_one_thread): Don't resume a suspended thread.
10399 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10400 it stepping.
10401
10402 2015-08-06 Pedro Alves <palves@redhat.com>
10403
10404 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10405 (linux_thread_alive): Use lwp_is_marked_dead.
10406 (extended_event_reported): Delete.
10407 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10408 instead of extended_event_reported.
10409 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10410 as well.
10411 (lwp_is_marked_dead): New function.
10412 (lwp_running): Use lwp_is_marked_dead.
10413 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10414 comment.
10415
10416 2015-08-06 Pedro Alves <palves@redhat.com>
10417
10418 * linux-low.c (linux_wait_1): Move fork event output out of the
10419 !report_to_gdb check. Pass event_child->waitstatus to
10420 target_waitstatus_to_string instead of ourstatus.
10421
10422 2015-08-04 Yao Qi <yao.qi@linaro.org>
10423
10424 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10425 if current_thread is 32 bit.
10426
10427 2015-08-04 Yao Qi <yao.qi@linaro.org>
10428
10429 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10430 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10431 * server.c (extended_protocol): Remove "static".
10432 * server.h (extended_protocol): Declare it.
10433
10434 2015-08-04 Yao Qi <yao.qi@linaro.org>
10435
10436 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10437 both aarch64 and aarch32.
10438 (aarch64_set_pc): Likewise.
10439
10440 2015-08-04 Yao Qi <yao.qi@linaro.org>
10441
10442 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10443 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10444 arm-with-neon.xml to srv_xmlfiles.
10445 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10446 (is_64bit_tdesc): New function.
10447 (aarch64_linux_read_description): New function.
10448 (aarch64_arch_setup): Call aarch64_linux_read_description.
10449 (regs_info): Rename to regs_info_aarch64.
10450 (aarch64_regs_info): Return right regs_info.
10451 (initialize_low_arch): Call initialize_low_arch_aarch32.
10452
10453 2015-08-04 Yao Qi <yao.qi@linaro.org>
10454
10455 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10456 * linux-aarch32-low.c: New file.
10457 * linux-aarch32-low.h: New file.
10458 * linux-arm-low.c (arm_fill_gregset): Move it to
10459 linux-aarch32-low.c.
10460 (arm_store_gregset): Likewise.
10461 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10462 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10463 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10464 (regs_info): Rename to regs_info_arm.
10465 (arm_regs_info): Return regs_info_aarch32 if
10466 have_ptrace_getregset is 1 and target description is
10467 arm_with_neon or arm_with_vfpv3.
10468 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10469 Call initialize_low_arch_aarch32 instead.
10470
10471 2015-08-04 Yao Qi <yao.qi@linaro.org>
10472
10473 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10474 * linux-low.c: ... here.
10475 * linux-low.h (have_ptrace_getregset): Declare it.
10476
10477 2015-08-04 Pedro Alves <palves@redhat.com>
10478
10479 * thread-db.c (struct thread_db): Use new typedefs.
10480 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10481 CHK calls.
10482 (disable_thread_event_reporting): Cast result of dlsym to
10483 destination function pointer type.
10484 (thread_db_mourn): Use td_ta_delete_ftype.
10485
10486 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10487
10488 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10489 arch variant.
10490 (CDX_BREAKPOINT): Define for R2.
10491 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10492 (the_low_target): Add comments.
10493
10494 2015-07-30 Yao Qi <yao.qi@linaro.org>
10495
10496 * linux-arm-low.c (arm_hwcap): Remove it.
10497 (arm_read_description): New local variable arm_hwcap. Don't
10498 set arm_hwcap to zero.
10499
10500 2015-07-30 Yao Qi <yao.qi@linaro.org>
10501
10502 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10503 Use regcache->tdesc instead.
10504 (arm_store_wmmxregset): Likewise.
10505 (arm_fill_vfpregset): Likewise.
10506 (arm_store_vfpregset): Likewise.
10507
10508 2015-07-30 Yao Qi <yao.qi@linaro.org>
10509
10510 * linux-arm-low.c: Include arch/arm.h.
10511 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10512 (arm_store_gregset): Likewise.
10513
10514 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10515
10516 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10517 ptrace's 4th parameter.
10518
10519 2015-07-27 Yao Qi <yao.qi@linaro.org>
10520
10521 * configure.srv (case aarch64*-*-linux*): Don't set
10522 srv_linux_usrregs.
10523
10524 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10525
10526 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10527 sys/ptrace.h.
10528 * linux-arm-low.c: Likewise.
10529 * linux-cris-low.c: Likewise.
10530 * linux-crisv32-low.c: Likewise.
10531 * linux-low.c: Likewise.
10532 * linux-m68k-low.c: Likewise.
10533 * linux-mips-low.c: Likewise.
10534 * linux-nios2-low.c: Likewise.
10535 * linux-s390-low.c: Likewise.
10536 * linux-sparc-low.c: Likewise.
10537 * linux-tic6x-low.c: Likewise.
10538 * linux-tile-low.c: Likewise.
10539 * linux-x86-low.c: Likewise.
10540
10541 2015-07-24 Pedro Alves <palves@redhat.com>
10542
10543 * config.in: Regenerate.
10544 * configure: Regenerate.
10545
10546 2015-07-24 Pedro Alves <palves@redhat.com>
10547
10548 * acinclude.m4: Include ../ptrace.m4.
10549 * configure.ac: Call GDB_AC_PTRACE.
10550 * config.in, configure: Regenerate.
10551
10552 2015-07-24 Yao Qi <yao.qi@linaro.org>
10553
10554 * linux-low.c (linux_create_inferior): Remove setting to
10555 proc->priv->new_inferior.
10556 (linux_attach): Likewise.
10557 (linux_low_filter_event): Likewise.
10558 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10559
10560 2015-07-24 Yao Qi <yao.qi@linaro.org>
10561
10562 * linux-low.c (linux_arch_setup): New function.
10563 (linux_low_filter_event): If proc->tdesc is NULL and
10564 proc->attached is true, call the_low_target.arch_setup.
10565 Otherwise, keep status pending, and return.
10566 (linux_resume_one_lwp_throw): Don't call get_pc if
10567 thread->while_stepping isn't NULL. Don't call
10568 get_thread_regcache if proc->tdesc is NULL.
10569 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10570 (linux_target_ops): Install arch_setup.
10571 * server.c (start_inferior): Call the_target->arch_setup.
10572 * target.h (struct target_ops) <arch_setup>: New field.
10573 (target_arch_setup): New marco.
10574 * lynx-low.c (lynx_target_ops): Update.
10575 * nto-low.c (nto_target_ops): Update.
10576 * spu-low.c (spu_target_ops): Update.
10577 * win32-low.c (win32_target_ops): Update.
10578
10579 2015-07-24 Yao Qi <yao.qi@linaro.org>
10580
10581 * linux-low.c (linux_add_process): Don't set
10582 proc->priv->new_inferior.
10583 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10584 (linux_attach): Likewise.
10585
10586 2015-07-24 Yao Qi <yao.qi@linaro.org>
10587
10588 * server.c (start_inferior): Code refactor.
10589
10590 2015-07-24 Yao Qi <yao.qi@linaro.org>
10591
10592 * server.c (process_serial_event): Set general_thread.
10593
10594 2015-07-21 Yao Qi <yao.qi@linaro.org>
10595
10596 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10597 aarch64_linux_get_debug_reg_capacity.
10598
10599 2015-07-17 Yao Qi <yao.qi@linaro.org>
10600
10601 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10602 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10603 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10604 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10605 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10606 (AARCH64_HWP_ALIGNMENT): Likewise.
10607 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10608 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10609 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10610 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10611 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10612 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10613 (struct aarch64_debug_reg_state): Likewise.
10614 (struct arch_lwp_info): Likewise.
10615 (aarch64_align_watchpoint): Likewise.
10616 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10617 (aarch64_watchpoint_length): Likewise.
10618 (aarch64_point_encode_ctrl_reg): Likewise
10619 (aarch64_point_is_aligned): Likewise.
10620 (aarch64_align_watchpoint): Likewise.
10621 (aarch64_linux_set_debug_regs):
10622 (aarch64_dr_state_insert_one_point): Likewise.
10623 (aarch64_dr_state_remove_one_point): Likewise.
10624 (aarch64_handle_breakpoint): Likewise.
10625 (aarch64_handle_aligned_watchpoint): Likewise.
10626 (aarch64_handle_unaligned_watchpoint): Likewise.
10627 (aarch64_handle_watchpoint): Likewise.
10628
10629 2015-07-17 Yao Qi <yao.qi@linaro.org>
10630
10631 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10632 and don't aarch64_get_debug_reg_state. All callers update.
10633 (aarch64_handle_aligned_watchpoint): Likewise.
10634 (aarch64_handle_unaligned_watchpoint): Likewise.
10635 (aarch64_handle_watchpoint): Likewise.
10636 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10637 (aarch64_remove_point): Likewise.
10638
10639 2015-07-17 Yao Qi <yao.qi@linaro.org>
10640
10641 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10642 debug_printf.
10643 (aarch64_handle_unaligned_watchpoint): Likewise.
10644
10645 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10646
10647 Revert the previous 3 commits:
10648 Move gdb_regex* to common/
10649 Move linux_find_memory_regions_full & co.
10650 gdbserver build-id attribute generator
10651
10652 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10653 Jan Kratochvil <jan.kratochvil@redhat.com>
10654
10655 gdbserver build-id attribute generator.
10656 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10657 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10658 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10659 (find_phdr): New.
10660 (get_dynamic): Use find_pdhr to traverse program headers.
10661 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10662 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10663 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10664 (get_hex_build_id): New.
10665 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10666 to reply XML document.
10667
10668 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10669 Jan Kratochvil <jan.kratochvil@redhat.com>
10670
10671 * target.c: Include target/target-utils.h and fcntl.h.
10672 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10673 (target_fileio_read_stralloc): New functions.
10674
10675 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10676
10677 * Makefile.in (OBS): Add gdb_regex.o.
10678 (gdb_regex.o): New.
10679 * config.in: Rebuilt.
10680 * configure: Rebuilt.
10681
10682 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10683 Jan Kratochvil <jan.kratochvil@redhat.com>
10684
10685 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10686 * Makefile.in (OBS): Add target-utils.o.
10687 (linux-maps.o, target-utils.o): New.
10688 * configure.srv (srv_linux_obj): Add linux-maps.o.
10689
10690 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10691
10692 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10693 function, return 1.
10694 (the_low_target): Install it.
10695
10696 2015-07-14 Pedro Alves <palves@redhat.com>
10697
10698 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10699 Instead, ignore ECHILD, and throw an error for other errnos.
10700
10701 2015-07-10 Pedro Alves <palves@redhat.com>
10702
10703 * event-loop.c (struct callback_event) <data>: Change type to
10704 gdb_client_data instance instead of gdb_client_data pointer.
10705 (append_callback_event): Adjust.
10706
10707 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10708
10709 * linux-aarch64-low.c: Add comments for each linux_target_ops
10710 method. Remove comments already covered in target_ops and
10711 linux_target_ops definitions.
10712 (the_low_target): Add comments for each unimplemented method.
10713
10714 2015-07-09 Yao Qi <yao.qi@linaro.org>
10715
10716 * linux-aarch64-low.c (aarch64_regmap): Remove.
10717 (aarch64_usrregs_info): Remove.
10718 (regs_info): Set field usrregs to NULL.
10719
10720 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10721
10722 * linux-low.c: Include "rsp-low.h"
10723 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10724 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10725 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10726 (handle_btrace_enable_pt): New.
10727 (handle_btrace_general_set): Support "pt".
10728 (handle_btrace_conf_general_set): Support "pt:size".
10729
10730 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10731
10732 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10733 Z_PACKET_SW_BP.
10734
10735 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10736
10737 * linux-aarch64-low.c: Remove comment about endianness.
10738 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10739 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10740 memcmp.
10741
10742 2015-06-24 Gary Benson <gbenson@redhat.com>
10743
10744 * linux-i386-ipa.c (stdint.h): Do not include.
10745 * lynx-i386-low.c (stdint.h): Likewise.
10746 * lynx-ppc-low.c (stdint.h): Likewise.
10747 * mem-break.c (stdint.h): Likewise.
10748 * thread-db.c (stdint.h): Likewise.
10749 * tracepoint.c (stdint.h): Likewise.
10750 * win32-low.c (stdint.h): Likewise.
10751
10752 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10753
10754 * server.c (write_qxfer_response): Update call to
10755 remote_escape_output.
10756
10757 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10758 Jan Kratochvil <jan.kratochvil@redhat.com>
10759
10760 Merge multiple hex conversions.
10761 * gdbreplay.c (tohex): Rename to 'fromhex'.
10762 (logchar): Use fromhex.
10763
10764 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10765
10766 * server.c (handle_qxfer_libraries): Set `version' attribute for
10767 <library-list>.
10768
10769 2015-06-10 Gary Benson <gbenson@redhat.com>
10770
10771 * target.h (struct target_ops) <multifs_open>: New field.
10772 <multifs_unlink>: Likewise.
10773 <multifs_readlink>: Likewise.
10774 * linux-low.c (nat/linux-namespaces.h): New include.
10775 (linux_target_ops): Initialize the_target->multifs_open,
10776 the_target->multifs_unlink and the_target->multifs_readlink.
10777 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10778 * hostio.c (hostio_fs_pid): New static variable.
10779 (hostio_handle_new_gdb_connection): New function.
10780 (handle_setfs): Likewise.
10781 (handle_open): Use the_target->multifs_open as appropriate.
10782 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10783 (handle_readlink): Use the_target->multifs_readlink as
10784 appropriate.
10785 (handle_vFile): Handle vFile:setfs packets.
10786 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10787 after target_handle_new_gdb_connection.
10788
10789 2015-06-10 Gary Benson <gbenson@redhat.com>
10790
10791 * configure.ac (AC_CHECK_FUNCS): Add setns.
10792 * config.in: Regenerate.
10793 * configure: Likewise.
10794 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10795 (linux-namespaces.o): New rule.
10796 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10797
10798 2015-06-09 Gary Benson <gbenson@redhat.com>
10799
10800 * hostio.c (handle_open): Process mode argument with
10801 fileio_to_host_mode.
10802
10803 2015-06-01 Yao Qi <yao.qi@linaro.org>
10804
10805 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10806 * linux-x86-low.c: Likewise.
10807
10808 2015-05-28 Don Breazeal <donb@codesourcery.com>
10809
10810 * linux-low.c (handle_extended_wait): Initialize
10811 thread_info.last_resume_kind for new fork children.
10812
10813 2015-05-15 Pedro Alves <palves@redhat.com>
10814
10815 * target.h (target_handle_new_gdb_connection): Rewrite using if
10816 wrapped in do/while.
10817
10818 2015-05-14 Joel Brobecker <brobecker@adacore.com>
10819
10820 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10821 * configure, config.in: Regenerate.
10822 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10823 Declare typedef.
10824
10825 2015-05-12 Don Breazeal <donb@codesourcery.com>
10826
10827 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10828 PTRACE_EVENT_VFORK_DONE.
10829 (linux_low_ptrace_options, extended_event_reported): Add vfork
10830 events.
10831 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10832 and "vforkdone" for RSP 'T' Stop Reply Packet.
10833 * server.h (report_vfork_events): Declare
10834 global variable.
10835
10836 2015-05-12 Don Breazeal <donb@codesourcery.com>
10837
10838 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10839 (the_low_target) <new_fork>: Initialize new member.
10840 * linux-arm-low.c (arm_new_fork): New function.
10841 (the_low_target) <new_fork>: Initialize new member.
10842 * linux-low.c (handle_extended_wait): Call new target function
10843 new_fork.
10844 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10845 * linux-mips-low.c (mips_add_watchpoint): New function
10846 extracted from mips_insert_point.
10847 (the_low_target) <new_fork>: Initialize new member.
10848 (mips_linux_new_fork): New function.
10849 (mips_insert_point): Call mips_add_watchpoint.
10850 * linux-x86-low.c (x86_linux_new_fork): New function.
10851 (the_low_target) <new_fork>: Initialize new member.
10852
10853 2015-05-12 Don Breazeal <donb@codesourcery.com>
10854
10855 * linux-low.c (handle_extended_wait): Implement return value,
10856 rename argument 'event_child' to 'event_lwp', handle
10857 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10858 (linux_low_ptrace_options): New function.
10859 (linux_low_filter_event): Call linux_low_ptrace_options,
10860 use different argument fo linux_enable_event_reporting,
10861 use return value from handle_extended_wait.
10862 (extended_event_reported): New function.
10863 (linux_wait_1): Call extended_event_reported and set
10864 status to report fork events.
10865 (linux_write_memory): Add pid to debug message.
10866 (reset_lwp_ptrace_options_callback): New function.
10867 (linux_handle_new_gdb_connection): New function.
10868 (linux_target_ops): Initialize new structure member.
10869 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10870 * lynx-low.c: Initialize new structure member.
10871 * remote-utils.c (prepare_resume_reply): Implement stop reason
10872 "fork" for "T" stop message.
10873 * server.c (handle_query): Call handle_new_gdb_connection.
10874 * server.h (report_fork_events): Declare global flag.
10875 * target.h (struct target_ops) <handle_new_gdb_connection>:
10876 New member.
10877 (target_handle_new_gdb_connection): New macro.
10878 * win32-low.c: Initialize new structure member.
10879
10880 2015-05-12 Don Breazeal <donb@codesourcery.com>
10881
10882 * mem-break.c (APPEND_TO_LIST): Define macro.
10883 (clone_agent_expr): New function.
10884 (clone_one_breakpoint): New function.
10885 (clone_all_breakpoints): New function.
10886 * mem-break.h: Declare new functions.
10887
10888 2015-05-12 Don Breazeal <donb@codesourcery.com>
10889
10890 * linux-low.c (linux_supports_fork_events): New function.
10891 (linux_supports_vfork_events): New function.
10892 (linux_target_ops): Initialize new structure members.
10893 (initialize_low): Call linux_check_ptrace_features.
10894 * lynx-low.c (lynx_target_ops): Initialize new structure
10895 members.
10896 * server.c (report_fork_events, report_vfork_events):
10897 New global flags.
10898 (handle_query): Add new features to qSupported packet and
10899 response.
10900 (captured_main): Initialize new global variables.
10901 * target.h (struct target_ops) <supports_fork_events>:
10902 New member.
10903 <supports_vfork_events>: New member.
10904 (target_supports_fork_events): New macro.
10905 (target_supports_vfork_events): New macro.
10906 * win32-low.c (win32_target_ops): Initialize new structure
10907 members.
10908
10909 2015-05-12 Gary Benson <gbenson@redhat.com>
10910
10911 * server.c (handle_qxfer_exec_file): Use current process
10912 if annex is empty.
10913
10914 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
10915
10916 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
10917 Remove HAVE_PTRACE_GETREGS conditionals.
10918 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
10919 instead of PTRACE_GETREGS and PTRACE_SETREGS.
10920
10921 2015-05-08 Yao Qi <yao.qi@linaro.org>
10922
10923 * linux-low.c (linux_supports_conditional_breakpoints): New
10924 function.
10925 (linux_target_ops): Install new target method.
10926 * lynx-low.c (lynx_target_ops): Install NULL hook for
10927 supports_conditional_breakpoints.
10928 * nto-low.c (nto_target_ops): Likewise.
10929 * spu-low.c (spu_target_ops): Likewise.
10930 * win32-low.c (win32_target_ops): Likewise.
10931 * server.c (handle_query): Check
10932 target_supports_conditional_breakpoints.
10933 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10934 New field.
10935 (target_supports_conditional_breakpoints): New macro.
10936
10937 2015-05-06 Pedro Alves <palves@redhat.com>
10938
10939 PR server/18081
10940 * server.c (start_inferior): If the process exits, mourn it.
10941
10942 2015-04-21 Gary Benson <gbenson@redhat.com>
10943
10944 * hostio.c (fileio_open_flags_to_host): Factored out to
10945 fileio_to_host_openflags in common/fileio.c. Single use
10946 updated.
10947
10948 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10949
10950 * linux-xtensa-low.c (xtensa_fill_gregset)
10951 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
10952 XCHAL_HAVE_LOOP.
10953
10954 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
10955
10956 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
10957 (regs_info): Replace usrregs pointer with NULL.
10958
10959 2015-04-17 Gary Benson <gbenson@redhat.com>
10960
10961 * target.h (struct target_ops) <pid_to_exec_file>: New field.
10962 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
10963 * server.c (handle_qxfer_exec_file): New function.
10964 (qxfer_packets): Add exec-file entry.
10965 (handle_query): Report qXfer:exec-file:read as supported packet.
10966
10967 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
10968
10969 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
10970
10971 2015-04-09 Gary Benson <gbenson@redhat.com>
10972
10973 * hostio-errno.c (errno_to_fileio_error): Remove function.
10974 Update caller to use remote_fileio_to_fio_error.
10975
10976 2015-04-09 Yao Qi <yao.qi@linaro.org>
10977
10978 * linux-low.c (linux_insert_point): Call
10979 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
10980 (linux_remove_point): Call remove_memory_breakpoint if type is
10981 raw_bkpt_type_sw.
10982 * linux-x86-low.c (x86_insert_point): Don't call
10983 insert_memory_breakpoint.
10984 (x86_remove_point): Don't call remove_memory_breakpoint.
10985
10986 2015-04-01 Pedro Alves <palves@redhat.com>
10987 Cleber Rosa <crosa@redhat.com>
10988
10989 * server.c (gdbserver_usage): Reorganize and extend the usage
10990 message.
10991
10992 2015-03-24 Pedro Alves <palves@redhat.com>
10993
10994 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
10995 output. Also dump TRAP_TRACE.
10996 (linux_low_filter_event): In debug output, distinguish a
10997 resume_stop SIGSTOP from a delayed SIGSTOP.
10998
10999 2015-03-24 Gary Benson <gbenson@redhat.com>
11000
11001 * linux-x86-low.c (x86_linux_new_thread): Moved to
11002 nat/x86-linux.c.
11003 (x86_linux_prepare_to_resume): Likewise.
11004
11005 2015-03-24 Gary Benson <gbenson@redhat.com>
11006
11007 * Makefile.in (x86-linux-dregs.o): New rule.
11008 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11009 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11010 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11011 (x86_linux_dr_get): Likewise.
11012 (x86_linux_dr_set): Likewise.
11013 (update_debug_registers_callback): Likewise.
11014 (x86_linux_dr_set_addr): Likewise.
11015 (x86_linux_dr_get_addr): Likewise.
11016 (x86_linux_dr_set_control): Likewise.
11017 (x86_linux_dr_get_control): Likewise.
11018 (x86_linux_dr_get_status): Likewise.
11019 (x86_linux_update_debug_registers): Likewise.
11020
11021 2015-03-24 Gary Benson <gbenson@redhat.com>
11022
11023 * linux-x86-low.c (x86_linux_update_debug_registers):
11024 New function, factored out from...
11025 (x86_linux_prepare_to_resume): ...this.
11026
11027 2015-03-24 Gary Benson <gbenson@redhat.com>
11028
11029 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11030 (x86_linux_dr_set): Likewise.
11031 (update_debug_registers_callback): Likewise.
11032 (x86_linux_dr_set_addr): Likewise.
11033 (x86_linux_dr_get_addr): Likewise.
11034 (x86_linux_dr_set_control): Likewise.
11035 (x86_linux_dr_get_control): Likewise.
11036 (x86_linux_dr_get_status): Likewise.
11037 (x86_linux_prepare_to_resume): Likewise.
11038
11039 2015-03-24 Gary Benson <gbenson@redhat.com>
11040
11041 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11042 Use perror_with_name. Pass string through gettext.
11043 (x86_linux_dr_set): Likewise.
11044
11045 2015-03-24 Gary Benson <gbenson@redhat.com>
11046
11047 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11048 (x86_linux_dr_set_addr): ...this.
11049 (x86_dr_low_get_addr): Rename to...
11050 (x86_linux_dr_get_addr): ...this.
11051 (x86_dr_low_set_control): Rename to...
11052 (x86_linux_dr_set_control): ...this.
11053 (x86_dr_low_get_control): Rename to...
11054 (x86_linux_dr_get_control): ...this.
11055 (x86_dr_low_get_status): Rename to...
11056 (x86_linux_dr_get_status): ...this.
11057 (x86_dr_low): Update with new function names.
11058
11059 2015-03-24 Gary Benson <gbenson@redhat.com>
11060
11061 * Makefile.in (x86-linux.o): New rule.
11062 * configure.srv: Add x86-linux.o to relevant targets.
11063 * linux-low.c (lwp_set_arch_private_info): New function.
11064 (lwp_arch_private_info): Likewise.
11065 * linux-x86-low.c: Include nat/x86-linux.h.
11066 (arch_lwp_info): Removed structure.
11067 (update_debug_registers_callback):
11068 Use lwp_set_debug_registers_changed.
11069 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11070 and lwp_set_debug_registers_changed.
11071 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11072
11073 2015-03-24 Gary Benson <gbenson@redhat.com>
11074
11075 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11076 * linux-arm-low.c (arm_new_thread): Likewise.
11077 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11078 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11079 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11080 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11081
11082 2015-03-24 Gary Benson <gbenson@redhat.com>
11083
11084 * linux-low.c (ptid_of_lwp): New function.
11085 (lwp_is_stopped): Likewise.
11086 (lwp_stop_reason): Likewise.
11087 * linux-x86-low.c (update_debug_registers_callback):
11088 Use lwp_is_stopped.
11089 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11090 lwp_stop_reason.
11091
11092 2015-03-24 Gary Benson <gbenson@redhat.com>
11093
11094 * linux-low.h (linux_stop_lwp): Remove declaration.
11095
11096 2015-03-24 Gary Benson <gbenson@redhat.com>
11097
11098 * linux-low.h: Include nat/linux-nat.h.
11099 * linux-low.c (iterate_over_lwps_args): New structure.
11100 (iterate_over_lwps_filter): New function.
11101 (iterate_over_lwps): Likewise.
11102 * linux-x86-low.c (update_debug_registers_callback):
11103 Update signature to what iterate_over_lwps expects.
11104 Remove PID check that iterate_over_lwps now performs.
11105 (x86_dr_low_set_addr): Use iterate_over_lwps.
11106 (x86_dr_low_set_control): Likewise.
11107
11108 2015-03-24 Gary Benson <gbenson@redhat.com>
11109
11110 * linux-x86-low.c (x86_debug_reg_state): New function.
11111 (x86_linux_prepare_to_resume): Use the above.
11112
11113 2015-03-24 Gary Benson <gbenson@redhat.com>
11114
11115 * linux-low.c (current_lwp_ptid): New function.
11116 * linux-x86-low.c: Include nat/linux-nat.h.
11117 (x86_dr_low_get_addr): Use current_lwp_ptid.
11118 (x86_dr_low_get_control): Likewise.
11119 (x86_dr_low_get_status): Likewise.
11120
11121 2015-03-20 Pedro Alves <palves@redhat.com>
11122
11123 * tracepoint.c (cmd_qtstatus): Make "str" const.
11124
11125 2015-03-20 Pedro Alves <palves@redhat.com>
11126
11127 * server.c (handle_general_set): Make "req_str" const.
11128
11129 2015-03-19 Pedro Alves <palves@redhat.com>
11130
11131 * linux-low.c (linux_resume_one_lwp): Rename to ...
11132 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11133 instead call perror_with_name.
11134 (check_ptrace_stopped_lwp_gone): New function.
11135 (linux_resume_one_lwp): Reimplement as wrapper around
11136 linux_resume_one_lwp_throw that swallows errors if the LWP is
11137 gone.
11138
11139 2015-03-19 Pedro Alves <palves@redhat.com>
11140
11141 * linux-low.c (count_events_callback, select_event_lwp_callback):
11142 No longer check whether the thread has resume_stop as last resume
11143 kind.
11144
11145 2015-03-19 Pedro Alves <palves@redhat.com>
11146
11147 * linux-low.c (count_events_callback, select_event_lwp_callback):
11148 Use the lwp's status_pending_p field, not the thread's.
11149
11150 2015-03-19 Pedro Alves <palves@redhat.com>
11151
11152 * linux-low.c (select_event_lwp_callback): Update comments to
11153 no longer mention SIGTRAP.
11154
11155 2015-03-18 Gary Benson <gbenson@redhat.com>
11156
11157 * server.c (handle_query): Do not report vFile:fstat as supported.
11158
11159 2015-03-11 Gary Benson <gbenson@redhat.com>
11160
11161 * hostio.c (sys/types.h): New include.
11162 (sys/stat.h): Likewise.
11163 (common-remote-fileio.h): Likewise.
11164 (handle_fstat): New function.
11165 (handle_vFile): Handle vFile:fstat packets.
11166
11167 2015-03-11 Gary Benson <gbenson@redhat.com>
11168
11169 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11170 struct stat.st_blocks and struct stat.st_blksize.
11171 * configure: Regenerate.
11172 * config.in: Likewise.
11173 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11174 (OBS): Add common-remote-fileio.o.
11175 (common-remote-fileio.o): New rule.
11176
11177 2015-03-09 Pedro Alves <palves@redhat.com>
11178
11179 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11180 'struct sockaddr' pointer in 'accept' call.
11181
11182 2015-03-09 Pedro Alves <palves@redhat.com>
11183
11184 Revert:
11185 2015-03-07 Pedro Alves <palves@redhat.com>
11186 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11187 or <winsock2.h> here. Instead include "gdb_socket.h".
11188 (remote_open): Use union gdb_sockaddr_u.
11189 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11190 or <winsock2.h> here. Instead include "gdb_socket.h".
11191 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11192 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11193 or <sys/un.h>.
11194 (init_named_socket, gdb_agent_helper_thread): Use union
11195 gdb_sockaddr_u.
11196
11197 2015-03-07 Pedro Alves <palves@redhat.com>
11198
11199 * configure.ac (build_warnings): Move
11200 -Wdeclaration-after-statement to the C-specific set.
11201 * configure: Regenerate.
11202
11203 2015-03-07 Pedro Alves <palves@redhat.com>
11204
11205 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11206 or <winsock2.h> here. Instead include "gdb_socket.h".
11207 (remote_open): Use union gdb_sockaddr_u.
11208 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11209 or <winsock2.h> here. Instead include "gdb_socket.h".
11210 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11211 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11212 or <sys/un.h>.
11213 (init_named_socket, gdb_agent_helper_thread): Use union
11214 gdb_sockaddr_u.
11215
11216 2015-03-07 Pedro Alves <palves@redhat.com>
11217
11218 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11219 instead.
11220
11221 2015-03-06 Yao Qi <yao.qi@linaro.org>
11222
11223 * linux-aarch64-low.c (aarch64_insert_point): Use
11224 show_debug_regs as a boolean.
11225 (aarch64_remove_point): Likewise.
11226
11227 2015-03-05 Pedro Alves <palves@redhat.com>
11228
11229 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11230 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11231 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11232 * nto-low.c (nto_target_ops): Likewise.
11233 * spu-low.c (spu_target_ops): Likewise.
11234 * win32-low.c (win32_target_ops): Likewise.
11235
11236 2015-03-04 Pedro Alves <palves@redhat.com>
11237
11238 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11239 Decide whether a breakpoint triggered based on the SIGTRAP's
11240 siginfo.si_code.
11241 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11242 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11243 (linux_low_filter_event): Check for breakpoints before checking
11244 watchpoints.
11245 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11246 siginfo.si_code.
11247 (linux_stopped_by_sw_breakpoint)
11248 (linux_supports_stopped_by_sw_breakpoint)
11249 (linux_stopped_by_hw_breakpoint)
11250 (linux_supports_stopped_by_hw_breakpoint): New functions.
11251 (linux_target_ops): Install new target methods.
11252
11253 2015-03-04 Pedro Alves <palves@redhat.com>
11254
11255 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11256 * server.c (swbreak_feature, hwbreak_feature): New globals.
11257 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11258 (captured_main): Clear swbreak_feature and hwbreak_feature.
11259 * server.h (swbreak_feature, hwbreak_feature): Declare.
11260 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11261 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11262 supports_stopped_by_hw_breakpoint>: New fields.
11263 (target_supports_stopped_by_sw_breakpoint)
11264 (target_stopped_by_sw_breakpoint)
11265 (target_supports_stopped_by_hw_breakpoint)
11266 (target_stopped_by_hw_breakpoint): Declare.
11267
11268 2015-03-04 Pedro Alves <palves@redhat.com>
11269
11270 enum lwp_stop_reason -> enum target_stop_reason
11271 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11272 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11273 (linux_wait_1, stuck_in_jump_pad_callback)
11274 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11275 (linux_stopped_by_watchpoint):
11276 * linux-low.h (enum lwp_stop_reason): Delete.
11277 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11278 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11279
11280 2015-03-04 Yao Qi <yao.qi@linaro.org>
11281
11282 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11283
11284 2015-03-03 Gary Benson <gbenson@redhat.com>
11285
11286 * hostio.c (handle_vFile): Fix prefix lengths.
11287
11288 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11289
11290 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11291 ptr_bits.
11292
11293 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11294
11295 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11296 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11297 (clean): Add "rm -f" for above C files.
11298 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11299 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11300 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11301 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11302 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11303 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11304 (init_registers_s390x_vx_linux64)
11305 (init_registers_s390x_tevx_linux64)
11306 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11307 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11308 declarations.
11309 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11310 (s390_store_vxrs_high): New functions.
11311 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11312 NT_S390_VXRS_HIGH.
11313 (s390_arch_setup): Add logic for selecting one of the new target
11314 descriptions. Activate the new vector regsets if applicable.
11315 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11316 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11317 and init_registers_s390x_tevx_linux64.
11318
11319 2015-03-01 Pedro Alves <palves@redhat.com>
11320
11321 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11322 parameter.
11323
11324 2015-02-27 Pedro Alves <palves@redhat.com>
11325
11326 * linux-x86-low.c (u_debugreg_offset): New function.
11327 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11328
11329 2015-02-27 Pedro Alves <palves@redhat.com>
11330
11331 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11332 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11333 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11334 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11335 (ps_lsetfpregs, ps_getpid)
11336 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11337 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11338 (ps_lsetxregs, ps_plog): Declare.
11339
11340 2015-02-27 Pedro Alves <palves@redhat.com>
11341
11342 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11343 IP_AGENT_EXPORT_FUNC.
11344 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11345 IP_AGENT_EXPORT_FUNC.
11346 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11347 (IP_AGENT_EXPORT): Delete.
11348 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11349 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11350 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11351 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11352 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11353 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11354 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11355 (traceframe_read_count, traceframe_write_count)
11356 (traceframes_created, trace_state_variables, get_raw_reg)
11357 (get_trace_state_variable_value, set_trace_state_variable_value)
11358 (ust_loaded, helper_thread_id, cmd_buf): Use
11359 IPA_SYM_EXPORTED_NAME.
11360 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11361 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11362 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11363 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11364 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11365 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11366 EXTERN_C_PUSH/EXTERN_C_POP.
11367 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11368 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11369 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11370 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11371 (traceframe_write_count, traceframe_read_count)
11372 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11373 (about_to_request_buffer_space, get_trace_state_variable_value)
11374 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11375 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11376 EXTERN_C_PUSH/EXTERN_C_POP.
11377 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11378 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11379 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11380 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11381 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11382 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11383 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11384 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11385 Define.
11386 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11387 (IP_AGENT_EXPORT_VAR_DECL): Define.
11388 (tracing): Declare.
11389 (gdb_agent_get_raw_reg): Declare.
11390
11391 2015-02-27 Tom Tromey <tromey@redhat.com>
11392 Pedro Alves <palves@redhat.com>
11393
11394 Rename symbols whose names are reserved C++ keywords throughout.
11395
11396 2015-02-27 Pedro Alves <palves@redhat.com>
11397
11398 * Makefile.in (COMPILER): New, get it from autoconf.
11399 (CXX): Get from autoconf instead.
11400 (COMPILE.pre): Use COMPILER.
11401 (CC-LD): Rename to ...
11402 (CC_LD): ... this. Use COMPILER.
11403 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11404 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11405 * acinclude.m4: Include build-with-cxx.m4.
11406 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11407 Disable -Werror by default if building in C++ mode.
11408 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11409 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11410 the C++ compiler. Save/restore CXXFLAGS too.
11411 * configure: Regenerate.
11412
11413 2015-02-27 Pedro Alves <palves@redhat.com>
11414
11415 * acinclude.m4: Include libiberty.m4.
11416 * configure.ac: Call libiberty_INIT.
11417 * config.in, configure: Regenerate.
11418
11419 2015-02-26 Pedro Alves <palves@redhat.com>
11420
11421 * linux-low.c (linux_wait_1): When incrementing the PC past a
11422 program breakpoint always use the_low_target.breakpoint_len as
11423 increment, rather than the maximum between that and
11424 the_low_target.decr_pc_after_break.
11425
11426 2015-02-23 Pedro Alves <palves@redhat.com>
11427
11428 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11429 thread was doing a step-over; always adjust the PC if
11430 we stepped over a permanent breakpoint.
11431 (linux_wait_1): If we stepped over breakpoint that was on top of a
11432 permanent breakpoint, manually advance the PC past it.
11433
11434 2015-02-23 Pedro Alves <palves@redhat.com>
11435
11436 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11437 modes.
11438 (x86_fill_gregset, x86_store_gregset): Use it when handling
11439 $orig_eax.
11440
11441 2015-02-20 Pedro Alves <palves@redhat.com>
11442
11443 * thread-db.c: Include "nat/linux-procfs.h".
11444 (thread_db_init): Skip listing new threads if the kernel supports
11445 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11446
11447 2015-02-20 Pedro Alves <palves@redhat.com>
11448
11449 * linux-low.c (status_pending_p_callback): Use ptid_match.
11450
11451 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11452
11453 PR breakpoints/16812
11454 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11455 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11456 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11457
11458 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11459
11460 PR breakpoints/15956
11461 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11462
11463 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11464
11465 * linux-low.c (linux_low_btrace_conf): Print size.
11466 * server.c (handle_btrace_conf_general_set): New.
11467 (hanle_general_set): Call handle_btrace_conf_general_set.
11468 (handle_query): Report Qbtrace-conf:bts:size as supported.
11469
11470 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11471
11472 * linux-low.c (linux_low_enable_btrace): Update parameters.
11473 (linux_low_btrace_conf): New.
11474 (linux_target_ops)<to_btrace_conf>: Initialize.
11475 * server.c (current_btrace_conf): New.
11476 (handle_btrace_enable): Rename to ...
11477 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11478 to target_enable_btrace. Update comment. Update users.
11479 (handle_qxfer_btrace_conf): New.
11480 (qxfer_packets): Add btrace-conf entry.
11481 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11482 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11483 (target_ops)<read_btrace_conf>: New.
11484 (target_enable_btrace): Update parameters.
11485 (target_read_btrace_conf): New.
11486
11487 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11488
11489 * server.c (handle_btrace_general_set): Remove call to
11490 target_supports_btrace.
11491 (supported_btrace_packets): New.
11492 (handle_query): Call supported_btrace_packets.
11493 * target.h: include btrace-common.h.
11494 (btrace_target_info): Removed.
11495 (supports_btrace, target_supports_btrace): Update parameters.
11496
11497 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11498
11499 * Makefile.in (SFILES): Add common/btrace-common.c.
11500 (OBS): Add common/btrace-common.o.
11501 (btrace-common.o): Add build rules.
11502 * linux-low: Include btrace-common.h.
11503 (linux_low_read_btrace): Use struct btrace_data. Call
11504 btrace_data_init and btrace_data_fini.
11505
11506 2015-02-06 Pedro Alves <palves@redhat.com>
11507
11508 * thread-db.c (find_new_threads_callback): Add debug output.
11509
11510 2015-02-04 Pedro Alves <palves@redhat.com>
11511
11512 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11513 (resume_stopped_resumed_lwps): New function.
11514 (linux_wait_for_event_filtered): Use it.
11515
11516 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11517
11518 * Makefile.in (SFILES): Add linux-personality.c.
11519 (linux-personality.o): New rule.
11520 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11521 list of objects to be built.
11522 * linux-low.c: Include nat/linux-personality.h.
11523 (linux_create_inferior): Remove code to disable address space
11524 randomization (moved to ../nat/linux-personality.c). Create
11525 cleanup to disable address space randomization.
11526
11527 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11528
11529 * Makefile.in (posix-strerror.o): New rule.
11530 (mingw-strerror.o): Likewise.
11531 * configure: Regenerated.
11532 * configure.ac: Source file ../common/common.host. Initialize new
11533 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11534
11535 2015-01-14 Yao Qi <yao@codesourcery.com>
11536
11537 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11538 (ppc-linux.o): New rule.
11539 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11540 * configure.ac: AC_CHECK_FUNCS(getauxval).
11541 * config.in: Re-generated.
11542 * configure: Re-generated.
11543 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11544 ppc64_64bit_inferior_p
11545
11546 2015-01-14 Yao Qi <yao@codesourcery.com>
11547
11548 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11549 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11550 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11551 (PT_ORIG_R3, PT_TRAP): Likewise.
11552 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11553 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11554 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11555
11556 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11557
11558 * i387-fp.c (i387_cache_to_xsave): In look over
11559 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11560 zmmh_low_space field by use of zmmh_high_space.
11561
11562 2015-01-09 Pedro Alves <palves@redhat.com>
11563
11564 * linux-low.c (step_over_bkpt): Move higher up in the file.
11565 (handle_extended_wait): Don't store the stop_pc here.
11566 (get_stop_pc): Adjust comments and rename to ...
11567 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11568 stopped for a software breakpoint or hardware breakpoint.
11569 (thread_still_has_status_pending_p): New function.
11570 (status_pending_p_callback): Use
11571 thread_still_has_status_pending_p. If the event is no longer
11572 interesting, resume the LWP.
11573 (handle_tracepoints): Add assert.
11574 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11575 (wstatus_maybe_breakpoint): New function.
11576 (cancel_breakpoint): Delete function.
11577 (check_stopped_by_watchpoint): New function, factored out from
11578 linux_low_filter_event.
11579 (lp_status_maybe_breakpoint): Delete function.
11580 (linux_low_filter_event): Remove filter_ptid argument.
11581 Leave thread group exits pending here. Store the LWP's stop PC.
11582 Always leave events pending.
11583 (linux_wait_for_event_filtered): Pull all events out of the
11584 kernel, and leave them all pending.
11585 (count_events_callback, select_event_lwp_callback): Consider all
11586 events.
11587 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11588 (select_event_lwp): Only give preference to the stepping LWP in
11589 all-stop mode. Adjust comments.
11590 (ignore_event): New function.
11591 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11592 references to cancel_breakpoints. Adjust to renames. Also give
11593 equal priority to all LWPs that have had events in non-stop mode.
11594 If reporting a software breakpoint event, unadjust the LWP's PC.
11595 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11596 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11597 Adjust.
11598 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11599 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11600 (linux_stopped_by_watchpoint): Adjust.
11601 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11602 * linux-low.h (enum lwp_stop_reason): New.
11603 (struct lwp_info) <stop_pc>: Adjust comment.
11604 <stopped_by_watchpoint>: Delete field.
11605 <stop_reason>: New field.
11606 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11607 * mem-break.c (software_breakpoint_inserted_here)
11608 (hardware_breakpoint_inserted_here): New function.
11609 * mem-break.h (software_breakpoint_inserted_here)
11610 (hardware_breakpoint_inserted_here): Declare.
11611 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11612 (cancel_breakpoints): Delete.
11613 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11614 (upload_fast_traceframes): Remove references to
11615 cancel_breakpoints.
11616
11617 2015-01-09 Pedro Alves <palves@redhat.com>
11618
11619 * thread-db.c (find_new_threads_callback): Ignore thread if the
11620 kernel thread ID is -1.
11621
11622 2015-01-09 Pedro Alves <palves@redhat.com>
11623
11624 * linux-low.c (linux_attach_fail_reason_string): Move to
11625 nat/linux-ptrace.c, and rename.
11626 (linux_attach_lwp): Update comment.
11627 (attach_proc_task_lwp_callback): New function.
11628 (linux_attach): Adjust to rename and use
11629 linux_proc_attach_tgid_threads.
11630 (linux_attach_fail_reason_string): Delete declaration.
11631
11632 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11633
11634 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11635 * server.c (gdbserver_version): Likewise.
11636
11637 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11638
11639 * remote-utils.c: Include ctype.h.
11640 (input_interrupt): Explicitly handle the case when the char
11641 received is the NUL byte. Improve the printing of non-ASCII
11642 characters.
11643
11644 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11645
11646 * linux-low.c (linux_low_filter_event): Update call to
11647 linux_enable_event_reporting following the addition of
11648 a new parameter to that function.
11649
11650 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11651
11652 PR server/17457
11653 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11654 (AARCH64_FPCR_REGNO): Likewise.
11655 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11656 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11657 (aarch64_store_fpregset): Likewise.
11658
11659 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11660
11661 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11662 Remove FIXME comment about assumption about N.
11663
11664 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11665
11666 * configure.ac: If large-file support is disabled in GDBserver,
11667 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11668 * configure: Regenerate.
11669
11670 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11671
11672 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11673 warning upon ENODATA from ptrace.
11674 * linux-s390-low.c (s390_store_tdb): New.
11675 (s390_regsets): Add regset for NT_S390_TDB.
11676
11677 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11678
11679 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11680 without a fill_function.
11681 * linux-s390-low.c (s390_fill_last_break): Remove.
11682 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11683 (s390_arch_setup): Use regset's size instead of fill_function for
11684 loop end condition.
11685
11686 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11687
11688 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11689 the regset's store function when ptrace returned an error.
11690 * regcache.c (get_thread_regcache): Invalidate register cache
11691 before fetching inferior's registers.
11692
11693 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11694
11695 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11696 while-loop as for-loop.
11697 (regsets_store_inferior_registers): Likewise.
11698
11699 2014-11-28 Yao Qi <yao@codesourcery.com>
11700
11701 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11702 * config.in, configure: Re-generate.
11703 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11704 is defined.
11705
11706 2014-11-21 Yao Qi <yao@codesourcery.com>
11707
11708 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11709 (AC_CHECK_HEADERS): Remove malloc.h.
11710 * configure: Re-generated.
11711 * config.in: Re-generated.
11712 * server.h: Don't include alloca.h and malloc.h.
11713 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11714 Don't include malloc.h.
11715
11716 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11717
11718 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11719 corresponding ERRNO check in same block.
11720
11721 2014-11-12 Pedro Alves <palves@redhat.com>
11722
11723 * server.c (cont_thread): Update comment.
11724 (start_inferior, attach_inferior): No longer clear cont_thread.
11725 (handle_v_cont): No longer set cont_thread.
11726 (captured_main): Clear cont_thread each time a GDB connects.
11727
11728 2014-11-12 Pedro Alves <palves@redhat.com>
11729
11730 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11731 thread, and don't resume all threads if the Hc thread has exited.
11732
11733 2014-11-12 Pedro Alves <palves@redhat.com>
11734
11735 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11736 the process group instead of to a specific LWP.
11737
11738 2014-10-15 Pedro Alves <palves@redhat.com>
11739
11740 PR server/17487
11741 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11742 parameter.
11743 (arm_set_thread_context): Delete.
11744 (the_low_target): Adjust.
11745 * win32-i386-low.c (debug_registers_changed)
11746 (debug_registers_used): Delete.
11747 (update_debug_registers_callback): New function.
11748 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11749 needing to update their debug registers.
11750 (win32_get_current_dr): New function.
11751 (x86_dr_low_get_addr, x86_dr_low_get_control)
11752 (x86_dr_low_get_status): Fetch the debug register from the thread
11753 record's context.
11754 (i386_initial_stuff): Adjust.
11755 (i386_get_thread_context): Remove current_event parameter. Don't
11756 clear debug_registers_changed nor copy DR values to
11757 debug_reg_state.
11758 (i386_set_thread_context): Delete.
11759 (i386_prepare_to_resume): New function.
11760 (i386_thread_added): Mark the thread as needing to update irs
11761 debug registers.
11762 (the_low_target): Remove i386_set_thread_context and install
11763 i386_prepare_to_resume.
11764 * win32-low.c (win32_get_thread_context): Adjust.
11765 (win32_set_thread_context): Use SetThreadContext
11766 directly.
11767 (win32_prepare_to_resume): New function.
11768 (win32_require_context): New function, factored out from ...
11769 (thread_rec): ... this.
11770 (continue_one_thread): Call win32_prepare_to_resume on each thread
11771 we're about to continue.
11772 (win32_resume): Call win32_prepare_to_resume on the event thread.
11773 * win32-low.h (struct win32_thread_info)
11774 <debug_registers_changed>: New field.
11775 (struct win32_target_ops): Change prototype of set_thread_context,
11776 delete set_thread_context and add prepare_to_resume.
11777 (win32_require_context): New declaration.
11778
11779 2014-10-08 Gary Benson <gbenson@redhat.com>
11780
11781 * server.h: Do not include common-exceptions.h.
11782
11783 2014-10-08 Gary Benson <gbenson@redhat.com>
11784
11785 * server.h: Do not include cleanups.h.
11786
11787 2014-09-30 James Hogan <james.hogan@imgtec.com>
11788
11789 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11790 mips64-dsp-linux.c.
11791
11792 2014-09-23 Yao Qi <yao@codesourcery.com>
11793
11794 * linux-low.c (lp_status_maybe_breakpoint): New function.
11795 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11796 (count_events_callback): Likewise.
11797 (select_event_lwp_callback): Likewise.
11798 (cancel_breakpoints_callback): Likewise.
11799
11800 2014-09-19 Don Breazeal <donb@codesourcery.com>
11801
11802 * linux-low.c (handle_extended_wait): Call
11803 linux_ptrace_get_extended_event.
11804 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11805 linux_is_extended_waitstatus.
11806
11807 2014-09-16 Joel Brobecker <brobecker@adacore.com>
11808
11809 * Makefile.in (CPPFLAGS): Define.
11810 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11811 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11812
11813 2014-09-16 Gary Benson <gbenson@redhat.com>
11814
11815 * inferiors.h (current_inferior): Renamed as...
11816 (current_thread): New variable. All uses updated.
11817 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11818 (maybe_move_out_of_jump_pad): Likewise.
11819 (cancel_breakpoint): Likewise.
11820 (linux_low_filter_event): Likewise.
11821 (wait_for_sigstop): Likewise.
11822 (linux_resume_one_lwp): Likewise.
11823 (need_step_over_p): Likewise.
11824 (start_step_over): Likewise.
11825 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11826 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11827 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11828 and save_inferior as saved_thread.
11829 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11830 saved_thread.
11831 (regcache_invalidate_thread): Likewise.
11832 * remote-utils.c (prepare_resume_reply): Likewise.
11833 * thread-db.c (thread_db_get_tls_address): Likewise.
11834 (disable_thread_event_reporting): Likewise.
11835 (remove_thread_event_breakpoints): Likewise.
11836 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11837 as saved_thread.
11838 * target.h (set_desired_inferior): Renamed as...
11839 (set_desired_thread): New declaration. All uses updated.
11840 * server.c (myresume): Updated comment to reference thread instead
11841 of inferior.
11842 (handle_serial_event): Likewise.
11843 (handle_target_event): Likewise.
11844
11845 2014-09-12 Tom Tromey <tromey@redhat.com>
11846 Gary Benson <gbenson@redhat.com>
11847
11848 * regcache.h: Include common-regcache.h.
11849 (regcache_read_pc): Don't declare.
11850 * regcache.c (get_thread_regcache_for_ptid): New function.
11851
11852 2014-09-11 Tom Tromey <tromey@redhat.com>
11853 Gary Benson <gbenson@redhat.com>
11854
11855 * symbol.c: New file.
11856 * Makefile.in (SFILES): Add symbol.c.
11857 (OBS): Add symbol.o.
11858
11859 2014-09-11 Gary Benson <gbenson@redhat.com>
11860
11861 * target.c (target_stop_ptid, target_continue_ptid): New
11862 functions.
11863
11864 2014-09-11 Tom Tromey <tromey@redhat.com>
11865 Gary Benson <gbenson@redhat.com>
11866
11867 * target.h: Include target/target.h.
11868 * target.c (target_read_memory, target_read_uint32)
11869 (target_write_memory): New functions.
11870
11871 2014-09-11 Gary Benson <gbenson@redhat.com>
11872
11873 * server.h (debug_hw_points): Don't declare.
11874 * server.c (debug_hw_points): Don't define. Replace all uses
11875 with show_debug_regs.
11876 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
11877 all uses with show_debug_regs.
11878
11879 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
11880
11881 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
11882 endianness into account.
11883 (ppc_supply_ptrace_register): Likewise.
11884
11885 2014-09-03 James Hogan <james.hogan@imgtec.com>
11886
11887 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
11888 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
11889
11890 2014-09-03 Gary Benson <gbenson@redhat.com>
11891
11892 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
11893 ALL_DEBUG_ADDRESS_REGISTERS.
11894
11895 2014-09-02 Gary Benson <gbenson@redhat.com>
11896
11897 * i386-low.h: Renamed as...
11898 * x86-low.h: New file. All type, function and variable name
11899 prefixes changed from "i386_" to "x86_". All references updated.
11900 * i386-low.c: Renamed as...
11901 * x86-low.c: New file. All type, function and variable name
11902 prefixes changed from "i386_" to "x86_". All references updated.
11903
11904 2014-09-02 Gary Benson <gbenson@redhat.com>
11905
11906 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
11907 (x86_linux_new_thread): Likewise.
11908
11909 2014-08-29 Gary Benson <gbenson@redhat.com>
11910
11911 * server.h (setjmp.h): Do not include.
11912 (toplevel): Do not declare.
11913 (common-exceptions.h): Include.
11914 (cleanups.h): Likewise.
11915 * server.c (toplevel): Do not define.
11916 (exit_code): New static global.
11917 (detach_or_kill_for_exit_cleanup): New function.
11918 (main): New function. Original main renamed to...
11919 (captured_main): New function.
11920 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
11921
11922 2014-08-29 Gary Benson <gbenson@redhat.com>
11923
11924 * Makefile.in (SFILES): Add common/common-exceptions.c.
11925 (OBS): Add common-exceptions.o.
11926 (common-exceptions.o): New rule.
11927 * utils.c (prepare_to_throw_exception): New function.
11928
11929 2014-08-29 Gary Benson <gbenson@redhat.com>
11930
11931 * config.in: Regenerate.
11932 * configure: Likewise.
11933
11934 2014-08-29 Gary Benson <gbenson@redhat.com>
11935
11936 * Makefile.in (SFILES): Add common/cleanups.c.
11937 (OBS): cleanups.o.
11938 (cleanups.o): New rule.
11939
11940 2014-08-29 Gary Benson <gbenson@redhat.com>
11941
11942 * utils.c (internal_vwarning): New function.
11943
11944 2014-08-28 Gary Benson <gbenson@redhat.com>
11945
11946 * utils.h (fatal): Remove declaration.
11947 * utils.c (fatal): Remove function.
11948
11949 2014-08-28 Gary Benson <gbenson@redhat.com>
11950
11951 * tracepoint.c (gdb_agent_init): Replace fatal with
11952 perror_with_name.
11953 (initialize_tracepoint): Likewise.
11954
11955 2014-08-28 Gary Benson <gbenson@redhat.com>
11956
11957 * remote-utils.c (remote_prepare): Replace fatal with error.
11958
11959 2014-08-28 Gary Benson <gbenson@redhat.com>
11960
11961 * linux-low.c (linux_async): Replace fatal with warning.
11962 Tidy up and return.
11963 (linux_start_non_stop): Return -1 if linux_async failed.
11964
11965 2014-08-28 Gary Benson <gbenson@redhat.com>
11966
11967 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
11968 gdb_assert.
11969 (i386_dr_low_get_addr): Remove vague comment.
11970 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
11971 gdb_assert.
11972
11973 2014-08-28 Gary Benson <gbenson@redhat.com>
11974
11975 * inferiors.c (get_thread_process): Replace check with gdb_assert.
11976 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
11977 internal_error.
11978 (linux_resume_one_lwp): Likewise.
11979 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
11980 gdb_assert.
11981 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
11982 with internal_error.
11983 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
11984 (init_register_cache): Replace fatal with gdb_assert_not_reached.
11985 (find_register_by_name): Replace fatal with internal_error.
11986 (find_regno): Likewise.
11987 * tdesc.c (init_target_desc): Replace check with gdb_assert.
11988 * thread-db.c (thread_db_create_event): Likewise.
11989 (thread_db_load_search): Likewise.
11990 (try_thread_db_load_1): Likewise.
11991 * tracepoint.c (get_jump_space_head): Replace fatal with
11992 internal_error.
11993 (claim_trampoline_space): Likewise.
11994 (have_fast_tracepoint_trampoline_buffer): Likewise.
11995 (cmd_qtstart): Likewise.
11996 (stop_tracing): Likewise.
11997 (fast_tracepoint_collecting): Likewise.
11998 (target_malloc): Likewise.
11999 (download_tracepoint): Likewise.
12000 (download_trace_state_variables): Replace check with gdb_assert.
12001 (upload_fast_traceframes): Replace fatal with internal_error.
12002
12003 2014-08-19 Tom Tromey <tromey@redhat.com>
12004 Gary Benson <gbenson@redhat.com>
12005
12006 * Makefile.in (SFILES): Add common/common-debug.c.
12007 (OBS): Add common-debug.o.
12008 (common-debug.o): New rule.
12009 * debug.h (debug_printf): Don't declare.
12010 * debug.c (debug_printf): Renamed and rewritten as...
12011 (debug_vprintf): New function.
12012
12013 2014-08-19 Gary Benson <gbenson@redhat.com>
12014
12015 * utils.h: Do not include print-utils.h.
12016
12017 2014-08-19 Tom Tromey <tromey@redhat.com>
12018 Gary Benson <gbenson@redhat.com>
12019
12020 * server.h: Add static assertion.
12021 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12022
12023 2014-08-19 Tom Tromey <tromey@redhat.com>
12024 Gary Benson <gbenson@redhat.com>
12025
12026 * Makefile.in (SFILES): Add common/errors.c.
12027 (OBS): Add errors.o.
12028 (IPA_OBS): Add errors-ipa.o.
12029 (errors.o): New rule.
12030 (errors-ipa.o): Likewise.
12031 * utils.h (perror_with_name, error, warning): Don't declare.
12032 * utils.c (warning): Renamed and rewritten as...
12033 (vwarning): New function.
12034 (error): Renamed and rewritten as...
12035 (verror): New function.
12036 (internal_error): Renamed and rewritten as...
12037 (internal_verror): New function.
12038
12039 2014-08-07 Gary Benson <gbenson@redhat.com>
12040
12041 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12042 * configure: Regenerate.
12043 * config.in: Likewise.
12044 * server.h: Do not include errno.h.
12045 * event-loop.c: Likewise.
12046 * hostio-errno.c: Likewise.
12047 * linux-low.c: Likewise.
12048 * remote-utils.c: Likewise.
12049 * spu-low.c: Likewise.
12050 * utils.c: Likewise.
12051 * gdbreplay.c: Unconditionally include errno.h.
12052
12053 2014-08-07 Gary Benson <gbenson@redhat.com>
12054
12055 * server.h: Do not include string.h.
12056 * event-loop.c: Likewise.
12057 * linux-low.c: Likewise.
12058 * regcache.c: Likewise.
12059 * remote-utils.c: Likewise.
12060 * spu-low.c: Likewise.
12061 * utils.c: Likewise.
12062
12063 2014-08-07 Gary Benson <gbenson@redhat.com>
12064
12065 * server.h: Do not include gdb_assert.h.
12066
12067 2014-08-07 Gary Benson <gbenson@redhat.com>
12068
12069 * server.h: Do not include common-utils.h.
12070
12071 2014-08-07 Gary Benson <gbenson@redhat.com>
12072
12073 * server.h: Do not include ptid.h.
12074 * notif.h: Likewise.
12075
12076 2014-08-07 Gary Benson <gbenson@redhat.com>
12077
12078 * server.h: Do not include gdb_locale.h.
12079
12080 2014-08-07 Gary Benson <gbenson@redhat.com>
12081
12082 * server.h: Do not include gdb/signals.h.
12083 * win32-low.c: Likewise.
12084
12085 2014-08-07 Gary Benson <gbenson@redhat.com>
12086
12087 * server.h: Do not include pathmax.h.
12088
12089 2014-08-07 Gary Benson <gbenson@redhat.com>
12090
12091 * server.h: Do not include libiberty.h.
12092 * linux-bfin-low.c: Likewise.
12093
12094 2014-08-07 Gary Benson <gbenson@redhat.com>
12095
12096 * server.h: Do not include ansidecl.h.
12097
12098 2014-08-07 Gary Benson <gbenson@redhat.com>
12099
12100 * linux-x86-low.c: Do not include stddef.h.
12101 * lynx-ppc-low.c: Likewise.
12102 * tracepoint.c: Likewise.
12103
12104 2014-08-07 Gary Benson <gbenson@redhat.com>
12105
12106 * server.h: Do not include stdarg.h.
12107 * nto-low.c: Likewise.
12108
12109 2014-08-07 Gary Benson <gbenson@redhat.com>
12110
12111 * server.h: Do not include stdlib.h.
12112 * inferiors.c: Likewise.
12113 * linux-low.c: Likewise.
12114 * regcache.c: Likewise.
12115 * spu-low.c: Likewise.
12116 * tracepoint.c: Likewise.
12117 * utils.c: Likewise.
12118
12119 2014-08-07 Gary Benson <gbenson@redhat.com>
12120
12121 * server.h: Do not include stdio.h.
12122 * linux-low.c: Likewise.
12123 * remote-utils.c: Likewise.
12124 * spu-low.c: Likewise.
12125 * utils.c: Likewise.
12126 * wincecompat.c: Likewise.
12127
12128 2014-08-06 Gary Benson <gbenson@redhat.com>
12129
12130 * regcache.c (init_register_cache): Move conditionals inside if.
12131
12132 2014-08-06 Gary Benson <gbenson@redhat.com>
12133
12134 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12135
12136 2014-07-31 Gary Benson <gbenson@redhat.com>
12137
12138 * ax.h: Do not include server.h.
12139 * gdbthread.h: Likewise.
12140 * lynx-low.h: Likewise.
12141 * notif.h: Likewise.
12142
12143 2014-07-30 Gary Benson <gbenson@redhat.com>
12144
12145 * server.h: Include common-defs.h.
12146 Do not include config.h or build-gnulib-gdbserver/config.h.
12147
12148 2014-07-30 Gary Benson <gbenson@redhat.com>
12149
12150 * hostio-errno.c: Move server.h to top of includes list.
12151 * inferiors.c: Likewise.
12152 * linux-x86-low.c: Likewise.
12153 * notif.c: Include server.h.
12154
12155 2014-07-24 Tom Tromey <tromey@redhat.com>
12156 Gary Benson <gbenson@redhat.com>
12157
12158 * server.h (CORE_ADDR): Now unsigned.
12159
12160 2014-07-16 Pedro Alves <palves@redhat.com>
12161
12162 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12163
12164 2014-07-15 Pedro Alves <palves@redhat.com>
12165
12166 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12167 copy.
12168
12169 2014-07-11 Pedro Alves <palves@redhat.com>
12170
12171 * linux-low.c (kill_wait_lwp): New function, based on
12172 kill_one_lwp_callback, but use my_waitpid directly.
12173 (kill_one_lwp_callback, linux_kill): Use it.
12174
12175 2014-06-23 Pedro Alves <palves@redhat.com>
12176
12177 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12178 before setting DR0..DR3.
12179
12180 2014-06-20 Gary Benson <gbenson@redhat.com>
12181
12182 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12183 * configure: Regenerated.
12184 * config.in: Likewise.
12185
12186 2014-06-20 Gary Benson <gbenson@redhat.com>
12187
12188 * Makefile.in (SFILES): Update locations for files moved
12189 from common to nat.
12190 (object file files): Reordered.
12191
12192 2014-06-20 Gary Benson <gbenson@redhat.com>
12193
12194 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12195 (i386_dr_low_set_addr): Likewise.
12196 (i386_dr_low_get_addr): Likewise.
12197 (i386_dr_low_can_set_control): Likewise.
12198 (i386_dr_low_set_control): Likewise.
12199 (i386_dr_low_get_control): Likewise.
12200 (i386_dr_low_get_status): Likewise.
12201 (i386_get_debug_register_length): Likewise.
12202 * linux-x86-low.c (i386_dr_low_set_addr):
12203 Changed signature. Made static.
12204 (i386_dr_low_get_addr): Likewise.
12205 (i386_dr_low_set_control): Likewise.
12206 (i386_dr_low_get_control): Likewise.
12207 (i386_dr_low_get_status): Likewise.
12208 (i386_dr_low): New global variable.
12209 * win32-i386-low.c (i386_dr_low_set_addr):
12210 Changed signature. Made static.
12211 (i386_dr_low_get_addr): Likewise.
12212 (i386_dr_low_set_control): Likewise.
12213 (i386_dr_low_get_control): Likewise.
12214 (i386_dr_low_get_status): Likewise.
12215 (i386_dr_low): New global variable.
12216
12217 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12218
12219 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12220 * Makefile.in (AR, AR_FLAGS): Define.
12221 * configure: Regenerate.
12222
12223 2014-06-19 Gary Benson <gbenson@redhat.com>
12224
12225 * Makefile.in (i386-dregs.o): New rule.
12226 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12227 * i386-low.c (target.h): Remove include.
12228 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12229 (DR_CONTROL_SHIFT): Likewise.
12230 (DR_CONTROL_SIZE): Likewise.
12231 (DR_RW_EXECUTE): Likewise.
12232 (DR_RW_WRITE): Likewise.
12233 (DR_RW_READ): Likewise.
12234 (DR_RW_IORW): Likewise.
12235 (DR_LEN_1): Likewise.
12236 (DR_LEN_2): Likewise.
12237 (DR_LEN_4): Likewise.
12238 (DR_LEN_8): Likewise.
12239 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12240 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12241 (DR_ENABLE_SIZE): Likewise.
12242 (DR_LOCAL_SLOWDOWN): Likewise.
12243 (DR_GLOBAL_SLOWDOWN): Likewise.
12244 (DR_CONTROL_RESERVED): Likewise.
12245 (I386_DR_CONTROL_MASK): Likewise.
12246 (I386_DR_VACANT): Likewise.
12247 (I386_DR_LOCAL_ENABLE): Likewise.
12248 (I386_DR_GLOBAL_ENABLE): Likewise.
12249 (I386_DR_DISABLE): Likewise.
12250 (I386_DR_SET_RW_LEN): Likewise.
12251 (I386_DR_GET_RW_LEN): Likewise.
12252 (I386_DR_WATCH_HIT): Likewise.
12253 (i386_wp_op_t): Likewise.
12254 (i386_show_dr): Likewise.
12255 (i386_length_and_rw_bits): Likewise.
12256 (i386_insert_aligned_watchpoint): Likewise.
12257 (i386_remove_aligned_watchpoint): Likewise.
12258 (i386_handle_nonaligned_watchpoint): Likewise.
12259 i386_update_inferior_debug_regs(): Likewise.
12260 (i386_dr_insert_watchpoint): Likewise.
12261 (i386_dr_remove_watchpoint): Likewise.
12262 (i386_dr_region_ok_for_watchpoint): Likewise.
12263 (i386_dr_stopped_data_address): Likewise.
12264 (i386_dr_stopped_by_watchpoint): Likewise.
12265
12266 2014-06-19 Gary Benson <gbenson@redhat.com>
12267
12268 * i386-low.c (i386_dr_show): Renamed to
12269 i386_show_dr and made static. All uses updated.
12270 (i386_dr_length_and_rw_bits): Renamed to
12271 i386_length_and_rw_bits and made static.
12272 All uses updated.
12273 (i386_dr_insert_aligned_watchpoint): Renamed to
12274 i386_insert_aligned_watchpoint and made static.
12275 All uses updated.
12276 (i386_dr_remove_aligned_watchpoint): Renamed to
12277 i386_remove_aligned_watchpoint and made static.
12278 All uses updated.
12279 (i386_dr_update_inferior_debug_regs): Renamed to
12280 i386_update_inferior_debug_regs and made static.
12281 All uses updated.
12282
12283 2014-06-18 Gary Benson <gbenson@redhat.com>
12284
12285 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12286 (i386_dr_low_can_set_control): Likewise.
12287 (i386_get_debug_register_length): Likewise.
12288 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12289 (i386_dr_low_can_set_control): Likewise.
12290 (i386_get_debug_register_length): Likewise.
12291
12292 2014-06-17 Gary Benson <gbenson@redhat.com>
12293
12294 * i386-low.h (i386-dregs.h): New include.
12295 (DR_FIRSTADDR): Now in i386-dregs.h.
12296 (DR_LASTADDR): Likewise.
12297 (DR_NADDR): Likewise.
12298 (DR_STATUS): Likewise.
12299 (DR_CONTROL): Likewise.
12300 (i386_debug_reg_state): Likewise.
12301 (i386_dr_insert_watchpoint): Likewise.
12302 (i386_dr_remove_watchpoint): Likewise.
12303 (i386_dr_region_ok_for_watchpoint): Likewise.
12304 (i386_dr_stopped_data_address): Likewise.
12305 (i386_dr_stopped_by_watchpoint): Likewise.
12306 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12307
12308 2014-06-18 Gary Benson <gbenson@redhat.com>
12309
12310 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12311 i386_dr_insert_watchpoint.
12312 (i386_low_remove_watchpoint): Renamed to
12313 i386_dr_remove_watchpoint.
12314 (i386_low_region_ok_for_watchpoint): Renamed to
12315 i386_dr_region_ok_for_watchpoint.
12316 (i386_low_stopped_data_address): Renamed to
12317 i386_dr_stopped_data_address.
12318 (i386_low_stopped_by_watchpoint): Renamed to
12319 i386_dr_stopped_by_watchpoint.
12320 * i386-low.c (i386_show_dr): Renamed to
12321 i386_dr_show and made nonstatic. All uses updated.
12322 (i386_length_and_rw_bits): Renamed to
12323 i386_dr_length_and_rw_bits and made nonstatic.
12324 All uses updated.
12325 (i386_insert_aligned_watchpoint): Renamed to
12326 i386_dr_insert_aligned_watchpoint and made nonstatic.
12327 All uses updated.
12328 (i386_remove_aligned_watchpoint): Renamed to
12329 i386_dr_remove_aligned_watchpoint and made nonstatic.
12330 All uses updated.
12331 (i386_update_inferior_debug_regs): Renamed to
12332 i386_dr_update_inferior_debug_regs and made nonstatic.
12333 All uses updated.
12334 (i386_low_insert_watchpoint): Renamed to
12335 i386_dr_insert_watchpoint. All uses updated.
12336 (i386_low_remove_watchpoint): Renamed to
12337 i386_dr_remove_watchpoint. All uses updated.
12338 (i386_low_region_ok_for_watchpoint): Renamed to
12339 i386_dr_region_ok_for_watchpoint. All uses updated.
12340 (i386_low_stopped_data_address): Renamed to
12341 i386_dr_stopped_data_address. All uses updated.
12342 (i386_low_stopped_by_watchpoint): Renamed to
12343 i386_dr_stopped_by_watchpoint. All uses updated.
12344
12345 2014-06-18 Gary Benson <gbenson@redhat.com>
12346
12347 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12348 (i386_dr_low_can_set_control): Likewise.
12349 (i386_insert_aligned_watchpoint): New check.
12350
12351 2014-06-18 Gary Benson <gbenson@redhat.com>
12352
12353 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12354 Renamed to state.
12355
12356 2014-06-18 Gary Benson <gbenson@redhat.com>
12357
12358 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12359 instead of fatal and error.
12360 (i386_handle_nonaligned_watchpoint): Likewise.
12361
12362 2014-06-18 Gary Benson <gbenson@redhat.com>
12363
12364 * i386-low.c (i386_get_debug_register_length): New macro.
12365 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12366 (i386_show_dr): Use debug_printf instead of fprintf. Use
12367 phex to format values.
12368
12369 2014-06-18 Gary Benson <gbenson@redhat.com>
12370
12371 * i386-low.h: Comment changes.
12372 * i386-low.c: Likewise.
12373
12374 2014-06-18 Gary Benson <gbenson@redhat.com>
12375
12376 * i386-low.c: Whitespace changes.
12377
12378 2014-06-12 Tom Tromey <tromey@redhat.com>
12379
12380 * utils.c (freeargv): Remove.
12381
12382 2014-06-12 Tom Tromey <tromey@redhat.com>
12383
12384 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12385 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12386 (parse_debug_format_options): Likewise.
12387 (gdbserver_usage): Likewise.
12388 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12389 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12390 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12391 against libiberty.
12392 ($(LIBGNU)): Depend on libiberty.
12393 (all-lib): Recurse into all subdirs.
12394 (install-only): Invoke "install" target in subdirs.
12395 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12396 targets.
12397 * configure: Rebuild.
12398 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12399 for vasprintf, vsnprintf, or gettimeofday.
12400 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12401 srv_tgtobj.
12402
12403 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12404
12405 * development.sh: Delete.
12406 * Makefile.in (config.status): Adjust dependency on development.sh.
12407 * configure.ac: Adjust development.sh source call.
12408 * configure: Regenerate.
12409
12410 2014-06-02 Pedro Alves <palves@redhat.com>
12411
12412 * ax.c (gdb_free_agent_expr): New function.
12413 * ax.h (gdb_free_agent_expr): New declaration.
12414 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12415 list.
12416 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12417 static.
12418 (clear_breakpoint_conditions_and_commands): New function.
12419 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12420 (clear_breakpoint_conditions_and_commands): New declaration.
12421
12422 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12423
12424 * linux-aarch64-low.c (asm/ptrace.h): Include.
12425
12426 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12427
12428 Fix TLS access for -static -pthread.
12429 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12430 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12431 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12432
12433 2014-05-20 Pedro Alves <palves@redhat.com>
12434
12435 * linux-aarch64-low.c (aarch64_insert_point)
12436 (aarch64_remove_point): No longer check whether the type is
12437 supported here. Adjust to new interface.
12438 (the_low_target): Install aarch64_supports_z_point_type as
12439 supports_z_point_type method.
12440 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12441 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12442 instead of a Z packet char. Adjust.
12443 (arm_supports_z_point_type): New function.
12444 (arm_insert_point, arm_remove_point): Adjust to new interface.
12445 (the_low_target): Install arm_supports_z_point_type.
12446 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12447 (cris_insert_point, cris_remove_point): Adjust to new interface.
12448 Don't check whether the type is supported here.
12449 (the_low_target): Install cris_supports_z_point_type.
12450 * linux-low.c (linux_supports_z_point_type): New function.
12451 (linux_insert_point, linux_remove_point): Adjust to new interface.
12452 * linux-low.h (struct linux_target_ops) <insert_point,
12453 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12454 raw_breakpoint pointer parameter.
12455 <supports_z_point_type>: New method.
12456 * linux-mips-low.c (mips_supports_z_point_type): New function.
12457 (mips_insert_point, mips_remove_point): Adjust to new interface.
12458 Use mips_supports_z_point_type.
12459 (the_low_target): Install mips_supports_z_point_type.
12460 * linux-ppc-low.c (the_low_target): Install NULL as
12461 supports_z_point_type method.
12462 * linux-s390-low.c (the_low_target): Install NULL as
12463 supports_z_point_type method.
12464 * linux-sparc-low.c (the_low_target): Install NULL as
12465 supports_z_point_type method.
12466 * linux-x86-low.c (x86_supports_z_point_type): New function.
12467 (x86_insert_point): Adjust to new insert_point interface. Use
12468 insert_memory_breakpoint. Adjust to new
12469 i386_low_insert_watchpoint interface.
12470 (x86_remove_point): Adjust to remove_point interface. Use
12471 remove_memory_breakpoint. Adjust to new
12472 i386_low_remove_watchpoint interface.
12473 (the_low_target): Install x86_supports_z_point_type.
12474 * lynx-low.c (lynx_target_ops): Install NULL as
12475 supports_z_point_type callback.
12476 * nto-low.c (nto_supports_z_point_type): New.
12477 (nto_insert_point, nto_remove_point): Adjust to new interface.
12478 (nto_target_ops): Install nto_supports_z_point_type.
12479 * mem-break.c: Adjust intro comment.
12480 (struct raw_breakpoint) <raw_type, size>: New fields.
12481 <inserted>: Update comment.
12482 <shlib_disabled>: Delete field.
12483 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12484 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12485 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12486 (raw_bkpt_type_to_target_hw_bp_type): New function.
12487 (find_enabled_raw_code_breakpoint_at): New function.
12488 (find_raw_breakpoint_at): New type and size parameters. Use them.
12489 (insert_memory_breakpoint): New function, based off
12490 set_raw_breakpoint_at.
12491 (remove_memory_breakpoint): New function.
12492 (set_raw_breakpoint_at): Reimplement.
12493 (set_breakpoint): New, based on set_breakpoint_at.
12494 (set_breakpoint_at): Reimplement.
12495 (delete_raw_breakpoint): Go through the_target->remove_point
12496 instead of assuming memory breakpoints.
12497 (find_gdb_breakpoint_at): Delete.
12498 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12499 (find_gdb_breakpoint): New function.
12500 (set_gdb_breakpoint_at): Delete.
12501 (z_type_supported): New function.
12502 (set_gdb_breakpoint_1): New function, loosely based off
12503 set_gdb_breakpoint_at.
12504 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12505 (delete_gdb_breakpoint_at): Delete.
12506 (delete_gdb_breakpoint_1): New function, loosely based off
12507 delete_gdb_breakpoint_at.
12508 (delete_gdb_breakpoint): New function.
12509 (clear_gdb_breakpoint_conditions): Rename to ...
12510 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12511 breakpoint.
12512 (add_condition_to_breakpoint): Make static.
12513 (add_breakpoint_condition): Take a struct breakpoint pointer
12514 instead of an address. Adjust.
12515 (gdb_condition_true_at_breakpoint): Rename to ...
12516 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12517 z_type parameter.
12518 (gdb_condition_true_at_breakpoint): Reimplement.
12519 (add_breakpoint_commands): Take a struct breakpoint pointer
12520 instead of an address. Adjust.
12521 (gdb_no_commands_at_breakpoint): Rename to ...
12522 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12523 parameter. Return true if no breakpoint was found. Change debug
12524 output.
12525 (gdb_no_commands_at_breakpoint): Reimplement.
12526 (run_breakpoint_commands): Rename to ...
12527 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12528 and change return type to boolean.
12529 (run_breakpoint_commands): New function.
12530 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12531 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12532 breakpoint. Go through the_target->remove_point instead of
12533 assuming memory breakpoint.
12534 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12535 software and hardware breakpoints.
12536 (reinsert_raw_breakpoint): Go through the_target->insert_point
12537 instead of assuming memory breakpoint.
12538 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12539 software and hardware breakpoints.
12540 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12541 Check both software and hardware breakpoints.
12542 (validate_inserted_breakpoint): Assert the breakpoint is a
12543 software breakpoint. Set the inserted flag to -1 instead of
12544 setting shlib_disabled.
12545 (delete_disabled_breakpoints): Adjust.
12546 (validate_breakpoints): Only validate software breakpoints.
12547 Adjust to inserted flag change.
12548 (check_mem_read, check_mem_write): Skip breakpoint types other
12549 than software breakpoints. Adjust to inserted flag change.
12550 * mem-break.h (enum raw_bkpt_type): New enum.
12551 (raw_breakpoint, struct process_info): Forward declare.
12552 (Z_packet_to_target_hw_bp_type): Delete declaration.
12553 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12554 (set_gdb_breakpoint, delete_gdb_breakpoint)
12555 (clear_breakpoint_conditions): New declarations.
12556 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12557 (breakpoint_inserted_here): Update comment.
12558 (add_breakpoint_condition, add_breakpoint_commands): Replace
12559 address parameter with a breakpoint pointer parameter.
12560 (gdb_breakpoint_here): Update comment.
12561 (delete_gdb_breakpoint_at): Delete.
12562 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12563 * server.c (process_point_options): Take a struct breakpoint
12564 pointer instead of an address. Adjust.
12565 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12566 delete_gdb_breakpoint.
12567 * spu-low.c (spu_target_ops): Install NULL as
12568 supports_z_point_type method.
12569 * target.h: Include mem-break.h.
12570 (struct target_ops) <prepare_to_access_memory>: Update comment.
12571 <supports_z_point_type>: New field.
12572 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12573 instead of a char. Also take a raw breakpoint pointer.
12574 * win32-arm-low.c (the_low_target): Install NULL as
12575 supports_z_point_type.
12576 * win32-i386-low.c (i386_supports_z_point_type): New function.
12577 (i386_insert_point, i386_remove_point): Adjust to new interface.
12578 (the_low_target): Install i386_supports_z_point_type.
12579 * win32-low.c (win32_supports_z_point_type): New function.
12580 (win32_insert_point, win32_remove_point): Adjust to new interface.
12581 (win32_target_ops): Install win32_supports_z_point_type.
12582 * win32-low.h (struct win32_target_ops):
12583 <supports_z_point_type>: New method.
12584 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12585 instead of a char. Also take a raw breakpoint pointer.
12586
12587 2014-05-20 Pedro Alves <palves@redhat.com>
12588
12589 * mem-break.h: Include break-common.h.
12590 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12591 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12592 (Z_packet_to_target_hw_bp_type): New declaration.
12593 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12594 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12595 (Z_PACKET_ACCESS_WP): Delete macros.
12596 (Z_packet_to_hw_type): Delete function.
12597 * i386-low.h: Don't include break-common.h here.
12598 (Z_packet_to_hw_type): Delete declaration.
12599 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12600 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12601 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12602 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12603 * linux-aarch64-low.c: Don't include break-common.h here.
12604 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12605 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12606 (Z_packet_to_target_hw_bp_type): Delete function.
12607 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12608 function.
12609 (mips_insert_point, mips_remove_point): Use
12610 Z_packet_to_target_hw_bp_type.
12611
12612 2014-05-20 Pedro Alves <palves@redhat.com>
12613
12614 * linux-aarch64-low.c: Include break-common.h.
12615 (enum target_point_type): Delete.
12616 (Z_packet_to_point_type): Rename to ...
12617 (Z_packet_to_target_hw_bp_type): ... this, and return a
12618 target_hw_bp_type instead.
12619 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12620 instead of an enum target_point_type.
12621 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12622 breakpoint type.
12623 (aarch64_dr_state_insert_one_point)
12624 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12625 (aarch64_handle_aligned_watchpoint)
12626 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12627 Take an enum target_hw_bp_type instead of an enum
12628 target_point_type.
12629 (aarch64_supports_z_point_type): New function.
12630 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12631 use Z_packet_to_target_hw_bp_type.
12632
12633 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12634
12635 * configure.ac: Only use -Werror by default when DEVELOPMENT
12636 is true.
12637 * configure: Regenerate.
12638
12639 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12640
12641 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12642 * linux-x86-low.c (X86_64_USER_REGS): New.
12643 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12644
12645 2014-04-28 Yao Qi <yao@codesourcery.com>
12646
12647 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12648 name.
12649
12650 2014-04-25 Pedro Alves <palves@redhat.com>
12651
12652 PR server/16255
12653 * linux-low.c (linux_attach_fail_reason_string): New function.
12654 (linux_attach_lwp): Delete.
12655 (linux_attach_lwp_1): Rename to ...
12656 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12657 argument. Remove "initial" parameter. Return int instead of
12658 void. Don't error or warn here.
12659 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12660 failure to attach to the tgid. Call warning when failing to
12661 attach to an lwp.
12662 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12663 argument. Remove "initial" parameter. Return int instead of
12664 void. Don't error or warn here.
12665 (linux_attach_fail_reason_string): New declaration.
12666 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12667 interface change. Use linux_attach_fail_reason_string.
12668
12669 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12670 Walfred Tedeschi <walfred.tedeschi@intel.com>
12671
12672 * Makefile.in: Added rules to handle new files
12673 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12674 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12675 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12676 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12677 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12678 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12679 x32-avx512-linux.o.
12680 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12681 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12682 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12683 i386/x32-avx512.xml.
12684 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12685 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12686 i386/x32-avx512-linux.xml.
12687 * i387-fp.c (num_avx512_k_registers): New constant for number
12688 of K registers.
12689 (num_avx512_zmmh_low_registers): New constant for number of
12690 lower ZMM registers (0-15).
12691 (num_avx512_zmmh_high_registers): New constant for number of
12692 higher ZMM registers (16-31).
12693 (num_avx512_ymmh_registers): New contant for number of higher
12694 YMM registers (ymm16-31 added by avx521 on x86_64).
12695 (num_avx512_xmm_registers): New constant for number of higher
12696 XMM registers (xmm16-31 added by AVX512 on x86_64).
12697 (struct i387_xsave): Add space for AVX512 registers.
12698 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12699 Add code to handle AVX512 registers.
12700 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12701 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12702 prototypei from generated file.
12703 (tdesc_amd64_avx512_linux): Likewise.
12704 (init_registers_x32_avx512_linux): Likewise.
12705 (tdesc_x32_avx512_linux): Likewise.
12706 (init_registers_i386_avx512_linux): Likewise.
12707 (tdesc_i386_avx512_linux): Likewise.
12708 (x86_64_regmap): Add AVX512 registers.
12709 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12710 mask.
12711 (initialize_low_arch): Add code to initialize AVX512 registers.
12712
12713 2014-04-23 Pedro Alves <palves@redhat.com>
12714
12715 * mem-break.c (find_gdb_breakpoint_at): Make static.
12716 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12717
12718 2014-04-23 Pedro Alves <palves@redhat.com>
12719
12720 * i386-low.c: Don't include break-common.h here.
12721 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12722 prototype to take target_hw_bp_type as argument instead of a Z
12723 packet char.
12724 * i386-low.h: Include break-common.h here.
12725 (Z_packet_to_hw_type): Declare.
12726 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12727 prototypes.
12728 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12729 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12730 (x86_remove_point): Convert the packet number to a
12731 target_hw_bp_type before calling i386_low_remove_watchpoint.
12732 * win32-i386-low.c (i386_insert_point): Convert the packet number
12733 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12734 (i386_remove_point): Convert the packet number to a
12735 target_hw_bp_type before calling i386_low_remove_watchpoint.
12736
12737 2014-04-23 Pedro Alves <palves@redhat.com>
12738
12739 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12740
12741 2014-04-10 Pedro Alves <palves@redhat.com>
12742
12743 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12744 Check if the condition or command is NULL before checking if the
12745 breakpoint is known. On success, return true.
12746 * mem-break.h (add_breakpoint_condition): Document return.
12747 (add_breakpoint_commands): Add describing comment.
12748 * server.c (skip_to_semicolon): New function.
12749 (process_point_options): Use it.
12750
12751 2014-04-09 Pedro Alves <palves@redhat.com>
12752
12753 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12754 to lwpid_of.
12755
12756 2014-02-27 Pedro Alves <palves@redhat.com>
12757
12758 PR 12702
12759 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12760 macros.
12761 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12762 output.
12763 (last_thread_of_process_p): Take a PID argument instead of a
12764 thread pointer.
12765 (linux_wait_for_lwp): Delete.
12766 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12767 functions.
12768 (linux_low_filter_event): New function, party factored out from
12769 linux_wait_for_event.
12770 (linux_wait_for_event): Rename to ...
12771 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12772 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12773 sigsuspend. Check for zombie leaders.
12774 (linux_wait_for_event): Reimplement as wrapper around
12775 linux_wait_for_event_filtered.
12776 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12777 a normal or signal exit is seen, it's the whole process exiting.
12778 (wait_for_sigstop): No longer a for_each_inferior callback.
12779 Rewrite on top of linux_wait_for_event_filtered.
12780 (stop_all_lwps): Call wait_for_sigstop directly.
12781 * server.c (resume, handle_target_event): Handle
12782 TARGET_WAITKIND_NO_RESUMED.
12783
12784 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12785
12786 * win32-low.c (psapi_get_dll_name,
12787 * win32_CreateToolhelp32Snapshot): Delete.
12788 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12789 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12790 Delete.
12791 (handle_load_dll): Add function description.
12792 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12793
12794 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12795
12796 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12797 Add comment.
12798 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12799 base address when calling win32_add_one_solib.
12800 (handle_load_dll): Delete local variable load_addr.
12801 Remove 0x1000 offset applied to DLL base address when calling
12802 win32_add_one_solib.
12803 (handle_unload_dll): Add comment.
12804
12805 2014-02-26 Joel Brobecker <brobecker@adacore.com>
12806
12807 * win32-low.c (win32_add_all_dlls): Renames
12808 win32_ensure_ntdll_loaded. Rewrite function documentation.
12809 Adjust implementation to always load all DLLs.
12810 Add 0x1000 offset to DLL base address when calling
12811 win32_add_one_solib.
12812 (child_initialization_done): New static global.
12813 (do_initial_child_stuff): Set child_initialization_done to
12814 zero during child initialization, and 1 after. Replace call
12815 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12816 Add comment.
12817 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12818 (handle_unload_dll): Add function documentation.
12819 (get_child_debug_event): Ignore load and unload DLL events
12820 during child initialization.
12821
12822 2014-02-20 Doug Evans <dje@google.com>
12823
12824 Remove global all_lwps.
12825 * inferiors.h (ptid_of): Move here from linux-low.h.
12826 (pid_of, lwpid_of): Ditto.
12827 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12828 parameter is a struct thread_info * now.
12829 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12830 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12831 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12832 directly.
12833 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12834 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12835 * linux-arm-low.c (update_registers_callback): Update, "entry"
12836 parameter is a struct thread_info * now.
12837 Fetch lwpid from current_inferior directly.
12838 (arm_insert_point): Pass &all_threads to find_inferior instead of
12839 &all_lwps.
12840 (arm_remove_point): Ditto.
12841 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12842 (arm_prepare_to_resume): Fetch pid from thread.
12843 (arm_read_description): Fetch lwpid from current_inferior directly.
12844 * linux-low.c (all_lwps): Delete.
12845 (delete_lwp): Delete call to remove_inferior.
12846 (handle_extended_wait): Fetch lwpid from thread.
12847 (add_lwp): Don't set lwp->entry.id. Remove call to
12848 add_inferior_to_list.
12849 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12850 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12851 (kill_one_lwp_callback): Ditto.
12852 (linux_kill): Don't dereference NULL pointer.
12853 Fetch ptid,lwpid from thread.
12854 (get_detach_signal): Fetch ptid from thread.
12855 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12856 Simplify call to regcache_invalidate_thread.
12857 (delete_lwp_callback): Update, "entry" parameter is a
12858 struct thread_info * now. Fetch pid from thread.
12859 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12860 (status_pending_p_callback): Update, "entry" parameter is a
12861 struct thread_info * now. Fetch ptid from thread.
12862 (find_lwp_pid): Update, "entry" parameter is a
12863 struct thread_info * now.
12864 (linux_wait_for_lwp): Fetch pid from thread.
12865 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12866 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12867 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12868 (dequeue_one_deferred_signal): Ditto.
12869 (cancel_breakpoint): Fetch ptid from current_inferior.
12870 (linux_wait_for_event): Pass &all_threads to find_inferior,
12871 not &all_lwps. Fetch ptid, lwpid from thread.
12872 (count_events_callback): Update, "entry" parameter is a
12873 struct thread_info * now.
12874 (select_singlestep_lwp_callback): Ditto.
12875 (select_event_lwp_callback): Ditto.
12876 (cancel_breakpoints_callback): Ditto.
12877 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
12878 not &all_lwps.
12879 (select_event_lwp): Ditto. Fetch ptid from event_thread.
12880 (unsuspend_one_lwp): Update, "entry" parameter is a
12881 struct thread_info * now.
12882 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
12883 not &all_lwps.
12884 (linux_stabilize_threads): Ditto. And for for_each_inferior.
12885 Fetch lwpid from thread, not lwp.
12886 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
12887 Pass &all_threads to find_inferior, not &all_lwps.
12888 (send_sigstop): Fetch lwpid from thread, not lwp.
12889 (send_sigstop_callback): Update, "entry" parameter is a
12890 struct thread_info * now.
12891 (suspend_and_send_sigstop_callback): Ditto.
12892 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
12893 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
12894 struct thread_info * now.
12895 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
12896 from thread, lwp.
12897 (lwp_running): Update, "entry" parameter is a
12898 struct thread_info * now.
12899 (stop_all_lwps): Fetch ptid from thread.
12900 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
12901 (linux_resume_one_lwp): Fetch lwpid from thread.
12902 (linux_set_resume_request): Update, "entry" parameter is a
12903 struct thread_info * now. Fetch pid, lwpid from thread.
12904 (resume_status_pending_p): Update, "entry" parameter is a
12905 struct thread_info * now.
12906 (need_step_over_p): Ditto. Fetch lwpid from thread.
12907 (start_step_over): Fetch lwpid from thread.
12908 (linux_resume_one_thread): Update, "entry" parameter is a
12909 struct thread_info * now. Fetch lwpid from thread.
12910 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
12911 (proceed_one_lwp): Update, "entry" parameter is a
12912 struct thread_info * now. Fetch lwpid from thread.
12913 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
12914 struct thread_info * now.
12915 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
12916 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
12917 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
12918 directly.
12919 (regsets_store_inferior_registers): Ditto.
12920 (fetch_register, store_register): Ditto.
12921 (linux_read_memory, linux_write_memory): Ditto.
12922 (linux_request_interrupt): Ditto.
12923 (linux_read_auxv): Ditto.
12924 (linux_xfer_siginfo): Ditto.
12925 (linux_qxfer_spu): Ditto.
12926 (linux_qxfer_libraries_svr4): Ditto.
12927 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
12928 moved to inferiors.h.
12929 (get_lwp): Delete.
12930 (get_thread_lwp): Update.
12931 (struct lwp_info): Delete member "entry". Simplify comment for
12932 member "thread".
12933 (all_lwps): Delete.
12934 * linux-mips-low.c (mips_read_description): Fetch lwpid from
12935 current_inferior directly.
12936 (update_watch_registers_callback): Update, "entry" parameter is a
12937 struct thread_info * now. Fetch pid from thread.
12938 (mips_linux_prepare_to_resume): Fetch ptid from thread.
12939 (mips_insert_point): Fetch lwpid from current_inferior.
12940 Pass &all_threads to find_inferior, not &all_lwps.
12941 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
12942 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
12943 directly.
12944 (mips_stopped_data_address): Ditto.
12945 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
12946 directly.
12947 * linux-tile-low.c (tile_arch_setup): Ditto.
12948 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
12949 (update_debug_registers_callback): Update, "entry" parameter is a
12950 struct thread_info * now. Fetch pid from thread.
12951 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
12952 Pass &all_threads to find_inferior, not &all_lwps.
12953 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
12954 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
12955 Pass &all_threads to find_inferior, not &all_lwps.
12956 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
12957 (i386_dr_low_get_status): Ditto.
12958 (x86_linux_prepare_to_resume): Fetch ptid from thread.
12959 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
12960 (x86_linux_read_description): Ditto.
12961 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
12962
12963 2014-02-20 Doug Evans <dje@google.com>
12964
12965 * inferiors.c (get_first_inferior): Fix buglet.
12966
12967 2014-02-19 Doug Evans <dje@google.com>
12968
12969 * gdbthread.h (add_thread): Change result type to struct thread_info *.
12970 * inferiors.c (add_thread): Change result type to struct thread_info *.
12971 All callers updated.
12972 (add_lwp): Call add_thread here instead of in callers.
12973 All callers updated.
12974 * linux-low.h (get_lwp_thread): Rewrite.
12975 (struct lwp_info): New member "thread".
12976
12977 2014-02-19 Doug Evans <dje@google.com>
12978
12979 * linux-low.c (add_lwp): Change result to struct lwp_info *.
12980 All callers updated.
12981
12982 2014-02-19 Doug Evans <dje@google.com>
12983
12984 * inferiors.c (add_thread): Fix whitespace.
12985
12986 2014-02-19 Doug Evans <dje@google.com>
12987
12988 * dll.c (clear_dlls): Replace accessing list implemention details
12989 with API function.
12990 * gdbthread.h (get_first_thread): Declare.
12991 * inferiors.c (for_each_inferior_with_data): New function.
12992 (get_first_thread): New function.
12993 (find_thread_ptid): Simplify.
12994 (get_first_inferior): New function.
12995 (clear_list): Delete.
12996 (one_inferior_p): New function.
12997 (clear_inferior_list): New function.
12998 (clear_inferiors): Update.
12999 * inferiors.h (for_each_inferior_with_data): Declare.
13000 (clear_inferior_list): Declare.
13001 (one_inferior_p): Declare.
13002 (get_first_inferior): Declare.
13003 * linux-low.c (linux_wait_for_event): Replace accessing list
13004 implemention details with API function.
13005 * server.c (target_running): Ditto.
13006 (accumulate_file_name_length): New function.
13007 (emit_dll_description): New function.
13008 (handle_qxfer_libraries): Replace accessing list implemention
13009 details with API function.
13010 (handle_qxfer_threads_worker): New function.
13011 (handle_qxfer_threads_proper): Replace accessing list implemention
13012 details with API function.
13013 (handle_query): Ditto.
13014 (visit_actioned_threads_callback_ftype): New typedef.
13015 (visit_actioned_threads_data): New struct.
13016 (visit_actioned_threads): Rewrite to be find_inferior callback.
13017 (resume): Call find_inferior.
13018 (handle_status): Replace accessing list implemention
13019 details with API function.
13020 (process_serial_event): Replace accessing list implemention details
13021 with API function.
13022 * target.c (set_desired_inferior): Replace accessing list implemention
13023 details with API function.
13024 * tracepoint.c (same_process_p): New function.
13025 (gdb_agent_about_to_close): Replace accessing list implemention
13026 details with API function.
13027 * win32-low.c (child_delete_thread): Replace accessing list
13028 implemention details with API function.
13029 (match_dll_by_basename): New function.
13030 (dll_is_loaded_by_basename): New function.
13031 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13032 details call to dll_is_loaded_by_basename.
13033
13034 2014-02-19 Doug Evans <dje@google.com>
13035
13036 * dll.h (struct dll_info): Add comment.
13037 * gdbthread.h (struct thread_info): Add comment.
13038 (current_ptid): Simplify.
13039 * inferiors.c (add_process): Update.
13040 (remove_process): Update.
13041 * inferiors.h (struct process_info): Rename member "head" to "entry".
13042 * linux-low.c (delete_lwp): Update.
13043 (add_lwp): Update.
13044 (last_thread_of_process_p): Update.
13045 (kill_one_lwp_callback, linux_kill): Update.
13046 (status_pending_p_callback): Update.
13047 (wait_for_sigstop): Update. Simplify read of ptid.
13048 (start_step_over): Update.
13049 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13050 (get_lwp_thread): Update.
13051 (struct lwp_info): Rename member "head" to "entry".
13052 * regcache.h (inferior_list_entry): Delete.
13053 * server.c (kill_inferior_callback): Update.
13054 (detach_or_kill_inferior_callback): Update.
13055 (print_started_pid): Update.
13056 (print_attached_pid): Update.
13057 (process_serial_event): Simplify read of ptid.
13058 * thread-db.c (thread_db_create_event): Update.
13059 (thread_db_get_tls_address): Update.
13060 * win32-low.c (current_inferior_ptid): Simplify.
13061
13062 2014-02-19 Tom Tromey <tromey@redhat.com>
13063
13064 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13065 argument.
13066 (target_supports_btrace): Update.
13067
13068 2014-02-14 Yao Qi <yao@codesourcery.com>
13069
13070 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13071 (rsp-low-ipa.o): New target.
13072
13073 2014-02-12 Tom Tromey <tromey@redhat.com>
13074
13075 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13076 convert_ascii_to_int.
13077 * regcache.c (registers_to_string): Likewise.
13078 * remote-utils.c (decode_M_packet): Likewise.
13079 * server.c (process_serial_event): Likewise.
13080
13081 2014-02-12 Tom Tromey <tromey@redhat.com>
13082
13083 * server.c (handle_query, handle_v_run): Use hex2bin, not
13084 unhexify.
13085 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13086
13087 2014-02-12 Tom Tromey <tromey@redhat.com>
13088
13089 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13090 convert_int_to_ascii.
13091 * regcache.c (registers_to_string, collect_register_as_string):
13092 Likewise.
13093 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13094 Likewise.
13095 * server.c (process_serial_event): Likewise.
13096 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13097 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13098
13099 2014-02-12 Tom Tromey <tromey@redhat.com>
13100
13101 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13102 bin2hex, not hexify.
13103 * tracepoint.c (cmd_qtstatus): Likewise.
13104
13105 2014-02-12 Tom Tromey <tromey@redhat.com>
13106
13107 * remote-utils.c (monitor_output): Pass explicit length to
13108 hexify.
13109
13110 2014-02-12 Tom Tromey <tromey@redhat.com>
13111
13112 * tracepoint.c: Include rsp-low.h.
13113 * server.c: Include rsp-low.h.
13114 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13115 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13116 declare.
13117 * remote-utils.c: Include rsp-low.h.
13118 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13119 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13120 (convert_int_to_ascii, convert_ascii_to_int): Move to
13121 common/rsp-low.c.
13122 * regcache.c: Include rsp-low.h.
13123 * ax.c: Include rsp-low.h.
13124 * Makefile.in (SFILES): Add common/rsp-low.c.
13125 (OBS): Add rsp-low.o.
13126 (rsp-low.o): New target.
13127
13128 2014-02-12 Tom Tromey <tromey@redhat.com>
13129
13130 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13131 Include print-utils.h.
13132 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13133 (plongest, thirty_two, phex_nz): Remove.
13134 * Makefile.in (SFILES): Add common/print-utils.c.
13135 (OBS): Add print-utils.o.
13136 (print-utils-ipa.o): New target.
13137 (print-utils.o): New target.
13138 (IPA_OBJS): Add print-utils-ipa.o.
13139
13140 2014-02-06 Tom Tromey <tromey@redhat.com>
13141
13142 * Makefile.in (SFILES): Fix indentation.
13143
13144 2014-02-05 Doug Evans <dje@google.com>
13145
13146 * linux-low.c (linux_wait_for_event): Improve comment.
13147 (linux_wait_1): Keep current_inferior in sync with event_child.
13148
13149 2014-01-22 Doug Evans <dje@google.com>
13150
13151 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13152
13153 2014-01-22 Doug Evans <dje@google.com>
13154
13155 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13156 * configure: Regenerate.
13157 * config.in: Regenerate.
13158 * Makefile.in (SFILES): Add debug.c.
13159 (OBS): Add debug.o.
13160 * debug.c: New file.
13161 * debug.h: New file.
13162 * linux-aarch64-low.c (*): Update all debugging printfs to use
13163 debug_printf instead of fprintf.
13164 * linux-arm-low.c (*): Ditto.
13165 * linux-cris-low.c (*): Ditto.
13166 * linux-crisv32-low.c (*): Ditto.
13167 * linux-m32r-low.c (*): Ditto.
13168 * linux-sparc-low.c (*): Ditto.
13169 * linux-x86.c (*): Ditto.
13170 * linux-low.c (*): Ditto.
13171 (linux_wait_1): Add calls to debug_enter, debug_exit.
13172 (linux_wait): Remove redundant debugging printf.
13173 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13174 (linux_resume, unstop_all_lwps): Ditto.
13175 * mem-break.c (*): Update all debugging printfs to use
13176 debug_printf instead of fprintf.
13177 * remote-utils.c (*): Ditto.
13178 * thread-db.c (*): Ditto.
13179 * server.c #include <ctype.h>, "gdb_vecs.h".
13180 (debug_threads): Moved to debug.c.
13181 (*): Update all debugging printfs to use debug_printf instead of
13182 fprintf.
13183 (start_inferior): Replace call to fflush with call to debug_flush.
13184 (monitor_show_help): Mention set debug-format.
13185 (parse_debug_format_options): New function.
13186 (handle_monitor_command): Handle "monitor set debug-format".
13187 (gdbserver_usage): Mention --debug-format.
13188 (main): Parse --debug-format.
13189 * server.h (debug_threads): Declaration moved to debug.h.
13190 #include "debug.h".
13191 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13192 trace_debug_1 that uses debug_printf.
13193 (tracepoint_look_up_symbols): Update all debugging printfs to use
13194 debug_printf instead of fprintf.
13195
13196 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13197
13198 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13199 sys/ptrace.h.
13200
13201 2014-01-17 Pedro Alves <palves@redhat.com>
13202
13203 PR build/16445
13204 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13205 defined after including gdb_proc_service.h.
13206
13207 2014-01-16 Doug Evans <dje@google.com>
13208
13209 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13210 (match_dll): Use it.
13211
13212 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13213
13214 * target.h (target_ops) <read_btrace>: Change parameters and
13215 return type to allow error reporting.
13216 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13217 trace reading errors on.
13218 * linux-low.c (linux_low_read_btrace): Pass trace reading
13219 errors on.
13220 (linux_low_disable_btrace): New.
13221
13222 2014-01-15 Doug Evans <dje@google.com>
13223
13224 * inferiors.c (thread_id_to_gdb_id): Delete.
13225 * inferiors.h (thread_id_to_gdb_id): Delete.
13226
13227 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13228
13229 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13230 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13231 versions.
13232
13233 2014-01-08 Pedro Alves <palves@redhat.com>
13234
13235 * server.c (handle_status): Don't discard previous queued stop
13236 replies or thread's pending status here.
13237 (main) <disconnection>: Do it here instead.
13238
13239 2014-01-08 Pedro Alves <palves@redhat.com>
13240
13241 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13242 * server.c (visit_actioned_threads, handle_pending_status): New
13243 function.
13244 (handle_v_cont): Factor out parts to ...
13245 (resume): ... this new function. If in all-stop, and a thread
13246 being resumed has a pending status, report it without actually
13247 resuming.
13248 (myresume): Adjust to use the new 'resume' function.
13249 (clear_pending_status_callback, set_pending_status_callback)
13250 (find_status_pending_thread_callback): New functions.
13251 (handle_status): Handle the case of multiple threads having
13252 interesting statuses to report. Report threads' real last signal
13253 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13254 with an interesting thread to report the status for, instead of
13255 always reporting the status of the first thread.
13256
13257 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13258
13259 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13260 * gdbreplay.c (gdbreplay_version): Likewise.
13261
13262 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13263
13264 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13265 iov.iov_len with the real length in use.
13266
13267 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13268
13269 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13270 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13271 for all targets that use win32-low.c.
13272 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13273 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13274
13275 2013-12-13 Pedro Alves <palves@redhat.com>
13276
13277 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13278 if equal to TARGET_WAITKIND_LOADED.
13279 * win32-low.c (cached_status): New static global.
13280 (win32_wait): Add declaration.
13281 (do_initial_child_stuff): Flush all initial pending debug events
13282 up to the initial breakpoint.
13283 (win32_wait): If CACHED_STATUS was set, return that instead
13284 of doing a real wait. Remove the code resuming the execution
13285 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13286 during the initial phase. Also remove the code changing
13287 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13288 TARGET_WAITKIND_STOPPED.
13289
13290 2013-12-11 Yao Qi <yao@codesourcery.com>
13291
13292 * notif.c (handle_notif_ack): Return 0 if no notification
13293 matches.
13294
13295 2013-11-20 Doug Evans <dje@google.com>
13296
13297 * linux-low.c (linux_set_resume_request): Fix comment.
13298
13299 2013-11-20 Doug Evans <dje@google.com>
13300
13301 * linux-low.c (resume_status_pending_p): Tweak comment.
13302
13303 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13304
13305 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13306 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13307 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13308 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13309 (srv_amd64_regobj): Add amd64-mpx.o.
13310 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13311 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13312 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13313 * i387-fp.c (num_pl_bnd_register) Added constant.
13314 (num_pl_bnd_cfg_registers) Added constant.
13315 (struct i387_xsave) Added reserved area and MPX fields.
13316 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13317 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13318 function.
13319 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13320 (init_registers_amd64_mpx_linux): Declare new function.
13321 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13322 (x86_64_regmap): Add MPX registers.
13323 (x86_linux_read_description): Add MPX case.
13324 (initialize_low_arch): Initialize MPX targets.
13325
13326 2013-11-18 Tom Tromey <tromey@redhat.com>
13327
13328 * configure: Rebuild.
13329 * configure.ac: Don't check for stdlib.h.
13330 * gdbreplay.c: Unconditionally include stdlib.h.
13331
13332 2013-11-18 Tom Tromey <tromey@redhat.com>
13333
13334 * config.in: Rebuild.
13335 * configure: Rebuild.
13336 * configure.ac: Don't use AC_HEADER_DIRENT.
13337
13338 2013-11-18 Tom Tromey <tromey@redhat.com>
13339
13340 * server.h: Don't check HAVE_STRING_H.
13341 * gdbreplay.c: Don't check HAVE_STRING_H.
13342 * configure: Rebuild.
13343
13344 2013-11-18 Tom Tromey <tromey@redhat.com>
13345
13346 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13347 LIBGNU.
13348
13349 2013-11-08 Tom Tromey <tromey@redhat.com>
13350
13351 * configure, config.in: Rebuild.
13352 * configure.ac: Remove unused configury.
13353
13354 2013-11-08 Tom Tromey <tromey@redhat.com>
13355
13356 * acinclude.m4: Include common.m4, codeset.m4.
13357 * configure, config.in: Rebuild.
13358 * configure.ac: Use GDB_AC_COMMON.
13359
13360 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13361
13362 * linux-s390-low.c (HWCAP_S390_TE): New define.
13363 (s390_arch_setup): Consider the TE field in the HWCAP for
13364 determining 'have_regset_tdb'.
13365
13366 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13367
13368 PR gdb/16014
13369 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13370 call to sizeof.
13371
13372 2013-10-02 Pedro Alves <palves@redhat.com>
13373
13374 * server.c (process_serial_event): Don't output "GDBserver
13375 exiting" if GDB is connected through stdio.
13376 * target.c (mywait): Likewise, be silent if GDB is connected
13377 through stdio.
13378
13379 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13380
13381 * lynx-low.c (lynx_add_threads_after_attach): New function.
13382 (lynx_attach): Remove call to add_thread. Add call to
13383 lynx_add_threads_after_attach instead.
13384
13385 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13386
13387 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13388 * config.in, configure: Regenerated.
13389
13390 2013-09-18 Yao Qi <yao@codesourcery.com>
13391
13392 PR server/15959
13393 * server.c (start_inferior): Clear 'resume_info'.
13394
13395 2013-09-16 Jiong Wang <jiwang@tilera.com>
13396
13397 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13398 for each register.
13399
13400 2013-09-16 Jiong Wang <jiwang@tilera.com>
13401
13402 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13403 linux-tile-low.o to srv_tgtobj.
13404
13405 2013-09-16 Will Newton <will.newton@linaro.org>
13406
13407 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13408 out regs.
13409
13410 2013-09-06 Pedro Alves <palves@redhat.com>
13411
13412 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13413 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13414 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13415 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13416 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13417 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13418
13419 2013-09-06 Pedro Alves <palves@redhat.com>
13420
13421 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13422 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13423
13424 2013-09-06 Pedro Alves <palves@redhat.com>
13425
13426 * linux-amd64-ipa.c: Include tracepoint.h.
13427 * linux-i386-ipa.c: Include tracepoint.h.
13428
13429 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13430
13431 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13432 (ps_get_thread_area): New function.
13433
13434 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13435
13436 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13437 (initialize_low_arch): Call init_registers_crisv32 rather than
13438 init_register_crisv32.
13439
13440 2013-09-05 Pedro Alves <palves@redhat.com>
13441
13442 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13443 to ...
13444 * hostio.h: ... this new file.
13445 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13446 win32-low.c: Include hostio.h.
13447
13448 2013-09-05 Pedro Alves <palves@redhat.com>
13449
13450 * server.h (gdb_client_data, handler_func, callback_handler_func)
13451 (delete_file_handler, add_file_handler, append_callback_event)
13452 (delete_callback_event, start_event_loop, initialize_event_loop):
13453 Move to event-loop.h and include it.
13454 * event-loop.h: New file.
13455
13456 2013-09-05 Pedro Alves <palves@redhat.com>
13457
13458 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13459 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13460 (loaded_dll, unloaded_dll): Move to ...
13461 * dll.h: ... this new file.
13462 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13463
13464 2013-09-05 Pedro Alves <palves@redhat.com>
13465
13466 * server.h (current_process, get_thread_process, all_processes)
13467 (add_inferior_to_list, for_each_inferior, current_inferior)
13468 (remove_inferior, add_process, remove_process, find_process_pid)
13469 (have_started_inferiors_p, have_attached_inferiors_p)
13470 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13471 (clear_inferiors, find_inferior, find_inferior_id)
13472 (inferior_target_data, set_inferior_target_data)
13473 (inferior_regcache_data, set_inferior_regcache_data): Move to
13474 inferiors.h, and include it.
13475 * inferiors.h: New file.
13476
13477 2013-09-05 Pedro Alves <palves@redhat.com>
13478
13479 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13480 Move ...
13481 * ax.h: ... here.
13482
13483 2013-09-05 Pedro Alves <palves@redhat.com>
13484
13485 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13486 tracepoint.h.
13487 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13488 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13489 (handle_tracepoint_general_set, handle_tracepoint_query)
13490 (tracepoint_finished_step, tracepoint_was_hit)
13491 (release_while_stepping_state_list, current_traceframe)
13492 (in_readonly_region, traceframe_read_mem)
13493 (fetch_traceframe_registers, traceframe_read_sdata)
13494 (traceframe_read_info, struct fast_tpoint_collect_status)
13495 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13496 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13497 (supply_fast_tracepoint_registers)
13498 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13499 (ipa_tdesc, claim_trampoline_space)
13500 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13501 (agent_mem_read, agent_get_trace_state_variable_value)
13502 (agent_set_trace_state_variable_value, agent_tsv_read)
13503 (agent_mem_read_string, get_raw_reg_func_addr)
13504 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13505 * tracepoint.h: ... this new file.
13506
13507 2013-09-05 Pedro Alves <palves@redhat.com>
13508
13509 * server.h (perror_with_name, error, fatal, warning, paddress)
13510 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13511 include it.
13512 * utils.h: New file.
13513
13514 2013-09-05 Pedro Alves <palves@redhat.com>
13515
13516 * server.h (remote_debug, noack_mode, transport_is_reliable)
13517 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13518 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13519 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13520 (write_enn, initialize_async_io, enable_async_io)
13521 (disable_async_io, check_remote_input_interrupt_request)
13522 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13523 (dead_thread_notify, prepare_resume_reply)
13524 (decode_address_to_semicolon, decode_address, decode_m_packet)
13525 (decode_M_packet, decode_X_packet, decode_xfer_write)
13526 (decode_search_memory_packet, unhexify, hexify)
13527 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13528 (look_up_one_symbol, relocate_instruction)
13529 (monitor_output): Move to remote-utils.h, and include it.
13530 * remote-utils.h: New file.
13531
13532 2013-09-05 Pedro Alves <palves@redhat.com>
13533
13534 * server.h (_): Delete.
13535
13536 2013-09-02 Pedro Alves <palves@redhat.com>
13537
13538 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13539 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13540 allocated.
13541 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13542
13543 2013-09-02 Pierre Muller <muller@sourceware.org>
13544
13545 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13546 or WriteProcessMemory complete successfully and handle
13547 ERROR_PARTIAL_COPY error.
13548
13549 2013-09-02 Pedro Alves <palves@redhat.com>
13550
13551 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13552 error instead of EIO.
13553
13554 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13555
13556 PR server/15604
13557 * linux-low.c: Include filestuff.h.
13558 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13559 * lynx-low.c: Include filestuff.h.
13560 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13561 * server.c: Include filestuff.h.
13562 (main): Call notice_open_fds.
13563 * spu-low.c: Include filestuff.h.
13564 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13565
13566 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13567
13568 * Makefile.in: Explain why ../target and ../nat are not
13569 listed as include file search paths.
13570 (linux-waitpid.o): New object file rule.
13571 * configure.srv (srv_native_linux_obj): New variable.
13572 Replace all occurrences of linux native object files with
13573 $srv_native_linux_obj.
13574 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13575 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13576 (linux_enable_event_reporting): Remove declaration.
13577 (my_waitpid): Moved to common/linux-waitpid.c.
13578 (linux_wait_for_event): Pass ptid when calling
13579 linux_enable_event_reporting.
13580 (linux_supports_tracefork_flag): Remove.
13581 (linux_enable_event_reporting): Likewise.
13582 (linux_tracefork_grandchild): Remove.
13583 (STACK_SIZE): Moved to common/linux-ptrace.c.
13584 (linux_tracefork_child): Remove.
13585 (linux_test_for_tracefork): Remove.
13586 (linux_look_up_symbols): Call linux_supports_traceclone.
13587 (initialize_low): Remove call to linux_test_for_tracefork.
13588 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13589 common/linux-ptrace.h.
13590 (PTRACE_TYPE_ARG4): Likewise.
13591 Include linux-ptrace.h.
13592
13593 2013-08-21 Pedro Alves <palves@redhat.com>
13594
13595 * config.in: Renegerate.
13596
13597 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13598
13599 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13600 (SFILES): Remove $(srcdir)/common/target-common.c and
13601 add $(srcdir)/target/waitstatus.c.
13602 (OBS): Remove target-common.o and add waitstatus.o.
13603 (server_h): Remove $(srcdir)/../common/target-common.h and
13604 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13605 and $(srcdir)/../target/waitstatus.h.
13606 (target-common.o): Remove.
13607 (waitstatus.o): New target object file.
13608 * target.h: Do not include target-common.h and
13609 include target/resume.h, target/wait.h and
13610 target/waitstatus.h.
13611
13612 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13613
13614 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13615 to PTRACE_TYPE_ARG3.
13616 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13617 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13618 PTRACE_TYPE_ARG4.
13619 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13620 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13621
13622 2013-07-27 Jie Zhang <jie@codesourcery.com>
13623 Daniel Jacobowitz <dan@codesourcery.com>
13624 Yao Qi <yao@codesourcery.com>
13625
13626 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13627 (mips-linux-watch.o): New rule.
13628 (mips_linux_watch_h): New variable.
13629 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13630 srv_tgtobj.
13631 * linux-mips-low.c: Include mips-linux-watch.h.
13632 (struct arch_process_info, struct arch_lwp_info): New.
13633 (update_watch_registers_callback): New function.
13634 (mips_linux_new_process, mips_linux_new_thread) New functions.
13635 (mips_linux_prepare_to_resume, mips_insert_point): New
13636 functions.
13637 (mips_remove_point, mips_stopped_by_watchpoint): New
13638 functions.
13639 (rsp_bp_type_to_target_hw_bp_type): New function.
13640 (mips_stopped_data_address): New function.
13641 (the_low_target): Add watchpoint support functions.
13642
13643 2013-07-27 Yao Qi <yao@codesourcery.com>
13644
13645 * i386-low.c: Include break-common.h.
13646 (enum target_hw_bp_type): Remove.
13647
13648 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13649
13650 * Makefile.in (SFILES): /common/target-common.c.
13651 (OBS): Add target-common.o.
13652 (server_h): Add $(srcdir)/../common/target-common.h.
13653 (target-common.o): New target.
13654 * server.c (queue_stop_reply_callback): Free
13655 status string after use.
13656 * target.c (target_waitstatus_to_string): Remove.
13657 * target.h: Include target-common.h.
13658 (resume_kind): Likewise.
13659 (target_waitkind): Likewise.
13660 (target_waitstatus): Likewise.
13661 (TARGET_WNOHANG): Likewise.
13662
13663 2013-07-04 Yao Qi <yao@codesourcery.com>
13664
13665 * Makefile.in (host_alias): Use @host_noncanonical@.
13666 (target_alias): Use @target_noncanonical@.
13667 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13668 ACX_NONCANONICAL_HOST.
13669 * configure: Regenerated.
13670
13671 Revert:
13672 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13673
13674 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13675 * configure: Rebuild.
13676 * Makefile.in (version_host, version_target): Get from configure.
13677 (version.c): Use $(version_host) and $(version_target).
13678
13679 2013-07-03 Pedro Alves <palves@redhat.com>
13680
13681 * Makefile.in (config.status): Depend on development.sh.
13682 * acinclude.m4: Include libmcheck.m4.
13683 * configure: Regenerate.
13684
13685 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13686
13687 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13688 attribute inside the parentheses.
13689 (winapi_DebugSetProcessKillOnExit): Ditto.
13690 (winapi_DebugBreakProcess): Ditto.
13691 (winapi_GenerateConsoleCtrlEvent): Ditto.
13692
13693 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13694
13695 * notif.h (notif_event): Add a dummy member to avoid compiler
13696 errors.
13697
13698 2013-07-01 Pedro Alves <palves@redhat.com>
13699
13700 * hostio.c (HOSTIO_PATH_MAX): Define.
13701 (require_filename, handle_open, handle_unlink, handle_readlink):
13702 Use it.
13703
13704 2013-07-01 Pedro Alves <palves@redhat.com>
13705
13706 * server.h: Include "pathmax.h".
13707 * linux-low.c: Don't include sys/param.h.
13708 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13709 MAXPATHLEN.
13710 * win32-low.c: Don't include sys/param.h.
13711 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13712
13713 2013-07-01 Pedro Alves <palves@redhat.com>
13714
13715 * event-loop.c: Don't check HAVE_UNISTD_H before including
13716 <unistd.h>.
13717 * gdbreplay.c: Likewise.
13718 * remote-utils.c: Likewise.
13719 * server.c: Likewise.
13720 * configure.ac: Don't check for unistd.h.
13721 * configure: Regenerate.
13722
13723 2013-06-28 Tom Tromey <tromey@redhat.com>
13724
13725 * Makefile.in (version.c): Use version.in, not
13726 common/version.in.
13727
13728 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13729
13730 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13731 * configure: Rebuild.
13732 * Makefile.in (version_host, version_target): Get from configure.
13733 (version.c): Use $(version_host) and $(version_target).
13734
13735 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13736
13737 Fix trace-status to output user name without trailing colon.
13738 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13739
13740 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13741
13742 Fix trace-status to output proper start-time and stop-time.
13743 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13744 output start time and stop time in hex as gdb expects.
13745
13746 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13747
13748 * tracepoint.c (build_traceframe_info_xml): Output trace state
13749 variables present in the trace buffer.
13750
13751 2013-06-24 Tom Tromey <tromey@redhat.com>
13752
13753 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13754 create-version.sh.
13755 (version.o): Remove.
13756 * gdbreplay.c: Include version.h.
13757 (version, host_name): Don't declare.
13758 * server.h: Include version.h.
13759 (version, host_name): Don't declare.
13760
13761 2013-06-12 Pedro Alves <palves@redhat.com>
13762
13763 * linux-x86-low.c (linux_is_elf64): Delete global.
13764 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13765 with local linux_pid_exe_is_elf_64_file use.
13766
13767 2013-06-11 Pedro Alves <palves@redhat.com>
13768
13769 * linux-low.c (regset_disabled, disable_regset): New functions.
13770 (regsets_fetch_inferior_registers)
13771 (regsets_store_inferior_registers): Use them.
13772 (initialize_regsets_info); Don't allocate the disabled_regsets
13773 array here.
13774 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13775 comment.
13776
13777 2013-06-11 Pedro Alves <palves@redhat.com>
13778
13779 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13780 xmalloc.
13781
13782 2013-06-11 Pedro Alves <palves@redhat.com>
13783
13784 * linux-x86-low.c (initialize_low_arch): Call
13785 init_registers_x32_avx_linux.
13786
13787 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13788
13789 Fix compatibility with Android Bionic.
13790 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13791 it is not empty.
13792
13793 2013-06-07 Pedro Alves <palves@redhat.com>
13794
13795 PR server/14823
13796 * Makefile.in (OBS): Add tdesc.o.
13797 (IPA_OBJS): Add tdesc-ipa.o.
13798 (tdesc-ipa.o): New rule.
13799 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13800 interface.
13801 * linux-low.c (new_inferior): Delete.
13802 (disabled_regsets, num_regsets): Delete.
13803 (linux_add_process): Adjust to set the new per-process
13804 new_inferior flag.
13805 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13806 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13807 was a stop. When calling arch_setup, switch the current inferior
13808 to the thread that got an event.
13809 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13810 (regsets_fetch_inferior_registers)
13811 (regsets_store_inferior_registers): New regsets_info parameter.
13812 Adjust to use it.
13813 (linux_register_in_regsets): New regs_info parameter. Adjust to
13814 use it.
13815 (register_addr, fetch_register, store_register): New usrregs_info
13816 parameter. Adjust to use it.
13817 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13818 parameter regs_info. Adjust to use it.
13819 (linux_fetch_registers): Get the current inferior's regs_info, and
13820 adjust to use it.
13821 (linux_store_registers): Ditto.
13822 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13823 (initialize_low): Don't initialize the target_regsets here. Call
13824 initialize_low_arch.
13825 * linux-low.h (target_regsets): Delete declaration.
13826 (struct regsets_info): New.
13827 (struct usrregs_info): New.
13828 (struct regs_info): New.
13829 (struct process_info_private) <new_inferior>: New field.
13830 (struct linux_target_ops): Delete the num_regs, regmap, and
13831 regset_bitmap fields. New field regs_info.
13832 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13833 * i387-fp.c (num_xmm_registers): Delete.
13834 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13835 calls to new interface.
13836 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13837 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13838 Infer the number of xmm registers from the regcache's target
13839 description.
13840 * i387-fp.h (num_xmm_registers): Delete.
13841 * inferiors.c (add_thread): Don't install the thread's regcache
13842 here.
13843 * proc-service.c (gregset_info): Fetch the current inferior's
13844 regs_info. Adjust to use it.
13845 * regcache.c: Include tdesc.h.
13846 (register_bytes, reg_defs, num_registers)
13847 (gdbserver_expedite_regs): Delete.
13848 (get_thread_regcache): If the thread doesn't have a regcache yet,
13849 create one, instead of aborting gdbserver.
13850 (regcache_invalidate_one): Rename to ...
13851 (regcache_invalidate_thread): ... this.
13852 (regcache_invalidate_one): New.
13853 (regcache_invalidate): Only invalidate registers of the current
13854 process.
13855 (init_register_cache): Add target_desc parameter, and use it.
13856 (new_register_cache): Ditto. Assert the target description has a
13857 non zero registers_size.
13858 (regcache_cpy): Add assertions. Adjust.
13859 (realloc_register_cache, set_register_cache): Delete.
13860 (registers_to_string, registers_from_string): Adjust.
13861 (find_register_by_name, find_regno, find_register_by_number)
13862 (register_cache_size): Add target_desc parameter, and use it.
13863 (free_register_cache_thread, free_register_cache_thread_one)
13864 (regcache_release, register_cache_size): New.
13865 (register_size): Add target_desc parameter, and use it.
13866 (register_data, supply_register, supply_register_zeroed)
13867 (supply_regblock, supply_register_by_name, collect_register)
13868 (collect_register_as_string, collect_register_by_name): Adjust.
13869 * regcache.h (struct target_desc): Forward declare.
13870 (struct regcache) <tdesc>: New field.
13871 (init_register_cache, new_register_cache): Add target_desc
13872 parameter.
13873 (regcache_invalidate_thread): Declare.
13874 (regcache_invalidate_one): Delete declaration.
13875 (regcache_release): Declare.
13876 (find_register_by_number, register_cache_size, register_size)
13877 (find_regno): Add target_desc parameter.
13878 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
13879 declarations.
13880 * remote-utils.c: Include tdesc.h.
13881 (outreg, prepare_resume_reply): Adjust.
13882 * server.c: Include tdesc.h.
13883 (gdbserver_xmltarget): Delete declaration.
13884 (get_features_xml, process_serial_event): Adjust.
13885 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
13886 declare.
13887 (struct process_info) <tdesc>: New field.
13888 (ipa_tdesc): Declare.
13889 * tdesc.c: New file.
13890 * tdesc.h: New file.
13891 * tracepoint.c: Include tdesc.h.
13892 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
13893 (get_context_regcache): Adjust to pass ipa_tdesc down.
13894 (do_action_at_tracepoint): Adjust to get the register cache size
13895 from the context regcache's description.
13896 (traceframe_walk_blocks): Adjust to get the register cache size
13897 from the current trace frame's description.
13898 (traceframe_get_pc): Adjust to get current trace frame's
13899 description and pass it down.
13900 (gdb_collect): Adjust to get the register cache size from the
13901 IPA's description.
13902 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
13903 (gdbserver_xmltarget): Delete.
13904 (initialize_low_tracepoint): Set the ipa's target description.
13905 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
13906 (initialize_low_tracepoint): Set the ipa's target description.
13907 * linux-x86-low.c: Include tdesc.h.
13908 [__x86_64__] (is_64bit_tdesc): New.
13909 (ps_get_thread_area, x86_get_thread_area): Use it.
13910 (i386_cannot_store_register): Rename to ...
13911 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
13912 (i386_cannot_fetch_register): Rename to ...
13913 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
13914 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
13915 to new interface.
13916 (target_regsets): Rename to ...
13917 (x86_regsets): ... this.
13918 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
13919 interface.
13920 (x86_siginfo_fixup): Use is_64bit_tdesc.
13921 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
13922 (tdesc_x32_avx_linux, tdesc_x32_linux)
13923 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
13924 Declare.
13925 (x86_linux_update_xmltarget): Delete.
13926 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
13927 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
13928 (AMD64_LINUX_USER64_CS): New.
13929 (x86_linux_read_description): New, based on
13930 x86_linux_update_xmltarget.
13931 (same_process_callback): New.
13932 (x86_arch_setup_process_callback): New.
13933 (x86_linux_update_xmltarget): New.
13934 (x86_regsets_info): New.
13935 (amd64_linux_regs_info): New.
13936 (i386_linux_usrregs_info): New.
13937 (i386_linux_regs_info): New.
13938 (x86_linux_regs_info): New.
13939 (x86_arch_setup): Reimplement.
13940 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
13941 (x86_emit_ops): Ditto.
13942 (the_low_target): Adjust. Install x86_linux_regs_info,
13943 x86_cannot_fetch_register, and x86_cannot_store_register.
13944 (initialize_low_arch): New.
13945 * linux-ia64-low.c (tdesc_ia64): Declare.
13946 (ia64_fetch_register): Adjust.
13947 (ia64_usrregs_info, regs_info): New globals.
13948 (ia64_regs_info): New function.
13949 (the_low_target): Adjust.
13950 (initialize_low_arch): New function.
13951 * linux-sparc-low.c (tdesc_sparc64): Declare.
13952 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
13953 Adjust.
13954 (sparc_arch_setup): New function.
13955 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
13956 (the_low_target): Adjust.
13957 (initialize_low_arch): New function.
13958 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
13959 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
13960 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
13961 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
13962 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
13963 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
13964 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
13965 (tdesc_powerpc_isa205_vsx64l): Declare.
13966 (ppc_cannot_store_register, ppc_collect_ptrace_register)
13967 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
13968 (ppc_set_pc, ppc_get_hwcap): Adjust.
13969 (ppc_usrregs_info): Forward declare.
13970 (!__powerpc64__) ppc_regmap_adjusted: New global.
13971 (ppc_arch_setup): Adjust to the current process'es target
13972 description.
13973 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
13974 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
13975 (ppc_store_evrregset): Adjust.
13976 (target_regsets): Rename to ...
13977 (ppc_regsets): ... this, and make static.
13978 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
13979 (ppc_regs_info): New function.
13980 (the_low_target): Adjust.
13981 (initialize_low_arch): New function.
13982 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
13983 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
13984 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
13985 (tdesc_s390x_linux64v2): Declare.
13986 (s390_collect_ptrace_register, s390_supply_ptrace_register)
13987 (s390_fill_gregset, s390_store_last_break): Adjust.
13988 (target_regsets): Rename to ...
13989 (s390_regsets): ... this, and make static.
13990 (s390_get_pc, s390_set_pc): Adjust.
13991 (s390_get_hwcap): New target_desc parameter, and use it.
13992 [__s390x__] (have_hwcap_s390_high_gprs): New global.
13993 (s390_arch_setup): Adjust to set the current process'es target
13994 description. Don't adjust the regmap.
13995 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
13996 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
13997 (regs_info_3264): New globals.
13998 (s390_regs_info): New function.
13999 (the_low_target): Adjust.
14000 (initialize_low_arch): New function.
14001 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14002 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14003 [__mips64] (init_registers_mips_linux)
14004 (init_registers_mips_dsp_linux): Delete defines.
14005 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14006 (have_dsp): New global.
14007 (mips_read_description): New, based on mips_arch_setup.
14008 (mips_arch_setup): Reimplement.
14009 (get_usrregs_info): New function.
14010 (mips_cannot_fetch_register, mips_cannot_store_register)
14011 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14012 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14013 (target_regsets): Rename to ...
14014 (mips_regsets): ... this, and make static.
14015 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14016 (dsp_regs_info, regs_info): New globals.
14017 (mips_regs_info): New function.
14018 (the_low_target): Adjust.
14019 (initialize_low_arch): New function.
14020 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14021 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14022 Declare.
14023 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14024 (arm_read_description): New, with bits factored from
14025 arm_arch_setup.
14026 (arm_arch_setup): Reimplement.
14027 (target_regsets): Rename to ...
14028 (arm_regsets): ... this, and make static.
14029 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14030 (arm_regs_info): New function.
14031 (the_low_target): Adjust.
14032 (initialize_low_arch): New function.
14033 * linux-m68k-low.c (tdesc_m68k): Declare.
14034 (target_regsets): Rename to ...
14035 (m68k_regsets): ... this, and make static.
14036 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14037 (m68k_regs_info): New function.
14038 (m68k_arch_setup): New function.
14039 (the_low_target): Adjust.
14040 (initialize_low_arch): New function.
14041 * linux-sh-low.c (tdesc_sharch): Declare.
14042 (target_regsets): Rename to ...
14043 (sh_regsets): ... this, and make static.
14044 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14045 (sh_regs_info, sh_arch_setup): New functions.
14046 (the_low_target): Adjust.
14047 (initialize_low_arch): New function.
14048 * linux-bfin-low.c (tdesc_bfin): Declare.
14049 (bfin_arch_setup): New function.
14050 (bfin_usrregs_info, regs_info): New globals.
14051 (bfin_regs_info): New function.
14052 (the_low_target): Adjust.
14053 (initialize_low_arch): New function.
14054 * linux-cris-low.c (tdesc_cris): Declare.
14055 (cris_arch_setup): New function.
14056 (cris_usrregs_info, regs_info): New globals.
14057 (cris_regs_info): New function.
14058 (the_low_target): Adjust.
14059 (initialize_low_arch): New function.
14060 * linux-cris-low.c (tdesc_crisv32): Declare.
14061 (cris_arch_setup): New function.
14062 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14063 (cris_regs_info): New function.
14064 (the_low_target): Adjust.
14065 (initialize_low_arch): New function.
14066 * linux-m32r-low.c (tdesc_m32r): Declare.
14067 (m32r_arch_setup): New function.
14068 (m32r_usrregs_info, regs_info): New globals.
14069 (m32r_regs_info): Adjust.
14070 (initialize_low_arch): New function.
14071 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14072 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14073 (tic6x_usrregs_info): Forward declare.
14074 (tic6x_read_description): New function, based on ...
14075 (tic6x_arch_setup): ... this. Reimplement.
14076 (target_regsets): Rename to ...
14077 (tic6x_regsets): ... this, and make static.
14078 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14079 (tic6x_regs_info): New function.
14080 (the_low_target): Adjust.
14081 (initialize_low_arch): New function.
14082 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14083 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14084 (target_regsets): Rename to ...
14085 (xtensa_regsets): ... this, and make static.
14086 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14087 globals.
14088 (xtensa_arch_setup, xtensa_regs_info): New functions.
14089 (the_low_target): Adjust.
14090 (initialize_low_arch): New function.
14091 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14092 (nios2_arch_setup): Set the current process'es tdesc.
14093 (target_regsets): Rename to ...
14094 (nios2_regsets): ... this.
14095 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14096 (nios2_regs_info): New function.
14097 (the_low_target): Adjust.
14098 (initialize_low_arch): New function.
14099 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14100 (aarch64_arch_setup): Set the current process'es tdesc.
14101 (target_regsets): Rename to ...
14102 (aarch64_regsets): ... this.
14103 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14104 (aarch64_regs_info): New function.
14105 (the_low_target): Adjust.
14106 (initialize_low_arch): New function.
14107 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14108 globals.
14109 (target_regsets): Rename to ...
14110 (tile_regsets): ... this.
14111 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14112 (tile_regs_info): New function.
14113 (tile_arch_setup): Set the current process'es tdesc.
14114 (the_low_target): Adjust.
14115 (initialize_low_arch): New function.
14116 * spu-low.c (tdesc_spu): Declare.
14117 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14118 * win32-arm-low.c (tdesc_arm): Declare.
14119 (arm_arch_setup): New function.
14120 (the_low_target): Install arm_arch_setup instead of
14121 init_registers_arm.
14122 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14123 (init_windows_x86): Rename to ...
14124 (i386_arch_setup): ... this. Set `win32_tdesc'.
14125 (the_low_target): Adjust.
14126 * win32-low.c (win32_tdesc): New global.
14127 (child_add_thread): Don't create the thread cache here.
14128 (do_initial_child_stuff): Set the new process'es tdesc.
14129 * win32-low.h (struct target_desc): Forward declare.
14130 (win32_tdesc): Declare.
14131 * lynx-i386-low.c (tdesc_i386): Declare global.
14132 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14133 * lynx-low.c (lynx_tdesc): New global.
14134 (lynx_add_process): Set the new process'es tdesc.
14135 * lynx-low.h (struct target_desc): Forward declare.
14136 (lynx_tdesc): Declare global.
14137 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14138 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14139 * nto-low.c (nto_tdesc): New global.
14140 (do_attach): Set the new process'es tdesc.
14141 * nto-low.h (struct target_desc): Forward declare.
14142 (nto_tdesc): Declare.
14143 * nto-x86-low.c (tdesc_i386): Declare.
14144 (nto_x86_arch_setup): Set `nto_tdesc'.
14145
14146 2013-06-04 Gary Benson <gbenson@redhat.com>
14147
14148 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14149 to qSupported response when appropriate.
14150 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14151 with nonzero-length annex.
14152 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14153 arguments supplied in annex.
14154
14155 2013-05-31 Doug Evans <dje@google.com>
14156
14157 PR server/15594
14158 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14159 64 bits in 64-cross-32 environment.
14160
14161 2013-05-28 Pedro Alves <palves@redhat.com>
14162
14163 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14164 (aarch64-without-fpu.c): Delete rule.
14165 * configure.srv (aarch64*-*-linux*): Remove references to
14166 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14167 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14168 declaration.
14169
14170 2013-05-24 Pedro Alves <palves@redhat.com>
14171
14172 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14173 instead of strchr/decode_address. Error if the range isn't split
14174 with a ','. Don't assume there's be a ':' in the action.
14175
14176 2013-05-23 Yao Qi <yao@codesourcery.com>
14177 Pedro Alves <palves@redhat.com>
14178
14179 * linux-low.c (lwp_in_step_range): New function.
14180 (linux_wait_1): If the thread was range stepping and stopped
14181 outside the stepping range, report the stop to GDB. Otherwise,
14182 continue stepping. Add range stepping debug output.
14183 (linux_set_resume_request): Copy the step range from the resume
14184 request to the lwp.
14185 (linux_supports_range_stepping): New.
14186 (linux_target_ops) <supports_range_stepping>: Set to
14187 linux_supports_range_stepping.
14188 * linux-low.h (struct linux_target_ops)
14189 <supports_range_stepping>: New field.
14190 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14191 * linux-x86-low.c (x86_supports_range_stepping): New.
14192 (the_low_target) <supports_range_stepping>: Set to
14193 x86_supports_range_stepping.
14194 * server.c (handle_v_cont): Handle 'r' action.
14195 (handle_v_requests): Append ";r" if the target supports range
14196 stepping.
14197 * target.h (struct thread_resume) <step_range_start,
14198 step_range_end>: New fields.
14199 (struct target_ops) <supports_range_stepping>:
14200 New field.
14201 (target_supports_range_stepping): New macro.
14202
14203 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14204
14205 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14206 confusion in comment.
14207
14208 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14209
14210 * lynx-low.c (struct process_info_private): New type.
14211 (lynx_add_process): New function.
14212 (lynx_create_inferior, lynx_attach): Replace calls to
14213 add_process by calls to lynx_add_process.
14214 (lynx_resume): If PTID is null, then try using
14215 current_process()->private->last_wait_event_ptid.
14216 Add comments.
14217 (lynx_clear_inferiors): Delete. The contents of that function
14218 has been inlined in lynx_mourn;
14219 (lynx_wait_1): Save the ptid in the process's private data.
14220 (lynx_mourn): Free the process' private data. Replace call
14221 to lynx_clear_inferiors by call to clear_inferiors.
14222
14223 2013-05-17 Yao Qi <yao@codesourcery.com>
14224
14225 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14226 the right place.
14227
14228 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14229
14230 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14231 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14232 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14233 PT_TEXT_END_ADDR guards. Update comments.
14234 (linux_target_op) <read_offsets>: Conditionally define to
14235 linux_read_offsets if the target is UCLIBC and if it defines
14236 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14237
14238 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14239 Andrew Jenner <andrew@codesourcery.com>
14240
14241 * Makefile.in (SFILES): Add linux-nios2-low.c.
14242 (clean): Add action to delete nios2-linux.c.
14243 (nios2-linux.c): New rule.
14244 * configure.srv: Add nios2*-*-linux*.
14245 * linux-nios2-low.c: New.
14246
14247 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14248
14249 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14250
14251 2013-04-25 Hui Zhu <hui@codesourcery.com>
14252
14253 PR gdb/15186
14254 * ax.c (ax_printf): Add fflush.
14255
14256 2013-04-22 Tom Tromey <tromey@redhat.com>
14257
14258 * Makefile.in (SFILES): Add filestuff.c.
14259 (OBS): Add filestuff.o.
14260 (filestuff.o): New target.
14261 * config.in, configure: Rebuild.
14262 * configure.ac: Check for fdwalk, pipe2.
14263
14264 2013-04-17 Pedro Alves <palves@redhat.com>
14265
14266 * configure.ac (USE_THREAD_DB): Delete variable.
14267 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14268 Don't AC_SUBST USE_THREAD_DB.
14269 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14270 * config.in, configure: Regenerate.
14271
14272 2013-04-16 Pedro Alves <palves@redhat.com>
14273
14274 * linux-low.h (struct lwp_info) <thread_known>: Move under
14275 the USE_THREAD_DB #ifdef.
14276
14277 2013-04-16 Pedro Alves <palves@redhat.com>
14278
14279 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14280 (linux-low.o): Delete rule.
14281 * linux-low.h: Always include "gdb_thread_db.h" instead of
14282 conditionally including thread_db.h.
14283 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14284 HAVE_THREAD_DB_H.
14285
14286 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14287
14288 * Makefile.in (install-only): Fix make install regression.
14289
14290 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14291
14292 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14293 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14294 installation.
14295 * gdbserver.1: Remove.
14296
14297 2013-03-22 Pedro Alves <palves@redhat.com>
14298
14299 * linux-low.c (handle_extended_wait): Don't call
14300 linux_enable_event_reporting.
14301
14302 2013-03-15 Tony Theodore <tonyt@logyst.com>
14303
14304 PR build/9098:
14305 * Makefile.in (SHELL): Use @SHELL@.
14306
14307 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14308
14309 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14310 compiler warning.
14311
14312 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14313
14314 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14315 Remove extraneous NULL element.
14316
14317 2013-03-13 Yao Qi <yao@codesourcery.com>
14318
14319 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14320 'V' block in trace frame.
14321
14322 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14323
14324 * target.h (struct target_ops): Add btrace ops.
14325 (target_supports_btrace): New macro.
14326 (target_enable_btrace): New macro.
14327 (target_disable_btrace): New macro.
14328 (target_read_btrace): New macro.
14329 * gdbthread.h (struct thread_info): Add btrace field.
14330 * server.c: Include btrace-common.h.
14331 (handle_btrace_general_set): New function.
14332 (handle_btrace_enable): New function.
14333 (handle_btrace_disable): New function.
14334 (handle_general_set): Call handle_btrace_general_set.
14335 (handle_qxfer_btrace): New function.
14336 (struct qxfer qxfer_packets[]): Add btrace entry.
14337 * inferiors.c (remove_thread): Disable btrace.
14338 * linux-low: Include linux-btrace.h.
14339 (linux_low_enable_btrace): New function.
14340 (linux_low_read_btrace): New function.
14341 (linux_target_ops): Add btrace ops.
14342 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14343 Add srv_linux_btrace=yes.
14344 (x86_64-*-linux*): Add linux-btrace.o.
14345 Add srv_linux_btrace=yes.
14346 * configure.ac: Define HAVE_LINUX_BTRACE.
14347 * config.in: Regenerated.
14348 * configure: Regenerated.
14349
14350 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14351
14352 * server.c (handle_qxfer): Preserve error message if -3 is
14353 returned.
14354 (qxfer): Document the -3 return value.
14355
14356 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14357
14358 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14359 (linux_btrace_h): New variable.
14360 (linux-btrace.o): New rule.
14361
14362 2013-03-08 Stan Shebs <stan@codesourcery.com>
14363 Hafiz Abid Qadeer <abidh@codesourcery.com>
14364
14365 * tracepoint.c (trace_buffer_size): New global.
14366 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14367 (init_trace_buffer): Change to one-argument function. Allocate
14368 trace buffer memory.
14369 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14370 handle QTBuffer:size packet.
14371 (cmd_bigqtbuffer_size): New function.
14372 (initialize_tracepoint): Call init_trace_buffer with
14373 DEFAULT_TRACE_BUFFER_SIZE.
14374 * server.c (handle_query): Add QTBuffer:size in the
14375 supported packets.
14376
14377 2013-03-07 Yao Qi <yao@codesourcery.com>
14378
14379 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14380 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14381 of -1.
14382 (cmd_qtsp): Adjust condition. Do post increment.
14383 Set cur_action and cur_step_action back to 0.
14384
14385 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14386
14387 PR server/15236
14388 * linux-low.c (linux_write_memory): Return early success if LEN is
14389 zero.
14390
14391 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14392
14393 * configure.srv: Add x86_64-*-cygwin* as target.
14394
14395 2013-02-28 Tom Tromey <tromey@redhat.com>
14396
14397 * configure.ac: Invoke AC_SYS_LARGEFILE.
14398 * configure, config.in: Rebuild.
14399
14400 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14401
14402 * win32-low.c: Throughout, fix format strings and casts of
14403 printf-like functions to avoid type related warnings on all
14404 platforms.
14405 (get_child_debug_event): Print dwDebugEventCode as hex since
14406 that's how it's usually documented.
14407
14408 2013-02-28 Yao Qi <yao@codesourcery.com>
14409
14410 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14411 pulongest.
14412
14413 2013-02-27 Jiong Wang <jiwang@tilera.com>
14414
14415 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14416 (reg-tilegx32.c): New rule.
14417 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14418 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14419 different register info initializer according to elf class.
14420 (init_registers_tilgx32): New function. The tilegx32 register info
14421 initializer.
14422 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14423 (tile_store_gregset): Likewise.
14424
14425 2013-02-27 Yao Qi <yao@codesourcery.com>
14426
14427 * server.c (process_point_options): Print debug message when
14428 debug_threads is true.
14429
14430 2013-02-26 Yao Qi <yao@codesourcery.com>
14431
14432 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14433
14434 2013-02-19 Pedro Alves <palves@redhat.com>
14435 Kai Tietz <ktietz@redhat.com>
14436
14437 PR gdb/15161
14438
14439 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14440 instead of strtoul to extract address from packet.
14441 (process_serial_event) <'z'>: Likewise.
14442
14443 2013-02-18 Yao Qi <yao@codesourcery.com>
14444
14445 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14446
14447 2013-02-14 Pedro Alves <palves@redhat.com>
14448
14449 Plug memory leak.
14450
14451 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14452 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14453
14454 2013-02-14 Pedro Alves <palves@redhat.com>
14455
14456 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14457
14458 2013-02-14 Pedro Alves <palves@redhat.com>
14459
14460 * tracepoint.c (save_string): Delete.
14461 (add_tracepoint_action): Use savestring instead of save_string.
14462
14463 2013-02-12 Pedro Alves <palves@redhat.com>
14464
14465 * linux-xtensa-low.c: Ditto.
14466 * xtensa-xtregs.c: Ditto.
14467
14468 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14469
14470 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14471 thread_db.
14472
14473 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14474
14475 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14476 aarch64_num_wp_regs and aarch64_num_bp_regs to
14477 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14478
14479 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14480
14481 * linux-aarch64-low.c (ps_get_thread_area): Replace
14482 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14483
14484 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14485 Marcus Shawcroft <marcus.shawcroft@arm.com>
14486 Nigel Stephens <nigel.stephens@arm.com>
14487 Yufeng Zhang <yufeng.zhang@arm.com>
14488
14489 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14490 (aarch64.c, aarch64-without-fpu.c): New targets.
14491 * configure.srv (aarch64*-*-linux*): New.
14492 * linux-aarch64-low.c: New file.
14493
14494 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14495
14496 * linux-low.c (handle_extended_wait, linux_create_inferior)
14497 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14498 (dequeue_one_deferred_signal, linux_resume_one_thread)
14499 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14500 (linux_tracefork_grandchild, linux_test_for_tracefork)
14501 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14502 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14503 where the argument is 0.
14504
14505 2013-01-25 Yao Qi <yao@codesourcery.com>
14506
14507 * event-loop.c: Include "queue.h".
14508 (gdb_event_p): New typedef.
14509 (struct gdb_event) <next_event>: Remove.
14510 (event_queue): Change to QUEUE(gdb_event_p).
14511 (async_queue_event): Remove.
14512 (gdb_event_xfree): New.
14513 (initialize_event_loop): New.
14514 (process_event): Use API from QUEUE.
14515 (wait_for_event): Likewise.
14516 * server.c (main): Call initialize_event_loop.
14517 * server.h (initialize_event_loop): Declare.
14518
14519 2013-01-18 Yao Qi <yao@codesourcery.com>
14520
14521 * ax.h (struct eval_agent_expr_context): New.
14522 (gdb_eval_agent_expr): Update declaration.
14523 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14524 TFRAME. Add new argument CTX.
14525 * server.h (struct eval_agent_expr_context): Declare.
14526 (agent_mem_read, agent_tsv_read): Update declaration.
14527 (agent_mem_read_string): Likewise.
14528 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14529 (add_traceframe_block): Add new argument TPOINT.
14530 Increase TPOINT->traceframe_usage.
14531 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14532 eval_tracepoint_agent_expr.
14533 (condition_true_at_tracepoint): Likewise.
14534 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14535 (agent_mem_read_string, agent_tsv_read): Likewise.
14536
14537 2013-01-16 Yao Qi <yao@codesourcery.com>
14538
14539 * linux-low.c (linux_resume_one_lwp): Don't check
14540 'lwp->bp_reinsert != 0'.
14541
14542 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14543 Pedro Alves <palves@redhat.com>
14544
14545 * lynx-low.c (ptrace_request_to_str): Define a temporary
14546 macro and use it to simplify this function's implementation.
14547
14548 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14549
14550 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14551 sets errno.
14552
14553 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14554
14555 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14556
14557 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14558
14559 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14560
14561 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14562
14563 * lynx-low.c (lynx_resume): Use the resume_info parameter
14564 to determine the ptid for the lynx_ptrace call, unless
14565 it is equal to minus_one_ptid, in which case we use the
14566 ptid of the current_inferior.
14567 (lynx_wait_1): After having received a thread create/exit
14568 event, resume the inferior's execution using the signaling
14569 thread's ptid, rather than the old ptid.
14570
14571 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14572
14573 * lynx-low.c (lynx_resume): Delete variable ret.
14574
14575 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14576
14577 * gdbreplay.c (gdbreplay_version): Update copyright year.
14578 * server.c (gdbserver_version): Likewise.
14579
14580 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14581
14582 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14583 new thread.
14584
14585 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14586
14587 * lynx-low.c (ptrace_request_to_str): Add handling for
14588 PTRACE_GETTRACESIG.
14589
14590 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14591
14592 * lynx-low.c (lynx_attach): Delete variable new_process.
14593
14594 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14595
14596 * lynx-low.c (lynx_create_inferior): Delete variable
14597 new_process.
14598
14599 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14600
14601 * lynx-low.c (ptrace_request_to_str): Do not handle
14602 PTRACE_GETTHREADLIST if this macro does not exist.
14603
14604 2012-12-15 Yao Qi <yao@codesourcery.com>
14605
14606 * Makefile.in (OBS): Add notif.o.
14607 * notif.c, notif.h: New.
14608 * server.c: Include "notif.h".
14609 (struct vstop_notif) <next>: Remove.
14610 <base>: New field.
14611 (queue_stop_reply): Update.
14612 (push_event, send_next_stop_reply): Remove.
14613 (discard_queued_stop_replies): Update.
14614 (notif_stop): New variable.
14615 (handle_v_stopped): Remove.
14616 (handle_v_requests): Don't call handle_v_stopped. Call
14617 handle_ack_notif instead.
14618 (queue_stop_reply_callback): Call notif_event_enque instead
14619 of queue_stop_reply.
14620 (handle_status): Don't call send_next_stop_reply, call
14621 notif_write_event instead.
14622 (kill_inferior_callback): Likewise.
14623 (detach_or_kill_inferior_callback): Likewise.
14624 (main): Call initialize_notif.
14625 (process_serial_event): Call QUEUE_is_empty.
14626 (handle_target_event): Call notif_push instead of push event.
14627 * server.h (push_event): Remove declaration.
14628
14629 2012-12-10 Tom Tromey <tromey@redhat.com>
14630
14631 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14632 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14633 macros.
14634 (.c.o): Rewrite.
14635 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14636 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14637 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14638 (amd64-linux-ipa.o, ax.o): Rewrite.
14639 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14640 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14641 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14642 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14643 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14644 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14645 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14646 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14647 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14648 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14649 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14650 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14651 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14652 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14653 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14654 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14655 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14656 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14657 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14658 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14659 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14660 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14661 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14662 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14663 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14664 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14665 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14666 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14667 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14668 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14669 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14670 (reg-tilegx.o): Remove.
14671 (all_object_files): New macro.
14672 Include .deps files.
14673 * aclocal.m4, configure: Rebuild.
14674 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14675 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14676 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14677
14678 2012-12-05 Tom Tromey <tromey@redhat.com>
14679
14680 PR gdb/14917:
14681 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14682
14683 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14684
14685 * configure.ac: Check for linux/perf_event.h.
14686 * config.in: Regenerated.
14687 * configure: Regenerated.
14688
14689 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14690
14691 * hostio.c (handle_readlink): Decrease buffer size
14692 parameter passed to readlink by one byte.
14693
14694 2012-11-26 Yao Qi <yao@codesourcery.com>
14695
14696 * configure.ac (build_warnings): Append '-Wempty-body'.
14697 * configure: Regenerated.
14698 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14699 body.
14700
14701 2012-11-15 Pierre Muller <muller@sourceware.org>
14702
14703 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14704 * config.in: Regenerate.
14705 * configure: Regenerate.
14706 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14707 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14708 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14709 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14710 header.
14711 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14712 instead of <sys/wait.h> header.
14713 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14714
14715 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14716
14717 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14718 (various make rules): Remove -DGDBSERVER
14719
14720 2012-11-09 Yao Qi <yao@codesourcery.com>
14721
14722 * spu-low.c (current_ptid): Move it to ..
14723 * gdbthread.h: ... here. New.
14724 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14725 * server.c (myresume, process_serial_event): Likewise.
14726 * thread-db.c (thread_db_find_new_threads): Likewise.
14727 * tracepoint.c (run_inferior_command): Likewise.
14728
14729 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14730
14731 * server.c (handle_search_memory_1): Include access length in
14732 warning message.
14733
14734 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14735
14736 * linux-crisv32-low.c: Fix compile errors.
14737
14738 2012-09-04 Yao Qi <yao@codesourcery.com>
14739
14740 * tracepoint.c (cmd_qtsv): Adjust debug message.
14741 Don't check CUR_TPOINT.
14742
14743 2012-08-28 Yao Qi <yao@codesourcery.com>
14744
14745 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14746 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14747 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14748 Remove declarations of xmalloc, xreallloc, xstrdup and
14749 freeargv.
14750 * Makefile.in (libiberty_h): New.
14751 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14752 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14753
14754 2012-08-23 Yao Qi <yao@codesourcery.com>
14755
14756 * server.h: Remove declaration of 'xsnprintf'.
14757
14758 2012-08-22 Keith Seitz <keiths@redhat.com>
14759
14760 * server.h: Include build-gnulib-gbserver/config.h.
14761 * gdbreplay.c: Likewise.
14762
14763 2012-08-08 Doug Evans <dje@google.com>
14764
14765 * Makefile.in (SFILES): Add gdb_vecs.c.
14766 (OBS): Add gdb_vecs.o.
14767 (gdb_vecs_h, host_defs_h): New variables.
14768 (thread-db.o): Add $(gdb_vecs_h) dependency.
14769 (gdb_vecs.o): New rule.
14770 * thread-db.c: #include "gdb_vecs.h".
14771 (thread_db_load_search): Use a vector to iterate over path elements.
14772 Handle text appearing after "$pdir".
14773
14774 * configure.ac: Add check for strstr.
14775 * config.in: Regenerate.
14776 * configure: Regenerate.
14777
14778 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14779
14780 * hostio.c (handle_pread): If pread fails, fall back to attempting
14781 lseek/read.
14782 (handle_pwrite): Likewise for pwrite.
14783
14784 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14785
14786 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14787 between unsupported TYPE and unimplementable ADDR/LEN combination.
14788 (arm_insert_point): Act on new return value.
14789
14790 2012-07-31 Pedro Alves <palves@redhat.com>
14791
14792 * server.c (process_point_options): Only skip tokens if we find
14793 one that is unrecognized. Don't treat 'X' specially while
14794 skipping unrecognized tokens.
14795
14796 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14797
14798 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14799 to 4-byte-align HW breakpoint addresses for Thumb.
14800
14801 2012-07-27 Yao Qi <yao@codesourcery.com>
14802
14803 PR remote/14161.
14804
14805 * server.h: Declare gdb_agent_about_to_close.
14806 * target.c (kill_inferior): Include "agent.h".
14807 New. Send command 'kill'.
14808 * target.h (kill_inferior): Removed macro.
14809 * tracepoint.c (gdb_agent_about_to_close): New.
14810 (gdb_agent_helper_thread): Handle command 'close'.
14811 Wait endlessly until the inferior stops.
14812 Install gdb_agent_remove_socket to atexit hook.
14813 (agent_socket_name): New static variable.
14814 (gdb_agent_socket_init): Replace local variable 'name' with
14815 'agent_socket_name'.
14816 (gdb_agent_remove_socket): New.
14817
14818 2012-07-27 Yao Qi <yao@codesourcery.com>
14819
14820 * server.c (process_point_options): Stop at 'X' when parsing.
14821
14822 2012-07-19 Michael Eager <eager@eagercon.com>
14823
14824 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
14825 to hw_execute.
14826 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14827 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14828 hardware breakpoint.
14829
14830 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14831
14832 * gdbserver/linux-low.c (initialize_low): Call
14833 linux_ptrace_init_warnings.
14834
14835 2012-07-02 Doug Evans <dje@google.com>
14836
14837 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14838 pointer to int.
14839
14840 2012-07-02 Stan Shebs <stan@codesourcery.com>
14841
14842 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14843 (ax.o): Add it to build rule.
14844 (ax-ipa.o): Ditto.
14845 (OBS): Add format.o.
14846 (IPA_OBS): Add format.o.
14847 * server.c (handle_query): Claim support for breakpoint commands.
14848 (process_point_options): Add command case.
14849 (process_serial_event): Leave running if there are printfs in
14850 effect.
14851 * mem-break.h (any_persistent_commands): Declare.
14852 (add_breakpoint_commands): Declare.
14853 (gdb_no_commands_at_breakpoint): Declare.
14854 (run_breakpoint_commands): Declare.
14855 * mem-break.c (struct point_command_list): New struct.
14856 (struct breakpoint): New field command_list.
14857 (any_persistent_commands): New function.
14858 (add_commands_to_breakpoint): New function.
14859 (add_breakpoint_commands): New function.
14860 (gdb_no_commands_at_breakpoint): New function.
14861 (run_breakpoint_commands): New function.
14862 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14863 locally.
14864 * ax.c: Include format.h.
14865 (ax_printf): New function.
14866 (gdb_eval_agent_expr): Add printf opcode.
14867
14868 2012-06-13 Yao Qi <yao@codesourcery.com>
14869
14870 * server.c (start_inferior): Remove duplicated writes to fields
14871 'last_resume_kind' and 'last_status' of 'current_inferior'.
14872
14873 2012-06-12 Yao Qi <yao@codesourcery.com>
14874 Pedro Alves <palves@redhat.com>
14875
14876 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
14877 comment.
14878 * server.c (handle_v_cont): Extend comment.
14879
14880 2012-06-11 Yao Qi <yao@codesourcery.com>
14881
14882 * linux-low.c (linux_attach): Add 'static'.
14883
14884 2012-06-06 Yao Qi <yao@codesourcery.com>
14885
14886 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
14887
14888 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
14889
14890 Fix gcc -flto compilation warning.
14891 * server.c (main): Make variable multi_mode and attach volatile.
14892
14893 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14894
14895 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
14896 if the platform doesn't know about it.
14897
14898 2012-05-30 Jeff Kenton <jkenton@tilera.com>
14899
14900 * Makefile.in (SFILES): Add linux-tile-low.c.
14901 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
14902 * configure.srv: Handle tilegx-*-linux*.
14903 * linux-tile-low.c: New file.
14904
14905 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14906
14907 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
14908
14909 2012-05-24 Pedro Alves <palves@redhat.com>
14910
14911 PR gdb/7205
14912
14913 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
14914
14915 2012-05-24 Pedro Alves <palves@redhat.com>
14916
14917 PR gdb/7205
14918
14919 Replace target_signal with gdb_signal throughout.
14920
14921 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
14922
14923 * linux-low.c (linux_store_registers): Avoid the copying sequence
14924 when no data has been retrieved by ptrace.
14925
14926 2012-05-22 Will Deacon <will.deacon@arm.com>
14927
14928 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
14929 Include asm/ptrace.h.
14930 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
14931 already defined.
14932
14933 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
14934
14935 * linux-low.c (linux_store_registers): Don't re-retrieve data
14936 with ptrace that has already been obtained from /proc. Always
14937 copy any data retrieved with ptrace to the buffer supplied.
14938
14939 2012-05-11 Yao Qi <yao@codesourcery.com>
14940 Pedro Alves <palves@redhat.com>
14941
14942 * linux-low.c (enum stopping_threads_kind): New.
14943 (stopping_threads): Change type to `enum stopping_threads_kind'.
14944 (handle_extended_wait): If stopping and suspending threads, leave
14945 the new_lwp suspended too.
14946 (linux_wait_for_event): Adjust.
14947 (stop_all_lwps): Set `stopping_threads' to
14948 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
14949 whether we're suspending threads or just stopping them. Assert no
14950 recursion happens.
14951
14952 2012-04-29 Yao Qi <yao@codesourcery.com>
14953
14954 * server.h: Move some code to ...
14955 * gdbthread.h: ... here. New.
14956 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
14957 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
14958 (nto-low.o, win32-low.o): Likewise.
14959 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
14960 * regcache.c, remote-utils.c, server.c: Likewise.
14961 * target.c, tracepoint.c, win32-low.c: Likewise.
14962
14963 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
14964
14965 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
14966 (PTRACE_ARG4_TYPE): Likewise.
14967 (PTRACE_XFER_TYPE): Likewise.
14968 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
14969 ptrace to PTRACE_ARG3_TYPE.
14970 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
14971 (PTRACE_ARG4_TYPE): Likewise.
14972 (PTRACE_XFER_TYPE): Likewise.
14973 (linux_detach_one_lwp): Cast fourth argument of
14974 ptrace to long then PTRACE_ARG4_TYPE.
14975 (regsets_fetch_inferior_registers): Cast third argument of
14976 ptrace to long then PTRACE_ARG3_TYPE.
14977 (regsets_store_inferior_registers): Likewise.
14978
14979 2012-04-20 Pedro Alves <palves@redhat.com>
14980
14981 * configure: Regenerate.
14982
14983 2012-04-19 Pedro Alves <palves@redhat.com>
14984
14985 * Makefile.in (GNULIB_BUILDDIR): New.
14986 (LIBGNU, INCGNU, GNULIB_H): Adjust.
14987 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
14988 (all, install-only, uninstall, clean-info, all-lib, clean): No
14989 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
14990 (maintainer-clean realclean distclean): Use subdir_do.
14991 (subdir_do): New.
14992 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
14993 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
14994 * acinclude.m4: Include acx_configure_dir.m4.
14995 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
14996 calls. Call AC_PROG_RANLIB. Configure gnulib using
14997 ACX_CONFIGURE_DIR.
14998 (GNULIB): New.
14999 (GNULIB_STDINT_H): Adjust.
15000 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15001 * gdbreplay.c: Include build-gnulib/config.h.
15002 * server.h: Likewise.
15003 * aclocal.m4: Regenerate.
15004 * config.in: Regenerate.
15005 * configure: Regenerate.
15006
15007 2012-04-19 Pedro Alves <palves@redhat.com>
15008
15009 * Makefile.in (LIBGNU, INCGNU): Adjust.
15010 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15011 (all, install-only, uninstall, clean-info, all-lib, clean)
15012 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15013 * configure.ac: Adjust AC_OUTPUT output.
15014 * aclocal.m4: Regenerate.
15015 * configure: Regenerate.
15016
15017 2012-04-19 Pedro Alves <palves@redhat.com>
15018
15019 * Makefile.in (generated_files): New.
15020 (server_h): Remove the explicit dependency on config.h, and depend
15021 on $generated_files.
15022
15023 2012-04-19 Pedro Alves <palves@redhat.com>
15024
15025 * Makefile.in (INCGNU): Add -Ignulib.
15026
15027 2012-04-19 Pedro Alves <palves@redhat.com>
15028
15029 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15030 (INCGNU): ... this, and spell out -I here.
15031 (GNULIB_LIB): Rename to ...
15032 (LIBGNU): ... this.
15033 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15034
15035 2012-04-19 Pedro Alves <palves@redhat.com>
15036
15037 * config.in: Regenerate.
15038
15039 2012-04-19 Pedro Alves <palves@redhat.com>
15040
15041 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15042 * server.h (memmem): Remove declaration.
15043 * config.in: Regenerate.
15044 * configure: Regenerate.
15045
15046 2012-04-19 Yao Qi <yao@codesourcery.com>
15047
15048 * Makefile.in (SFILES): Add common/vec.c.
15049 (OBS): Add vec.o.
15050 (vec.o): New rule.
15051
15052 2012-04-19 Yao Qi <yao@codesourcery.com>
15053
15054 * remote-utils.c (prepare_resume_reply): Replace with macro
15055 target_core_of_thread.
15056 * server.c (handle_qxfer_threads_proper): Likewise.
15057 * target.h (traget_core_of_thread): New macro.
15058
15059 2012-04-18 Pedro Alves <palves@redhat.com>
15060
15061 * aclocal.m4: Regenerate.
15062 * configure: Regenerate.
15063
15064 2012-04-16 Yao Qi <yao@codesourcery.com>
15065
15066 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15067 duplicated on address.
15068
15069 2012-04-16 Yao Qi <yao@codesourcery.com>
15070
15071 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15072 (struct tracepoint_action_ops) <send>: New field.
15073 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15074 (agent_expr_send, x_tracepoint_action_send): New.
15075 (l_tracepoint_action_send): New.
15076 (cmd_qtdp): Download and install tracepoint
15077 according to `use_agent'.
15078 (run_inferior_command): Add one more parameter `len'.
15079 Update callers.
15080 (tracepoint_send_agent): New.
15081 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15082
15083 2012-04-16 Yao Qi <yao@codesourcery.com>
15084
15085 * tracepoint.c (download_tracepoints): Moved to ...
15086 (cmd_qtstart): ... here.
15087
15088 2012-04-14 Yao Qi <yao@codesourcery.com>
15089
15090 * tracepoint.c: Include inttypes.h.
15091 (struct collect_memory_action): Use sized types.
15092 (struct tracepoint): Likewise.
15093 (cmd_qtdp, stop_tracing): Update print specifiers.
15094 (cmd_qtp, response_tracepoint): Likewise.
15095 (collect_data_at_tracepoint): Likewise.
15096 (collect_data_at_step): Likewise.
15097
15098 2012-04-14 Yao Qi <yao@codesourcery.com>
15099
15100 Import gnulib module inttypes.
15101 * aclocal.m4, config.in, configure: Regenerated.
15102
15103 2012-04-14 Yao Qi <yao@codesourcery.com>
15104
15105 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15106 Makefile and config.status at last.
15107
15108 2012-04-13 Yao Qi <yao@codesourcery.com>
15109
15110 * tracepoint.c: Include stdint.h unconditionally.
15111
15112 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15113
15114 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15115 on BFD_HAVE_SYS_PROCFS_TYPE.
15116 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15117 * configure: Regenerate.
15118 * config.in: Likewise.
15119
15120 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15121
15122 * Makefile.in (clean): Also remove x32.c x32-linux.c
15123 x32-avx.c x32-avx-linux.c.
15124 (x32.o): New target.
15125 (x32.c): Likewise.
15126 (x32-linux.o): Likewise.
15127 (x32-linux.c): Likewise.
15128 (x32-avx.o): Likewise.
15129 (x32-avx.c): Likewise.
15130 (x32-avx-linux.o): Likewise.
15131 (x32-avx-linux.c): Likewise.
15132
15133 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15134 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15135 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15136 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15137 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15138 i386/x32-avx-linux.xml.
15139
15140 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15141 (init_registers_x32_avx_linux): Likwise.
15142 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15143 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15144
15145 2012-04-13 Pedro Alves <palves@redhat.com>
15146
15147 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15148 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15149 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15150 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15151 the sub-make.
15152
15153 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15154
15155 * linux-x86-low.c (compat_x32_clock_t): New.
15156 (compat_x32_siginfo_t): Likewise.
15157 (compat_x32_siginfo_from_siginfo): Likewise.
15158 (siginfo_from_compat_x32_siginfo): Likewise.
15159 (linux_is_elf64): Likewise.
15160 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15161 and siginfo_from_compat_x32_siginfo for x32.
15162 (x86_arch_setup): Set linux_is_elf64.
15163
15164 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15165
15166 PR gdb/13969
15167 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15168 e_machine field.
15169 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15170 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15171 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15172 compatible with process.
15173
15174 2012-04-12 Yao Qi <yao@codesourcery.com>
15175
15176 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15177 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15178 (install-only, install-info, clean): Handle sub dir gnulib.
15179 (all-lib, am--refresh): New targets.
15180 (memmem.o): Remove target.
15181 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15182 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15183 (AC_REPLACE_FUNCS): Remove memmem.
15184 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15185 (AC_OUTPUT): Generate Makefile in gnulib/.
15186 * aclocal.m4, config.in, configure: Regenerated.
15187
15188 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15189
15190 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15191
15192 2012-04-05 Pedro Alves <palves@redhat.com>
15193
15194 -Werror=strict-aliasing
15195
15196 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15197 pointer.
15198
15199 2012-04-04 Pedro Alves <palves@redhat.com>
15200
15201 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15202 (sparc_store_gregset_from_stack, sparc_store_gregset)
15203 (sparc_breakpoint_at): Fix formatting.
15204
15205 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15206
15207 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15208 are available.
15209 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15210 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15211 * config.in: Regenerate.
15212 * configure: Likewise.
15213
15214 2012-03-29 Pedro Alves <palves@redhat.com>
15215
15216 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15217 Correct ptrace arguments.
15218
15219 2012-03-28 Pedro Alves <palves@redhat.com>
15220
15221 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15222 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15223 (IA64_FR1_REGNUM): New defines.
15224 (ia64_fetch_register): New.
15225 (the_low_target): Install it.
15226 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15227 field.
15228 * linux-low.c (linux_fetch_registers): Try the
15229 the_low_target.fetch_register hook first.
15230
15231 * linux-arm-low.c (the_low_target): Adjust.
15232 * linux-bfin-low.c (the_low_target): Adjust.
15233 * linux-cris-low.c (the_low_target): Adjust.
15234 * linux-crisv32-low.c (the_low_target): Adjust.
15235 * linux-m32r-low.c (the_low_target): Adjust.
15236 * linux-m68k-low.c (the_low_target): Adjust.
15237 * linux-mips-low.c (the_low_target): Adjust.
15238 * linux-ppc-low.c (the_low_target): Adjust.
15239 * linux-s390-low.c (the_low_target): Adjust.
15240 * linux-sh-low.c (the_low_target): Adjust.
15241 * linux-sparc-low.c (the_low_target): Adjust.
15242 * linux-tic6x-low.c (the_low_target): Adjust.
15243 * linux-x86-low.c (the_low_target): Adjust.
15244 * linux-xtensa-low.c (the_low_target): Adjust.
15245
15246 2012-03-26 Pedro Alves <palves@redhat.com>
15247
15248 * server.c (handle_qxfer_libraries): Don't bail early if
15249 the_target->qxfer_libraries_svr4 is not NULL.
15250
15251 2012-03-26 Pedro Alves <palves@redhat.com>
15252
15253 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15254
15255 2012-03-23 Pedro Alves <palves@redhat.com>
15256
15257 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15258 "library-list-svr4" element's start tag when the the DSO list is
15259 empty.
15260
15261 2012-03-23 Pedro Alves <palves@redhat.com>
15262
15263 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15264 a variable whose type size is the same as the inferior's pointer
15265 size.
15266
15267 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15268
15269 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15270 struct siginfo.
15271 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15272 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15273 * linux-low.h: Include <signal.h>.
15274 (struct siginfo): Remove forward declaration.
15275 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15276 struct siginfo.
15277
15278 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15279
15280 * .gitignore: Ignore more files.
15281
15282 2012-03-19 Pedro Alves <palves@redhat.com>
15283 Jan Kratochvil <jan.kratochvil@redhat.com>
15284
15285 * server.c (cont_thread, general_thread): Add describing comments.
15286 (start_inferior): Clear `cont_thread'.
15287 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15288 of a process.
15289
15290 2012-03-15 Yao Qi <yao@codesourcery.com>
15291
15292 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15293 handling to ...
15294 (cmd_qtdp): ... here.
15295
15296 2012-03-15 Yao Qi <yao@codesourcery.com>
15297
15298 * tracepoint.c (struct tracepoint_action_ops): New.
15299 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15300 (m_tracepoint_action_download): New.
15301 (r_tracepoint_action_download): New.
15302 (x_tracepoint_action_download): New.
15303 (l_tracepoint_action_download): New.
15304 (add_tracepoint_action): Install `action->ops' according type.
15305 (download_tracepoint_1): Move code `download' function pointer
15306 of various tracepoint_action_ops.
15307
15308 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15309
15310 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15311 linux_ptrace_attach_warnings.
15312
15313 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15314
15315 * Makefile.in (linux-ptrace.o): New.
15316 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15317 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15318 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15319 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15320 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15321 of these targets.
15322 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15323
15324 2012-03-08 Yao Qi <yao@codesourcery.com>
15325 Pedro Alves <palves@redhat.com>
15326
15327 Fix PR server/13392.
15328 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15329 offset of JMP insn.
15330 * tracepoint.c (remove_tracepoint): New.
15331 (cmd_qtdp): Call remove_tracepoint when failed to install.
15332
15333 2012-03-07 Pedro Alves <palves@redhat.com>
15334
15335 * linux-low.c (get_detach_signal): New.
15336 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15337 Pass on pending signals to PTRACE_DETACH. Check the result of the
15338 ptrace call.
15339 * server.c (program_signals, program_signals_p): New.
15340 (handle_general_set): Handle QProgramSignals.
15341 * server.h (program_signals, program_signals_p): Declare.
15342
15343 2012-03-05 Pedro Alves <palves@redhat.com>
15344 Jan Kratochvil <jan.kratochvil@redhat.com>
15345
15346 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15347 New comment why.
15348
15349 2012-03-03 Yao Qi <yao@codesourcery.com>
15350
15351 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15352 agent_look_up_symbols.
15353
15354 2012-03-03 Yao Qi <yao@codesourcery.com>
15355
15356 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15357 (linux-x86-low.o): Likewise.
15358 * server.h: Remove in_process_agent_loaded.
15359 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15360 common/agent.c.
15361 Update callers.
15362
15363 2012-03-03 Yao Qi <yao@codesourcery.com>
15364
15365 * tracepoint.c (gdb_agent_capability): New global.
15366 (in_process_agent_loaded_ust): Renamed to
15367 `in_process_agent_supports_ust'.
15368 Update callers.
15369 (in_process_agent_supports_ust): Call agent_capability_check.
15370 (clear_installed_tracepoints): Assert that agent supports
15371 agent.
15372
15373 2012-03-03 Yao Qi <yao@codesourcery.com>
15374
15375 * linux-low.c (linux_supports_agent): New.
15376 (linux_target_ops): Initialize field `supports_agent' with
15377 linux_supports_agent.
15378 * target.h (struct target_ops) <supports_agent>: New.
15379 (target_supports_agent): New macro.
15380 * server.c (handle_general_set): Handle packet 'QAgent'.
15381 (handle_query): Send `QAgent+'.
15382 * Makefile.in (server.o): Depends on agent.h.
15383
15384 2012-03-03 Yao Qi <yao@codesourcery.com>
15385
15386 * Makefile.in (OBS): Add agent.o.
15387 Add new rule for agent.o.
15388 Track dependence of tracepoint.c on agent.h.
15389 * tracepoint.c (run_inferior_command_1):
15390 (run_inferior_command): Call agent_run_command.
15391 (gdb_ust_connect_sync_socket): Deleted. Move it to
15392 common/agent.c.
15393 (resume_thread, stop_thread): Likewise.
15394 (gdb_ust_socket_init): Renamed to ...
15395 (gdb_agent_socket_init): ... New.
15396 (gdb_ust_thread): Renamed to ...
15397 (gdb_agent_helper_thread): ... New.
15398 (gdb_ust_init): Move some code to ...
15399 (gdb_agent_init): ... here. New.
15400 [HAVE_UST]: Call gdb_ust_init.
15401 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15402 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15403 * config.in, configure: Regenerated.
15404
15405 2012-03-02 Pedro Alves <palves@redhat.com>
15406
15407 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15408 * linux-low.c (struct simple_pid_list): New.
15409 (stopped_pids): New a struct simple_pid_list pointer.
15410 (add_to_pid_list, pull_pid_from_list): New.
15411 (handle_extended_wait): Don't assume the first signal new children
15412 report is SIGSTOP. Adjust call to pull_pid_from_list.
15413 (linux_wait_for_lwp): Adjust.
15414
15415 2012-03-02 Yao Qi <yao@codesourcery.com>
15416
15417 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15418 debug log.
15419
15420 2012-03-02 Yao Qi <yao@codesourcery.com>
15421
15422 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15423 `stop_pc' and `tpoint'. Update caller.
15424
15425 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15426
15427 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15428 * linux-low.c (use_linux_regsets): New macro.
15429 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15430 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15431 (linux_register_in_regsets): New function.
15432 (usr_fetch_inferior_registers): Skip registers covered by
15433 regsets.
15434 (usr_store_inferior_registers): Likewise.
15435 (usr_fetch_inferior_registers): New macro.
15436 (usr_store_inferior_registers): Likewise.
15437 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15438 (linux_store_registers): Likewise.
15439 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15440 prototype.
15441 (init_registers_mips64_dsp_linux): Likewise.
15442 (init_registers_mips_linux): New macro.
15443 (init_registers_mips_dsp_linux): Likewise.
15444 (mips_dsp_num_regs): Likewise.
15445 (DSP_BASE, DSP_CONTROL): New fallback macros.
15446 (mips_base_regs): New macro.
15447 (mips_regmap): Use it. Fix the size.
15448 (mips_dsp_regmap): New variable.
15449 (mips_dsp_regset_bitmap): Likewise.
15450 (mips_arch_setup): New function.
15451 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15452 than mips_regmap.
15453 (mips_cannot_store_register): Likewise.
15454 (the_low_target): Update .arch_setup, .num_regs and .regmap
15455 initializers. Add .regset_bitmap initializer.
15456 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15457 initializer.
15458 * linux-bfin-low.c (the_low_target): Likewise.
15459 * linux-cris-low.c (the_low_target): Likewise.
15460 * linux-crisv32-low.c (the_low_target): Likewise.
15461 * linux-ia64-low.c (the_low_target): Likewise.
15462 * linux-m32r-low.c (the_low_target): Likewise.
15463 * linux-m68k-low.c (the_low_target): Likewise.
15464 * linux-ppc-low.c (the_low_target): Likewise.
15465 * linux-s390-low.c (the_low_target): Likewise.
15466 * linux-sh-low.c (the_low_target): Likewise.
15467 * linux-sparc-low.c (the_low_target): Likewise.
15468 * linux-tic6x-low.c (the_low_target): Likewise.
15469 * linux-x86-low.c (the_low_target): Likewise.
15470 * linux-xtensa-low.c (the_low_target): Likewise.
15471 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15472 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15473 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15474 srv_xmlfiles.
15475 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15476 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15477
15478 2012-02-29 Yao Qi <yao@codesourcery.com>
15479 Pedro Alves <palves@redhat.com>
15480
15481 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15482 `step_over_finished' is true.
15483
15484 2012-02-27 Pedro Alves <palves@redhat.com>
15485
15486 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15487 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15488
15489 2012-02-27 Pedro Alves <palves@redhat.com>
15490
15491 PR server/9684
15492 * linux-low.c (pid_is_stopped): New.
15493 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15494
15495 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15496
15497 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15498 of conditions.
15499
15500 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15501
15502 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15503
15504 2012-02-24 Luis Machado <lgustavo@codesourcery>
15505
15506 * server.c (handle_query): Advertise support for target-side
15507 breakpoint condition evaluation.
15508 (process_point_options): New function.
15509 (process_serial_event): When inserting a breakpoint, check for
15510 a target-side condition that should be evaluated.
15511
15512 * mem-break.c: Include regcache.h and ax.h.
15513 (point_cond_list_t): New data structure.
15514 (breakpoint) <cond_list>: New field.
15515 (find_gdb_breakpoint_at): Make non-static.
15516 (delete_gdb_breakpoint_at): Clear any target-side
15517 conditions.
15518 (clear_gdb_breakpoint_conditions): New function.
15519 (add_condition_to_breakpoint): Likewise.
15520 (add_breakpoint_condition): Likewise.
15521 (gdb_condition_true_at_breakpoint): Likewise.
15522 (gdb_breakpoint_here): Return result directly instead
15523 of going through a local variable.
15524
15525 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15526 (clear_gdb_breakpoint_conditions): Likewise.
15527 (add_breakpoint_condition): Likewise.
15528 (gdb_condition_true_at_breakpoint): Likewise.
15529
15530 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15531 (need_step_over_p): Take target-side breakpoint condition into
15532 consideration.
15533
15534 2012-02-24 Luis Machado <lgustavo@codesourcery>
15535
15536 * server.h: Include tracepoint.h.
15537 (agent_mem_read, agent_get_trace_state_variable_value,
15538 agent_set_trace_state_variable_value,
15539 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15540 get_set_tsv_func_addr): New prototypes.
15541
15542 * ax.h: New include file.
15543 * ax.c: New source file.
15544
15545 * tracepoint.c: Include ax.h.
15546 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15547 agent_expr, eval_result_type): Move to ax.h.
15548 (parse_agent_expr): Rename to ...
15549 (gdb_parse_agent_expr): ... this, make it non-static and move
15550 to ax.h.
15551 (unparse_agent_expr) Rename to ...
15552 (gdb_unparse_agent_expr): ... this, make it non-static and move
15553 to ax.h.
15554 (eval_agent_expr): Rename to ...
15555 (eval_tracepoint_agent_expr): ... this.
15556 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15557 forward declarations.
15558 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15559 (agent_get_trace_state_variable_value): New function.
15560 (agent_set_trace_state_variable_value): New function.
15561 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15562 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15563 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15564 (condition_true_at_tracepoint): Likewise.
15565 (parse_agent_expr): Rename to ...
15566 (gdb_parse_agent_expr): ... this and move to ax.c.
15567 (unparse_agent_expr): Rename to ...
15568 (gdb_unparse_agent_expr): ... this and move to ax.c.
15569 (gdb_agent_op_name): Move to ax.c.
15570 (eval_agent_expr): Rename to ...
15571 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15572 and move to ax.c.
15573 (eval_tracepoint_agent_expr): New function.
15574 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15575 non-static.
15576 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15577 ax.c.
15578 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15579 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15580 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15581 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15582 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15583 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15584 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15585 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15586 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15587 (compile_bytecodes): Remove forward declaration.
15588 (is_goto_target): Move to ax.c.
15589 (compile_bytecodes): Move to ax.c and call
15590 agent_get_trace_state_variable_value (...) and
15591 agent_set_trace_state_variable_value (...).
15592
15593 * Makefile.in: Update ax.c and IPA dependencies.
15594
15595 2012-02-24 Pedro Alves <palves@redhat.com>
15596
15597 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15598 (cmd_bigqtbuffer_circular): ... this. Only handle
15599 'QTBuffer:circular:'.
15600 (handle_tracepoint_general_set): Adjust.
15601
15602 2012-02-16 Yao Qi <yao@codesourcery.com>
15603
15604 * inferiors.c: Move code to ...
15605 * dll.c: .... here. New.
15606 * server.h: Declare clear_dlls.
15607 * Makefile.in (SFILES): Add dll.c.
15608 (OBS): Add dll.o
15609 (dll.o): New rule.
15610
15611 2012-02-11 Yao Qi <yao@codesourcery.com>
15612
15613 * server.c: (handle_monitor_command): Add a new parameter
15614 `own_buf'.
15615 (handle_query): Update caller.
15616
15617 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15618
15619 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15620 * configure, config.in: Regenerate.
15621 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15622 is not defined.
15623
15624 2012-02-02 Pedro Alves <palves@redhat.com>
15625
15626 Try SIGKILL first, then PTRACE_KILL.
15627 * linux-low.c (linux_kill_one_lwp): New.
15628 (linux_kill_one_lwp): Rename to ...
15629 (kill_one_lwp_callback): ... this. Use the new
15630 linux_kill_one_lwp.
15631
15632 2012-02-02 Pedro Alves <palves@redhat.com>
15633
15634 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15635 inferior.
15636
15637 2012-01-27 Pedro Alves <palves@redhat.com>
15638
15639 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15640 (elf_64_file_p): Make static.
15641 (linux_pid_exe_is_elf_64_file): New.
15642 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15643 Delete declarations.
15644 (linux_pid_exe_is_elf_64_file): Declare.
15645 * linux-x86-low.c (x86_arch_setup): Use
15646 linux_pid_exe_is_elf_64_file.
15647
15648 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15649
15650 * linux-low.c (linux_wait_for_event_1): Rename to ...
15651 (linux_wait_for_event): ... here and merge it with former
15652 linux_wait_for_event - new variable wait_ptid, use it.
15653 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15654
15655 2012-01-23 Pedro Alves <palves@redhat.com>
15656
15657 * server.c (main): Avoid yet another case of infinite loop while
15658 detaching/killing after a longjmp.
15659
15660 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15661
15662 Code cleanup.
15663 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15664
15665 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15666
15667 * hostio.c (handle_readlink): New function.
15668 (handle_vFile): Call it to handle "vFile:readlink" packets.
15669
15670 2012-01-20 Pedro Alves <palves@redhat.com>
15671 Ulrich Weigand <ulrich.weigand@linaro.org>
15672
15673 * server.c (handle_v_requests): Only support vAttach and vRun to
15674 start multiple processes when in extended protocol mode.
15675
15676 2012-01-17 Pedro Alves <palves@redhat.com>
15677
15678 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15679 memalign plus mprotect to allocate the scratch buffer.
15680
15681 2012-01-13 Pedro Alves <palves@redhat.com>
15682
15683 * server.c (attach_inferior): Clear `cont_thread'.
15684
15685 2012-01-13 Pedro Alves <palves@redhat.com>
15686
15687 * server.c (main): Avoid infinite loop while detaching/killing
15688 after a longjmp.
15689
15690 2012-01-09 Doug Evans <dje@google.com>
15691
15692 * server.c (start_inferior): Set last_ptid in --wrapper case.
15693
15694 2012-01-06 Yao Qi <yao@codesourcery.com>
15695
15696 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15697 defined.
15698 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15699
15700 2012-01-04 Yao Qi <yao@codesourcery.com>
15701
15702 * tracepoint.c (cmd_qtdp): Print debug message
15703 for static tracepoint.
15704
15705 2012-01-04 Yao Qi <yao@codesourcery.com>
15706
15707 * tracepoint.c (trace_vdebug): Differentiate debug message
15708 between gdbserver and IPA.
15709
15710 2012-01-03 Yao Qi <yao@codesourcery.com>
15711
15712 * tracepoint.c (tracepoint_was_hit): Don't collect for
15713 static tracepoint.
15714
15715 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15716
15717 * terminal.h: Reformat copyright header.
15718
15719 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15720
15721 * server.c (gdbserver_version): Update copyright year.
15722 * gdbreplay.c (gdbreplay_version): Likewise.
15723
15724 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15725
15726 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15727
15728 Revert:
15729 2011-12-18 Hui Zhu <teawater@gmail.com>
15730 * linux-low.c (linux_create_inferior): Save return value to ret.
15731
15732 2011-12-18 Hui Zhu <teawater@gmail.com>
15733
15734 * linux-low.c (linux_create_inferior): Save return value to ret.
15735
15736 2011-12-16 Doug Evans <dje@google.com>
15737
15738 * linux-low.c (linux_create_inferior): If stdio connection,
15739 redirect stdin from /dev/null, stdout to stderr.
15740 * remote-utils.c (remote_is_stdio): New static global.
15741 (remote_connection_is_stdio): New function.
15742 (remote_prepare): Handle stdio connection.
15743 (remote_open): Ditto.
15744 (remote_close): Don't close stdin for stdio connections.
15745 (read_prim,write_prim): New functions. Replace all calls to
15746 read/write to these.
15747 * server.c (main): Watch for "-" argument. Move call to
15748 remote_prepare before start_inferior.
15749 * server.h (STDIO_CONNECTION_NAME): New macro.
15750 (remote_connection_is_stdio): Declare.
15751
15752 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15753 in debugging output.
15754
15755 2011-12-15 Yao Qi <yao@codesourcery.com>
15756
15757 * tracepoint.c: Include sys/syscall.h.
15758 (gdb_ust_thread): Remove preprocessor conditional.
15759
15760 2011-12-14 Pedro Alves <pedro@codesourcery.com>
15761
15762 * linux-low.c (linux_detach_one_lwp): Call
15763 the_low_target.prepare_to_resume before detaching.
15764
15765 2011-12-14 Yao Qi <yao@codesourcery.com>
15766
15767 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15768 of write.
15769
15770 2011-12-14 Yao Qi <yao@codesourcery.com>
15771
15772 * i386-low.c (i386_low_stopped_data_address): Initialize local
15773 variable `control'.
15774
15775 2011-12-13 Pedro Alves <pedro@codesourcery.com>
15776
15777 PR remote/13492
15778
15779 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15780 DR_CONTROL unless necessary. Extend comments.
15781 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15782 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15783
15784 2011-12-13 Yao Qi <yao@codesourcery.com>
15785
15786 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15787 macros.
15788 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15789
15790 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15791
15792 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15793 Print new debug message for such case.
15794
15795 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15796
15797 Fix overlapping memcpy.
15798 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15799 the read_inferior_memory transfer.
15800 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15801 write_inferior_memory transfer.
15802 (set_fast_tracepoint_jump): New variable buf. Use it for the
15803 read_inferior_memory and write_inferior_memory transfers.
15804 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15805 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15806 Use it for the write_inferior_memory transfer.
15807 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15808 buffers.
15809
15810 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15811
15812 * linux-low.c (fetch_register, store_register): Make code
15813 consistent, fix formatting.
15814
15815 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15816
15817 * linux-low.c (usr_store_inferior_registers): Factor out code
15818 to handle individual registers into...
15819 (store_register): ... this new function.
15820
15821 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15822
15823 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15824 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15825 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15826 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15827 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15828 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15829 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15830 (srv_xmlfiles): Add new XML files.
15831
15832 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15833 and <sys/uio.h>.
15834 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15835 (init_registers_s390_linux32v1): Add prototype.
15836 (init_registers_s390_linux32v2): Likewise.
15837 (init_registers_s390_linux64v1): Likewise.
15838 (init_registers_s390_linux64v2): Likewise.
15839 (init_registers_s390x_linux64v1): Likewise.
15840 (init_registers_s390x_linux64v2): Likewise.
15841 (s390_num_regs): Increment to 52.
15842 (s390_regmap): Add orig_r2 register.
15843 (s390_num_regs_3264): Increment to 68.
15844 (s390_regmap_3264): Add orig_r2 register.
15845 (s390_collect_ptrace_register): Handle orig_r2 register.
15846 (s390_supply_ptrace_register): Likewise.
15847 (s390_fill_last_break): New function.
15848 (s390_store_last_break): Likewise.
15849 (s390_fill_system_call): New function.
15850 (s390_store_system_call): Likewise.
15851 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15852 register sets.
15853 (s390_check_regset): New function.
15854 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15855 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15856 Update target_regsets for available register sets.
15857
15858 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15859 Jan Kratochvil <jan.kratochvil@redhat.com>
15860
15861 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15862 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15863 New.
15864 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15865 * linux-low.h (struct process_info_private): New member r_debug.
15866 * server.c (handle_qxfer_libraries): Call
15867 the_target->qxfer_libraries_svr4.
15868 (handle_qxfer_libraries_svr4): New function.
15869 (qxfer_packets): New entry "libraries-svr4".
15870 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15871 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15872 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15873 PACKET_qXfer_libraries_svr4.
15874
15875 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
15876
15877 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
15878 PSW address/mask between 8-byte and 16-byte formats.
15879 (s390_supply_ptrace_register): Likewise.
15880 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
15881 basic addressing mode bit.
15882
15883 2011-11-24 Stan Shebs <stan@codesourcery.com>
15884
15885 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
15886
15887 2011-11-17 Stan Shebs <stan@codesourcery.com>
15888
15889 * tracepoint.c (struct tracepoint): New field traceframe_usage.
15890 (tracing_start_time): New global.
15891 (tracing_stop_time): New global.
15892 (tracing_user_name): New global.
15893 (tracing_notes): New global.
15894 (tracing_stop_note): New global.
15895 (cmd_qtstart): Set traceframe_usage, start_time.
15896 (stop_tracing): Set stop_time.
15897 (cmd_qtstatus): Report additional status.
15898 (cmd_qtp): New function.
15899 (handle_tracepoint_query): Call it.
15900 (cmd_qtnotes): New function.
15901 (handle_tracepoint_general_set): Call it.
15902 (get_timestamp): Rename from tsv_get_timestamp.
15903
15904 2011-11-14 Stan Shebs <stan@codesourcery.com>
15905 Kwok Cheung Yeung <kcy@codesourcery.com>
15906
15907 * linux-x86-low.c (small_jump_insn): New.
15908 (i386_install_fast_tracepoint_jump_pad): Add arguments for
15909 trampoline and error message, build a trampoline and issue a small
15910 jump instruction to it.
15911 (x86_install_fast_tracepoint_jump_pad): Add arguments for
15912 trampoline and error message.
15913 (x86_get_min_fast_tracepoint_insn_len): New.
15914 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
15915 * linux-low.h (struct linux_target_ops): Add arguments to
15916 install_fast_tracepoint_jump_pad operation, add new operation.
15917 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
15918 arguments.
15919 (linux_get_min_fast_tracepoint_insn_len): New function.
15920 (linux_target_op): Add new operation.
15921 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
15922 (gdb_trampoline_buffer_end): Ditto.
15923 (gdb_trampoline_buffer_error): Ditto.
15924 (struct ipa_sym_addresses): Add fields for new IPA variables.
15925 (symbol_list): Add entries for new IPA variables.
15926 (struct tracepoint): Add fields to hold the address range of the
15927 trampoline used by the tracepoint.
15928 (trampoline_buffer_head): New static variable.
15929 (trampoline_buffer_tail): Ditto.
15930 (claim_trampoline_space): New function.
15931 (have_fast_tracepoint_trampoline_buffer): New function.
15932 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
15933 structure.
15934 (install_fast_tracepoint): Ditto, also add error buffer argument.
15935 (cmd_qtminftpilen): New function.
15936 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
15937 (fast_tracepoint_from_trampoline_address): New function.
15938 (fast_tracepoint_collecting): Handle trampoline as part of jump
15939 pad space.
15940 (set_trampoline_buffer_space): New function.
15941 (initialize_tracepoint): Initialize new IPA variables.
15942 * target.h (struct target_ops): Add arguments to
15943 install_fast_tracepoint_jump_pad operation, add new
15944 get_min_fast_tracepoint_insn_len operation.
15945 (target_get_min_fast_tracepoint_insn_len): New.
15946 (install_fast_tracepoint_jump_pad): Add arguments.
15947 * server.h (IPA_BUFSIZ): Define.
15948 * linux-i386-ipa.c: Include extra header files.
15949 (initialize_fast_tracepoint_trampoline_buffer): New function.
15950 (initialize_low_tracepoint): Call it.
15951 * server.h (set_trampoline_buffer_space): Declare.
15952 (claim_trampoline_space): Ditto.
15953 (have_fast_tracepoint_trampoline_buffer): Ditto.
15954
15955 2011-11-14 Yao Qi <yao@codesourcery.com>
15956
15957 * server.c (handle_query): Handle InstallInTrace for qSupported.
15958 * tracepoint.c (add_tracepoint): Sort list.
15959 (install_tracepoint, download_tracepoint): New.
15960 (cmd_qtdp): Call them to install and download tracepoints.
15961 (sort_tracepoints): Removed.
15962 (cmd_qtstart): Update.
15963
15964 2011-11-14 Yao Qi <yao@codesourcery.com>
15965
15966 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
15967 * mem-break.h: Declare.
15968 * tracepoint.c (cmd_qtstart): Move some code to ...
15969 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
15970 New.
15971 (download_tracepoints): Move some code to ...
15972 (download_tracepoint_1): ... here. New.
15973
15974 2011-11-08 Yao Qi <yao@codesourcery.com>
15975
15976 * remote-utils.c (relocate_instruction): A comment fix.
15977
15978 2011-11-07 Joel Brobecker <brobecker@adacore.com>
15979
15980 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
15981 (i386_dr_low_get_control, i386_dr_low_get_status): Use
15982 dr_status_mirror and dr_control_mirror from debug_reg_state.
15983 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
15984 (i386_initial_stuff): Remove use of deleted globals.
15985 (i386_get_thread_context, i386_set_thread_context,
15986 i386_thread_added): Use dr_status_mirror and dr_control_mirror
15987 from debug_reg_state.
15988
15989 2011-11-05 Yao Qi <yao@codesourcery.com>
15990
15991 * tracepoint.c (gdb_collect): Loop over tracepoints of same
15992 address as TPOINT's.
15993
15994 2011-11-02 Stan Shebs <stan@codesourcery.com>
15995
15996 * tracepoint.c (agent_mem_read_string): New function.
15997 (eval_agent_expr): Call it for tracenz.
15998 * server.c (handle_query): Report support for tracenz.
15999
16000 2011-11-02 Yao Qi <yao@codesourcery.com>
16001
16002 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16003
16004 2011-11-02 Yao Qi <yao@codesourcery.com>
16005
16006 * target.h: Fix a typo in comment.
16007
16008 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16009
16010 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16011 clobber the breakpoints' shadows with fast tracepoint jumps.
16012 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16013 * target.c (write_inferior_memory): Also pass MYADDR down to
16014 check_mem_write.
16015
16016 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16017
16018 * configure.ac: Check support for personality routine.
16019 * configure: Regenerate.
16020 * config.in: Likewise.
16021 * linux-low.c: Include <sys/personality.h>.
16022 Define ADDR_NO_RANDOMIZE if necessary.
16023 (linux_create_inferior): Disable address space randomization when
16024 forking inferior, if requested.
16025 (linux_supports_disable_randomization): New function.
16026 (linux_target_ops): Install it.
16027 * server.h (disable_randomization): Declare.
16028 * server.c (disable_randomization): New global variable.
16029 (handle_general_set): Handle QDisableRandomization.
16030 (handle_query): Likewise for qSupported.
16031 (main): Support --disable-randomization and --no-disable-randomization
16032 command line arguments.
16033 * target.h (struct target_ops): Add supports_disable_randomization.
16034 (target_supports_disable_randomization): New macro.
16035
16036 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16037
16038 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16039 ifdef check.
16040 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16041 [!PT_GETDSBT] (target_loadmap): New definition.
16042 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16043 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16044 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16045 and PT_GETDSBT to LINUX_LOADMAP.
16046 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16047 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16048
16049 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16050
16051 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16052 (arm_linux_hwbp_cap): New static variable.
16053 (arm_linux_get_hwbp_cap): Replace by ...
16054 (arm_linux_init_hwbp_cap): ... this new function.
16055 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16056 (arm_linux_get_hw_watchpoint_count): Likewise.
16057 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16058 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16059 (arm_prepare_to_resume): Use perror_with_name instead of error.
16060
16061 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16062
16063 * linux-arm-low.c: Include <signal.h>.
16064 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16065 (struct arm_linux_hwbp_cap): New data type.
16066 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16067 (struct arm_linux_hw_breakpoint): New data type.
16068 (MAX_BPTS, MAX_WPTS): Define.
16069 (struct arch_process_info, struct arch_lwp_info): New data types.
16070 (arm_linux_get_hwbp_cap): New function.
16071 (arm_linux_get_hw_breakpoint_count): Likewise.
16072 (arm_linux_get_hw_watchpoint_count): Likewise.
16073 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16074 (arm_hwbp_control_initialize): Likewise.
16075 (arm_hwbp_control_is_enabled): Likewise.
16076 (arm_hwbp_control_is_initialized): Likewise.
16077 (arm_hwbp_control_disable): Likewise.
16078 (arm_linux_hw_breakpoint_equal): Likewise.
16079 (arm_linux_hw_point_initialize): Likewise.
16080 (struct update_registers_data): New data structure.
16081 (update_registers_callback: New function.
16082 (arm_insert_point): Likewise.
16083 (arm_remove_point): Likewise.
16084 (arm_stopped_by_watchpoint): Likewise.
16085 (arm_stopped_data_address): Likewise.
16086 (arm_new_process): Likewise.
16087 (arm_new_thread): Likewise.
16088 (arm_prepare_to_resume): Likewise.
16089 (the_low_target): Register arm_insert_point, arm_remove_point,
16090 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16091 arm_new_thread, and arm_prepare_to_resume.
16092
16093 2011-09-15 Stan Shebs <stan@codesourcery.com>
16094
16095 * server.h (struct emit_ops): Add compare-goto fields.
16096 * tracepoint.c (gdb_agent_op_sizes): New table.
16097 (emit_eq_goto): New function.
16098 (emit_ne_goto): New function.
16099 (emit_lt_goto): New function.
16100 (emit_le_goto): New function.
16101 (emit_gt_goto): New function.
16102 (emit_ge_goto): New function.
16103 (is_goto_target): New function.
16104 (compile_bytecodes): Recognize special cases of compare-goto
16105 combinations and call specialized emitters for them.
16106 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16107 (amd64_emit_ne_goto): New function.
16108 (amd64_emit_lt_goto): New function.
16109 (amd64_emit_le_goto): New function.
16110 (amd64_emit_gt_goto): New function.
16111 (amd64_emit_ge_goto): New function.
16112 (amd64_emit_ops): Add the new functions.
16113 (i386_emit_eq_goto): New function.
16114 (i386_emit_ne_goto): New function.
16115 (i386_emit_lt_goto): New function.
16116 (i386_emit_le_goto): New function.
16117 (i386_emit_gt_goto): New function.
16118 (i386_emit_ge_goto): New function.
16119 (i386_emit_ops): Add the new functions.
16120
16121 2011-09-08 Stan Shebs <stan@codesourcery.com>
16122
16123 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16124 (i386_emit_epilogue): Restore %ebx.
16125
16126 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16127
16128 * server.c (step_thread): Remove definition.
16129 (process_serial_event): Don't handle Hs.
16130 * server.h (step_thread): Remove declaration.
16131 * target.c (set_desired_inferior): Remove use of step_thread.
16132
16133 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16134
16135 * linux-low.c: Include linux-procfs.h.
16136 (linux_attach_lwp_1): Update comments.
16137 (linux_attach): Scan for existing threads when attaching to a
16138 process that is the tgid.
16139 * Makefile.in: Update dependencies.
16140
16141 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16142
16143 * configure.srv: Add linux-procfs.o dependencies.
16144
16145 2011-08-14 Yao Qi <yao@codesourcery.com>
16146
16147 * target.h (struct target_ops): Fix indent.
16148 * win32-low.c (win32_target_ops): Fix comment.
16149
16150 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16151 Yao Qi <yao@codesourcery.com>
16152
16153 * Makefile.in (clean): Remove tic6x-*.c files.
16154 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16155 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16156 (tic6x-c64xp-linux.c): Likewise.
16157 * configure.srv: Add support for tic6x-*-uclinux.
16158 * linux-tic6x-low.c: New.
16159 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16160
16161 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16162 Yao Qi <yao@codesourcery.com>
16163
16164 * target.h (struct target_ops): Add read_loadmap.
16165 * linux-low.c (struct target_loadseg): New type.
16166 (struct target_loadmap): New type.
16167 (linux_read_loadmap): New function.
16168 (linux_target_ops): Add linux_read_loadmap.
16169 * server.c (handle_query): Support qXfer:fdpic:read packet.
16170 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16171 to NULL.
16172
16173 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16174
16175 * win32-low.c: Include <stdint.h>.
16176
16177 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16178
16179 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16180 to the inferior here.
16181 (i386_remove_aligned_watchpoint): Ditto.
16182 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16183 fit part of the watchpoint in the debug registers.
16184 (i386_update_inferior_debug_regs): New.
16185 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16186 registers, and only update the inferior on success.
16187 (i386_low_remove_watchpoint): Ditto.
16188
16189 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16190
16191 * linux-low.c (compare_ints, unique, list_threads, show_process,
16192 linux_core_of_thread): Delete.
16193 (linux_target_ops): Change linux_core_of_thread to
16194 linux_common_core_of_thread.
16195 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16196 * utils.c (malloc_failure): Change type of argument.
16197 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16198 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16199 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16200 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16201 (IPA_OBJS): Add common-utils-ipa.o.
16202 (ptid_h, linux_osdata_h): New macros.
16203 (server_h): Add common/common-utils.h, common/xml-utils.h,
16204 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16205 common/ptid.h.
16206 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16207 ptid.o, buffer.o): New rules.
16208 (linux-low.o): Add common/linux-osdata.h as a dependency.
16209 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16210 * configure.ac: Add AC_HEADER_DIRENT check.
16211 * config.in: Regenerate.
16212 * configure: Regenerate.
16213 * remote-utils.c (xml_escape_text): Delete.
16214 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16215 buffer_xml_printf): Move to common/buffer.c.
16216 * server.c (main): Remove call to initialize_inferiors.
16217 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16218 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16219 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16220 internal_error, gdb_assert, gdb_assert_fail): Delete.
16221 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16222 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16223 common/buffer.h.
16224 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16225 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16226 initialize_inferiors): Delete.
16227
16228 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16229
16230 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16231 symbol error.
16232
16233 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16234
16235 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16236 assertion.
16237 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16238
16239 2011-05-26 Yao Qi <yao@codesourcery.com>
16240
16241 * Makefile.in (thread-db.o): Track dependence to
16242 common/gdb_thread_db.h.
16243 * thread-db.c: include gdb_thread_db.h from right place.
16244
16245 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16246
16247 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16248 __FILE__ and __LINE__ to internal_error.
16249
16250 2011-05-13 Doug Evans <dje@google.com>
16251
16252 * thread-db.c (try_thread_db_load_from_sdir): New function.
16253 (try_thread_db_load_from_dir): New function.
16254 (thread_db_load_search): Handle $sdir, ignore $pdir.
16255 Remove trying of system directories if search of
16256 libthread-db-search-path fails, that is now done via $sdir.
16257
16258 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16259
16260 * server.c (handle_query): Add EnableDisableTracepoints to the list
16261 of supported features.
16262 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16263 tracepoints.
16264 (cmd_qtenable_disable): New.
16265 (cmd_qtstart): Install tracepoints even if disabled.
16266 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16267 receiving a QTEnable or QTDisable packet.
16268 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16269 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16270 tracepoints.
16271 (gdb_probe): Skip data collection if static tracepoint is disabled.
16272
16273 2011-05-10 Doug Evans <dje@google.com>
16274
16275 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16276
16277 2011-05-04 Doug Evans <dje@google.com>
16278
16279 * linux-low.c (linux_join): Skip process lookup.
16280 * spu-low.c (spu_join): Ditto.
16281 * server.c (join_inferiors_callback): Delete.
16282 (process_serial_event): For 'D' packet (detach) call join_inferior
16283 directly.
16284
16285 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16286
16287 * README: Don't mention xscale*-*-linux*.
16288 * configure.srv (xscale*-*-linux*): Don't handle target.
16289
16290 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16291
16292 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16293 casting pointers.
16294 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16295 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16296 (i386_emit_void_call_2): Likewise.
16297
16298 2011-04-26 Yao Qi <yao@codesourcery.com>
16299
16300 * linux-low.c: Move common macros to linux-ptrace.h.
16301 Include linux-ptrace.h.
16302 * Makefile.in (linux_ptrace_h): New.
16303 (linux-low.o): Depends on linux-ptrace.h.
16304
16305 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16306
16307 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16308 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16309 (remote_prepare): New function with most of the TCP code from ...
16310 (remote_open): ... here. Detect PORT here unconditionally. Move also
16311 setting transport_is_reliable.
16312 * server.c (run_once): New variable.
16313 (gdbserver_usage): Document it.
16314 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16315 the first run if RUN_ONCE.
16316 * server.h (run_once, remote_prepare): New declarations.
16317
16318 2011-04-19 Tom Tromey <tromey@redhat.com>
16319
16320 * win32-low.c (handle_load_dll): Remove duplicate "the".
16321
16322 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16323
16324 Remove support for old Cygwin 1.5 versions.
16325 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16326 function to avoid warning.
16327 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16328 warning.
16329
16330 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16331
16332 * gdbserver/server.h (Macro _): Define it if not available.
16333
16334 2011-03-14 Michael Snyder <msnyder@vmware.com>
16335
16336 * hostio.c (handle_close): Remove unnecessary null test.
16337
16338 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16339
16340 * Makefile.in (maintainer-clean realclean distclean): Remove
16341 "make ... subdir_do" command.
16342
16343 2011-03-10 Michael Snyder <msnyder@vmware.com>
16344
16345 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16346
16347 * server.c (handle_v_run): Free alloced buffer on early return.
16348
16349 2011-03-09 Yao Qi <yao@codesourcery.com>
16350
16351 Revert:
16352 2011-03-04 Yao Qi <yao@codesourcery.com>
16353
16354 * Makefile.in: Remove GNU make feature --directory.
16355
16356 2011-03-05 Yao Qi <yao@codesourcery.com>
16357
16358 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16359 (subdir_do): New make target. Copied from gdb/Makefile.
16360 (maintainer-clean, realclean, distclean, clean): Call corresponding
16361 make targets in common/Makefile.
16362
16363 2011-02-11 Yao Qi <yao@codesourcery.com>
16364
16365 * configure.ac: Call AC_PROG_RANLIB.
16366 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16367 * configure: Regenerate.
16368
16369 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16370
16371 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16372
16373 2011-03-06 Yao Qi <yao@codesourcery.com>
16374
16375 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16376
16377 2011-03-05 Yao Qi <yao@codesourcery.com>
16378
16379 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16380 (subdir_do): New make target. Copied from gdb/Makefile.
16381 (maintainer-clean, realclean, distclean, clean): Call corresponding
16382 make targets in common/Makefile.
16383
16384 2011-03-04 Yao Qi <yao@codesourcery.com>
16385
16386 * Makefile.in: Remove GNU make feature --directory.
16387
16388 2011-03-04 Michael Snyder <msnyder@vmware.com>
16389
16390 * server.c (queue_stop_reply): Call xmalloc not malloc.
16391
16392 2011-03-02 Michael Snyder <msnyder@vmware.com>
16393
16394 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16395
16396 2011-02-28 Michael Snyder <msnyder@vmware.com>
16397
16398 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16399 (cmd_qtframe): Ditto.
16400 (cmd_qtbuffer): Ditto.
16401 (cmd_bigqtbuffer): Ditto.
16402
16403 * utils.c (decimal2str): Initialize 'width' to nine, then
16404 don't mess with it.
16405
16406 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16407
16408 * hostio.c (require_data): Free *data, not data.
16409
16410 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16411
16412 * hostio.c (require_data): Use free, not xfree.
16413
16414 2011-02-27 Michael Snyder <msnyder@vmware.com>
16415
16416 * server.c (handle_query): Discard unused value.
16417
16418 * hostio.c (require_data): Free malloc memory before returning
16419 error.
16420
16421 2011-02-26 Michael Snyder <msnyder@vmware.com>
16422
16423 * linux-low.c (list_threads): Call closedir for dirent.
16424
16425 2011-02-27 Michael Snyder <msnyder@vmware.com>
16426
16427 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16428 a case statement falls through.
16429
16430 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16431
16432 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16433 in comparison.
16434
16435 2011-02-26 Michael Snyder <msnyder@vmware.com>
16436
16437 * utils.c (decimal2str): Eliminate dead code and dead param.
16438 (pulongest): Drop dead param from call to decimal2str.
16439 (plongest): Ditto.
16440
16441 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16442
16443 Revert the following patch (not approved yet):
16444 2011-02-21 Hui Zhu <teawater@gmail.com>
16445 * tracepoint.c (tp_printf): New function.
16446 (eval_agent_expr): Handle gdb_agent_op_printf.
16447
16448 2011-02-21 Hui Zhu <teawater@gmail.com>
16449
16450 * tracepoint.c (tp_printf): New function.
16451 (eval_agent_expr): Handle gdb_agent_op_printf.
16452
16453 2011-02-18 Tom Tromey <tromey@redhat.com>
16454
16455 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16456 (tracepoint.o): Likewise.
16457 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16458 (gdb_agent_op_names): Likewise.
16459
16460 2011-02-18 Tom Tromey <tromey@redhat.com>
16461
16462 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16463 gdb_agent_op_rot>: New constants.
16464 (gdb_agent_op_names): Add pick and roll.
16465 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16466 cases.
16467
16468 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16469
16470 * aclocal.m4: Regenerated with aclocal-1.11.1.
16471
16472 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16473
16474 * server.c (handle_qxfer_traceframe_info): New.
16475 (qxfer_packets): Register "traceframe-info".
16476 (handle_query): Report support for qXfer:traceframe-info:read+.
16477 * tracepoint.c (match_blocktype): New.
16478 (traceframe_find_block_type): Rename to ...
16479 (traceframe_walk_blocks): ... this. Add callback filter argument,
16480 and use it.
16481 (traceframe_find_block_type): New, reimplemented on top of
16482 traceframe_walk_blocks.
16483 (build_traceframe_info_xml): New.
16484 (traceframe_read_info): New.
16485 * server.h (traceframe_read_info): Declare.
16486
16487 2011-02-11 Yao Qi <yao@codesourcery.com>
16488
16489 * configure.ac: Call AC_PROG_RANLIB.
16490 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16491 * configure: Regenerate.
16492
16493 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16494
16495 * server.c (gdb_read_memory): Change return semantics to allow
16496 partial transfers.
16497 (handle_search_memory_1): Adjust.
16498 (process_serial_event) <'m' packet>: Handle partial transfers.
16499 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16500
16501 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16502
16503 * regcache.c (init_register_cache): Initialize
16504 regcache->register_status.
16505 (free_register_cache): Release regcache->register_status.
16506 (regcache_cpy): Copy register_status.
16507 (registers_to_string): Print 'x's for unavailable registers.
16508 (supply_register): Mark the register's status valid or
16509 unavailable, depending on whether a buffer was passed in or not.
16510 (supply_register_zeroed): New.
16511 (supply_regblock): Mark the registers' status valid or
16512 unavailable, depending on whether a buffer was passed in or not.
16513 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16514 (struct regcache): New `register_status' field.
16515 (supply_register_zeroed): Declare.
16516 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16517 supply_register_zeroed, rather than passing a NULL buffer to
16518 supply_register.
16519 * tracepoint.c (fetch_traceframe_registers): Update comment.
16520
16521 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16522
16523 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16524 buffer explicit.
16525
16526 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16527
16528 * server.h (decode_xfer_write): Change prototype.
16529 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16530 and don't extract the annex here.
16531 * server.c (decode_xfer_read): Remove `annex' parameter,
16532 and don't extract the annex here.
16533 (decode_xfer): New.
16534 (struct qxfer): New.
16535 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16536 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16537 (handle_qxfer_statictrace): New functions, abstracted out from
16538 handle_query, and made to use the struct qxfer interface.
16539 (handle_threads_qxfer_proper): Rename to ...
16540 (handle_qxfer_threads_proper): ... this.
16541 (handle_threads_qxfer): Rename to ...
16542 (handle_qxfer_threads): ... this. Adjust.
16543 (qxfer_packets): New array.
16544 (handle_qxfer): New function.
16545 (handle_query): Use handle_qxfer.
16546
16547 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16548
16549 * gdbreplay.c: Shorten lines of >= 80 columns.
16550 * linux-low.c: Ditto.
16551 * linux-ppc-low.c: Ditto.
16552 * linux-s390-low.c: Ditto.
16553 * linux-sparc-low.c: Ditto.
16554 * linux-x86-low.c: Ditto.
16555 * linux-xtensa-low.c: Ditto.
16556 * mem-break.c: Ditto.
16557 * nto-low.c: Ditto.
16558 * regcache.h: Ditto.
16559 * remote-utils.c: Ditto.
16560 * server.c: Ditto.
16561 * server.h: Ditto.
16562 * thread-db.c: Ditto.
16563 * tracepoint.c: Ditto.
16564 * utils.c: Ditto.
16565 * win32-low.h: Ditto.
16566
16567 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16568
16569 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16570 update.
16571
16572 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16573
16574 * server.c (gdbserver_version): Update copyright year in version
16575 output.
16576 * gdbreplay.c (gdbreplay_version): Ditto.
16577
16578 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16579
16580 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16581 * linux-bfin-low.c: New file.
16582 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16583 PT_DATA_ADDR for BFIN targets.
16584 * Makefile.in (SFILES): Add linux-bfin-low.c.
16585 (clean): Remove reg-bfin.c.
16586 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16587 * README: Mention supported Blackfin targets.
16588
16589 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16590
16591 * .gitignore: New file.
16592
16593 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16594
16595 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16596
16597 2010-10-22 Jie Zhang <jie@codesourcery.com>
16598
16599 * Makefile.in: Add FLAGS_TO_PASS variable.
16600 (install): Remove dependency of install-only and recursively
16601 invoke make for install-only.
16602
16603 2010-10-04 Doug Evans <dje@google.com>
16604
16605 * Makefile.in (uninstall): Use $(DESTDIR).
16606
16607 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16608
16609 PR gdb/11842
16610
16611 * linux-x86-low.c (compat_siginfo_from_siginfo)
16612 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16613 si_code is < 0. Check for si_code == SI_TIMER before checking for
16614 si_code < 0.
16615
16616 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16617
16618 * lynx-i386-low.c: New file.
16619 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16620
16621 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16622
16623 * lynx-low.c (ptrace_request_to_str): Remove handling for
16624 request values that have been removed in LynxOS 5.x.
16625
16626 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16627
16628 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16629 <ptrace.h>
16630
16631 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16632
16633 * configure.ac: Add --enable-inprocess-agent option.
16634 * configure: Rebuilt.
16635
16636 2010-09-06 Yao Qi <yao@codesourcery.com>
16637
16638 * linux-low.c (linux_kill): Remove unused variable.
16639 (linux_stabilize_threads): Likewise.
16640 * server.c (start_inferior): Likewise.
16641 (queue_stop_reply_callback): Likewise.
16642 * tracepoint.c (do_action_at_tracepoint): Likewise.
16643
16644 2010-09-06 Yao Qi <yao@codesourcery.com>
16645
16646 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16647 on return.
16648
16649 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16650
16651 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16652
16653 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16654
16655 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16656 "$(IPA_DEPFILES)".
16657
16658 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16659
16660 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16661 gdbserver/lynx-ppc-low.c: New files.
16662 * Makefile.in (lynx_low_h): New variable.
16663 (lynx-low.o, lynx-ppc-low.o): New rules.
16664 * configure.ac: On LynxOS, link with -lnetinet.
16665 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16666 * configure: regenerate.
16667
16668 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16669
16670 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16671 * configure.ac: Add check for vasprintf and vsnprintf.
16672 * configure, config.in: Regenerate.
16673 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16674
16675 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16676
16677 * gdbreplay.c: Move include of alloca.h up, next to include of
16678 malloc.h.
16679 * server.h: Add include of malloc.h.
16680 * mem-break.c: Remove include of malloc.h.
16681 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16682
16683 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16684
16685 * Makefile.in (memmem.o): Build with -Wno-error.
16686
16687 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16688
16689 * utils.c (xsnprintf): Make non-static.
16690 * server.h: Add xsnprintf declaration.
16691 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16692 replace calls to snprintf by calls to xsnprintf throughout.
16693
16694 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16695
16696 * configure.ac: Add configure check for alloca.
16697 * configure, config.in: Regenerate.
16698 * server.h: Include alloca.h if it exists.
16699 * gdbreplay.c: Include alloca.h if it exists.
16700
16701 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16702
16703 * linux-low.c (__SIGRTMIN): Define if not already defined.
16704 (linux_create_inferior): Check for __ANDROID__ rather than
16705 __SIGRTMIN.
16706 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16707 are already deferred.
16708 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16709 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16710 stopped and already has a pending signal to report.
16711 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16712 a pending signal to report or is moving out of a jump pad.
16713 (linux_init_signals): Check for __ANDROID__ rather than
16714 __SIGRTMIN.
16715
16716 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16717
16718 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16719 debug_threads check. Avoid a linear search when not doing debug
16720 output.
16721
16722 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16723
16724 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16725 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16726 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16727 (process_event): Change local fd's type to gdb_fildes_t.
16728 (create_file_handler): Adjust prototype.
16729 (delete_file_handler): Adjust prototype.
16730 (handle_file_event): Adjust prototype. Use pfildes.
16731 (create_file_event): Adjsut prototype.
16732 * remote-utils.c (remote_desc, listen_desc): Change type to
16733 gdb_fildes_t.
16734 * server.h: New gdb_fildes_t typedef.
16735 [USE_WIN32API]: Include winsock2.h.
16736 (delete_file_handler, add_file_handler): Adjust prototypes.
16737 (pfildes): Declare.
16738 * utils.c (pfildes): New.
16739
16740 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16741
16742 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16743 * configure: Regenerate.
16744
16745 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16746
16747 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16748 (linux_done_accessing_memory): ... this.
16749 (linux_target_ops): Adjust.
16750 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16751 * nto-low.c (nto_target_ops): Adjust comment.
16752 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16753 * spu-low.c (spu_target_ops): Adjust comment.
16754 * target.h (target_ops): Rename unprepare_to_access_memory field
16755 to done_accessing_memory.
16756 (unprepare_to_access_memory): Rename to ...
16757 (done_accessing_memory): ... this.
16758
16759 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16760
16761 * linux-low.c (linux_prepare_to_access_memory): New.
16762 (linux_unprepare_to_access_memory): New.
16763 (linux_target_ops): Install them.
16764 * server.c (read_memory): Rename to ...
16765 (gdb_read_memory): ... this. Use
16766 prepare_to_access_memory/prepare_to_access_memory.
16767 (write_memory): Rename to ...
16768 (gdb_write_memory): ... this. Use
16769 prepare_to_access_memory/prepare_to_access_memory.
16770 (handle_search_memory_1): Adjust.
16771 (process_serial_event): Adjust.
16772 * target.h (struct target_ops): New fields
16773 prepare_to_access_memory and unprepare_to_access_memory.
16774 (prepare_to_access_memory, unprepare_to_access_memory): New.
16775 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16776 prepare_to_access_memory/prepare_to_access_memory.
16777 * nto-low.c (nto_target_ops): Adjust.
16778 * spu-low.c (spu_target_ops): Adjust.
16779 * win32-low.c (win32_target_ops): Adjust.
16780
16781 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16782
16783 * Makefile.in (WARN_CFLAGS): Get it from configure.
16784 (WERROR_CFLAGS): New.
16785 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16786 * configure.ac: Introduce --enable-werror, which adds -Werror to
16787 the compiler command line. Enabled by default. Disable with
16788 --disable-werror. Add -Wdeclaration-after-statement
16789 Wpointer-arith and -Wformat-nonliteral to warning flags.
16790 * configure: Regenerate.
16791
16792 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16793
16794 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16795
16796 2010-08-26 Pedro Alves <pedro@codesourcery.com>
16797
16798 * gdbreplay.c (remote_error): New.
16799 (gdbchar): New.
16800 (expect): Use gdbchar. Check for error reading from GDB.
16801 Clarify sync error output.
16802 (play): Check for errors writing to GDB.
16803 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16804 * remote-utils.c (getpkt): Check for errors writing to the remote
16805 descriptor.
16806
16807 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16808
16809 * linux-low.c (linux_wait_1): Move non-debugging code out of
16810 `debug_threads' control.
16811
16812 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16813
16814 * linux-low.c (linux_wait_1): Don't set last_status here.
16815 * server.c (push_event, queue_stop_reply_callback): Assert we're
16816 not pushing a TARGET_WAITKIND_IGNORE event.
16817 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16818 (myresume, handle_target_event): Set the thread's last_resume_kind
16819 and last_status from the target returned status.
16820
16821 2010-08-25 Pedro Alves <pedro@codesourcery.com>
16822
16823 PR threads/10729
16824
16825 * linux-x86-low.c (update_debug_registers_callback): New.
16826 (i386_dr_low_set_addr): Use it.
16827 (i386_dr_low_get_addr): New.
16828 (i386_dr_low_set_control): Use update_debug_registers_callback.
16829 (i386_dr_low_get_control): New.
16830 (i386_dr_low_get_status): Adjust.
16831 * linux-low.c (linux_stop_lwp): New.
16832 * linux-low.h (linux_stop_lwp): Declare.
16833
16834 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16835 argument instead of a i386_debug_reg_state.
16836 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16837 a i386_debug_reg_state.
16838 (i386_insert_aligned_watchpoint): Adjust.
16839 (i386_remove_aligned_watchpoint): Adjust.
16840 (i386_low_stopped_data_address): Read the debug registers from the
16841 inferior instead of from the mirrors.
16842 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16843 (i386_dr_low_get_addr): Declare.
16844 (i386_dr_low_get_control): Declare.
16845 (i386_dr_low_get_status): Change prototype.
16846
16847 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16848 (i386_dr_low_get_addr): New.
16849 (i386_dr_low_get_control): New.
16850 (i386_dr_low_get_status): Adjust prototype. Return
16851 dr_status_mirror.
16852 (i386_initial_stuff): Clear dr_status_mirror and
16853 dr_control_mirror.
16854 (i386_get_thread_context): Adjust.
16855 (i386_set_thread_context): Adjust.
16856 (i386_thread_added): Adjust.
16857
16858 2010-08-24 Pedro Alves <pedro@codesourcery.com>
16859
16860 * linux-low.h (linux_thread_area): Delete declaration.
16861
16862 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16863
16864 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16865 after its termination.
16866
16867 2010-08-09 Pedro Alves <pedro@codesourcery.com>
16868
16869 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16870 (gdb_wants_all_stopped): Delete.
16871 (linux_wait_1): Don't call them.
16872 * server.c (handle_v_cont): Tag all threads as want-stopped.
16873 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
16874 stopped as "client-wants-stopped".
16875
16876 2010-07-31 Pedro Alves <pedro@codesourcery.com>
16877
16878 * Makefile.in (signals_h): New.
16879 (server_h): Depend on it.
16880 (server.o): Don't depend on $(signals_def).
16881 (signals.o): Depend on $(signals_def).
16882
16883 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
16884
16885 * Makefile.in (signals_def): New.
16886 (server_h): Append include/gdb/signals.h and signals_def.
16887 (server.o): Append signals_def.
16888
16889 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16890
16891 * server.c (handle_target_event): Use target_signal_to_host for
16892 resume_info.sig initialization.
16893 * target.h (struct thread_resume) <sig>: New comment.
16894
16895 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
16896
16897 * server.c (handle_query): strcpy() the returned string from paddress()
16898 instead of sprintf().
16899 * utils.c (paddress): Return phex_nz().
16900
16901 2010-07-07 Joel Brobecker <brobecker@adacore.com>
16902
16903 * server.c (handle_v_cont): Call mourn_inferior if process
16904 just exited.
16905 (myresume): Likewise.
16906
16907 2010-07-01 Pedro Alves <pedro@codesourcery.com>
16908
16909 Static tracepoints, and integration with UST.
16910
16911 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
16912 * mem-break.c (uninsert_all_breakpoints)
16913 (reinsert_all_breakpoints): New.
16914 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
16915 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
16916 (gdb_agent_ust_loaded, helper_thread_id)
16917 (gdb_agent_helper_thread_id): New macros.
16918 (struct ipa_sym_addresses): Add addr_ust_loaded,
16919 addr_helper_thread_id, addr_cmd_buf.
16920 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
16921 (in_process_agent_loaded_ust): New.
16922 (write_e_ust_not_loaded): New.
16923 (maybe_write_ipa_ust_not_loaded): New.
16924 (struct collect_static_trace_data_action): New.
16925 (enum tracepoint_type) <static_tracepoint>: New.
16926 (struct tracepoint) <handle>: Mention static tracepoints.
16927 (struct static_tracepoint_ctx): New.
16928 (CMD_BUF_SIZE): New.
16929 (add_tracepoint_action): Handle static tracepoint actions.
16930 (unprobe_marker_at): New.
16931 (clear_installed_tracepoints): Handle static tracepoints.
16932 (cmd_qtdp): Handle static tracepoints.
16933 (probe_marker_at): New.
16934 (cmd_qtstart): Handle static tracepoints.
16935 (response_tracepoint): Handle static tracepoints.
16936 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
16937 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
16938 (get_context_regcache): Handle static tracepoints.
16939 (do_action_at_tracepoint): Handle static tracepoint actions.
16940 (traceframe_find_block_type): Handle static trace data blocks.
16941 (traceframe_read_sdata): New.
16942 (download_tracepoints): Download static tracepoint actions.
16943 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
16944 (GDB_PROBE_NAME): New.
16945 (ust_ops): New.
16946 (GET_UST_SYM): New.
16947 (USTF): New.
16948 (dlsym_ust): New.
16949 (ust_marker_to_static_tracepoint): New.
16950 (gdb_probe): New.
16951 (collect_ust_data_at_tracepoint): New.
16952 (gdb_ust_probe): New.
16953 (UNIX_PATH_MAX, SOCK_DIR): New.
16954 (gdb_ust_connect_sync_socket): New.
16955 (resume_thread, stop_thread): New.
16956 (run_inferior_command): New.
16957 (init_named_socket): New.
16958 (gdb_ust_socket_init): New.
16959 (cstr_to_hexstr): New.
16960 (next_st): New.
16961 (first_marker, next_marker): New.
16962 (response_ust_marker): New.
16963 (cmd_qtfstm, cmd_qtsstm): New.
16964 (unprobe_marker_at, probe_marker_at): New.
16965 (cmd_qtstmat, gdb_ust_thread): New.
16966 (gdb_ust_init): New.
16967 (initialize_tracepoint_ftlib): Call gdb_ust_init.
16968 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
16969 (ST_REGENTRY): New.
16970 (x86_64_st_collect_regmap): New.
16971 (X86_64_NUM_ST_COLLECT_GREGS): New.
16972 (AMD64_RIP_REGNUM): New.
16973 (supply_static_tracepoint_registers): New.
16974 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
16975 (ST_REGENTRY): New.
16976 (i386_st_collect_regmap): New.
16977 (i386_NUM_ST_COLLECT_GREGS): New.
16978 (supply_static_tracepoint_registers): New.
16979 * server.c (handle_query): Handle qXfer:statictrace:read.
16980 <qSupported>: Report support for StaticTracepoints, and
16981 qXfer:statictrace:read features.
16982 * server.h (traceframe_read_sdata)
16983 (supply_static_tracepoint_registers): Declare.
16984 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
16985 (unpack_varlen_hex): Include in IPA build.
16986 * Makefile.in (ustlibs, ustinc): New.
16987 (IPA_OBJS): Add remote-utils-ipa.o.
16988 ($(IPA_LIB)): Link -ldl and -lpthread.
16989 (UST_CFLAGS): New.
16990 (IPAGENT_CFLAGS): Add UST_CFLAGS.
16991 * config.in, configure: Regenerate.
16992
16993 2010-06-20 Ian Lance Taylor <iant@google.com>
16994 Pedro Alves <pedro@codesourcery.com>
16995
16996 * linux-x86-low.c (always_true): Delete.
16997 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
16998 trying to fool the compiler with always_true.
16999
17000 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17001
17002 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17003 conditions in gdbserver.
17004
17005 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17006
17007 * spu-low.c (spu_read_memory): Wrap around local store limit.
17008 (spu_write_memory): Likewise.
17009
17010 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17011
17012 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17013 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17014 LONGEST uses.
17015 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17016 uses.
17017 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17018 uses with LONGEST uses.
17019
17020 2010-06-14 Stan Shebs <stan@codesourcery.com>
17021 Pedro Alves <pedro@codesourcery.com>
17022
17023 Bytecode compiler.
17024
17025 * linux-x86-low.c: Include limits.h.
17026 (add_insns): New.
17027 (always_true): New.
17028 (EMIT_ASM): New.
17029 (EMIT_ASM32): New.
17030 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17031 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17032 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17033 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17034 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17035 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17036 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17037 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17038 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17039 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17040 (amd64_emit_void_call_2): New.
17041 (amd64_emit_ops): New.
17042 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17043 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17044 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17045 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17046 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17047 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17048 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17049 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17050 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17051 (i386_emit_stack_adjust, i386_emit_int_call_1)
17052 (i386_emit_void_call_2): New.
17053 (i386_emit_ops): New.
17054 (x86_emit_ops): New.
17055 (the_low_target): Install x86_emit_ops.
17056 * server.h (struct emit_ops): New.
17057 (get_raw_reg_func_addr): Declare.
17058 (current_insn_ptr, emit_error): Declare.
17059 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17060 (set_trace_state_variable_value): New defines.
17061 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17062 addr_get_trace_state_variable_value and
17063 addr_set_trace_state_variable_value.
17064 (symbol_list): New fields for get_raw_reg,
17065 get_trace_state_variable_value and set_trace_state_variable_value.
17066 (condfn): New typedef.
17067 (struct tracepoint): New field `compiled_cond'.
17068 (do_action_at_tracepoint): Clear compiled_cond.
17069 (get_trace_state_variable_value, set_trace_state_variable_value):
17070 Export in the IPA.
17071 (condition_true_at_tracepoint): If there's a compiled condition,
17072 run that.
17073 (current_insn_ptr, emit_error): New globals.
17074 (struct bytecode_address): New.
17075 (get_raw_reg_func_addr): New.
17076 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17077 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17078 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17079 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17080 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17081 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17082 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17083 (compile_tracepoint_condition, compile_bytecodes): New.
17084 * target.h (emit_ops): Forward declare.
17085 (struct target_ops): New field emit_ops.
17086 (target_emit_ops): New.
17087 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17088 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17089 * linux-low.c (linux_emit_ops): New.
17090 (linux_target_ops): Install it.
17091 * linux-low.h (struct linux_target_ops): New field emit_ops.
17092
17093 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17094
17095 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17096 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17097
17098 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17099 Stan Shebs <stan@codesourcery.com>
17100
17101 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17102 (all): Depend on $(extra_libraries).
17103 (install-only): Install the IPA.
17104 (IPA_OBJS, IPA_LIB): New.
17105 (clean): Remove the IPA lib.
17106 (IPAGENT_CFLAGS): New.
17107 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17108 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17109 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17110 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17111 * configure.ac: Check for atomic builtins support in the compiler.
17112 (IPA_DEPFILES, extra_libraries): Define.
17113 * configure.srv (ipa_obj): Add description.
17114 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17115 (i[34567]86-*-linux*): Set ipa_obj.
17116 (x86_64-*-linux*): Set ipa_obj.
17117 * linux-low.c (stabilizing_threads): New.
17118 (supports_fast_tracepoints): New.
17119 (linux_detach): Stabilize threads before detaching.
17120 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17121 the lwp is either not stabilizing, or is moving out of a jump pad.
17122 (linux_fast_tracepoint_collecting): New.
17123 (maybe_move_out_of_jump_pad): New.
17124 (enqueue_one_deferred_signal): New.
17125 (dequeue_one_deferred_signal): New.
17126 (linux_wait_for_event_1): If moving out of a jump pad, defer
17127 pending signals to later.
17128 (linux_stabilize_threads): New.
17129 (linux_wait_1): Check if threads need moving out of jump pads, and
17130 do it if so.
17131 (stuck_in_jump_pad_callback): New.
17132 (move_out_of_jump_pad_callback): New.
17133 (lwp_running): New.
17134 (linux_resume_one_lwp): Handle moving out of jump pads.
17135 (linux_set_resume_request): Dequeue deferred signals.
17136 (need_step_over_p): Also step over fast tracepoint jumps.
17137 (start_step_over): Also uninsert fast tracepoint jumps.
17138 (finish_step_over): Also reinsert fast tracepoint jumps.
17139 (linux_install_fast_tracepoint_jump): New.
17140 (linux_target_ops): Install linux_stabilize_threads and
17141 linux_install_fast_tracepoint_jump_pad.
17142 * linux-low.h (linux_target_ops) <get_thread_area,
17143 install_fast_tracepoint_jump_pad>: New fields.
17144 (struct lwp_info) <collecting_fast_tracepoint,
17145 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17146 (linux_get_thread_area): Declare.
17147 * linux-x86-low.c (jump_insn): New.
17148 (x86_get_thread_area): New.
17149 (append_insns): New.
17150 (push_opcode): New.
17151 (amd64_install_fast_tracepoint_jump_pad): New.
17152 (i386_install_fast_tracepoint_jump_pad): New.
17153 (x86_install_fast_tracepoint_jump_pad): New.
17154 (the_low_target): Install x86_get_thread_area and
17155 x86_install_fast_tracepoint_jump_pad.
17156 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17157 (struct fast_tracepoint_jump): New.
17158 (fast_tracepoint_jump_insn): New.
17159 (fast_tracepoint_jump_shadow): New.
17160 (find_fast_tracepoint_jump_at): New.
17161 (fast_tracepoint_jump_here): New.
17162 (delete_fast_tracepoint_jump): New.
17163 (set_fast_tracepoint_jump): New.
17164 (uninsert_fast_tracepoint_jumps_at): New.
17165 (reinsert_fast_tracepoint_jumps_at): New.
17166 (set_breakpoint_at): Use write_inferior_memory.
17167 (uninsert_raw_breakpoint): Use write_inferior_memory.
17168 (check_mem_read): Mask out fast tracepoint jumps.
17169 (check_mem_write): Mask out fast tracepoint jumps.
17170 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17171 (set_fast_tracepoint_jump): Declare.
17172 (delete_fast_tracepoint_jump)
17173 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17174 (reinsert_fast_tracepoint_jumps_at): Declare.
17175 * regcache.c: Don't compile many functions when building the
17176 in-process agent library.
17177 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17178 the register buffer in the heap.
17179 (free_register_cache): If the register buffer isn't owned by the
17180 regcache, don't free it.
17181 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17182 pre-existing register caches.
17183 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17184 type.
17185 (convert_ascii_to_int): : Constify `from' parameter type.
17186 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17187 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17188 the needed buffer in-place.
17189 (relocate_instruction): New.
17190 * server.c (handle_query) <qSymbols>: If the target supports
17191 tracepoints, give it a chance of looking up symbols. Report
17192 support for fast tracepoints.
17193 (handle_status): Stabilize threads.
17194 (process_serial_event): Adjust.
17195 * server.h (struct fast_tracepoint_jump): Forward declare.
17196 (struct process_info) <fast_tracepoint_jumps>: New field.
17197 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17198 (decode_X_packet, decode_M_packet): Adjust.
17199 (relocate_instruction): Declare.
17200 (in_process_agent_loaded): Declare.
17201 (tracepoint_look_up_symbols): Declare.
17202 (struct fast_tpoint_collect_status): Declare.
17203 (fast_tracepoint_collecting): Declare.
17204 (force_unlock_trace_buffer): Declare.
17205 (handle_tracepoint_bkpts): Declare.
17206 (initialize_low_tracepoint)
17207 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17208 * target.h (struct target_ops) <stabilize_threads,
17209 install_fast_tracepoint_jump_pad>: New fields.
17210 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17211 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17212 [HAVE_STDINT_H]: Include stdint.h.
17213 (trace_debug_1): Rename to ...
17214 (trace_vdebug): ... this.
17215 (trace_debug): Rename to ...
17216 (trace_debug_1): ... this. Add `level' parameter.
17217 (trace_debug): New.
17218 (ATTR_USED, ATTR_NOINLINE): New.
17219 (IP_AGENT_EXPORT): New.
17220 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17221 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17222 (about_to_request_buffer_space, trace_buffer_is_full)
17223 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17224 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17225 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17226 (traceframe_write_count, traceframes_created)
17227 (trace_state_variables)
17228 New renaming defines.
17229 (struct ipa_sym_addresses): New.
17230 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17231 (symbol_list): New.
17232 (ipa_sym_addrs): New.
17233 (all_tracepoint_symbols_looked_up): New.
17234 (in_process_agent_loaded): New.
17235 (write_e_ipa_not_loaded): New.
17236 (maybe_write_ipa_not_loaded): New.
17237 (tracepoint_look_up_symbols): New.
17238 (debug_threads) [IN_PROCESS_AGENT]: New.
17239 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17240 (UNKNOWN_SIDE_EFFECTS): New.
17241 (stop_tracing): New.
17242 (flush_trace_buffer): New.
17243 (stop_tracing_bkpt): New.
17244 (flush_trace_buffer_bkpt): New.
17245 (read_inferior_integer): New.
17246 (read_inferior_uinteger): New.
17247 (read_inferior_data_pointer): New.
17248 (write_inferior_data_pointer): New.
17249 (write_inferior_integer): New.
17250 (write_inferior_uinteger): New.
17251 (struct collect_static_trace_data_action): Delete.
17252 (enum tracepoint_type): New.
17253 (struct tracepoint) <type>: New field `type'.
17254 <actions_str, step_actions, step_actions_str>: Only include in
17255 GDBserver.
17256 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17257 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17258 (tracepoints): Use IP_AGENT_EXPORT.
17259 (last_tracepoint): Don't include in the IPA.
17260 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17261 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17262 (alloced_trace_state_variables): New.
17263 (trace_state_variables): Use IP_AGENT_EXPORT.
17264 (traceframe_t): Delete unused variable.
17265 (circular_trace_buffer): Don't include in the IPA.
17266 (trace_buffer_start): Delete.
17267 (struct trace_buffer_control): New.
17268 (trace_buffer_free): Delete.
17269 (struct ipa_trace_buffer_control): New.
17270 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17271 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17272 New.
17273 (trace_buffer_ctrl): New.
17274 (TRACE_BUFFER_CTRL_CURR): New.
17275 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17276 Reimplement as macros.
17277 (trace_buffer_wrap): Delete.
17278 (traceframe_write_count, traceframe_read_count)
17279 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17280 (struct tracepoint_hit_ctx) <type>: New field.
17281 (struct fast_tracepoint_ctx): New.
17282 (memory_barrier): New.
17283 (cmpxchg): New.
17284 (record_tracepoint_error): Update atomically in the IPA.
17285 (clear_inferior_trace_buffer): New.
17286 (about_to_request_buffer_space): New.
17287 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17288 updating the same buffer.
17289 (add_tracepoint): Default the tracepoint's type to trap
17290 tracepoint, and orig_size to -1.
17291 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17292 internal variables.
17293 (create_trace_state_variable): New parameter `gdb'. Handle it.
17294 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17295 (cmd_qtdp): Handle fast tracepoints.
17296 (cmd_qtdv): Adjust.
17297 (max_jump_pad_size): New.
17298 (gdb_jump_pad_head): New.
17299 (get_jump_space_head): New.
17300 (claim_jump_space): New.
17301 (sort_tracepoints): New.
17302 (MAX_JUMP_SIZE): New.
17303 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17304 IPA.
17305 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17306 support. Upload fast traceframes, and delete internal IPA
17307 breakpoints.
17308 (stop_tracing_handler): New.
17309 (flush_trace_buffer_handler): New.
17310 (cmd_qtstop): Upload fast tracepoints.
17311 (response_tracepoint): Handle fast tracepoints.
17312 (tracepoint_finished_step): Upload fast traceframes. Set the
17313 tracepoint hit context's tracepoint type.
17314 (handle_tracepoint_bkpts): New.
17315 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17316 type. Add comment about fast tracepoints.
17317 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17318 non-existing action_str field.
17319 (get_context_regcache): Handle fast tracepoints.
17320 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17321 to the regcache.
17322 (fast_tracepoint_from_jump_pad_address): New.
17323 (fast_tracepoint_from_ipa_tpoint_address): New.
17324 (collecting_t): New.
17325 (force_unlock_trace_buffer): New.
17326 (fast_tracepoint_collecting): New.
17327 (collecting): New.
17328 (gdb_collect): New.
17329 (write_inferior_data_ptr): New.
17330 (target_tp_heap): New.
17331 (target_malloc): New.
17332 (download_agent_expr): New.
17333 (UALIGN): New.
17334 (download_tracepoints): New.
17335 (download_trace_state_variables): New.
17336 (upload_fast_traceframes): New.
17337 (IPA_FIRST_TRACEFRAME): New.
17338 (IPA_NEXT_TRACEFRAME_1): New.
17339 (IPA_NEXT_TRACEFRAME): New.
17340 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17341 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17342 (gdb_jump_pad_buffer_end): New.
17343 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17344 (initialize_tracepoint): Adjust.
17345 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17346 buffer. Initialize the low module.
17347 * utils.c (PREFIX, TOOLNAME): New.
17348 (malloc_failure): Use PREFIX.
17349 (error): In the IPA, an error causes an exit.
17350 (fatal, warning): Use PREFIX.
17351 (internal_error): Use TOOLNAME.
17352 (NUMCELLS): Increase to 10.
17353 * configure, config.in: Regenerate.
17354
17355 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17356
17357 * server.c (handle_query) <qSupported>: Do two passes over the
17358 qSupported string to avoid nesting strtok.
17359
17360 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17361
17362 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17363 (CDEPS): New.
17364 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17365 -Wl,--dynamic-list.
17366 * configure: Regenerate.
17367 * proc-service.list: New.
17368
17369 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17370
17371 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17372 New comment.
17373
17374 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17375
17376 * gdbreplay.c (remote_open): Check error return from socket() call by
17377 its equality to -1 not by it being negative.
17378 * remote-utils.c (remote_open): Likewise.
17379
17380 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17381
17382 * config.h: Regenerate.
17383
17384 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17385
17386 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17387 doesn't provide PTRACE_GET_THREAD_AREA.
17388
17389 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17390
17391 * linux-m68k-low.c: Include <asm/ptrace.h>
17392 (ps_get_thread_area): Implement.
17393
17394 2010-05-03 Doug Evans <dje@google.com>
17395
17396 * event-loop.c (struct callback_event): New struct.
17397 (callback_list): New global.
17398 (append_callback_event, delete_callback_event): New functions.
17399 (process_callback): New function.
17400 (start_event_loop): Call it.
17401 * remote-utils.c (NOT_SCHEDULED): Define.
17402 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17403 moved out of readchar.
17404 (readchar): Rewrite. Call reschedule before returning.
17405 (reset_readchar): New function.
17406 (remote_close): Call it.
17407 (process_remaining, reschedule): New functions.
17408 * server.h (callback_handler_func): New typedef.
17409 (append_callback_event, delete_callback_event): Declare.
17410
17411 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17412
17413 * proc-service.c (ps_pglobal_lookup): Use
17414 thread_db_look_up_one_symbol.
17415 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17416 parameter. Use it instead of all_symbols_looked_up.
17417 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17418 field.
17419 (all_symbols_looked_up): Don't declare.
17420 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17421 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17422 field.
17423 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17424 Set all_symbols_looked_up here.
17425 (thread_db_look_up_one_symbol): New.
17426 (thread_db_get_tls_address): Adjust.
17427 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17428 thread_db object on the heap, and tentatively set it in the
17429 process structure.
17430 (thread_db_init): Don't set all_symbols_looked_up here.
17431 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17432
17433 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17434
17435 * linux-low.c (linux_kill, linux_detach): Adjust.
17436 (status_pending_p_callback): Remove redundant statement. Check
17437 for !TARGET_WAITIKIND_IGNORE, instead of
17438 TARGET_WAITKIND_STOPPED.
17439 (handle_tracepoints): Make sure LWP is locked. Adjust.
17440 (linux_wait_for_event_1): Adjust.
17441 (linux_cancel_breakpoints): New.
17442 (unsuspend_one_lwp): New.
17443 (unsuspend_all_lwps): New.
17444 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17445 (send_sigstop_callback): Change return type to int, add new
17446 `except' parameter and handle it.
17447 (suspend_and_send_sigstop_callback): New.
17448 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17449 pass them down. If SUSPEND, also increment the lwp's suspend
17450 count.
17451 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17452 (need_step_over_p): Don't consider suspended LWPs.
17453 (start_step_over): Adjust.
17454 (proceed_one_lwp): Change return type to int, add new `except'
17455 parameter and handle it.
17456 (unsuspend_and_proceed_one_lwp): New.
17457 (proceed_all_lwps): Use find_inferior instead of
17458 for_each_inferior.
17459 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17460 also decrement the suspend count of LWPs. Pass `except' down,
17461 instead of hacking its suspend count.
17462 (linux_pause_all): Add `freeze' parameter. Adjust.
17463 (linux_unpause_all): New.
17464 (linux_target_ops): Install linux_unpause_all.
17465 * server.c (handle_status): Adjust.
17466 * target.h (struct target_ops): New fields `unpause_all' and
17467 `cancel_breakpoints'. Add new parameter to `pause_all'.
17468 (pause_all): Add new `freeze' parameter.
17469 (unpause_all): New.
17470 (cancel_breakpoints): New.
17471 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17472 cancel breakpoints.
17473 (cmd_qtstart): Pause threads.
17474 (stop_tracing): Pause threads, and cancel breakpoints.
17475 * win32-low.c (win32_target_ops): Adjust.
17476
17477 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17478
17479 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17480 the inferior right away from here...
17481 (linux_wait_1): ... to here, and adjust to check the thread's
17482 last_resume_kind instead of the lwp's step or stop_expected flags.
17483
17484 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17485
17486 * README: Use consistent `GDB' and `GDBserver' spellings.
17487
17488 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17489
17490 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17491 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17492 (linux_detach_one_lwp): Assume the lwp is stopped.
17493 (any_thread_of): Delete.
17494 (linux_detach): Stop all lwps here. Don't blindly delete all
17495 breakpoints.
17496 (delete_lwp_callback): New.
17497 (linux_mourn): Delete all lwps of the process that is gone.
17498 (linux_wait_1): Don't delete the last lwp of the process here.
17499 * mem-break.h (mark_breakpoints_out): Declare.
17500 * mem-break.c (mark_breakpoints_out): New.
17501 (free_all_breakpoints): Use it.
17502 * server.c (handle_target_event): If the process is gone, mark
17503 breakpoints out.
17504 * thread-db.c (struct thread_db) <create_bp>: New field.
17505 (thread_db_enable_reporting): Fix prototype. Store a thread event
17506 breakpoint reference in the thread_db struct.
17507 (thread_db_load_search): Clear the thread_db object.
17508 (try_thread_db_load_1): Ditto.
17509 (switch_to_process): New.
17510 (disable_thread_event_reporting): Use it.
17511 (remove_thread_event_breakpoints): New.
17512 (thread_db_detach, thread_db_mourn): Use it.
17513
17514 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17515
17516 * linux-low.c (linux_enable_event_reporting): New.
17517 (linux_wait_for_event_1, handle_extended_wait): Use it.
17518
17519 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17520
17521 * linux-low.c (linux_kill_one_lwp, linux_kill)
17522 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17523 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17524 SIGSTOP even if the LWP is stopped.
17525 (send_sigstop_callback): New.
17526 (stop_all_lwps): Use send_sigstop_callback instead.
17527 (linux_resume_one_thread): Adjust.
17528 (proceed_one_lwp): Still proceed an LWP that the client has
17529 requested to stop, if we haven't reported it as stopped yet. Make
17530 sure that LWPs the client want stopped, have a pending SIGSTOP.
17531
17532 2010-04-26 Doug Evans <dje@google.com>
17533
17534 * server.c (handle_general_set): Make static.
17535
17536 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17537 Print received char after testing for error/eof instead of before.
17538 (input_interrupt): Tweak comment.
17539
17540 2010-04-23 Doug Evans <dje@google.com>
17541
17542 * server.c (start_inferior): Print inferior argv if --debug.
17543
17544 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17545
17546 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17547 * nto-x86-low.c: Include server.h
17548
17549 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17550
17551 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17552 be consistent with other sources of this directory.
17553 (init_registers_amd64): Correct name of source file of this function
17554 in the comment.
17555
17556 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17557
17558 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17559 64-bit executables.
17560
17561 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17562
17563 * win32-i386-low.c: Add 64-bit support.
17564 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17565 (init_registers_amd64): Declare.
17566 (mappings): Add 64-bit version of array.
17567 (init_windows_x86): New function.
17568 (the_low_target): Change init_arch field to init_windows_x86.
17569
17570 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17571
17572 * win32-low.c: Adapt to support also 64-bit architecture.
17573 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17574 (get_image_name): Use SIZE_T type for local variable `done'.
17575 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17576 (toolhelp_get_dll_name): Idem.
17577 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17578 Use uintptr_t typecast to avoid warning.
17579 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17580 (handle_exception): Use phex_nz to avoid warning.
17581 (win32_wait): Remove unused local variable `process'.
17582
17583 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17584
17585 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17586 `amd64-avx.o'.
17587
17588 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17589
17590 * configure.ac: Use `ws2_32' library for srv_mingw.
17591 * configure: Regenerate.
17592 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17593 * remote-utils.c: Likewise.
17594
17595 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17596
17597 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17598 if __x86_64__ is defined.
17599
17600 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17601
17602 * configure: Regenerate.
17603
17604 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17605
17606 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17607 * target.h (target_ops): New get_tib_address field.
17608 * win32-low.h (win32_thread_info): Add thread_local_base field.
17609 * win32-low.c (child_add_thread): Add tlb argument.
17610 Set thread_local_base field to TLB.
17611 (get_child_debug_event): Adapt to child_add_thread change.
17612 (win32_get_tib_address): New function.
17613 (win32_target_ops): Set get_tib_address field to
17614 win32_get_tib_address.
17615 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17616
17617 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17618
17619 * linux-low.c (linux_mourn): Also remove the process.
17620 * server.c (handle_target_event): Don't remove the process here.
17621 * nto-low.c (nto_mourn): New.
17622 (nto_target_ops): Install it.
17623 * spu-low.c (spu_mourn): New.
17624 (spu_target_ops): Install it.
17625 * win32-low.c (win32_mourn): New.
17626 (win32_target_ops): Install it.
17627
17628 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17629
17630 * server.h (buffer_xml_printf): Remove redundant `;'.
17631
17632 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17633
17634 * regcache.c (set_register_cache): Invalidate regcaches before
17635 changing the register cache layout.
17636 (regcache_invalidate_one): Allow a NULL regcache.
17637 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17638 regcaches before changing the register cache layout or the target
17639 regsets.
17640
17641 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17642
17643 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17644 variable warning on Linux/x86-64.
17645
17646 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17647
17648 GDBserver disconnected tracing support.
17649
17650 * linux-low.c (linux_remove_process): Delete.
17651 (add_lwp): Don't set last_resume_kind here.
17652 (linux_kill): Use `mourn'.
17653 (linux_detach): Use `thread_db_detach', and `mourn'.
17654 (linux_mourn): New.
17655 (linux_attach_lwp_1): Adjust comment.
17656 (linux_attach): last_resume_kind moved the thread_info; adjust.
17657 (status_pending_p_callback): Adjust.
17658 (linux_wait_for_event_1): Adjust.
17659 (count_events_callback, select_singlestep_lwp_callback)
17660 (select_event_lwp_callback, cancel_breakpoints_callback)
17661 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17662 (proceed_one_lwp): Adjust.
17663 (linux_async): Add debug output.
17664 (linux_thread_stopped): New.
17665 (linux_pause_all): New.
17666 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17667 linux_pause_all.
17668 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17669 (thread_db_free): Delete declaration.
17670 (thread_db_detach, thread_db_mourn): Declare.
17671 * thread-db.c (thread_db_init): Use thread_db_mourn.
17672 (thread_db_free): Delete, split in two.
17673 (disable_thread_event_reporting): New.
17674 (thread_db_detach): New.
17675 (thread_db_mourn): New.
17676
17677 * server.h (struct thread_info) <last_resume_kind>: New field.
17678 <attached>: Add comment.
17679 <gdb_detached>: New field.
17680 (handler_func): Change return type to int.
17681 (handle_serial_event, handle_target_event): Ditto.
17682 (gdb_connected): Declare.
17683 (tracing): Delete.
17684 (disconnected_tracing): Declare.
17685 (stop_tracing): Declare.
17686
17687 * server.c (handle_query) <qSupported>: Report support for
17688 disconnected tracing.
17689 (queue_stop_reply_callback): Account for running threads.
17690 (gdb_wants_thread_stopped): New.
17691 (gdb_wants_all_threads_stopped): New.
17692 (gdb_reattached_process): New.
17693 (handle_status): Clear the `gdb_detached' flag of all processes.
17694 In all-stop, stop all threads.
17695 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17696 (process_serial_event): If the remote connection breaks, or if an
17697 exit was forced with "monitor exit", force an event loop exit.
17698 Handle disconnected tracing on detach.
17699 (handle_serial_event): Adjust.
17700 (handle_target_event): If GDB isn't connected, forward events back
17701 to the inferior, unless the last process exited, in which case,
17702 exit gdbserver. Adjust interface.
17703
17704 * remote-utils.c (remote_open): Don't block in accept. Instead
17705 register an event loop source on the listen socket file
17706 descriptor. Refactor bits into ...
17707 (listen_desc): ... this new global.
17708 (gdb_connected): ... this new function.
17709 (enable_async_notification): ... this new function.
17710 (handle_accept_event): ... this new function.
17711 (remote_close): Clear remote_desc.
17712
17713 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17714
17715 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17716 New fields.
17717 (mourn_inferior): Define.
17718 (target_process_qsupported): Avoid the dangling else problem.
17719 (thread_stopped): Define.
17720 (pause_all): Define.
17721 (target_waitstatus_to_string): Declare.
17722 * target.c (target_waitstatus_to_string): New.
17723
17724 * tracepoint.c (tracing): Make extern.
17725 (disconnected_tracing): New.
17726 (stop_tracing): Make extern. Handle tracing stops due to GDB
17727 disconnecting.
17728 (cmd_qtdisconnected): New.
17729 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17730 (handle_tracepoint_general_set): Handle QTDisconnected.
17731
17732 * event-loop.c (event_handler_func): Change return type to int.
17733 (process_event): Bail out if the event handler wants the event
17734 loop to stop.
17735 (handle_file_event): Ditto.
17736 (start_event_loop): Bail out if the event handler wants the event
17737 loop to stop.
17738
17739 * nto-low.c (nto_target_ops): Adjust.
17740 * spu-low.c (spu_wait): Don't remove the process here.
17741 (spu_target_ops): Adjust.
17742 * win32-low.c (win32_wait): Don't remove the process here.
17743 (win32_target_ops): Adjust.
17744
17745 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17746
17747 * regcache.c (realloc_register_cache): Invalidate inferior's
17748 regcache before recreating it.
17749
17750 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17751
17752 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17753
17754 2010-04-09 Stan Shebs <stan@codesourcery.com>
17755 Pedro Alves <pedro@codesourcery.com>
17756
17757 * server.h (LONGEST): New.
17758 (struct thread_info) <while_stepping>: New field.
17759 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17760 Declare.
17761 (initialize_tracepoint, handle_tracepoint_general_set)
17762 (handle_tracepoint_query, tracepoint_finished_step)
17763 (tracepoint_was_hit, release_while_stepping_state_list):
17764 (current_traceframe): Declare.
17765 * server.c (handle_general_set): Handle tracepoint packets.
17766 (read_memory): New.
17767 (write_memory): New.
17768 (handle_search_memory_1): Use read_memory.
17769 (handle_query): Report support for conditional tracepoints, trace
17770 state variables, and tracepoint sources. Handle tracepoint
17771 queries.
17772 (main): Initialize the tracepoints module.
17773 (process_serial_event): Handle traceframe reads/writes.
17774
17775 * linux-low.c (handle_tracepoints): New.
17776 (linux_wait_1): Call it.
17777 (linux_resume_one_lwp): Handle while-stepping.
17778 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17779 (linux_target_ops): Install them.
17780 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17781 New field.
17782 * linux-x86-low.c (x86_supports_tracepoints): New.
17783 (the_low_target). Install it.
17784
17785 * mem-break.h (delete_breakpoint): Declare.
17786 * mem-break.c (delete_breakpoint): Make external.
17787
17788 * target.h (struct target_ops): Add `supports_tracepoints',
17789 `read_pc', and `write_pc' fields.
17790 (target_supports_tracepoints): Define.
17791 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17792 (phex_nz): New.
17793
17794 * regcache.h (struct regcache) <registers_owned>: New field.
17795 (init_register_cache, regcache_cpy): Declare.
17796 (regcache_read_pc, regcache_write_pc): Declare.
17797 (register_cache_size): Declare.
17798 (supply_regblock): Declare.
17799 * regcache.c (init_register_cache): New.
17800 (new_register_cache): Use it.
17801 (regcache_cpy): New.
17802 (register_cache_size): New.
17803 (supply_regblock): New.
17804 (regcache_read_pc, regcache_write_pc): New.
17805
17806 * tracepoint.c: New.
17807
17808 * Makefile.in (OBS): Add tracepoint.o.
17809 (tracepoint.o): New rule.
17810
17811 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17812
17813 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17814 (i386-mmx.o): New.
17815 (i386-mmx.c): Likewise.
17816 (i386-mmx-linux.o): Likewise.
17817 (i386-mmx-linux.c): Likewise.
17818
17819 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17820 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17821 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17822 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17823
17824 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17825 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17826 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17827
17828 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17829
17830 * Makefile.in (clean): Updated.
17831 (i386-avx.o): New.
17832 (i386-avx.c): Likewise.
17833 (i386-avx-linux.o): Likewise.
17834 (i386-avx-linux.c): Likewise.
17835 (amd64-avx.o): Likewise.
17836 (amd64-avx.c): Likewise.
17837 (amd64-avx-linux.o): Likewise.
17838 (amd64-avx-linux.c): Likewise.
17839
17840 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17841 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17842 (srv_amd64_regobj): Add amd64-avx.o.
17843 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17844 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17845 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17846 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17847 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17848 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17849 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17850
17851 * i387-fp.c: Include "i386-xstate.h".
17852 (i387_xsave): New.
17853 (i387_cache_to_xsave): Likewise.
17854 (i387_xsave_to_cache): Likewise.
17855 (x86_xcr0): Likewise.
17856
17857 * i387-fp.h (i387_cache_to_xsave): Likewise.
17858 (i387_xsave_to_cache): Likewise.
17859 (x86_xcr0): Likewise.
17860
17861 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17862 * linux-crisv32-low.c (target_regsets): Likewise.
17863 * linux-m68k-low.c (target_regsets): Likewise.
17864 * linux-mips-low.c (target_regsets): Likewise.
17865 * linux-ppc-low.c (target_regsets): Likewise.
17866 * linux-s390-low.c (target_regsets): Likewise.
17867 * linux-sh-low.c (target_regsets): Likewise.
17868 * linux-sparc-low.c (target_regsets): Likewise.
17869 * linux-xtensa-low.c (target_regsets): Likewise.
17870
17871 * linux-low.c: Include <sys/uio.h>.
17872 (regsets_fetch_inferior_registers): Support nt_type.
17873 (regsets_store_inferior_registers): Likewise.
17874 (linux_process_qsupported): New.
17875 (linux_target_ops): Add linux_process_qsupported.
17876
17877 * linux-low.h (regset_info): Add nt_type.
17878 (linux_target_ops): Add process_qsupported.
17879
17880 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
17881 and <sys/uio.h>.
17882 (init_registers_i386_avx_linux): New.
17883 (init_registers_amd64_avx_linux): Likewise.
17884 (xmltarget_i386_linux_no_xml): Likewise.
17885 (xmltarget_amd64_linux_no_xml): Likewise.
17886 (PTRACE_GETREGSET): Likewise.
17887 (PTRACE_SETREGSET): Likewise.
17888 (x86_fill_xstateregset): Likewise.
17889 (x86_store_xstateregset): Likewise.
17890 (use_xml): Likewise.
17891 (x86_linux_update_xmltarget): Likewise.
17892 (x86_linux_process_qsupported): Likewise.
17893 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
17894 (x86_arch_setup): Don't call init_registers_amd64_linux nor
17895 init_registers_i386_linux here. Call
17896 x86_linux_update_xmltarget.
17897 (the_low_target): Add x86_linux_process_qsupported.
17898
17899 * server.c (handle_query): Call target_process_qsupported.
17900
17901 * target.h (target_ops): Add process_qsupported.
17902 (target_process_qsupported): New.
17903
17904 2010-04-03 Pedro Alves <pedro@codesourcery.com>
17905
17906 * inferiors.c (add_thread): Set last_status kind to
17907 TARGET_WAITKIND_IGNORE.
17908 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
17909 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
17910 (linux_wait_1): Move `thread' local definition to block that uses
17911 it. Don't NULL initialize `event_child'.
17912 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
17913 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
17914 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
17915
17916 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17917
17918 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
17919 an extended waitstatus, or by a watchpoint.
17920 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
17921 thread was stepping or has been stopped by a watchpoint.
17922
17923 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17924
17925 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
17926 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
17927 of another, then delete the previous, and validate all
17928 breakpoints.
17929 (validate_inserted_breakpoint): New.
17930 (delete_disabled_breakpoints): New.
17931 (validate_breakpoints): New.
17932 (check_mem_read): Validate breakpoints before trusting their
17933 shadow. Delete disabled breakpoints.
17934 (check_mem_write): Validate breakpoints before trusting they
17935 should be inserted. Delete disabled breakpoints.
17936 * mem-break.h (validate_breakpoints):
17937 * server.c (handle_query): Validate breakpoints when we see a
17938 qSymbol query.
17939
17940 2010-04-01 Pedro Alves <pedro@codesourcery.com>
17941
17942 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
17943 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
17944 if we could tell there's a GDB breakpoint at stop_pc.
17945 (need_step_over_p): Don't do a step over if we find a GDB
17946 breakpoint at the resume PC.
17947
17948 * mem-break.c (struct raw_breakpoint): New.
17949 (enum bkpt_type): New type `gdb_breakpoint'.
17950 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
17951 fields. New field `raw'.
17952 (find_raw_breakpoint_at): New.
17953 (set_raw_breakpoint_at): Handle refcounting. Create a raw
17954 breakpoint instead.
17955 (set_breakpoint_at): Adjust.
17956 (delete_raw_breakpoint): New.
17957 (release_breakpoint): New.
17958 (delete_breakpoint): Rename to...
17959 (delete_breakpoint_1): ... this. Add proc parameter. Use
17960 release_breakpoint. Return ENOENT.
17961 (delete_breakpoint): Reimplement.
17962 (find_breakpoint_at): Delete.
17963 (find_gdb_breakpoint_at): New.
17964 (delete_breakpoint_at): Delete.
17965 (set_gdb_breakpoint_at): New.
17966 (delete_gdb_breakpoint_at): New.
17967 (gdb_breakpoint_here): New.
17968 (set_reinsert_breakpoint): Use release_breakpoint.
17969 (uninsert_breakpoint): Rename to ...
17970 (uninsert_raw_breakpoint): ... this.
17971 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
17972 (reinsert_raw_breakpoint): Change parameter type to
17973 raw_breakpoint.
17974 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
17975 instead.
17976 (check_breakpoints): Adjust. Use release_breakpoint.
17977 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
17978 (breakpoint_inserted_here): Ditto.
17979 (check_mem_read): Adjust to iterate over raw breakpoints instead.
17980 Don't trust the breakpoint's shadow if it is not inserted.
17981 (check_mem_write): Adjust to iterate over raw breakpoints instead.
17982 (delete_all_breakpoints): Adjust.
17983 (free_all_breakpoints): Mark all breakpoints as uninserted, and
17984 use delete_breakpoint_1.
17985
17986 * mem-break.h (breakpoints_supported): Delete declaration.
17987 (set_gdb_breakpoint_at): Declare.
17988 (gdb_breakpoint_here): Declare.
17989 (delete_breakpoint_at): Delete.
17990 (delete_gdb_breakpoint_at): Declare.
17991
17992 * server.h (struct raw_breakpoint): Forward declare.
17993 (struct process_info): New field `raw_breakpoints'.
17994
17995 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
17996 breakpoints.
17997
17998 2010-03-24 Pedro Alves <pedro@codesourcery.com>
17999
18000 * linux-low.c (status_pending_p_callback): Fix comment.
18001 (linux_wait_for_event_1): Move most of the internal breakpoint
18002 handling from here...
18003 (linux_wait_1): ... to here.
18004 (count_events_callback): New.
18005 (select_singlestep_lwp_callback): New.
18006 (select_event_lwp_callback): New.
18007 (cancel_breakpoints_callback): New.
18008 (select_event_lwp): New.
18009 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18010 priority to all LWPs that have had events that should be reported
18011 to the client. Cancel breakpoints when about to reporting the
18012 event to the client, not while stopping lwps. No longer cancel
18013 finished single-steps here.
18014 (cancel_finished_single_step): Delete.
18015 (cancel_finished_single_steps): Delete.
18016
18017 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18018
18019 * mem-break.c (enum bkpt_type): New.
18020 (struct breakpoint): New field `type'.
18021 (set_breakpoint_at): Change return type to struct breakpoint
18022 pointer. Set type to `other_breakpoint' by default.
18023 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18024 in the breakpoint list.
18025 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18026 (reinsert_breakpoint): Rename to ...
18027 (reinsert_raw_breakpoint): ... this.
18028 (reinsert_breakpoints_at): Adjust.
18029 * mem-break.h (struct breakpoint): Declare.
18030 (set_breakpoint_at): Change return type to struct breakpoint
18031 pointer.
18032
18033 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18034
18035 * server.c (handle_query): Assign, not compare.
18036
18037 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18038
18039 Teach linux gdbserver to step-over-breakpoints.
18040
18041 * linux-low.c (can_hardware_single_step): New.
18042 (supports_breakpoints): New.
18043 (handle_extended_wait): If stopping threads, read the stop pc of
18044 the new cloned LWP.
18045 (get_pc): New.
18046 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18047 low target doesn't support retrieving the PC.
18048 (add_lwp): Set last_resume_kind to resume_continue.
18049 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18050 (linux_attach): Don't clear stop_expected. Set the lwp's
18051 last_resume_kind to resume_stop.
18052 (linux_detach_one_lwp): Don't check for removed breakpoints.
18053 (check_removed_breakpoint): Delete.
18054 (status_pending_p): Rename to ...
18055 (status_pending_p_callback): ... this. Don't check for removed
18056 breakpoints. Don't consider threads that are stopped from GDB's
18057 perspective.
18058 (linux_wait_for_lwp): Always read the stop_pc here.
18059 (cancel_breakpoint): New.
18060 (step_over_bkpt): New global.
18061 (linux_wait_for_event_1): Implement stepping over breakpoints.
18062 (gdb_wants_lwp_stopped): New.
18063 (gdb_wants_all_stopped): New.
18064 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18065 single-step traps here. Store the thread's last reported target
18066 wait status.
18067 (send_sigstop): Don't clear stop_expected. Always set it,
18068 instead.
18069 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18070 (cancel_finished_single_step): New.
18071 (cancel_finished_single_steps): New.
18072 (wait_for_sigstop): Don't cancel finished single-step traps here.
18073 (linux_resume_one_lwp): Don't check for removed breakpoints.
18074 Don't set `step' on non-hardware step archs.
18075 (linux_set_resume_request): Ignore resume_stop requests if already
18076 stopping or stopped. Set the lwp's last_resume_kind.
18077 (resume_status_pending_p): Don't check for removed breakpoints.
18078 (need_step_over_p): New.
18079 (start_step_over): New.
18080 (finish_step_over): New.
18081 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18082 requests. Clear the thread's last reported target waitstatus.
18083 Don't use the `suspended' flag. Don't consider pending breakpoints.
18084 (linux_resume): Start a step-over if necessary.
18085 (proceed_one_lwp): New.
18086 (proceed_all_lwps): New.
18087 (unstop_all_lwps): New.
18088 * linux-low.h (struct lwp_info): Rewrite comment for the
18089 `suspended' flag. Add the `stop_pc' field. Delete the
18090 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18091 Add `'last_resume_kind' and `need_step_over' fields.
18092 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18093 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18094 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18095 (set_raw_breakpoint_at): New.
18096 (set_breakpoint_at): Rewrite to use it.
18097 (reinsert_breakpoint_handler): Delete.
18098 (set_reinsert_breakpoint): New.
18099 (reinsert_breakpoint_by_bp): Delete.
18100 (delete_reinsert_breakpoints): New.
18101 (uninsert_breakpoint): Rewrite.
18102 (uninsert_breakpoints_at): New.
18103 (reinsert_breakpoint): Rewrite.
18104 (reinsert_breakpoints_at): New.
18105 (check_breakpoints): Rewrite.
18106 (breakpoint_here): New.
18107 (breakpoint_inserted_here): New.
18108 (check_mem_read): Adjust.
18109 * mem-break.h (breakpoints_supported, breakpoint_here)
18110 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18111 (reinsert_breakpoint_by_bp): Delete declaration.
18112 (delete_reinsert_breakpoints): Declare.
18113 (reinsert_breakpoint): Delete declaration.
18114 (reinsert_breakpoints_at): Declare.
18115 (uninsert_breakpoint): Delete declaration.
18116 (uninsert_breakpoints_at): Declare.
18117 (check_breakpoints): Adjust prototype.
18118 * server.h: Adjust include order.
18119 (struct thread_info): Declare here. Add a `last_status' field.
18120
18121 2010-03-23 Michael Snyder <msnyder@vmware.com>
18122
18123 * server.c (crc32): New function.
18124 (handle_query): Add handling for 'qCRC:' request.
18125
18126 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18127
18128 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18129 lwp had been stopped by a watchpoint.
18130
18131 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18132
18133 * server.h (internal_error): Declare.
18134 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18135 * utils.c (internal_error): New function.
18136
18137 2010-03-15 Andreas Schwab <schwab@redhat.com>
18138
18139 * configure.srv: Fix typo setting srv_regobj.
18140
18141 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18142
18143 * linux-low.c (fetch_register): Avoid passing a non string literal
18144 format to `error'.
18145 (usr_store_inferior_registers): Ditto.
18146
18147 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18148
18149 * linux-low.c (linux_write_memory): Bail out early if peeking
18150 memory failed.
18151
18152 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18153
18154 * linux-low.h (struct lwp_info): New fields
18155 `stopped_by_watchpoint' and `stopped_data_address'.
18156 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18157 here, and cache them in the lwp object.
18158 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18159 directly.
18160 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18161 field.
18162 (linux_stopped_by_watchpoint): Rewrite.
18163 (linux_stopped_data_address): Rewrite.
18164
18165 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18166
18167 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18168 switching the current inferior, not before.
18169
18170 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18171
18172 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18173 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18174 i386-linux.c and amd64-linux.c.
18175 (reg-i386.o): Removed.
18176 (reg-i386.c): Likewise.
18177 (reg-i386-linux.o): Likewise.
18178 (reg-i386-linux.c): Likewise.
18179 (reg-x86-64.o): Likewise.
18180 (reg-x86-64.c): Likewise.
18181 (reg-x86-64-linux.o): Likewise.
18182 (reg-x86-64-linux.c): Likewise.
18183 (i386.o): New.
18184 (i386.c): Likewise.
18185 (i386-linux.o): Likewise.
18186 (i386-linux.c): Likewise.
18187 (amd64.o): Likewise.
18188 (amd64.c): Likewise.
18189 (amd64-linux.o): Likewise.
18190 (amd64-linux.c): Likewise.
18191
18192 * configure.srv (srv_i386_regobj): New.
18193 (srv_i386_linux_regobj): Likewise.
18194 (srv_amd64_regobj): Likewise.
18195 (srv_amd64_linux_regobj): Likewise.
18196 (srv_i386_32bit_xmlfiles): Likewise.
18197 (srv_i386_64bit_xmlfiles): Likewise.
18198 (srv_i386_xmlfiles): Likewise.
18199 (srv_amd64_xmlfiles): Likewise.
18200 (srv_i386_linux_xmlfiles): Likewise.
18201 (srv_amd64_linux_xmlfiles): Likewise.
18202 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18203 srv_xmlfiles to $srv_i386_xmlfiles.
18204 (i[34567]86-*-mingw32ce*): Likewise.
18205 (i[34567]86-*-mingw*): Likewise.
18206 (i[34567]86-*-nto*): Likewise.
18207 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18208 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18209 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18210 (x86_64-*-linux*): Likewise.
18211
18212 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18213 (init_registers_amd64_linux): New.
18214 (x86_arch_setup): Replace init_registers_x86_64_linux with
18215 init_registers_amd64_linux.
18216
18217 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18218
18219 * configure.ac: Check for libdl. If it is not available link against
18220 static libthread_db.
18221 * configure: Regenerate.
18222
18223 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18224
18225 PR9605
18226
18227 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18228 handing a read watchpoint.
18229 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18230
18231 2010-02-12 Doug Evans <dje@google.com>
18232
18233 * linux-low.c (linux_supports_tracefork_flag): Document.
18234 (linux_look_up_symbols): Add comment.
18235
18236 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18237
18238 * regcache.c (supply_register): Clear regcache if buf is NULL.
18239
18240 2010-02-02 Nicolas Roche <roche@sourceware.org>
18241 Joel Brobecker <brobecker@adacore.com>
18242
18243 * inferiors.c (find_inferior): Add function documentation.
18244 (unloaded_dll): Handle the case where the unloaded dll has not
18245 been previously registered in the dll list.
18246
18247 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18248
18249 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18250 (thumb2_breakpoint): New.
18251 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18252
18253 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18254
18255 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18256 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18257 breakpoints.
18258
18259 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18260
18261 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18262
18263 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18264
18265 * linux-s390-low.c (s390_collect_ptrace_register)
18266 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18267
18268 2010-01-21 Doug Evans <dje@google.com>
18269
18270 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18271 (PTRACE_ARG4_TYPE): New macro.
18272 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18273 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18274 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18275 (usr_store_inferior_registers): Ditto.
18276 (linux_read_memory, linux_write_memory): Ditto.
18277 (linux_test_for_tracefork): Ditto.
18278
18279 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18280 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18281
18282 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18283
18284 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18285 target.
18286
18287 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18288
18289 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18290 prototype to take a regcache. Adjust.
18291
18292 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18293
18294 * regcache.h (struct thread_info): Forward declare.
18295 (struct regcache): New.
18296 (new_register_cache): Adjust prototype.
18297 (get_thread_regcache): Declare.
18298 (free_register_cache): Adjust prototype.
18299 (registers_to_string, registers_from_string): Ditto.
18300 (supply_register, supply_register_by_name, collect_register)
18301 (collect_register_as_string, collect_register_by_name): Ditto.
18302 * regcache.c (struct inferior_regcache_data): Delete.
18303 (get_regcache): Rename to ...
18304 (get_thread_regcache): ... this. Adjust. Switch inferior before
18305 fetching registers.
18306 (regcache_invalidate_one): Adjust.
18307 (regcache_invalidate): Fix prototype.
18308 (new_register_cache): Return the new register cache.
18309 (free_register_cache): Change prototype.
18310 (realloc_register_cache): Adjust.
18311 (registers_to_string): Change prototype to take a regcache. Adjust.
18312 (registers_from_string): Ditto.
18313 (register_data): Ditto.
18314 (supply_register): Ditto.
18315 (supply_register_by_name): Ditto.
18316 (collect_register): Ditto.
18317 (collect_register_as_string): Ditto.
18318 (collect_register_by_name): Ditto.
18319 * server.c (process_serial_event): Adjust.
18320 * linux-low.h (regset_fill_func, regset_store_func): Change
18321 prototype.
18322 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18323 Change prototype.
18324 * linux-low.c (get_stop_pc): Adjust.
18325 (check_removed_breakpoint): Adjust.
18326 (linux_wait_for_event): Adjust.
18327 (linux_resume_one_lwp): Adjust.
18328 (fetch_register): Add regcache parameter. Adjust.
18329 (usr_store_inferior_registers): Ditto.
18330 (regsets_fetch_inferior_registers): Ditto.
18331 (regsets_store_inferior_registers): Ditto.
18332 (linux_fetch_registers, linux_store_registers): Ditto.
18333 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18334 regcache. Adjust.
18335 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18336 Ditto.
18337 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18338 prototype to take a regcache.
18339 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18340 * remote-utils.c (convert_ascii_to_int, outreg)
18341 (prepare_resume_reply): Change prototype to take a regcache.
18342 Adjust.
18343 * target.h (struct target_ops) <fetch_registers, store_registers>:
18344 Change prototype to take a regcache.
18345 (fetch_inferior_registers, store_inferior_registers): Change
18346 prototype to take a regcache. Adjust.
18347 * proc-service.c (ps_lgetregs): Adjust.
18348 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18349 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18350 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18351 take a regcache. Adjust.
18352 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18353 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18354 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18355 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18356 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18357 (cris_cannot_fetch_register):
18358 (cris_breakpoint_at): Change prototype to take a regcache.
18359 Adjust.
18360 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18361 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18362 to take a regcache. Adjust.
18363 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18364 Adjust.
18365 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18366 take a regcache. Adjust.
18367 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18368 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18369 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18370 * linux-mips-low.c (mips_get_pc):
18371 (mips_set_pc): Change prototype to take a regcache. Adjust.
18372 (mips_reinsert_addr): Adjust.
18373 (mips_collect_register): Change prototype to take a regcache.
18374 Adjust.
18375 (mips_supply_register):
18376 (mips_collect_register_32bit, mips_supply_register_32bit)
18377 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18378 (mips_store_fpregset): Ditto.
18379 * linux-ppc-low.c (ppc_supply_ptrace_register)
18380 (ppc_supply_ptrace_register): Ditto.
18381 (parse_spufs_run): Adjust.
18382 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18383 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18384 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18385 take a regcache. Adjust.
18386 * linux-s390-low.c (s390_collect_ptrace_register)
18387 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18388 (s390_set_pc): Change prototype to take a regcache. Adjust.
18389 (s390_arch_setup): Adjust.
18390 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18391 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18392 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18393 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18394 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18395 regcache. Adjust.
18396 (sparc_breakpoint_at): Adjust.
18397 * linux-xtensa-low.c (xtensa_fill_gregset):
18398 (xtensa_store_gregset):
18399 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18400 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18401 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18402 prototype to take a regcache. Adjust.
18403 * win32-arm-low.c (arm_fetch_inferior_register)
18404 (arm_store_inferior_register): Change prototype to take a
18405 regcache. Adjust.
18406 * win32-i386-low.c (i386_fetch_inferior_register)
18407 (i386_store_inferior_register): Change prototype to take a
18408 regcache. Adjust.
18409 * win32-low.c (child_fetch_inferior_registers)
18410 (child_store_inferior_registers): Change prototype to take a
18411 regcache. Adjust.
18412 (win32_wait): Adjust.
18413 (win32_fetch_inferior_registers): Change prototype to take a
18414 regcache. Adjust.
18415 (win32_store_inferior_registers): Adjust.
18416 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18417 store_inferior_register>: Change prototype to take a regcache.
18418
18419 2010-01-20 Doug Evans <dje@google.com>
18420
18421 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18422 #ifdef.
18423 (linux_wait_for_event1, linux_init_signals): Ditto.
18424 (W_STOPCODE): Provide definition if missing.
18425
18426 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18427
18428 * linux-low.c (linux_core_of_thread): New.
18429 (compare_ints, show_process, list_threads): New.
18430 (linux_qxfer_osdata): Report threads and cores.
18431 (linux_target_op): Register linux_core_of_thread.
18432 * remote-utils.c (prepare_resume_reply): Report the core.
18433 (buffer_xml_printf): Support %d specifier.
18434 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18435 New.
18436 (handle_query): Handle qXfer:threads. Announce availability
18437 thereof.
18438 * target.h (struct target_ops): New field core_of_thread.
18439
18440 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18441
18442 * Makefile.in (clean): Remove new generated files.
18443 (reg-s390.o, reg-s390.c): Remove rules.
18444 (reg-s390x.o, reg-s390x.c): Likewise.
18445 (s390-linux32.o, s390-linux32.c): Add rules.
18446 (s390-linux64.o, s390-linux64.c): Likewise.
18447 (s390x-linux64.o, s390x-linux64.c): Likewise.
18448 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18449 * linux-s390-low.c: Include <elf.h>.
18450 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18451 (init_registers_s390): Remove prototype.
18452 (init_registers_s390x): Likewise.
18453 (init_registers_s390_linux32): Add prototype.
18454 (init_registers_s390_linux64): Likewise.
18455 (init_registers_s390x_linux64): Likewise.
18456 (s390_num_regs_3264): New define.
18457 (s390_regmap_3264): New global variable.
18458 (s390_cannot_fetch_register): Remove obsolete check.
18459 (s390_cannot_store_register): Likewise.
18460 (s390_collect_ptrace_register): Handle upper/lower register halves.
18461 (s390_supply_ptrace_register): Likewise.
18462 (s390_fill_gregset): Update to register number changes.
18463 (s390_get_hwcap): New routine.
18464 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18465 Install appropriate regmap and register set.
18466
18467 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18468
18469 * server.c (gdbserver_version): Update copyright year to 2010.
18470 * gdbreplay.c (gdbreplay_version): Likewise.
18471
18472 2009-12-28 Doug Evans <dje@google.com>
18473
18474 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18475 elf/external.h. Include <elf.h> instead but only if necessary.
18476
18477 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18478
18479 * linux-low.c (linux_remove_process): Remove `detaching'
18480 parameter. Don't release/detach from thread_db here.
18481 (linux_kill): Release/detach from thread_db here, ...
18482 (linux_detach): ... and here, before actually detaching.
18483 (linux_wait_1): ... and here, when a process exits.
18484 * thread-db.c (any_thread_of): New.
18485 (thread_db_free): Switch the current inferior to a thread of the
18486 passed in process.
18487
18488 2009-12-21 Doug Evans <dje@google.com>
18489
18490 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18491
18492 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18493 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18494 warning ifndef __NR_tkill. Move setting of errno there too.
18495 Delete unnecessary resetting of errno after syscall.
18496 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18497
18498 * configure.ac: Check for dladdr.
18499 * config.in: Regenerate.
18500 * configure: Regenerate.
18501 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18502 (try_thread_db_load): Update.
18503
18504 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18505
18506 2009-12-18 Doug Evans <dje@google.com>
18507
18508 * event-loop.c: Include unistd.h if it exists.
18509
18510 * linux-low.c (my_waitpid): Move definition away from being in
18511 between linux_tracefork_child/linux_test_for_tracefork.
18512
18513 * gdb_proc_service.h (psaddr_t): Fix type.
18514 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18515 signature to match glibc.
18516
18517 2009-12-16 Doug Evans <dje@google.com>
18518
18519 * linux-low.c (linux_read_memory): Fix argument to read.
18520
18521 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18522
18523 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18524 events, don't leave current_inferior pointing at null.
18525
18526 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18527
18528 * win32-low.c (LOG): Delete.
18529 (OUTMSG): Output to stderr.
18530 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18531 on compile time LOG macro.
18532 (win32_wait): Fix debug output.
18533
18534 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18535
18536 * win32-low.c (win32_add_one_solib): If the dll name is
18537 "ntdll.dll", prepend the system directory to the dll path.
18538
18539 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18540
18541 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18542
18543 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18544 Vladimir Prus <vladimir@codesourcery.com>
18545
18546 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18547 * configure.ac: Check for __mcoldfire__ and set
18548 gdb_cv_m68k_is_coldfire.
18549 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18550 reg-cf.o and reg-m68k.o.
18551 * configure: Regenerated.
18552
18553 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18554
18555 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18556 Pass it to thread_db_free.
18557 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18558 proper `detaching' argument to linux_remove_process.
18559 * linux-low.h (thread_db_free): Add `detaching' parameter.
18560 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18561 to thread_db_free.
18562 (thread_db_free): Add `detaching' parameter. Only
18563 call td_ta_clear_event if detaching from process.
18564
18565 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18566
18567 * thread-db.c (thread_db_free): Fix typo.
18568
18569 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18570
18571 PR gdb/10838
18572 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18573
18574 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18575
18576 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18577 with an i686 compiler.
18578 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18579 needed.
18580 * configure: Rebuilt.
18581
18582 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18583
18584 PR gdb/10783
18585
18586 * server.c (handle_search_memory_1): Correct read_addr initialization
18587 in loop for searching subsequent chunks.
18588
18589 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18590
18591 * configure.ac: New --with-libthread-db option.
18592 * thread-db.c: Allow direct dependence on libthread_db.
18593 (thread_db_free): Adjust.
18594 * config.in: Regenerate.
18595 * configure: Likewise.
18596
18597 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18598
18599 PR gdb/10757
18600 * thread-db.c (attach_thread): New function.
18601 (maybe_attach_thread): Return success/failure.
18602 (find_new_threads_callback): Adjust.
18603 (thread_db_find_new_threads): Loop until no new threads.
18604
18605 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18606
18607 * proc-service.c (ps_lgetregs): Formatting.
18608
18609 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18610
18611 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18612 * configure.ac: Adjust.
18613 * linux-low.h (struct process_info_private): Move members to struct
18614 thread_db.
18615 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18616 * linux-low.c (linux_remove_process): Adjust.
18617 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18618 * server.c (handle_query): Move code ...
18619 (handle_monitor_command): ... here. New function.
18620 * target.h (struct target_ops): New member.
18621 * thread-db.c (struct thread_db): New.
18622 (libthread_db_search_path): New variable.
18623 (thread_db_create_event, thread_db_enable_reporting)
18624 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18625 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18626 (try_thread_db_load_1, dladdr_to_soname): New functions.
18627 (try_thread_db_load, thread_db_load_search): New functions.
18628 (thread_db_init): Search for libthread_db.
18629 (thread_db_free): New function.
18630 (thread_db_handle_monitor_command): Likewise.
18631 * config.in: Regenerate.
18632 * configure: Regenerate.
18633
18634 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18635
18636 * spu-low.c (spu_kill): Wait for inferior to terminate.
18637 Call clear_inferiors.
18638 (spu_detach): Call clear_inferiors.
18639
18640 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18641
18642 * aclocal.m4: Regenerate.
18643 * config.in: Likewise.
18644 * configure: Likewise.
18645
18646 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18647
18648 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18649 (parse_spufs_run): New function.
18650 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18651 (ppc_breakpoint_at): Handle SPU breakpoints.
18652
18653 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18654
18655 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18656 (SPUFS_MAGIC): Define.
18657 (spu_enumerate_spu_ids): New function.
18658 (linux_qxfer_spu): New function.
18659 (linux_target_ops): Install linux_qxfer_spu.
18660
18661 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18662
18663 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18664 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18665 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18666 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18667 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18668 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18669 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18670 (init_registers_powerpc_cell32l): Add prototype.
18671 (init_registers_powerpc_cell64l): Likewise.
18672 (ppc_arch_setup): Detect Cell/B.E. architecture.
18673
18674 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18675
18676 * Makefile.in (datarootdir): New variable.
18677
18678 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18679
18680 * linux-low.c (linux_write_memory): Update debugging output.
18681 * Makefile.in (clean): Add new descriptions.
18682 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18683 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18684 * configure.srv: Add new files for arm*-*-linux*.
18685 * linux-arm-low.c: Add new declarations.
18686 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18687 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18688 (HWCAP_VFPv3D16): New.
18689 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18690 instead of __IWMMXT__.
18691 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18692 (arm_arch_setup): New.
18693 (target_regsets): Remove #ifdef. Add VFP regset.
18694 (the_low_target): Use arm_arch_setup.
18695
18696 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18697
18698 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18699 the main thread again.
18700
18701 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18702
18703 Adding Neutrino gdbserver.
18704 * configure: Regenerated.
18705 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18706 * configure.srv (i[34567]86-*-nto*): New target.
18707 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18708 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18709 (nto_comctrl) [__QNX__]: New function.
18710 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18711
18712 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18713
18714 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18715 srv_tgtobj.
18716
18717 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18718 Pedro Alves <pedro@codesourcery.com>
18719
18720 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18721 don't support CONTEXT_EXTENDED_REGISTERS.
18722 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18723 (the_low_target): Install them.
18724 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18725 failing with ERROR_PIPE_NOT_CONNECTED.
18726
18727 2009-06-30 Doug Evans <dje@google.com>
18728 Pierre Muller <muller@ics.u-strasbg.fr>
18729
18730 Add h/w watchpoint support to x86-linux, win32-i386.
18731 * Makefile.in (SFILES): Add i386-low.c
18732 (i386_low_h): Define.
18733 (i386-low.o): Add dependencies.
18734 (linux-x86-low.o): Add i386-low.h dependency.
18735 (win32-i386-low.o): Ditto.
18736 * i386-low.c: New file.
18737 * i386-low.h: New file.
18738 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18739 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18740 * linux-low.c (linux_add_process): Initialize arch_private.
18741 (linux_remove_process): Free arch_private.
18742 (add_lwp): Initialize arch_private.
18743 (delete_lwp): Free arch_private.
18744 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18745 provided.
18746 * linux-low.h (process_info_private): New member arch_private.
18747 (lwp_info): New member arch_private.
18748 (linux_target_ops): New members new_process, new_thread,
18749 prepare_to_resume.
18750 (ptid_of): New macro.
18751 * linux-x86-low.c: Include stddef.h, i386-low.h.
18752 (arch_process_info): New struct.
18753 (arch_lwp_info): New struct.
18754 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18755 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18756 (i386_dr_low_get_status): New function.
18757 (x86_insert_point, x86_remove_point): New functions.
18758 (x86_stopped_by_watchpoint): New function.
18759 (x86_stopped_data_address): New function.
18760 (x86_linux_new_process, x86_linux_new_thread): New functions.
18761 (x86_linux_prepare_to_resume): New function.
18762 (the_low_target): Add entries for insert_point, remove_point,
18763 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18764 prepare_to_resume.
18765 * server.c (debug_hw_points): New global.
18766 (monitor_show_help): Document set debug-hw-points.
18767 (handle_query): Process "set debug-hw-points".
18768 * server.h (debug_hw_points): Declare.
18769 (paddress): Declare.
18770 * utils.c (NUMCELLS, CELLSIZE): New macros.
18771 (get_sell, xsnprintf, paddress): New functions.
18772 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18773 remove_point, stopped_by_watchpoint, stopped_data_address.
18774 * win32-i386-low.c: Include i386-low.h.
18775 (debug_reg_state): Replaces dr.
18776 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18777 (i386_dr_low_get_status): New function.
18778 (i386_insert_point, i386_remove_point): New functions.
18779 (i386_stopped_by_watchpoint): New function.
18780 (i386_stopped_data_address): New function.
18781 (i386_initial_stuff): Update.
18782 (get_thread_context,set_thread_context,i386_thread_added): Update.
18783 (the_low_target): Add entries for insert_point,
18784 remove_point, stopped_by_watchpoint, stopped_data_address.
18785 * win32-low.c (win32_insert_watchpoint): New function.
18786 (win32_remove_watchpoint): New function.
18787 (win32_stopped_by_watchpoint): New function.
18788 (win32_stopped_data_address): New function.
18789 (win32_target_ops): Add entries for insert_watchpoint,
18790 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18791 * win32-low.h (win32_target_ops): New members insert_point,
18792 remove_point, stopped_by_watchpoint, stopped_data_address.
18793
18794 2009-06-25 Pedro Alves <pedro@codesourcery.com>
18795
18796 * server.c (process_serial_event): Re-return unsupported, not
18797 error, if the type isn't recognized. Re-allow supporting only
18798 insert or remove packets. Also call require_running for
18799 breakpoints. Add missing break statement to default case. Tidy.
18800 * target.h (struct target_ops): Rename insert_watchpoint to
18801 insert_point, and remove_watchpoint to remove_point.
18802
18803 * linux-low.h (struct linux_target_ops): Likewise.
18804 * linux-low.c (linux_insert_watchpoint): Rename to ...
18805 (linux_insert_point): ... this. Adjust.
18806 (linux_remove_watchpoint): Rename to ...
18807 (linux_remove_point): ... this. Adjust.
18808 (linux_target_ops): Adjust.
18809 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18810 (cris_insert_point): ... this.
18811 (cris_remove_watchpoint): Rename to ...
18812 (cris_remove_point): ... this.
18813 (the_low_target): Adjust.
18814
18815 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18816
18817 * server.c (handle_v_kill): Pass signal_pid to
18818 kill_inferior if multi_process is zero.
18819
18820 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18821
18822 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18823 * target.h (target_ops): Comment for *_watchpoint to make it clear
18824 the functions can get types '0' and '1'.
18825
18826 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18827
18828 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18829 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18830 * regcache.c (get_regcache): Likewise.
18831 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18832 * win32-low.c (child_fetch_inferior_registers): Remove check for
18833 regno 0.
18834
18835 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18836 Pedro Alves <pedro@codesourcery.com>
18837
18838 * target.h (struct target_ops) <supports_multi_process>: New
18839 callback.
18840 (target_supports_multi_process): New.
18841 * server.c (handle_query): Even if GDB reports support, only
18842 enable multi-process if the target also supports it. Report
18843 multi-process support only if the target backend supports it.
18844 * linux-low.c (linux_supports_multi_process): New function.
18845 (linux_target_ops): Install it as target_supports_multi_process
18846 callback.
18847
18848 2009-05-24 Doug Evans <dje@google.com>
18849
18850 Global renaming of find_thread_pid to find_thread_ptid.
18851 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18852 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18853 All callers updated.
18854
18855 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18856 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18857 directly.
18858
18859 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18860 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18861 (linux_resume_one_lwp): Ditto.
18862
18863 2009-05-23 Doug Evans <dje@google.com>
18864
18865 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18866 from struct inferior_list_entry * to struct lwp_info *.
18867 All callers updated.
18868
18869 2009-05-13 Doug Evans <dje@google.com>
18870
18871 * linux-x86-low.c: Don't include assert.h.
18872 (x86_siginfo_fixup): Use fatal, not assert.
18873 (x86_arch_setup): Fix comment.
18874
18875 2009-05-12 Doug Evans <dje@google.com>
18876
18877 Biarch support for i386/amd64 gdbserver.
18878 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
18879 Add linux-x86-low.c.
18880 (linux-i386-low.o, linux-x86-64-low.o): Delete.
18881 (linux-x86-low.o): Add.
18882 * linux-x86-64-low.c: Delete.
18883 * linux-i386-low.c: Delete.
18884 * linux-x86-low.c: New file.
18885 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
18886 linux-x86-low.o.
18887 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
18888 linux-x86-low.o.
18889 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
18890 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
18891 (linux_child_pid_to_exec_file): New function.
18892 (elf_64_header_p, elf_64_file_p): New functions.
18893 (siginfo_fixup): New function.
18894 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
18895 give target a chance to convert layout.
18896 * linux-low.h (linux_target_ops): New member siginfo_fixup.
18897 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
18898
18899 2009-05-07 Doug Evans <dje@google.com>
18900
18901 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
18902 (regsets_store_inferior_registers): Ditto.
18903
18904 2009-05-06 Pedro Alves <pedro@codesourcery.com>
18905
18906 PR server/10048
18907
18908 * linux-low.c (must_set_ptrace_flags): Delete.
18909 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
18910 of the global.
18911 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
18912 `lwp->must_set_ptrace_flags' instead.
18913 (linux_wait_for_event_1): Set ptrace options here.
18914 (linux_wait_1): ... not here.
18915
18916 2009-04-30 Doug Evans <dje@google.com>
18917
18918 * inferiors.c (started_inferior_callback): New function.
18919 (attached_inferior_callback): New function.
18920 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
18921 * server.c (print_started_pid, print_attached_pid): New functions.
18922 (detach_or_kill_for_exit): New function.
18923 (main): Call it instead of for_each_inferior (kill_inferior_callback).
18924 * server.h (have_started_inferiors_p): Declare.
18925 (have_attached_inferiors_p): Declare.
18926
18927 * inferiors.c (remove_process): Fix memory leak, free process.
18928 * linux-low.c (linux_remove_process): New function.
18929 (linux_kill): Call it instead of remove_process.
18930 (linux_detach, linux_wait_1): Ditto.
18931
18932 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
18933
18934 * configure.srv: Add x86 Windows CE target.
18935
18936 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18937
18938 * inferiors.c (get_thread_process): Make global.
18939 * server.h (get_thread_process): Add prototype.
18940 * thread-db.c (find_one_thread): Use get_thread_process
18941 instead of current_process.
18942 (thread_db_get_tls_address): Do not crash if called when
18943 thread layer is not yet initialized.
18944
18945 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
18946
18947 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
18948 * spu-low.c (current_tid): Rename to ...
18949 (current_ptid): ... this.
18950 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
18951 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
18952 ptid_get_lwp (current_ptid) instead of current_tid.
18953 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
18954 instead of current_tid. Use find_process_pid to verify pid
18955 argument is valid. Pass proper argument to remove_process.
18956 (spu_thread_alive): Compare current_ptid instead of current_tid.
18957 (spu_resume): Likewise.
18958
18959 2009-04-02 Pedro Alves <pedro@codesourcery.com>
18960
18961 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
18962 variable.
18963
18964 2009-04-01 Pedro Alves <pedro@codesourcery.com>
18965
18966 Implement the multiprocess extensions, and add linux multiprocess
18967 support.
18968
18969 * server.h (ULONGEST): Declare.
18970 (struct ptid, ptid_t): New.
18971 (minus_one_ptid, null_ptid): Declare.
18972 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18973 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
18974 (struct inferior_list_entry): Change `id' type from unsigned from
18975 to ptid_t.
18976 (struct sym_cache, struct breakpoint, struct
18977 process_info_private): Forward declare.
18978 (struct process_info): Declare.
18979 (current_process): Declare.
18980 (all_processes): Declare.
18981 (initialize_inferiors): Declare.
18982 (add_thread): Adjust to use ptid_t.
18983 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
18984 (add_process, remove_process, find_thread_pid): Declare.
18985 (find_inferior_id): Adjust to use ptid_t.
18986 (cont_thread, general_thread, step_thread): Change type to ptid_t.
18987 (multi_process): Declare.
18988 (push_event): Adjust to use ptid_t.
18989 (read_ptid, write_ptid): Declare.
18990 (prepare_resume_reply): Adjust to use ptid_t.
18991 (clear_symbol_cache): Declare.
18992 * inferiors.c (all_processes): New.
18993 (null_ptid, minus_one_ptid): New.
18994 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
18995 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
18996 (add_thread): Change unsigned long to ptid. Remove gdb_id
18997 parameter. Adjust.
18998 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
18999 (gdb_id_to_thread): Rename to ...
19000 (find_thread_pid): ... this. Change unsigned long to ptid.
19001 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19002 (loaded_dll, pull_pid_from_list): Adjust.
19003 (add_process, remove_process, find_process_pid)
19004 (get_thread_process, current_process, initialize_inferiors): New.
19005 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19006 (struct target_waitstatus) <related_pid>: Ditto.
19007 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19008 return type to int.
19009 (struct target_ops) <join>: Add `pid' argument.
19010 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19011 (struct target_ops) <wait>: Add `ptid' field. Change return type
19012 to ptid.
19013 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19014 (mywait): Add `ptid' argument. Change return type to ptid_t.
19015 (target_pid_to_str): Declare.
19016 * target.c (set_desired_inferior): Adjust to use ptids.
19017 (mywait): Add new `ptid' argument. Adjust.
19018 (target_pid_to_str): New.
19019 * mem-break.h (free_all_breakpoints): Declare.
19020 * mem-break.c (breakpoints): Delelete.
19021 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19022 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19023 to use per-process breakpoint list.
19024 (free_all_breakpoints): New.
19025 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19026 (symbol_cache, all_symbols_looked_up): Delete.
19027 (hexchars): New.
19028 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19029 read_ptid): New.
19030 (prepare_resume_reply): Change ptid argument's type from unsigned
19031 long to ptid_t. Adjust. Implement W;process and X;process.
19032 (free_sym_cache, clear_symbol_cache): New.
19033 (look_up_one_symbol): Adjust to per-process symbol cache. *
19034 * server.c (cont_thread, general_thread, step_thread): Change type
19035 to ptid_t.
19036 (attached): Delete.
19037 (multi_process): New.
19038 (last_ptid): Change type to ptid_t.
19039 (struct vstop_notif) <ptid>: Change type to ptid_t.
19040 (queue_stop_reply, push_event): Change `ptid' argument's type to
19041 ptid_t.
19042 (discard_queued_stop_replies): Add `pid' argument.
19043 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19044 changes. Don't reference the `attached' global.
19045 (attach_inferior): Adjust to mywait interface changes.
19046 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19047 features. Handle and report "multiprocess+". Handle
19048 "qAttached:PID".
19049 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19050 changes.
19051 (handle_v_kill): New.
19052 (handle_v_stopped): Adjust to use target_pid_to_str.
19053 (handle_v_requests): Allow multiple attaches and runs when
19054 multiprocess extensions are in effect. Handle "vKill".
19055 (myresume): Adjust to use ptids.
19056 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19057 (handle_status): Adjust to discard_queued_stop_replies interface
19058 change.
19059 (first_thread_of, kill_inferior_callback)
19060 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19061 (main): Call initialize_inferiors. Adjust to use ptids, killing
19062 and detaching from all inferiors. Handle multiprocess packet
19063 variants.
19064 * linux-low.h: Include gdb_proc_service.h.
19065 (struct process_info_private): New.
19066 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19067 <lwpid_of>: Use ptid_get_lwp.
19068 (get_lwp_thread): Adjust.
19069 (struct lwp_info): Add `dead' member.
19070 (find_lwp_pid): Declare.
19071 * linux-low.c (thread_db_active): Delete.
19072 (new_inferior): Adjust comment.
19073 (inferior_pid): Delete.
19074 (linux_add_process): New.
19075 (handle_extended_wait): Adjust.
19076 (add_lwp): Change unsigned long to ptid.
19077 (linux_create_inferior): Add process to processes table. Adjust
19078 to use ptids. Don't set new_inferior here.
19079 (linux_attach_lwp): Rename to ...
19080 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19081 it. Adjust to use ptids.
19082 (linux_attach_lwp): New.
19083 (linux_attach): Add process to processes table. Don't set
19084 new_inferior here.
19085 (struct counter): New.
19086 (second_thread_of_pid_p, last_thread_of_process_p): New.
19087 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19088 multiple processes.
19089 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19090 processes. Remove process from process table.
19091 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19092 to multiple processes.
19093 (any_thread_of): New.
19094 (linux_detach): Add `pid' argument, and handle it. Remove process
19095 from processes table.
19096 (linux_join): Add `pid' argument. Handle it.
19097 (linux_thread_alive): Change unsighed long argument to ptid_t.
19098 Consider dead lwps as not being alive.
19099 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19100 threads we're not interested in.
19101 (same_lwp, find_lwp_pid): New.
19102 (linux_wait_for_lwp): Change `pid' argument's type from int to
19103 ptid_t. Adjust.
19104 (linux_wait_for_event): Rename to ...
19105 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19106 from int to ptid_t. Adjust.
19107 (linux_wait_for_event): New.
19108 (linux_wait_1): Add `ptid' argument. Change return type to
19109 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19110 that exit from the process table.
19111 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19112 Adjust.
19113 (mark_lwp_dead): New.
19114 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19115 stopping all threads, mark its main lwp as dead.
19116 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19117 ptids.
19118 (fetch_register, usr_store_inferior_registers)
19119 (regsets_fetch_inferior_registers)
19120 (regsets_store_inferior_registers, linux_read_memory)
19121 (linux_write_memory): Inline `inferior_pid'.
19122 (linux_look_up_symbols): Adjust to use per-process
19123 `thread_db_active'.
19124 (linux_request_interrupt): Adjust to use ptids.
19125 (linux_read_auxv): Inline `inferior_pid'.
19126 (initialize_low): Don't reference thread_db_active.
19127 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19128 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19129 (ps_getpid): Return the pid of the current inferior.
19130 * thread-db.c (proc_handle, thread_agent): Delete.
19131 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19132 per-process data.
19133 (find_one_thread): Change argument type to ptid_t. Adjust to
19134 per-process data.
19135 (maybe_attach_thread): Adjust to per-process data and ptids.
19136 (thread_db_find_new_threads): Ditto.
19137 (thread_db_init): Ditto.
19138 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19139 processes table. Adjust to use ptids.
19140 (spu_kill, spu_detach): Adjust interface. Remove process from
19141 processes table.
19142 (spu_join, spu_thread_alive): Adjust interface.
19143 (spu_wait): Adjust interface. Remove process from processes
19144 table. Adjust to use ptids.
19145 * win32-low.c (current_inferior_tid): Delete.
19146 (current_inferior_ptid): New.
19147 (debug_event_ptid): New.
19148 (thread_rec): Take a ptid. Adjust.
19149 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19150 (child_delete_thread): Ditto.
19151 (do_initial_child_stuff): Add `attached' argument. Add process to
19152 processes table.
19153 (child_fetch_inferior_registers, child_store_inferior_registers):
19154 Adjust.
19155 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19156 (win32_attach): Pass 1 to do_initial_child_stuff.
19157 (win32_kill): Adjust interface. Remove process from processes
19158 table.
19159 (win32_detach): Ditto.
19160 (win32_join): Adjust interface.
19161 (win32_thread_alive): Take a ptid.
19162 (win32_resume): Adjust to use ptids.
19163 (get_child_debug_event): Ditto.
19164 (win32_wait): Adjust interface. Remove exiting process from
19165 processes table.
19166
19167 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19168
19169 Non-stop mode support.
19170
19171 * server.h (non_stop): Declare.
19172 (gdb_client_data, handler_func): Declare.
19173 (delete_file_handler, add_file_handler, start_event_loop):
19174 Declare.
19175 (handle_serial_event, handle_target_event, push_event)
19176 (putpkt_notif): Declare.
19177 * target.h (enum resume_kind): New.
19178 (struct thread_resume): Replace `step' field by `kind' field.
19179 (TARGET_WNOHANG): Define.
19180 (struct target_ops) <wait>: Add `options' argument.
19181 <supports_non_stop, async, start_non_stop>: New fields.
19182 (target_supports_non_stop, target_async): New.
19183 (start_non_stop): Declare.
19184 (mywait): Add `options' argument.
19185 * target.c (mywait): Add `options' argument. Print child exit
19186 notifications here.
19187 (start_non_stop): New.
19188 * server.c (non_stop, own_buf, mem_buf): New globals.
19189 (struct vstop_notif): New.
19190 (notif_queue): New global.
19191 (queue_stop_reply, push_event, discard_queued_stop_replies)
19192 (send_next_stop_reply): New.
19193 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19194 interface changes.
19195 (attach_inferior): In non-stop mode, don't wait for the target
19196 here.
19197 (handle_general_set): Handle QNonStop.
19198 (handle_query): When handling qC, return the current general
19199 thread, instead of the first thread of the list.
19200 (handle_query): If the backend supports non-stop mode, include
19201 QNonStop+ in the qSupported query response.
19202 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19203 and non-stop mode.
19204 (handle_v_attach, handle_v_run): Handle non-stop mode.
19205 (handle_v_stopped): New.
19206 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19207 (myresume): Adjust to use resume_kind. Handle non-stop.
19208 (queue_stop_reply_callback): New.
19209 (handle_status): Handle non-stop mode.
19210 (main): Clear non_stop flag on reconnection. Use the event-loop.
19211 Refactor serial protocol handling from here ...
19212 (process_serial_event): ... to this new function. When GDB
19213 selects any thread, select one here. In non-stop mode, wait until
19214 GDB acks all pending events before exiting.
19215 (handle_serial_event, handle_target_event): New.
19216 * remote-utils.c (remote_open): Install remote_desc in the event
19217 loop.
19218 (remote_close): Remove remote_desc from the event loop.
19219 (putpkt_binary): Rename to...
19220 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19221 (putpkt_binary): New as wrapper around putpkt_binary_1.
19222 (putpkt_notif): New.
19223 (prepare_resume_reply): In non-stop mode, don't change the
19224 general_thread.
19225 * event-loop.c: New.
19226 * Makefile.in (OBJ): Add event-loop.o.
19227 (event-loop.o): New rule.
19228
19229 * linux-low.h (pid_of): Moved here.
19230 (lwpid_of): New.
19231 (get_lwp_thread): Use lwpid_of.
19232 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19233 * linux-low.c (pid_of): Delete.
19234 (inferior_pid): Use lwpid_of.
19235 (linux_event_pipe): New.
19236 (target_is_async_p): New.
19237 (delete_lwp): New.
19238 (handle_extended_wait): Use lwpid_of.
19239 (add_lwp): Don't set lwpid field.
19240 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19241 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19242 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19243 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19244 first. Adjust to linux_wait_for_event interface changes. Use
19245 lwpid_of.
19246 (linux_detach): Don't delete the main lwp here.
19247 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19248 (status_pending_p): Don't consider explicitly suspended lwps.
19249 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19250 pointer. Add OPTIONS argument. Change return type to int. Use
19251 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19252 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19253 pointer. Add status pointer argument. Return a pid instead of a
19254 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19255 changes. In non-stop mode, don't switch to a random thread.
19256 (linux_wait): Rename to...
19257 (linux_wait_1): ... this. Add target_options argument, and handle
19258 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19259 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19260 clean exit and signal exit code. Don't stop all threads in
19261 non-stop mode. In all-stop mode, only stop all threads when
19262 reporting a stop to GDB. Handle explicit thread stop requests.
19263 (async_file_flush, async_file_mark): New.
19264 (linux_wait): New.
19265 (send_sigstop): Use lwpid_of.
19266 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19267 interface changes. In non-stop mode, don't switch to a random
19268 thread.
19269 (linux_resume_one_lwp): Use lwpid_of.
19270 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19271 (linux_resume_one_thread): ... this. Handle resume_stop. In
19272 non-stop mode, don't look for pending flag in all threads.
19273 (resume_status_pending_p): Don't consider explicitly suspended
19274 threads.
19275 (my_waitpid): Reimplement. Emulate __WALL.
19276 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19277 Use lwpid_of.
19278 (sigchld_handler, linux_supports_non_stop, linux_async)
19279 (linux_start_non_stop): New.
19280 (linux_target_ops): Register linux_supports_non_stop, linux_async
19281 and linux_start_non_stop.
19282 (initialize_low): Install SIGCHLD handler.
19283 * thread-db.c (thread_db_create_event, find_one_thread)
19284 (thread_db_get_tls_address): Use lwpid_of.
19285 * win32-low.c (win32_detach): Adjust to use resume_kind.
19286 (win32_wait): Add `options' argument.
19287 * spu-low.c (spu_resume): Adjust to use resume_kind.
19288 (spu_wait): Add `options' argument.
19289
19290 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19291
19292 Decouple target code from remote protocol.
19293
19294 * target.h (enum target_waitkind): New.
19295 (struct target_waitstatus): New.
19296 (struct target_ops) <wait>: Return an unsigned long. Take a
19297 target_waitstatus pointer instead of a char pointer.
19298 (mywait): Likewise.
19299 * target.c (mywait): Change prototype to return an unsigned long.
19300 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19301 * server.h (thread_from_wait, old_thread_from_wait): Delete
19302 declarations.
19303 (prepare_resume_reply): Change prototype to take a
19304 target_waitstatus.
19305 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19306 (last_status, last_ptid): New.
19307 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19308 pid instead of a signal.
19309 (attach_inferior): Remove "status" and "signal" parameters.
19310 Adjust.
19311 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19312 not as an address.
19313 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19314 (handle_v_requests, myresume): Remove "status" and "signal"
19315 parameters. Adjust.
19316 (handle_status): New.
19317 (main): Delete local `status'. Adjust.
19318 * remote-utils.c: Include target.h.
19319 (prepare_resume_reply): Change prototype to take a
19320 target_waitstatus. Adjust.
19321
19322 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19323 interface.
19324 * spu-low.c (spu_wait): Adjust.
19325 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19326 Delete.
19327 (win32_wait): Adjust.
19328
19329 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19330
19331 * target.h (struct thread_resume): Delete leave_stopped member.
19332 (struct target_ops): Add a `n' argument to the `resume' callback.
19333 * server.c (start_inferior): Adjust.
19334 (handle_v_cont, myresume): Adjust.
19335 * linux-low.c (check_removed_breakpoint): Adjust to resume
19336 interface change, and to removed leave_stopped field.
19337 (resume_ptr): Delete.
19338 (struct thread_resume_array): New.
19339 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19340 resume interface change.
19341 (linux_continue_one_thread, linux_queue_one_thread)
19342 (resume_status_pending_p): Check if the resume field is NULL
19343 instead of checking the leave_stopped member.
19344 (linux_resume): Adjust to the target resume interface change.
19345 * spu-low.c (spu_resume): Adjust to the target resume interface
19346 change.
19347 * win32-low.c (win32_detach, win32_resume): Ditto.
19348
19349 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19350
19351 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19352 flag.
19353 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19354 pending.
19355 (linux_continue_one_thread): Only preserve the stepping flag if
19356 there's a pending breakpoint.
19357
19358 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19359
19360 * server.c (main): After the inferior having exited, call
19361 remote_close before exiting gdbserver.
19362
19363 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19364
19365 Fix size of FPSCR in Power 7 processors.
19366 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19367 (PPC_FEATURE_HAS_DFP): New #define.
19368 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19369 size of the FPSCR.
19370
19371 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19372
19373 * server.c (handle_query) Whitespace and formatting.
19374
19375 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19376
19377 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19378 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19379 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19380 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19381 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19382 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19383 Makefile.in, configure.ac: Fix whitespace throughout.
19384 * configure: Regenerate.
19385
19386 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19387
19388 * inferiors.c (find_inferior): Make it safe for the callback
19389 function to delete the currently iterated inferior.
19390
19391 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19392
19393 * Makefile.in (linuw_low_h): Move higher.
19394 (thread-db.o): Depend on $(linux_low_h).
19395
19396 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19397
19398 Rename "process" to "lwp" throughout.
19399
19400 * linux-low.c (all_processes): Rename to...
19401 (all_lwps): ... this.
19402 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19403 (add_process): Rename to ...
19404 (add_lwp): ... this. Adjust.
19405 (linux_create_inferior): Adjust.
19406 (linux_attach_lwp): Adjust.
19407 (linux_attach): Adjust.
19408 (linux_kill_one_process): Rename to ...
19409 (linux_kill_one_lwp): ... this. Adjust.
19410 (linux_kill): Adjust.
19411 (linux_detach_one_process): Rename to ...
19412 (linux_detach_one_lwp): ... this. Adjust.
19413 (linux_detach): Adjust.
19414 (check_removed_breakpoint): Adjust.
19415 (status_pending_p): Adjust.
19416 (linux_wait_for_process): Rename to ...
19417 (linux_wait_for_lwp): ... this. Adjust.
19418 (linux_wait_for_event): Adjust.
19419 (send_sigstop): Adjust.
19420 (wait_for_sigstop): Adjust.
19421 (stop_all_processes): Rename to ...
19422 (stop_all_lwps): ... this.
19423 (linux_resume_one_process): Rename to ...
19424 (linux_resume_one_lwp): ... this. Adjust.
19425 (linux_set_resume_request, linux_continue_one_thread)
19426 (linux_queue_one_thread, resume_status_pending_p)
19427 (usr_store_inferior_registers, regsets_store_inferior_registers)
19428 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19429 Adjust.
19430 * linux-low.h (get_process): Rename to ...
19431 (get_lwp): ... this. Adjust.
19432 (get_thread_process): Rename to ...
19433 (get_thread_lwp): ... this. Adjust.
19434 (get_process_thread): Rename to ...
19435 (get_lwp_thread): ... this. Adjust.
19436 (struct process_info): Rename to ...
19437 (struct lwp_info): ... this.
19438 (all_processes): Rename to ...
19439 (all_lwps): ... this.
19440 * proc-service.c (ps_lgetregs): Adjust.
19441 * thread-db.c (thread_db_create_event, find_one_thread)
19442 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19443
19444 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19445
19446 * server.c (handle_query): Handle "qAttached".
19447
19448 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19449
19450 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19451 GPLv3, update license URL.
19452
19453 2009-03-01 Doug Evans <dje@google.com>
19454
19455 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19456 (server_h): Add gdb_signals.h.
19457 (signals.o): Update.
19458 * server.h (target_signal_from_host,target_signal_to_host_p)
19459 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19460
19461 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19462
19463 * remote-utils.c (getpkt): Also generate remote-debug
19464 information if noack_mode is set.
19465
19466 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19467
19468 * server.c (handle_query): Report qXfer:siginfo:read and
19469 qXfer:siginfo:write as supported and handle them.
19470 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19471 * linux-low.c (linux_xfer_siginfo): New.
19472 (linux_target_ops): Set it.
19473
19474 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19475
19476 * server.c (gdbserver_usage): Mention --remote-debug.
19477 (main): Accept '--remote-debug' switch.
19478
19479 2009-01-18 Doug Evans <dje@google.com>
19480
19481 * regcache.c (new_register_cache): No need to check result of xcalloc.
19482 * server.c (handle_search_memory): Back out calls to xmalloc,
19483 result is checked and error is returned to user upon failure.
19484 (handle_query): Ditto. Add more checks for result of malloc.
19485 (handle_v_cont): Check result of malloc, report error back to
19486 user upon failure.
19487 (handle_v_run): Ditto. Call freeargv.
19488 * server.h (freeargv): Declare.
19489 * utils.c (freeargv): New fn.
19490
19491 2009-01-15 Doug Evans <dje@google.com>
19492
19493 * gdbreplay.c (perror_with_name): Make arg const char *.
19494 * server.h (target_signal_to_name): Make return type const char *.
19495 * thread-db.c (thread_db_err_str): Make return type const char *.
19496 * utils.c (perror_with_name): Make arg const char *.
19497
19498 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19499
19500 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19501 when handling a EXIT_PROCESS_DEBUG_EVENT.
19502
19503 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19504
19505 * gdbreplay.c (gdbreplay_version): Update copyright year.
19506 * server.c (gdbserver_version): Likewise.
19507
19508 2009-01-05 Doug Evans <dje@google.com>
19509
19510 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19511 (handle_extended_wait): Improve comment.
19512
19513 2008-12-13 Doug Evans <dje@google.com>
19514
19515 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19516 * server.h (ATTR_MALLOC): New macro.
19517 (xmalloc,xcalloc,xstrdup): Declare.
19518 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19519 * inferiors.c: Ditto.
19520 * linux-low.c: Ditto.
19521 * mem-break.c: Ditto.
19522 * regcache.c: Ditto.
19523 * remote-utils.c: Ditto.
19524 * server.c: Ditto.
19525 * target.c: Ditto.
19526 * win32-low.c: Ditto.
19527
19528 2008-12-12 Doug Evans <dje@google.com>
19529
19530 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19531 in debugging printf.
19532
19533 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19534
19535 2008-12-09 Doug Evans <dje@google.com>
19536
19537 * linux-low.h (struct process_info): Delete member tid, unused.
19538 * thread-db.c (find_one_thread): Update.
19539 (maybe_attach_thread): Update.
19540
19541 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19542
19543 * target.h (struct target_ops): Add qxfer_osdata member.
19544 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19545 and dirent.h.
19546 (linux_qxfer_osdata): New functions.
19547 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19548 callback.
19549 * server.c (handle_query): Handle "qXfer:osdata:read:".
19550 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19551 (buffer_xml_printf): New functions.
19552 * server.h (struct buffer): New.
19553 (buffer_grow_str, buffer_grow_str0): New macros.
19554 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19555 (buffer_xml_printf): Declare.
19556
19557 2008-11-24 Doug Evans <dje@google.com>
19558
19559 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19560
19561 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19562
19563 * server.c (handle_v_run): Always use the supplied argument list.
19564
19565 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19566
19567 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19568 (xtensa_regmap_table): Add entry for scompare1.
19569
19570 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19571
19572 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19573 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19574 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19575 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19576 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19577 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19578 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19579 XML target descriptions.
19580 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19581 when inferior is running on an ISA 2.05 or later processor. Add
19582 special case to return offset for full 64-bit slot of FPSCR when
19583 in 32-bits.
19584
19585 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19586
19587 * Makefile.in (SFILES, clean): Added sparc64 files.
19588 (reg-sparc64.o, reg-sparc64.c): New.
19589 * configure.srv (sparc*-*-linux*): New configuration.
19590 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19591 syscall arguments for SPARC.
19592 (regsets_store_inferior_registers): Likewise.
19593 * linux-sparc-low.c: New file.
19594
19595 2008-10-21 Doug Evans <dje@google.com>
19596
19597 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19598 (READLINE_DIR,READLINE_DEP): Delete.
19599 (INTERNAL_CFLAGS): Update.
19600 (LINTFLAGS): Update.
19601
19602 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19603
19604 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19605 whole argv from the last run, not just argv[0].
19606
19607 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19608
19609 * regcache.c (new_register_cache): Return NULL if the register
19610 cache size isn't known yet.
19611 (free_register_cache): Avoid dereferencing a NULL regcache.
19612
19613 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19614
19615 * configure.srv: Merge MIPS and MIPS64.
19616
19617 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19618
19619 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19620
19621 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19622
19623 * Makefile.in: Add required vsx dependencies.
19624
19625 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19626 Declare init_registers_powerpc_vsx32l.
19627 Declare init_registers_powerpc_vsx64l.
19628 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19629 (ppc_arch_setup): Check for VSX in hwcap.
19630 (ppc_fill_vsxregset): New function.
19631 (ppc_store_vsxregset): New function.
19632 Add new VSX entry in regset_info target_regsets.
19633
19634 * configure.srv: Add new VSX dependencies.
19635
19636 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19637
19638 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19639 (remote_open): Set or clear transport_is_reliable.
19640 (putpkt_binary): Don't expect acks in noack mode.
19641 (getpkt): Don't send ack/nac in noack mode.
19642 * server.c (handle_general_set): Handle QStartNoAckMode.
19643 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19644 qSupported.
19645 (main): Reset noack_mode on every connection.
19646 * server.h (noack_mode): Declare.
19647
19648 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19649
19650 * Makefile.in (GDBREPLAY_OBS): New variable.
19651 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19652
19653 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19654 Daniel Jacobowitz <dan@codesourcery.com>
19655
19656 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19657 (usr_store_inferior_registers): Likewise.
19658 (regsets_store_inferior_registers): Likewise.
19659
19660 2008-07-31 Rolf Jansen <rj@surtec.com>
19661 Pedro Alves <pedro@codesourcery.com>
19662
19663 * configure.ac: Check for memmem declaration.
19664 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19665 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19666 (disable_packet_qfThreadInfo): Unconditionally compile.
19667 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19668 * configure, config.in: Regenerate.
19669
19670 2008-07-28 Doug Kwan <dougkwan@google.com>
19671
19672 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19673 (linux_write_memory): Remove declaration of errno.
19674
19675 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19676
19677 * linux-low.c (handle_extended_wait): Do not use "status"
19678 variable uninitialized.
19679
19680 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19681
19682 * server.c (handle_v_attach): Inhibit reporting dll changes.
19683
19684 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19685
19686 * remote-utils.c (prepare_resume_reply): If requested, don't
19687 output "thread:TID" in the T stop reply.
19688
19689 * server.c (disable_packet_vCont, disable_packet_Tthread)
19690 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19691 (handle_query): If requested, disable support for qC, qfThreadInfo
19692 and qsThreadInfo.
19693 (handle_v_requests): If requested, disable support for vCont.
19694 (gdbserver_show_disableable): New.
19695 (main): Handle --disable-packet and --disable-packet=LIST.
19696
19697 * server.h (disable_packet_vCont, disable_packet_Tthread)
19698 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19699
19700 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19701
19702 * server.c (gdbserver_usage): Mention --version.
19703
19704 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19705
19706 * Makefile.in (gdbreplay.o): New rule.
19707
19708 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19709
19710 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19711 message, not gdbserver.
19712
19713 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19714 Nathan Sidwell <nathan@codesourcery.com>
19715 Joseph Myers <joseph@codesourcery.com>
19716
19717 * acinclude.m4: Include ../../config/acx.m4.
19718 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19719 * configure, config.in: Regenerate.
19720 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19721 * server.c (gdbserver_version): Print PKGVERSION.
19722 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19723 (main): Adjust gdbserver_usage calls.
19724 * gdbreplay.c (version, host_name): Add declarations.
19725 (gdbreplay_version, gdbreplay_usage): New.
19726 (main): Accept --version and --help options.
19727
19728 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19729
19730 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19731 (arm_breakpoint_at): Handle Thumb.
19732 (the_low_target): Add comment.
19733
19734 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19735
19736 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19737
19738 2008-05-09 Doug Evans <dje@google.com>
19739
19740 * server.h (decode_search_memory_packet): Declare.
19741 * remote-utils.c (decode_search_memory_packet): New fn.
19742 * server.c (handle_search_memory_1): New fn.
19743 (handle_search_memory): New fn.
19744 (handle_query): Process qSearch:memory packets.
19745
19746 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19747
19748 * regcache.c (registers_length): Remove.
19749 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19750 full register packet.
19751 * regcache.h (registers_length): Remove prototype.
19752 * server.h (PBUFSIZ): Define to 16384.
19753
19754 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19755
19756 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19757 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19758 powerpc-64l.o, and powerpc-altivec64l.o.
19759 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19760 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19761 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19762 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19763 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19764 to srv_xmlfiles.
19765
19766 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19767 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19768 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19769 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19770 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19771 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19772 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19773 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19774 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19775 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19776 (clean): Update.
19777
19778 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19779 (init_registers_powerpc_32l): ... this new prototype.
19780 (init_registers_powerpc_32): Remove, replace by ...
19781 (init_registers_powerpc_altivec32l): ... this new prototype.
19782 (init_registers_powerpc_e500): Remove, replace by ...
19783 (init_registers_powerpc_e500l): ... this new prototype.
19784 (init_registers_ppc64): Remove, replace by ...
19785 (init_registers_powerpc_64l): ... this new prototype.
19786 (init_registers_powerpc_64): Remove, replace by ...
19787 (init_registers_powerpc_altivec64l): ... this new prototype.
19788 (ppc_num_regs): Set to 73.
19789 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19790 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19791 (ppc_cannot_store_register): Handle orig_r3 and trap.
19792 (ppc_arch_setup): Update init_registers_... calls.
19793 (ppc_fill_gregset): Handle orig_r3 and trap.
19794
19795 * inferiors.c (clear_inferiors): Reset current_inferior.
19796
19797 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
19798
19799 * acinclude.m4: Add override.m4.
19800 * configure: Regenerate.
19801
19802 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19803
19804 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19805 initial call to init_register_ppc64.
19806
19807 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19808
19809 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19810 single powerpc*-*-linux* case.
19811 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19812
19813 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19814
19815 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
19816 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
19817 from reg_xmlfiles.
19818 * linux-ppc-low.c: Include <elf.h>.
19819 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19820 (ppc_hwcap): New global variable.
19821 (ppc_regmap): Remove __SPE__ #ifdef sections.
19822 (ppc_regmap_e500): New global variable.
19823 (ppc_cannot_store_register): Update __SPE__ special case.
19824 (ppc_get_hwcap): New function.
19825 (ppc_arch_setup): Use it to determine whether inferior supports
19826 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19827 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19828 Do not access registers if target does not support AltiVec.
19829 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19830 Do not access registers if target does not support SPE.
19831 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19832
19833 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19834
19835 * linux-low.c (disabled_regsets, num_regsets): New.
19836 (use_regsets_p): Delete.
19837 (linux_wait_for_process): Clear disabled_regsets.
19838 (regsets_fetch_inferior_registers): Check and set it.
19839 (regsets_store_inferior_registers): Likewise.
19840 (linux_fetch_registers, linux_store_registers): Do not use
19841 use_regsets_p.
19842 (initialize_low): Allocate disabled_regsets.
19843
19844 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19845
19846 * Makefile.in (LIBOBJS): New.
19847 (OBS): Use LIBOBJS.
19848 (memmem.o): New rule.
19849 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19850 * configure: Regenerated.
19851
19852 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19853
19854 * server.c (handle_query): Never return "unsupported" for
19855 qXfer:features:read queries.
19856
19857 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19858
19859 * server.c (get_features_xml): Fix inverted condition.
19860 (handle_query): Always support qXfer:feature:read.
19861
19862 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19863
19864 * server.c (wrapper_argv): New.
19865 (start_inferior): Handle wrapper_argv. If set, expect an extra
19866 trap.
19867 (gdbserver_usage): Document --wrapper.
19868 (main): Parse --wrapper.
19869
19870 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19871
19872 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19873 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
19874 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
19875 (ppc_set_pc): Likewise.
19876 (ppc_arch_setup): New function.
19877 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
19878 of collect_register.
19879 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
19880
19881 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19882
19883 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
19884 instead of linux-ppc64-low.o.
19885 * linux-ppc64-low.c: Remove file.
19886 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
19887 (linux-ppc64-low.o): Remove rule.
19888
19889 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
19890 (init_registers_powerpc_64): Likewise.
19891 (ppc_regmap): Conditionally define depending on __powerpc64__.
19892 (ppc_cannot_store_register): Do not special-case "fpscr" when
19893 compiled on __powerpc64__.
19894 (ppc_collect_ptrace_register): New function.
19895 (ppc_supply_ptrace_register): New function.
19896 (ppc_breakpoint): Change type to "unsigned int".
19897 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
19898 (the_low_target): Conditionally provide initializers for the
19899 arch_setup member depending on __powerpc64__. Install
19900 collect_ptrace_register and supply_ptrace_register members.
19901
19902 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19903
19904 * regcache.h (gdbserver_xmltarget): Add extern declaration.
19905 * server.c (gdbserver_xmltarget): Define.
19906 (get_features_xml): Use it to replace "target.xml" and arch_string.
19907
19908 * configure.srv: Remove srv_xmltarget. Add XML files that were
19909 mentioned there to srv_xmlfiles instead. Remove conditional tests
19910 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
19911 srv_xmlfiles and srv_regobj to include all possible choices.
19912 * configure.ac (srv_xmltarget): Remove.
19913 (srv_xmlfiles): Do not add "target.xml".
19914 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
19915 checks for supplementary target information.
19916 * configure: Regenerate.
19917 * Makefile.in (XML_TARGET): Remove.
19918 (target.xml): Remove rule.
19919 (clean): Do not clean up target.xml.
19920 (.PRECIOUS): Do not mention target.xml.
19921
19922 * target.h (struct target_ops): Remove arch_string member.
19923 * linux-low.c (linux_arch_string): Remove.
19924 (linux_target_ops): Remove arch_string initializer.
19925 * linux-low.h (struct linux_target_ops): Remove arch_string member.
19926 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
19927 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
19928 * spu-low.c (spu_arch_string): Remove.
19929 (spu_target_ops): Remove arch_string initializer.
19930 * win32-low.c (win32_arch_string): Remove.
19931 (win32_target_ops): Remove arch_string initializer.
19932 * win32-low.h (struct win32_target_ops): Remove arch_string member.
19933 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
19934 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
19935
19936 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19937
19938 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
19939 by collect_ptrace_register and supply_ptrace_register hooks.
19940 * linux-low.c (fetch_register): Use supply_ptrace_register callback
19941 instead of checking for the_low_target.left_pad_xfer.
19942 (usr_store_inferior_registers): Use collect_ptrace_register callback
19943 instead of checking for the_low_target.left_pad_xfer.
19944
19945 * linux-s390-low.c (s390_collect_ptrace_register): New function.
19946 (s390_supply_ptrace_register): Likewise.
19947 (s390_fill_gregset): Call s390_collect_ptrace_register.
19948 (the_low_target): Update.
19949
19950 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
19951 (ppc_supply_ptrace_register): Likewise.
19952 (the_low_target): Update.
19953
19954 * linux-i386-low.c (the_low_target): Update.
19955 * linux-x86-64-low.c (the_low_target): Update.
19956
19957 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19958
19959 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
19960 reg-s390.o and reg-s390x.o.
19961
19962 * linux-low.c (new_inferior): New global variable.
19963 (linux_create_inferior, linux_attach): Set it.
19964 (linux_wait_for_process): Call the_low_target.arch_setup after the
19965 target has stopped for the first time.
19966 (initialize_low): Do not call the_low_target.arch_setup.
19967
19968 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
19969 (s390_set_pc): Likewise.
19970 (s390_arch_setup): New function.
19971 (the_low_target): Use s390_arch_setup as arch_setup routine.
19972
19973 * regcache.c (realloc_register_cache): New function.
19974 (set_register_cache): Call it for each existing regcache.
19975
19976 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
19977
19978 * server.h (init_registers): Remove prototype.
19979
19980 * linux-low.h (struct linux_target_ops): Add arch_setup field.
19981 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
19982 instead of init_registers ().
19983 * linux-arm-low.c (init_registers_arm): Add prototype.
19984 (init_registers_arm_with_iwmmxt): Likewise.
19985 (the_low_target): Add initializer for arch_setup field.
19986 * linux-cris-low.c (init_registers_cris): Add prototype.
19987 (the_low_target): Add initializer for arch_setup field.
19988 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
19989 (the_low_target): Add initializer for arch_setup field.
19990 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
19991 (the_low_target): Add initializer for arch_setup field.
19992 * linux-ia64-low.c (init_registers_ia64): Add prototype.
19993 (the_low_target): Add initializer for arch_setup field.
19994 * linux-m32r-low.c (init_registers_m32r): Add prototype.
19995 (the_low_target): Add initializer for arch_setup field.
19996 * linux-m68k-low.c (init_registers_m68k): Add prototype.
19997 (the_low_target): Add initializer for arch_setup field.
19998 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
19999 (init_registers_mips64_linux): Likewise.
20000 (the_low_target): Add initializer for arch_setup field.
20001 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20002 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20003 (the_low_target): Add initializer for arch_setup field.
20004 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20005 (init_registers_powerpc_64): Likewise.
20006 (the_low_target): Add initializer for arch_setup field.
20007 * linux-s390-low.c (init_registers_s390): Add prototype.
20008 (init_registers_s390x): Likewise.
20009 (the_low_target): Add initializer for arch_setup field.
20010 * linux-sh-low.c (init_registers_sh): Add prototype.
20011 (the_low_target): Add initializer for arch_setup field.
20012 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20013 (the_low_target): Add initializer for arch_setup field.
20014 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20015 (the_low_target): Add initializer for arch_setup field.
20016
20017 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20018 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20019 instead of init_registers ().
20020 * win32-arm-low.c (init_registers_arm): Add prototype.
20021 (the_low_target): Add initializer for arch_setup field.
20022 * win32-i386-low.c (init_registers_i386): Add prototype.
20023 (the_low_target): Add initializer for arch_setup field.
20024
20025 * spu-low.c (init_registers_spu): Add prototype.
20026 (initialize_low): Call initialie_registers_spu () instead of
20027 initialize_registers ().
20028
20029 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20030
20031 * server.c (handle_v_requests): When handling the vRun and vAttach
20032 packets, if already debugging a process, don't kill it. Return an
20033 error instead.
20034
20035 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20036
20037 * server.c (handle_query): Correct length check.
20038
20039 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20040
20041 * win32-low.c (do_initial_child_stuff): Add process handle
20042 parameter. Set current_process_handle and current_process_id from the
20043 parameters. Clear globals.
20044 (win32_create_inferior): Don't set current_process_handle and
20045 current_process_id here. Instead pass them on the call to
20046 do_initial_child_stuff.
20047 (win32_attach): Likewise.
20048 (win32_clear_inferiors): New.
20049 (win32_kill): Don't close the current process handle or the
20050 current thread handle here. Instead call win32_clear_inferiors.
20051 (win32_detach): Don't open a new handle to the process. Call
20052 win32_clear_inferiors.
20053 (win32_join): Don't rely on current_process_handle; open a new
20054 handle using the process id.
20055 (win32_wait): Call win32_clear_inferiors when the inferior process
20056 has exited.
20057
20058 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20059
20060 * server.c (monitor_show_help): Add "exit".
20061
20062 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20063
20064 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20065 (clean): Add reg-xtensa.c.
20066 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20067 * configure.srv (xtensa*-*-linux*) New target.
20068 * linux-xtensa-low.c: New.
20069 * xtensa-xtregs.c: New.
20070
20071 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20072
20073 * hostio.c: Don't include errno.h.
20074 (errno_to_fileio_errno): Move to hostio-errno.
20075 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20076 error number outputting to the target->hostio_last_error callback.
20077 (hostio_packet_error): Use FILEIO_EINVAL directly.
20078 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20079 calls to hostio_error.
20080 * hostio-errno.c: New.
20081 * server.h (hostio_last_error_from_errno): Declare.
20082 * target.h (target_ops): Add hostio_last_error member.
20083 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20084 as hostio_last_error handler.
20085 * spu-low.c (spu_target_ops): Likewise.
20086 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20087 (wince_hostio_last_error): New functions.
20088 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20089 as hostio_last_error handler.
20090 (win32_target_ops) [!_WIN32_WCE]: Register
20091 hostio_last_error_from_errno as hostio_last_error handler.
20092 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20093 (hostio-errno.o): New rule.
20094 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20095 * configure.srv (srv_hostio_err_objs): New variable. Default to
20096 hostio-errno.o.
20097 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20098 * configure: Regenerate.
20099
20100 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20101
20102 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20103 (linux_kill, linux_detach): Clean up the process list.
20104 * remote-utils.c (remote_open): Improve port number parsing.
20105 (putpkt_binary, input_interrupt): Only send interrupts if the target
20106 is running.
20107 * server.c (extended_protocol): Make static.
20108 (attached): Define earlier.
20109 (exit_requested, response_needed, program_argv): New variables.
20110 (target_running): New.
20111 (start_inferior): Clear attached here.
20112 (attach_inferior): Set attached here.
20113 (require_running): Define.
20114 (handle_query): Use require_running and target_running. Implement
20115 "monitor exit".
20116 (handle_v_attach, handle_v_run): New.
20117 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20118 (gdbserver_usage): Update.
20119 (main): Redo argument parsing. Handle --debug and --multi. Handle
20120 --attach along with other options or after the port. Save
20121 program_argv. Support no initial program. Resynchronize
20122 communication with GDB after an error. Handle "monitor exit".
20123 Use require_running and target_running. Always allow the extended
20124 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20125 restart in extended mode.
20126 * README: Refer to the GDB manual. Update --attach usage.
20127
20128 2007-12-20 Andreas Schwab <schwab@suse.de>
20129
20130 * linux-low.c (STACK_SIZE): Define.
20131 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20132 (linux_test_for_tracefork): Likewise.
20133
20134 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20135
20136 * linux-low.c (linux_wait_for_event): Update messages. Do not
20137 reinsert auto-delete breakpoints.
20138 * mem-break.c (struct breakpoint): Change return type of handler to
20139 int.
20140 (set_breakpoint_at): Update handler type.
20141 (reinsert_breakpoint_handler): Return 1 instead of calling
20142 delete_breakpoint.
20143 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20144 setting a new one.
20145 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20146 * mem-break.h (set_breakpoint_at): Update handler type.
20147 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20148 * win32-low.c (auto_delete_breakpoint): New.
20149 (get_child_debug_event): Use it.
20150
20151 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20152
20153 * configure.ac: Check for pread and pwrite.
20154 * hostio.c (handle_pread): Fall back to lseek and read.
20155 (handle_pwrite): Fall back to lseek and write.
20156 * config.in, configure: Regenerated.
20157
20158 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20159
20160 * server.c (myresume): Add own_buf argument.
20161 (main): Update calls.
20162
20163 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20164
20165 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20166 * remote-utils.c (remote_open): Do not call disable_async_io.
20167 (block_async_io): Delete.
20168 (unblock_async_io): Make static.
20169 (initialize_async_io): New.
20170 * server.c (handle_v_cont): Handle async I/O here.
20171 (myresume): Likewise. Move other common resume tasks here...
20172 (main): ... from here. Call initialize_async_io. Disable async
20173 I/O before the main loop.
20174 * server.h (initialize_async_io): Declare.
20175 (block_async_io, unblock_async_io): Delete prototypes.
20176 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20177
20178 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20179
20180 * remote-utils.c (readchar): Allow binary data in received messages.
20181
20182 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20183
20184 * win32-low.c (attaching): New global.
20185 (win32_create_inferior): Clear the `attaching' global.
20186 (win32_attach): Set the `attaching' global.
20187 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20188 attaching. Only set a breakpoint at the entry point if not
20189 attaching.
20190
20191 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20192
20193 * server.c (main): Don't report dll events on the initial
20194 connection on attaches.
20195
20196 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20197
20198 * server.c (main): Relax numerical bases supported for the pid of
20199 the --attach command line argument.
20200
20201 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20202
20203 * win32-low.c (win32_attach): Call OpenProcess before
20204 DebugActiveProcess, not after. Add last error output to error
20205 call.
20206
20207 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20208
20209 * win32-low.c (win32_get_thread_context)
20210 (win32_set_thread_context): New functions.
20211 (thread_rec): Use win32_get_thread_context.
20212 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20213 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20214 field.
20215
20216 2007-12-03 Leo Zayas
20217 Pedro Alves <pedro_alves@portugalmail.pt>
20218
20219 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20220 global variables.
20221 (child_add_thread): Minor cleanup.
20222 (child_continue): Resume artificially suspended threads before
20223 calling ContinueDebugEvent.
20224 (suspend_one_thread): New.
20225 (fake_breakpoint_event): New.
20226 (get_child_debug_event): Change return type to int. Check here if
20227 gdb sent an interrupt request. If a soft interrupt was requested,
20228 fake a breakpoint event. Return 0 if there is no event to handle,
20229 and 1 otherwise.
20230 (win32_wait): Don't check here if gdb sent an interrupt request.
20231 Ensure there is a valid event to handle.
20232 (win32_request_interrupt): Add soft interruption method as last
20233 resort.
20234
20235 2007-12-03 Leo Zayas
20236 Pedro Alves <pedro_alves@portugalmail.pt>
20237
20238 * win32-low.h (win32_thread_info): Add descriptions to the
20239 structure members. Replace `suspend_count' counter by a
20240 `suspended' flag.
20241 * win32-low.c (thread_rec): Update condition of when to get the
20242 context from the inferior. Rely on ContextFlags being set if it
20243 has already been retrieved. Only suspend the inferior thread if
20244 we haven't already. Warn if that fails.
20245 (continue_one_thread): s/suspend_count/suspended/. Only call
20246 ResumeThread once. Warn if that fails.
20247
20248 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20249
20250 * win32-low.c (win32_wait): Don't read from the inferior when it
20251 has already exited.
20252
20253 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20254
20255 * Makefile.in (win32_low_h): New variable.
20256 (win32-low.o): Add dependency on $(win32_low_h).
20257 (win32-arm-low.o, win32-i386-low.o): New rules.
20258
20259 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20260
20261 * hostio.c: Correct copyright year.
20262
20263 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20264
20265 * Makefile.in (OBS): Add hostio.o.
20266 (hostio.o): New rule.
20267 * server.h (handle_vFile): Declare.
20268 * hostio.c: New file.
20269 * server.c (handle_v_requests): Take packet_len and new_packet_len
20270 for binary packets. Call handle_vFile.
20271 (main): Update call to handle_v_requests.
20272
20273 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20274
20275 * linux-low.c: Include <sched.h>.
20276
20277 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20278
20279 * linux-low.c (linux_tracefork_grandchild): New.
20280 (linux_tracefork_child): Use clone.
20281 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20282
20283 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20284
20285 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20286
20287 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20288
20289 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20290
20291 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20292
20293 * inferiors.c (change_inferior_id): Delete.
20294 (add_pid_to_list, pull_pid_from_list): New.
20295 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20296 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20297 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20298 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20299 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20300 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20301 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20302 (using_threads): Always set to 1.
20303 (handle_extended_wait): New.
20304 (add_process): Do not set TID.
20305 (linux_create_inferior): Set must_set_ptrace_flags.
20306 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20307 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20308 (linux_thread_alive): Rename TID argument to LWPID.
20309 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20310 (linux_wait_for_event): Do not use TID or check using_threads. Update
20311 call to dead_thread_notify. Call handle_extended_wait.
20312 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20313 (send_sigstop): Delete sigstop_sent.
20314 (wait_for_sigstop): Avoid TID.
20315 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20316 (linux_test_for_tracefork): New.
20317 (linux_lookup_signals): Use thread_db_active and
20318 linux_supports_tracefork_flag.
20319 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20320 * linux-low.h (get_process_thread): Avoid TID.
20321 (struct process_ifo): Move thread_known and tid to the end. Remove
20322 sigstop_sent.
20323 (linux_attach_lwp, thread_db_init): Update prototypes.
20324 * server.h (change_inferior_id): Delete prototype.
20325 (add_pid_to_list, pull_pid_from_list): New prototypes.
20326 * thread-db.c (thread_db_use_events): New.
20327 (find_first_thread): Rename to...
20328 (find_one_thread): ...this. Update callers and messages. Do not
20329 call fatal. Check thread_db_use_events. Do not call
20330 change_inferior_id or new_thread_notify.
20331 (maybe_attach_thread): Update. Do not call new_thread_notify.
20332 (thread_db_init): Set thread_db_use_events. Check use_events.
20333 * utils.c (fatal, warning): Correct message prefix.
20334
20335 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20336
20337 * Makefile.in (clean): Remove new files.
20338 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20339 (powerpc-64.o, powerpc-64.c): New rules.
20340 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20341 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20342 with SPE.
20343 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20344 SPE targets.
20345 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20346 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20347 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20348 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20349 (target_regsets): Add AltiVec and SPE register sets.
20350 * configure.ac: Check for AltiVec and SPE.
20351 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20352 (ppc_fill_vrregset, ppc_store_vrregset): New.
20353 (target_regsets): Add AltiVec register set.
20354 * configure: Regenerated.
20355
20356 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20357
20358 * linux-low.c (O_LARGEFILE): Define.
20359 (linux_read_memory): Use /proc/PID/mem.
20360 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20361 * configure, config.in: Regenerated.
20362
20363 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20364
20365 * linux-low.c (linux_wait_for_event): Do not pass signals while
20366 single-stepping.
20367
20368 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20369
20370 * win32-low.c (create_process): New.
20371 (win32_create_inferior): Use create_process instead of
20372 CreateProcess. If create_process failed retry appending an ".exe"
20373 suffix. Store the GetLastError result immediatelly after
20374 create_process calls and use it on the call to error.
20375
20376 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20377
20378 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20379
20380 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20381
20382 * configure.ac: Switch license to GPLv3.
20383
20384 2007-08-01 Michael Snyder <msnyder@access-company.com>
20385
20386 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20387
20388 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20389
20390 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20391 typedef.
20392 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20393 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20394 CloseToolhelp32Snapshot.
20395 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20396 CloseToolhelp32Snapshot.
20397
20398 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20399
20400 * server.c (main): Check for inferior exit before main loop.
20401
20402 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20403
20404 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20405 instead of on tmp_desc.
20406
20407 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20408 Daniel Jacobowitz <dan@codesourcery.com>
20409
20410 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20411 (add_thread): Minor cleanups.
20412 (clear_inferiors): Move lower in the file. Clear the DLL
20413 list.
20414 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20415 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20416 (xml_escape_text): New.
20417 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20418 for qSupported.
20419 (handle_v_cont): Report errors.
20420 (gdbserver_version): Update.
20421 (main): Correct size of own_buf. Do not report initial DLL events.
20422 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20423 (unloaded_dll, xml_escape_text): New.
20424 * win32-low.c (enum target_waitkind): Update comments.
20425 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20426 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20427 (win32_EnumProcessModules, win32_GetModuleInformation)
20428 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20429 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20430 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20431 (win32_Module32First, win32_Module32Next, load_toolhelp)
20432 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20433 (get_child_debug_event): Handle DLL events.
20434 (win32_wait): Likewise.
20435
20436 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20437
20438 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20439 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20440
20441 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20442
20443 * win32-low.c (handle_output_debug_string): Ignore event if not
20444 waiting.
20445
20446 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20447
20448 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20449
20450 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20451
20452 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20453
20454 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20455
20456 * inferiors.c (change_inferior_id): Add comment.
20457 * linux-low.c (check_removed_breakpoint): Add an early
20458 prototype. Improve debug output.
20459 (linux_attach): Doc update.
20460 (linux_detach_one_process, linux_detach): Clean up before releasing
20461 each process.
20462 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20463 * linux-low.h (struct process_info): Doc improvement.
20464 * mem-break.c (delete_all_breakpoints): New.
20465 * mem-break.h (delete_all_breakpoints): New prototype.
20466 * thread-db.c (find_first_thread): New.
20467 (thread_db_create_event): Call it instead of
20468 thread_db_find_new_threads. Clean up unused variables.
20469 (maybe_attach_thread): Remove first thread handling.
20470 (thread_db_find_new_threads): Use find_first_thread.
20471 (thread_db_get_tls_address): Likewise.
20472
20473 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20474
20475 * thread-db.c (thread_db_find_new_threads): Add prototype.
20476 (thread_db_create_event): Check for the main thread before adding
20477 a new thread.
20478 (maybe_attach_thread): Only enable event reporting if TID == 0.
20479 (thread_db_get_tls_address): Check for new threads.
20480
20481 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20482
20483 * linux-low.c (linux_create_inferior): Try execv before execvp.
20484 * spu-low.c (spu_create_inferior): Likewise.
20485
20486 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20487
20488 * linux-low.c (linux_create_inferior): Change execv to execvp.
20489 * spu-low.c (spu_create_inferior): Likewies.
20490
20491 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20492
20493 * Makefile.in (clean): Clean new files instead of deleted ones.
20494 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20495 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20496 rules.
20497 * configure.srv: Specify XML files and new regformats for MIPS and
20498 MIPS64 GNU/Linux.
20499 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20500 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20501 an entry for the restart register.
20502 (mips_cannot_fetch_register, mips_cannot_store_register)
20503 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20504 register names to match the XML descriptions.
20505 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20506 restart register instead of $0.
20507
20508 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20509 Markus Deuling <deuling@de.ibm.com>
20510
20511 * remote-utils.c (decode_xfer_write): New function.
20512 * server.h (decode_xfer_write): Add prototype.
20513 * server.c (handle_query): Add PACKET_LEN argument. Support
20514 qXfer:spu:read and qXfer:spu:write packets.
20515 (main): Pass packet_len to handle_query.
20516 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20517 * target.h (target_ops): Add qxfer_spu.
20518
20519 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20520
20521 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20522 accessing non-seekable spufs files.
20523
20524 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20525
20526 * server.c (handle_query): Add reply for qC packet.
20527
20528 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20529 Leo Zayas <lerele@champenstudios@com>
20530
20531 * server.h (check_remote_input_interrupt_request): New function.
20532 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20533 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20534 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20535 (check_remote_input_interrupt_request): New function.
20536 * server.h (check_remote_input_interrupt_request): Declare.
20537 * win32-low.c (winapi_DebugBreakProcess,
20538 winapi_GenerateConsoleCtrlEvent): New typedefs.
20539 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20540 to 250 ms.
20541 (win32_wait): Check for remote interrupt request
20542 with check_remote_input_interrupt_request.
20543 (win32_request_interrupt): New function.
20544 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20545
20546 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20547
20548 * win32-low.c (debug_registers_changed,
20549 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20550 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20551 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20552 (thread_rec): Get context using the low target.
20553 (child_add_thread): Call thread_added on the low target,
20554 which does the same thing.
20555 (regptr): Delete.
20556 (do_initial_child_stuff): Remove debug registers references.
20557 Set context using the low target. Resume threads after
20558 setting the contexts.
20559 (child_continue): Remove dead variable. Remove debug
20560 registers references.
20561 (child_fetch_inferior_registers): Go through the low target.
20562 (do_child_store_inferior_registers): Remove.
20563 (child_store_inferior_registers): Go through the low target.
20564 (win32_resume): Remove debug registers references.
20565 Set context using the low target.
20566 (handle_exception): Change return type to void. Don't record
20567 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20568 first chance exception.
20569 (get_child_debug_event): Change return type to void. Remove
20570 goto loop. Always return after waiting for debug event.
20571 (win32_wait): Convert to switch statement. Handle spurious
20572 events.
20573
20574 * win32-i386-low.c (debug_registers_changed,
20575 debug_registers_used): New.
20576 (initial_stuff): Rename to ...
20577 (i386_initial_stuff): ... this. Clear debug registers
20578 state variables.
20579 (store_debug_registers): Delete.
20580 (i386_get_thread_context): New.
20581 (load_debug_registers): Delete.
20582 (i386_set_thread_context): New.
20583 (i386_thread_added): New.
20584 (single_step): Rename to ...
20585 (i386_single_step): ... this.
20586 (do_fetch_inferior_registers): Rename to ...
20587 (i386_fetch_inferior_register): ... this.
20588 (i386_store_inferior_register): New.
20589 (the_low_target): Adapt to new interface.
20590
20591 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20592 (arm_get_thread_context): New.
20593 (arm_set_thread_context): New.
20594 (regptr): New.
20595 (do_fetch_inferior_registers): Rename to ...
20596 (arm_fetch_inferior_register): ... this.
20597 (arm_store_inferior_register): New.
20598 (arm_wince_breakpoint): Reimplement as unsigned long.
20599 (arm_wince_breakpoint_len): Define.
20600 (the_low_target): Adapt to new interface.
20601
20602 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20603 load_debug_registers. Add get_thread_context, set_thread_context,
20604 thread_added and store_inferior_register. Rename
20605 fetch_inferior_registers to fetch_inferior_register.
20606 (regptr): Remove declaration.
20607
20608 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20609
20610 * linux-low.c (linux_detach): Change return type to int. Return 0.
20611 * spu-low.c (spu_detach): Likewise.
20612
20613 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20614
20615 * target.h (target_ops): Change return type of detach to int.
20616 Add join.
20617 (join_inferior): New.
20618 * server.c (main): Don't skip detach support on mingw32.
20619 If the inferior doesn't support detaching return error.
20620 Call join_inferior instead of using waitpid.
20621 * linux-low.c (linux_join): New.
20622 (linux_target_op): Add linux_join.
20623 * spu-low.c (spu_join): New.
20624 (spu_target_ops): Add spu_join.
20625 * win32-low.c (win32_detach): Adapt to new interface.
20626 Reopen current_process_handle before detaching. Issue a child
20627 resume before detaching.
20628 (win32_join): New.
20629 (win32_target_op): Add win32_join.
20630
20631 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20632
20633 * win32-low.c (win32-attach): Fix return value.
20634 * target.h (target_ops): Describe ATTACH return values.
20635
20636 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20637
20638 * win32-low.c (GETPROCADDRESS): Define.
20639 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20640 (winapi_DebugSetProcessKillOnExit): Likewise.
20641 (win32_create_inferior): Force usage of ansi CreateProcessA.
20642 (win32_attach): Use GETPROCADDRESS.
20643 (win32_detach): Likewise.
20644
20645 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20646
20647 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20648
20649 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20650
20651 * win32-low.c: Commit leftover changes from 2007-03-29.
20652
20653 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20654
20655 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20656 fields short instead of int. Add explicit padding.
20657 (i387_cache_to_fsave): Remove unnecessary casts.
20658 (i387_fsave_to_cache): Doc fix.
20659 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20660
20661 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20662
20663 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20664 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20665
20666 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20667
20668 * configure.srv (arm*-*-mingw32ce*): Move near the other
20669 arm targets.
20670
20671 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20672
20673 * configure.ac: Add errno checking.
20674 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20675 sys/file.h and malloc.h.
20676 (AC_CHECK_DECLS): Add perror.
20677 (srv_mingwce): Handle.
20678 * configure.srv (i[34567]86-*-cygwin*): Add
20679 win32-i386-low.o to srv_tgtobj.
20680 (i[34567]86-*-mingw*): Likewise.
20681 (arm*-*-mingw32ce*): Add case.
20682 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20683 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20684 [__MINGW32CE__] (strerror): New function.
20685 [__MINGW32CE__] (errno): Define to GetLastError.
20686 [__MINGW32CE__] (COUNTOF): New macro.
20687 (remote_open): Remove extra close call.
20688 * mem-break.c (delete_breakpoint_at): New function.
20689 * mem-break.h (delete_breakpoint_at): Declare.
20690 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20691 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20692 [USE_WIN32API] (read, write): Add char* casts.
20693 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20694 * server.h: Include wincecompat.h on Windows CE.
20695 [HAVE_ERRNO_H]: Check.
20696 (perror): Declare if not declared.
20697 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20698 (perror_with_name): Remove errno declaration.
20699 * wincecompat.h: New.
20700 * wincecompat.c: New.
20701 * win32-low.h: New.
20702 * win32-arm-low.c: New.
20703 * win32-i386-low.c: New.
20704 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20705 (OUTMSG2): Make it safe.
20706 (_T): New macro.
20707 (COUNTOF): New macro.
20708 (NUM_REGS): Get it from the low target.
20709 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20710 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20711 (thread_rec): Let low target handle debug registers.
20712 (child_add_thread): Likewise.
20713 (child_init_thread_list): Likewise.
20714 (continue_one_thread): Likewise.
20715 (regptr): New.
20716 (do_child_fetch_inferior_registers): Move to ...
20717 * win32-i386-low.c: ... here, and rename to ...
20718 (do_fetch_inferior_registers): ... this.
20719 * win32-low.c (child_fetch_inferior_registers):
20720 Go through the low target.
20721 (do_child_store_inferior_registers): Use regptr.
20722 (strwinerror): New function.
20723 (win32_create_inferior): Handle Windows CE.
20724 Use strwinerror instead of strerror on Windows error
20725 codes. Add program to the error output.
20726 Don't close the main thread handle on Windows CE.
20727 (win32_attach): Use coredll.dll on Windows CE.
20728 (win32_kill): Close current process and current
20729 thread handles.
20730 (win32_detach): Use coredll.dll on Windows CE.
20731 (win32_resume): Let low target handle debug registers, and
20732 step request.
20733 (handle_exception): Add/Remove initial breakpoint. Avoid
20734 non-existant WSTOPSIG on Windows CE.
20735 (win32_read_inferior_memory): Cast to remove warning.
20736 (win32_arch_string): Go through the low target.
20737 (initialize_low): Call set_breakpoint_data with the low
20738 target's breakpoint.
20739 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20740 FOP_REGNUM, mappings): Move to ...
20741 * win32-i386-low.c: ... here.
20742 * win32-low.c (win32_thread_info): Move to ...
20743 * win32-low.h: ... here.
20744 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20745 win32-arm-low.c and wincecompat.c.
20746 (all:): Add $EXEEXT.
20747 (install-only:): Likewise.
20748 (gdbserver:): Likewise.
20749 (gdbreplay:): Likewise.
20750 * config.in: Regenerate.
20751 * configure: Regenerate.
20752
20753 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20754
20755 * win32-low.c: Rename typedef thread_info to
20756 win32_thread_info throughout.
20757
20758 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20759
20760 * win32-i386-low.c: Rename to ...
20761 * win32-low.c: ... this.
20762 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20763 * Makefile.in: Likewise.
20764
20765 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20766
20767 * remote-utils.c (monitor_output): Constify msg parameter.
20768 * server.h (monitor_output): Likewise.
20769 * win32-i386-low.c (handle_output_debug_string): New.
20770 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20771 handle_output_debug_string.
20772 (get_child_debug_event): Likewise.
20773
20774 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20775
20776 * server.c (main): Correct strtoul check.
20777
20778 2007-03-27 Jon Ringle <jon@ringle.org>
20779
20780 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20781
20782 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20783
20784 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20785
20786 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20787
20788 * terminal.h: Check HAVE_SGTTY_H.
20789
20790 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
20791
20792 * remote-utils.c (remote_open): Print out the assigned port number.
20793
20794 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20795
20796 * remote-utils.c (monitor_output): New function.
20797 * server.c (debug_threads): Define here.
20798 (monitor_show_help): New function.
20799 (handle_query): Handle qRcmd.
20800 (main): Do not handle 'd' packet.
20801 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20802 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20803 of debug_threads.
20804
20805 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20806
20807 * Makefile.in (EXEEXT): New.
20808 (clean): Use $(EXEEXT).
20809
20810 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20811
20812 * target.h (target_ops): Rename send_signal to request_interrupt,
20813 and remove enum target_signal parameter.
20814 * linux-low.c (linux_request_interrupt): Rename from
20815 linux_send_signal, and always send SIGINT.
20816 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20817 and always send SIGINT.
20818 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20819 of send_signal.
20820 (input_interrupt): Likewise.
20821
20822 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20823
20824 * server.c (get_features_xml): Check if target implemented
20825 arch_string.
20826 * win32-i386-low.c (win32_arch_string): New.
20827 (win32_target_ops): Add win32_arch_string as arch_string member.
20828
20829 2007-02-22 Markus Deuling <deuling@de.ibm.com>
20830
20831 * spu-low.c (spu_arch_string): New.
20832 (spu_target_ops): Add spu_arch_string.
20833
20834 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20835
20836 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20837 * configure.ac: Do not check for terminal.h.
20838 * configure, config.in: Regenerated.
20839
20840 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20841
20842 * Makefile.in (OBS): Add $(XML_BUILTIN).
20843 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20844 (clean): Update.
20845 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20846 (arm-with-iwmmxt.c): New.
20847 * config.in, configure: Regenerate.
20848 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20849 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20850 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20851 (arm*-*-linux*): Add iWMMXt and regset support.
20852 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20853 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20854 (arm_store_wmmxregset, target_regsets): New.
20855 * server.c (get_features_xml): Take annex argument. Check builtin
20856 XML documents.
20857 (handle_query): Handle multiple annexes.
20858
20859 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20860
20861 * remote-utils.c [USE_WIN32API] (read, write): Define.
20862 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20863 write.
20864
20865 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20866
20867 * linux-i386-low.c (the_low_target): Set arch_string.
20868 * linux-x86-64-low.c (the_low_target): Likewise.
20869 * linux-low.c (linux_arch_string): New.
20870 (linux_target_ops): Add it.
20871 * linux-low.h (struct linux_target_ops): Add arch_string.
20872 * server.c (write_qxfer_response): Use const void * for DATA.
20873 (get_features_xml): New.
20874 (handle_query): Handle qXfer:features:read. Report it for qSupported.
20875 * target.h (struct target_ops): Add arch_string method.
20876
20877 2007-01-03 Denis Pilat <denis.pilat@st.com>
20878 Daniel Jacobowitz <dan@codesourcery.com>
20879
20880 * linux-low.c (linux_kill): Handle being called with no threads.
20881 * win32-i386-low.c (win32_kill): Likewise.
20882 (get_child_debug_event): Clear current_process_handle.
20883
20884 2006-12-30 Denis PILAT <denis.pilat@st.com>
20885 Daniel Jacobowitz <dan@codesourcery.com>
20886
20887 * remote-utils.c (remote_open): Check the type of specified
20888 serial port devices before opening them.
20889 * server.c (main): Kill the inferior if an error occurs during
20890 the first remote_open.
20891
20892 2006-12-05 Markus Deuling <deuling@de.ibm.com>
20893
20894 * README: Update supported targets.
20895
20896 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
20897
20898 * Makefile.in (clean): Remove reg-mips64.c.
20899 (reg-mips64.c, reg-mips64.o): New rules.
20900 * configure.srv: Handle mips64. Include regset support for mips.
20901 * linux-mips-low.c (union mips_register): New.
20902 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
20903 (mips_breakpoint, mips_breakpoint_at): Use int.
20904 (mips_collect_register, mips_supply_register)
20905 (mips_collect_register_32bit, mips_supply_register_32bit)
20906 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
20907 (mips_store_fpregset, target_regsets): New.
20908 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
20909
20910 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
20911
20912 * configure.srv: Add target "spu*-*-*".
20913 * Makefile.in (clean): Remove reg-spu.c.
20914 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
20915 * spu-low.c: New file.
20916
20917 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20918
20919 * configure.ac: Correct td_thr_tls_get_addr test.
20920 * configure: Regenerated.
20921
20922 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
20923
20924 * linux-low.c (linux_wait_for_event): Reformat. Use the
20925 pass_signals array.
20926 * remote-utils.c (decode_address_to_semicolon): New.
20927 * server.c (pass_signals, handle_general_set): New.
20928 (handle_query): Mention QPassSignals for qSupported.
20929 (main): Call handle_general_set.
20930 * server.h (pass_signals, decode_address_to_semicolon): New.
20931
20932 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
20933
20934 * server.c (handle_query): Correct error handling for read_auxv.
20935
20936 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
20937
20938 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
20939 and srv_linux_thread_db to yes.
20940 * linux-s390-low.c (s390_fill_gregset): New function.
20941 (target_regsets): Define data structure.
20942
20943 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
20944
20945 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
20946 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
20947 * config.in, configure: Regenerated.
20948 * inferiors.c (gdb_id_to_thread): New function.
20949 (gdb_id_to_thread_id): Use it.
20950 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
20951 * linux-low.h (struct process_info): Add th member.
20952 (thread_db_get_tls_address): New prototype.
20953 * remote-utils.c (decode_address): Make non-static.
20954 * server.c (handle_query): Handle qGetTLSAddr.
20955 * server.h (gdb_id_to_thread, decode_address): New prototypes.
20956 * target.h (struct target_ops): Add get_tls_address.
20957 * thread-db.c (maybe_attach_thread): Save the thread handle.
20958 (thread_db_get_tls_address): New.
20959
20960 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
20961
20962 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
20963 (linux_resume_one_process): Take a siginfo_t *. Update all
20964 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
20965 (struct pending_signals): Add a siginfo_t.
20966 (linux_wait_for_process): Always set last_status.
20967 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
20968 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
20969 * linux-low.h (struct process_info): Add last_status.
20970
20971 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
20972
20973 * remote-utils.c (try_rle): New function.
20974 (putpkt_binary): Use it.
20975
20976 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
20977
20978 * Makefile.in (clean): Clean reg-x86-64-linux.c.
20979 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
20980 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
20981 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
20982 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
20983 point registers.
20984
20985 2006-08-08 Richard Sandiford <richard@codesourcery.com>
20986
20987 * server.c (terminal_fd): New variable.
20988 (old_foreground_pgrp): Likewise.
20989 (restore_old_foreground_pgrp): New function.
20990 (start_inferior): Record the terminal file descriptor in terminal_fd
20991 and its original foreground group in old_foreground_pgrp. Register
20992 restore_old_foreground_pgrp with atexit().
20993
20994 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
20995
20996 * server.c (handle_query): Correct qPart to qXfer.
20997
20998 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
20999
21000 * configure.ac: Check for more headers which are missing on
21001 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21002 * configure.srv: Add Cygwin and mingw32.
21003 * remote-utils.c: Don't include headers unconditionally which
21004 are missing on mingw32. Include <winsock.h> for mingw32.
21005 (remote_open): Adjust for mingw32 support. Flush
21006 standard error after writing to it.
21007 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21008 (unblock_async_io, enable_async_io, disable_async_io)
21009 (readchar, getpkt): Update for Winsock support.
21010 (prepare_resume_reply): Expect a protocol signal number.
21011 * server.c: Disable <sys/wait.h> on mingw32.
21012 (start_inferior): Adjust for mingw32 support. Flush
21013 standard error after writing to it.
21014 (attach_inferior): Likewise. Use protocol signal
21015 numbers.
21016 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21017 and names.
21018 * win32-i386-low.c: New file.
21019 * Makefile.in (XM_CLIBS): Set.
21020 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21021 (win32-i386-low.o): New dependency rule.
21022 * linux-low.c (linux_wait): Use target signal numbers.
21023 * target.h (struct target_ops): Doc fix.
21024 * server.h (target_signal_to_name): New prototype.
21025 * gdbreplay.c: Don't include headers unconditionally which
21026 are missing on mingw32. Include <winsock.h> for mingw32.
21027 (remote_close, remote_open): Adjust for Winsock support.
21028 * configure, config.in: Regenerated.
21029
21030 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21031
21032 * server.c (decode_xfer_read, write_qxfer_response): New.
21033 (handle_query): Take a packet length argument. Handle
21034 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21035 the qSupported response.
21036 (main): Update call to handle_query.
21037
21038 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21039
21040 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21041 (putpkt_binary): Renamed from putpkt and adjusted for binary
21042 data.
21043 (putpkt): New wrapper for putpkt_binary.
21044 (readchar): Don't mask off the high bit.
21045 (decode_X_packet): New function.
21046 * server.c (main): Call putpkt_binary if a handler sets the packet
21047 length. Save the length of the incoming packet. Handle 'X'.
21048 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21049
21050 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21051
21052 * server.c (handle_query): Handle qSupported.
21053
21054 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21055
21056 * remote-utils.c (all_symbols_looked_up): New variable.
21057 (look_up_one_symbol): Check it.
21058 * server.h (look_up_one_symbol): New declaration.
21059 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21060
21061 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21062
21063 * Makefile.in (linux-arm-low.o): Update dependencies.
21064 * linux-arm-low.c: Include "gdb_proc_service.h".
21065 (PTRACE_GET_THREAD_AREA): Define.
21066 (ps_get_thread_area): New function.
21067
21068 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21069
21070 * configure.srv (m68k*-*-uclinux*): New target.
21071 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21072 (linux_resume_one_process): Remove extraneous cast.
21073 (linux_read_offsets): New.
21074 (linux_target_op): Add linux_read_offsets on mmuless systems.
21075 * server.c (handle_query): Add qOffsets logic.
21076 * target.h (struct target_ops): Add read_offsets.
21077
21078 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21079
21080 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21081 (PTRACE_GET_THREAD_AREA): Define.
21082 (ps_get_thread_area): New function.
21083 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21084 (linux-x86-64-low.o): Update.
21085
21086 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21087
21088 * configure.ac: Remove checks for prfpregset_t.
21089 * gdb_proc_service.h: New file.
21090 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21091 new "gdb_proc_service.h".
21092 * proc-service.c: Likewise.
21093 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21094 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21095 * Makefile.in (gdb_proc_service_h): Updated.
21096 * configure, config.in: Regenerated.
21097
21098 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21099
21100 * remote-utils.c (prepare_resume_reply): Move declaration
21101 of gdb_id_from_wait to the top of the block.
21102
21103 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21104
21105 * linux-low.c (regsets_store_inferior_registers): Read the regset
21106 from the target before filling it.
21107
21108 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21109
21110 * server.c (attach_inferior): Return SIGTRAP for a successful
21111 attach.
21112
21113 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21114
21115 * Makefile.in (OBS): Add version.o.
21116 (STAGESTUFF): Delete.
21117 (version.o): Add dependencies.
21118 (version.c): Replace rule.
21119 (clean): Remove version.c.
21120 * server.c (gdbserver_version): New.
21121 (gdbserver_usage): Use printf.
21122 (main): Handle --version and --help.
21123 * server.h (version, host_name): Add declarations.
21124
21125 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21126
21127 * linux-arm-low.c:
21128 * linux-arm-low.c:
21129 * inferiors.c:
21130 * i387-fp.h:
21131 * i387-fp.c:
21132 * gdbreplay.c:
21133 * regcache.c:
21134 * proc-service.c:
21135 * mem-break.h:
21136 * mem-break.c:
21137 * linux-x86-64-low.c:
21138 * linux-sh-low.c:
21139 * linux-s390-low.c:
21140 * linux-ppc64-low.c:
21141 * linux-ppc-low.c:
21142 * linux-mips-low.c:
21143 * linux-m68k-low.c:
21144 * linux-m32r-low.c:
21145 * linux-low.h:
21146 * linux-low.c:
21147 * linux-ia64-low.c:
21148 * linux-i386-low.c:
21149 * linux-crisv32-low.c:
21150 * thread-db.c:
21151 * terminal.h:
21152 * target.h:
21153 * target.c:
21154 * server.h:
21155 * server.c:
21156 * remote-utils.c:
21157 * regcache.h:
21158 * utils.c:
21159 * Makefile.in:
21160 * configure.ac:
21161 * gdbserver.1: Add (C) after Copyright. Update the FSF
21162 address.
21163
21164 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21165
21166 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21167 (arm_breakpoint_at): Recognize both breakpoints.
21168 (the_low_target): Use the correct breakpoint instruction.
21169
21170 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21171
21172 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21173 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21174 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21175 (the_low_target): Update.
21176
21177 2005-10-25 Andreas Schwab <schwab@suse.de>
21178
21179 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21180
21181 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21182 (ia64_num_regs): Reduce to 462.
21183
21184 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21185
21186 * acinclude.m4: Correct quoting.
21187 * aclocal.m4: Regenerated.
21188
21189 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21190 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21191 (thread_db_init): Call thread_db_err_str.
21192 * configure.ac: Check for TD_VERSION.
21193 * config.in, configure: Regenerated.
21194
21195 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21196
21197 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21198
21199 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21200
21201 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21202 is not available. Define HAVE_PTRACE_GETREGS if it is.
21203 * config.in, configure: Regenerated.
21204 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21205 * linux-i386-low.c, linux-m68k-low.c: Update to use
21206 HAVE_PTRACE_GETREGS.
21207 * linux-low.c (regsets_fetch_inferior_registers)
21208 (regsets_store_inferior_registers): Only return 0 if we processed
21209 GENERAL_REGS.
21210 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21211 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21212
21213 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21214
21215 * inferiors.c (struct thread_info): Add gdb_id.
21216 (add_thread): Add gdb_id argument.
21217 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21218 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21219 calls to add_thread.
21220 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21221 * server.c (handle_query): Use thread_to_gdb_id.
21222 (handle_v_cont, main): Use gdb_id_to_thread_id.
21223 * server.h (add_thread): Update prototype.
21224 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21225 prototypes.
21226
21227 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21228
21229 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21230 left-padded registers.
21231 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21232 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21233
21234 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21235
21236 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21237 * configure: Regenerate.
21238 * config.in: Regenerate.
21239 * server.h (NEED_DECLARATION_STRERROR):
21240 Replace with !HAVE_DECL_STRERROR.
21241
21242 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21243
21244 * linux-low.c (linux_wait, linux_send_signal): Don't test
21245 an unsigned long variable for > 0 if it could be MAX_ULONG.
21246 * server.c (myresume): Likewise.
21247 * target.c (set_desired_inferior): Likewise.
21248
21249 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21250
21251 * configure.ac: Simplify and improve check for socklen_t.
21252 * configure, config.in: Regenerate.
21253
21254 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21255
21256 * acconfig.h: Remove.
21257 * configure.ac: Add a test for socklen_t. Use three-argument
21258 AC_DEFINE throughout.
21259 * config.in: Regenerated using autoheader 2.59.
21260 * configure: Regenerated.
21261
21262 * gdbreplay.c (socklen_t): Provide a default.
21263 (remote_open): Use socklen_t.
21264 * remote-utils.c (socklen_t): Provide a default.
21265 (remote_open): Use socklen_t.
21266 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21267 unsigned char.
21268
21269 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21270 char for buffers.
21271 * linux-low.c (linux_read_memory, linux_write_memory)
21272 (linux_read_auxv): Likewise.
21273 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21274 (check_mem_write): Likewise.
21275 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21276 Likewise.
21277 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21278 (registers_from_string, register_data): Likewise.
21279 * server.c (handle_query, main): Likewise.
21280 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21281 (decode_M_packet): Likewise.
21282 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21283 * target.h (struct target_ops): Update read_memory, write_memory,
21284 and read_auxv.
21285 (read_inferior_memory, write_inferior_memory): Update.
21286 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21287 to unsigned char *.
21288 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21289 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21290 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21291 linux-s390-low.c, linux-sh-low.c: Update for changes in
21292 read_inferior_memory and the_low_target->breakpoint.
21293
21294 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21295
21296 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21297 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21298 * configure.srv: Add powerpc64-*-linux*.
21299 * linux-ppc64-low.c: New file.
21300
21301 2005-05-23 Orjan Friberg <orjanf@axis.com>
21302
21303 * linux-cris-low.c: New file with support for CRIS.
21304 * linux-crisv32-low.c: Ditto for CRISv32.
21305 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21306 (clean): Add reg-cris.c and reg-crisv32.c.
21307 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21308 reg-crisv32.o, and reg-crisv32.c to make rules.
21309 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21310 recognized targets.
21311
21312 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21313
21314 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21315 of sizeof (PTRACE_XFER_TYPE).
21316 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21317
21318 2005-05-12 Orjan Friberg <orjanf@axis.com>
21319
21320 * target.h (struct target_ops): Add insert_watchpoint,
21321 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21322 pointers for hardware watchpoint support.
21323 * linux-low.h (struct linux_target_ops): Ditto.
21324 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21325 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21326 to linux_target_ops.
21327 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21328 reply packet.
21329 * server.c (main): Recognize 'Z' and 'z' packets.
21330
21331 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21332
21333 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21334 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21335 (the_low_target): Add new members.
21336
21337 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21338
21339 * proc-service.c (ps_lgetregs): Search all_processes instead of
21340 all_threads.
21341
21342 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21343
21344 * server.c (start_inferior): Change return type to int.
21345 (attach_inferior): Change sigptr to int *.
21346 (handle_v_cont, handle_v_requests): Change signal to int *.
21347 (main): Change signal to int.
21348
21349 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21350
21351 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21352 * configure.srv: Add m32r*-*-linux*.
21353 * linux-m32r-low.c: New file.
21354
21355 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21356
21357 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21358
21359 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21360
21361 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21362 Take unsigned long arguments for PIDs.
21363 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21364 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21365 (wait_for_sigstop, linux_resume_one_process)
21366 (regsets_fetch_inferior_registers, linux_send_signal)
21367 (linux_read_auxv): Likewise. Update the types of variables holding
21368 PIDs. Update format string specifiers.
21369 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21370 * remote-utils.c (prepare_resume_reply): Likewise.
21371 * server.c (cont_thread, general_thread, step_thread)
21372 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21373 unsigned long.
21374 (handle_query): Update format specifiers.
21375 (handle_v_cont, main): Use strtoul for thread IDs.
21376 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21377 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21378 (general_thread, step_thread, thread_from_wait)
21379 (old_thread_from_wait): Update.
21380 * target.h (struct thread_resume): Use unsigned long for THREAD.
21381 (struct target_ops): Use unsigned long for arguments to attach and
21382 thread_alive.
21383
21384 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21385
21386 * acinclude.m4: Include bfd/bfd.m4 directly.
21387 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21388 <agriffis@toolchain.org>.
21389 * aclocal.m4, configure: Regenerated.
21390
21391 2005-01-07 Andrew Cagney <cagney@gnu.org>
21392
21393 * configure.ac: Rename configure.in, require autoconf 2.59.
21394 * configure: Re-generate.
21395
21396 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21397
21398 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21399 LIBS when finished.
21400 * aclocal.m4: Regenerated.
21401 * configure: Regenerated.
21402
21403 2004-11-21 Andreas Schwab <schwab@suse.de>
21404
21405 * linux-m68k-low.c (m68k_num_gregs): Define.
21406 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21407 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21408 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21409 (m68k_breakpoint_at): New. Add to the_low_target.
21410
21411 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21412 srv_linux_thread_db to yes.
21413
21414 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21415
21416 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21417 (ARCH_SET_FS): Likewise.
21418 (ARCH_GET_FS): Likewise.
21419 (ARCH_GET_GS): Likewise.
21420
21421 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21422
21423 * linux-i386-low.c (ps_get_thread_area): New.
21424 * linux-x86-64-low.c (ps_get_thread_area): New.
21425 * linux-low.c: Include <sys/syscall.h>.
21426 (linux_kill_one_process): Don't kill the first thread here.
21427 (linux_kill): Kill the first thread here.
21428 (kill_lwp): New function.
21429 (send_sigstop, linux_send_signal): Use it.
21430 * proc-service.c: Clean up #ifdefs.
21431 (fpregset_info): Delete.
21432 (ps_lgetregs): Update and enable implementation.
21433 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21434 implementations.
21435 * remote-utils.c (struct sym_cache, symbol_cache): New.
21436 (input_interrupt): Print a clearer message.
21437 (async_io_enabled): New variable.
21438 (enable_async_io, disable_async_io): Use it. Update comments.
21439 (look_up_one_symbol): Use the symbol cache.
21440 * thread-db.c (thread_db_look_up_symbols): New function.
21441 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21442
21443 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21444
21445 * configure.in: Test for -rdynamic.
21446 * configure: Regenerated.
21447 * Makefile (INTERNAL_LDFLAGS): New.
21448 (gdbserver, gdbreplay): Use it.
21449
21450 2004-09-02 Andrew Cagney <cagney@gnu.org>
21451
21452 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21453
21454 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21455
21456 * linux-low.c (linux_wait): Clear all_processes list also.
21457
21458 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21459
21460 * linux-low.c: Include <errno.h>. Remove extern declaration of
21461 errno.
21462
21463 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21464
21465 * gdbreplay.c, server.h, utils.c: Update copyright years.
21466
21467 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21468
21469 * server.c (main): Print child status or termination signal from
21470 variable 'signal', not 'sig'.
21471
21472 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21473
21474 * linux-low.c (linux_read_memory): Change return type to
21475 int. Check for and return error from ptrace().
21476 * target.c (read_inferior_memory): Change return type to int. Pass
21477 back return status from the_target->read_memory().
21478 * target.h (struct target_ops): Adapt *read_memory() prototype.
21479 Update comment.
21480 (read_inferior_memory): Adapt prototype.
21481 * server.c (main): Return an error packet if
21482 read_inferior_memory() returns an error.
21483
21484 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21485
21486 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21487 Unify with other clean targets.
21488
21489 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21490
21491 * server.c (handle_v_cont): Call set_desired_inferior.
21492
21493 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21494
21495 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21496
21497 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21498
21499 * linux-low.c (linux_wait): Unblock async I/O.
21500 (linux_resume): Block and enable async I/O.
21501 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21502 * server.h (block_async_io, unblock_async_io): Add prototypes.
21503
21504 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21505
21506 * remote-utils.c (remote_open): Print a status notice after
21507 opening a TCP port.
21508 * server.c (attach_inferior): Print a status notice after
21509 attaching.
21510
21511 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21512
21513 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21514
21515 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21516
21517 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21518 error packet.
21519 * server.c, target.h: Update copyright years.
21520
21521 2004-02-25 Roland McGrath <roland@redhat.com>
21522
21523 * target.h (struct target_ops): New member `read_auxv'.
21524 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21525 * linux-low.c (linux_read_auxv): New function.
21526 (linux_target_ops): Initialize `read_auxv' member to that.
21527
21528 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21529
21530 Committed by Jim Blandy <jimb@redhat.com>.
21531
21532 * linux-s390-low.c (s390_num_regs): Update.
21533 (s390_regmap): Remove control registers. Use __s390x__ predefine
21534 instead of GPR_SIZE to distiguish s390 and s390x targets.
21535
21536 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21537
21538 * linux-low.c: Update copyright year.
21539 (check_removed_breakpoint): Clear pending_is_breakpoint.
21540 (linux_set_resume_request, linux_queue_one_thread)
21541 (resume_status_pending_p): New functions.
21542 (linux_continue_one_thread): Use process->resume.
21543 (linux_resume): Only resume threads if there are no pending events.
21544 * linux-low.h (struct process_info): Add resume request
21545 pointer.
21546
21547 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21548
21549 * regcache.c (new_register_cache): Clear the allocated register
21550 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21551
21552 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21553
21554 * linux-low.c (linux_resume): Take a struct thread_resume *
21555 argument.
21556 (linux_wait): Update call.
21557 (resume_ptr): New static variable.
21558 (linux_continue_one_thread): Renamed from
21559 linux_continue_one_process. Use resume_ptr.
21560 (linux_resume): Use linux_continue_one_thread.
21561 * server.c (handle_v_cont, handle_v_requests): New functions.
21562 (myresume): New function.
21563 (main): Handle 'v' case.
21564 * target.h (struct thread_resume): New type.
21565 (struct target_ops): Change argument of "resume" to struct
21566 thread_resume *.
21567 (myresume): Delete macro.
21568
21569 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21570
21571 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21572 (uninstall): Support DESTDIR.
21573
21574 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21575
21576 * configure.srv: Add xscale*linux copy of arm*linux entry.
21577
21578 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21579
21580 * linux-arm-low.c (arm_reinsert_addr): New function.
21581 (the_low_target): Add arm_reinsert_addr.
21582
21583 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21584
21585 * mem-break.c: Remove whitespace at end of file.
21586
21587 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21588
21589 * configure.in: Check whether we need to prototype strerror.
21590 * server.h: Optionally prototype strerror.
21591 * gdbreplay.c (perror_with_name): Use strerror.
21592 * linux-low.c (linux_attach_lwp): Use strerror.
21593 * utils.c (perror_with_name): Use strerror.
21594 * config.in, configure: Regenerated.
21595
21596 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21597
21598 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21599 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21600
21601 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21602
21603 * Makefile.in (SFILES): Update.
21604 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21605 low-sun3.c: Remove files.
21606
21607 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21608
21609 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21610 (linux_detach_one_process, linux_detach): New functions.
21611 (linux_target_ops): Add linux_detach.
21612 * server.c (main): Handle 'D' packet.
21613 * target.h (struct target_ops): Add "detach" member.
21614 (detach_inferior): Define.
21615
21616 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21617
21618 From Kelley Cook <kelleycook@wideopenwest.com>:
21619 * configure.srv: Accept i[34567]86 variants.
21620
21621 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21622
21623 * linux-low.c (linux_wait_for_event): Correct comment typos.
21624 (linux_resume_one_process): Call check_removed_breakpoint.
21625 (linux_send_signal): New function.
21626 (linux_target_ops): Add linux_send_signal.
21627 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21628 of kill.
21629 * target.h (struct target_ops): Add send_signal.
21630
21631 2003-05-29 Jim Blandy <jimb@redhat.com>
21632
21633 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21634 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21635 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21636 away part of the register's value.
21637
21638 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21639
21640 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21641 (linux_wait_for_event, linux_init_signals): Likewise.
21642
21643 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21644
21645 * configure.in: Check for stdlib.h.
21646 * configure: Regenerated.
21647 * config.in: Regenerated.
21648
21649 2003-01-04 Andreas Schwab <schwab@suse.de>
21650
21651 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21652
21653 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21654
21655 * Makefile.in: Remove obsolete code.
21656
21657 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21658
21659 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21660 defined(PT_FPR0_HI).
21661
21662 2002-11-17 Stuart Hughes <seh@zee2.com>
21663
21664 * linux-arm-low.c (arm_num_regs): Increase.
21665 (arm_regmap): Include status register.
21666
21667 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21668
21669 * linux-low.c (register_addr): Remove incorrect -1 check.
21670
21671 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21672
21673 * linux-low.c (linux_create_inferior): Call setpgid. Return
21674 the new PID.
21675 (unstopped_p, linux_signal_pid): Remove.
21676 (linux_target_ops): Remove linux_signal_pid.
21677 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21678 global instead of target method.
21679 * target.h (struct target_ops): Remove signal_pid. Update comment
21680 for create_inferior.
21681 * server.c (signal_pid): New variable.
21682 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21683 gdbserver. Set the child to be the foreground process group.
21684 (attach_inferior): Set signal_pid.
21685
21686 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21687
21688 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21689
21690 2002-08-20 Jim Blandy <jimb@redhat.com>
21691
21692 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21693 default for this.
21694
21695 2002-08-01 Andrew Cagney <cagney@redhat.com>
21696
21697 * Makefile.in: Make chill references obsolete.
21698
21699 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21700
21701 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21702 * configure: Regenerate.
21703 * config.in: Regenerate.
21704
21705 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21706
21707 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21708 (perror_with_name, remote_close, remote_open, expect, play): Static.
21709
21710 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21711
21712 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21713 byte offsets instead of an array of indexes.
21714 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21715
21716 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21717
21718 * regcache.c: Add comment.
21719
21720 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21721
21722 * thread-db.c: New file.
21723 * proc-service.c: New file.
21724 * acinclude.m4: New file.
21725 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21726 proc-service.o, and thread-db.o.
21727 (linux-low.o): Add USE_THREAD_DB.
21728 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21729 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21730 * aclocal.m4: Regenerated.
21731 * config.in: Regenerated.
21732 * configure: Regenerated.
21733 * configure.in: Check for proc_service.h, sys/procfs.h,
21734 thread_db.h, and linux/elf.h headrs.
21735 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21736 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21737 Check for -lthread_db and thread support.
21738 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21739 PowerPC, and SuperH.
21740 * i387-fp.c: Constify arguments.
21741 * i387-fp.h: Likewise.
21742 * inferiors.c: (struct thread_info): Renamed from
21743 `struct inferior_info'. Remove PID member. Use generic inferior
21744 list header. All uses updated.
21745 (inferiors, signal_pid): Removed.
21746 (all_threads): New variable.
21747 (get_thread): Define.
21748 (add_inferior_to_list): New function.
21749 (for_each_inferior): New function.
21750 (change_inferior_id): New function.
21751 (add_inferior): Removed.
21752 (remove_inferior): New function.
21753 (add_thread): New function.
21754 (free_one_thread): New function.
21755 (remove_thread): New function.
21756 (clear_inferiors): Use for_each_inferior and free_one_thread.
21757 (find_inferior): New function.
21758 (find_inferior_id): New function.
21759 (inferior_target_data): Update argument type.
21760 (set_inferior_target_data): Likewise.
21761 (inferior_regcache_data): Likewise.
21762 (set_inferior_regcache_data): Likewise.
21763 * linux-low.c (linux_bp_reinsert): Remove.
21764 (all_processes, stopping_threads, using_thrads)
21765 (struct pending_signals, debug_threads, pid_of): New.
21766 (inferior_pid): Replace with macro.
21767 (struct inferior_linux_data): Remove.
21768 (get_stop_pc, add_process): New functions.
21769 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21770 Use add_process and add_thread.
21771 (linux_attach_lwp): New function, based on old linux_attach. Use
21772 add_process and add_thread. Set stop_expected for new threads.
21773 (linux_attach): New function.
21774 (linux_kill_one_process): New function.
21775 (linux_kill): Kill all LWPs.
21776 (linux_thread_alive): Use find_inferior_id.
21777 (check_removed_breakpoints, status_pending_p): New functions.
21778 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21779 Update. Use WNOHANG. Wait for cloned processes also. Update process
21780 struct for the found process.
21781 (linux_wait_for_event): New function.
21782 (linux_wait): Use it. Support LWPs.
21783 (send_sigstop, wait_for_sigstop, stop_all_processes)
21784 (linux_resume_one_process, linux_continue_one_process): New functions.
21785 (linux_resume): Support LWPs.
21786 (REGISTER_RAW_SIZE): Remove.
21787 (fetch_register): Use register_size instead. Call supply_register.
21788 (usr_store_inferior_registers): Likewise. Call collect_register.
21789 Fix recursive case.
21790 (regsets_fetch_inferior_registers): Improve error message.
21791 (regsets_store_inferior_registers): Add debugging.
21792 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21793 (unstopped_p, linux_signal_pid): New functions.
21794 (linux_target_ops): Add linux_signal_pid.
21795 (linux_init_signals): New function.
21796 (initialize_low): Call it. Initialize using_threads.
21797 * regcache.c (inferior_regcache_data): Add valid
21798 flag.
21799 (get_regcache): Fetch registers lazily. Add fetch argument
21800 and update all callers.
21801 (regcache_invalidate_one, regcache_invalidate): New
21802 functions.
21803 (new_register_cache): Renamed from create_register_cache.
21804 Return the new regcache.
21805 (free_register_cache): Change argument to a void *.
21806 (registers_to_string, registers_from_string): Call get_regcache
21807 with fetch flag set.
21808 (register_data): Make static. Pass fetch flag to get_regcache.
21809 (supply_register): Call get_regcache with fetch flag clear.
21810 (collect_register): Call get_regcache with fetch flag set.
21811 (collect_register_as_string): New function.
21812 * regcache.h: Update.
21813 * remote-utils.c (putpkt): Flush after debug output and use
21814 stderr.
21815 Handle input interrupts while waiting for an ACK.
21816 (input_interrupt): Use signal_pid method.
21817 (getpkt): Flush after debug output and use stderr.
21818 (outreg): Use collect_register_as_string.
21819 (new_thread_notify, dead_thread_notify): New functions.
21820 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21821 and general_thread.
21822 (look_up_one_symbol): Flush after debug output.
21823 * server.c (step_thread, server_waiting): New variables.
21824 (start_inferior): Don't use signal_pid. Update call to mywait.
21825 (attach_inferior): Update call to mywait.
21826 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21827 (main): Don't fetch/store registers explicitly. Use
21828 set_desired_inferior. Support proposed ``Hs'' packet. Update
21829 calls to mywait.
21830 * server.h: Update.
21831 (struct inferior_list, struct_inferior_list_entry): New.
21832 * target.c (set_desired_inferior): New.
21833 (write_inferior_memory): Constify.
21834 (mywait): New function.
21835 * target.h: Update.
21836 (struct target_ops): New signal_pid method.
21837 (mywait): Removed macro, added prototype.
21838
21839 * linux-low.h (regset_func): Removed.
21840 (regset_fill_func, regset_store_func): New.
21841 (enum regset_type): New.
21842 (struct regset_info): Add type field. Use new operation types.
21843 (struct linux_target_ops): stop_pc renamed to get_pc.
21844 Add decr_pc_after_break and breakpoint_at.
21845 (get_process, get_thread_proess, get_process_thread)
21846 (strut process_info, all_processes, linux_attach_lwp)
21847 (thread_db_init): New.
21848
21849 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21850 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21851 (the_low_target): Add new members.
21852 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21853 (i386_store_fpxregset): Constify.
21854 (target_regsets): Add new kind identifier.
21855 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21856 (i386_set_pc): Add debugging.
21857 (i386_breakpoint_at): New function.
21858 (the_low_target): Add new members.
21859 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21860 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21861 (mips_breakpoint_at): New.
21862 (the_low_target): Add new members.
21863 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21864 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21865 (the_low_target): Add new members.
21866 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21867 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21868 (the_low_target): Add new members.
21869 * linux-x86-64-low.c (target_regsets): Add new kind
21870 identifier.
21871
21872 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
21873
21874 From Martin Pool <mbp@samba.org>:
21875 * server.c (gdbserver_usage): New function.
21876 (main): Call it.
21877
21878 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
21879
21880 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
21881 stop_at -> stop_pc.
21882
21883 2002-05-04 Andrew Cagney <ac131313@redhat.com>
21884
21885 * Makefile.in: Remove obsolete code.
21886
21887 2002-04-24 Michal Ludvig <mludvig@suse.cz>
21888
21889 * linux-low.c (regsets_fetch_inferior_registers),
21890 (regsets_store_inferior_registers): Removed cast to int from
21891 ptrace() calls.
21892 * regcache.h: Added declaration of struct inferior_info.
21893
21894 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21895
21896 * inferiors.c (struct inferior_info): Add regcache_data.
21897 (add_inferior): Call create_register_cache.
21898 (clear_inferiors): Call free_register_cache.
21899 (inferior_regcache_data, set_inferior_regcache_data): New functions.
21900 * regcache.c (struct inferior_regcache_data): New.
21901 (registers): Remove.
21902 (get_regcache): New function.
21903 (create_register_cache, free_register_cache): New functions.
21904 (set_register_cache): Don't initialize the register cache here.
21905 (registers_to_string, registers_from_string, register_data): Call
21906 get_regcache.
21907 * regcache.h: Add prototypes.
21908 * server.h: Likewise.
21909
21910 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
21911
21912 * mem-break.c: New file.
21913 * mem-break.h: New file.
21914 * Makefile.in: Add mem-break.o rule; update server.h
21915 dependencies.
21916 * inferiors.c (struct inferior_info): Add target_data
21917 member.
21918 (clear_inferiors): Free target_data member if set.
21919 (inferior_target_data, set_inferior_target_data): New functions.
21920 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
21921 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
21922 * linux-low.c (linux_bp_reinsert): New variable.
21923 (struct inferior_linux_data): New.
21924 (linux_create_inferior): Use set_inferior_target_data.
21925 (linux_attach): Likewise. Call add_inferior.
21926 (linux_wait_for_one_inferior): New function.
21927 (linux_wait): Call it.
21928 (linux_write_memory): Add const.
21929 (initialize_low): Call set_breakpoint_data.
21930 * linux-low.h (struct linux_target_ops): Add breakpoint
21931 handling members.
21932 * server.c (attach_inferior): Remove extra add_inferior
21933 call.
21934 * server.h: Include mem-break.h. Update inferior.c
21935 prototypes.
21936 * target.c (read_inferior_memory)
21937 (write_inferior_memory): New functions.
21938 * target.h (read_inferior_memory)
21939 (write_inferior_memory): Change macros to prototypes.
21940 (struct target_ops): Update comments. Add const to write_memory
21941 definition.
21942
21943 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
21944
21945 * linux-low.c (usr_store_inferior_registers): Support
21946 registers which are allowed to fail to store.
21947 * linux-low.h (linux_target_ops): Likewise.
21948 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
21949 (ppc_cannot_store_register): FPSCR may not be storable.
21950
21951 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21952
21953 * server.h: Include <string.h> if HAVE_STRING_H.
21954 * ChangeLog: Correct paths in last ChangeLog entry.
21955
21956 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
21957
21958 * linux-low.h: Remove obsolete prototypes.
21959 (struct linux_target_ops): New.
21960 (extern the_low_target): New.
21961 * linux-low.c (num_regs, regmap): Remove declarations.
21962 (register_addr): Use the_low_target explicitly.
21963 (fetch_register): Likewise.
21964 (usr_fetch_inferior_registers): Likewise.
21965 (usr_store_inferior_registers): Likewise.
21966 * linux-arm-low.c (num_regs): Remove.
21967 (arm_num_regs): Define.
21968 (arm_regmap): Renamed from regmap, made static.
21969 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
21970 made static.
21971 (arm_cannot_store_register): Renamed from cannot_store_register,
21972 made static.
21973 (the_low_target): New.
21974 * linux-i386-low.c (num_regs): Remove.
21975 (i386_num_regs): Define.
21976 (i386_regmap): Renamed from regmap, made static.
21977 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
21978 made static.
21979 (i386_cannot_store_register): Renamed from cannot_store_register,
21980 made static.
21981 (the_low_target): New.
21982 * linux-ia64-low.c (num_regs): Remove.
21983 (ia64_num_regs): Define.
21984 (ia64_regmap): Renamed from regmap, made static.
21985 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
21986 made static.
21987 (ia64_cannot_store_register): Renamed from cannot_store_register,
21988 made static.
21989 (the_low_target): New.
21990 * linux-m68k-low.c (num_regs): Remove.
21991 (m68k_num_regs): Define.
21992 (m68k_regmap): Renamed from regmap, made static.
21993 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
21994 made static.
21995 (m68k_cannot_store_register): Renamed from cannot_store_register,
21996 made static.
21997 (the_low_target): New.
21998 * linux-mips-low.c (num_regs): Remove.
21999 (mips_num_regs): Define.
22000 (mips_regmap): Renamed from regmap, made static.
22001 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22002 made static.
22003 (mips_cannot_store_register): Renamed from cannot_store_register,
22004 made static.
22005 (the_low_target): New.
22006 * linux-ppc-low.c (num_regs): Remove.
22007 (ppc_num_regs): Define.
22008 (ppc_regmap): Renamed from regmap, made static.
22009 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22010 made static.
22011 (ppc_cannot_store_register): Renamed from cannot_store_register,
22012 made static.
22013 (the_low_target): New.
22014 * linux-s390-low.c (num_regs): Remove.
22015 (s390_num_regs): Define.
22016 (s390_regmap): Renamed from regmap, made static.
22017 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22018 made static.
22019 (s390_cannot_store_register): Renamed from cannot_store_register,
22020 made static.
22021 (the_low_target): New.
22022 * linux-sh-low.c (num_regs): Remove.
22023 (sh_num_regs): Define.
22024 (sh_regmap): Renamed from regmap, made static.
22025 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22026 made static.
22027 (sh_cannot_store_register): Renamed from cannot_store_register,
22028 made static.
22029 (the_low_target): New.
22030 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22031 (the_low_target): New.
22032
22033 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22034
22035 * Makefile.in: Add stamp-h target.
22036 * configure.in: Create stamp-h.
22037 * configure: Regenerated.
22038
22039 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22040
22041 * inferiors.c: New file.
22042 * target.c: New file.
22043 * target.h: New file.
22044 * Makefile.in: Add target.o and inferiors.o. Update
22045 dependencies.
22046 * linux-low.c (inferior_pid): New static variable,
22047 moved from server.c.
22048 (linux_create_inferior): Renamed from create_inferior.
22049 Call add_inferior. Return 0 on success instead of a PID.
22050 (linux_attach): Renamed from myattach.
22051 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22052 (linux_thread_alive): Renamed from mythread_alive.
22053 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22054 child dies.
22055 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22056 (regsets_store_inferior_registers): Correct error message.
22057 Add missing ``return 0''.
22058 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22059 (linux_store_registers): Renamed from store_inferior_registers.
22060 (linux_read_memory): Renamed from read_inferior_memory.
22061 (linux_write_memory): Renamed from write_inferior_memory.
22062 (linux_target_ops): New structure.
22063 (initialize_low): Call set_target_ops ().
22064 * remote-utils.c (unhexify): New function.
22065 (hexify): New function.
22066 (input_interrupt): Send signals to ``signal_pid''.
22067 * server.c (inferior_pid): Remove.
22068 (start_inferior): Update create_inferior call.
22069 (attach_inferior): Call add_inferior.
22070 (handle_query): New function.
22071 (main): Call handle_query for `q' packets.
22072 * server.h: Include "target.h". Remove obsolete prototypes.
22073 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22074
22075 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22076
22077 * Makefile.in: Add WARN_CFLAGS. Update configury
22078 dependencies.
22079 * configure.in: Check for <string.h>
22080 * configure: Regenerate.
22081 * config.in: Regenerate.
22082 * gdbreplay.c: Include needed system headers.
22083 (remote_open): Remove strchr prototype.
22084 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22085 * regcache.c (supply_register): Change buf argument to const void *.
22086 (supply_register_by_name): Likewise.
22087 (collect_register): Change buf argument to void *.
22088 (collect_register_by_name): Likewise.
22089 * regcache.h: Add missing prototypes.
22090 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22091 * server.c (handle_query): New function.
22092 (attached): New static variable, moved out of main.
22093 (main): Quiet longjmp clobber warnings.
22094 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22095 * utils.c (error): Remove NORETURN.
22096 (fatal): Likewise.
This page took 0.489168 seconds and 4 git commands to generate.