]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdbserver/ChangeLog
gdbserver: remove support for M32R
[thirdparty/binutils-gdb.git] / gdbserver / ChangeLog
CommitLineData
bd1467ae
SM
12020-06-12 Simon Marchi <simon.marchi@efficios.com>
2
3 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
4 * configure.srv: Remove m32r case.
5 * linux-m32r-low.cc: Remove.
6
7b46bf6f
SM
72020-06-12 Simon Marchi <simon.marchi@efficios.com>
8
9 * Makefile.in (SFILES): Remove linux-cris-low.c.
10 * configure.srv: Remove cris cases.
11 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
12
1fa29f56
SM
132020-06-12 Simon Marchi <simon.marchi@efficios.com>
14
15 * Makefile.in (SFILES): Remove linux-bfin-low.c.
16 * configure.srv: Remove bfin case.
17 * linux-bfin-low.cc: Remove.
18 * linux-low.cc: Remove BFIN-conditional code.
19
613f149a
SM
202020-06-12 Simon Marchi <simon.marchi@efficios.com>
21
22 * configure: Re-generate.
23 * configure.ac: Remove srv_qnx test.
24 * configure.srv: Remove nto case.
25 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
26 * remote-utils.c: Remove __QNX__-guarded code.
27
fdb95bf5
SM
282020-06-12 Simon Marchi <simon.marchi@efficios.com>
29
30 * configure: Re-generate.
31 * configure.ac: Remove srv_lynxos test.
32 * configure.srv: Remove lynxos cases.
33 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
34 Remove.
35
c00094dc
SM
362020-06-12 Simon Marchi <simon.marchi@efficios.com>
37
38 * README: Fix a few outdated or incoherent things.
39
6479bf85
HD
402020-05-27 Hannes Domani <ssbssa@yahoo.de>
41
42 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
43 (win32_clear_inferiors): Use open_process_used.
44 (get_child_debug_event): Likewise.
45
bea571eb
MW
462020-05-25 Michael Weghorn <m.weghorn@posteo.de>
47
48 PR gdbserver/25893
49 * linux-low.cc (linux_process_target::create_inferior),
50 lynx-low.cc (lynx_process_target::create_inferior),
51 win32-low.cc (win32_process_target::create_inferior): Use
52 construct_inferior_arguments instead of stringify_argv
53 to get string representation which properly escapes
54 special characters.
55 * server.cc (handle_v_run): Just pass empty program arg
56 as such, since any further processing is now handled via
57 construct_inferior_arguments.
58
ace6b919
MW
592020-05-25 Michael Weghorn <m.weghorn@posteo.de>
60
61 * nto-low.cc (nto_process_target::create_inferior): Pass
62 argv to spawnp function as char **.
63
b69ca137
MW
642020-05-25 Michael Weghorn <m.weghorn@posteo.de>
65
66 * server.cc (captured_main), (handle_v_run): No longer
67 insert extra NULL element to args vector.
68
51e2cfa2
PA
692020-05-23 Pedro Alves <palves@redhat.com>
70
71 * gdb-safe-ctype.h: New.
72
8bbf0394
TBA
732020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
74
75 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
76 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
77 (ia64_target::low_breakpoint_at): Ditto.
78
01370779
HD
792020-05-15 Hannes Domani <ssbssa@yahoo.de>
80
81 * win32-i386-low.cc (i386_supports_z_point_type): Handle
82 Z_PACKET_HW_BP z_type.
83 (i386_insert_point): Handle raw_bkpt_type type.
84 (i386_remove_point): Likewise.
85
7d186bc0
HD
862020-04-30 Hannes Domani <ssbssa@yahoo.de>
87
88 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
89 Add arch/i386.o.
90 * win32-arm-low.cc (arm_num_regs): New function.
91 (struct win32_target_ops): Use arm_num_regs.
92 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
93 processes.
94 (i386_get_thread_context): Likewise.
95 (i386_prepare_to_resume): Likewise.
96 (i386_thread_added): Likewise.
97 (i386_single_step): Likewise.
98 (i386_fetch_inferior_register): Likewise.
99 (i386_store_inferior_register): Likewise.
100 (i386_arch_setup): Likewise.
101 (i386_win32_num_regs): New function.
102 (struct win32_target_ops): Use i386_win32_num_regs.
103 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
104 processes.
105 (win32_require_context): Likewise.
106 (child_add_thread): Likewise.
107 (do_initial_child_stuff): Likewise.
108 (continue_one_thread): Likewise.
109 (win32_process_target::resume): Likewise.
110 (load_psapi): Likewise.
111 (win32_add_all_dlls): Likewise.
112 (maybe_adjust_pc): Likewise.
113 (win32_process_target::qxfer_siginfo): Likewise.
114 (initialize_low): Likewise.
115 * win32-low.h (struct win32_target_ops): Change num_regs to
116 callback function.
117
1eb39914
SM
1182020-04-27 Simon Marchi <simon.marchi@efficios.com>
119
120 * configure.ac: Remove check for fs_base/gs_base in
121 user_regs_struct.
122 * configure: Re-generate.
123 * config.in: Re-generate.
124 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
125 x86_store_gregset): Adjust.
126
51ac8e22
HD
1272020-04-22 Hannes Domani <ssbssa@yahoo.de>
128
129 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
130 comparison.
131
a010605f
TT
1322020-04-16 Tom Tromey <tromey@adacore.com>
133
134 * win32-low.cc (windows_nat::handle_access_violation): New
135 function.
136
e2275c6e
SM
1372020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
138
139 * win32-low.cc (get_child_debug_event): Fix format string warning.
140
73944e9f
TT
1412020-04-13 Tom Tromey <tom@tromey.com>
142
143 * server.h (gdb_fildes_t): Remove typedef.
144 * remote-utils.c (remote_desc, list_desc): Now int.
145 (INVALID_DESCRIPTOR): Remove.
146 (gdb_connected, remote_close)
147 (check_remote_input_interrupt_request): Update.
148 * utils.h (pfildes): Don't declare.
149 * utils.c (pfildes): Remove.
150
55d7aec8
TT
1512020-04-13 Tom Tromey <tom@tromey.com>
152
153 * server.h (handle_serial_event, handle_target_event): Update.
154 * server.c: Don't call initialize_event_loop.
155 (keep_processing_events): New global.
156 (handle_serial_event): Return void. Set keep_processing_events.
157 (handle_target_event): Return void.
158 (start_event_loop): Move from event-loop.c. Rewrite.
159 * remote-utils.c (handle_accept_event): Return void.
160 (reset_readchar): Use delete_timer.
161 (process_remaining): Return void.
162 (reschedule): Use create_timer.
163 * event-loop.h: Remove.
164 * event-loop.cc: Remove.
165 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
166
e487f994
TT
1672020-04-13 Tom Tromey <tom@tromey.com>
168
169 * server.c (invoke_async_signal_handlers)
170 (check_async_event_handlers, flush_streams, gdb_select): New
171 functions.
172
8ae8e197
TT
1732020-04-13 Tom Tromey <tom@tromey.com>
174
175 * configure: Rebuild.
176 * config.in: Rebuild.
177
360ad8b3
TT
1782020-04-08 Tom Tromey <tromey@adacore.com>
179
180 PR gdb/22992
181 * win32-low.c (child_continue): Call matching_pending_stop.
182 (get_child_debug_event): Call fetch_pending_stop. Push pending
183 stop when needed.
184
523d4f80
TT
1852020-04-08 Tom Tromey <tromey@adacore.com>
186
187 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
188 (win32_process_target::supports_stopped_by_sw_breakpoint):
189 Declare.
190 * win32-low.c (win32_supports_z_point_type): Always handle
191 Z_PACKET_SW_BP.
192 (win32_insert_point): Call insert_memory_breakpoint when needed.
193 (win32_remove_point): Call remove_memory_breakpoint when needed.
194 (win32_process_target::stopped_by_sw_breakpoint)
195 (win32_process_target::supports_stopped_by_sw_breakpoint): New
196 methods.
197 (win32_target_ops): Update.
198 (maybe_adjust_pc): New function.
199 (win32_wait): Call maybe_adjust_pc.
200
e54e5929
TT
2012020-04-08 Tom Tromey <tromey@adacore.com>
202
203 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
204 field.
205 * win32-i386-low.c (the_low_target): Update.
206 * win32-arm-low.c (the_low_target): Update.
207
d6225aff
TT
2082020-04-08 Tom Tromey <tromey@adacore.com>
209
210 * win32-low.h (win32_process_target::read_pc)
211 (win32_process_target::write_pc): Declare.
212 * win32-low.c (win32_process_target::read_pc)
213 (win32_process_target::write_pc): New methods.
214 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
215 functions.
216 (the_low_target): Update.
217 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
218 functions.
219 (the_low_target): Update.
220
2c1d95e8
TT
2212020-04-08 Tom Tromey <tromey@adacore.com>
222
223 * win32-low.c (win32_kill, get_child_debug_event): Use
224 wait_for_debug_event.
225
e758e19c
TT
2262020-04-08 Tom Tromey <tromey@adacore.com>
227
228 * win32-low.c (child_continue): Call continue_last_debug_event.
229
8d30e395
TT
2302020-04-08 Tom Tromey <tromey@adacore.com>
231
232 * win32-low.c (handle_exception): Remove.
233 (windows_nat::handle_ms_vc_exception): New function.
234 (get_child_debug_event): Add "continue_status" parameter.
235 Update.
236 (win32_wait): Update.
237
a816ba18
TT
2382020-04-08 Tom Tromey <tromey@adacore.com>
239
240 * win32-low.c (windows_nat::handle_load_dll): Rename from
241 handle_load_dll. No longer static.
242 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
243 No longer static.
244
d41b524f
TT
2452020-04-08 Tom Tromey <tromey@adacore.com>
246
247 * win32-low.c (handle_output_debug_string): Add parameter. Change
248 return type.
249 (win32_kill, get_child_debug_event): Update.
250
3c76026d
TT
2512020-04-08 Tom Tromey <tromey@adacore.com>
252
253 * win32-low.c (current_process_handle, current_process_id)
254 (main_thread_id, last_sig, current_event, siginfo_er): Move to
255 nat/windows-nat.c.
256
9d8679cc
TT
2572020-04-08 Tom Tromey <tromey@adacore.com>
258
259 * win32-low.c (get_image_name): Remove.
260 (handle_load_dll): Update.
261
28688adf
TT
2622020-04-08 Tom Tromey <tromey@adacore.com>
263
264 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
265 No longer static. Change parameters.
266 (child_add_thread, child_fetch_inferior_registers)
267 (child_store_inferior_registers, win32_resume)
268 (win32_get_tib_address): Update.
269
4834dad0
TT
2702020-04-08 Tom Tromey <tromey@adacore.com>
271
272 * win32-low.h (struct win32_target_ops): Use qualified names where
273 needed.
274 * win32-i386-low.c: Add "using namespace".
275 * win32-low.c: Add "using namespace".
276 * win32-arm-low.c: Add "using namespace".
277
65bafd5b
TT
2782020-04-08 Tom Tromey <tromey@adacore.com>
279
280 * win32-low.c (delete_thread_info): Don't call CloseHandle.
281
98a03287
TT
2822020-04-08 Tom Tromey <tromey@adacore.com>
283
284 * win32-low.c (win32_require_context, suspend_one_thread): Use
285 windows_thread_info::suspend.
286 (continue_one_thread): Use windows_thread_info::resume.
287 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
288
62fe396b
TT
2892020-04-08 Tom Tromey <tromey@adacore.com>
290
291 * win32-i386-low.c (update_debug_registers)
292 (i386_prepare_to_resume, i386_thread_added): Update.
293
e9534bd2
TT
2942020-04-08 Tom Tromey <tromey@adacore.com>
295
296 * win32-low.c (child_add_thread): Use new.
297 (delete_thread_info): Use delete.
298
ae1f8880
TT
2992020-04-08 Tom Tromey <tromey@adacore.com>
300
301 * win32-low.h (struct windows_thread_info): Remove.
302
e56f8ccb
TT
3032020-04-08 Tom Tromey <tromey@adacore.com>
304
305 * win32-low.h (struct windows_thread_info): Rename from
306 win32_thread_info. Remove typedef.
307 (struct win32_target_ops, win32_require_context): Update.
308 * win32-low.c (win32_get_thread_context)
309 (win32_set_thread_context, win32_prepare_to_resume)
310 (win32_require_context, thread_rec, child_add_thread)
311 (delete_thread_info, continue_one_thread)
312 (child_fetch_inferior_registers, child_store_inferior_registers)
313 (win32_resume, suspend_one_thread, win32_get_tib_address):
314 Update.
315 * win32-i386-low.c (update_debug_registers)
316 (win32_get_current_dr, i386_get_thread_context)
317 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
318 (i386_fetch_inferior_register, i386_store_inferior_register):
319 Update.
320 * win32-arm-low.c (arm_get_thread_context)
321 (arm_fetch_inferior_register, arm_store_inferior_register):
322 Update.
323
0dd7b52e
TBA
3242020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
325
326 * linux-low.h (struct linux_target_ops): Remove.
327 (the_low_target): Remove.
328 * linux-x86-low.cc (the_low_target): Remove.
329 * linux-aarch64-low.cc (the_low_target): Ditto.
330 * linux-arm-low.cc (the_low_target): Ditto.
331 * linux-bfin-low.cc (the_low_target): Ditto.
332 * linux-cris-low.cc (the_low_target): Ditto.
333 * linux-crisv32-low.cc (the_low_target): Ditto.
334 * linux-ia64-low.cc (the_low_target): Ditto.
335 * linux-m32r-low.cc (the_low_target): Ditto.
336 * linux-m68k-low.cc (the_low_target): Ditto.
337 * linux-mips-low.cc (the_low_target): Ditto.
338 * linux-nios2-low.cc (the_low_target): Ditto.
339 * linux-ppc-low.cc (the_low_target): Ditto.
340 * linux-riscv-low.cc (the_low_target): Ditto.
341 * linux-s390-low.cc (the_low_target): Ditto.
342 * linux-sh-low.cc (the_low_target): Ditto.
343 * linux-sparc-low.cc (the_low_target): Ditto.
344 * linux-tic6x-low.cc (the_low_target): Ditto.
345 * linux-tile-low.cc (the_low_target): Ditto.
346 * linux-xtensa-low.cc (the_low_target): Ditto.
347
fc5ecdb6
TBA
3482020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
349
350 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
351 linux target define the op by overriding the declaration in
352 process_stratum_target.
353
354 * linux-low.h (struct linux_target_ops): Remove the op.
355 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
356 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
357 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
358 (x86_get_ipa_tdesc_idx): Turn into...
359 (x86_target::get_ipa_tdesc_idx): ...this.
360 (the_low_target): Remove the op field.
361 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
362 (ppc_get_ipa_tdesc_idx): Turn into...
363 (ppc_target::get_ipa_tdesc_idx): ...this.
364 (the_low_target): Remove the op field.
365 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
366 (s390_get_ipa_tdesc_idx): Turn into...
367 (s390_target::get_ipa_tdesc_idx): ...this.
368 (the_low_target): Remove the op field.
369
9eedd27d
TBA
3702020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
371
372 Turn the 'get_syscall_trapinfo' linux target op into a method
373 of process_stratum_target.
374
375 * linux-low.h (struct linux_target_ops): Remove the op.
376 (class linux_process_target) <get_syscall_trapinfo>
377 <gdb_catch_this_syscall>
378 <low_supports_catch_syscall>
379 <low_get_syscall_trapinfo>: Declare.
380 * linux-low.cc (get_syscall_trapinfo): Turn into...
381 (linux_process_target::get_syscall_trapinfo): ...this.
382 (linux_process_target::low_get_syscall_trapinfo): Define.
383 (gdb_catch_this_syscall_p): Turn into...
384 (linux_process_target::gdb_catch_this_syscall): ...this.
385 (linux_process_target::low_supports_catch_syscall): Define.
386
387 Update the callers below.
388
389 (linux_process_target::wait_1)
390 (linux_process_target::supports_catch_syscall)
391
392 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
393 <low_get_syscall_trapinfo>: Declare.
394 (x86_target::low_supports_catch_syscall): Define.
395 (x86_get_syscall_trapinfo): Turn into...
396 (x86_target::low_get_syscall_trapinfo): ...this.
397 (the_low_target): Remove the op field.
398 * linux-aarch64-low.cc (class aarch64_target)
399 <low_supports_catch_syscall>
400 <low_get_syscall_trapinfo>: Declare.
401 (aarch64_target::low_supports_catch_syscall): Define.
402 (aarch64_get_syscall_trapinfo): Turn into...
403 (aarch64_target::low_get_syscall_trapinfo): ...this.
404 (the_low_target): Remove the op field.
405 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
406 <low_get_syscall_trapinfo>: Declare.
407 (arm_target::low_supports_catch_syscall): Define.
408 (arm_get_syscall_trapinfo): Turn into...
409 (arm_target::low_get_syscall_trapinfo): ...this.
410 (the_low_target): Remove the op field.
411 * linux-ppc-low.cc (the_low_target): Remove the op field.
412 * linux-s390-low.cc (the_low_target): Remove the op field.
413
b31cdfa6
TBA
4142020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
415
416 Remove the 'supports_hardware_single_step' linux target op and
417 override the process_stratum_target's op definition in
418 linux_process_target to return true.
419
420 * linux-low.h (struct linux_target_ops): Remove the op.
421 (class linux_process_target) <finish_step_over>
422 <maybe_hw_step>: Declare.
423 * linux-low.cc (can_hardware_single_step): Remove.
424 (maybe_hw_step): Turn into...
425 (linux_process_target::maybe_hw_step): ...this.
426 (finish_step_over): Turn into...
427 (linux_process_target::finish_step_over): ...this.
428 (linux_process_target::supports_hardware_single_step): Update
429 to return true.
430
431 Update the callers below.
432
433 (linux_process_target::single_step)
434 (linux_process_target::resume_one_lwp_throw)
435
436 * linux-arm-low.cc (class arm_target)
437 <supports_hardware_single_step>: Declare.
438 (arm_supports_hardware_single_step): Turn into...
439 (arm_target::supports_hardware_single_step): ...this.
440 (the_low_target): Remove the op field.
441 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
442 (the_low_target): Remove the op field.
443 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
444 Remove.
445 (the_low_target): Remove the op field.
446 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
447 (the_low_target): Remove the op field.
448 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
449 (the_low_target): Remove the op field.
450 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
451 (the_low_target): Remove the op field.
452 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
453 (the_low_target): Remove the op field.
454 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
455 (the_low_target): Remove the op field.
456 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
457 (the_low_target): Remove the op field.
458 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
459 (the_low_target): Remove the op field.
460 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
461 (the_low_target): Remove the op field.
462 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
463 (the_low_target): Remove the op field.
464 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
465 Remove.
466 (the_low_target): Remove the op field.
467
9cfd8715
TBA
4682020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
469
470 Turn the 'supports_range_stepping' linux target op into a method
471 of linux_process_target.
472
473 * linux-low.h (struct linux_target_ops): Remove the op.
474 (class linux_process_target) <low_supports_range_stepping>: Declare.
475 * linux-low.cc (linux_process_target::low_supports_range_stepping):
476 Define.
477 (linux_process_target::supports_range_stepping): Update the call
478 site.
479 * linux-x86-low.cc (class x86_target)
480 <low_supports_range_stepping>: Declare.
481 (x86_supports_range_stepping): Turn into...
482 (x86_target::low_supports_range_stepping): ...this.
483 (the_low_target): Remove the op field.
484 * linux-aarch64-low.cc (class aarch64_target)
485 <low_supports_range_stepping>: Declare.
486 (aarch64_supports_range_stepping): Turn into...
487 (aarch64_target::low_supports_range_stepping): ...this.
488 (the_low_target): Remove the op field.
489 * linux-arm-low.cc (the_low_target): Remove the op field.
490 * linux-bfin-low.cc (the_low_target): Ditto.
491 * linux-crisv32-low.cc (the_low_target): Ditto.
492 * linux-m32r-low.cc (the_low_target): Ditto.
493 * linux-m68k-low.cc (the_low_target): Ditto.
494 * linux-ppc-low.cc (the_low_target): Ditto.
495 * linux-s390-low.cc (the_low_target): Ditto.
496 * linux-sh-low.cc (the_low_target): Ditto.
497 * linux-tic6x-low.cc (the_low_target): Ditto.
498 * linux-tile-low.cc (the_low_target): Ditto.
499 * linux-xtensa-low.cc (the_low_target): Ditto.
500
ab64c999
TBA
5012020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
502
503 Remove the 'emit_ops' linux target ops and let the concrete
504 linux target define the op by overriding the declaration of
505 process_stratum_target.
506
507 * linux-low.h (struct linux_target_ops): Remove the op.
508 (class linux_process_target) <emit_ops>: Remove.
509 * linux-low.cc (linux_process_target::emit_ops): Remove.
510 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
511 (x86_emit_ops): Turn into...
512 (x86_target::emit_ops): ...this.
513 (the_low_target): Remove the op field.
514 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
515 (aarch64_emit_ops): Turn into...
516 (aarch64_target::emit_ops): ...this.
517 (the_low_target): Remove the op field.
518 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
519 (ppc_emit_ops): Turn into...
520 (ppc_target::emit_ops): ...this.
521 (the_low_target): Remove the op field.
522 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
523 (s390_emit_ops): Turn into...
524 (s390_target::emit_ops): ...this.
525 (the_low_target): Remove the op field.
526 * linux-arm-low.cc (the_low_target): Remove the op field.
527 * linux-bfin-low.cc (the_low_target): Ditto.
528 * linux-crisv32-low.cc (the_low_target): Ditto.
529 * linux-m32r-low.cc (the_low_target): Ditto.
530 * linux-m68k-low.cc (the_low_target): Ditto.
531 * linux-sh-low.cc (the_low_target): Ditto.
532 * linux-tic6x-low.cc (the_low_target): Ditto.
533 * linux-tile-low.cc (the_low_target): Ditto.
534 * linux-xtensa-low.cc (the_low_target): Ditto.
535
809a0c35
TBA
5362020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
537
538 Remove the 'install_fast_tracepoint_jump_pad' and
539 'get_min_fast_tracepoint_insn_len' linux target ops to let the
540 concrete linux target define the ops by overriding the declarations
541 of process_stratum_target.
542
543 * linux-low.h (struct linux_target_ops): Remove the ops.
544 (class linux_process_target) <supports_fast_tracepoints>
545 <install_fast_tracepoint_jump_pad>
546 <get_min_fast_tracepoint_insn_len>: Remove.
547 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
548 (linux_process_target::install_fast_tracepoint_jump_pad)
549 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
550 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
551 <install_fast_tracepoint_jump_pad>
552 <get_min_fast_tracepoint_insn_len>: Declare.
553 (x86_target::supports_fast_tracepoints): Define.
554 (x86_install_fast_tracepoint_jump_pad): Turn into...
555 (x86_target::install_fast_tracepoint_jump_pad): ...this.
556 (x86_get_min_fast_tracepoint_insn_len): Turn into...
557 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
558 (the_low_target): Remove the op fields.
559 * linux-aarch64-low.cc (class aarch64_target)
560 <supports_fast_tracepoints>
561 <install_fast_tracepoint_jump_pad>
562 <get_min_fast_tracepoint_insn_len>: Declare.
563 (aarch64_target::supports_fast_tracepoints): Define.
564 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
565 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
566 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
567 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
568 (the_low_target): Remove the op fields.
569 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
570 <install_fast_tracepoint_jump_pad>
571 <get_min_fast_tracepoint_insn_len>: Declare.
572 (ppc_target::supports_fast_tracepoints): Define.
573 (ppc_install_fast_tracepoint_jump_pad): Turn into...
574 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
575 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
576 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
577 (the_low_target): Remove the op fields.
578 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
579 <install_fast_tracepoint_jump_pad>
580 <get_min_fast_tracepoint_insn_len>: Declare.
581 (s390_target::supports_fast_tracepoints): Define.
582 (s390_install_fast_tracepoint_jump_pad): Turn into...
583 (s390_target::install_fast_tracepoint_jump_pad): ...this.
584 (s390_get_min_fast_tracepoint_insn_len): Turn into...
585 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
586 (the_low_target): Remove the op fields.
587 * linux-arm-low.cc (the_low_target): Remove the op fields.
588 * linux-bfin-low.cc (the_low_target): Ditto.
589 * linux-crisv32-low.cc (the_low_target): Ditto.
590 * linux-m32r-low.cc (the_low_target): Ditto.
591 * linux-m68k-low.cc (the_low_target): Ditto.
592 * linux-sh-low.cc (the_low_target): Ditto.
593 * linux-tic6x-low.cc (the_low_target): Ditto.
594 * linux-tile-low.cc (the_low_target): Ditto.
595 * linux-xtensa-low.cc (the_low_target): Ditto.
596
13e567af
TBA
5972020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
598
599 Turn the 'get_thread_area' linux target op into a method of
600 process_stratum_target.
601
602 * linux-low.h (struct linux_target_ops): Remove the op.
603 (class linux_process_target) <stuck_in_jump_pad>
604 <linux_fast_tracepoint_collecting>
605 <low_get_thread_area>: Declare.
606 * linux-low.cc (supports_fast_tracepoints): Remove.
607 (linux_fast_tracepoint_collecting): Turn into...
608 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
609 (linux_process_target::low_get_thread_area): Define.
610 (stuck_in_jump_pad_callback): Turn into...
611 (linux_process_target::stuck_in_jump_pad): ...this.
612
613 Update the caller below.
614
615 (linux_process_target::stabilize_threads)
616
617 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
618 Declare.
619 (x86_get_thread_area): Turn into...
620 (x86_target::low_get_thread_area): ...this.
621 (the_low_target): Remove the op field.
622 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
623 Declare.
624 (aarch64_get_thread_area): Turn into...
625 (aarch64_target::low_get_thread_area): ...this.
626 (the_low_target): Remove the op field.
627 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
628 Declare.
629 (ppc_get_thread_area): Turn into...
630 (ppc_target::low_get_thread_area): ...this.
631 (the_low_target): Remove the op field.
632 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
633 Declare.
634 (s390_get_thread_area): Turn into...
635 (s390_target::low_get_thread_area): ...this.
636 (the_low_target): Remove the op field.
637 * linux-arm-low.cc (the_low_target): Remove the op field.
638 * linux-bfin-low.cc (the_low_target): Ditto.
639 * linux-crisv32-low.cc (the_low_target): Ditto.
640 * linux-m32r-low.cc (the_low_target): Ditto.
641 * linux-m68k-low.cc (the_low_target): Ditto.
642 * linux-sh-low.cc (the_low_target): Ditto.
643 * linux-tic6x-low.cc (the_low_target): Ditto.
644 * linux-tile-low.cc (the_low_target): Ditto.
645 * linux-xtensa-low.cc (the_low_target): Ditto.
646
47f70aa7
TBA
6472020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
648
649 Remote the 'supports_tracepoints' linux target op and let the
650 concrete linux target define it by overriding the op declared in
651 process_stratum_target.
652
653 * linux-low.h (struct linux_target_ops): Remove the op.
654 (class linux_process_target) <supports_tracepoints>: Remove.
655 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
656 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
657 Declare.
658 (x86_supports_tracepoints): Turn into...
659 (x86_target::supports_tracepoints): ...this.
660 (the_low_target): Remove the op field.
661 * linux-aarch64-low.cc (class aarch64_target)
662 <supports_tracepoints>: Declare.
663 (aarch64_supports_tracepoints): Turn into...
664 (aarch64_target::supports_tracepoints): ...this.
665 (the_low_target): Remove the op field.
666 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
667 Declare.
668 (ppc_supports_tracepoints): Turn into...
669 (ppc_target::supports_tracepoints): ...this.
670 (the_low_target): Remove the op field.
671 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
672 Declare.
673 (s390_supports_tracepoints): Turn into...
674 (s390_target::supports_tracepoints): ...this.
675 (the_low_target): Remove the op field.
676 * linux-arm-low.cc (the_low_target): Remove the op field.
677 * linux-bfin-low.cc (the_low_target): Ditto.
678 * linux-crisv32-low.cc (the_low_target): Ditto.
679 * linux-m32r-low.cc (the_low_target): Ditto.
680 * linux-m68k-low.cc (the_low_target): Ditto.
681 * linux-sh-low.cc (the_low_target): Ditto.
682 * linux-tic6x-low.cc (the_low_target): Ditto.
683 * linux-tile-low.cc (the_low_target): Ditto.
684 * linux-xtensa-low.cc (the_low_target): Ditto.
685
a5b5da92
TBA
6862020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
687
688 Remove the 'process_qsupported' linux target op and let a concrete
689 linux target define the op by overriding the op declaration in
690 process_stratum_target.
691
692 * linux-low.h (struct linux_target_ops): Remove the op.
693 (class linux_process_target) <process_qsupported>: Remove.
694 * linux-low.cc (linux_process_target::process_qsupported): Remove.
695 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
696 (x86_linux_process_qsupported): Turn into...
697 (x86_target::process_qsupported): ...this.
698 (the_low_target): Remove the op field.
699 * linux-aarch64-low.cc (the_low_target): Remove the op
700 field.
701 * linux-arm-low.cc (the_low_target): Ditto.
702 * linux-bfin-low.cc (the_low_target): Ditto.
703 * linux-crisv32-low.cc (the_low_target): Ditto.
704 * linux-m32r-low.cc (the_low_target): Ditto.
705 * linux-m68k-low.cc (the_low_target): Ditto.
706 * linux-ppc-low.cc (the_low_target): Ditto.
707 * linux-s390-low.cc (the_low_target): Ditto.
708 * linux-sh-low.cc (the_low_target): Ditto.
709 * linux-tic6x-low.cc (the_low_target): Ditto.
710 * linux-tile-low.cc (the_low_target): Ditto.
711 * linux-xtensa-low.cc (the_low_target): Ditto.
712
d7599cc0
TBA
7132020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
714
715 Turn the 'prepare_to_resume' linux target op into a method of
716 linux_process_target.
717
718 * linux-low.h (struct linux_target_ops): Remove the op.
719 (class linux_process_target) <low_prepare_to_resume>: Declare.
720 * linux-low.cc (linux_process_target::low_prepare_to_resume):
721 Define.
722
723 Update the callers below:
724
725 (linux_process_target::resume_one_lwp_throw)
726 (linux_process_target::low_prepare_to_resume)
727
728 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
729 Declare.
730 (x86_target::low_prepare_to_resume): Define.
731 (the_low_target): Remove the op field.
732 * linux-aarch64-low.cc (class aarch64_target)
733 <low_prepare_to_resume>: Declare.
734 (aarch64_target::low_prepare_to_resume): Define.
735 (the_low_target): Remove the op field.
736 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
737 Declare.
738 (arm_prepare_to_resume): Turn into...
739 (arm_target::low_prepare_to_resume): ...this.
740 (the_low_target): Remove the op field.
741 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
742 Declare.
743 (mips_linux_prepare_to_resume): Turn into...
744 (mips_target::low_prepare_to_resume): ...this.
745 (the_low_target): Remove the op field.
746 * linux-bfin-low.cc (the_low_target): Remove the op field.
747 * linux-crisv32-low.cc (the_low_target): Ditto.
748 * linux-m32r-low.cc (the_low_target): Ditto.
749 * linux-m68k-low.cc (the_low_target): Ditto.
750 * linux-ppc-low.cc (the_low_target): Ditto.
751 * linux-s390-low.cc (the_low_target): Ditto.
752 * linux-sh-low.cc (the_low_target): Ditto.
753 * linux-tic6x-low.cc (the_low_target): Ditto.
754 * linux-tile-low.cc (the_low_target): Ditto.
755 * linux-xtensa-low.cc (the_low_target): Ditto.
756
fd000fb3
TBA
7572020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
758
759 Turn the 'new_process', 'delete_process', 'new_thread',
760 'delete_thread', and 'new_fork' linux target ops into methods
761 of linux_process_target.
762
763 * linux-low.h (struct linux_target_ops): Remove the ops.
764 (class linux_process_target) <add_linux_process>
765 <add_lwp>
766 <delete_lwp>
767 <attach_lwp>
768 <detach_one_lwp>
769 <check_zombie_leaders>
770 <filter_exit_event>
771 <low_new_process>
772 <low_delete_process>
773 <low_new_thread>
774 <low_delete_thread>
775 <low_new_fork>: Declare.
776 * linux-low.cc (delete_lwp): Turn into...
777 (linux_process_target::delete_lwp): ...this.
778 (linux_process_target::low_delete_thread): Define.
779 (linux_add_process): Turn into...
780 (linux_process_target::add_linux_process): ...this.
781 (linux_process_target::low_new_process): Define.
782 (linux_process_target::low_delete_process): Define.
783 (linux_process_target::low_new_fork): Define.
784 (add_lwp): Turn into...
785 (linux_process_target::add_lwp): ...this.
786 (linux_process_target::low_new_thread): Define.
787 (linux_attach_lwp): Turn into...
788 (linux_process_target::attach_lwp): ...this.
789 (linux_detach_one_lwp): Turn into...
790 (linux_process_target::detach_one_lwp): ...this.
791 (linux_detach_lwp_callback): Remove and inline...
792 (linux_process_target::detach): ...here.
793 (check_zombie_leaders): Turn into...
794 (linux_process_target::check_zombie_leaders): ...this.
795 (filter_exit_event): Turn into...
796 (linux_process_target::filter_exit_event): ...this.
797
798 Update the callers below.
799
800 (linux_process_target::handle_extended_wait)
801 (linux_process_target::create_inferior)
802 (attach_proc_task_lwp_callback)
803 (linux_process_target::attach)
804 (linux_process_target::detach)
805 (linux_process_target::mourn)
806 * thread-db.cc (attach_thread)
807
808 * linux-x86-low.cc (class x86_target) <low_new_process>
809 <low_delete_process>
810 <low_new_thread>
811 <low_delete_thread>
812 <low_new_fork>: Declare.
813 (x86_linux_new_process): Turn into...
814 (x86_target::low_new_process): ...this.
815 (x86_linux_delete_process): Turn into...
816 (x86_target::low_delete_process): ...this.
817 (x86_target::low_new_thread): Define.
818 (x86_target::low_delete_thread): Define.
819 (x86_linux_new_fork): Turn into...
820 (x86_target::low_new_fork): ...this.
821 (the_low_target): Remove the op fields.
822 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
823 <low_delete_process>
824 <low_new_thread>
825 <low_delete_thread>
826 <low_new_fork>: Declare.
827 (aarch64_linux_new_process): Turn into...
828 (aarch64_target::low_new_process): ...this.
829 (aarch64_linux_delete_process): Turn into...
830 (aarch64_target::low_delete_process): ...this.
831 (aarch64_target::low_new_thread): Define.
832 (aarch64_target::low_delete_thread): Define.
833 (aarch64_linux_new_fork): Turn into...
834 (aarch64_target::low_new_fork): ...this.
835 (the_low_target): Remove the op fields.
836 * linux-arm-low.cc (class arm_target) <low_new_process>
837 <low_delete_process>
838 <low_new_thread>
839 <low_delete_thread>
840 <low_new_fork>: Declare.
841 (arm_new_process): Turn into...
842 (arm_target::low_new_process): ...this.
843 (arm_delete_process): Turn into...
844 (arm_target::low_delete_process): ...this.
845 (arm_new_thread): Turn into...
846 (arm_target::low_new_thread): ...this.
847 (arm_delete_thread): Turn into...
848 (arm_target::low_delete_thread): ...this.
849 (arm_new_fork): Turn into...
850 (arm_target::low_new_fork): ...this.
851 (the_low_target): Remove the op fields.
852 * linux-mips-low.cc (class mips_target) <low_new_process>
853 <low_delete_process>
854 <low_new_thread>
855 <low_delete_thread>
856 <low_new_fork>: Declare.
857 (mips_linux_new_process): Turn into...
858 (mips_target::low_new_process): ...this.
859 (mips_linux_delete_process): Turn into...
860 (mips_target::low_delete_process): ...this.
861 (mips_linux_new_thread): Turn into...
862 (mips_target::low_new_thread): ...this.
863 (mips_linux_delete_thread): Turn into...
864 (mips_target::low_delete_thread): ...this.
865 (mips_linux_new_fork): Turn into...
866 (mips_target::low_new_fork): ...this.
867 (the_low_target): Remove the op fields.
868 * linux-bfin-low.cc (the_low_target): Remove the op fields.
869 * linux-crisv32-low.cc (the_low_target): Ditto.
870 * linux-m32r-low.cc (the_low_target): Ditto.
871 * linux-m68k-low.cc (the_low_target): Ditto.
872 * linux-ppc-low.cc (the_low_target): Ditto.
873 * linux-s390-low.cc (the_low_target): Ditto.
874 * linux-sh-low.cc (the_low_target): Ditto.
875 * linux-tic6x-low.cc (the_low_target): Ditto.
876 * linux-tile-low.cc (the_low_target): Ditto.
877 * linux-xtensa-low.cc (the_low_target): Ditto.
878
cb63de7c
TBA
8792020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
880
881 Turn the 'siginfo_fixup' linux target op into a method of
882 linux_process_target.
883
884 * linux-low.h (struct linux_target_ops): Remove the op.
885 (class linux_process_target) <siginfo_fixup>
886 <low_siginfo_fixup>: Declare.
887 * linux-low.cc (siginfo_fixup): Turn into...
888 (linux_process_target::siginfo_fixup): ...this.
889 (linux_process_target::low_siginfo_fixup): Define.
890 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
891 (x86_siginfo_fixup): Turn into...
892 (x86_target::low_siginfo_fixup): ...this.
893 (the_low_target): Remove the op field.
894 * linux-aarch64-low.cc (class aarch64_target):
895 <low_siginfo_fixup>: Declare.
896 (aarch64_linux_siginfo_fixup): Turn into...
897 (aarch64_target::low_siginfo_fixup): ...this.
898 (the_low_target): Remove the op field.
899 * linux-arm-low.cc (the_low_target): Remove the op field.
900 * linux-bfin-low.cc (the_low_target): Ditto.
901 * linux-crisv32-low.cc (the_low_target): Ditto.
902 * linux-m32r-low.cc (the_low_target): Ditto.
903 * linux-m68k-low.cc (the_low_target): Ditto.
904 * linux-mips-low.cc (the_low_target): Ditto.
905 * linux-ppc-low.cc (the_low_target): Ditto.
906 * linux-s390-low.cc (the_low_target): Ditto.
907 * linux-sh-low.cc (the_low_target): Ditto.
908 * linux-tic6x-low.cc (the_low_target): Ditto.
909 * linux-tile-low.cc (the_low_target): Ditto.
910 * linux-xtensa-low.cc (the_low_target): Ditto.
911
b35db733
TBA
9122020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
913
914 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
915 linux target ops into methods of linux_process_target.
916
917 * linux-low.h (struct linux_target_ops): Remove the ops.
918 (class linux_process_target) <low_collect_ptrace_register>
919 <low_store_ptrace_register>: Declare.
920 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
921 (linux_process_target::low_supply_ptrace_register): Define.
922
923 Update the callers below.
924
925 (linux_process_target::fetch_register)
926 (linux_process_target::store_register)
927
928 * linux-x86-low.cc (the_low_target): Remove the op fields.
929 * linux-aarch64-low.cc (the_low_target): Ditto.
930 * linux-arm-low.cc (the_low_target): Ditto.
931 * linux-bfin-low.cc (the_low_target): Ditto.
932 * linux-crisv32-low.cc (the_low_target): Ditto.
933 * linux-m32r-low.cc (the_low_target): Ditto.
934 * linux-m68k-low.cc (the_low_target): Ditto.
935 * linux-sh-low.cc (the_low_target): Ditto.
936 * linux-sparc-low.cc (the_low_target): Ditto.
937 * linux-tic6x-low.cc (the_low_target): Ditto.
938 * linux-tile-low.cc (the_low_target): Ditto.
939 * linux-xtensa-low.cc (the_low_target): Ditto.
940 * linux-mips-low.cc (class mips_target)
941 <low_collect_ptrace_register>
942 <low_supply_ptrace_register>: Declare.
943 (mips_collect_ptrace_register): Turn into ...
944 (mips_target::low_collect_ptrace_register): ...this.
945 (mips_supply_ptrace_register): Turn into...
946 (mips_target::low_supply_ptrace_register): ...this.
947 (the_low_target): Remove the op fields.
948 * linux-ppc-low.cc (class ppc_target)
949 <low_collect_ptrace_register>
950 <low_supply_ptrace_register>: Declare.
951 (ppc_collect_ptrace_register): Turn into ...
952 (ppc_target::low_collect_ptrace_register): ...this.
953 (ppc_supply_ptrace_register): Turn into ...
954 (ppc_target::low_supply_ptrace_register): ...this.
955 (ppc_fill_gregset): Update for the calls to
956 low_collect_ptrace_register.
957 (the_low_target): Remove the op fields.
958 * linux-s390-low.cc (class s390_target)
959 <low_collect_ptrace_register>
960 <low_supply_ptrace_register>: Declare.
961 (s390_collect_ptrace_register): Turn into ...
962 (s390_target::low_collect_ptrace_register): ...this.
963 (s390_supply_ptrace_register): Turn into ...
964 (s390_target::low_supply_ptrace_register): ...this.
965 (s390_fill_gregset): Update for the calls to
966 low_collect_ptrace_register.
967 (the_low_target): Remove the op fields.
968
ac1bbaca
TBA
9692020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
970
971 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
972 target ops into methods of linux_process_target.
973
974 * linux-low.h (struct linux_target_ops): Remove the ops.
975 (class linux_process_target) <check_stopped_by_watchpoint>
976 <low_stopped_by_watchpoint>
977 <low_stopped_data_address>: Declare.
978 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
979 (linux_process_target::check_stopped_by_watchpoint): ...this.
980 (linux_process_target::low_stopped_by_watchpoint): Define.
981 (linux_process_target::low_stopped_data_address): Define.
982 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
983 <low_stopped_data_address>: Declare.
984 (x86_stopped_by_watchpoint): Turn into...
985 (x86_target::low_stopped_by_watchpoint): ...this.
986 (x86_stopped_data_address): Turn into...
987 (x86_target::low_stopped_data_address): ...this.
988 (the_low_target): Remove the op fields.
989 * linux-aarch64-low.cc (class aarch64_target)
990 <low_stopped_by_watchpoint>
991 <low_stopped_data_address>: Declare.
992 (aarch64_stopped_by_watchpoint): Turn into...
993 (aarch64_target::low_stopped_by_watchpoint): ...this.
994 (aarch64_stopped_data_address): Turn into...
995 (aarch64_target::low_stopped_data_address): ...this.
996 (the_low_target): Remove the op fields.
997 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
998 <low_stopped_data_address>: Declare.
999 (arm_stopped_by_watchpoint): Turn into...
1000 (arm_target::low_stopped_by_watchpoint): ...this.
1001 (arm_stopped_data_address): Turn into...
1002 (arm_target::low_stopped_data_address): ...this.
1003 (the_low_target): Remove the op fields.
1004 * linux-crisv32-low.cc (class crisv32_target)
1005 <low_stopped_by_watchpoint>
1006 <low_stopped_data_address>: Declare.
1007 (cris_stopped_by_watchpoint): Turn into...
1008 (crisv32_target::low_stopped_by_watchpoint): ...this.
1009 (cris_stopped_data_address): Turn into...
1010 (crisv32_target::low_stopped_data_address): ...this.
1011 (the_low_target): Remove the op fields.
1012 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1013 <low_stopped_data_address>: Declare.
1014 (mips_stopped_by_watchpoint): Turn into...
1015 (mips_target::low_stopped_by_watchpoint): ...this.
1016 (mips_stopped_data_address): Turn into...
1017 (mips_target::low_stopped_data_address): ...this.
1018 (the_low_target): Remove the op fields.
1019 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1020 * linux-m32r-low.cc (the_low_target): Ditto.
1021 * linux-m68k-low.cc (the_low_target): Ditto.
1022 * linux-ppc-low.cc (the_low_target): Ditto.
1023 * linux-s390-low.cc (the_low_target): Ditto.
1024 * linux-sh-low.cc (the_low_target): Ditto.
1025 * linux-sparc-low.cc (the_low_target): Ditto.
1026 * linux-tic6x-low.cc (the_low_target): Ditto.
1027 * linux-tile-low.cc (the_low_target): Ditto.
1028 * linux-xtensa-low.cc (the_low_target): Ditto.
1029
9db9aa23
TBA
10302020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1031
1032 Turn the 'insert_point' and 'remove_point' linux target ops into
1033 methods of linux_process_target.
1034
1035 * linux-low.h (struct linux_target_ops): Remove the ops.
1036 (class linux_process_target) <low_insert_point>
1037 <low_remove_point>: Declare.
1038 * linux-low.cc (linux_process_target::low_insert_point)
1039 (linux_process_target::low_remove_point): Define.
1040 (linux_process_target::insert_point)
1041 (linux_process_target::remove_point): Update for calls to
1042 low_insert_point and low_remove_point.
1043 * linux-x86-low.cc (class x86_target) <low_insert_point>
1044 <low_remove_point>: Declare.
1045 (x86_insert_point): Turn into...
1046 (x86_target::low_insert_point): ...this.
1047 (x86_remove_point): Turn into...
1048 (x86_target::low_remove_point): ...this.
1049 (the_low_target): Remove the op fields.
1050 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1051 <low_remove_point>: Declare.
1052 (aarch64_insert_point): Turn into...
1053 (aarch64_target::low_insert_point): ...this.
1054 (aarch64_remove_point): Turn into...
1055 (aarch64_target::low_remove_point): ...this.
1056 (the_low_target): Remove the op fields.
1057 * linux-arm-low.cc (class arm_target) <low_insert_point>
1058 <low_remove_point>: Declare.
1059 (arm_insert_point): Turn into...
1060 (arm_target::low_insert_point): ...this.
1061 (arm_remove_point): Turn into...
1062 (arm_target::low_remove_point): ...this.
1063 (the_low_target): Remove the op fields.
1064 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1065 <low_remove_point>: Declare.
1066 (crisv32_insert_point): Turn into...
1067 (crisv32_target::low_insert_point): ...this.
1068 (crisv32_remove_point): Turn into...
1069 (crisv32_target::low_remove_point): ...this.
1070 (the_low_target): Remove the op fields.
1071 * linux-mips-low.cc (class mips_target) <low_insert_point>
1072 <low_remove_point>: Declare.
1073 (mips_insert_point): Turn into...
1074 (mips_target::low_insert_point): ...this.
1075 (mips_remove_point): Turn into...
1076 (mips_target::low_remove_point): ...this.
1077 (the_low_target): Remove the op fields.
1078 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1079 <low_remove_point>: Declare.
1080 (ppc_insert_point): Turn into...
1081 (ppc_target::low_insert_point): ...this.
1082 (ppc_remove_point): Turn into...
1083 (ppc_target::low_remove_point): ...this.
1084 (the_low_target): Remove the op fields.
1085 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1086 * linux-m32r-low.cc (the_low_target): Ditto.
1087 * linux-m68k-low.cc (the_low_target): Ditto.
1088 * linux-s390-low.cc (the_low_target): Ditto.
1089 * linux-sh-low.cc (the_low_target): Ditto.
1090 * linux-sparc-low.cc (the_low_target): Ditto.
1091 * linux-tic6x-low.cc (the_low_target): Ditto.
1092 * linux-tile-low.cc (the_low_target): Ditto.
1093 * linux-xtensa-low.cc (the_low_target): Ditto.
1094
007c9b97
TBA
10952020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1096
1097 Remove the 'supports_z_point_type' linux target op and let the
1098 concrete linux target define it by overriding the op declared in
1099 process_stratum_target.
1100
1101 * linux-low.cc (linux_process_target::supports_z_point_type):
1102 Remove.
1103 * linux-low.h (struct linux_target_ops): Remove the op.
1104 (class linux_process_target) <supports_z_point_type>: Remove.
1105 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1106 Declare.
1107 (x86_supports_z_point_type): Turn into...
1108 (x86_target::supports_z_point_type): ...this.
1109 (the_low_target): Remove the op field.
1110 * linux-aarch64-low.cc (class aarch64_target)
1111 <supports_z_point_type>: Declare.
1112 (aarch64_supports_z_point_type): Turn into...
1113 (aarch64_target::supports_z_point_type): ...this.
1114 (the_low_target): Remove the op field.
1115 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1116 Declare.
1117 (arm_supports_z_point_type): Turn into...
1118 (arm_target::supports_z_point_type): ...this.
1119 (the_low_target): Remove the op field.
1120 * linux-crisv32-low.cc (class crisv32_target)
1121 <supports_z_point_type>: Declare.
1122 (cris_supports_z_point_type): Turn into...
1123 (crisv32_target::supports_z_point_type): ...this.
1124 (the_low_target): Remove the op field.
1125 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1126 Declare.
1127 (mips_supports_z_point_type): Turn into...
1128 (mips_target::supports_z_point_type): ...this.
1129 (the_low_target): Remove the op field.
1130 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1131 Declare.
1132 (ppc_supports_z_point_type): Turn into...
1133 (ppc_target::supports_z_point_type): ...this.
1134 (the_low_target): Remove the op field.
1135 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1136 Declare.
1137 (s390_supports_z_point_type): Turn into...
1138 (s390_target::supports_z_point_type): ...this.
1139 (the_low_target): Remove the op field.
1140 * linux-bfin-low.cc (the_low_target): Remove the op field.
1141 * linux-m32r-low.cc (the_low_target): Ditto.
1142 * linux-m68k-low.cc (the_low_target): Ditto.
1143 * linux-sh-low.cc (the_low_target): Ditto.
1144 * linux-sparc-low.cc (the_low_target): Ditto.
1145 * linux-tic6x-low.cc (the_low_target): Ditto.
1146 * linux-tile-low.cc (the_low_target): Ditto.
1147 * linux-xtensa-low.cc (the_low_target): Ditto.
1148
d7146cda
TBA
11492020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1150
1151 Turn the 'breakpoint_at' linux target op into a method of
1152 linux_process_target.
1153
1154 * linux-low.h (struct linux_target_ops): Remove the op.
1155 (class linux_process_target) <low_breakpoint_at>: Declare.
1156
1157 Update the callers below:
1158
1159 * linux-low.cc (linux_process_target::save_stop_reason)
1160 (linux_process_target::thread_still_has_status_pending)
1161 (linux_process_target::wait_1)
1162
1163 * linux-x86-low.cc (class x86_target)
1164 <low_breakpoint_at>: Declare.
1165 (x86_breakpoint_at): Turn into...
1166 (x86_target::low_breakpoint_at): ...this.
1167 (the_low_target): Remove the op field.
1168 * linux-aarch64-low.cc (class aarch64_target)
1169 <low_breakpoint_at>: Declare.
1170 (aarch64_breakpoint_at): Turn into...
1171 (aarch64_target::low_breakpoint_at): ...this.
1172 (the_low_target): Remove the op field.
1173 * linux-arm-low.cc (class arm_target)
1174 <low_breakpoint_at>: Declare.
1175 (arm_target::low_breakpoint_at): Define.
1176 (the_low_target): Remove the op field.
1177 * linux-bfin-low.cc (class bfin_target)
1178 <low_breakpoint_at>: Declare.
1179 (bfin_breakpoint_at): Turn into...
1180 (bfin_target::low_breakpoint_at): ...this.
1181 (the_low_target): Remove the op field.
1182 * linux-cris-low.cc (class cris_target)
1183 <low_breakpoint_at>: Declare.
1184 (cris_breakpoint_at): Turn into...
1185 (cris_target::low_breakpoint_at): ...this.
1186 (the_low_target): Remove the op field.
1187 * linux-crisv32-low.cc (class crisv32_target)
1188 <low_breakpoint_at>: Declare.
1189 (crisv32_breakpoint_at): Turn into...
1190 (crisv32_target::low_breakpoint_at): ...this.
1191 (the_low_target): Remove the op field.
1192 * linux-ia64-low.cc (class ia64_target)
1193 <low_breakpoint_at>: Declare.
1194 (ia64_target::low_breakpoint_at): Define.
1195 * linux-m32r-low.cc (class m32r_target)
1196 <low_breakpoint_at>: Declare.
1197 (m32r_breakpoint_at): Turn into...
1198 (m32r_target::low_breakpoint_at): ...this.
1199 (the_low_target): Remove the op field.
1200 * linux-m68k-low.cc (class m68k_target)
1201 <low_breakpoint_at>: Declare.
1202 (m68k_breakpoint_at): Turn into...
1203 (m68k_target::low_breakpoint_at): ...this.
1204 (the_low_target): Remove the op field.
1205 * linux-mips-low.cc (class mips_target)
1206 <low_breakpoint_at>: Declare.
1207 (mips_breakpoint_at): Turn into...
1208 (mips_target::low_breakpoint_at): ...this.
1209 (the_low_target): Remove the op field.
1210 * linux-nios2-low.cc (class nios2_target)
1211 <low_breakpoint_at>: Declare.
1212 (nios2_breakpoint_at): Turn into...
1213 (nios2_target::low_breakpoint_at): ...this.
1214 (the_low_target): Remove the op field.
1215 * linux-ppc-low.cc (class ppc_target)
1216 <low_breakpoint_at>: Declare.
1217 (ppc_breakpoint_at): Turn into...
1218 (ppc_target::low_breakpoint_at): ...this.
1219 (the_low_target): Remove the op field.
1220 * linux-riscv-low.cc (class riscv_target)
1221 <low_breakpoint_at>: Declare.
1222 (riscv_breakpoint_at): Turn into...
1223 (riscv_target::low_breakpoint_at): ...this.
1224 (the_low_target): Remove the op field.
1225 * linux-s390-low.cc (class s390_target)
1226 <low_breakpoint_at>: Declare.
1227 (s390_breakpoint_at): Turn into...
1228 (s390_target::low_breakpoint_at): ...this.
1229 (the_low_target): Remove the op field.
1230 * linux-sh-low.cc (class sh_target)
1231 <low_breakpoint_at>: Declare.
1232 (sh_breakpoint_at): Turn into...
1233 (sh_target::low_breakpoint_at): ...this.
1234 (the_low_target): Remove the op field.
1235 * linux-sparc-low.cc (class sparc_target)
1236 <low_breakpoint_at>: Declare.
1237 (sparc_breakpoint_at): Turn into...
1238 (sparc_target::low_breakpoint_at): ...this.
1239 (the_low_target): Remove the op field.
1240 * linux-tic6x-low.cc (class tic6x_target)
1241 <low_breakpoint_at>: Declare.
1242 (tic6x_breakpoint_at): Turn into...
1243 (tic6x_target::low_breakpoint_at): ...this.
1244 (the_low_target): Remove the op field.
1245 * linux-tile-low.cc (class tile_target)
1246 <low_breakpoint_at>: Declare.
1247 (tile_breakpoint_at): Turn into...
1248 (tile_target::low_breakpoint_at): ...this.
1249 (the_low_target): Remove the op field.
1250 * linux-xtensa-low.cc (class xtensa_target)
1251 <low_breakpoint_at>: Declare.
1252 (xtensa_breakpoint_at): Turn into...
1253 (xtensa_target::low_breakpoint_at): ...this.
1254 (the_low_target): Remove the op field.
1255
d4807ea2
TBA
12562020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1257
1258 Turn the 'decr_pc_after_break' linux_target_ops field into
1259 a method of linux_process_target.
1260
1261 * linux-low.h (struct linux_target_ops)
1262 <decr_pc_after_break>: Remove.
1263 (class linux_process_target) <low_decr_pc_after_break>: New method
1264 declaration.
1265 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1266 New method implementation.
1267
1268 Update the users below.
1269
1270 (linux_process_target::save_stop_reason)
1271 (linux_process_target::wait_1)
1272 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1273 New declaration.
1274 (x86_target::low_decr_pc_after_break): New method implementation.
1275 (the_low_target): Remove the field.
1276 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1277 New declaration.
1278 (bfin_target::low_decr_pc_after_break): New method implementation.
1279 (the_low_target): Remove the field.
1280 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1281 New declaration.
1282 (m68k_target::low_decr_pc_after_break): New method implementation.
1283 (the_low_target): Remove the field.
1284 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1285 New declaration.
1286 (s390_target::low_decr_pc_after_break): New method implementation.
1287 (the_low_target): Remove the field.
1288 * linux-aarch64-low.cc (the_low_target): Remove the field.
1289 * linux-arm-low.cc (the_low_target): Remove the field.
1290 * linux-cris-low.cc (the_low_target): Remove the field.
1291 * linux-crisv32-low.cc (the_low_target): Remove the field.
1292 * linux-m32r-low.cc (the_low_target): Remove the field.
1293 * linux-mips-low.cc (the_low_target): Remove the field.
1294 * linux-nios2-low.cc (the_low_target): Remove the field.
1295 * linux-ppc-low.cc (the_low_target): Remove the field.
1296 * linux-riscv-low.cc (the_low_target): Remove the field.
1297 * linux-sh-low.cc (the_low_target): Remove the field.
1298 * linux-sparc-low.cc (the_low_target): Remove the field.
1299 * linux-tic6x-low.cc (the_low_target): Remove the field.
1300 * linux-tile-low.cc (the_low_target): Remove the field.
1301 * linux-xtensa-low.cc (the_low_target): Remove the field.
1302
7582c77c
TBA
13032020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1304
1305 Remove the 'supports_software_single_step' linux target op and let
1306 the concrete linux target define it by overriding the op in
1307 process_stratum_target.
1308 Turn the 'get_next_pcs' linux target op into a method of
1309 linux_process_target.
1310
1311 * linux-low.h (struct linux_target_ops): Remove the ops.
1312 (class linux_process_target) <supports_software_single_step>:
1313 Remove.
1314 <low_get_next_pcs>: Declare.
1315 * linux-low.cc (can_software_single_step): Remove.
1316 (linux_process_target::low_get_next_pcs): Define.
1317 (linux_process_target::supports_software_single_step): Remove.
1318
1319 Update the callers below.
1320
1321 (linux_process_target::handle_extended_wait)
1322 (linux_process_target::wait_1)
1323 (linux_process_target::install_software_single_step_breakpoints)
1324 (linux_process_target::single_step)
1325 (linux_process_target::thread_needs_step_over)
1326 (linux_process_target::proceed_one_lwp)
1327 (linux_process_target::supports_range_stepping)
1328
1329 * linux-x86-low.cc (the_low_target): Remove the op field.
1330 * linux-aarch64-low.cc (the_low_target): Ditto.
1331 * linux-bfin-low.cc (the_low_target): Ditto.
1332 * linux-cris-low.cc (the_low_target): Ditto.
1333 * linux-crisv32-low.cc (the_low_target): Ditto.
1334 * linux-m32r-low.cc (the_low_target): Ditto.
1335 * linux-m68k-low.cc (the_low_target): Ditto.
1336 * linux-mips-low.cc (the_low_target): Ditto.
1337 * linux-nios2-low.cc (the_low_target): Ditto.
1338 * linux-ppc-low.cc (the_low_target): Ditto.
1339 * linux-riscv-low.cc (the_low_target): Ditto.
1340 * linux-s390-low.cc (the_low_target): Ditto.
1341 * linux-sh-low.cc (the_low_target): Ditto.
1342 * linux-sparc-low.cc (the_low_target): Ditto.
1343 * linux-tic6x-low.cc (the_low_target): Ditto.
1344 * linux-tile-low.cc (the_low_target): Ditto.
1345 * linux-xtensa-low.cc (the_low_target): Ditto.
1346 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1347 <supports_software_single_step>: Declare.
1348 (arm_target::supports_software_single_step): Define.
1349 (arm_gdbserver_get_next_pcs): Turn into...
1350 (arm_target::low_get_next_pcs): ...this.
1351 (the_low_target): Remove the op field.
1352
3ca4edb6
TBA
13532020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1354
1355 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1356 the concrete linux target define it by overriding the op
1357 in process_stratum_target.
1358
1359 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1360 Remove.
1361 * linux-low.h (struct linux_target_ops): Remove the op.
1362 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1363 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1364 Declare.
1365 (x86_sw_breakpoint_from_kind): Turn into...
1366 (x86_target::sw_breakpoint_from_kind): ...this.
1367 (the_low_target): Remove the op field.
1368 * linux-aarch64-low.cc (class aarch64_target)
1369 <sw_breakpoint_from_kind>: Declare.
1370 (aarch64_sw_breakpoint_from_kind): Turn into...
1371 (aarch64_target::sw_breakpoint_from_kind): ...this.
1372 (the_low_target): Remove the op field.
1373 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1374 Declare.
1375 (arm_target::sw_breakpoint_from_kind): Define.
1376 (the_low_target): Remove the op field.
1377 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1378 Declare.
1379 (bfin_sw_breakpoint_from_kind): Turn into...
1380 (bfin_target::sw_breakpoint_from_kind): ...this.
1381 (the_low_target): Remove the op field.
1382 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1383 Declare.
1384 (cris_sw_breakpoint_from_kind): Turn into...
1385 (cris_target::sw_breakpoint_from_kind): ...this.
1386 (the_low_target): Remove the op field.
1387 * linux-crisv32-low.cc (class crisv32_target)
1388 <sw_breakpoint_from_kind>: Declare.
1389 (cris_sw_breakpoint_from_kind): Turn into...
1390 (crisv32_target::sw_breakpoint_from_kind): ...this.
1391 (the_low_target): Remove the op field.
1392 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1393 Declare.
1394 (ia64_target::sw_breakpoint_from_kind): Define.
1395 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1396 Declare.
1397 (m32r_sw_breakpoint_from_kind): Turn into...
1398 (m32r_target::sw_breakpoint_from_kind): ...this.
1399 (the_low_target): Remove the op field.
1400 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1401 Declare.
1402 (m68k_sw_breakpoint_from_kind): Turn into...
1403 (m68k_target::sw_breakpoint_from_kind): ...this.
1404 (the_low_target): Remove the op field.
1405 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1406 Declare.
1407 (mips_sw_breakpoint_from_kind): Turn into...
1408 (mips_target::sw_breakpoint_from_kind): ...this.
1409 (the_low_target): Remove the op field.
1410 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1411 Declare.
1412 (nios2_sw_breakpoint_from_kind): Turn into...
1413 (nios2_target::sw_breakpoint_from_kind): ...this.
1414 (the_low_target): Remove the op field.
1415 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1416 Declare.
1417 (ppc_sw_breakpoint_from_kind): Turn into...
1418 (ppc_target::sw_breakpoint_from_kind): ...this.
1419 (the_low_target): Remove the op field.
1420 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1421 Declare.
1422 (riscv_sw_breakpoint_from_kind): Turn into...
1423 (riscv_target::sw_breakpoint_from_kind): ...this.
1424 (the_low_target): Remove the op field.
1425 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1426 Declare.
1427 (s390_sw_breakpoint_from_kind): Turn into...
1428 (s390_target::sw_breakpoint_from_kind): ...this.
1429 (the_low_target): Remove the op field.
1430 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1431 Declare.
1432 (sh_sw_breakpoint_from_kind): Turn into...
1433 (sh_target::sw_breakpoint_from_kind): ...this.
1434 (the_low_target): Remove the op field.
1435 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1436 Declare.
1437 (sparc_sw_breakpoint_from_kind): Turn into...
1438 (sparc_target::sw_breakpoint_from_kind): ...this.
1439 (the_low_target): Remove the op field.
1440 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1441 Declare.
1442 (tic6x_sw_breakpoint_from_kind): Turn into...
1443 (tic6x_target::sw_breakpoint_from_kind): ...this.
1444 (the_low_target): Remove the op field.
1445 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1446 Declare.
1447 (tile_sw_breakpoint_from_kind): Turn into...
1448 (tile_target::sw_breakpoint_from_kind): ...this.
1449 (the_low_target): Remove the op field.
1450 * linux-xtensa-low.cc (class xtensa_target)
1451 <sw_breakpoint_from_kind>: Declare.
1452 (xtensa_sw_breakpoint_from_kind): Turn into...
1453 (xtensa_target::sw_breakpoint_from_kind): ...this.
1454 (the_low_target): Remove the op field.
1455
06250e4e
TBA
14562020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1457
1458 Remove the 'breakpoint_kind_from_pc' and
1459 'breakpoint_kind_from_current_state' linux target ops, and let the
1460 concrete linux target define them by overriding the ops of
1461 process_stratum_target.
1462
1463 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1464 Remove.
1465 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1466 * linux-low.h (struct linux_target_ops): Remove ops.
1467 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1468 <breakpoint_kind_from_current_state>: Remove.
1469 * linux-x86-low.cc (the_low_target): Remove the op fields.
1470 * linux-bfin-low.cc (the_low_target): Ditto.
1471 * linux-cris-low.cc (the_low_target): Ditto.
1472 * linux-crisv32-low.cc (the_low_target): Ditto.
1473 * linux-m32r-low.cc (the_low_target): Ditto.
1474 * linux-m68k-low.cc (the_low_target): Ditto.
1475 * linux-mips-low.cc (the_low_target): Ditto.
1476 * linux-nios2-low.cc (the_low_target): Ditto.
1477 * linux-ppc-low.cc (the_low_target): Ditto.
1478 * linux-s390-low.cc (the_low_target): Ditto.
1479 * linux-sh-low.cc (the_low_target): Ditto.
1480 * linux-sparc-low.cc (the_low_target): Ditto.
1481 * linux-tic6x-low.cc (the_low_target): Ditto.
1482 * linux-tile-low.cc (the_low_target): Ditto.
1483 * linux-xtensa-low.cc (the_low_target): Ditto.
1484 * linux-aarch64-low.cc (class aarch64_target)
1485 <breakpoint_kind_from_pc>
1486 <breakpoint_kind_from_current_state>: Declare.
1487 (aarch64_breakpoint_kind_from_pc): Turn into...
1488 (aarch64_target::breakpoint_kind_from_pc): ...this.
1489 (aarch64_breakpoint_kind_from_current_state): Turn into...
1490 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1491 (the_low_target): Remove the op fields.
1492 * linux-arm-low.cc (class arm_target):
1493 <breakpoint_kind_from_pc>
1494 <breakpoint_kind_from_current_state>: Declare.
1495 (arm_target::breakpoint_kind_from_pc): Define.
1496 (arm_target::breakpoint_kind_from_current_state): Define.
1497 (the_low_target): Remove the op fields.
1498 * linux-riscv-low.cc (class riscv_target):
1499 <breakpoint_kind_from_pc>: Declare.
1500 (riscv_breakpoint_kind_from_pc): Turn into...
1501 (riscv_target::breakpoint_kind_from_pc): ...this.
1502 (the_low_target): Remove the op fields.
1503
bf9ae9d8
TBA
15042020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1505
1506 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1507 of linux_process_target.
1508
1509 * linux-low.h (struct linux_target_ops): Remove the ops.
1510 (class linux_process_target) <low_supports_breakpoints>
1511 <low_get_pc>
1512 <low_set_pc>: Declare.
1513 * linux-low.cc (supports_breakpoints): Turn into...
1514 (linux_process_target::low_supports_breakpoints): ...this.
1515 (linux_process_target::low_get_pc): Define.
1516 (linux_process_target::low_set_pc): Define.
1517
1518 Update the callers below.
1519
1520 (linux_process_target::get_pc)
1521 (linux_process_target::save_stop_reason)
1522 (linux_process_target::maybe_move_out_of_jump_pad)
1523 (linux_process_target::wait_1)
1524 (linux_process_target::resume_one_lwp_throw)
1525 (linux_process_target::resume)
1526 (linux_process_target::proceed_all_lwps)
1527 (linux_process_target::read_pc)
1528 (linux_process_target::write_pc)
1529
1530 * linux-x86-low.cc (class linux_process_target)
1531 <low_supports_breakpoints>
1532 <low_get_pc>
1533 <low_set_pc>: Declare.
1534 (x86_target::low_supports_breakpoints): Define.
1535 (x86_get_pc): Turn into...
1536 (x86_target::low_get_pc): ...this.
1537 (x86_set_pc): Turn into...
1538 (x86_target::low_set_pc): ...this.
1539 (the_low_target): Remove the op fields.
1540 * linux-arm-low.cc (class arm_target)
1541 <low_supports_breakpoints>
1542 <low_get_pc>
1543 <low_set_pc>: Declare.
1544 (arm_target::low_supports_breakpoints)
1545 (arm_target::low_get_pc)
1546 (arm_target::low_set_pc): Define.
1547 (the_low_target): Remove the op fields.
1548 * linux-bfin-low.cc (class bfin_target)
1549 <low_supports_breakpoints>
1550 <low_get_pc>
1551 <low_set_pc>: Declare.
1552 (bfin_target::low_supports_breakpoints)
1553 (bfin_target::low_get_pc)
1554 (bfin_target::low_set_pc): Define.
1555 (the_low_target): Remove the op fields.
1556 * linux-cris-low.cc (class cris_target)
1557 <low_supports_breakpoints>
1558 <low_get_pc>
1559 <low_set_pc>: Declare.
1560 (cris_target::low_supports_breakpoints)
1561 (cris_target::low_get_pc)
1562 (cris_target::low_set_pc): Define.
1563 (the_low_target): Remove the op fields.
1564 * linux-crisv32-low.cc (class crisv32_target)
1565 <low_supports_breakpoints>
1566 <low_get_pc>
1567 <low_set_pc>: Declare.
1568 (crisv32_target::low_supports_breakpoints)
1569 (crisv32_target::low_get_pc)
1570 (crisv32_target::low_set_pc): Define.
1571 (the_low_target): Remove the op fields.
1572 * linux-m32r-low.cc (class m32r_target)
1573 <low_supports_breakpoints>
1574 <low_get_pc>
1575 <low_set_pc>: Declare.
1576 (m32r_target::low_supports_breakpoints)
1577 (m32r_target::low_get_pc)
1578 (m32r_target::low_set_pc): Define.
1579 (the_low_target): Remove the op fields.
1580 * linux-m68k-low.cc (class m68k_target)
1581 <low_supports_breakpoints>
1582 <low_get_pc>
1583 <low_set_pc>: Declare.
1584 (m68k_target::low_supports_breakpoints)
1585 (m68k_target::low_get_pc)
1586 (m68k_target::low_set_pc): Define.
1587 (the_low_target): Remove the op fields.
1588 * linux-nios2-low.cc (class nios2_target)
1589 <low_supports_breakpoints>
1590 <low_get_pc>
1591 <low_set_pc>: Declare.
1592 (nios2_target::low_supports_breakpoints)
1593 (nios2_target::low_get_pc)
1594 (nios2_target::low_set_pc): Define.
1595 (the_low_target): Remove the op fields.
1596 * linux-sh-low.cc (class sh_target)
1597 <low_supports_breakpoints>
1598 <low_get_pc>
1599 <low_set_pc>: Declare.
1600 (sh_target::low_supports_breakpoints)
1601 (sh_target::low_get_pc)
1602 (sh_target::low_set_pc): Define.
1603 (the_low_target): Remove the op fields.
1604 * linux-xtensa-low.cc (class xtensa_target)
1605 <low_supports_breakpoints>
1606 <low_get_pc>
1607 <low_set_pc>: Declare.
1608 (xtensa_target::low_supports_breakpoints)
1609 (xtensa_target::low_get_pc)
1610 (xtensa_target::low_set_pc): Define.
1611 (the_low_target): Remove the op fields.
1612 * linux-sparc-low.cc (class sparc_target)
1613 <low_supports_breakpoints>
1614 <low_get_pc>: Declare.
1615 (sparc_target::low_supports_breakpoints)
1616 (sparc_target::low_get_pc): Define.
1617 (the_low_target): Remove the op fields.
1618 * linux-tile-low.cc (class tile_target)
1619 <low_supports_breakpoints>
1620 <low_get_pc>
1621 <low_set_pc>: Declare.
1622 (tile_target::low_supports_breakpoints)
1623 (tile_target::low_get_pc)
1624 (tile_target::low_set_pc): Define.
1625 (the_low_target): Remove the op fields.
1626 * linux-aarch64-low.cc (class aarch64_target)
1627 <low_supports_breakpoints>
1628 <low_get_pc>
1629 <low_set_pc>: Declare.
1630 (aarch64_target::low_supports_breakpoints): Define.
1631 (aarch64_get_pc): Turn into...
1632 (aarch64_target::low_get_pc): ...this.
1633 (aarch64_set_pc): Turn into...
1634 (aarch64_target::low_set_pc): ...this.
1635 (the_low_target): Remove the op fields.
1636 * linux-mips-low.cc (class mips_target)
1637 <low_supports_breakpoints>
1638 <low_get_pc>
1639 <low_set_pc>: Declare.
1640 (mips_target::low_supports_breakpoints): Define.
1641 (mips_get_pc): Turn into...
1642 (mips_target::low_get_pc): ...this.
1643 (mips_set_pc): Turn into...
1644 (mips_target::low_set_pc): ...this.
1645 (the_low_target): Remove the op fields.
1646 * linux-ppc-low.cc (class ppc_target)
1647 <low_supports_breakpoints>
1648 <low_get_pc>
1649 <low_set_pc>: Declare.
1650 (ppc_target::low_supports_breakpoints): Define.
1651 (ppc_get_pc): Turn into...
1652 (ppc_target::low_get_pc): ...this.
1653 (ppc_set_pc): Turn into...
1654 (ppc_target::low_set_pc): ...this.
1655 (the_low_target): Remove the op fields.
1656 * linux-riscv-low.cc (class riscv_target)
1657 <low_supports_breakpoints>
1658 <low_get_pc>
1659 <low_set_pc>: Declare.
1660 (riscv_target::low_supports_breakpoints): Define.
1661 (riscv_get_pc): Turn into...
1662 (riscv_target::low_get_pc): ...this.
1663 (riscv_set_pc): Turn into...
1664 (riscv_target::low_set_pc): ...this.
1665 (the_low_target): Remove the op fields.
1666 * linux-s390-low.cc (class s390_target)
1667 <low_supports_breakpoints>
1668 <low_get_pc>
1669 <low_set_pc>: Declare.
1670 (s390_target::low_supports_breakpoints): Define.
1671 (s390_get_pc): Turn into...
1672 (s390_target::low_get_pc): ...this.
1673 (s390_set_pc): Turn into...
1674 (s390_target::low_set_pc): ...this.
1675 (the_low_target): Remove the op fields.
1676 * linux-tic6x-low.cc (class tic6x_target)
1677 <low_supports_breakpoints>
1678 <low_get_pc>
1679 <low_set_pc>: Declare.
1680 (tic6x_target::low_supports_breakpoints): Define.
1681 (tic6x_get_pc): Turn into...
1682 (tic6x_target::low_get_pc): ...this.
1683 (tic6x_set_pc): Turn into...
1684 (tic6x_target::low_set_pc): ...this.
1685 (the_low_target): Remove the op fields.
1686
df95181f
TBA
16872020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1688
1689 Turn some more static methods in linux-low into private methods
1690 of linux_process_target.
1691
1692 * linux-low.cc (get_pc): Turn into...
1693 (linux_process_target::get_pc): ...this.
1694 (save_stop_reason): Turn into...
1695 (linux_process_target::save_stop_reason): ...this.
1696 (thread_still_has_status_pending_p): Turn into...
1697 (linux_process_target::thread_still_has_status_pending): ...this.
1698 (status_pending_p_callback): Turn into...
1699 (linux_process_target::status_pending_p_callback): ...this.
1700 (resume_stopped_resumed_lwps): Turn into...
1701 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1702 (install_software_single_step_breakpoints): Turn into...
1703 (linux_process_target::install_software_single_step_breakpoints):
1704 ...this.
1705 (single_step): Turn into...
1706 (linux_process_target::single_step): ...this.
1707 (linux_resume_one_lwp_throw): Turn into...
1708 (linux_process_target::resume_one_lwp_throw): ...this.
1709 (linux_resume_one_lwp): Turn into...
1710 (linux_process_target::resume_one_lwp): ...this.
1711 (resume_status_pending_p): Turn into...
1712 (linux_process_target::resume_status_pending): ...this.
1713 (need_step_over_p): Turn into...
1714 (linux_process_target::thread_needs_step_over): ...this.
1715 (linux_resume_one_thread): Turn into...
1716 (linux_process_target::resume_one_thread): ...this.
1717 (proceed_one_lwp): Turn into...
1718 (linux_process_target::proceed_one_lwp): ...this.
1719 (unsuspend_and_proceed_one_lwp): Turn into...
1720 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1721
1722 Update the calls/references to the above functions below.
1723
1724 (linux_process_target::handle_extended_wait)
1725 (linux_process_target::filter_event)
1726 (linux_process_target::wait_for_event_filtered)
1727 (linux_process_target::wait_1)
1728 (linux_process_target::move_out_of_jump_pad)
1729 (linux_process_target::start_step_over)
1730 (linux_process_target::resume)
1731 (linux_process_target::proceed_all_lwps)
1732 (regsets_store_inferior_registers)
1733 (linux_process_target::store_register)
1734
1735 * linux-low.h (class linux_process_target)
1736 <get_pc>
1737 <save_stop_reason>
1738 <thread_still_has_status_pending>
1739 <status_pending_p_callback>
1740 <resume_stopped_resumed_lwps>
1741 <install_software_single_step_breakpoints>
1742 <single_step>
1743 <resume_one_lwp_throw>
1744 <resume_one_lwp>
1745 <resume_status_pending>
1746 <thread_needs_step_over>
1747 <resume_one_thread>
1748 <proceed_one_lwp>
1749 <unsuspend_and_proceed_one_lwp>: Declare.
1750
bd70b1f2
TBA
17512020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1752
1753 Turn the 'fetch_register' linux target op into a method of
1754 linux_process_target.
1755
1756 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1757 (class linux_process_target) <low_fetch_register>: Declare.
1758 * linux-x86-low.cc (the_low_target)
1759 * linux-aarch64-low.cc (the_low_target)
1760 * linux-arm-low.cc (the_low_target)
1761 * linux-bfin-low.cc (the_low_target)
1762 * linux-cris-low.cc (the_low_target)
1763 * linux-crisv32-low.cc (the_low_target)
1764 * linux-m32r-low.cc (the_low_target)
1765 * linux-m68k-low.cc (the_low_target)
1766 * linux-nios2-low.cc (the_low_target)
1767 * linux-ppc-low.cc (the_low_target)
1768 * linux-s390-low.cc (the_low_target)
1769 * linux-sh-low.cc (the_low_target)
1770 * linux-sparc-low.cc (the_low_target)
1771 * linux-tic6x-low.cc (the_low_target)
1772 * linux-tile-low.cc (the_low_target)
1773 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1774 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1775 Declare.
1776 (ia64_fetch_register): Turn into...
1777 (ia64_target::low_fetch_register): ...this.
1778 (the_low_target): Remove the op field.
1779 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1780 Declare.
1781 (mips_fetch_register): Turn into...
1782 (mips_target::low_fetch_register): ...this.
1783 (the_low_target): Remove the op field.
1784 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1785 Declare.
1786 (riscv_fetch_register): Turn into...
1787 (riscv_target::low_fetch_register): ...this.
1788 (the_low_target): Remove the op field.
1789
1790 Update the callers below.
1791
1792 * linux-low.cc (linux_process_target::fetch_registers)
1793 (linux_process_target::low_fetch_register)
1794
daca57a7
TBA
17952020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1796
1797 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1798 linux target ops into methods of linux_process_target.
1799
1800 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1801 (class linux_process_target) <fetch_register>
1802 <store_register>
1803 <usr_fetch_inferior_registers>
1804 <usr_store_inferior_registers>
1805 <low_cannot_fetch_register>
1806 <low_cannot_fetch_register> Declare.
1807 * linux-low.cc (fetch_register): Turn into...
1808 (linux_process_target::fetch_register): ...this.
1809 (store_register): Turn into ...
1810 (linux_process_target::store_register): ...this.
1811 (usr_fetch_inferior_registers): Turn into...
1812 (linux_process_target::usr_fetch_inferior_registers): ...this.
1813 (usr_store_inferior_registers): Turn into...
1814 (linux_process_target::usr_store_inferior_registers): ...this.
1815 * linux-x86-low.cc (class x86_target)
1816 <low_cannot_fetch_register>
1817 <low_cannot_store_register>: Declare.
1818 (x86_cannot_store_register): Turn into...
1819 (x86_target::low_cannot_store_register): ...this.
1820 (x86_cannot_fetch_register): Turn into...
1821 (x86_target::low_cannot_fetch_register): ...this.
1822 (the_low_target): Remove the target op fields.
1823 * linux-aarch64-low.cc (class aarch64_target)
1824 <low_cannot_fetch_register>
1825 <low_cannot_store_register>: Declare.
1826 (aarch64_target::low_cannot_fetch_register)
1827 (aarch64_target::low_cannot_store_register): Define.
1828 (the_low_target): Remove the op fields.
1829 * linux-arm-low.cc (class arm_target)
1830 <low_cannot_fetch_register>
1831 <low_cannot_store_register>: Declare.
1832 (arm_cannot_fetch_register): Turn into...
1833 (arm_target::low_cannot_fetch_register): ...this.
1834 (arm_cannot_store_register): Turn into...
1835 (arm_target::low_cannot_store_register): ...this.
1836 (the_low_target): Remove the op fields.
1837 * linux-bfin-low.cc (class bfin_target)
1838 <low_cannot_fetch_register>
1839 <low_cannot_store_register>: Declare.
1840 (bfin_cannot_fetch_register): Turn into...
1841 (bfin_target::low_cannot_fetch_register): ...this.
1842 (bfin_cannot_store_register): Turn into...
1843 (bfin_target::low_cannot_store_register): ...this.
1844 (the_low_target): Remove the op fields.
1845 * linux-cris-low.cc (class cris_target)
1846 <low_cannot_fetch_register>
1847 <low_cannot_store_register>: Declare.
1848 (cris_cannot_fetch_register): Turn into...
1849 (cris_target::low_cannot_fetch_register): ...this.
1850 (cris_cannot_store_register): Turn into...
1851 (cris_target::low_cannot_store_register): ...this.
1852 (the_low_target): Remove the op fields.
1853 * linux-crisv32-low.cc (class crisv32_target)
1854 <low_cannot_fetch_register>
1855 <low_cannot_store_register>: Declare.
1856 (crisv32_target::low_cannot_fetch_register)
1857 (crisv32_target::low_cannot_store_register): Define.
1858 (the_low_target): Remove the op fields.
1859 * linux-ia64-low.cc (class ia64_target)
1860 <low_cannot_fetch_register>
1861 <low_cannot_store_register>: Declare.
1862 (ia64_cannot_fetch_register): Turn into...
1863 (ia64_target::low_cannot_fetch_register): ...this.
1864 (ia64_cannot_store_register): Turn into...
1865 (ia64_target::low_cannot_store_register): ...this.
1866 (the_low_target): Remove the op fields.
1867 * linux-m32r-low.cc (class m32r_target)
1868 <low_cannot_fetch_register>
1869 <low_cannot_store_register>: Declare.
1870 (m32r_cannot_fetch_register): Turn into...
1871 (m32r_target::low_cannot_fetch_register): ...this.
1872 (m32r_cannot_store_register): Turn into...
1873 (m32r_target::low_cannot_store_register): ...this.
1874 (the_low_target): Remove the op fields.
1875 * linux-m68k-low.cc (class m68k_target)
1876 <low_cannot_fetch_register>
1877 <low_cannot_store_register>: Declare.
1878 (m68k_cannot_fetch_register): Turn into...
1879 (m68k_target::low_cannot_fetch_register): ...this.
1880 (m68k_cannot_store_register): Turn into...
1881 (m68k_target::low_cannot_store_register): ...this.
1882 (the_low_target): Remove the op fields.
1883 * linux-mips-low.cc (class mips_target)
1884 <low_cannot_fetch_register>
1885 <low_cannot_store_register>: Declare.
1886 (mips_cannot_fetch_register): Turn into...
1887 (mips_target::low_cannot_fetch_register): ...this.
1888 (mips_cannot_store_register): Turn into...
1889 (mips_target::low_cannot_store_register): ...this.
1890 (get_usrregs_info): Inline at the call sites in
1891 low_cannot_fetch_register and low_cannot_store_register,
1892 and remove.
1893 (the_low_target): Remove the op fields.
1894 * linux-nios2-low.cc (class nios2_target)
1895 <low_cannot_fetch_register>
1896 <low_cannot_store_register>: Declare.
1897 (nios2_cannot_fetch_register): Turn into...
1898 (nios2_target::low_cannot_fetch_register): ...this.
1899 (nios2_cannot_store_register): Turn into...
1900 (nios2_target::low_cannot_store_register): ...this.
1901 (the_low_target): Remove the op fields.
1902 * linux-ppc-low.cc (class ppc_target)
1903 <low_cannot_fetch_register>
1904 <low_cannot_store_register>: Declare.
1905 (ppc_cannot_fetch_register): Turn into...
1906 (ppc_target::low_cannot_fetch_register): ...this.
1907 (ppc_cannot_store_register): Turn into...
1908 (ppc_target::low_cannot_store_register): ...this.
1909 (the_low_target): Remove the op fields.
1910 * linux-riscv-low.cc (class riscv_target)
1911 <low_cannot_fetch_register>
1912 <low_cannot_store_register>: Declare.
1913 (riscv_target::low_cannot_fetch_register)
1914 (riscv_target::low_cannot_store_register): Define.
1915 (the_low_target): Remove the op fields.
1916 * linux-s390-low.cc (class s390_target)
1917 <low_cannot_fetch_register>
1918 <low_cannot_store_register>: Declare.
1919 (s390_cannot_fetch_register): Turn into...
1920 (s390_target::low_cannot_fetch_register): ...this.
1921 (s390_cannot_store_register): Turn into...
1922 (s390_target::low_cannot_store_register): ...this.
1923 (the_low_target): Remove the op fields.
1924 * linux-sh-low.cc (class sh_target)
1925 <low_cannot_fetch_register>
1926 <low_cannot_store_register>: Declare.
1927 (sh_cannot_fetch_register): Turn into...
1928 (sh_target::low_cannot_fetch_register): ...this.
1929 (sh_cannot_store_register): Turn into...
1930 (sh_target::low_cannot_store_register): ...this.
1931 (the_low_target): Remove the op fields.
1932 * linux-sparc-low.cc (class sparc_target)
1933 <low_cannot_fetch_register>
1934 <low_cannot_store_register>: Declare.
1935 (sparc_cannot_fetch_register): Turn into...
1936 (sparc_target::low_cannot_fetch_register): ...this.
1937 (sparc_cannot_store_register): Turn into...
1938 (sparc_target::low_cannot_store_register): ...this.
1939 (the_low_target): Remove the op fields.
1940 * linux-tic6x-low.cc (class tic6x_target)
1941 <low_cannot_fetch_register>
1942 <low_cannot_store_register>: Declare.
1943 (tic6x_cannot_fetch_register): Turn into...
1944 (tic6x_target::low_cannot_fetch_register): ...this.
1945 (tic6x_cannot_store_register): Turn into...
1946 (tic6x_target::low_cannot_store_register): ...this.
1947 (the_low_target): Remove the op fields.
1948 * linux-tile-low.cc (class tile_target)
1949 <low_cannot_fetch_register>
1950 <low_cannot_store_register>: Declare.
1951 (tile_cannot_fetch_register): Turn into...
1952 (tile_target::low_cannot_fetch_register): ...this.
1953 (tile_cannot_store_register): Turn into...
1954 (tile_target::low_cannot_store_register): ...this.
1955 (the_low_target): Remove the op fields.
1956 * linux-xtensa-low.cc (class xtensa_target)
1957 <low_cannot_fetch_register>
1958 <low_cannot_store_register>: Declare.
1959 (xtensa_target::low_cannot_fetch_register)
1960 (xtensa_target::low_cannot_store_register): Define.
1961 (the_low_target): Remove the op fields.
1962
aa8d21c9
TBA
19632020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1964
1965 Turn the 'regs_info' linux target op into a method of
1966 linux_process_target.
1967
1968 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
1969 (class linux_process_target) <get_regs_info>: Define.
1970
1971 Update the callers below.
1972
1973 * linux-low.cc (linux_process_target::fetch_registers)
1974 (linux_process_target::store_registers)
1975 * proc-service.cc (gregset_info)
1976
1977 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
1978 (x86_linux_regs_info): Turn into ...
1979 (x86_target::get_regs_info): ...this.
1980 (the_low_target): Remove the op field.
1981 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
1982 Declare.
1983 (aarch64_regs_info): Turn into ...
1984 (aarch64_target::get_regs_info): ...this.
1985 (the_low_target): Remove the op field.
1986 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
1987 (arm_regs_info): Turn into ...
1988 (arm_target::get_regs_info): ...this.
1989 (the_low_target): Remove the op field.
1990 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
1991 (bfin_regs_info): Turn into ...
1992 (bfin_target::get_regs_info): ...this.
1993 (the_low_target): Remove the op field.
1994 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
1995 (cris_regs_info): Turn into ...
1996 (cris_target::get_regs_info): ...this.
1997 (the_low_target): Remove the op field.
1998 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
1999 Declare.
2000 (crisv32_regs_info): Turn into ...
2001 (crisv32_target::get_regs_info): ...this.
2002 (the_low_target): Remove the op field.
2003 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2004 (ia64_regs_info): Turn into ...
2005 (ia64_target::get_regs_info): ...this.
2006 (the_low_target): Remove the op field.
2007 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2008 (m32r_regs_info): Turn into ...
2009 (m32r_target::get_regs_info): ...this.
2010 (the_low_target): Remove the op field.
2011 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2012 (m68k_regs_info): Turn into ...
2013 (m68k_target::get_regs_info): ...this.
2014 (the_low_target): Remove the op field.
2015 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2016 (mips_regs_info): Turn into ...
2017 (mips_target::get_regs_info): ...this.
2018 (the_low_target): Remove the op field.
2019 (get_usrregs_info): Update the call to the op.
2020 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2021 (nios2_regs_info): Turn into ...
2022 (nios2_target::get_regs_info): ...this.
2023 (the_low_target): Remove the op field.
2024 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2025 (ppc_regs_info): Turn into ...
2026 (ppc_target::get_regs_info): ...this.
2027 (the_low_target): Remove the op field.
2028 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2029 (riscv_regs_info): Turn into ...
2030 (riscv_target::get_regs_info): ...this.
2031 (the_low_target): Remove the op field.
2032 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2033 (s390_regs_info): Turn into ...
2034 (s390_target::get_regs_info): ...this.
2035 (the_low_target): Remove the op field.
2036 (s390_collect_ptrace_register)
2037 (s390_supply_ptrace_register)
2038 (s390_fill_gregset): Update the call to the op.
2039 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2040 (sh_regs_info): Turn into ...
2041 (sh_target::get_regs_info): ...this.
2042 (the_low_target): Remove the op field.
2043 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2044 (sparc_regs_info): Turn into ...
2045 (sparc_target::get_regs_info): ...this.
2046 (the_low_target): Remove the op field.
2047 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2048 (tic6x_regs_info): Turn into ...
2049 (tic6x_target::get_regs_info): ...this.
2050 (the_low_target): Remove the op field.
2051 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2052 (tile_regs_info): Turn into ...
2053 (tile_target::get_regs_info): ...this.
2054 (the_low_target): Remove the op field.
2055 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2056 Declare.
2057 (xtensa_regs_info): Turn into ...
2058 (xtensa_target::get_regs_info): ...this.
2059 (the_low_target): Remove the op field.
2060
797bcff5
TBA
20612020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2062
2063 Turn the 'arch_setup' linux target op into a method of
2064 linux_process_target.
2065
2066 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2067 (class linux_process_target) <arch_setup_thread>
2068 <low_arch_setup>: New declarations.
2069 * linux-low.cc (linux_arch_setup): Delete.
2070 (linux_arch_setup_thread): Turn into...
2071 (linux_process_target::arch_setup_thread): ... this.
2072
2073 Update the callers below.
2074
2075 (linux_process_target::handle_extended_wait)
2076 (linux_process_target::post_create_inferior)
2077 (linux_process_target::filter_event)
2078
2079 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2080 declaration.
2081 (x86_linux_update_xmltarget): Turn into...
2082 (x86_target::update_xmltarget): ...this.
2083 (x86_linux_process_qsupported): Update the call to
2084 x86_linux_update_xmltarget.
2085 (x86_arch_setup): Turn into ...
2086 (x86_target::low_arch_setup): ...this.
2087 (the_low_target): Remove the op field.
2088 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2089 declaration.
2090 (aarch64_arch_setup): Turn into ...
2091 (aarch64_target::low_arch_setup): ...this.
2092 (the_low_target): Remove the op field.
2093 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2094 declaration.
2095 (arm_arch_setup): Turn into ...
2096 (arm_target::low_arch_setup): ...this.
2097 (the_low_target): Remove the op field.
2098 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2099 declaration.
2100 (bfin_arch_setup): Turn into ...
2101 (bfin_target::low_arch_setup): ...this.
2102 (the_low_target): Remove the op field.
2103 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2104 declaration.
2105 (cris_arch_setup): Turn into ...
2106 (cris_target::low_arch_setup): ...this.
2107 (the_low_target): Remove the op field.
2108 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2109 declaration.
2110 (crisv32_arch_setup): Turn into ...
2111 (crisv32_target::low_arch_setup): ...this.
2112 (the_low_target): Remove the op field.
2113 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2114 declaration.
2115 (ia64_arch_setup): Turn into ...
2116 (ia64_target::low_arch_setup): ...this.
2117 (the_low_target): Remove the op field.
2118 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2119 declaration.
2120 (m32r_arch_setup): Turn into ...
2121 (m32r_target::low_arch_setup): ...this.
2122 (the_low_target): Remove the op field.
2123 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2124 declaration.
2125 (m68k_arch_setup): Turn into ...
2126 (m68k_target::low_arch_setup): ...this.
2127 (the_low_target): Remove the op field.
2128 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2129 declaration.
2130 (mips_arch_setup): Turn into ...
2131 (mips_target::low_arch_setup): ...this.
2132 (the_low_target): Remove the op field.
2133 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2134 declaration.
2135 (nios2_arch_setup): Turn into ...
2136 (nios2_target::low_arch_setup): ...this.
2137 (the_low_target): Remove the op field.
2138 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2139 declaration.
2140 (ppc_arch_setup): Turn into ...
2141 (ppc_target::low_arch_setup): ...this.
2142 (the_low_target): Remove the op field.
2143 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2144 declaration.
2145 (riscv_arch_setup): Turn into ...
2146 (riscv_target::low_arch_setup): ...this.
2147 (the_low_target): Remove the op field.
2148 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2149 declaration.
2150 (s390_arch_setup): Turn into ...
2151 (s390_target::low_arch_setup): ...this.
2152 (the_low_target): Remove the op field.
2153 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2154 declaration.
2155 (sh_arch_setup): Turn into ...
2156 (sh_target::low_arch_setup): ...this.
2157 (the_low_target): Remove the op field.
2158 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2159 declaration.
2160 (sparc_arch_setup): Turn into ...
2161 (sparc_target::low_arch_setup): ...this.
2162 (the_low_target): Remove the op field.
2163 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2164 declaration.
2165 (tic6x_arch_setup): Turn into ...
2166 (tic6x_target::low_arch_setup): ...this.
2167 (the_low_target): Remove the op field.
2168 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2169 declaration.
2170 (tile_arch_setup): Turn into ...
2171 (tile_target::low_arch_setup): ...this.
2172 (the_low_target): Remove the op field.
2173 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2174 declaration.
2175 (xtensa_arch_setup): Turn into ...
2176 (xtensa_target::low_arch_setup): ...this.
2177 (the_low_target): Remove the op field.
2178
ef0478f6
TBA
21792020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2180
2181 * linux-low.h (the_linux_target): New extern declaration.
2182 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2183 'the_target'.
2184 (the_linux_target): Remove.
2185 * linux-x86-low.cc (class x86_target): New class.
2186 (the_x86_target): New static object.
2187 (the_linux_target): Define as pointer to the_x86_target.
2188 * linux-aarch64-low.cc (class aarch64_target): New class.
2189 (the_aarch64_target): New static object.
2190 (the_linux_target): Define as pointer to the_aarch64_target.
2191 * linux-arm-low.cc (class arm_target): New class.
2192 (the_arm_target): New static object.
2193 (the_linux_target): Define as pointer to the_arm_target.
2194 * linux-bfin-low.cc (class bfin_target): New class.
2195 (the_bfin_target): New static object.
2196 (the_linux_target): Define as pointer to the_bfin_target.
2197 * linux-cris-low.cc (class cris_target): New class.
2198 (the_cris_target): New static object.
2199 (the_linux_target): Define as pointer to the_cris_target.
2200 * linux-crisv32-low.cc (class crisv32_target): New class.
2201 (the_crisv32_target): New static object.
2202 (the_linux_target): Define as pointer to the_crisv32_target.
2203 * linux-ia64-low.cc (class ia64_target): New class.
2204 (the_ia64_target): New static object.
2205 (the_linux_target): Define as pointer to the_ia64_target.
2206 * linux-m32r-low.cc (class m32r_target): New class.
2207 (the_m32r_target): New static object.
2208 (the_linux_target): Define as pointer to the_m32r_target.
2209 * linux-m68k-low.cc (class m68k_target): New class.
2210 (the_m68k_target): New static object.
2211 (the_linux_target): Define as pointer to the_m68k_target.
2212 * linux-mips-low.cc (class mips_target): New class.
2213 (the_mips_target): New static object.
2214 (the_linux_target): Define as pointer to the_mips_target.
2215 * linux-nios2-low.cc (class nios2_target): New class.
2216 (the_nios2_target): New static object.
2217 (the_linux_target): Define as pointer to the_nios2_target.
2218 * linux-ppc-low.cc (class ppc_target): New class.
2219 (the_ppc_target): New static object.
2220 (the_linux_target): Define as pointer to the_ppc_target.
2221 * linux-riscv-low.cc (class riscv_target): New class.
2222 (the_riscv_target): New static object.
2223 (the_linux_target): Define as pointer to the_riscv_target.
2224 * linux-s390-low.cc (class s390_target): New class.
2225 (the_s390_target): New static object.
2226 (the_linux_target): Define as pointer to the_s390_target.
2227 * linux-sh-low.cc (class sh_target): New class.
2228 (the_sh_target): New static object.
2229 (the_linux_target): Define as pointer to the_sh_target.
2230 * linux-sparc-low.cc (class sparc_target): New class.
2231 (the_sparc_target): New static object.
2232 (the_linux_target): Define as pointer to the_sparc_target.
2233 * linux-tic6x-low.cc (class tic6x_target): New class.
2234 (the_tic6x_target): New static object.
2235 (the_linux_target): Define as pointer to the_tic6x_target.
2236 * linux-tile-low.cc (class tile_target): New class.
2237 (the_tile_target): New static object.
2238 (the_linux_target): Define as pointer to the_tile_target.
2239 * linux-xtensa-low.cc (class xtensa_target): New class.
2240 (the_xtensa_target): New static object.
2241 (the_linux_target): Define as pointer to the_xtensa_target.
2242
d16f3f6c
TBA
22432020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2244
2245 Turn some static functions in linux-low.cc into private methods of
2246 linux_process_target.
2247
2248 * linux-low.cc (handle_extended_wait): Turn into ...
2249 (linux_process_target::handle_extended_wait): ...this. Call
2250 'mourn' on 'this' object instead of 'the_target'.
2251 (maybe_move_out_of_jump_pad): Turn into...
2252 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2253 (linux_low_filter_event): Turn into...
2254 (linux_process_target::filter_event): ...this.
2255 (linux_wait_for_event_filtered): Turn into...
2256 (linux_process_target::wait_for_event_filtered): ...this.
2257 (linux_wait_for_event): Turn into...
2258 (linux_process_target::wait_for_event): ...this.
2259 (linux_wait_1): Turn into...
2260 (linux_process_target::wait_1): ...this.
2261 (wait_for_sigstop): Turn into...
2262 (linux_process_target::wait_for_sigstop): ...this.
2263 (move_out_of_jump_pad_callback): Turn into...
2264 (linux_process_target::move_out_of_jump_pad): ...this.
2265 (stop_all_lwps): Turn into...
2266 (linux_process_target::stop_all_lwps): ...this.
2267 (start_step_over): Turn into...
2268 (linux_process_target::start_step_over): ...this.
2269 (complete_ongoing_step_over): Turn into...
2270 (linux_process_target::complete_ongoing_step_over): ...this.
2271 (proceed_all_lwps): Turn into...
2272 (linux_process_target::proceed_all_lwps): ...this.
2273 (unstop_all_lwps): Turn into...
2274 (linux_process_target::unstop_all_lwps): ...this.
2275
2276 * linux-low.h (class linux_process_target)
2277 <handle_extended_wait>
2278 <maybe_move_out_of_jump_pad>
2279 filter_event>
2280 <wait_for_event_filtered>
2281 <wait_for_event>
2282 <wait_1>
2283 <wait_for_sigstop>
2284 <move_out_of_jump_pad>
2285 <stop_all_lwps>
2286 <start_step_over>
2287 <complete_ongoing_step_over>
2288 <proceed_all_lwps>
2289 <unstop_all_lwps>: Declare.
2290
2291 Update the callers below.
2292
2293 * linux-low.cc (linux_process_target::attach): Update.
2294 (linux_process_target::stabilize_threads): Ditto.
2295 (linux_process_target::wait): Ditto.
2296
a5863204
TBA
22972020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2298
2299 * linux-low.h (struct linux_target_ops): Update the comment for
2300 'cannot_store_register' to return 0 or 1.
2301 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2302 of 2.
2303
c884cc46
SM
23042020-03-20 Simon Marchi <simon.marchi@efficios.com>
2305
2306 * config.in: Re-generate.
2307 * configure: Re-generate.
2308
5a82b8a1
KR
23092020-03-17 Kamil Rytarowski <n54@gmx.com>
2310
2311 * regcache.cc (find_register_by_number): Update.
2312 * tdesc.cc (init_target_desc): Likewise.
2313 * tdesc.h (target_desc::reg_defs): Likewise.
2314
4635ff97
TT
23152020-03-12 Tom Tromey <tom@tromey.com>
2316
2317 * configure: Rebuild.
2318 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2319 (WIN32APILIBS): New subst.
2320 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2321 gdbsupport files.
2322 (gdbsupport/%.o): Remove target.
2323 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2324 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2325 (WIN32APILIBS): New variable.
2326 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2327 (gdbreplay$(EXEEXT)): Likewise.
2328
9a665d62
TT
23292020-03-12 Tom Tromey <tom@tromey.com>
2330
2331 * config.in, configure: Rebuild.
2332 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2333 * acinclude.m4: Include gettext-sister.m4.
2334 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2335 variables.
2336 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2337 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2338
272cd5a3
SM
23392020-03-12 Simon Marchi <simon.marchi@efficios.com>
2340
2341 * acinclude.m4: Update path to selftest.m4.
2342
db6878ac
SM
23432020-03-12 Simon Marchi <simon.marchi@efficios.com>
2344
2345 * configure.ac: Don't source bfd/development.sh, move
2346 GDB_AC_COMMON higher.
2347 * configure: Re-generate.
2348
4d696a5c
SM
23492020-03-12 Simon Marchi <simon.marchi@efficios.com>
2350
2351 * configure: Re-generate.
2352
a0761e34
SM
23532020-03-11 Simon Marchi <simon.marchi@efficios.com>
2354
2355 * configure: Re-generate.
2356
20ea4a60
AB
23572020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2358
2359 * .dir-locals.el: New file.
2360
842806cb
TBA
23612020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2362
2363 * .gitattributes: New file.
2364
442131c1
AB
23652020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2366
2367 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2368 reply into an S reply.
2369 * server.cc (disable_packet_T): New global.
2370 (captured_main): Set new global when appropriate.
2371 * server.h (disable_packet_T): Declare.
2372
dda42c0b
TT
23732020-02-21 Tom Tromey <tom@tromey.com>
2374
2375 * Makefile.in (mostlyclean): New target.
2376
52405d85
TBA
23772020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2378
2379 * target.h (struct process_stratum_target): Remove.
2380 (class process_target): Rename to ...
2381 (class process_stratum_target): ... this.
2382 * linux-low.h (class linux_process_target): Derive from
2383 'process_stratum_target'.
2384 * linux-low.cc (linux_target_ops): Remove.
2385 (initialize_low): Set the_target to the singleton instance of
2386 linux_process_target.
2387 * lynx-low.h (class lynx_process_target): Derive from
2388 'process_stratum_target'.
2389 * lynx-low.cc (lynx_target_ops): Remove.
2390 (initialize_low): Set the_target to the singleton instance of
2391 lynx_process_target.
2392 * nto-low.h (class nto_process_target): Derive from
2393 'process_stratum_target'.
2394 * nto-low.cc (nto_target_ops): Remove.
2395 (initialize_low): Set the_target to the singleton instance of
2396 nto_process_target.
2397 * win32-low.h (class win32_process_target): Derive from
2398 'process_stratum_target'.
2399 * win32-low.cc (win32_target_ops): Remove.
2400 (initialize_low): Set the_target to the singleton instance of
2401 win32_process_target.
2402
2403 Replace 'the_target->pt' with 'the_target' in the uses below.
2404
2405 * hostio.cc (hostio_error)
2406 (handle_setfs)
2407 (handle_open)
2408 (handle_unlink)
2409 (handle_readlink)
2410 * linux-aarch32-low.cc (arm_breakpoint_at)
2411 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2412 * linux-arm-low.cc (arm_sigreturn_next_pc)
2413 (arm_get_hwcap)
2414 (arm_get_syscall_trapinfo)
2415 * linux-cris-low.cc (cris_breakpoint_at)
2416 * linux-crisv32-low.cc (cris_breakpoint_at)
2417 * linux-low.cc (handle_extended_wait)
2418 (linux_wait_1)
2419 (linux_read_memory)
2420 (linux_process_target::breakpoint_kind_from_pc)
2421 (linux_get_auxv)
2422 * linux-m32r-low.cc (m32r_breakpoint_at)
2423 * linux-mips-low.cc (mips_breakpoint_at)
2424 * linux-nios2-low.cc (nios2_breakpoint_at)
2425 * linux-ppc-low.cc (ppc_breakpoint_at)
2426 * linux-s390-low.cc (s390_get_hwcap)
2427 * linux-sh-low.cc (sh_breakpoint_at)
2428 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2429 (sparc_store_gregset_from_stack)
2430 (sparc_breakpoint_at)
2431 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2432 * linux-tile-low.cc (tile_breakpoint_at)
2433 * linux-x86-low.cc (x86_breakpoint_at)
2434 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2435 * mem-break.cc (bp_size)
2436 (bp_opcode)
2437 (insert_memory_breakpoint)
2438 (set_raw_breakpoint_at)
2439 (delete_raw_breakpoint)
2440 (z_type_supported)
2441 (uninsert_raw_breakpoint)
2442 (reinsert_raw_breakpoint)
2443 (validate_inserted_breakpoint)
2444 * regcache.cc (regcache_read_pc)
2445 (regcache_write_pc)
2446 * remote-utils.cc (putpkt_binary_1)
2447 (input_interrupt)
2448 (getpkt)
2449 (prepare_resume_reply)
2450 * server.cc (handle_general_set)
2451 (handle_detach)
2452 (handle_qxfer_auxv)
2453 (handle_qxfer_exec_file)
2454 (handle_qxfer_libraries_svr4)
2455 (handle_qxfer_osdata)
2456 (handle_qxfer_siginfo)
2457 (handle_qxfer_fdpic)
2458 (handle_query)
2459 (resume)
2460 (handle_v_requests)
2461 (queue_stop_reply_callback)
2462 (captured_main)
2463 * target.cc (prepare_to_access_memory)
2464 (done_accessing_memory)
2465 (read_inferior_memory)
2466 (target_write_memory)
2467 (target_stop_and_wait)
2468 (target_wait)
2469 (target_mourn_inferior)
2470 (target_continue_no_signal)
2471 (target_continue)
2472 (target_supports_multi_process)
2473 (kill_inferior)
2474 * target.h
2475 (target_create_inferior)
2476 (target_post_create_inferior)
2477 (myattach)
2478 (target_supports_fork_events)
2479 (target_supports_vfork_events)
2480 (target_supports_exec_events)
2481 (target_handle_new_gdb_connection)
2482 (detach_inferior)
2483 (mythread_alive)
2484 (fetch_inferior_registers)
2485 (store_inferior_registers)
2486 (join_inferior)
2487 (target_supports_non_stop)
2488 (target_async)
2489 (target_process_qsupported)
2490 (target_supports_catch_syscall)
2491 (target_get_ipa_tdesc_idx)
2492 (target_supports_tracepoints)
2493 (target_supports_fast_tracepoints)
2494 (target_get_min_fast_tracepoint_insn_len)
2495 (target_thread_stopped)
2496 (target_pause_all)
2497 (target_unpause_all)
2498 (target_stabilize_threads)
2499 (target_install_fast_tracepoint_jump_pad)
2500 (target_emit_ops)
2501 (target_supports_disable_randomization)
2502 (target_supports_agent)
2503 (target_enable_btrace)
2504 (target_disable_btrace)
2505 (target_read_btrace)
2506 (target_read_btrace_conf)
2507 (target_supports_range_stepping)
2508 (target_supports_stopped_by_sw_breakpoint)
2509 (target_stopped_by_sw_breakpoint)
2510 (target_supports_stopped_by_hw_breakpoint)
2511 (target_supports_hardware_single_step)
2512 (target_stopped_by_hw_breakpoint)
2513 (target_breakpoint_kind_from_pc)
2514 (target_breakpoint_kind_from_current_state)
2515 (target_supports_software_single_step)
2516 (target_core_of_thread)
2517 (target_thread_name)
2518 (target_thread_handle)
2519 * win32-low.cc (do_initial_child_stuff)
2520
2521 Rename target op default definitions listed below.
2522
2523 * target.cc (process_target::post_create_inferior): Rename as ...
2524 (process_stratum_target::post_create_inferior): ... this.
2525 (process_target::prepare_to_access_memory): Rename as ...
2526 (process_stratum_target::prepare_to_access_memory): ... this.
2527 (process_target::done_accessing_memory): Rename as ...
2528 (process_stratum_target::done_accessing_memory): ... this.
2529 (process_target::look_up_symbols): Rename as ...
2530 (process_stratum_target::look_up_symbols): ... this.
2531 (process_target::supports_read_auxv): Rename as ...
2532 (process_stratum_target::supports_read_auxv): ... this.
2533 (process_target::read_auxv): Rename as ...
2534 (process_stratum_target::read_auxv): ... this.
2535 (process_target::supports_z_point_type): Rename as ...
2536 (process_stratum_target::supports_z_point_type): ... this.
2537 (process_target::insert_point): Rename as ...
2538 (process_stratum_target::insert_point): ... this.
2539 (process_target::remove_point): Rename as ...
2540 (process_stratum_target::remove_point): ... this.
2541 (process_target::stopped_by_sw_breakpoint): Rename as ...
2542 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2543 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2544 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2545 (process_target::stopped_by_hw_breakpoint): Rename as ...
2546 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2547 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2548 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2549 (process_target::supports_hardware_single_step): Rename as ...
2550 (process_stratum_target::supports_hardware_single_step): ... this.
2551 (process_target::stopped_by_watchpoint): Rename as ...
2552 (process_stratum_target::stopped_by_watchpoint): ... this.
2553 (process_target::stopped_data_address): Rename as ...
2554 (process_stratum_target::stopped_data_address): ... this.
2555 (process_target::supports_read_offsets): Rename as ...
2556 (process_stratum_target::supports_read_offsets): ... this.
2557 (process_target::read_offsets): Rename as ...
2558 (process_stratum_target::read_offsets): ... this.
2559 (process_target::supports_get_tls_address): Rename as ...
2560 (process_stratum_target::supports_get_tls_address): ... this.
2561 (process_target::get_tls_address): Rename as ...
2562 (process_stratum_target::get_tls_address): ... this.
2563 (process_target::hostio_last_error): Rename as ...
2564 (process_stratum_target::hostio_last_error): ... this.
2565 (process_target::supports_qxfer_osdata): Rename as ...
2566 (process_stratum_target::supports_qxfer_osdata): ... this.
2567 (process_target::qxfer_osdata): Rename as ...
2568 (process_stratum_target::qxfer_osdata): ... this.
2569 (process_target::supports_qxfer_siginfo): Rename as ...
2570 (process_stratum_target::supports_qxfer_siginfo): ... this.
2571 (process_target::qxfer_siginfo): Rename as ...
2572 (process_stratum_target::qxfer_siginfo): ... this.
2573 (process_target::supports_non_stop): Rename as ...
2574 (process_stratum_target::supports_non_stop): ... this.
2575 (process_target::async): Rename as ...
2576 (process_stratum_target::async): ... this.
2577 (process_target::start_non_stop): Rename as ...
2578 (process_stratum_target::start_non_stop): ... this.
2579 (process_target::supports_multi_process): Rename as ...
2580 (process_stratum_target::supports_multi_process): ... this.
2581 (process_target::supports_fork_events): Rename as ...
2582 (process_stratum_target::supports_fork_events): ... this.
2583 (process_target::supports_vfork_events): Rename as ...
2584 (process_stratum_target::supports_vfork_events): ... this.
2585 (process_target::supports_exec_events): Rename as ...
2586 (process_stratum_target::supports_exec_events): ... this.
2587 (process_target::handle_new_gdb_connection): Rename as ...
2588 (process_stratum_target::handle_new_gdb_connection): ... this.
2589 (process_target::handle_monitor_command): Rename as ...
2590 (process_stratum_target::handle_monitor_command): ... this.
2591 (process_target::core_of_thread): Rename as ...
2592 (process_stratum_target::core_of_thread): ... this.
2593 (process_target::supports_read_loadmap): Rename as ...
2594 (process_stratum_target::supports_read_loadmap): ... this.
2595 (process_target::read_loadmap): Rename as ...
2596 (process_stratum_target::read_loadmap): ... this.
2597 (process_target::process_qsupported): Rename as ...
2598 (process_stratum_target::process_qsupported): ... this.
2599 (process_target::supports_tracepoints): Rename as ...
2600 (process_stratum_target::supports_tracepoints): ... this.
2601 (process_target::read_pc): Rename as ...
2602 (process_stratum_target::read_pc): ... this.
2603 (process_target::write_pc): Rename as ...
2604 (process_stratum_target::write_pc): ... this.
2605 (process_target::supports_thread_stopped): Rename as ...
2606 (process_stratum_target::supports_thread_stopped): ... this.
2607 (process_target::thread_stopped): Rename as ...
2608 (process_stratum_target::thread_stopped): ... this.
2609 (process_target::supports_get_tib_address): Rename as ...
2610 (process_stratum_target::supports_get_tib_address): ... this.
2611 (process_target::get_tib_address): Rename as ...
2612 (process_stratum_target::get_tib_address): ... this.
2613 (process_target::pause_all): Rename as ...
2614 (process_stratum_target::pause_all): ... this.
2615 (process_target::unpause_all): Rename as ...
2616 (process_stratum_target::unpause_all): ... this.
2617 (process_target::stabilize_threads): Rename as ...
2618 (process_stratum_target::stabilize_threads): ... this.
2619 (process_target::supports_fast_tracepoints): Rename as ...
2620 (process_stratum_target::supports_fast_tracepoints): ... this.
2621 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2622 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2623 (process_target::emit_ops): Rename as ...
2624 (process_stratum_target::emit_ops): ... this.
2625 (process_target::supports_disable_randomization): Rename as ...
2626 (process_stratum_target::supports_disable_randomization): ... this.
2627 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2628 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2629 (process_target::qxfer_libraries_svr4): Rename as ...
2630 (process_stratum_target::qxfer_libraries_svr4): ... this.
2631 (process_target::supports_agent): Rename as ...
2632 (process_stratum_target::supports_agent): ... this.
2633 (process_target::enable_btrace): Rename as ...
2634 (process_stratum_target::enable_btrace): ... this.
2635 (process_target::disable_btrace): Rename as ...
2636 (process_stratum_target::disable_btrace): ... this.
2637 (process_target::read_btrace): Rename as ...
2638 (process_stratum_target::read_btrace): ... this.
2639 (process_target::read_btrace_conf): Rename as ...
2640 (process_stratum_target::read_btrace_conf): ... this.
2641 (process_target::supports_range_stepping): Rename as ...
2642 (process_stratum_target::supports_range_stepping): ... this.
2643 (process_target::supports_pid_to_exec_file): Rename as ...
2644 (process_stratum_target::supports_pid_to_exec_file): ... this.
2645 (process_target::pid_to_exec_file): Rename as ...
2646 (process_stratum_target::pid_to_exec_file): ... this.
2647 (process_target::supports_multifs): Rename as ...
2648 (process_stratum_target::supports_multifs): ... this.
2649 (process_target::multifs_open): Rename as ...
2650 (process_stratum_target::multifs_open): ... this.
2651 (process_target::multifs_unlink): Rename as ...
2652 (process_stratum_target::multifs_unlink): ... this.
2653 (process_target::multifs_readlink): Rename as ...
2654 (process_stratum_target::multifs_readlink): ... this.
2655 (process_target::breakpoint_kind_from_pc): Rename as ...
2656 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2657 (process_target::breakpoint_kind_from_current_state): Rename as ...
2658 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2659 (process_target::thread_name): Rename as ...
2660 (process_stratum_target::thread_name): ... this.
2661 (process_target::thread_handle): Rename as ...
2662 (process_stratum_target::thread_handle): ... this.
2663 (process_target::supports_software_single_step): Rename as ...
2664 (process_stratum_target::supports_software_single_step): ... this.
2665 (process_target::supports_catch_syscall): Rename as ...
2666 (process_stratum_target::supports_catch_syscall): ... this.
2667 (process_target::get_ipa_tdesc_idx): Rename as ...
2668 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2669
478f9adf
PA
26702020-02-20 Pedro Alves <palves@redhat.com>
2671
2672 * target.cc (set_target_ops): Simply copy the given target pointer
2673 instead of creating a copy of the pointed object.
2674
d633e831
TBA
26752020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2676
2677 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2678 of process_target.
2679
2680 * target.h (struct process_stratum_target): Remove the target op.
2681 (class process_target): Add the target op.
2682 (target_get_ipa_tdesc_idx): Update the macro.
2683 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2684
2685 Update the derived classes and callers below.
2686
2687 * linux-low.cc (linux_target_ops): Update.
2688 (linux_get_ipa_tdesc_idx): Turn into ...
2689 (linux_process_target::get_ipa_tdesc_idx): ... this.
2690 * linux-low.h (class linux_process_target): Update.
2691 * lynx-low.cc (lynx_target_ops): Update.
2692 * nto-low.cc (nto_target_ops): Update.
2693 * win32-low.cc (win32_target_ops): Update.
2694
bc8d3ae4
TBA
26952020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2696
2697 Turn process_stratum_target's supports_catch_syscall op into a
2698 method of process_target.
2699
2700 * target.h (struct process_stratum_target): Remove the target op.
2701 (class process_target): Add the target op.
2702 (target_supports_catch_syscall): Update the macro.
2703 * target.cc (process_target::supports_catch_syscall): Define.
2704
2705 Update the derived classes and callers below.
2706
2707 * linux-low.cc (linux_target_ops): Update.
2708 (linux_supports_catch_syscall): Turn into ...
2709 (linux_process_target::supports_catch_syscall): ... this.
2710 * linux-low.h (class linux_process_target): Update.
2711 * lynx-low.cc (lynx_target_ops): Update.
2712 * nto-low.cc (nto_target_ops): Update.
2713 * win32-low.cc (win32_target_ops): Update.
2714
5303a34f
TBA
27152020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2716
2717 Turn process_stratum_target's supports_software_single_step op
2718 into a method of process_target.
2719
2720 * target.h (struct process_stratum_target): Remove the target op.
2721 (class process_target): Add the target op.
2722 (target_supports_software_single_step): Update the macro.
2723 * target.cc (process_target::supports_software_single_step): Define.
2724
2725 Update the derived classes and callers below.
2726
2727 * linux-low.cc (linux_target_ops): Update.
2728 (linux_supports_software_single_step): Turn into ...
2729 (linux_process_target::supports_software_single_step): ... this.
2730 * linux-low.h (class linux_process_target): Update.
2731 * lynx-low.cc (lynx_target_ops): Update.
2732 * nto-low.cc (nto_target_ops): Update.
2733 * win32-low.cc (win32_target_ops): Update.
2734
7f63b89b
TBA
27352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2736
2737 Turn process_stratum_target's thread_name and thread_handle ops
2738 into methods of process_target.
2739
2740 * target.h (struct process_stratum_target): Remove the target ops.
2741 (class process_target): Add the target ops.
2742 (target_thread_name): Update the macro.
2743 (target_thread_handle): Update the macro.
2744 * target.cc (process_target::thread_name): Define.
2745 (process_target::thread_handle): Define.
2746
2747 Update the derived classes and callers below.
2748
2749 * linux-low.cc (linux_target_ops): Update.
2750 (linux_process_target::thread_name): Define.
2751 (linux_process_target::thread_handle): Define.
2752 * linux-low.h (class linux_process_target): Update.
2753 * lynx-low.cc (lynx_target_ops): Update.
2754 * nto-low.cc (nto_target_ops): Update.
2755 * win32-low.cc (win32_target_ops): Update.
2756
d367006f
TBA
27572020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2758
2759 Turn process_stratum_target's breakpoint_kind_from_pc,
2760 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2761 ops into methods of process_target.
2762
2763 * target.h (struct process_stratum_target): Remove the target op.
2764 (class process_target): Add the target op.
2765 (target_breakpoint_kind_from_pc): Update the macro.
2766 (target_breakpoint_kind_from_current_state): Update the macro.
2767 (default_breakpoint_kind_from_pc): Remove declaration.
2768 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2769 (process_target::breakpoint_kind_from_pc): ... this.
2770 (process_target::breakpoint_kind_from_current_state): Define.
2771
2772 Update the derived classes and callers below.
2773
2774 * mem-break.cc (bp_size): Update.
2775 (bp_opcode): Update.
2776 * linux-low.cc (linux_target_ops): Update.
2777 (linux_wait_1): Update.
2778 (linux_breakpoint_kind_from_pc): Turn into ...
2779 (linux_process_target::breakpoint_kind_from_pc): ... this.
2780 (linux_sw_breakpoint_from_kind): Turn into ...
2781 (linux_process_target::sw_breakpoint_from_kind): ... this.
2782 (linux_breakpoint_kind_from_current_state): Turn into ...
2783 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2784 * linux-low.h (class linux_process_target): Update.
2785 * lynx-low.cc (lynx_target_ops): Update.
2786 (lynx_process_target::sw_breakpoint_from_kind): Define.
2787 * lynx-low.h (class lynx_process_target): Update.
2788 * nto-low.cc (nto_target_ops): Update.
2789 (nto_sw_breakpoint_from_kind): Turn into ...
2790 (nto_process_target::sw_breakpoint_from_kind): ... this.
2791 * nto-low.h (class nto_process_target): Update.
2792 * win32-low.cc (win32_target_ops): Update.
2793 (win32_sw_breakpoint_from_kind): Turn into ...
2794 (win32_process_target::sw_breakpoint_from_kind): ... this.
2795 * win32-low.h (class win32_process_target): Update.
2796
c9b7b804
TBA
27972020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2798
2799 Turn process_stratum_target's multifs_open, multifs_readlink,
2800 multifs_unlink ops into methods of process_target.
2801
2802 * target.h (struct process_stratum_target): Remove the target ops.
2803 (class process_target): Add the target ops. Also add
2804 'supports_multifs'.
2805 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2806 "sys/stat.h".
2807 (process_target::supports_multifs): Define.
2808 (process_target::multifs_open): Define.
2809 (process_target::multifs_readlink): Define.
2810 (process_target::multifs_unlink): Define.
2811
2812 Update the derived classes and callers below.
2813
2814 * hostio.cc (handle_setfs): Update.
2815 (handle_open): Update.
2816 (handle_unlink): Update.
2817 (handle_readlink): Update.
2818 * linux-low.cc (linux_target_ops): Update.
2819 (linux_process_target::supports_multifs): Define.
2820 (linux_process_target::multifs_open): Define.
2821 (linux_process_target::multifs_readlink): Define.
2822 (linux_process_target::multifs_unlink): Define.
2823 * linux-low.h (class linux_process_target): Update.
2824 * lynx-low.cc (lynx_target_ops): Update.
2825 * nto-low.cc (nto_target_ops): Update.
2826 * win32-low.cc (win32_target_ops): Update.
2827
8247b823
TBA
28282020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2829
2830 Turn process_stratum_target's pid_to_exec_file op into a method
2831 of process_target.
2832
2833 * target.h (struct process_stratum_target): Remove the target op.
2834 (class process_target): Add the target op. Also add
2835 'supports_pid_to_exec_file'.
2836 * target.cc (process_target::pid_to_exec_file): Define.
2837 (process_target::supports_pid_to_exec_file): Define.
2838
2839 Update the derived classes and callers below.
2840
2841 * server.cc (handle_qxfer_exec_file): Update.
2842 (handle_query): Update.
2843 * linux-low.cc (linux_target_ops): Update.
2844 (linux_process_target::supports_pid_to_exec_file): Define.
2845 (linux_process_target::pid_to_exec_file): Define.
2846 * linux-low.h (class linux_process_target): Update.
2847 * lynx-low.cc (lynx_target_ops): Update.
2848 * nto-low.cc (nto_target_ops): Update.
2849 * win32-low.cc (win32_target_ops): Update.
2850
2526e0cd
TBA
28512020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2852
2853 Turn process_stratum_target's supports_range_stepping op into a
2854 method of process_target.
2855
2856 * target.h (struct process_stratum_target): Remove the target op.
2857 (class process_target): Add the target op.
2858 (target_supports_range_stepping): Update the macro.
2859 * target.cc (process_target::supports_range_stepping): Define.
2860
2861 Update the derived classes and callers below.
2862
2863 * linux-low.cc (linux_target_ops): Update.
2864 (linux_supports_range_stepping): Turn into ...
2865 (linux_process_target::supports_range_stepping): ... this.
2866 * linux-low.h (class linux_process_target): Update.
2867 * lynx-low.cc (lynx_target_ops): Update.
2868 * nto-low.cc (nto_target_ops): Update.
2869 * win32-low.cc (win32_target_ops): Update.
2870
79597bdd
TBA
28712020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2872
2873 Turn process_stratum_target's btrace-related ops (enable_btrace,
2874 disable_btrace, read_btrace, read_btrace_conf) into methods of
2875 process_target.
2876
2877 * target.h (struct process_stratum_target): Remove the target ops.
2878 (class process_target): Add the target ops.
2879 (target_enable_btrace): Update.
2880 (target_disable_btrace): Update.
2881 (target_read_btrace): Update.
2882 (target_read_btrace_conf): Update.
2883 * target.cc (process_target::enable_btrace): Define.
2884 (process_target::disable_btrace): Define.
2885 (process_target::read_btrace): Define.
2886 (process_target::read_btrace_conf): Define.
2887
2888 Update the derived classes and callers below.
2889
2890 * linux-low.cc (linux_target_ops): Update.
2891 (linux_process_target:enable_btrace): Define as a wrapper around
2892 linux_enable_btrace.
2893 (linux_low_disable_btrace): Turn into ...
2894 (linux_process_target::disable_btrace): ... this.
2895 (linux_low_read_btrace): Turn into ...
2896 (linux_process_target::read_btrace): ... this.
2897 (linux_low_btrace_conf): Turn into ...
2898 (linux_process_target::read_btrace_conf): ... this.
2899 * linux-low.h (class linux_process_target): Update.
2900 * lynx-low.cc (lynx_target_ops): Update.
2901 * nto-low.cc (nto_target_ops): Update.
2902 * win32-low.cc (win32_target_ops): Update.
2903
c0245cb9
TBA
29042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2905
2906 Turn process_stratum_target's supports_agent op into a method of
2907 process_target.
2908
2909 * target.h (struct process_stratum_target): Remove the target op.
2910 (class process_target): Add the target op.
2911 (target_supports_agent): Update the macro.
2912 * target.cc (process_target::supports_agent): Define.
2913
2914 Update the derived classes and callers below.
2915
2916 * linux-low.cc (linux_target_ops): Update.
2917 (linux_supports_agent): Turn into ...
2918 (linux_process_target::supports_agent): ... this.
2919 * linux-low.h (class linux_process_target): Update.
2920 * lynx-low.cc (lynx_target_ops): Update.
2921 * nto-low.cc (nto_target_ops): Update.
2922 * win32-low.cc (win32_target_ops): Update.
2923
974387bb
TBA
29242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2925
2926 Turn process_stratum_target's qxfer_libraries_svr4 op into a
2927 method of process_target.
2928
2929 * target.h (struct process_stratum_target): Remove the target op.
2930 (class process_target): Add the target op. Also add
2931 'supports_qxfer_libraries_svr4'.
2932 * target.cc (process_target::qxfer_libraries_svr4): Define.
2933 (process_target::supports_qxfer_libraries_svr4): Define.
2934
2935 Update the derived classes and callers below.
2936
2937 * server.cc (handle_qxfer_libraries_svr4): Update.
2938 (handle_query): Update.
2939 * linux-low.cc (linux_target_ops): Update.
2940 (linux_process_target::supports_qxfer_libraries_svr4): Define.
2941 (linux_qxfer_libraries_svr4): Turn into ...
2942 (linux_process_target::qxfer_libraries_svr4): ... this.
2943 * linux-low.h (class linux_process_target): Update.
2944 * lynx-low.cc (lynx_target_ops): Update.
2945 * nto-low.cc (nto_target_ops): Update.
2946 * win32-low.cc (win32_target_ops): Update.
2947
c756403b
TBA
29482020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2949
2950 Turn process_stratum_target's supports_disable_randomization op
2951 into a method of process_target.
2952
2953 * target.h (struct process_stratum_target): Remove the target op.
2954 (class process_target): Add the target op.
2955 (target_supports_disable_randomization): Update the macro.
2956 * target.cc (process_target::supports_disable_randomization): Define.
2957
2958 Update the derived classes and callers below.
2959
2960 * linux-low.cc (linux_target_ops): Update.
2961 (linux_supports_disable_randomization): Turn into ...
2962 (linux_process_target::supports_disable_randomization): ... this.
2963 * linux-low.h (class linux_process_target): Update.
2964 * lynx-low.cc (lynx_target_ops): Update.
2965 * nto-low.cc (nto_target_ops): Update.
2966 * win32-low.cc (win32_target_ops): Update.
2967
345dafad
TBA
29682020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2969
2970 Turn process_stratum_target's emit_ops op into a method of
2971 process_target.
2972
2973 * target.h (struct process_stratum_target): Remove the target op.
2974 (class process_target): Add the target op.
2975 (target_emit_ops): Update the macro.
2976 * target.cc (process_target::emit_ops): Define.
2977
2978 Update the derived classes and callers below.
2979
2980 * linux-low.cc (linux_target_ops): Update.
2981 (linux_emit_ops): Turn into ...
2982 (linux_process_target::emit_ops): ... this.
2983 * linux-low.h (class linux_process_target): Update.
2984 * lynx-low.cc (lynx_target_ops): Update.
2985 * nto-low.cc (nto_target_ops): Update.
2986 * win32-low.cc (win32_target_ops): Update.
2987
c23c9391
TBA
29882020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2989
2990 Turn process_stratum_target's install_fast_tracepoint_jump_pad
2991 and get_min_fast_tracepoint_insn_len ops into methods of
2992 process_target.
2993
2994 * target.h (struct process_stratum_target): Remove the target ops.
2995 (class process_target): Add the target ops. Also add
2996 'supports_fast_tracepoints'.
2997 (target_supports_fast_tracepoints): Update the macro.
2998 (target_get_min_fast_tracepoint_insn_len): Update the macro.
2999 (install_fast_tracepoint_jump_pad): Update and rename the macro
3000 to ...
3001 (target_install_fast_tracepoint_jump_pad): ... this.
3002 * target.cc (process_target::supports_fast_tracepoints): Define.
3003 (process_target::install_fast_tracepoint_jump_pad): Define.
3004 (process_target::get_min_fast_tracepoint_insn_len): Define.
3005
3006 Update the derived classes and callers below.
3007
3008 * tracepoint.cc (install_fast_tracepoint): Update.
3009 * linux-low.cc (linux_target_ops): Update.
3010 (linux_process_target::supports_fast_tracepoints): Define.
3011 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3012 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3013 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3014 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3015 * linux-low.h (class linux_process_target): Update.
3016 * lynx-low.cc (lynx_target_ops): Update.
3017 * nto-low.cc (nto_target_ops): Update.
3018 * win32-low.cc (win32_target_ops): Update.
3019
5c9eb2f2
TBA
30202020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3021
3022 Turn process_stratum_target's stabilize_threads op into a
3023 method of process_target.
3024
3025 * target.h (struct process_stratum_target): Remove the target op.
3026 (class process_target): Add the target op.
3027 (target_stabilize_threads): Update the macro.
3028 * target.cc (process_target::stabilize_threads): Define.
3029
3030 Update the derived classes and callers below.
3031
3032 * server.cc (handle_status): Update.
3033 * tracepoint.cc (cmd_qtdp): Update.
3034 (cmd_qtstart): Update.
3035 * linux-low.cc (linux_target_ops): Update.
3036 (linux_stabilize_threads): Turn into ...
3037 (linux_process_target::stabilize_threads): ... this.
3038 (linux_wait_1): Update.
3039 * linux-low.h (class linux_process_target): Update.
3040 * lynx-low.cc (lynx_target_ops): Update.
3041 * nto-low.cc (nto_target_ops): Update.
3042 * win32-low.cc (win32_target_ops): Update.
3043
29e8dc09
TBA
30442020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3045
3046 Turn process_stratum_target's pause_all and unpause_all ops
3047 into methods of process_target.
3048
3049 * target.h (struct process_stratum_target): Remove the target ops.
3050 (class process_target): Add the target ops.
3051 (pause_all): Update the macro and rename to...
3052 (target_pause_all): ... this.
3053 (unpause_all): Update the macro and rename to...
3054 (target_unpause_all): ... this.
3055 * target.cc (process_target::pause_all): Define.
3056 (process_target::unpause_all): Define.
3057
3058 Update the derived classes and callers below.
3059
3060 * server.cc (handle_status): Update.
3061 * tracepoint.cc (clear_installed_tracepoints): Update.
3062 (cmd_qtdp): Update.
3063 (cmd_qtstart): Update.
3064 (stop_tracing): Update.
3065 (cmd_qtstatus): Update.
3066 (upload_fast_traceframes): Update.
3067 (run_inferior_command): Update.
3068 * linux-low.cc (linux_target_ops): Update.
3069 (linux_pause_all): Turn into ...
3070 (linux_process_target::pause_all): ... this.
3071 (linux_unpause_all): Turn into ...
3072 (linux_process_target::unpause_all): ... this.
3073 (linux_process_target::prepare_to_access_memory): Update.
3074 (linux_process_target::done_accessing_memory): Update.
3075 * linux-low.h (class linux_process_target): Update.
3076 * lynx-low.cc (lynx_target_ops): Update.
3077 * nto-low.cc (nto_target_ops): Update.
3078 * win32-low.cc (win32_target_ops): Update.
3079
4e2e869c
TBA
30802020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3081
3082 Turn process_stratum_target's get_tib_address op into a method of
3083 process_target.
3084
3085 * target.h (struct process_stratum_target): Remove the target op.
3086 (class process_target): Add the target op. Also add
3087 'supports_get_tib_address'.
3088 * target.cc (process_target::get_tib_address): Define.
3089 (process_target::supports_get_tib_address): Define.
3090
3091 Update the derived classes and callers below.
3092
3093 * server.cc (handle_query): Update.
3094 * linux-low.cc (win32_target_ops): Update.
3095 * lynx-low.cc (lynx_target_ops): Update.
3096 * nto-low.cc (nto_target_ops): Update.
3097 * win32-low.cc (win32_target_ops): Update.
3098 (win32_process_target::supports_get_tib_address): Define.
3099 (win32_get_tib_address): Turn into ...
3100 (win32_process_target::get_tib_address): ... this.
3101 * win32-low.h (class win32_process_target): Update.
3102
68119632
TBA
31032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3104
3105 Turn process_stratum_target's thread_stopped op into a method of
3106 process_target.
3107
3108 * target.h (struct process_stratum_target): Remove the target op.
3109 (class process_target): Add the target op. Also add
3110 'supports_thread_stopped'.
3111 (target_thread_stopped): Update the macro.
3112 * target.cc (process_target::thread_stopped): Define.
3113 (process_target::supports_thread_stopped): Define.
3114 (prepare_to_access_memory): Update.
3115
3116 Update the derived classes and callers below.
3117
3118 * server.cc (queue_stop_reply_callback): Update.
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_process_target::supports_thread_stopped): Define.
3121 (linux_thread_stopped): Turn into ...
3122 (linux_process_target::thread_stopped): ... this.
3123 * linux-low.h (class linux_process_target): Update.
3124 * lynx-low.cc (lynx_target_ops): Update.
3125 * nto-low.cc (nto_target_ops): Update.
3126 * win32-low.cc (win32_target_ops): Update.
3127
770d8f6a
TBA
31282020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3129
3130 Turn process_stratum_target's read_pc and write_pc ops into
3131 methods of process_target.
3132
3133 * target.h (struct process_stratum_target): Remove the target ops.
3134 (class process_target): Add the target ops.
3135 * target.cc (process_target::read_pc): Define.
3136 (process_target::write_pc): Define.
3137
3138 Update the derived classes and callers below.
3139
3140 * regcache.cc (regcache_read_pc): Update.
3141 (regcache_write_pc): Update.
3142 * linux-low.cc (linux_target_ops): Update.
3143 (linux_read_pc): Turn into ...
3144 (linux_process_target::read_pc): ... this.
3145 (linux_write_pc): Turn into ...
3146 (linux_process_target::write_pc): ... this.
3147 * linux-low.h (class linux_process_target): Update.
3148 * lynx-low.cc (lynx_target_ops): Update.
3149 * nto-low.cc (nto_target_ops): Update.
3150 * win32-low.cc (win32_target_ops): Update.
3151
290732bf
TBA
31522020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3153
3154 Turn process_stratum_target's supports_tracepoints op into a
3155 method of process_target.
3156
3157 * target.h (struct process_stratum_target): Remove the target op.
3158 (class process_target): Add the target op.
3159 (target_supports_tracepoints): Update the macro.
3160 * target.cc (process_target::supports_tracepoints): Define.
3161
3162 Update the derived classes and callers below.
3163
3164 * linux-low.cc (linux_target_ops): Update.
3165 (linux_supports_tracepoints): Turn into ...
3166 (linux_process_target::supports_tracepoints): ... this.
3167 * linux-low.h (class linux_process_target): Update.
3168 * lynx-low.cc (lynx_target_ops): Update.
3169 * nto-low.cc (nto_target_ops): Update.
3170 * win32-low.cc (win32_target_ops): Update.
3171
0df28b1b
TBA
31722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3173
3174 Turn process_stratum_target's process_qsupported op into a method
3175 of process_target.
3176
3177 * target.h (struct process_stratum_target): Remove the target op.
3178 (class process_target): Add the target op.
3179 (target_process_qsupported): Update the macro.
3180 * target.cc (process_target::process_qsupported): Define.
3181
3182 Update the derived classes and callers below.
3183
3184 * linux-low.cc (linux_target_ops): Update.
3185 (linux_process_qsupported): Turn into ...
3186 (linux_process_target::process_qsupported): ... this.
3187 * linux-low.h (class linux_process_target): Update.
3188 * lynx-low.cc (lynx_target_ops): Update.
3189 * nto-low.cc (nto_target_ops): Update.
3190 * win32-low.cc (win32_target_ops): Update.
3191
9da41fda
TBA
31922020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3193
3194 Turn process_stratum_target's read_loadmap op into a method of
3195 process_target.
3196
3197 * target.h (struct process_stratum_target): Remove the target op.
3198 (class process_target): Add the target op. Also add
3199 'supports_read_loadmap'.
3200 * target.cc (process_target::read_loadmap): Define.
3201 (process_target::supports_read_loadmap): Define.
3202
3203 Update the derived classes and callers below.
3204
3205 * server.cc (handle_qxfer_fdpic): Update.
3206 (handle_query): Update.
3207 * linux-low.cc (linux_target_ops): Update.
3208 (linux_process_target::supports_read_loadmap): Define.
3209 (linux_read_loadmap): Turn into ...
3210 (linux_process_target::read_loadmap): ... this.
3211 * linux-low.h (class linux_process_target): Update.
3212 * lynx-low.cc (lynx_target_ops): Update.
3213 * nto-low.cc (nto_target_ops): Update.
3214 * win32-low.cc (win32_target_ops): Update.
3215
95a45fc1
TBA
32162020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3217
3218 Turn process_stratum_target's core_of_thread op into a method of
3219 process_target.
3220
3221 * target.h (struct process_stratum_target): Remove the target op.
3222 (class process_target): Add the target op.
3223 (target_core_of_thread): Update the macro.
3224 * target.cc (process_target::core_of_thread): Define.
3225
3226 Update the derived classes and callers below.
3227
3228 * linux-low.cc (linux_target_ops): Update.
3229 (linux_process_target::core_of_thread): Define.
3230 * linux-low.h (class linux_process_target): Update.
3231 * lynx-low.cc (lynx_target_ops): Update.
3232 * nto-low.cc (nto_target_ops): Update.
3233 * win32-low.cc (win32_target_ops): Update.
3234
55cf3021
TBA
32352020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3236
3237 Turn process_stratum_target's handle_monitor_command op into a
3238 method of process_target.
3239
3240 * target.h (struct process_stratum_target): Remove the target op.
3241 (class process_target): Add the target op.
3242 (target_handle_monitor_command): Update the macro.
3243 * target.cc (process_target::handle_monitor_command): Define.
3244
3245 Update the derived classes and callers below.
3246
3247 * server.cc (handle_query): Update.
3248 * linux-low.cc (linux_target_ops): Update.
3249 (linux_process_target::handle_monitor_command): Define.
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
fb00dfce
TBA
32552020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3256
3257 Turn process_stratum_target's handle_new_gdb_connection op into a
3258 method of process_target.
3259
3260 * target.h (struct process_stratum_target): Remove the target op.
3261 (class process_target): Add the target op.
3262 (target_handle_new_gdb_connection): Update the macro.
3263 * target.cc (process_target::handle_new_gdb_connection): Define.
3264
3265 Update the derived classes and callers below.
3266
3267 * linux-low.cc (linux_target_ops): Update.
3268 (linux_handle_new_gdb_connection): Turn into ...
3269 (linux_process_target::handle_new_gdb_connection): ... this.
3270 * linux-low.h (class linux_process_target): Update.
3271 * lynx-low.cc (lynx_target_ops): Update.
3272 * nto-low.cc (nto_target_ops): Update.
3273 * win32-low.cc (win32_target_ops): Update.
3274
9690a72a
TBA
32752020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3276
3277 Turn process_stratum_target's supports_fork_events,
3278 supports_vfork_events, and supports_exec_events ops into methods
3279 of process_target.
3280
3281 * target.h (struct process_stratum_target): Remove the target ops.
3282 (class process_target): Add the target ops.
3283 (target_supports_fork_events): Update the macro.
3284 (target_supports_vfork_events): Update the macro.
3285 (target_supports_exec_events): Update the macro.
3286 * target.cc (process_target::supports_fork_events): Define.
3287 (process_target::supports_vfork_events): Define.
3288 (process_target::supports_exec_events): Define.
3289
3290 Update the derived classes and callers below.
3291
3292 * linux-low.cc (linux_target_ops): Update.
3293 (linux_supports_fork_events): Turn into ...
3294 (linux_process_target::supports_fork_events): ... this.
3295 (linux_supports_vfork_events): Turn into ...
3296 (linux_process_target::supports_vfork_events): ... this.
3297 (linux_supports_exec_events): Turn into ...
3298 (linux_process_target::supports_exec_events): ... this.
3299 * linux-low.h (class linux_process_target): Update.
3300 * lynx-low.cc (lynx_target_ops): Update.
3301 * nto-low.cc (nto_target_ops): Update.
3302 * win32-low.cc (win32_target_ops): Update.
3303
652aef77
TBA
33042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3305
3306 Turn process_stratum_target's supports_multi_process op into a
3307 method of process_target.
3308
3309 * target.h (struct process_stratum_target): Remove the target op.
3310 (class process_target): Add the target op.
3311 * target.cc (process_target::supports_multi_process): Define.
3312 (target_supports_multi_process): Update.
3313
3314 Update the derived classes and callers below.
3315
3316 * linux-low.cc (linux_target_ops): Update.
3317 (linux_supports_multi_process): Turn into ...
3318 (linux_process_target::supports_multi_process): ... this.
3319 * linux-low.h (class linux_process_target): Update.
3320 * lynx-low.cc (lynx_target_ops): Update.
3321 * nto-low.cc (nto_target_ops): Update.
3322 * win32-low.cc (win32_target_ops): Update.
3323
0dc587d4
TBA
33242020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3325
3326 Turn process_stratum_target's supports_non_stop, async, and
3327 start_non_stop ops into methods of process_target.
3328
3329 * target.h (struct process_stratum_target): Remove the target ops.
3330 (class process_target): Add the target ops.
3331 (target_supports_non_stop): Update the macro.
3332 (target_async): Update the macro.
3333 (start_non_stop): Remove declaration.
3334 * target.cc (process_target::supports_non_stop): Define.
3335 (process_target::async): Define.
3336 (process_target::start_non_stop): Define.
3337 (start_non_stop): Remove.
3338
3339 Update the derived classes and callers below.
3340
3341 * server.cc (handle_qxfer_siginfo): Update.
3342 (handle_query): Update.
3343 * linux-low.cc (linux_target_ops): Update.
3344 (linux_supports_non_stop): Turn into ...
3345 (linux_process_target::supports_non_stop): ... this.
3346 (linux_async): Turn into ...
3347 (linux_process_target::async): ... this.
3348 (linux_start_non_stop): Turn into ...
3349 (linux_process_target::start_non_stop): ... this.
3350 * linux-low.h (class linux_process_target): Update.
3351 * lynx-low.cc (lynx_target_ops): Update.
3352 * nto-low.cc (nto_target_ops): Update.
3353 (nto_supports_non_stop): Remove; rely on the default behavior
3354 instead.
3355 * win32-low.cc (win32_target_ops): Update.
3356
d7abedf7
TBA
33572020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3358
3359 Turn process_stratum_target's qxfer_siginfo op into a method of
3360 process_target.
3361
3362 * target.h (struct process_stratum_target): Remove the target op.
3363 (class process_target): Add the target op. Also add
3364 'supports_qxfer_siginfo'.
3365 * target.cc (process_target::qxfer_siginfo): Define.
3366 (process_target::supports_qxfer_siginfo): Define.
3367
3368 Update the derived classes and callers below.
3369
3370 * server.cc (handle_qxfer_siginfo): Update.
3371 (handle_query): Update.
3372 * linux-low.cc (linux_target_ops): Update.
3373 (linux_process_target::supports_qxfer_siginfo): Define.
3374 (linux_xfer_siginfo): Turn into ...
3375 (linux_process_target::qxfer_siginfo): ... this.
3376 * linux-low.h (class linux_process_target): Update.
3377 * lynx-low.cc (lynx_target_ops): Update.
3378 * nto-low.cc (nto_target_ops): Update.
3379 * win32-low.cc (win32_target_ops): Update.
3380
2d0795ee
TBA
33812020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3382
3383 Turn process_stratum_target's qxfer_osdata op into a method of
3384 process_target.
3385
3386 * target.h (struct process_stratum_target): Remove the target op.
3387 (class process_target): Add the target op. Also add
3388 'supports_qxfer_osdata'.
3389 * target.cc (process_target::qxfer_osdata): Define.
3390 (process_target::supports_qxfer_osdata): Define.
3391
3392 Update the derived classes and callers below.
3393
3394 * server.cc (handle_qxfer_osdata): Update.
3395 (handle_query): Update.
3396 * linux-low.cc (linux_target_ops): Update.
3397 (linux_process_target::supports_qxfer_osdata): Define.
3398 (linux_qxfer_osdata): Turn into ...
3399 (linux_process_target::qxfer_osdata): ... this.
3400 * linux-low.h (class linux_process_target): Update.
3401 * lynx-low.cc (lynx_target_ops): Update.
3402 * nto-low.cc (nto_target_ops): Update.
3403 * win32-low.cc (win32_target_ops): Update.
3404
ea06bbaa
TBA
34052020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3406
3407 Turn process_stratum_target's hostio_last_error op into a
3408 method of process_target.
3409
3410 * target.h (struct process_stratum_target): Remove the target op.
3411 (class process_target): Add the target op.
3412 * target.cc: Add "hostio.h" to includes.
3413 (process_target::hostio_last_error): Define.
3414
3415 Update the derived classes and callers below.
3416
3417 * hostio.cc (hostio_error): Update.
3418 * linux-low.cc: Remove "hostio.h" from includes.
3419 (linux_target_ops): Update.
3420 * lynx-low.cc (lynx_target_ops): Update.
3421 * nto-low.cc (nto_target_ops): Update.
3422 * win32-low.h (class win32_process_target): Update.
3423 * win32-low.cc (win32_target_ops): Update.
3424 (wince_hostio_last_error): Turn into ...
3425 (win32_process_target::hostio_last_error): ... this.
3426
6e3fd7e9
TBA
34272020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3428
3429 Turn process_stratum_target's get_tls_address op into a method of
3430 process_target.
3431
3432 * target.h (struct process_stratum_target): Remove the target op.
3433 (class process_target): Add the target op. Also add
3434 'supports_get_tls_address'.
3435 * target.cc (process_target::get_tls_address): Define.
3436 (process_target::supports_get_tls_address): Define.
3437
3438 Update the derived classes and callers below.
3439
3440 * server.cc (handle_query): Update.
3441 * linux-low.cc (linux_target_ops): Update.
3442 (linux_process_target::supports_get_tls_address): Define.
3443 (linux_process_target::get_tls_address): Define.
3444 * linux-low.h (class linux_process_target): Update.
3445 * lynx-low.cc (lynx_target_ops): Update.
3446 * nto-low.cc (nto_target_ops): Update.
3447 * win32-low.cc (win32_target_ops): Update.
3448
5203ae1e
TBA
34492020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3450
3451 Turn process_stratum_target's read_offsets op into a method of
3452 process_target.
3453
3454 * target.h (struct process_stratum_target): Remove the target op.
3455 (class process_target): Add the target op. Also add
3456 'supports_read_offsets'.
3457 * target.cc (process_target::read_offsets): Define.
3458 (process_target::supports_read_offsets): Define.
3459
3460 Update the derived classes and callers below.
3461
3462 * server.cc (handle_query): Update.
3463 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3464 (linux_target_ops): Update.
3465 (linux_process_target::supports_read_offsets): Define.
3466 (linux_read_offsets): Turn into ...
3467 (linux_process_target::read_offsets): ... this.
3468 * linux-low.h (class linux_process_target): Update.
3469 * lynx-low.cc (lynx_target_ops): Update.
3470 * nto-low.cc (nto_target_ops): Update.
3471 * win32-low.cc (win32_target_ops): Update.
3472
6eeb5c55
TBA
34732020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3474
3475 Turn process_stratum_target's stopped_by_watchpoint and
3476 stopped_data_address ops into methods of process_target.
3477
3478 * target.h (struct process_stratum_target): Remove the target ops.
3479 (class process_target): Add the target ops.
3480 * target.cc (process_target::stopped_by_watchpoint): Define.
3481 (process_target::stopped_data_address): Define.
3482
3483 Update the derived classes and callers below.
3484
3485 * remote-utils.cc (prepare_resume_reply): Update.
3486 * linux-low.cc (linux_target_ops): Update.
3487 (linux_stopped_by_watchpoint): Turn into ...
3488 (linux_process_target::stopped_by_watchpoint): ... this.
3489 (linux_stopped_data_address): Turn into ...
3490 (linux_process_target::stopped_data_address): ... this.
3491 * linux-low.h (class linux_process_target): Update.
3492 * lynx-low.cc (lynx_target_ops): Update.
3493 * nto-low.cc (nto_target_ops): Update.
3494 (nto_stopped_by_watchpoint): Turn into ...
3495 (nto_process_target::stopped_by_watchpoint): ... this.
3496 (nto_stopped_data_address): Turn into ...
3497 (nto_process_target::stopped_data_address): ... this.
3498 * nto-low.h (class nto_process_target): Update.
3499 * win32-low.cc (win32_target_ops): Update.
3500 (win32_stopped_by_watchpoint): Turn into ...
3501 (win32_process_target::stopped_by_watchpoint): ... this.
3502 (win32_stopped_data_address): Turn into ...
3503 (win32_process_target::stopped_data_address): ... this.
3504 * win32-low.h (class win32_process_target): Update.
3505
22aa6223
TBA
35062020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3507
3508 Turn process_stratum_target's supports_hardware_single_step op into
3509 a method of process_target.
3510
3511 * target.h (struct process_stratum_target): Remove the target op.
3512 (class process_target): Add the target op.
3513 (target_supports_hardware_single_step): Update the macro.
3514 (target_can_do_hardware_single_step): Remove declaration.
3515 * target.cc (process_target::supports_hardware_single_step): Define.
3516 (target_can_do_hardware_single_step): Remove.
3517
3518 Update the derived classes and callers below.
3519
3520 * linux-low.h (class linux_process_target): Update.
3521 * linux-low.cc (linux_target_ops): Update.
3522 (linux_supports_hardware_single_step): Turn into ...
3523 (linux_process_target::supports_hardware_single_step): ... this.
3524 * lynx-low.h (class lynx_process_target): Update.
3525 * lynx-low.cc (lynx_target_ops): Update.
3526 (lynx_process_target::supports_hardware_single_step): Define.
3527 * nto-low.h (class nto_process_target): Update.
3528 * nto-low.cc (nto_target_ops): Update.
3529 (nto_process_target::supports_hardware_single_step): Define.
3530 * win32-low.h (class win32_process_target): Update.
3531 * win32-low.cc (win32_target_ops): Update.
3532 (win32_process_target::supports_hardware_single_step): Define.
3533
93fe88b2
TBA
35342020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3535
3536 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3537 ops into methods of process_target.
3538
3539 * target.h (struct process_stratum_target): Remove the target ops.
3540 (class process_target): Add the target ops.
3541 (target_stopped_by_hw_breakpoint): Update the macro.
3542 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3543 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3544 (process_target::supports_stopped_by_hw_breakpoint): Define.
3545
3546 Update the derived classes and callers below.
3547
3548 * linux-low.cc (linux_target_ops): Update.
3549 (linux_stopped_by_hw_breakpoint): Turn into ...
3550 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3551 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3552 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3553 * linux-low.h (class linux_process_target): Update.
3554 * lynx-low.cc (lynx_target_ops): Update.
3555 * nto-low.cc (nto_target_ops): Update.
3556 * win32-low.cc (win32_target_ops): Update.
3557
84320c4e
TBA
35582020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3559
3560 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3561 ops into methods of process_target.
3562
3563 * target.h (struct process_stratum_target): Remove the target ops.
3564 (class process_target): Add the target ops.
3565 (target_stopped_by_sw_breakpoint): Update the macro.
3566 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3567 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3568 (process_target::supports_stopped_by_sw_breakpoint): Define.
3569
3570 Update the derived classes and callers below.
3571
3572 * linux-low.cc (linux_target_ops): Update.
3573 (linux_stopped_by_sw_breakpoint): Turn into ...
3574 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3575 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3576 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3577 * linux-low.h (class linux_process_target): Update.
3578 * lynx-low.cc (lynx_target_ops): Update.
3579 * nto-low.cc (nto_target_ops): Update.
3580 * win32-low.cc (win32_target_ops): Update.
3581
7e0bde70
TBA
35822020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3583
3584 Turn process_stratum_target's insert_point and remove_point ops
3585 into methods of process_target.
3586
3587 * target.h (struct process_stratum_target): Remove the target ops.
3588 (class process_target): Add the target ops.
3589 * target.cc (process_target::insert_point): Define.
3590 (process_target::remove_point): Define.
3591
3592 Update the derived classes and callers below.
3593
3594 * mem-break.cc (set_raw_breakpoint_at): Update.
3595 (delete_raw_breakpoint): Update.
3596 (uninsert_raw_breakpoint): Update.
3597 (reinsert_raw_breakpoint): Update.
3598 * linux-low.cc (linux_target_ops): Update.
3599 (linux_insert_point): Turn into ...
3600 (linux_process_target::insert_point): ... this.
3601 (linux_remove_point): Turn into ...
3602 (linux_process_target::remove_point): ... this.
3603 * linux-low.h (class linux_process_target): Update.
3604 * lynx-low.cc (lynx_target_ops): Update.
3605 * nto-low.cc (nto_target_ops): Update.
3606 (nto_insert_point): Turn into ...
3607 (nto_process_target::insert_point): ... this.
3608 (nto_remove_point): Turn into ...
3609 (nto_process_target::remove_point): ... this.
3610 * nto-low.h (class nto_process_target): Update.
3611 * win32-low.cc (win32_target_ops): Update.
3612 (win32_insert_point): Turn into ...
3613 (win32_process_target::insert_point): ... this.
3614 (win32_remove_point): Turn into ...
3615 (win32_process_target::remove_point): ... this.
3616 * win32-low.h (class win32_process_target): Update.
3617
a2b2297a
TBA
36182020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3619
3620 Turn process_stratum_target's supports_z_point_type op into a
3621 method of process_target.
3622
3623 * target.h (struct process_stratum_target): Remove the target op.
3624 (class process_target): Add the target op.
3625 * target.cc (process_target::supports_z_point_type): Define.
3626
3627 Update the derived classes and callers below.
3628
3629 * mem-break.cc (z_type_supported): Update.
3630 * linux-low.cc (linux_target_ops): Update.
3631 (linux_supports_z_point_type): Turn into ...
3632 (linux_process_target::supports_z_point_type): ... this.
3633 * linux-low.h (class linux_process_target): Update.
3634 * lynx-low.cc (lynx_target_ops): Update.
3635 * nto-low.cc (nto_target_ops): Update.
3636 (nto_supports_z_point_type): Turn into ...
3637 (nto_process_target::supports_z_point_type): ... this.
3638 * nto-low.h (class nto_process_target): Update.
3639 * win32-low.cc (win32_target_ops): Update.
3640 (win32_supports_z_point_type): Turn into ...
3641 (win32_process_target::supports_z_point_type): ... this.
3642 * win32-low.h (class win32_process_target): Update.
3643
eac215cc
TBA
36442020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3645
3646 Turn process_stratum_target's read_auxv op into a method of
3647 process_target.
3648
3649 * target.h (class process_stratum_target): Remove the target op.
3650 (struct process_target): Add the target op. Also add
3651 'supports_read_auxv'.
3652 * target.cc (process_target::read_auxv): Define.
3653 (process_target::supports_read_auxv): Define.
3654
3655 Update the derived classes and callers below.
3656
3657 * server.cc (handle_qxfer_auxv): Update.
3658 (handle_query): Update.
3659 * linux-low.cc (linux_target_ops): Update.
3660 (linux_process_target::supports_read_auxv): Define.
3661 (linux_read_auxv): Turn into ...
3662 (linux_process_target::read_auxv): ... this.
3663 * linux-low.h (class linux_process_target): Update.
3664 * lynx-low.cc (lynx_target_ops): Update.
3665 * nto-low.cc (nto_target_ops): Update.
3666 (nto_process_target::supports_read_auxv): Define.
3667 (nto_read_auxv): Turn into ...
3668 (nto_process_target::read_auxv): ... this.
3669 * nto-low.h (class nto_process_target): Update.
3670 * win32-low.cc (win32_target_ops): Update.
3671
eb497a2a
TBA
36722020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3673
3674 Turn process_stratum_target's request_interrupt op into a method of
3675 process_target.
3676
3677 * target.h (struct process_stratum_target): Remove the target op.
3678 (class process_target): Add the target op.
3679
3680 Update the derived classes and callers below.
3681
3682 * remote-utils.cc (putpkt_binary_1): Update.
3683 (input_interrupt): Update.
3684 (getpkt): Update.
3685 * server.cc (handle_v_requests): Update.
3686 * linux-low.cc (linux_target_ops): Update.
3687 (linux_request_interrupt): Turn into ...
3688 (linux_process_target::request_interrupt): ... this.
3689 * linux-low.h (class linux_process_target): Update.
3690 * lynx-low.cc (lynx_target_ops): Update.
3691 (lynx_request_interrupt): Turn into ...
3692 (lynx_process_target::request_interrupt): ... this.
3693 * lynx-low.h (class lynx_process_target): Update.
3694 * nto-low.cc (nto_target_ops): Update.
3695 (nto_request_interrupt): Turn into ...
3696 (nto_process_target::request_interrupt): ... this.
3697 * nto-low.h (class nto_process_target): Update.
3698 * win32-low.cc (win32_target_ops): Update.
3699 (win32_request_interrupt): Turn into ...
3700 (win32_process_target::request_interrupt): ... this.
3701 * win32-low.h (class win32_process_target): Update.
3702
2a31c7aa
TBA
37032020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3704
3705 Turn process_stratum_target's look_up_symbols op into a method of
3706 process_target.
3707
3708 * target.h (struct process_stratum_target): Remove the target op.
3709 (class process_target): Add the target op.
3710 * target.cc (process_target::look_up_symbols): Define.
3711
3712 Update the derived classes and callers below.
3713
3714 * server.cc (handle_query): Update.
3715 * linux-low.cc (linux_target_ops): Update.
3716 (linux_look_up_symbols): Turn into ...
3717 (linux_process_target::look_up_symbols): ... this.
3718 * linux-low.h (class linux_process_target): Update.
3719 * lynx-low.cc (lynx_target_ops): Update.
3720 * nto-low.cc (nto_target_ops): Update.
3721 * win32-low.cc (win32_target_ops): Update.
3722
e2558df3
TBA
37232020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3724
3725 Turn process_stratum_target's read_memory and write_memory
3726 ops into methods of process_target.
3727
3728 * target.h (struct process_stratum_target): Remove the target ops.
3729 (class process_target): Add the target ops.
3730
3731 Update the derived classes and callers below.
3732
3733 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3734 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3735 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3736 (arm_get_syscall_trapinfo): Update.
3737 * linux-cris-low.cc (cris_breakpoint_at): Update.
3738 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3739 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3740 * linux-mips-low.cc (mips_breakpoint_at): Update.
3741 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3742 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3743 * linux-sh-low.cc (sh_breakpoint_at): Update.
3744 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3745 (sparc_store_gregset_from_stack): Update.
3746 (sparc_breakpoint_at): Update.
3747 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3748 * linux-tile-low.cc (tile_breakpoint_at): Update.
3749 * linux-x86-low.cc (x86_breakpoint_at): Update.
3750 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3751 * mem-brea.cc (insert_memory_breakpoint): Update.
3752 (validate_inserted_breakpoint): Update.
3753 * target.cc (read_inferior_memory): Update.
3754 (target_write_memory): Update.
3755 * linux-low.cc (linux_target_ops): Update.
3756 (linux_read_memory): Make a wrapper around the read_memory target
3757 op call.
3758 (linux_process_target::read_memory): Rename from linux_read_memory.
3759 (linux_write_memory): Turn into ...
3760 (linux_process_target::write_memory): ... this.
3761 * linux-low.h (class linux_process_target): Update.
3762 * lynx-low.cc (lynx_target_ops): Update.
3763 (lynx_read_memory): Turn into ...
3764 (lynx_process_target::read_memory): ... this.
3765 (lynx_write_memory): Turn into ...
3766 (lynx_process_target::write_memory): ... this.
3767 * lynx-low.h (class lynx_process_target): Update.
3768 * nto-low.cc (nto_target_ops): Update.
3769 (nto_read_memory): Turn into ...
3770 (nto_process_target::read_memory): ... this.
3771 (nto_write_memory): Turn into ...
3772 (nto_process_target::write_memory): ... this.
3773 * nto-low.h (class nto_process_target): Update.
3774 * win32-low.cc (win32_target_ops): Update.
3775 (win32_read_inferior_memory): Turn into ...
3776 (win32_process_target::read_memory): ... this.
3777 (win32_write_inferior_memory): Turn into ...
3778 (win32_process_target::write_memory): ... this.
3779 * win32-low.h (class win32_process_target): Update.
3780
79b44087
TBA
37812020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3782
3783 Turn process_stratum_target's prepare_to_access_memory and
3784 done_accessing_memory ops into methods of process_target.
3785
3786 * target.h (struct process_stratum_target): Remove the target ops.
3787 (class process_target): Add the target ops.
3788 * target.cc (process_target::prepare_to_access_memory): Define.
3789 (process_target::done_accessing_memory): Define.
3790 (prepare_to_access_memory): Update.
3791 (done_accessing_memory): Update.
3792
3793 Update the derived classes and callers below.
3794
3795 * linux-low.cc (linux_target_ops): Update.
3796 (linux_prepare_to_access_memory): Turn into ...
3797 (linux_process_target::prepare_to_access_memory): ... this.
3798 (linux_done_accessing_memory): Turn into ...
3799 (linux_process_target::done_accessing_memory): ... this.
3800 * linux-low.h (class linux_process_target): Update.
3801 * lynx-low.cc (lynx_target_ops): Update.
3802 * nto-low.cc (nto_target_ops): Update.
3803 * win32-low.cc (win32_target_ops): Update.
3804
a5a4d4cd
TBA
38052020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3806
3807 Turn process_stratum_target's fetch_registers and store_registers
3808 ops into methods of process_target.
3809
3810 * target.h (struct process_stratum_target): Remove the target ops.
3811 (class process_target): Add the target ops.
3812 (fetch_inferior_registers): Update the macro.
3813 (store_inferior_registers): Update the macro.
3814
3815 Update the derived classes and callers below.
3816
3817 * linux-low.cc (linux_target_ops): Update.
3818 (linux_fetch_registers): Turn into ...
3819 (linux_process_target::fetch_registers): ... this.
3820 (linux_store_registers): Turn into ...
3821 (linux_process_target::store_registers): ... this.
3822 * linux-low.h (class linux_process_target): Update.
3823 * lynx-low.cc (lynx_target_ops): Update.
3824 (lynx_fetch_registers): Turn into ...
3825 (lynx_process_target::fetch_registers): ... this.
3826 (lynx_store_registers): Turn into ...
3827 (lynx_process_target::store_registers): ... this.
3828 * lynx-low.h (class lynx_process_target): Update.
3829 * nto-low.cc (nto_target_ops): Update.
3830 (nto_fetch_registers): Turn into ...
3831 (nto_process_target::fetch_registers): ... this.
3832 (nto_store_registers): Turn into ...
3833 (nto_process_target::store_registers): ... this.
3834 * nto-low.h (class nto_process_target): Update.
3835 * win32-low.cc (win32_target_ops): Update.
3836 (win32_fetch_inferior_registers): Turn into ...
3837 (win32_process_target::fetch_registers): ... this.
3838 (win32_store_inferior_registers): Turn into ...
3839 (win32_process_target::store_registers): ... this.
3840 * win32-low.h (class win32_process_target): Update.
3841
6532e7e3
TBA
38422020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3843
3844 Turn process_stratum_target's wait op into a method of
3845 process_target.
3846
3847 * target.h (struct process_stratum_target): Remove the target op.
3848 (class process_target): Add the target op.
3849
3850 Update the derived classes and callers below.
3851
3852 * target.cc (target_wait): Update.
3853 * linux-low.cc (linux_target_ops): Update.
3854 (linux_wait): Turn into ...
3855 (linux_process_target::wait): ... this.
3856 * linux-low.h (class linux_process_target): Update.
3857 * lynx-low.cc (lynx_target_ops): Update.
3858 (lynx_wait): Turn into ...
3859 (lynx_process_target::wait): ... this.
3860 * lynx-low.h (class lynx_process_target): Update.
3861 * nto-low.cc (nto_target_ops): Update.
3862 (nto_wait): Turn into ...
3863 (nto_process_target::wait): ... this.
3864 * nto-low.h (class nto_process_target): Update.
3865 * win32-low.cc (win32_target_ops): Update.
3866 (win32_wait): Turn into ...
3867 (win32_process_target::wait): ... this.
3868 (do_initial_child_stuff): Update.
3869 * win32-low.h (class win32_process_target): Update.
3870
0e4d7e35
TBA
38712020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3872
3873 Turn process_stratum_target's resume op into a method of
3874 process_target.
3875
3876 * target.h (struct process_stratum_target): Remove the target op.
3877 (class process_target): Add the target op.
3878
3879 Update the derived classes and callers below.
3880
3881 * server.cc (resume): Update.
3882 * target.cc (target_stop_and_wait): Update.
3883 (target_continue_no_signal): Update.
3884 (target_continue): Update.
3885 * linux-low.cc (linux_target_ops): Update.
3886 (linux_resume): Turn into ...
3887 (linux_process_target::resume): ... this.
3888 * linux-low.h (class linux_process_target): Update.
3889 * lynx-low.cc (lynx_target_ops): Update.
3890 (lynx_resume): Turn into ...
3891 (lynx_process_target::resume): ... this.
3892 * lynx-low.h (class lynx_process_target): Update.
3893 * nto-low.cc (nto_target_ops): Update.
3894 (nto_resume): Turn into ...
3895 (nto_process_target::resume): ... this.
3896 * nto-low.h (class nto_process_target): Update.
3897 * win32-low.cc (win32_target_ops): Update.
3898 (win32_resume): Turn into ...
3899 (win32_process_target::resume): ... this.
3900 (win32_process_target::detach): Update.
3901 (do_initial_child_stuff): Update.
3902 * win32-low.h (class win32_process_target): Update.
3903
13d3d99b
TBA
39042020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3905
3906 Turn process_stratum_target's thread_alive op into a method of
3907 process_target.
3908
3909 * target.h (struct process_stratum_target): Remove the target op.
3910 (class process_target): Add the target op.
3911 (mythread_alive): Update the macro.
3912
3913 Update the derived classes and callers below.
3914
3915 * linux-low.cc (linux_target_ops): Update.
3916 (linux_thread_alive): Turn into ...
3917 (linux_process_target::thread_alive): ... this.
3918 (wait_for_sigstop): Update.
3919 * linux-low.h (class linux_process_target): Update.
3920 * lynx-low.cc (lynx_target_ops): Update.
3921 (lynx_thread_alive): Turn into ...
3922 (lynx_process_target::thread_alive): ... this.
3923 * lynx-low.h (class lynx_process_target): Update.
3924 * nto-low.cc (nto_target_ops): Update.
3925 (nto_thread_alive): Turn into ...
3926 (nto_process_target::thread_alive): ... this.
3927 * nto-low.h (class nto_process_target): Update.
3928 * win32-low.cc (win32_target_ops): Update.
3929 (win32_thread_alive): Turn into ...
3930 (win32_process_target::thread_alive): ... this.
3931 * win32-low.h (class win32_process_target): Update.
3932
95a49a39
TBA
39332020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3934
3935 Turn process_stratum_target's join op into a method of
3936 process_target.
3937
3938 * target.h (struct process_stratum_target): Remove the target op.
3939 (class process_target): Add the target op.
3940 (join_inferior): Update the macro.
3941
3942 Update the derived classes and callers below.
3943
3944 * linux-low.cc (linux_target_ops): Update.
3945 (linux_join): Turn into ...
3946 (linux_process_target::join): ... this.
3947 * linux-low.h (class linux_process_target): Update.
3948 * lynx-low.cc (lynx_target_ops): Update.
3949 (lynx_join): Turn into ...
3950 (lynx_process_target::join): ... this.
3951 * lynx-low.h (class lynx_process_target): Update.
3952 * nto-low.cc (nto_target_ops): Update.
3953 (nto_process_target::join): Define.
3954 * nto-low.h (class nto_process_target): Update.
3955 * win32-low.cc (win32_target_ops): Update.
3956 (win32_join): Turn into ...
3957 (win32_process_target::join): ... this.
3958 * win32-low.h (class win32_process_target): Update.
3959
8adb37b9
TBA
39602020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3961
3962 Turn process_stratum_target's mourn op into a method of
3963 process_target.
3964
3965 * target.h (struct process_stratum_target): Remove the target op.
3966 (class process_target): Add the target op.
3967
3968 Update the derived classes and callers below.
3969
3970 * target.cc (target_mourn_inferior): Update.
3971 * linux-low.cc (linux_target_ops): Update.
3972 (linux_mourn): Turn into ...
3973 (linux_process_target::mourn): ... this.
3974 (handle_extended_wait): Update.
3975 (linux_process_target::kill): Update.
3976 (linux_process_target::detach): Update.
3977 * linux-low.h (class linux_process_target): Update.
3978 * lynx-low.cc (lynx_target_ops): Update.
3979 (lynx_mourn): Turn into ...
3980 (lynx_process_target::mourn): ... this.
3981 * lynx-low.h (class lynx_process_target): Update.
3982 * nto-low.cc (nto_target_ops): Update.
3983 (nto_mourn): Turn into ...
3984 (nto_process_target::mourn): ... this.
3985 * nto-low.h (class nto_process_target): Update.
3986 * win32-low.cc (win32_target_ops): Update.
3987 (win32_mourn): Turn into ...
3988 (win32_process_target::mourn): ... this.
3989 * win32-low.h (class win32_process_target): Update.
3990
9061c9cf
TBA
39912020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3992
3993 Turn process_stratum_target's detach op into a method of
3994 process_target.
3995
3996 * target.h (struct process_stratum_target): Remove the target op.
3997 (class process_target): Add the target op.
3998 (detach_inferior): Update the macro.
3999
4000 Update the derived classes and callers below.
4001
4002 * linux-low.cc (linux_target_ops): Update.
4003 (linux_detach): Turn into ...
4004 (linux_process_target::detach): ... this.
4005 * linux-low.h (class linux_process_target): Update.
4006 * lynx-low.cc (lynx_target_ops): Update.
4007 (lynx_detach): Turn into ...
4008 (lynx_process_target::detach): ... this.
4009 * lynx-low.h (class lynx_process_target): Update.
4010 * nto-low.cc (nto_target_ops): Update.
4011 (nto_detach): Turn into ...
4012 (nto_process_target::detach): ... this.
4013 * nto-low.h (class nto_process_target): Update.
4014 * win32-low.cc (win32_target_ops): Update.
4015 (win32_detach): Turn into ...
4016 (win32_process_target::detach): ... this.
4017 * win32-low.h (class win32_process_target): Update.
4018
c6885a57
TBA
40192020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4020
4021 Turn process_stratum_target's kill op into a method of
4022 process_target.
4023
4024 * target.h (struct process_stratum_target): Remove the target op.
4025 (class process_target): Add the target op.
4026
4027 Update the derived classes and callers below.
4028
4029 * target.cc (kill_inferior): Update.
4030 * linux-low.cc (linux_target_ops): Update.
4031 (linux_kill): Turn into ...
4032 (linux_process_target::kill): ... this.
4033 * linux-low.h (class linux_process_target): Update.
4034 * lynx-low.cc (lynx_target_ops): Update.
4035 (lynx_kill): Turn into ...
4036 (lynx_process_target::kill): ... this.
4037 * lynx-low.h (class lynx_process_target): Update.
4038 * nto-low.cc (nto_target_ops): Update.
4039 (nto_kill): Turn into ...
4040 (nto_process_target::kill): ... this.
4041 * nto-low.h (class nto_process_target): Update.
4042 * win32-low.cc (win32_target_ops): Update.
4043 (win32_kill): Turn into ...
4044 (win32_process_target::kill): ... this.
4045 * win32-low.h (class win32_process_target): Update.
4046
ef03dad8
TBA
40472020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4048
4049 Turn process_stratum_target's attach op into a method of
4050 process_target.
4051
4052 * target.h (struct process_stratum_target): Remove the target op.
4053 (class process_target): Add the target op.
4054 (myattach): Update the macro.
4055
4056 Update the derived classes and callers below.
4057
4058 * linux-low.cc (linux_target_ops): Update.
4059 (linux_attach): Turn into ...
4060 (linux_process_target::attach): ... this.
4061 * linux-low.h (class linux_process_target): Update.
4062 * lynx-low.cc (lynx_target_ops): Update.
4063 (lynx_attach): Turn into ...
4064 (lynx_process_target::attach): ... this.
4065 * lynx-low.h (class lynx_process_target): Update.
4066 * nto-low.cc (nto_target_ops): Update.
4067 (nto_attach): Turn into ...
4068 (nto_process_target::attach): ... this.
4069 * nto-low.h (class nto_process_target): Update.
4070 * win32-low.cc (win32_target_ops): Update.
4071 (win32_attach): Turn into ...
4072 (win32_process_target::attach): ... this.
4073 * win32-low.h (class win32_process_target): Update.
4074
6dee9afb
TBA
40752020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4076
4077 Turn process_stratum_target's post_create_inferior op into a method
4078 of process_target.
4079
4080 * target.h (struct process_stratum_target): Remove the target op.
4081 (class process_target): Add the target op.
4082 (target_post_create_inferior): Update the macro.
4083 * target.cc (process_target::post_create_inferior): Define.
4084
4085 Update the derived classes and callers below.
4086
4087 * linux-low.cc (linux_target_ops): Update.
4088 (linux_post_create_inferior): Turn into ...
4089 (linux_process_target::post_create_inferior): ... this.
4090 * linux-low.h (class linux_process_target): Update.
4091 * lynx-low.cc (lynx_target_ops): Update.
4092 * nto-low.cc (nto_target_ops): Update.
4093 * win32-low.cc (win32_target_ops): Update.
4094
15295543
TBA
40952020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4096
4097 Turn process_stratum_target's create_inferior op into a method of
4098 process_target.
4099
4100 * target.h (struct process_stratum_target): Remove the target op.
4101 (class process_target): Add the target op.
4102 (create_inferior): Rename the macro to ...
4103 (target_create_inferior): ... this.
4104
4105 Update the derived classes and callers below.
4106
4107 * server.cc (handle_v_run): Update.
4108 (captured_main): Update.
4109 (process_serial_event): Update.
4110 * linux-low.cc (linux_target_ops): Update.
4111 (linux_create_inferior): Turn into ...
4112 (linux_process_target::create_inferior): ... this.
4113 * linux-low.h (class linux_process_target): Update.
4114 * lynx-low.cc (lynx_target_ops): Update.
4115 (lynx_create_inferior): Turn into ...
4116 (lynx_process_target::create_inferior): ... this.
4117 * lynx-low.h (class lynx_process_target): Update.
4118 * nto-low.cc (nto_target_ops): Update.
4119 (nto_create_inferior): Turn into ...
4120 (nto_process_target::create_inferior): ... this.
4121 * nto-low.h (class nto_process_target): Update.
4122 * win32-low.cc (win32_target_ops): Update.
4123 (win32_create_inferior): Turn into ...
4124 (win32_process_target::create_inferior): ... this.
4125 * win32-low.h (class win32_process_target): Update.
4126
5ef9273d
TBA
41272020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4128
4129 * target.h (class process_target): New class definition.
4130 (struct process_stratum_target) <pt>: New field with type
4131 'process_target*'.
4132 * linux-low.h (class linux_process_target): Define as a derived
4133 class of 'process_target'.
4134 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4135 as the 'pt' field.
4136 * lynx-low.h (class lynx_process_target): Define as a derived
4137 class of 'process_target'.
4138 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4139 as the 'pt' field.
4140 * nto-low.h (class nto_process_target): Define as a derived
4141 class of 'process_target'.
4142 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4143 as the 'pt' field.
4144 * win32-low.h (class win32_process_target): Define as a derived
4145 class of 'process_target'.
4146 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4147 as the 'pt' field.
4148
9f1528a1
AB
41492020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4150
4151 * configure: Regenerate.
4152
bf84f706
MR
41532020-02-19 Maciej W. Rozycki <macro@wdc.com>
4154 Andrew Burgess <andrew.burgess@embecosm.com>
4155
4156 * linux-riscv-low.cc: New file.
4157 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4158 and nat/riscv-linux-tdesc.c.
4159 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4160 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4161 Define.
4162
1a627e7e
TT
41632020-02-14 Tom Tromey <tom@tromey.com>
4164
4165 * acinclude.m4: Don't include acx_configure_dir.m4.
4166 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4167 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4168 (all, install-only, uninstall, clean-info, clean)
4169 (maintainer-clean): Don't recurse.
4170 (subdir_do, all-lib): Remove.
4171 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4172 (GNULIB_H): Remove.
4173 (generated_files): Update.
4174 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4175 * configure: Rebuild.
4176 * configure.ac: Don't configure gnulib or libiberty.
4177 (GNULIB): Update.
4178
a9b34532
EZ
41792020-02-14 Eli Zaretskii <eliz@gnu.org>
4180
4181 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4182 preparing the command line for CreateProcess.
4183 (win32_create_inferior): Reflect the program name in debugging
4184 output that shows the process and its command line.
4185
feacfcac
SM
41862020-02-13 Simon Marchi <simon.marchi@efficios.com>
4187
4188 * Makefile.in: Rename source files from .c to .cc.
4189 * %.c: Rename to %.cc.
4190 * configure.ac: Rename server.c to server.cc.
4191 * configure: Re-generate.
4192
06b3c5bd
SM
41932020-02-13 Simon Marchi <simon.marchi@efficios.com>
4194
4195 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4196
052793ad
HD
41972020-02-12 Hannes Domani <ssbssa@yahoo.de>
4198
4199 * win32-low.c (win32_create_inferior): Set signal_pid.
4200
f20e3e82
MR
42012020-02-12 Maciej W. Rozycki <macro@wdc.com>
4202 Pedro Alves <palves@redhat.com>
4203
4204 Skip building gdbserver in a cross-configuration.
4205 * configure.srv: Set $gdbserver_host depending on whether $target
4206 is $host. Use $gdbserver_host instead of $host.
4207
8ddd8e0e
SM
42082020-02-11 Simon Marchi <simon.marchi@efficios.com>
4209
4210 * configure: Re-generate.
4211
898e7f60
SM
42122020-02-11 Simon Marchi <simon.marchi@efficios.com>
4213
4214 * configure: Re-generate.
4215
58df732b
SM
42162020-02-11 Simon Marchi <simon.marchi@efficios.com>
4217
4218 * acinclude.m4: Update warning.m4 path.
4219
7928d571
HD
42202020-02-09 Hannes Domani <ssbssa@yahoo.de>
4221
4222 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4223 (handle_exception): Set siginfo_er.
4224 (win32_xfer_siginfo): New function.
4225
919adfe8
TT
42262020-02-07 Tom Tromey <tom@tromey.com>
4227 Pedro Alves <palves@redhat.com>
4228
4229 * README: Update build documentation.
4230 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4231 host, not target.
4232 * configure.ac: Update paths.
4233 * configure: Rebuild.
4234 * acinclude.m4: Update paths.
4235 * Makefile.in: Update include paths.
4236 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4237 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4238 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4239 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4240 (%-generated.c): Update paths.
4241 * Move entire directory from ../gdb/gdbserver.
4242
287c844a
MR
42432020-01-29 Maciej W. Rozycki <macro@wdc.com>
4244
4245 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4246
548a204f
PFC
42472020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4248
4249 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4250 assignment instead of srv_linux_obj.
4251
a2236a08
HD
42522020-01-28 Hannes Domani <ssbssa@yahoo.de>
4253
4254 * server.c (handle_qxfer_libraries): Write segment-address with
4255 paddress.
4256
bdaed379
HD
42572020-01-24 Hannes Domani <ssbssa@yahoo.de>
4258
4259 * Makefile.in (install-strip): New target.
4260 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4261 * aclocal.m4: Regenerate.
4262 * configure: Regenerate.
4263 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4264
42cd72aa
MR
42652020-01-24 Maciej W. Rozycki <macro@wdc.com>
4266
4267 * Makefile.in (SFILES): Adjust paths to point to real files.
4268 (OBS): Move waitstatus.o to target/waitstatus.o.
4269 (TAGS): Transform paths appropriately.
4270 (%.o): Rename to...
4271 (nat/%.o): ... this pattern rule.
4272 (%.o): Rename to...
4273 (target/%.o): ... this pattern rule.
4274 * configure.srv: Adjust paths throughout to include nat/ prefix
4275 with the revant files.
4276 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4277 * configure: Regenerate.
4278
42ba50ec
MR
42792020-01-24 Maciej W. Rozycki <macro@wdc.com>
4280
4281 * Makefile.in (TAGS): Remove config files from the recipe.
4282
05ea2a05
TT
42832020-01-14 Tom Tromey <tom@tromey.com>
4284
4285 * configure: Rebuild.
4286 * configure.ac: Remove any checks that were added to common.m4.
4287 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4288 lib-link.m4.
4289
01027315
TT
42902020-01-14 Tom Tromey <tom@tromey.com>
4291
4292 * server.h: Include config.h.
4293 * gdbreplay.c: Include config.h.
4294 * configure: Rebuild.
4295 * configure.ac: Don't source common.host.
4296 * acinclude.m4: Update path.
4297 * Makefile.in (INCSUPPORT): New variable.
4298 (INCLUDE_CFLAGS): Add INCSUPPORT.
4299 (SFILES): Update paths.
4300 (version-generated.c): Update path to create-version.sh.
4301 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4302
b2ceabe8
TT
43032020-01-14 Tom Tromey <tom@tromey.com>
4304
4305 * configure.ac (LIBS): Use WIN32APILIBS.
4306 (USE_WIN32API): Don't define.
4307 * configure: Rebuild.
4308
25c51f71
TT
43092020-01-14 Tom Tromey <tom@tromey.com>
4310
4311 * configure: Rebuild.
4312
c0bd321d
SM
43132020-01-13 Simon Marchi <simon.marchi@efficios.com>
4314
4315 * Makefile.in (%-generated.c): Remove rule for files from
4316 regformats/i386.
4317
bb564c58
SM
43182020-01-13 Simon Marchi <simon.marchi@efficios.com>
4319
4320 * configure: Re-generate.
4321
6e37c371
SM
43222020-01-13 Simon Marchi <simon.marchi@efficios.com>
4323
4324 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4325 Define to static.
4326 * tracepoint.c (stop_tracing, flush_trace_buffer,
4327 about_to_request_buffer_space, get_trace_state_variable_value,
4328 set_trace_state_variable_value, gdb_collect): Add declaration.
4329
df4a0200
SM
43302020-01-13 Simon Marchi <simon.marchi@efficios.com>
4331
4332 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4333 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4334 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4335 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4336 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4337 static.
4338
89e94ec9
SM
43392020-01-13 Simon Marchi <simon.marchi@efficios.com>
4340
4341 * inferiors.c: Include gdbsupport/common-inferior.h.
4342
2552728a
SM
43432020-01-13 Simon Marchi <simon.marchi@efficios.com>
4344
4345 * hostio-errno.c: Include hostio.h.
4346
4025fa09
SM
43472020-01-13 Simon Marchi <simon.marchi@efficios.com>
4348
4349 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4350 prerequisite.
4351
c0b0a142
SM
43522020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4353
4354 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4355 * linux-arm-tdesc.h: Include arch/arm.h.
4356
bb1183e2
SM
43572020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4358
4359 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4360
f5df0b5f
SM
43612020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4362
4363 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4364 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4365
5b6d1e4f
PA
43662020-01-10 Pedro Alves <palves@redhat.com>
4367
4368 * fork-child.c (post_fork_inferior): Pass target down to
4369 startup_inferior.
4370 * inferiors.c (switch_to_thread): Add process_stratum_target
4371 parameter.
4372 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4373 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4374 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4375 * remote-utils.c (prepare_resume_reply): Pass the target to
4376 switch_to_thread.
4377 * target.c (the_target): Now a process_stratum_target.
4378 (done_accessing_memory): Pass the target to switch_to_thread.
4379 (set_target_ops): Ajust to use process_stratum_target.
4380 * target.h (struct target_ops): Rename to ...
4381 (struct process_stratum_target): ... this.
4382 (the_target, set_target_ops): Adjust.
4383 (prepare_to_access_memory): Adjust comment.
4384 * win32-low.c (child_xfer_memory): Adjust to use
4385 process_stratum_target.
4386 (win32_target_ops): Now a process_stratum_target.
4387
559e7e50
EZ
43882020-01-06 Eli Zaretskii <eliz@gnu.org>
4389 Pedro Alves <palves@redhat.com>
4390
4391 * win32-low.c (get_child_debug_event): Extract the fatal exception
4392 from the exit status and convert to the equivalent Posix signal
4393 number.
4394 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4395 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4396
48189bec
HD
43972020-01-01 Hannes Domani <ssbssa@yahoo.de>
4398
4399 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4400
5dd8bf88
JB
44012020-01-01 Joel Brobecker <brobecker@adacore.com>
4402
4403 * server.c (gdbserver_version): Change copyright year to 2020.
4404 * gdbreplay.c (gdbreplay_version): Likewise.
4405
0ad6b8ee
CB
44062019-12-19 Christian Biesinger <cbiesinger@google.com>
4407
4408 * configure: Regenerate.
4409 * configure.ac: Quote variable arguments of test.
4410
1ee7b812
BE
44112019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4412
4413 * Makefile.in: Fix build with GNU Make 3.81
4414
d9fa87f4
TT
44152019-12-16 Tom Tromey <tromey@adacore.com>
4416
4417 * server.c (get_exec_file): Constify result.
4418
ab7d13f0
CB
44192019-12-10 Christian Biesinger <cbiesinger@google.com>
4420
4421 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4422 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4423 * config.in: Regenerate.
4424 * configure: Regenerate.
4425 * configure.ac: Don't check for strerror.
4426 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4427 Call safe_strerror instead of strerror.
4428 * server.h (strerror): Remove this now-unnecessary declaration.
4429 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4430 strerror.
4431 (gdb_agent_helper_thread): Likewise.
4432 * utils.c (perror_with_name): Likewise.
4433
4da8c3a8
TT
44342019-11-26 Tom Tromey <tom@tromey.com>
4435
4436 * configure, config.in: Rebuild.
4437
21987b9c
TT
44382019-11-26 Tom Tromey <tom@tromey.com>
4439
4440 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4441 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4442 gdb_sigmask.
4443 * configure, config.in: Rebuild.
4444
5e030278
TT
44452019-11-26 Tom Tromey <tom@tromey.com>
4446
4447 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4448 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4449 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4450 * acinclude.m4: Include ax_pthread.m4.
4451 * config.in, configure: Rebuild.
4452
6d91ce9a
CB
44532019-11-26 Christian Biesinger <cbiesinger@google.com>
4454
4455 * debug.c (debug_set_output): Call safe_strerror instead of
4456 strerror.
4457 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4458 (linux_kill_one_lwp): Likewise.
4459 (linux_detach_one_lwp): Likewise.
4460 (linux_wait_for_event_filtered): Likewise.
4461 (store_register): Likewise.
4462 * lynx-low.c (lynx_attach): Likewise.
4463 * mem-break.c (insert_memory_breakpoint): Likewise.
4464 (remove_memory_breakpoint): Likewise.
4465 (delete_fast_tracepoint_jump): Likewise.
4466 (set_fast_tracepoint_jump): Likewise.
4467 (uninsert_fast_tracepoint_jumps_at): Likewise.
4468 (reinsert_fast_tracepoint_jumps_at): Likewise.
4469 * nto-low.c (nto_xfer_memory): Likewise.
4470 (nto_resume): Likewise.
4471
6cdd651f
LM
44722019-11-20 Luis Machado <luis.machado@linaro.org>
4473
4474 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4475 instead of register count.
4476 * tdesc.c (tdesc_contains_feature): New function.
4477 * tdesc.h (tdesc_contains_feature): New prototype.
4478
cd850b40
CB
44792019-11-15 Christian Biesinger <cbiesinger@google.com>
4480
4481 * Makefile.in: Add safe-strerror.c.
4482 * configure: Regenerate.
4483 * configure.ac: Don't source common.host.
4484
5abebf3c
CB
44852019-11-15 Christian Biesinger <cbiesinger@google.com>
4486
4487 * config.in: Regenerate.
4488 * configure: Regenerate.
4489
e06f3d6e
AB
44902019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4491
4492 * ax.c (ax_printf): Handle size_t_arg.
4493
ca3a04f6
CB
44942019-11-06 Christian Biesinger <cbiesinger@google.com>
4495
4496 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4497 * mi/mi-main.c (output_cores): Likewise.
4498 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4499 (linux_xfer_osdata_modules): Likewise.
4500 * remote.c (register_remote_support_xml): Likewise.
4501 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4502 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4503
e48f6033
CB
45042019-11-01 Christian Biesinger <cbiesinger@google.com>
4505
4506 * configure: Regenerate.
4507 * configure.ac: Remove check for strerror_r.
4508
e7e97a2e
CB
45092019-10-31 Christian Biesinger <cbiesinger@google.com>
4510
4511 * config.in: Regenerate.
4512 * configure: Regenerate.
4513 * configure.ac: Also check for strerror_r.
4514
75cafaa6
CB
45152019-10-31 Christian Biesinger <cbiesinger@google.com>
4516
4517 * ax.h (debug_agent): Remove duplicate declaration.
4518
30baf67b
TV
45192019-10-26 Tom de Vries <tdevries@suse.de>
4520
4521 * linux-aarch64-low.c: Fix typos in comments.
4522 * linux-arm-low.c: Same.
4523 * linux-low.c: Same.
4524 * linux-ppc-low.c: Same.
4525 * proc-service.c: Same.
4526 * regcache.h: Same.
4527 * server.c: Same.
4528 * tracepoint.c: Same.
4529 * win32-low.c: Same.
4530
52c64cf7
TT
45312019-10-25 Tom Tromey <tromey@adacore.com>
4532
4533 * utils.c (xstrdup): Remove.
4534
c12d372d
TT
45352019-10-23 Tom Tromey <tom@tromey.com>
4536
4537 * configure, config.in: Rebuild.
4538
4d0b984b
TT
45392019-10-23 Tom Tromey <tom@tromey.com>
4540
4541 * configure: Rebuild.
4542 * acinclude.m4: Use m4_include, not sinclude.
4543
c5adaa19
TT
45442019-10-17 Tom Tromey <tromey@adacore.com>
4545
4546 * configure: Rebuild.
4547 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4548 in AC_CONFIG_FILES invocation.
4549 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4550 invocation.
4551
fec4e896
CB
45522019-10-16 Christian Biesinger <cbiesinger@google.com>
4553
4554 * server.c: Include xml-builtin.h.
4555 (get_xml_features): Don't declare xml_builtins here.
4556
00975ff6
AB
45572019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4558
4559 * Makefile.in: Remove references to vec-ipa.o.
4560
0dc32745
AB
45612019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4562
4563 * Makefile.in: Remove references to vec.c.
4564
3e6ec53a
CB
45652019-10-02 Christian Biesinger <cbiesinger@google.com>
4566
4567 * server.c (server_waiting): Change to bool.
4568 (extended_protocol): Likewise.
4569 (response_needed): Likewise.
4570 (exit_requested): Likewise.
4571 (run_once): Likewise.
4572 (report_no_resumed): Likewise.
4573 (non_stop): Likewise.
4574 (disable_packet_vCont): Likewise.
4575 (disable_packet_Tthread): Likewise.
4576 (disable_packet_qC): Likewise.
4577 (disable_packet_qfThreadInfo): Likewise.
4578 (handle_general_set): Update.
4579 (handle_detach): Update.
4580 (handle_monitor_command): Update.
4581 (handle_query): Update.
4582 (captured_main): Update.
4583 (process_serial_event): Update.
4584 * server.h (server_waiting): Change to bool.
4585 (disable_packet_vCont): Likewise.
4586 (disable_packet_Tthread): Likewise.
4587 (disable_packet_qC): Likewise.
4588 (disable_packet_qfThreadInfo): Likewise.
4589 (run_once): Likewise.
4590 (non_stop): Likewise.
4591 * target.c (target_stop_and_wait): Update.
4592
80fd2826
TT
45932019-10-02 Tom Tromey <tromey@adacore.com>
4594
4595 * Makefile.in (SFILES): Add common-inferior.c.
4596 (OBS): Add common-inferior.o.
4597 * server.c (startup_with_shell): Don't define.
4598
46f29a9a
AB
45992019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4600
4601 * linux-low.c (linux_low_read_btrace): Update for change to
4602 std::vector.
4603
f9d949fb
CB
46042019-09-20 Christian Biesinger <cbiesinger@google.com>
4605
4606 * debug.c (debug_threads): Remove comment in favor of the header.
4607 * debug.h (using_threads): Add declaration.
4608 (debug_threads): Add comment.
4609 * linux-aarch64-low.c: Include debug.h and remove declaration of
4610 debug_threads.
4611 * nto-low.c: Likewise.
4612 * remote-utils.c: Likewise.
4613 * thread-db.c: Likewise.
4614
abf516c6
UW
46152019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4616
4617 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4618 and powerpc-cell64l-ipa.o.
4619 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4620 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4621 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4622 (spu*-*-*): Remove.
4623
4624 * spu-low.c: Remove file.
4625
4626 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4627 (parse_spufs_run): Remove.
4628 (ppc_get_pc): Remove Cell/B.E. support.
4629 (ppc_set_pc): Likewise.
4630 (ppc_breakpoint_at): Likewise.
4631 (ppc_arch_setup): Likewise.
4632 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4633 tdesc_powerpc_cell32l.
4634 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4635 or init_registers_powerpc_cell32l.
4636 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4637 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4638 or init_registers_powerpc_cell32l.
4639 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4640 (init_registers_powerpc_cell32l): Remove prototype.
4641 (init_registers_powerpc_cell64l): Likewise.
4642
4643 * target.h (struct target_ops): Remove qxfer_spu member.
4644 * server.c (handle_qxfer_spu): Remove.
4645 (qxfer_packets): Remove entry for "spu".
4646 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4647 * linux-low.c (SPUFS_MAGIC): Remove.
4648 (spu_enumerate_spu_ids): Remove.
4649 (linux_qxfer_spu): Remove.
4650 (linux_target_ops): Remove qxfer_spu member.
4651 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4652 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4653 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4654
2d41fa11
SDJ
46552019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4656
4657 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4658 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4659 * config.in: Regenerate.
4660 * configure: Regenerate.
4661
d59b55f0
TT
46622019-08-15 Tom Tromey <tromey@adacore.com>
4663
4664 * target.c (target_write_memory): Use gdb::byte_vector.
4665
4196ab2a
TT
46662019-08-15 Tom Tromey <tromey@adacore.com>
4667
4668 * tracepoint.c (write_inferior_data_pointer)
4669 (write_inferior_integer, write_inferior_int8)
4670 (write_inferior_uinteger, m_tracepoint_action_download)
4671 (r_tracepoint_action_download, x_tracepoint_action_download)
4672 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4673 (download_agent_expr, download_tracepoint_1)
4674 (download_trace_state_variables, upload_fast_traceframes): Update.
4675 * server.c (gdb_write_memory): Update.
4676 * remote-utils.c (relocate_instruction): Update.
4677 * proc-service.c (ps_pdwrite): Update.
4678 * mem-break.c (remove_memory_breakpoint)
4679 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4680 (uninsert_fast_tracepoint_jumps_at)
4681 (reinsert_fast_tracepoint_jumps_at): Update.
4682 * linux-x86-low.c (append_insns)
4683 (i386_install_fast_tracepoint_jump_pad)
4684 (amd64_write_goto_address, i386_write_goto_address): Update.
4685 * linux-s390-low.c (append_insns, s390_write_goto_address):
4686 Update.
4687 * linux-ppc-low.c (ppc_relocate_instruction)
4688 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4689 (ppc_write_goto_address): Update.
4690 * linux-aarch64-low.c (append_insns): Update.
4691 * target.h (struct target_ops): Update.
4692 (write_inferior_memory): Don't declare.
4693 * target.c (target_write_memory): Rename from
4694 write_inferior_memory. Remove old target_write_memory.
4695
c6778d00
TT
46962019-08-15 Tom Tromey <tromey@adacore.com>
4697
4698 * target.c (write_inferior_memory): Use std::vector.
4699
404f2902
FCE
47002019-08-06 Frank Ch. Eigler <fche@redhat.com>
4701
4702 PR build/24886
4703 * configure.ac: Drop enable-libmcheck support.
4704 * configure, config.in: Rebuild.
4705 * acinclude.m4: Don't include it.
4706
4c5aa8e0
AH
47072019-07-19 Alan Hayward <alan.hayward@arm.com>
4708
4709 * configure.srv: Remove Arm xml files.
4710
7cc17433
AH
47112019-07-19 Alan Hayward <alan.hayward@arm.com>
4712
4713 * configure.srv: Add new files. Remove xml generated files.
4714 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4715 registers.
4716 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4717 * linux-aarch32-tdesc.c: New file.
4718 * linux-aarch32-tdesc.h: New file.
4719 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4720 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4721 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4722 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4723 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4724 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4725 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4726 (arm_read_description): Call arm_linux_read_description.
4727 (initialize_low_arch): Don't init registers.
4728 * linux-arm-tdesc.c: New file.
4729 * linux-arm-tdesc.h: New file.
4730
166a82be
AH
47312019-07-10 Alan Hayward <alan.hayward@arm.com>
4732
4733 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4734 Move counter inside for.
4735 (arm_read_description): Check ptrace earlier.
4736 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4737
268a13a5
TT
47382019-07-09 Tom Tromey <tom@tromey.com>
4739
4740 * configure: Rebuild.
4741 * configure.ac: Change common to gdbsupport.
4742 * acinclude.m4: Change common to gdbsupport.
4743 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4744 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4745 common to gdbsupport.
4746 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4747 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4748 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4749 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4750 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4751 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4752 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4753 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4754 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4755 common to gdbsupport.
4756
350fab54
AH
47572019-07-04 Alan Hayward <alan.hayward@arm.com>
4758
4759 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4760 defines.
4761 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4762
2b40fda7
AH
47632019-07-04 Alan Hayward <alan.hayward@arm.com>
4764
4765 * configure.srv: Remove legacy xml.
4766 * linux-aarch64-low.c (initialize_low_arch): Remove
4767 initialize_low_tdesc call.
4768 * linux-aarch64-tdesc-selftest.c: Remove file.
4769 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4770 * linux-x86-low.c (initialize_low_arch): Remove
4771 initialize_low_tdesc call.
4772 * linux-x86-tdesc-selftest.c: Remove file.
4773 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4774
7d10623d
TV
47752019-06-20 Tom de Vries <tdevries@suse.de>
4776
4777 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4778 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4779
8d6a48df
TV
47802019-06-19 Tom de Vries <tdevries@suse.de>
4781
4782 * debug.h (debug_write): Change return type to ssize_t.
4783 * debug.c (debug_write): Same.
4784
73cc7272
TT
47852019-06-14 Tom Tromey <tom@tromey.com>
4786
4787 * configure.ac: Use new path to gnulib.
4788 * configure: Rebuild.
4789 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4790 to gnulib.
4791
08f10e02
TT
47922019-06-11 Tom Tromey <tom@tromey.com>
4793
4794 * Makefile.in (SFILES): Add alloc.c.
4795 (OBS): Add alloc.o.
4796 (IPA_OBJS): Add alloc-ipa.o.
4797 (alloc-ipa.o): New target.
4798 (%.o: ../%.c): New pattern rule.
4799
422186a9
TT
48002019-06-10 Tom Tromey <tromey@adacore.com>
4801
4802 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4803 end warning with a newline.
4804 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4805 newline.
4806 * thread-db.c (attach_thread): Don't end warning with a newline.
4807 (thread_db_notice_clone): Likewise.
4808 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4809 newline.
4810 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4811 end warning with a newline.
4812
b02f78f9
PA
48132019-06-04 Pedro Alves <palves@redhat.com>
4814
4815 * server.c (captured_main): Use make_unique_xstrdup.
4816
88ed7edb
TT
48172019-06-02 Tom Tromey <tom@tromey.com>
4818
4819 * gdbreplay.c (fromhex): Remove.
4820 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4821
33a6bc35
TT
48222019-05-29 Tom Tromey <tromey@adacore.com>
4823
4824 * configure: Rebuild.
4825
e90a813d
KB
48262019-05-06 Kevin Buettner <kevinb@redhat.com>
4827
4828 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4829 sign extension code on 32-bit builds.
4830
353ea2d1
EZ
48312019-05-03 Eli Zaretskii <eliz@gnu.org>
4832
4833 * remote-utils.c:
4834 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4835
b494cdff
TT
48362019-04-19 Tom Tromey <tom@tromey.com>
4837
4838 * server.c (struct vstop_notif): Derive from notif_event.
4839 <base>: Remove.
4840 (queue_stop_reply): Update.
4841 (remove_all_on_match_ptid): Change type. Rewrite.
4842 (discard_queued_stop_replies): Rewrite.
4843 (in_queued_stop_replies_ptid): Change type.
4844 (in_queued_stop_replies): Rewrite.
4845 (notif_stop): Update.
4846 (queue_stop_reply_callback): Update.
4847 (captured_main): Don't call initialize_notif.
4848 (push_stop_notification): Update.
4849 * notif.c (notif_write_event, handle_notif_ack)
4850 (notif_event_enque, notif_push): Update.
4851 (notif_event_xfree, initialize_notif): Remove.
4852 * notif.h (struct notif_event): Include <list>, not
4853 "common/queue.h".
4854 (struct notif_server) <queue>: Now a std::list.
4855 (notif_event_p): Remove typedef.
4856 (initialize_notif): Don't declare.
4857 (struct notif_event): Add virtual destructor.
4858
a7e559cc
AH
48592019-04-17 Alan Hayward <alan.hayward@arm.com>
4860
4861 * ax.c (ax_vdebug): Call debug_printf.
4862 * debug.c (debug_write): New function.
4863 * debug.h (debug_write): New declaration.
4864 * linux-low.c (sigchld_handler): Call debug_write.
4865
aeb2e706
AH
48662019-04-17 Alan Hayward <alan.hayward@arm.com>
4867
4868 * debug.c (debug_set_output): New function.
4869 (debug_vprintf): Send output to debug_file.
4870 (debug_flush): Likewise.
4871 * debug.h (debug_set_output): New declaration.
4872 * server.c (handle_monitor_command): Add debug-file option.
4873 (captured_main): Likewise.
4874
c1bc0935
AH
48752019-04-17 Alan Hayward <alan.hayward@arm.com>
4876
4877 * debug.c (remote_debug): Add definition.
4878 * debug.h (remote_debug): Add declaration.
4879 * hostio.c (remote_debug): Remove declaration.
4880 * remote-utils.c (struct ui_file): Likewise.
4881 (remote_debug): Likewise.
4882 * remote-utils.h (remote_debug): Likewise,
4883 * server.c (remote_debug): Remove definition.
4884
3f52fdbc
KB
48852019-04-10 Kevin Buettner <kevinb@redhat.com>
4886
4887 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
4888 when using a 64-bit gdbserver.
4889
b0319eaa
TT
48902019-04-09 Tom Tromey <tromey@adacore.com>
4891
4892 * linux-low.c (select_event_lwp): Use find_thread_in_random.
4893
eedc3f4f
TT
48942019-04-08 Tom Tromey <tom@tromey.com>
4895
4896 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4897 throw.
4898 (linux_resume_one_lwp): Likewise.
4899
230d2906
TT
49002019-04-08 Tom Tromey <tom@tromey.com>
4901
4902 * gdbreplay.c: Update.
4903 * linux-low.c: Update.
4904 * server.c: Update.
4905
a70b8144
TT
49062019-04-08 Tom Tromey <tom@tromey.com>
4907
4908 * server.c: Use C++ exception handling.
4909 * linux-low.c: Use C++ exception handling.
4910 * gdbreplay.c: Use C++ exception handling.
4911
3d6e9d23
TT
49122019-04-08 Tom Tromey <tom@tromey.com>
4913
4914 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
4915 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
4916 (captured_main, main): Update.
4917 * gdbreplay.c (main): Update.
4918
0570503d
PFC
49192019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4920
4921 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
4922 value in argument pointer, return 1 if the entry is found and 0
4923 otherwise. Move comment.
4924 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
4925 * linux-low.h (linux_get_auxv): Declare.
4926 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
4927
227a9e65
TT
49282019-04-05 Tom Tromey <tromey@adacore.com>
4929
4930 * server.c (gdbserver_usage): Use upper-case for metasyntactic
4931 variables.
4932
69f4c9cc
AH
49332019-03-28 Alan Hayward <alan.hayward@arm.com>
4934
4935 * linux-low.c (AT_HWCAP2): Add define if not already included.
4936
974c89e0
AH
49372019-03-26 Alan Hayward <alan.hayward@arm.com>
4938
4939 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
4940 (aarch64_arch_setup): Call linux_get_hwcap.
4941 * linux-arm-low.c (arm_get_hwcap): Remove function.
4942 (arm_read_description): Call linux_get_hwcap.
4943 * linux-low.c (linux_get_auxv): New function.
4944 (linux_get_hwcap): Likewise.
4945 (linux_get_hwcap2): Likewise.
4946 * linux-low.h (linux_get_hwcap): New declaration.
4947 (linux_get_hwcap2): Likewise.
4948 * linux-ppc-low.c (ppc_get_auxv): Remove function.
4949 (ppc_arch_setup): Call linux_get_hwcap.
4950 * linux-s390-low.c (s390_get_hwcap): Remove function.
4951 (s390_arch_setup): Call linux_get_hwcap.
4952
1ef53e6b
AH
49532019-03-22 Alan Hayward <alan.hayward@arm.com>
4954 Jiong Wang <jiong.wang@arm.com>
4955
4956 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
4957 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
4958 to fail.
4959 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
4960
ee4fbcfa
AH
49612019-03-22 Alan Hayward <alan.hayward@arm.com>
4962 Jiong Wang <jiong.wang@arm.com>
4963
4964 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
4965 (aarch64_get_hwcap): New function.
4966 (aarch64_arch_setup): Read APIA hwcap.
4967
6dc0ebde
AH
49682019-03-22 Alan Hayward <alan.hayward@arm.com>
4969 Jiong Wang <jiong.wang@arm.com>
4970
4971 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
4972 (initialize_low_tracepoint): Likewise.
4973 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
4974 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
4975 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
4976 (aarch64_linux_read_description): Likewise.
4977 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
4978
1163a4b7
JB
49792019-03-12 John Baldwin <jhb@FreeBSD.org>
4980
4981 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4982 i386_create_target_description for 'segments' parameter.
4983 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
4984 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4985 * win32-i386-low.c (i386_arch_setup): Likewise.
4986
d3a70e03
TT
49872019-03-12 Tom Tromey <tromey@adacore.com>
4988
4989 * linux-low.c (iterate_over_lwps): Update.
4990
37991b4f
TT
49912019-03-06 Tom Tromey <tom@tromey.com>
4992
4993 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
4994 (captured_main): Use SCOPE_EXIT.
4995
45950eb6
SDJ
49962019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
4997
4998 * configure.srv: Use '$enable_unittest' instead of '$development'
4999 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5000 case.
5001
43ac54fc
TT
50022019-02-27 Tom Tromey <tromey@adacore.com>
5003
5004 * gdbreplay.c (logchar): Handle \r\n.
5005
df0da8a2
AH
50062019-02-07 Alan Hayward <alan.hayward@arm.com>
5007
5008 * linux-low.c (linux_attach): Add process before lwp.
5009 * server.c (attach_inferior): Check if already attached.
5010
1a5c2598
TT
50112019-02-07 Tom Tromey <tom@tromey.com>
5012
5013 * x86-tdesc.h: Rename include guard.
5014 * x86-low.h: Add include guard.
5015 * wincecompat.h: Rename include guard.
5016 * win32-low.h: Add include guard.
5017 * utils.h: Rename include guard.
5018 * tracepoint.h: Rename include guard.
5019 * tdesc.h: Rename include guard.
5020 * target.h: Rename include guard.
5021 * server.h: Rename include guard.
5022 * remote-utils.h: Rename include guard.
5023 * regcache.h: Rename include guard.
5024 * nto-low.h: Rename include guard.
5025 * notif.h: Add include guard.
5026 * mem-break.h: Rename include guard.
5027 * lynx-low.h: Add include guard.
5028 * linux-x86-tdesc.h: Add include guard.
5029 * linux-s390-tdesc.h: Add include guard.
5030 * linux-ppc-tdesc-init.h: Add include guard.
5031 * linux-low.h: Add include guard.
5032 * linux-aarch64-tdesc.h: Add include guard.
5033 * linux-aarch32-low.h: Add include guard.
5034 * inferiors.h: Rename include guard.
5035 * i387-fp.h: Rename include guard.
5036 * hostio.h: Rename include guard.
5037 * gdbthread.h: Rename include guard.
5038 * gdb_proc_service.h: Rename include guard.
5039 * event-loop.h: Rename include guard.
5040 * dll.h: Rename include guard.
5041 * debug.h: Rename include guard.
5042 * ax.h: Rename include guard.
5043
956cc47c
SN
50442018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5045
5046 PR gdb/23985
5047 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5048 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5049
a0707f3c
TT
50502019-01-25 Tom Tromey <tom@tromey.com>
5051
5052 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5053
0747795c
TT
50542019-01-25 Tom Tromey <tom@tromey.com>
5055
5056 * win32-low.c: Fix common/ includes.
5057 * win32-i386-low.c: Fix common/ includes.
5058 * tracepoint.c: Fix common/ includes.
5059 * thread-db.c: Fix common/ includes.
5060 * target.h: Fix common/ includes.
5061 * symbol.c: Fix common/ includes.
5062 * spu-low.c: Fix common/ includes.
5063 * server.h: Fix common/ includes.
5064 * server.c: Fix common/ includes.
5065 * remote-utils.c: Fix common/ includes.
5066 * regcache.h: Fix common/ includes.
5067 * regcache.c: Fix common/ includes.
5068 * nto-x86-low.c: Fix common/ includes.
5069 * notif.h: Fix common/ includes.
5070 * mem-break.h: Fix common/ includes.
5071 * lynx-low.c: Fix common/ includes.
5072 * lynx-i386-low.c: Fix common/ includes.
5073 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5074 * linux-x86-low.c: Fix common/ includes.
5075 * linux-low.c: Fix common/ includes.
5076 * inferiors.h: Fix common/ includes.
5077 * i387-fp.c: Fix common/ includes.
5078 * hostio.c: Fix common/ includes.
5079 * hostio-errno.c: Fix common/ includes.
5080 * gdbthread.h: Fix common/ includes.
5081 * gdbreplay.c: Fix common/ includes.
5082 * fork-child.c: Fix common/ includes.
5083 * event-loop.c: Fix common/ includes.
5084 * ax.c:
5085 (enum gdb_agent_op): Fix common/ includes.
5086
be6d4f74
TT
50872019-01-21 Tom Tromey <tom@tromey.com>
5088
5089 * tracepoint.c: Fix includes.
5090 * remote-utils.c: Fix includes.
5091 * linux-x86-low.c: Fix includes.
5092
66d91b39
JB
50932019-01-01 Joel Brobecker <brobecker@adacore.com>
5094
5095 * gdbreplay.c (gdbreplay_version): Update copyright year in
5096 version message.
5097 * server.c (gdbserver_version): Likewise.
5098
754e3168
AH
50992018-12-05 Alan Hayward <alan.hayward@arm.com>
5100
5101 * linux-low.c (add_lwp): Switch ordering.
5102
d105de22
TT
51032018-11-29 Tom Tromey <tom@tromey.com>
5104
5105 * win32-low.c (win32_join): Take pid, not process.
5106 * target.h (struct target_ops) <join>: Change argument type.
5107 (join_inferior): Change argument name.
5108 * spu-low.c (spu_join): Take pid, not process.
5109 * server.c (handle_detach): Preserve pid before destroying
5110 process.
5111 * lynx-low.c (lynx_join): Take pid, not process.
5112 * linux-low.c (linux_join): Take pid, not process.
5113
50138245
AH
51142018-11-23 Alan Hayward <alan.hayward@arm.com>
5115
5116 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5117 (aarch64_cannot_fetch_register): Likewise.
5118 (struct linux_target_ops): Update references.
5119
64f57f3d
PFC
51202018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5121
5122 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5123
8d619c01
EBM
51242018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5125
5126 * configure.srv (ipa_ppc_linux_regobj): Add
5127 powerpc-isa207-htm-vsx32l-ipa.o and
5128 powerpc-isa207-htm-vsx64l-ipa.o.
5129 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5130 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5131 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5132 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5133 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5134 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5135 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5136 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5137 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5138 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5139 (init_registers_powerpc_isa207_htm_vsx32l)
5140 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5141 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5142 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5143 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5144 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5145 (ppc_store_tm_ctarregset): New functions.
5146 (ppc_regsets): Add entries for HTM regsets.
5147 (ppc_arch_setup): Set htm in features struct when needed. Set
5148 sizes for the HTM regsets.
5149 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5150 (initialize_low_arch): Call
5151 init_registers_powerpc_isa207_htm_vsx32l and
5152 init_registers_powerpc_isa207_htm_vsx64l.
5153 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5154 PPC_TDESC_ISA207_HTM_VSX.
5155 (initialize_low_tracepoint): Call
5156 init_registers_powerpc_isa207_htm_vsx32l and
5157 init_registers_powerpc_isa207_htm_vsx64l.
5158
232bfb86
EBM
51592018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5160
5161 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5162 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5163 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5164 (ppc_store_pmuregset): New functions.
5165 (ppc_regsets): Add entries for ebb and pmu regsets.
5166 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5167 pmu regsets are available. Set sizes for these regsets.
5168
f2cf6173
EBM
51692018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5170
5171 * configure.srv (ipa_ppc_linux_regobj): Add
5172 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5173 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5174 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5175 rs6000/powerpc-isa207-vsx32l.xml, and
5176 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5177 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5178 <PPC_TDESC_ISA207_VSX>: New enum value.
5179 (init_registers_powerpc_isa207_vsx32l): Declare.
5180 (init_registers_powerpc_isa207_vsx64l): Declare.
5181 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5182 (ppc_store_tarregset): New function.
5183 (ppc_regsets): Add entry for the TAR regset.
5184 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5185 size for the TAR regsets.
5186 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5187 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5188 and init_registers_powerpc_isa207_vsx64l.
5189 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5190 (initialize_low_tracepoint): Call
5191 init_registers_powerpc_isa207_vsx32l and
5192 init_registers_powerpc_isa207_vsx64l.
5193
7ca18ed6
EBM
51942018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5195 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5196
5197 * configure.srv (ipa_ppc_linux_regobj): Add
5198 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5199 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5200 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5201 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5202 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5203 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5204 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5205 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5206 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5207 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5208 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5209 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5210 (ppc_hwcap): Add comment.
5211 (ppc_hwcap2): New global.
5212 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5213 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5214 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5215 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5216 when needed. Set sizes for the the DSCR and PPR regsets.
5217 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5218 (initialize_low_arch): Call
5219 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5220 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5221 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5222 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5223 (initialize_low_tracepoint): Call
5224 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5225 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5226
5c849b22
PFC
52272018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5228
5229 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5230
8ecfd7bd
SDJ
52312018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5232 Simon Marchi <simark@simark.ca>
5233
5234 * acinclude.m4: Include "../selftest.m4".
5235 * configure: Regenerate.
5236 * configure.ac: Use "GDB_AC_SELFTEST".
5237 * configure.srv: Use "$enable_unittests" instead of
5238 "$development" when checking whether unit tests have been
5239 enabled.
5240 * server.c (captured_main): Update message informing that
5241 selftests have been disabled.
5242
96643e35
TT
52432018-10-04 Tom Tromey <tom@tromey.com>
5244
5245 * configure: Rebuild.
5246
da4ae14a
TT
52472018-10-04 Tom Tromey <tom@tromey.com>
5248
5249 * server.c (handle_status): Rename inner "thread".
5250 (process_serial_event): Declare "res" in 'm' case.
5251 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5252 (iterate_over_lwps): Rename inner "thread".
5253 (linux_qxfer_libraries_svr4): Rename inner "len".
5254 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5255
7c619dbd
GB
52562018-10-01 Gary Benson <gbenson@redhat.com>
5257
5258 * gdb_proc_service.h: Moved common code to
5259 common/gdb_proc_service.h.
5260
3795e814
GB
52612018-10-01 Gary Benson <gbenson@redhat.com>
5262
5263 * gdb_proc_service.h: Synchronize comments and whitespace with
5264 GDB's version of this file.
5265
49b036f1
TT
52662018-09-25 Tom Tromey <tom@tromey.com>
5267
5268 * configure: Rebuild.
5269 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5270
8ff03f0b
SM
52712018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5272
5273 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5274 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5275 ($(IPA_LIB)): Sort IPA_OBJS.
5276
a1cd91dc
SM
52772018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5278
5279 * Makefile.in: Remove references to $(ADD_DEPS).
5280
752312ba
TT
52812018-09-16 Tom Tromey <tom@tromey.com>
5282
5283 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5284 variables.
5285 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5286 variables.
5287
f1628857
TT
52882018-09-05 Tom Tromey <tom@tromey.com>
5289
5290 * configure: Rebuild.
5291
ad202fcc
SM
52922018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5293
5294 PR build/23399
5295 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5296
d3d8724a
TT
52972018-08-27 Tom Tromey <tom@tromey.com>
5298
5299 PR build/23087:
5300 * configure: Rebuild.
5301
b4f183d2
TT
53022018-08-27 Tom Tromey <tom@tromey.com>
5303
5304 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5305 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5306 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5307 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5308 (s390x_emit_stack_adjust): Add casts to unsigned char.
5309
4e2aa472
SM
53102018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5311
5312 PR gdb/23374
5313 PR gdb/23375
5314 * server.h (struct client_state) <disable_randomization>:
5315 Initialize to 1.
5316
cf4088a9
SM
53172018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5318
5319 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5320 variable.
5321 (mips_supply_ptrace_register): Likewise.
5322
a0de763e
TT
53232018-07-22 Tom Tromey <tom@tromey.com>
5324
5325 * configure: Rebuild.
5326
b0a7723d
TT
53272018-07-22 Tom Tromey <tom@tromey.com>
5328
5329 * win32-low.c (win32_create_inferior): Remove unused variables.
5330 * gdbreplay.c (remote_open): Remove unused variable.
5331 * remote-utils.c (remote_prepare): Remove unused variable.
5332 * x86-tdesc.h (X86_TDESC_H): Define.
5333 (amd64_expedite_regs): Define conditionally.
5334 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5335 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5336 * remote-utils.c (readchar): Remove unused variable.
5337
a780ef4f
PA
53382018-07-13 Pedro Alves <palves@redhat.com>
5339
5340 * linux-low.c (linux_kill): Change parameter to process_info
5341 pointer instead of pid. Adjust.
5342 * lynx-low.c (lynx_kill): Likewise.
5343 * nto-low.c (nto_kill): Likewise.
5344 * spu-low.c (spu_kill): Likewise.
5345 * win32-low.c (win32_kill): Likewise.
5346 * server.c (handle_v_kill, kill_inferior_callback)
5347 (detach_or_kill_for_exit): Adjust.
5348 * target.c (kill_inferior): Change parameter to process_info
5349 pointer instead of pid. Adjust.
5350 * target.h (struct target_ops) <kill>: Change parameter to
5351 process_info pointer instead of pid. Adjust all implementations
5352 and callers.
5353 (kill_inferior): Likewise.
5354
ef2ddb33
PA
53552018-07-13 Pedro Alves <palves@redhat.com>
5356
5357 * linux-low.c (linux_detach, linux_join): Change parameter to
5358 process_info pointer instead of pid. Adjust.
5359 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5360 * nto-low.c (nto_detach): Likewise.
5361 * spu-low.c (spu_detach, spu_join): Likewise.
5362 * win32-low.c (win32_detach, win32_join): Likewise.
5363 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5364 * target.h (struct target_ops) <detach, join>: Change parameter to
5365 process_info pointer instead of pid. Adjust all implementations
5366 and callers.
5367 (detach_inferior, join_inferior): Rename 'pid' parameter to
5368 'proc'.
5369
c7ab0aef
SDJ
53702018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5371 Jan Kratochvil <jan.kratochvil@redhat.com>
5372 Paul Fertser <fercerpav@gmail.com>
5373 Tsutomu Seki <sekiriki@gmail.com>
5374
5375 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5376 (OBS): Add 'common/netstuff.o'.
5377 (GDBREPLAY_OBS): Likewise.
5378 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5379 (remote_open): Implement support for IPv6
5380 connections.
5381 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5382 and 'wspiapi.h'.
5383 (handle_accept_event): Accept connections from IPv6 sources.
5384 (remote_prepare): Handle IPv6-style hostnames; implement
5385 support for IPv6 connections.
5386 (remote_open): Implement support for printing connections from
5387 IPv6 sources.
5388
31445d10
PA
53892018-07-11 Pedro Alves <palves@redhat.com>
5390
5391 PR gdb/23377
5392 * mem-break.c (any_persistent_commands): Add process_info
5393 parameter and use it instead of relying on the current process.
5394 Change return type to bool.
5395 * mem-break.h (any_persistent_commands): Add process_info
5396 parameter and change return type to bool.
5397 * server.c (handle_detach): Remove require_running_or_return call.
5398 Look up the process_info for the process we're about to detach.
5399 If not found, return back error to GDB. Adjust
5400 any_persistent_commands call to pass down a process pointer.
5401
cb197132
PA
54022018-07-11 Pedro Alves <palves@redhat.com>
5403
5404 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5405 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5406 instead of collect_register_by_name.
5407 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5408 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5409
1b919490
VB
54102018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5411 Pedro Alves <palves@redhat.com>
5412
5413 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5414
d7e15655
TT
54152018-07-03 Tom Tromey <tom@tromey.com>
5416
5417 * linux-low.c: Update.
5418 * lynx-low.c: Update.
5419 * mem-break.c: Update.
5420 * nto-low.c: Update.
5421 * remote-utils.c: Update.
5422 * server.c: Update.
5423 * spu-low.c: Update.
5424 * target.c: Update.
5425 * win32-low.c: Update.
5426
26a57c92
TT
54272018-07-03 Tom Tromey <tom@tromey.com>
5428
5429 * server.c: Update.
5430
0e998d96
TT
54312018-07-03 Tom Tromey <tom@tromey.com>
5432
5433 * linux-low.c: Update.
5434
cc6bcb54
TT
54352018-07-03 Tom Tromey <tom@tromey.com>
5436
5437 * target.c: Update.
5438
e38504b3
TT
54392018-07-03 Tom Tromey <tom@tromey.com>
5440
5441 * linux-low.c: Update.
5442 * linux-mips-low.c: Update.
5443 * lynx-low.c: Update.
5444 * nto-low.c: Update.
5445 * remote-utils.c: Update.
5446 * server.c: Update.
5447 * spu-low.c: Update.
5448 * target.c: Update.
5449 * thread-db.c: Update.
5450
e99b03dc
TT
54512018-07-03 Tom Tromey <tom@tromey.com>
5452
5453 * linux-low.c: Update.
5454 * linux-mips-low.c: Update.
5455 * lynx-low.c: Update.
5456 * mem-break.c: Update.
5457 * nto-low.c: Update.
5458 * remote-utils.c: Update.
5459 * server.c: Update.
5460 * spu-low.c: Update.
5461 * target.c: Update.
5462 * tracepoint.c: Update.
5463
f2907e49
TT
54642018-07-03 Tom Tromey <tom@tromey.com>
5465
5466 * linux-low.c: Update.
5467 * linux-ppc-low.c: Update.
5468 * linux-x86-low.c: Update.
5469 * proc-service.c: Update.
5470 * server.c: Update.
5471 * spu-low.c: Update.
5472 * thread-db.c: Update.
5473 * win32-low.c: Update.
5474
fd79271b
TT
54752018-07-03 Tom Tromey <tom@tromey.com>
5476
5477 * linux-low.c: Update.
5478 * lynx-low.c: Update.
5479 * nto-low.c: Update.
5480 * remote-utils.c: Update.
5481 * spu-low.c: Update.
5482 * thread-db.c: Update.
5483 * win32-low.c: Update.
5484
c0867626
SDJ
54852018-06-29 Joel Brobecker <brobecker@adacore.com>
5486
5487 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5488 parameter in call to 'amd64_create_target_description'.
5489
2512d7ef
JK
54902018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5491
5492 * x86-tdesc.h: Remove executable permission flag.
5493
d0ac1c44
SM
54942018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5495
5496 * configure.ac: Remove AC_PREREQ, add missing quoting.
5497 * configure: Re-generate.
5498 * config.in: Re-generate.
5499 * aclocal.m4: Re-generate.
5500
c4eb05ff
SM
55012018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5502
5503 * tracepoint.h (current_traceframe): Remove declaration.
5504
02895270
AH
55052018-06-18 Alan Hayward <alan.hayward@arm.com>
5506
5507 * linux-aarch64-low.c (is_sve_tdesc): New function.
5508 (aarch64_sve_regs_copy_to_regcache): Likewise.
5509 (aarch64_sve_regs_copy_from_regcache): Likewise.
5510 (aarch64_regs_info): Add SVE checks.
5511 (initialize_low_arch): Initialize SVE.
5512
e9902bfc
AH
55132018-06-18 Alan Hayward <alan.hayward@arm.com>
5514
5515 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5516
fefa175e
AH
55172018-06-11 Alan Hayward <alan.hayward@arm.com>
5518
5519 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5520 (initialize_low_tracepoint): Likewise
5521 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5522 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5523 param.
5524 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5525 checks.
5526 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5527
b91ad3ff
AH
55282018-06-11 Alan Hayward <alan.hayward@arm.com>
5529
5530 * server.h (PBUFSIZ): Increase size
5531
f868386e
AH
55322018-06-11 Alan Hayward <alan.hayward@arm.com>
5533
5534 * regcache.c (regcache::raw_compare): New function.
5535 * regcache.h (regcache::raw_compare): New declaration.
5536
9c861883
AH
55372018-06-11 Alan Hayward <alan.hayward@arm.com>
5538
5539 * regcache.c (new_register_cache): Use new.
5540 (free_register_cache): Use delete.
5541 (register_data): Use const.
5542 (supply_register): Move body inside regcache.
5543 (regcache::raw_supply): New override function.
5544 (collect_register): Move body inside regcache.
5545 (regcache::raw_collect): New override function.
5546 (regcache::get_register_status): New override function.
5547 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5548
40591844
TT
55492018-06-09 Tom Tromey <tom@tromey.com>
5550
5551 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5552 declare queue.
5553 (event_queue): Use std::queue.
5554 (gdb_event_xfree): Remove.
5555 (initialize_event_loop, process_event, wait_for_event): Update.
5556
6341380d
SC
55572018-06-08 Stan Cox <scox@redhat.com>
5558
5559 * win32-low.c (win32_create_inferior): last_ptid and last_status
5560 moved to client_state.
5561
03349c93
PA
55622018-06-08 Pedro Alves <palves@redhat.com>
5563
5564 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5565 common/common-exceptions.o, common/common-utils.o,
5566 common/errors.o, common/print-utils.o and utils.o.
5567 * gdbreplay.c: Include "common-defs.h" instead of the two
5568 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5569 string.h or alloca.h.
5570 (perror_with_name): Delete.
5571 (remote_open): Use xstrdup instead of strdup.
5572 (main): Rename to ...
5573 (captured_main): ... this.
5574 (main): New.
5575
8dcc53b3
TT
55762018-06-08 Tom Tromey <tom@tromey.com>
5577
5578 * linux-low.c (linux_low_read_btrace): Update.
5579
c12a5089
SC
55802018-06-04 Stan Cox <scox@redhat.com>
5581
5582 * server.h (struct client_state): New.
5583 * server.c (cont_thread, general_thread, multi_process)
5584 (report_fork_events, report_vfork_events, report_exec_events)
5585 (report_thread_events, swbreak_feature, hwbreak_feature)
5586 (vCont_supported, disable_randomization, pass_signals)
5587 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5588 Moved to client_state.
5589 * remote-utils.c (remote_debug, noack_mode)
5590 (transport_is_reliable): Moved to client_state.
5591 * tracepoint.c (current_traceframe): Moved to client_state.
5592
5593 Update all callers.
5594 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5595 linux-low.c, remote-utils.h, target.c: Use client_state.
5596
122394f1
AH
55972018-05-31 Alan Hayward <alan.hayward@arm.com>
5598
5599 * configure.srv: Add new c/h file.
5600
95228a0d
AH
56012018-05-31 Alan Hayward <alan.hayward@arm.com>
5602
5603 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5604 null VQ.
5605
d8dab6c3
MR
56062018-05-25 Maciej W. Rozycki <macro@mips.com>
5607
5608 * gdb.arch/mips-fpregset-core.exp: New test.
5609 * gdb.arch/mips-fpregset-core.c: New test source.
5610
81e25b7c
EK
56112018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5612
5613 PR server/23198
5614 * hostio.c (require_int): Do not report overflow for integers
5615 between 0xfffffff and 0x7fffffff.
5616
7e947ad3
MR
56172018-05-22 Maciej W. Rozycki <macro@mips.com>
5618
5619 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5620 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5621 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5622 functions.
5623 (the_low_target): Wire them.
5624
1d75a658
PFC
56252018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5626
5627 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5628 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5629 mode. Call collect_register_by_name with vscr using
5630 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5631 (ppc_store_vrregset): Add and set vscr_offset variable as in
5632 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5633 vscr_offset.
5634
d078308a
PFC
56352018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5636
5637 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5638 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5639 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5640
7273b5fc
PFC
56412018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5642
5643 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5644 (ppc_store_vsxregset): Likewise.
5645 (ppc_fill_vrregset): Likewise.
5646 (ppc_store_vrregset): Likewise.
5647 (ppc_fill_evrregset): Likewise.
5648 (ppc_store_evrregset): Likewise.
5649 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5650 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5651 needed.
5652
2e077f5e
PFC
56532018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5654
5655 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5656 wordsize of the inferior. Call ppc_linux_target_wordsize.
5657
bd64614e
PFC
56582018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5659
5660 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5661 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5662 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5663 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5664 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5665 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5666 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5667 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5668 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5669 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5670 (tdesc_powerpc_e500l): Remove.
5671 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5672 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5673 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5674 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5675 linux-ppc-tdesc.h.
5676 (ppc_arch_setup): Remove target description matching code. Fill a
5677 ppc_linux_features struct and call ppc_linux_match_description
5678 with it.
5679
75d74cca
MR
56802018-05-22 Maciej W. Rozycki <macro@mips.com>
5681
5682 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5683 width of the requested register exceeds the width of the
5684 `ptrace' data type.
5685 (mips_cannot_store_register): Likewise.
5686
e4439e43
MR
56872018-05-21 Maciej W. Rozycki <macro@mips.com>
5688
5689 * linux-mips-low.c (mips_fetch_register): New function. Update
5690 preceding comment.
5691 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5692 (the_low_target): Wire `mips_fetch_register'.
5693
55271bf9
JB
56942018-05-10 Joel Brobecker <brobecker@adacore.com>
5695
5696 * lynx-i386-low.c (LYNXOS_178): New macro.
5697 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5698 the layout on LynxOS-178.
5699 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5700 handle floating point registers that are not supported by
5701 LynxOS-178.
5702
1a34f210
TT
57032018-05-10 Tom Tromey <tom@tromey.com>
5704
5705 * configure: Rebuild.
5706
190852c8
JB
57072018-05-10 Joel Brobecker <brobecker@adacore.com>
5708
5709 PR server/23158:
5710 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5711 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5712 Use it to set the expedite_regs field in the given tdesc.
5713 * x86-tdesc.h: New file.
5714 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5715 Adjust following the addition of the new expedite_regs parameter
5716 to init_target_desc.
5717 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5718 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5719 (i386_linux_read_description, amd64_linux_read_description):
5720 Adjust following the addition of the new expedite_regs parameter
5721 to init_target_desc.
5722 * lynx-i386-low.c: #include "x86-tdesc.h".
5723 (lynx_i386_arch_setup): Adjust following the addition of the new
5724 expedite_regs parameter to init_target_desc.
5725 * nto-x86-low.c: #include "x86-tdesc.h".
5726 (nto_x86_arch_setup): Adjust following the addition of the new
5727 expedite_regs parameter to init_target_desc.
5728 * win32-i386-low.c: #include "x86-tdesc.h".
5729 (i386_arch_setup): Adjust following the addition of the new
5730 expedite_regs parameter to init_target_desc.
5731
7dbac825
JB
57322018-05-10 Joel Brobecker <brobecker@adacore.com>
5733
5734 PR server/23158:
5735 * win32-low.c (win32_create_inferior): Add call to my_wait
5736 setting last_status global.
5737
906994d9
JB
57382018-05-10 Joel Brobecker <brobecker@adacore.com>
5739
5740 PR server/23158:
5741 * win32-low.c (create_process): Only call gdb_tilde_expand if
5742 inferior_cwd is not NULL.
5743
8ee22052
AB
57442018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5745
5746 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5747 registers to the cache if their values have changed.
5748 (i387_xsave_to_cache): Provide default values for x87 control
5749 registers when these features are available, but disabled.
5750 * regcache.c (supply_register_by_name_zeroed): New function.
5751 * regcache.h (supply_register_by_name_zeroed): Declare new
5752 function.
5753
aff689d3
TT
57542018-05-07 Tom Tromey <tom@tromey.com>
5755
5756 * configure: Rebuild.
5757
85e26832
TT
57582018-05-04 Tom Tromey <tom@tromey.com>
5759
5760 * configure: Rebuild.
5761
a3b60e45
JK
57622018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5763 Pedro Alves <palves@redhat.com>
5764
5765 * linux-aarch64-low.c (aarch64_stopped_data_address):
5766 Likewise.
5767
632e107b
TT
57682018-04-27 Tom Tromey <tom@tromey.com>
5769
5770 * configure: Rebuild.
5771
458412c3
TT
57722018-04-23 Tom Tromey <tom@tromey.com>
5773
5774 * configure: Rebuild.
5775
f31c089e
SM
57762018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5777
5778 * Makefile.in (depcomp): Add "..".
5779 (all_deps_files): New and use it.
5780
b319b098
AH
57812018-04-18 Alan Hayward <alan.hayward@arm.com>
5782
5783 * configure.srv (aarch64*-*-linux*): Don't include xml.
5784 (i[34567]86-*-cygwin*): Likewise.
5785 (i[34567]86-*-linux*): Likewise.
5786 (i[34567]86-*-lynxos*): Likewise.
5787 (i[34567]86-*-mingw32ce*): Likewise.
5788 (i[34567]86-*-mingw*): Likewise.
5789 (i[34567]86-*-nto*): Likewise.
5790 (tic6x-*-uclinux): Likewise.
5791 (x86_64-*-linux*): Likewise.
5792 (x86_64-*-mingw*): Likewise.
5793 (x86_64-*-cygwin*): Likewise.
5794
3b74854b
AH
57952018-04-18 Alan Hayward <alan.hayward@arm.com>
5796
5797 * tdesc.c: Remove xml parameter.
5798
e98577a9
AH
57992018-04-18 Alan Hayward <alan.hayward@arm.com>
5800
5801 * server.c (get_features_xml): Remove cast.
5802 * tdesc.c (void target_desc::accept): Fill in function.
5803 (tdesc_get_features_xml): Remove old xml creation.
5804 (print_xml_feature::visit_pre): Add xml vistor.
5805 * tdesc.h (struct target_desc): Make xmltarget mutable.
5806 (tdesc_get_features_xml): Remove declaration.
5807
d278f585
AH
58082018-04-18 Alan Hayward <alan.hayward@arm.com>
5809
5810 * tdesc.c (tdesc_architecture_name): Add new function.
5811 (tdesc_osabi_name): Likewise.
5812 (tdesc_get_features_xml): Use new functions.
5813
eee8a18d
AH
58142018-04-18 Alan Hayward <alan.hayward@arm.com>
5815
5816 * tdesc.c (tdesc_create_flags): Remove.
5817 (tdesc_add_flag): Likewise.
5818 (tdesc_named_type): Likewise.
5819 (tdesc_create_union): Likewise.
5820 (tdesc_create_struct): Likewise.
5821 (tdesc_create_vector): Likewise.
5822 (tdesc_add_bitfield): Likewise.
5823 (tdesc_add_field): Likewise.
5824 (tdesc_set_struct_size): Likewise.
5825
82ec9bc7
AH
58262018-04-18 Alan Hayward <alan.hayward@arm.com>
5827
5828 * tdesc.c (~target_desc): Remove implictly deleted items.
5829 (init_target_desc): Iterate all features.
5830 (tdesc_get_features_xml): Use vector.
5831 (tdesc_create_feature): Create feature.
5832 * tdesc.h (tdesc_feature) Remove
5833 (target_desc): Add features.
5834
ea3e7d71
AH
58352018-04-18 Alan Hayward <alan.hayward@arm.com>
5836
5837 * Makefile.in: Add common/tdesc.c
5838 * tdesc.c (init_target_desc): init all reg_defs from register
5839 vector.
5840 (tdesc_create_reg): Create tdesc_reg.
5841 * tdesc.h (tdesc_feature): Add register vector.
5842
17d08cd4
SM
58432018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5844
5845 * tdesc.h (struct target_desc) <features>: Change type to
5846 std::vector<std::string>.
5847 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5848 changes.
5849 (tdesc_get_features_xml): Likewise.
5850 (tdesc_create_feature): Likewise.
5851
5cd3e386
AH
58522018-03-26 Alan Hayward <alan.hayward@arm.com>
5853
5854 * regcache.c (find_register_by_number): Return a ref.
5855 (find_regno): Use references.
5856 (register_size): Likewise.
5857 (register_data): Likewise.
5858 * tdesc.c (target_desc::~target_desc): Remove free calls.
5859 (target_desc::operator==): Use std::vector compare.
5860 (init_target_desc): Use reference.
5861 (tdesc_create_reg): Use reg constructors.
5862 * tdesc.h (struct target_desc): Replace pointer with object.
5863
dff7492c
AH
58642018-03-23 Alan Hayward <alan.hayward@arm.com>
5865
5866 * regcache.c (find_register_by_number): Make static.
5867 (find_regno): Use find_register_by_number
5868 * regcache.h (struct reg): Remove declaration.
5869
d80e5242
AH
58702018-03-23 Alan Hayward <alan.hayward@arm.com>
5871
5872 * tdesc.c (target_desc::~target_desc): Move to here.
5873 (target_desc::operator==): Likewise.
5874 * tdesc.h (target_desc::~target_desc): Move from here.
5875 (target_desc::operator==): Likewise.
5876
f69c5afb
AA
58772018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5878
5879 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5880
ce29f843
AA
58812018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5882
5883 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5884 S390_TDESC_GS.
5885 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
5886 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
5887 and init_registers_s390_gs_linux64.
5888
c49bd90b
AA
58892018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5890
5891 * linux-s390-low.c (s390_fill_gs): Remove function.
5892 (s390_fill_gsbc): Remove function.
5893 (s390_regsets): Set fill functions for the guarded storage regsets
5894 to NULL.
5895
7edb9bd3
AA
58962018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5897
5898 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
5899 the word size. Add comment.
5900 (s390_get_wordsize): New function.
5901 (s390_arch_setup): No longer select a temporary tdesc to fetch the
5902 pswm with it. Instead, use s390_get_wordsize to determine the
5903 word size first and derive the correct tdesc from that directly.
5904
39be3c7e
SM
59052018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
5906
5907 * Makefile.in: Include silent-rules.mk.
5908 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
5909 (COMPILE): Add ECHO_CXX.
5910 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5911 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
5912 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
5913 (version-generated.c): Add ECHO_GEN.
5914 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
5915 (IPAGENT_COMPILE): Add ECHO_CXX.
5916 (%-generated.c): Add ECHO_REGDAT.
5917
3ae9ce5d
TT
59182018-03-14 Tom Tromey <tom@tromey.com>
5919
5920 PR cli/14977:
5921 * ax.c (ax_printf): Special case for NULL.
5922
e6a58aa8
SM
59232018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5924
5925 * linux-low.c (linux_qxfer_libraries_svr4): Use
5926 xml_escape_text_append.
5927
f6e8a41e
SM
59282018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
5929
5930 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
5931
b9671caf
SM
59322018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5933
5934 * server.c (handle_general_set): Remove unnecessary xstrdup.
5935
e80aaf61
SM
59362018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
5937
5938 * server.c (parse_debug_format_options): Adjust to
5939 delim_string_to_char_ptr_vec changes.
5940 * thread-db.c (thread_db_load_search): Adjust to
5941 dirnames_to_char_ptr_vec changes.
5942
b1223e78
MM
59432018-03-01 Markus Metzger <markus.t.metzger@intel.com>
5944
5945 * target.h (target_enable_btrace, target_disable_btrace)
5946 (target_read_btrace, target_read_btrace_conf): Turn macro into
5947 inline function. Throw error if target method is not defined.
5948 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
5949 check for btrace target method. Be prepared to handle exceptions
5950 from btrace target methods.
5951
81561546
SDJ
59522018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5953
5954 * server.c (captured_main): Change order of error message printed
5955 when the current working directory cannot be found.
5956
25e3c82c
SDJ
59572018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5958
5959 * server.c: Include "filenames.h" and "pathstuff.h".
5960 (program_name): Delete variable.
5961 (program_path): New anonymous class.
5962 (get_exec_wrapper): Use "program_path" instead of
5963 "program_name".
5964 (handle_v_run): Likewise.
5965 (captured_main): Likewise.
5966 (process_serial_event): Likewise.
5967
b4987c95
SDJ
59682018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
5969
5970 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
5971 (OBJS): Add "pathstuff.o".
5972 * server.c (current_directory): New global variable.
5973 (captured_main): Initialize "current_directory".
5974
f46cd62a
AH
59752018-02-26 Alan Hayward <alan.hayward@arm.com>
5976
5977 * tdesc.c: Use common/tdesc.h.
5978 * tdesc.h: Likewise.
5979
a543c5ca
AH
59802018-02-20 Alan Hayward <alan.hayward@arm.com>
5981 Simon Marchi <simon.marchi@ericsson.com>
5982
5983 * Makefile.in: Switch order of make rules.
5984
b5884fa7
AH
59852018-02-19 Alan Hayward <alan.hayward@arm.com>
5986
5987 * Makefile.in: Add common directory in build.
5988 * configure.ac: Add common reference.
5989 * configure: Regenerate.
5990
de6242d3
MM
59912018-02-09 Markus Metzger <markus.t.metzger@intel.com>
5992
5993 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
5994 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
5995 * spu-low.c (spu_target_ops): Likewise.
5996 * win32-low.c (win32_target_ops): Likewise.
5997 * server.c (supported_btrace_packets): Report packets unconditionally.
5998 * target.h (target_ops) <supports_btrace>: Remove.
5999 (target_supports_btrace): Remove.
6000
9ee23a85
MM
60012018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6002
6003 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6004 (handle_btrace_disable): Change return type to void. Use exceptions
6005 to report errors.
6006 (handle_btrace_general_set): Catch exception and copy message to
6007 return message.
6008
8ce47547
TT
60092018-02-08 Tom Tromey <tom@tromey.com>
6010
6011 * linux-low.c (install_software_single_step_breakpoints): Use
6012 make_scoped_restore.
6013 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6014 (do_restore_current_thread_cleanup): Remove.
6015 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6016 declare.
6017
45dd3607
TT
60182018-02-08 Tom Tromey <tom@tromey.com>
6019
6020 * mem-break.c (set_raw_breakpoint_at): Use
6021 gdb::unique_xmalloc_ptr.
6022
e671cd59
PA
60232018-01-30 Pedro Alves <palves@redhat.com>
6024
6025 PR gdb/13211
6026 * target.c (target_terminal::terminal_state): Rename to ...
6027 (target_terminal::m_terminal_state): ... this.
6028
a0aad537
JC
60292018-01-19 James Clarke <jrtc27@jrtc27.com>
6030
6031 * linux-low.c (handle_extended_wait): Surround call to
6032 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6033
4d9b86e1
SM
60342018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6035
6036 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6037 linux_ptrace_attach_fail_reason_string now returning an
6038 std::string.
6039 (linux_attach): Likewise.
6040 * thread-db.c (attach_thread): Likewise.
6041
f517c180
EA
60422018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6043
6044 PR gdb/21559
6045 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6046 checking for fs_base/gs_base fields in struct user_regs_struct.
6047 * configure: Regenerate.
6048
9a70f35c
YQ
60492018-01-16 Yao Qi <yao.qi@linaro.org>
6050
6051 PR gdb/18749
6052 * linux-low.c (fetch_register): Call supply_register instead of
6053 error.
6054
605fd3c6
YQ
60552018-01-08 Yao Qi <yao.qi@linaro.org>
6056 Simon Marchi <simon.marchi@ericsson.com>
6057
6058 * Makefile.in (OBS): Remove selftest.o.
6059 * configure.ac: Set srv_selftest_objs if $development is true.
6060 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6061 * configure: Re-generated.
6062 * server.c (captured_main): Wrap variable selftest_filter with
6063 GDB_SELF_TEST.
6064
2cc05030
SM
60652018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6066
6067 * server.c (parse_debug_format_options): Return std::string.
6068 (handle_monitor_command, captured_main): Adjust.
6069
e379cee6
PA
60702018-01-05 Pedro Alves <palves@redhat.com>
6071
6072 PR gdb/18653
6073 * server.c (captured_main): Pass quiet=false to
6074 save_original_signals_state.
6075
82e1e79a
JB
60762018-01-01 Joel Brobecker <brobecker@adacore.com>
6077
6078 * gdbreplay.c (gdbreplay_version): Update copyright year in
6079 version message.
6080 * server.c (gdbserver_version): Likewise.
6081
8e481c3b
TT
60822017-12-08 Tom Tromey <tom@tromey.com>
6083
6084 * ax.c (ax_printf): Update.
6085
a8806230
YQ
60862017-12-07 Yao Qi <yao.qi@linaro.org>
6087
6088 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6089 aarch64_linux_read_description.
6090 * linux-amd64-ipa.c (idx2mask): New array.
6091 (get_ipa_tdesc): Move idx2mask out.
6092 (initialize_low_tracepoint): Initialize target descriptions.
6093 * linux-i386-ipa.c (idx2mask): New array.
6094 (get_ipa_tdesc): Move idx2mask out.
6095 (initialize_low_tracepoint): Initialize target descriptions.
6096
d4a0e8b5
SM
60972017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6098
6099 * tdesc.c (struct tdesc_type): Change return type.
6100 (tdesc_add_flag): Change parameter type.
6101 (tdesc_add_bitfield): Likewise.
6102 (tdesc_add_field): Likewise.
6103 (tdesc_set_struct_size): Likewise.
6104
798a7429
SM
61052017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6106
6107 * regcache.c (registers_to_string): Remove unused variable.
6108
c0e15c9b
SM
61092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6110
6111 * inferiors.c (for_each_inferior_with_data): Remove.
6112 * inferiors.h (for_each_inferior_with_data): Remove.
6113 * server.c (handle_qxfer_threads_worker): Change parameter type.
6114 (handle_qxfer_threads_proper): Use for_each_thread.
6115
f0045347
SM
61162017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6117
6118 * inferiors.c (for_each_inferior): Remove.
6119 (clear_inferiors): Use for_each_thread.
6120 * inferiors.h (for_each_inferior): Remove.
6121 * linux-low.c (linux_wait_for_event_filtered): Use
6122 for_each_thread.
6123 (linux_stabilize_threads): Likewise.
6124 * regcache.c (regcache_release): Likewise.
6125 * server.c (gdb_wants_all_threads_stopped): Likewise.
6126 (clear_pending_status_callback): Remove.
6127 (handle_status): Use for_each_thread.
6128 (captured_main): Likewise.
6129 * win32-low.c (child_init_thread_list): Likewise.
6130 (win32_clear_inferiors): Likewise.
6131 (fake_breakpoint_event): Likewise.
6132
9521758b
SM
61332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6134
6135 * inferiors.h (find_inferior): Remove.
6136 * inferiors.c (find_inferior): Remove.
6137
8f86d7aa
SM
61382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6139
6140 * linux-low.c (resume_status_pending_p): Update comment.
6141 (need_step_over_p): Update comment.
6142
e2b44075
SM
61432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6144
6145 * linux-low.c (proceed_one_lwp): Return void, change parameter
6146 type.
6147 (unsuspend_and_proceed_one_lwp): Likewise.
6148 (proceed_all_lwps): Use for_each_thread.
6149 (unstop_all_lwps): Likewise.
6150
c80825ff
SM
61512017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6152
6153 * linux-low.c (linux_resume_one_thread): Return void, take
6154 parameter directly.
6155 (linux_resume): Use for_each_thread.
6156
df3e4dbe
SM
61572017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6158
6159 * linux-low.c (send_sigstop_callback): Return void, change
6160 parameter type. Rename to...
6161 (send_sigstop): ... this.
6162 (suspend_and_send_sigstop_callback): Return void, change parameter
6163 type. Rename to...
6164 (suspend_and_send_sigstop): ... this.
6165 (stop_all_lwps): Use for_each_thread.
6166
5a6b0a41
SM
61672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6168
6169 * linux-low.c (lwp_running): Return bool, remove unused
6170 argument.
6171 (linux_stabilize_threads): Use find_thread.
6172
39a64da5
SM
61732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6174
6175 * linux-low.c (select_singlestep_lwp_callback): Remove.
6176 (count_events_callback): Remove.
6177 (select_event_lwp_callback): Remove.
6178 (select_event_lwp): Use find_thread/for_each_thread.
6179
a1385b7b
SM
61802017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6181
6182 * linux-low.c (not_stopped_callback): Return bool, take filter
6183 argument directly.
6184 (linux_wait_for_event_filtered): Use find_thread.
6185 (linux_wait_1): Likewise.
6186
454296a2
SM
61872017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6188
6189 * linux-low.c (same_lwp): Remove.
6190 (find_lwp_pid): Use find_thread.
6191
6b2a85da
SM
61922017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6193
6194 * linux-low.c (delete_lwp_callback): Remove.
6195 (linux_mourn): Use for_each_thread.
6196
798a38e8
SM
61972017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6198
6199 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6200 args parameter, don't check for pid.
6201 (linux_detach): Use for_each_thread.
6202
e4eb0dec
SM
62032017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6204
6205 * linux-low.c (struct counter): Remove.
6206 (second_thread_of_pid_p): Remove.
6207 (last_thread_of_process_p): Use find_thread.
6208
83e1b6c1
SM
62092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6210
6211 * inferiors.c (find_inferior_in_random): Remove.
6212 * inferiors.h (find_inferior_in_random): Remove.
6213 * linux-low.c (status_pending_p_callback): Return bool, accept
6214 parameter ptid directly.
6215 (linux_wait_for_event_filtered): Use find_thread_in_random.
6216 (linux_wait_1): Likewise.
6217
8dc7b443
SM
62182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6219
6220 * inferiors.c (find_inferior_id): Remove.
6221 (find_thread_ptid): Move implemention from find_inferior_id to
6222 here.
6223 * inferiors.h (find_inferior_id): Remove.
6224 * server.c (handle_status): Use find_thread_ptid.
6225 (process_serial_event): Likewise.
6226 * thread-db.c (find_one_thread): Likewise.
6227 (thread_db_thread_handle): Likewise.
6228 * win32-low.c (thread_rec): Likewise.
6229 (child_delete_thread): Likewise.
6230 (win32_thread_alive): Likewise.
6231 (get_child_debug_event): Likewise.
6232
da25033c
SM
62332017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6234
6235 * linux-mips-low.c (update_watch_registers_callback): Return
6236 void, remove pid_p parameter, don't check for pid.
6237 (mips_insert_point, mips_remove_point): Use for_each_thread.
6238
c91bb56b
SM
62392017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6240
6241 * lynx.low (lynx_delete_thread_callback): Remove.
6242 (lynx_mourn): Use for_each_thread.
6243
634a3254
SM
62442017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6245
6246 * regcache.c (regcache_invalidate_one): Remove.
6247 (regcache_invalidate_pid): use for_each_thread.
6248
41272101
TT
62492017-11-26 Tom Tromey <tom@tromey.com>
6250
6251 * linux-low.c (linux_create_inferior): Update.
6252
f5291a6f
UW
62532017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6254
6255 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6256
6654d750
AH
62572017-11-24 Alan Hayward <alan.hayward@arm.com>
6258
6259 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6260 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6261 * linux-aarch64-tdesc-selftest.c: New file.
6262 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6263
62642017-11-24 Alan Hayward <alan.hayward@arm.com>
6265
6266 * configure.srv: Add new file.
6267 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6268 * linux-aarch64-tdesc-selftest.c: New file.
6269 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6270
49bdb7ee
AH
62712017-11-24 Alan Hayward <alan.hayward@arm.com>
6272
6273 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6274 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6275 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6276
d6d7ce56
AH
62772017-11-24 Alan Hayward <alan.hayward@arm.com>
6278
6279 * configure.srv: Add new files.
6280 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6281 aarch64_linux_read_description.
6282 * linux-aarch64-low.c (aarch64_linux_read_description):
6283 Merge with aarch64_arch_setup.
6284 (aarch64_arch_setup): Call aarch64_linux_read_description.
6285 * linux-aarch64-tdesc.c: New file.
6286 * linux-aarch64-tdesc.h: New file.
6287
506fe5f4
YQ
62882017-11-24 Yao Qi <yao.qi@linaro.org>
6289
6290 * configure.srv: Set $srv_regobj for tic6x-linux.
6291 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6292 (tic6x_read_description): Move some code to tic6x_arch_setup.
6293 (tic6x_tdesc_test): New function.
6294 (initialize_low_arch): Call selftests::register_test.
6295
29f9a567
YQ
62962017-11-22 Yao Qi <yao.qi@linaro.org>
6297
6298 * remote-utils.c (prepare_resume_reply): Use memcpy.
6299
578290ec
SM
63002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6301
6302 * linux-low.c (kill_one_lwp_callback): Return void, take
6303 argument directly, don't filter on pid.
6304 (linux_kill): Use for_each_thread.
6305
eca55aec
SM
63062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6307
6308 * linux-low.c (need_step_over_p): Return bool, remove dummy
6309 argument.
6310 (linux_resume, proceed_all_lwps): Use find_thread.
6311
25c28b4d
SM
63122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6313
6314 * linux-low.c (resume_status_pending_p): Return bool, remove
6315 flag_p argument.
6316 (linux_resume): Use find_thread.
6317
5fdda392
SM
63182017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6319
6320 * linux-low.c (struct thread_resume_array): Remove.
6321 (linux_set_resume_request): Return void, take arguments
6322 directly.
6323 (linux_resume): Use for_each_thread.
6324
fcb056a5
SM
63252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6326
6327 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6328 return bool, remove data argument.
6329 (linux_stabilize_threads): Use find_thread.
6330
139720c5
SM
63312017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6332
6333 * linux-low.c (unsuspend_one_lwp): Remove.
6334 (unsuspend_all_lwps): Use for_each_thread, inline code from
6335 unsuspend_one_lwp.
6336
6d1e5673
SM
63372017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6338
6339 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6340 * linux-low.c (struct iterate_over_lwps_args): Remove.
6341 (iterate_over_lwps_filter): Remove.
6342 (iterate_over_lwps): Use find_thread.
6343
bbf550d5
SM
63442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6345
6346 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6347 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6348 code from reset_lwp_ptrace_options_callback.
6349
00192f77
SM
63502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6351
6352 * linux-arm-low.c (struct update_registers_data): Remove.
6353 (update_registers_callback): Return void, take arguments
6354 directly, don't check thread's pid.
6355 (arm_insert_point, arm_remove_point): Use for_each_thread.
6356
2bee2b6c
SM
63572017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6358
6359 * win32-low.c (continue_one_thread): Return void, take argument
6360 directly.
6361 (child_continue): Use for_each_thread.
6362
0b360f19
SM
63632017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6364
6365 * win32-i386-low.c (update_debug_registers_callback): Rename
6366 to ...
6367 (update_debug_registers): ... this, return void, remove pid_p arg.
6368 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6369
f27866ba
SM
63702017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6371
6372 * inferiors.h (struct process_info): Add constructor, initialize
6373 fields..
6374 <syscalls_to_catch>: Change type to std::vector<int>.
6375 * inferiors.c (add_process): Allocate process_info with new.
6376 (remove_process): Free process_info with delete.
6377 * linux-low.c (handle_extended_wait): Adjust.
6378 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6379 * server.c (handle_general_set): Adjust.
6380
e849ea89
PA
63812017-11-16 Pedro Alves <palves@redhat.com>
6382
6383 * remote-utils.c (remote_close): Block SIGIO signals instead of
6384 uninstalling the SIGIO handler.
6385
1d0aa65c
AH
63862017-11-16 Alan Hayward <alan.hayward@arm.com>
6387
6388 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6389
3491a34c
YQ
63902017-11-16 Yao Qi <yao.qi@linaro.org>
6391
6392 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6393 (tic6x_store_gregset): Likewise.
6394 (tic6x_usrregs_info): Move it up.
6395
a602f924
AH
63962017-11-15 Alan Hayward <alan.hayward@arm.com>
6397
6398 * Makefile.in: Update arch rules.
6399 * configure.srv: Explicitly mark arch/ files.
6400
5616b6c3
AS
64012017-11-13 Andreas Schwab <schwab@suse.de>
6402
6403 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6404 function.
6405 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6406
d1928160
PA
64072017-11-06 Pedro Alves <palves@redhat.com>
6408
6409 * config.in, configure: Regenerate.
6410
bac608e7
SM
64112017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6412
6413 * target.c (struct thread_search): Remove.
6414 (thread_search_callback): Remove.
6415 (prepare_to_access_memory): Use for_each_thread instead of
6416 find_inferior. Inline code from thread_search_callback.
6417
eaddb425
SM
64182017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6419
6420 * server.c (struct visit_actioned_threads_data): Remove.
6421 (visit_actioned_threads): Change prototype to take arguments
6422 directly.
6423 (resume): Use find_thread instead of find_inferior.
6424
99078d34
SM
64252017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6426
6427 * server.c (queue_stop_reply_callback): Change prototype, return
6428 void.
6429 (find_status_pending_thread_callback): Remove.
6430 (handle_status): Replace find_inferior with find_thread and
6431 for_each_thread.
6432
cc628f3d
AH
64332017-10-25 Alan Hayward <alan.hayward@arm.com>
6434
6435 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6436 with REGNO.
6437 (aarch64_store_gregset): Likewise.
6438 (aarch64_fill_fpregset): Likewise.
6439 (aarch64_store_fpregset): Likewise.
6440
4d3bb80e
SM
64412017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6442
6443 * gdbthread.h (find_thread, for_each_thread): New functions.
6444 * inferiors.c (thread_of_pid): Remove.
6445 (find_any_thread_of_pid): Use find_thread.
6446 * linux-low.c (num_lwps): Use for_each_thread.
6447
7a7cdfa0
YQ
64482017-10-17 Yao Qi <yao.qi@linaro.org>
6449
6450 * Makefile.in: Remove one rule.
6451 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6452
e675d170
YQ
64532017-10-17 Yao Qi <yao.qi@linaro.org>
6454
6455 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6456 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6457
7eb4e0f9
YQ
64582017-10-17 Yao Qi <yao.qi@linaro.org>
6459
6460 * configure.srv: Rename arm.o with arch/arm.o.
6461
60d6cfc9
YQ
64622017-10-17 Yao Qi <yao.qi@linaro.org>
6463
6464 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6465 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6466 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6467 (arch-i386.o, arch-amd64.o): Remove rules.
6468 (arch/%.o): New rule.
6469 Update POSTCOMPILE and COMPILE.pre.
6470 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6471 * configure: Re-generated.
6472 * configure.srv: Replace arch-i386.o with arch/i386.o.
6473 Replace arch-amd64.o with arch/amd64.o.
6474
5bfda255
YQ
64752017-10-16 Yao Qi <yao.qi@linaro.org>
6476
6477 * configure: Regenerated.
6478
9c80ecd6
SM
64792017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6480
6481 * inferiors.h: (struct inferior_list): Remove.
6482 (struct inferior_list_entry); Remove.
6483 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6484 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6485 get_first_inferior): Remove.
6486 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6487 find_inferior_id, find_inferior_in_random): Change signature.
6488 * inferiors.c (all_threads): Change type to
6489 std::list<thread_info *>.
6490 (get_thread): Remove macro.
6491 (find_inferior, find_inferior_id): Change signature, implement
6492 using find_thread.
6493 (find_inferior_in_random): Change signature, implement using
6494 find_thread_in_random.
6495 (for_each_inferior, for_each_inferior_with_data): Change
6496 signature, implement using for_each_thread.
6497 (add_inferior_to_list, remove_inferior): Remove.
6498 (add_thread, get_first_thread, thread_of_pid,
6499 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6500 (get_first_inferior, one_inferior_p, clear_inferior_list):
6501 Remove.
6502 (clear_inferiors, get_thread_process): Update.
6503 * gdbthread.h: Include <list>.
6504 (struct thread_info) <entry>: Remove field.
6505 <id>: New field.
6506 (all_threads): Change type to std::list<thread_info *>.
6507 (get_first_inferior): Add doc.
6508 (find_thread, for_each_thread, find_thread_in_random): New
6509 functions.
6510 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6511 * linux-arm-low.c (update_registers_callback): Update.
6512 * linux-low.c (second_thread_of_pid_p): Update.
6513 (kill_one_lwp_callback, linux_detach_lwp_callback,
6514 delete_lwp_callback, status_pending_p_callback, same_lwp,
6515 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6516 iterate_over_lwps, not_stopped_callback,
6517 resume_stopped_resumed_lwps, count_events_callback,
6518 select_singlestep_lwp_callback, select_event_lwp_callback,
6519 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6520 suspend_and_send_sigstop_callback, wait_for_sigstop,
6521 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6522 lwp_running, linux_set_resume_request, resume_status_pending_p,
6523 need_step_over_p, start_step_over, linux_resume_one_thread,
6524 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6525 reset_lwp_ptrace_options_callback): Update.
6526 * linux-mips-low.c (update_watch_registers_callback): Update.
6527 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6528 Update.
6529 (free_register_cache_thread_one): Remove.
6530 (regcache_release): Update.
6531 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6532 handle_qxfer_threads_worker): Update.
6533 (handle_query): Update, use list iterator.
6534 (visit_actioned_threads, handle_pending_status,
6535 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6536 clear_pending_status_callback, set_pending_status_callback,
6537 find_status_pending_thread_callback, handle_status,
6538 process_serial_event): Update.
6539 * target.c (thread_search_callback): Update.
6540 * thread-db.c (thread_db_get_tls_address): Update.
6541 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6542 Update.
6543 * win32-i386-low.c (update_debug_registers_callback): Update.
6544 * win32-low.c (delete_thread_info, child_delete_thread,
6545 continue_one_thread, suspend_one_thread,
6546 get_child_debug_event): Adjust.
6547
9179355e
SM
65482017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6549
6550 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6551 * inferiors.h: Include <list>.
6552 (struct process_info) <entry>: Remove field.
6553 <pid>: New field.
6554 (pid_of): Change macro to function.
6555 (ptid_of, lwpid_of): Remove macro.
6556 (all_processes): Change type to std::list<process_info *>.
6557 (ALL_PROCESSES): Remove macro.
6558 (for_each_process, find_process): New function.
6559 * inferiors.c (all_processes): Change type to
6560 std::list<process_info *>.
6561 (find_thread_process): Adjust.
6562 (add_process): Likewise.
6563 (remove_process): Likewise.
6564 (find_process_pid): Likewise.
6565 (get_first_process): Likewise.
6566 (started_inferior_callback): Remove.
6567 (have_started_inferiors_p): Adjust.
6568 (attached_inferior_callback): Remove.
6569 (have_attached_inferiors_p): Adjust.
6570 * linux-low.c (check_zombie_leaders): Likewise.
6571 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6572 (x86_linux_update_xmltarget): Adjust.
6573 * server.c (handle_query): Likewise.
6574 (gdb_reattached_process): Remove.
6575 (handle_status): Adjust.
6576 (kill_inferior_callback): Likewise.
6577 (detach_or_kill_inferior): Remove.
6578 (print_started_pid): Likewise.
6579 (print_attached_pid): Likewise.
6580 (detach_or_kill_for_exit): Update.
6581 (process_serial_event): Likewise.
6582 * linux-arm-low.c (arm_new_fork): Likewise.
6583
c9cb8905
SM
65842017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6585
6586 * dll.h: Include <list>.
6587 (struct dll_info): Add constructor.
6588 <entry>: Remove field.
6589 (all_dlls): Change type to std::list<dll_info>.
6590 * dll.c: Include <algorithm>.
6591 (get_dll): Remove macro.
6592 (all_dlls): Change type to std::list<dll_info *>.
6593 (free_one_dll): Remove.
6594 (match_dll): Likewise.
6595 (loaded_dll): Adjust.
6596 (unloaded_dll): Adjust to all_dlls type change, use
6597 std::find_if. Inline code from match_dll.
6598 (clear_dlls): Adjust to all_dlls type change.
6599 * server.c (emit_dll_description): Remove.
6600 (handle_qxfer_libraries): Adjust to all_dlls type change,
6601 integrate emit_dll_description's functionality.
6602
04ec7890
SM
66032017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6604
6605 * linux-low.h (struct linux_target_ops) <delete_process>: New
6606 field.
6607 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6608 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6609 (struct linux_target_ops): Add delete_process callback.
6610 * linux-arm-low.c (arm_delete_process): New.
6611 (struct linux_target_ops): Add delete_process callback.
6612 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6613 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6614 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6615 * linux-mips-low.c (mips_linux_delete_process): New.
6616 (struct linux_target_ops): Add delete_process callback.
6617 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6618 * linux-s390-low.c (struct linux_target_ops): Likewise.
6619 * linux-sh-low.c (struct linux_target_ops): Likewise.
6620 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6621 * linux-tile-low.c (struct linux_target_ops): Likewise.
6622 * linux-x86-low.c (x86_linux_delete_process): New.
6623 (struct linux_target_ops): Add delete_process callback.
6624 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6625
466eecee
SM
66262017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6627
6628 * linux-aarch64-low.c (the_low_target): Add thread delete
6629 callback.
6630 * linux-arm-low.c (arm_delete_thread): New function.
6631 (the_low_target): Add thread delete callback.
6632 * linux-bfin-low.c (the_low_target): Likewise.
6633 * linux-crisv32-low.c (the_low_target): Likewise.
6634 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6635 set.
6636 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6637 field.
6638 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6639 * linux-mips-low.c (mips_linux_delete_thread): New function.
6640 (the_low_target): Add thread delete callback.
6641 * linux-ppc-low.c (the_low_target): Likewise.
6642 * linux-s390-low.c (the_low_target): Likewise.
6643 * linux-sh-low.c (the_low_target): Likewise.
6644 * linux-tic6x-low.c (the_low_target): Likewise.
6645 * linux-tile-low.c (the_low_target): Likewise.
6646 * linux-x86-low.c (the_low_target): Likewise.
6647 * linux-xtensa-low.c (the_low_target): Likewise.
6648
b79f7801
YZ
66492017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6650
6651 * win32-low.c: Include "common-inferior.h".
6652
bc3b087d
SDJ
66532017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6654
6655 * inferiors.c (set_inferior_cwd): New function.
6656 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6657 (handle_query): Inform that QSetWorkingDir is supported.
6658 * win32-low.c (create_process): Pass the inferior's cwd to
6659 CreateProcess.
6660
d092c5a2
SDJ
66612017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6662
6663 * inferiors.c (current_inferior_cwd): New global variable.
6664 (get_inferior_cwd): New function.
6665 * inferiors.h (struct process_info) <cwd>: New field.
6666
7da0a886
SDJ
66672017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6668
6669 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6670 (OBS): Add gdb_tilde_expand.o.
6671
289a6840
SM
66722017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6673
6674 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6675 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6676
256642e8
PA
66772017-09-29 Pedro Alves <palves@redhat.com>
6678
6679 * ax.c (gdb_parse_agent_expr): Constify.
6680 * ax.h (gdb_parse_agent_expr): Constify.
6681 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6682 Constify.
6683 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6684 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6685 * remote-utils.h (read_ptid): Constify.
6686 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6687 (process_point_options, process_serial_event): Constify.
6688 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6689 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6690 (cmd_qtbuffer): Constify.
6691
5b9ca4d4
PA
66922017-09-29 Pedro Alves <palves@redhat.com>
6693
6694 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6695 fails.
6696
94c207e0
PA
66972017-09-29 Pedro Alves <palves@redhat.com>
6698
6699 * linux-low.c (handle_extended_wait): Pass parent thread instead
6700 of process to thread_db_notice_clone.
6701 * linux-low.h (thread_db_notice_clone): Replace parent process
6702 parameter with parent thread parameter.
6703 * thread-db.c (find_one_thread): Add comment.
6704 (thread_db_notice_clone): Replace parent process parameter with
6705 parent thread parameter. Temporarily switch to the parent thread.
6706
75352e28
SDJ
67072017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6708
6709 * gdbthread.h: Include "common-gdbthread.h".
6710 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6711 "if" when validating the ptid.
6712 * remote-utils.c: Include "gdbthread.h".
6713 (prepare_resume_reply): Use "switch_to_thread".
6714 * target.c (done_accessing_memory): Likewise.
6715
ad339634
AA
67162017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6717
6718 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6719 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6720 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6721 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6722 s390x-gs-linux64-ipa.o to ipa_obj.
6723 * linux-s390-low.c (HWCAP_S390_GS): New define.
6724 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6725 New functions.
6726 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6727 (s390_arch_setup): Check for guarded-storage support and choose
6728 appropriate tdesc.
6729 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6730 init_registers_s390x_gs_linux64.
6731 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6732 enum value.
6733 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6734 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6735
cc4d742f
SM
67362017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6737
6738 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6739
f6327dcb
KB
67402017-09-21 Kevin Buettner <kevinb@redhat.com>
6741
6742 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6743 (thread_db_thread_handle): Declare.
6744 * linux-low.c (linux_target_ops): Initialize thread_handle.
6745 * server.c (handle_qxfer_threads_worker): Add support for
6746 "handle" attribute.
6747 * target.h (struct target_ops): Add new function pointer,
6748 thread_handle.
6749 (target_thread_handle): Define.
6750 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6751 field in lwp.
6752 (thread_db_thread_handle): New function.
6753
86299109
KB
67542017-09-21 Kevin Buettner <kevinb@redhat.com>
6755
6756 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6757 * linux-low.h (thread_db_notice_clone): Declare.
6758 * thread-db.c (thread_db_notice_clone): New function.
6759
f557a88a
PA
67602017-09-21 Pedro Alves <palves@redhat.com>
6761
6762 * server.c (gdb_read_memory, handle_status, process_serial_event)
6763 (handle_serial_event, handle_target_event): Adjust to
6764 set_desired_thread prototype change.
6765 * target.c (set_desired_thread): Remove 'use_general' parameter
6766 and adjust.
6767 * target.h (set_desired_thread): Remove 'use_general' parameter.
6768
223ffa71
TT
67692017-09-20 Tom Tromey <tom@tromey.com>
6770
6771 * target.c (target_terminal::terminal_state): Define.
6772 (target_terminal::init): Rename from target_terminal_init.
6773 (target_terminal::inferior): Rename from
6774 target_terminal_inferior.
6775 (target_terminal::ours): Rename from target_terminal_ours.
6776 (target_terminal::ours_for_output, target_terminal::info): New.
6777
04fd3ba9
SM
67782017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6779
6780 * server.c (accumulate_file_name_length): Remove.
6781 (emit_dll_description): Adjust to std::string change.
6782 (handle_qxfer_libraries): Use std::string to hold document.
6783
5e187554
SM
67842017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6785
6786 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6787 return type of xml_escape_text.
6788 * server.c (emit_dll_description): Likewise.
6789
1526853e
SM
67902017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6791
6792 * server.c (captured_main): Accept argument for --selftest.
6793 Update run_tests call.
6794 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6795 when registering selftests.
6796
c4dfafab
SDJ
67972017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6798
6799 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6800 instead of "VEC" for "target_desc.reg_defs".
6801 (regcache_cpy): Likewise.
6802 (registers_to_string): Likewise.
6803 (registers_from_string): Likewise.
6804 (find_regno): Likewise.
6805 (supply_regblock): Likewise.
6806 (regcache_raw_read_unsigned): Likewise.
6807 * tdesc.c (init_target_desc): Likewise.
6808 (tdesc_create_reg): Likewise.
6809 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6810 (struct target_desc) <reg_defs>: Convert to "std::vector".
6811 (target_desc): Do not initialize "reg_defs".
6812 (~target_desc): Update code to use "std::vector" instead of "VEC"
6813 for "target_desc.reg_defs".
6814 (operator==): Likewise.
6815
124aceb4
SM
68162017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6817
6818 * inferiors.h (thread_to_gdb_id): Remove.
6819 * inferiors.c (thread_to_gdb_id): Remove.
6820 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6821 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6822 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6823 Likewise.
6824 * nto-low.c (nto_fetch_registers, nto_store_registers,
6825 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6826
96cde54f
SM
68272017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6828
6829 * inferiors.h (gdb_id_to_thread_id): Remove.
6830 * inferiors.c (gdb_id_to_thread_id): Remove.
6831 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6832 removal. Move pid declaration closer to where it's used.
6833
e8ca139e
SM
68342017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6835
6836 * server.c (handle_detach): New function.
6837 (process_serial_event): Move code out, call handle_detach.
6838
f8a4e119
SM
68392017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6840
6841 * server.c (require_running): Rename to ...
6842 (require_running_or_return): ... this ...
6843 (require_running_or_break): ... and this.
6844 (handle_query, process_serial_event): Adjust.
6845
0eb0a407
SM
68462017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6847
6848 * linux-low.c (linux_set_resume_request): Remove unused
6849 variables.
6850
785922a5
SM
68512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6852
6853 * server.c (first_thread_of): Remove.
6854 (process_serial_event): Replace usage of first_thread_of with
6855 find_any_thread_of_pid.
6856 * tracepoint.c (same_process_p): Remove.
6857 (gdb_agent_about_to_close): Replace usage of same_process_p with
6858 find_any_thread_of_pid.
6859 * linux-x86-low.c (same_process_callback): Remove.
6860 (x86_arch_setup_process_callback): Replace usage of
6861 same_process_callback with find_any_thread_of_pid.
6862 * thread-db.c (any_thread_of): Remove.
6863 (switch_to_process): Replace usage of any_thread_of with
6864 find_any_thread_of_pid.
6865 * inferiors.c (thread_pid_matches_callback): Remove.
6866 (find_thread_process): Adjust to use find_any_thread_of_pid.
6867
a059f00c
SDJ
68682017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6869
6870 * regcache.c (get_thread_regcache): Guard calls to "memset"
e79be6e5 6871 with "!VEC_empty".
a059f00c 6872
cc397f3a
SDJ
68732017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6874
6875 * linux-low.c (handle_extended_wait): Use
6876 "allocate_target_description" instead of "XNEW".
6877 * linux-x86-low.c (initialize_low_arch): Likewise.
6878
22916b07
YQ
68792017-09-05 Yao Qi <yao.qi@linaro.org>
6880
6881 * configure.srv (srv_i386_regobj): Remove.
6882 (srv_amd64_regobj): Remove.
6883 (srv_regobj): Set it to "" for x86 non-linux targets.
6884 * linux-x86-tdesc.c (i386_linux_read_description):
6885 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
6886 (init_registers_i386): Remove the declaration.
6887 (tdesc_i386): Remove the declaration.
6888 (lynx_i386_arch_setup): Call i386_create_target_description.
6889 * nto-x86-low.c: Likewise.
6890 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
6891 [!__x86_64__]: include arch/i386.h.
6892 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
6893
38602d55
YQ
68942017-09-05 Yao Qi <yao.qi@linaro.org>
6895
6896 * configure.srv (srv_amd64_linux_xmlfiles): Remove
6897 i386/amd64-XXX-linux from it.
6898
44b886ff
YQ
68992017-09-05 Yao Qi <yao.qi@linaro.org>
6900
6901 * configure.srv: Empty srv_amd64_linux_regobj if $development is
6902 false.
6903 (ipa_amd64_linux_regobj): Remove.
6904 (ipa_x32_linux_regobj): Remove.
6905
b4570e4b
YQ
69062017-09-05 Yao Qi <yao.qi@linaro.org>
6907
6908 * Makefile.in (arch-amd64.o): New rule.
6909 * configure.srv: Append arch-amd64.o.
6910 * linux-amd64-ipa.c: Include common/x86-xstate.h.
6911 (get_ipa_tdesc): Call amd64_linux_read_description.
6912 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
6913 and init_registers_amd64_XXX.
6914 * linux-x86-low.c (x86_linux_read_description): Call
6915 amd64_linux_read_description.
6916 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
6917 (initialize_low_arch): Don't call init_registers_x32_XXX and
6918 init_registers_amd64_XXX.
6919 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
6920 and tdesc_amd64_XXX.
6921 [__x86_64__] (amd64_tdesc_test): New function.
6922 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
6923 and init_registers_amd64_XXX.
6924 * linux-x86-tdesc.c: Include arch/amd64.h.
6925 (xcr0_to_tdesc_idx): New function.
6926 (i386_linux_read_description): New function.
6927 (amd64_get_ipa_tdesc_idx): New function.
6928 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
6929 (amd64_get_ipa_tdesc): Declare.
6930
d1f28ea2
YQ
69312017-09-05 Yao Qi <yao.qi@linaro.org>
6932
6933 * configure.srv (srv_i386_linux_xmlfiles): Remove
6934 i386/i386-XXX-linux.xml from it.
6935
25a93583
YQ
69362017-09-05 Yao Qi <yao.qi@linaro.org>
6937
6938 * configure.srv: Set srv_i386_linux_regobj empty if $development
6939 is false.
6940 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
6941 initialize_low_tdesc.
6942 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
6943 with #if initialize_low_tdesc.
6944 * linux-x86-tdesc-selftest.c: New file.
6945 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
6946
5f035c07
YQ
69472017-09-05 Yao Qi <yao.qi@linaro.org>
6948
6949 * Makefile.in (arch-i386.o): New rule.
6950 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
6951 (x86_64-*-linux*): Likewise.
6952 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
6953 include arch/i386.h.
6954 (i386_linux_read_description): Remove code and call
6955 i386_create_target_description.
6956 * tdesc.c (allocate_target_description): New function.
6957 * tdesc.h (set_tdesc_architecture): Remove declaration.
6958 (set_tdesc_osabi): Likewise.
6959
0abe8a89
YQ
69602017-09-05 Yao Qi <yao.qi@linaro.org>
6961
6962 * linux-x86-tdesc.c: Don't include <inttypes.h>.
6963 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
6964 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
6965 .xmltarget.
6966 * server.c (get_features_xml): Call tdesc_get_features_xml.
6967 * tdesc.c (set_tdesc_architecture): New function.
6968 (set_tdesc_osabi): New function.
6969 (tdesc_get_features_xml): New function.
6970 (tdesc_create_feature): Add an argument.
6971 * tdesc.h (struct target_desc) <features>: New field.
6972 <arch, osabi>: New field.
6973 (~target_desc): xfree features, arch, and osabi.
6974 (target_desc::oerator==): Don't compare .xmltarget.
6975 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
6976 (set_tdesc_osabi): Likewise.
6977 (tdesc_get_features_xml): Likewise.
6978
0a188386
YQ
69792017-09-05 Yao Qi <yao.qi@linaro.org>
6980
6981 * linux-x86-tdesc.c: Include selftest.h.
6982 (i386_tdesc_test): New function.
6983 (initialize_low_tdesc): Call selftests::register_test.
6984 * tdesc.h: Include regdef.h.
6985 (target_desc): Override operator == and !=.
6986
f49ff000
YQ
69872017-09-05 Yao Qi <yao.qi@linaro.org>
6988
6989 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
6990 (ipa_obj): Likewise.
6991 * linux-i386-ipa.c: Include common/x86-xstate.h
6992 (get_ipa_tdesc): Call i386_linux_read_description.
6993 (initialize_low_tracepoint): Don't call init_registers_XXX
6994 functions, call initialize_low_tdesc instead.
6995 * linux-x86-low.c (x86_linux_read_description): Call
6996 i386_linux_read_description.
6997 (initialize_low_arch): Don't call init_registers_i386_XXX
6998 functions, call initialize_low_tdesc.
6999 * linux-x86-tdesc.c: New file.
7000 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7001 (i386_get_ipa_tdesc_idx): Declare.
7002 (i386_get_ipa_tdesc): Declare.
7003 (initialize_low_tdesc): Declare.
7004
2b68ef2f
YQ
70052017-09-05 Yao Qi <yao.qi@linaro.org>
7006
7007 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7008 instead of 0.
7009
f7000548
YQ
70102017-09-05 Yao Qi <yao.qi@linaro.org>
7011
7012 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7013 * regcache.c (get_thread_regcache): Use VEC_length.
7014 (init_register_cache): Likewise.
7015 (regcache_cpy): Likewise.
7016 (registers_to_string): Iterate reg_defs via VEC_iterate.
7017 (find_regno): Likewise.
7018 (find_register_by_number): Use VEC_index.
7019 (register_size): Call find_register_by_number.
7020 (register_data): Call find_register_by_number.
7021 (supply_regblock): Use VEC_length.
7022 (regcache_raw_read_unsigned): Likewise.
7023 * tdesc.c (init_target_desc): Iterate reg_defs via
7024 VEC_iterate.
7025 (default_description): Update initializer.
7026 (copy_target_description): Don't update field num_registers.
7027 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7028 <num_registers>: Remove.
7029
50a421ac
SM
70302017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7031
7032 * Makefile.in (.SECONDARY): Define target.
7033
23fdd69e
SM
70342017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7035
7036 * linux-low.c (linux_wait_1): Adjust.
7037 * server.c (queue_stop_reply_callback): Adjust.
7038
0a2dde4a
SDJ
70392017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7040
7041 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7042 QEnvironmentUnset and QEnvironmentReset packets.
7043 (handle_query): Inform remote that QEnvironmentHexEncoded,
7044 QEnvironmentUnset and QEnvironmentReset are supported.
7045
6afd337d
SM
70462017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7047
7048 * inferiors.h (inferior_target_data): Rename to ...
7049 (thread_target_data): ... this.
7050 (inferior_regcache_data): Rename to ...
7051 (thread_regcache_data): ... this.
7052 (set_inferior_regcache_data): Rename to ...
7053 (set_thread_regcache_data): ... this.
7054 * inferiors.c (inferior_target_data): Rename to ...
7055 (thread_target_data): ... this.
7056 (inferior_regcache_data): Rename to ...
7057 (thread_regcache_data): ... this.
7058 (set_inferior_regcache_data): Rename to ...
7059 (set_thread_regcache_data): ... this.
7060 (free_one_thread): Update.
7061 * linux-low.h (get_thread_lwp): Update.
7062 * regcache.c (get_thread_regcache): Update.
7063 (regcache_invalidate_thread): Update.
7064 (free_register_cache_thread): Update.
7065 * win32-i386-low.c (update_debug_registers_callback): Update.
7066 (win32_get_current_dr): Update.
7067 * win32-low.c (thread_rec): Update.
7068 (delete_thread_info): Update.
7069 (continue_one_thread): Update.
7070 (suspend_one_thread): Update.
7071
a160cc46
SM
70722017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7073
7074 * inferiors.c (set_inferior_target_data): Remove.
7075 * inferiors.h (set_inferior_target_data): Remove.
7076
6d580b63
YQ
70772017-08-18 Yao Qi <yao.qi@linaro.org>
7078
7079 * Makefile.in (OBS): Add selftest.o.
7080 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7081 * configure, config.in: Re-generated.
7082 * server.c: Include common/sefltest.h.
7083 (captured_main): Handle option --selftest.
7084
f5a29eb0
YQ
70852017-08-09 Yao Qi <yao.qi@linaro.org>
7086
7087 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7088 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7089 i386-avx-mpx.o and i386-mmx.o.
7090 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7091 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7092 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7093 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7094 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7095 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7096 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7097 i386/amd64-avx-mpx.xml.
7098
57757c2f
YQ
70992017-08-09 Yao Qi <yao.qi@linaro.org>
7100
7101 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7102 and x32-avx-avx512.o.
7103 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7104 i386/x32-avx-avx512.xml.
7105
229d26fc
SM
71062017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7107
7108 * tracepoint.h (enum class fast_tpoint_collect_result): New
7109 enumeration.
7110 (fast_tracepoint_collecting): Change return type to
7111 fast_tpoint_collect_result.
7112 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7113 * linux-low.h: Include tracepoint.h.
7114 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7115 fast_tpoint_collect_result.
7116 * linux-low.c (handle_tracepoints): Adjust.
7117 (linux_fast_tracepoint_collecting): Change return type to
7118 fast_tpoint_collect_result.
7119 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7120 linux_wait_1, stuck_in_jump_pad_callback,
7121 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7122 proceed_one_lwp): Adjust to type change.
7123
2e1e43e1
YQ
71242017-07-10 Yao Qi <yao.qi@linaro.org>
7125
7126 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7127
adc764e7
YQ
71282017-06-29 Yao Qi <yao.qi@linaro.org>
7129
7130 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7131 Remove.
7132 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7133
a206891a
SM
71342017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7135
7136 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7137
9a6c7d9c
SDJ
71382017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7139
7140 * linux-low.c (linux_create_inferior): Adjust code to access the
7141 environment information via 'gdb_environ' class.
7142 * lynx-low.c (lynx_create_inferior): Likewise.
7143 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7144 (get_environ): Return a pointer to 'our_environ'.
7145 (captured_main): Initialize 'our_environ'.
7146 * server.h (get_environ): Adjust prototype.
7147 * spu-low.c (spu_create_inferior): Adjust code to access the
7148 environment information via 'gdb_environ' class.
7149
ae3e2ccf
SM
71502017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7151
7152 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7153 usage of "register" keyword.
7154
3e019bdc
SM
71552017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7156
7157 * configure: Re-generate.
7158
8465943a
SM
71592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7160
7161 * configure: Re-generate.
7162
cf0dd6f0
SM
71632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7164
7165 * Makefile.in (COMPILE.pre): Add "-x c++".
7166
9845682b
SDJ
71672017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7168
7169 * fork-child.c: Conditionally include <signal.h>.
7170
aefd8b33
SDJ
71712017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7172
7173 * server.c (handle_general_set): Handle new packet
7174 "QStartupWithShell".
7175 (handle_query): Add "QStartupWithShell" to the list of supported
7176 packets.
7177 (gdbserver_usage): Add help text explaining the
7178 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7179 options.
7180 (captured_main): Recognize and act upon the presence of the new
7181 CLI options.
7182
2090129c
SDJ
71832017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7184 Pedro Alves <palves@redhat.com>
7185
7186 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7187 * configure: Regenerate.
7188 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7189 "fork-inferior.o".
7190 (i[34567]86-*-lynxos*): Likewise.
7191 (spu*-*-*): Likewise.
7192 * fork-child.c: New file.
7193 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7194 and "environ.h".
7195 (linux_ptrace_fun): New function.
7196 (linux_create_inferior): Adjust function prototype to reflect
7197 change on "target.h". Adjust function code to use
7198 "fork_inferior".
7199 (linux_request_interrupt): Delete "signal_pid".
7200 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7201 (lynx_ptrace_fun): New function.
7202 (lynx_create_inferior): Adjust function prototype to reflect
7203 change on "target.h". Adjust function code to use
7204 "fork_inferior".
7205 * nto-low.c (nto_create_inferior): Adjust function prototype and
7206 code to reflect change on "target.h". Update comments.
7207 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7208 "common-terminal.h" and "environ.h".
7209 (terminal_fd): Moved to fork-child.c.
7210 (old_foreground_pgrp): Likewise.
7211 (restore_old_foreground_pgrp): Likewise.
7212 (last_status): Make it global.
7213 (last_ptid): Likewise.
7214 (our_environ): New variable.
7215 (startup_with_shell): Likewise.
7216 (program_name): Likewise.
7217 (program_argv): Rename to...
7218 (program_args): ...this.
7219 (wrapper_argv): New variable.
7220 (start_inferior): Delete function.
7221 (get_exec_wrapper): New function.
7222 (get_exec_file): Likewise.
7223 (get_environ): Likewise.
7224 (prefork_hook): Likewise.
7225 (post_fork_inferior): Likewise.
7226 (postfork_hook): Likewise.
7227 (postfork_child_hook): Likewise.
7228 (handle_v_run): Update code to deal with arguments coming from the
7229 remote host. Update calls from "start_inferior" to
7230 "create_inferior".
7231 (captured_main): Likewise. Initialize environment variable. Call
7232 "have_job_control".
7233 * server.h (post_fork_inferior): New prototype.
7234 (get_environ): Likewise.
7235 (last_status): Declare.
7236 (last_ptid): Likewise.
7237 (signal_pid): Likewise.
7238 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7239 (spu_ptrace_fun): New function.
7240 (spu_create_inferior): Adjust function prototype to reflect change
7241 on "target.h". Adjust function code to use "fork_inferior".
7242 * target.c (target_terminal_init): New function.
7243 (target_terminal_inferior): Likewise.
7244 (target_terminal_ours): Likewise.
7245 * target.h: Include <vector>.
7246 (struct target_ops) <create_inferior>: Update prototype.
7247 (create_inferior): Update macro.
7248 * utils.c (gdb_flush_out_err): New function.
7249 * win32-low.c (win32_create_inferior): Adjust function prototype
7250 and code to reflect change on "target.h".
7251
043a4934
SDJ
72522017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7253
7254 * inferiors.c (switch_to_thread): New function.
7255
15652511
SDJ
72562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7257
7258 * Makefile.in (SFILE): Add "common/job-control.c".
7259 (OBS): Add "job-control.o".
7260
21ea5acd
SDJ
72612017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7262
7263 * Makefile: Remove "@host_makefile_frag@".
7264
e13cb306
PA
72652017-05-05 Pedro Alves <palves@redhat.com>
7266
7267 * configure: Regenerate.
7268
c94fee56
SDJ
72692017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7270
7271 * configure: Regenerate.
7272
a0ff9e1a
SM
72732017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7274
7275 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7276 software_single_step change of return type to
7277 std::vector<CORE_ADDR>.
7278 * linux-low.c (install_software_single_step_breakpoints):
7279 Likewise.
7280 * linux-low.h (install_software_single_step_breakpoints):
7281 Likewise.
7282
be628ab8
SDJ
72832017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7284
7285 * remote-utils.c: Include "gdb_termios.h" instead of
7286 "terminal.h".
7287 * terminal.h: Delete file.
7288
7c5ded6a
SDJ
72892017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7290
7291 * server.c: Include <vector>.
7292 <program_argv, wrapper_argv>: Convert to std::vector.
7293 (start_inferior): Rewrite function to use C++.
7294 (handle_v_run): Likewise. Update code that calculates the argv
7295 based on the vRun packet; use C++.
7296 (captured_main): Likewise.
7297
436252de
SM
72982017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7299
7300 * server.c (handle_v_cont): Initialize thread_resume::thread
7301 with null_ptid.
7302
9bf2a700
PA
73032017-04-05 Pedro Alves <palves@redhat.com>
7304
7305 * configure: Regenerate.
7306
a121b7c1
PA
73072017-04-05 Pedro Alves <palves@redhat.com>
7308
7309 * gdbreplay.c (sync_error): Constify.
7310 * linux-x86-low.c (push_opcode): Constify.
7311
21c8a587
PA
73122017-04-05 Pedro Alves <palves@redhat.com>
7313
7314 * win32-low.c (get_child_debug_event)
7315 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7316 Report TARGET_WAITKIND_SPURIOUS instead.
7317
fb32b4f7
PA
73182017-04-05 Pedro Alves <palves@redhat.com>
7319
e79be6e5
SM
7320 * remote-utils.c (remote_prepare, remote_open): Constify.
7321 * remote-utils.h (remote_prepare, remote_open): Constify.
7322 * server.c (captured_main): Constify 'port' handling.
fb32b4f7 7323
65dd1e59
SM
73242017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7325
7326 * Makefile.in (clean): Clear .deps.
7327
8fa5b777
SM
73282017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7329
7330 * .gitignore: Remove generated files, replace with wildcard.
7331 * (clean): Replace removal of generated files with wildcard.
7332 (version.c): Replace with...
7333 (version-generated.c): ...this.
7334 (xml-builtin.c): Replace with...
7335 (xml-builtin-generated.c): ...this.
7336 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7337 (%.c: *regformats*): Replace with...
7338 (%-generated.c: *regformats*): ...this.
7339
a12e714b
MF
73402017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7341
7342 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7343 (xtensa_fill_gregset): Call collect_register_by_name for
7344 threadptr register.
7345 (xtensa_store_gregset): Call supply_register_by_name for
7346 threadptr register.
7347
1a09b50a
MF
73482017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7349
7350 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7351 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7352 (xtensa_store_gregset): Call supply_register for all registers in
7353 a0_regnum..a0_regnum + C0_NREGS range.
7354
1a01e7c6
SM
73552017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7356
7357 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7358 (ax-ipa.o: ax.c): Remove.
7359 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7360 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7361 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7362 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7363 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7364
36bc18a8
SM
73652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7366
7367 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7368 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7369 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7370 (errors-ipa.o: ../common/errors.c): Remove.
7371 (format-ipa.o: ../common/format.c): Remove.
7372 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7373
a8ebe3d5
SM
73742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7375
7376 * Makefile.in (%-ipa.o: %.c): New rule.
7377 (tracepoint-ipa.o: tracepoint.c): Remove.
7378 (utils-ipa.o: utils.c): Remove.
7379 (remote-utils-ipa.o: remote-utils.c): Remove.
7380 (regcache-ipa.o: regcache.c): Remove.
7381 (i386-linux-ipa.o: i386-linux.c): Remove.
7382 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7383 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7384 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7385 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7386 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7387 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7388 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7389 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7390 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7391 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7392 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7393 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7394 (aarch64-ipa.o: aarch64.c): Remove.
7395 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7396 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7397 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7398 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7399 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7400 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7401 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7402 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7403 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7404 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7405 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7406 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7407 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7408 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7409 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7410 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7411 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7412 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7413 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7414 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7415 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7416 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7417 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7418 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7419 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7420 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7421 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7422 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7423 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7424 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7425 (tdesc-ipa.o: tdesc.c): Remove.
7426 (x32-linux-ipa.o: x32-linux.c): Remove.
7427 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7428 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7429
50cfacb7
SM
74302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7431
7432 * Makefile.in (%.o: ../arch/%.c): New rule.
7433 (arm.o: ../arch/arm.c): Remove.
7434 (arm-linux.o: ../arch/arm-linux.c): Remove.
7435 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7436 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7437
c5a22423
SM
74382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7439
7440 * Makefile.in (%.o: ../nat/%.c): New rule.
7441 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7442 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7443 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7444 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7445 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7446 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7447 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7448 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7449 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7450 (linux-personality.o: ../nat/linux-personality.c): Remove.
7451 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7452 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7453 (x86-linux.o: ../nat/x86-linux.c): Remove.
7454 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7455 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7456
6bda016b
SM
74572017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7458
7459 * Makefile.in (%.o: ../common/%.c): New rule.
7460 (signals.o: ../common/signals.c): Remove.
7461 (print-utils.o: ../common/print-utils.c): Remove.
7462 (rsp-low.o: ../common/rsp-low.c): Remove.
7463 (common-utils.o: ../common/common-utils.c): Remove.
7464 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7465 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7466 (vec.o: ../common/vec.c): Remove.
7467 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7468 (xml-utils.o: ../common/xml-utils.c): Remove.
7469 (ptid.o: ../common/ptid.c): Remove.
7470 (buffer.o: ../common/buffer.c): Remove.
7471 (format.o: ../common/format.c): Remove.
7472 (filestuff.o: ../common/filestuff.c): Remove.
7473 (agent.o: ../common/agent.c): Remove.
7474 (errors.o: ../common/errors.c): Remove.
7475 (environ.o: ../common/environ.c): Remove.
7476 (common-debug.o: ../common/common-debug.c): Remove.
7477 (cleanups.o: ../common/cleanups.c): Remove.
7478 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7479 (fileio.o: ../common/fileio.c): Remove.
7480 (common-regcache.o: ../common/common-regcache.c): Remove.
7481 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7482 (new-op.o: ../common/new-op.c): Remove.
7483 (btrace-common.o: ../common/btrace-common.c): Remove.
7484
21122961
SM
74852017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7486
7487 * Makefile.in (%.o: ../target/%.c): New rule.
7488 (waitstatus.o: ../target/waitstatus.c): Remove.
7489
c362e621
SM
74902017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7491
7492 * Makefile.in
7493 (%.c: ../regformats/%.dat,
7494 (%.c: ../regformats/arm/%.dat,
7495 (%.c: ../regformats/i386/%.dat,
7496 (%.c: ../regformats/rs6000/%.dat): New rules.
7497 (aarch64.c): Remove.
7498 (reg-arm.c): Remove.
7499 (arm-with-iwmmxt.c): Remove.
7500 (arm-with-vfpv2.c): Remove.
7501 (arm-with-vfpv3.c): Remove.
7502 (arm-with-neon.c): Remove.
7503 (reg-bfin.c): Remove.
7504 (reg-cris.c): Remove.
7505 (reg-crisv32.c): Remove.
7506 (i386.c): Remove.
7507 (i386-linux.c): Remove.
7508 (i386-avx.c): Remove.
7509 (i386-avx-linux.c): Remove.
7510 (i386-avx-avx512.c): Remove.
7511 (i386-avx-avx512-linux.c): Remove.
7512 (i386-mpx.c): Remove.
7513 (i386-mpx-linux.c): Remove.
7514 (i386-avx-mpx-avx512-pku.c): Remove.
7515 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7516 (i386-avx-mpx.c): Remove.
7517 (i386-avx-mpx-linux.c): Remove.
7518 (i386-mmx.c): Remove.
7519 (i386-mmx-linux.c): Remove.
7520 (reg-ia64.c): Remove.
7521 (reg-m32r.c): Remove.
7522 (reg-m68k.c): Remove.
7523 (reg-cf.c): Remove.
7524 (mips-linux.c): Remove.
7525 (mips-dsp-linux.c): Remove.
7526 (mips64-linux.c): Remove.
7527 (mips64-dsp-linux.c): Remove.
7528 (nios2-linux.c): Remove.
7529 (powerpc-32.c): Remove.
7530 (powerpc-32l.c): Remove.
7531 (powerpc-altivec32l.c): Remove.
7532 (powerpc-cell32l.c): Remove.
7533 (powerpc-vsx32l.c): Remove.
7534 (powerpc-isa205-32l.c): Remove.
7535 (powerpc-isa205-altivec32l.c): Remove.
7536 (powerpc-isa205-vsx32l.c): Remove.
7537 (powerpc-e500l.c): Remove.
7538 (powerpc-64l.c): Remove.
7539 (powerpc-altivec64l.c): Remove.
7540 (powerpc-cell64l.c): Remove.
7541 (powerpc-vsx64l.c): Remove.
7542 (powerpc-isa205-64l.c): Remove.
7543 (powerpc-isa205-altivec64l.c): Remove.
7544 (powerpc-isa205-vsx64l.c): Remove.
7545 (s390-linux32.c): Remove.
7546 (s390-linux32v1.c): Remove.
7547 (s390-linux32v2.c): Remove.
7548 (s390-linux64.c): Remove.
7549 (s390-linux64v1.c): Remove.
7550 (s390-linux64v2.c): Remove.
7551 (s390-te-linux64.c): Remove.
7552 (s390-vx-linux64.c): Remove.
7553 (s390-tevx-linux64.c): Remove.
7554 (s390x-linux64.c): Remove.
7555 (s390x-linux64v1.c): Remove.
7556 (s390x-linux64v2.c): Remove.
7557 (s390x-te-linux64.c): Remove.
7558 (s390x-vx-linux64.c): Remove.
7559 (s390x-tevx-linux64.c): Remove.
7560 (tic6x-c64xp-linux.c): Remove.
7561 (tic6x-c64x-linux.c): Remove.
7562 (tic6x-c62x-linux.c): Remove.
7563 (reg-sh.c): Remove.
7564 (reg-sparc64.c): Remove.
7565 (reg-spu.c): Remove.
7566 (amd64.c): Remove.
7567 (amd64-linux.c): Remove.
7568 (amd64-avx.c): Remove.
7569 (amd64-avx-linux.c): Remove.
7570 (amd64-avx-avx512.c): Remove.
7571 (amd64-avx-avx512-linux.c): Remove.
7572 (amd64-mpx.c): Remove.
7573 (amd64-mpx-linux.c): Remove.
7574 (amd64-avx-mpx-avx512-pku.c): Remove.
7575 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7576 (amd64-avx-mpx.c): Remove.
7577 (amd64-avx-mpx-linux.c): Remove.
7578 (x32.c): Remove.
7579 (x32-linux.c): Remove.
7580 (x32-avx.c): Remove.
7581 (x32-avx-linux.c): Remove.
7582 (x32-avx-avx512.c): Remove.
7583 (x32-avx-avx512-linux.c): Remove.
7584 (reg-xtensa.c): Remove.
7585 (reg-tilegx.c): Remove.
7586 (reg-tilegx32.c): Remove.
7587
1672e0d9
SDJ
75882017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7589
7590 * Makefile.in (SFILES): Add "common/environ.c".
7591 (OBJS): Add "common/environ.h".
7592
239b6d10
WT
75932017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7594
7595 * configure.ac: Check if the fs_base and gs_base members of
7596 `struct user_regs_struct' exist.
7597 * config.in: Regenerated.
7598 * configure: Likewise.
7599
694b382c
AT
76002017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7601
7602 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7603 target_read_memory.
7604 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7605 (get_next_pcs_syscall_next_pc): Likewise.
7606
7dc53023
LM
76072016-12-23 Luis Machado <lgustavo@codesourcery.com>
7608
7609 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7610 * nto-x86-low.c: Likewise.
7611
ad02e4fe
SM
76122016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7613
7614 * Makefile.in: Include disable-implicit-rules.mk.
7615
dcb07cfa
PA
76162016-11-23 Pedro Alves <palves@redhat.com>
7617
7618 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7619 (debug_vprintf): Use std::chrono::steady_clock instead of
7620 gettimeofday. Use '.' instead of ':'.
7621 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7622 (get_timestamp): Use std::chrono::steady_clock instead of
7623 gettimeofday.
7624
8629c02c
SM
76252016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7626
7627 * Makefile.in: Fix whitespace formatting.
7628
b593ecca
SM
76292016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7630
7631 * Makefile.in (SFILES, OBS): Flatten list and order
7632 alphabetically.
7633
9986ba08
PA
76342016-11-23 Pedro Alves <palves@redhat.com>
7635
7636 * event-loop.c (handle_file_event): Use warning.
7637 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7638 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7639 Use warning.
7640
4eefa7bc
PA
76412016-11-23 Pedro Alves <palves@redhat.com>
7642
7643 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7644 output.
7645 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7646 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7647 debug_printf and debug_flush for debug output.
7648 * server.c (handle_general_set): Likewise.
7649 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7650 output.
7651
5443506e
SM
76522016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7653
7654 * Makefile.in (.c.o): Replace rule with ...
7655 (%.o: %.c): ... this one.
7656
3b165252
SM
76572016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7658
7659 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7660 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7661 make.
7662 * configure.ac: Remove checks for the make program.
7663 * configure: Re-generate.
7664
0bcda685
PA
76652016-10-28 Pedro Alves <palves@redhat.com>
7666
7667 * Makefile.in (CXX_DIALECT): Get from configure.
7668 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7669 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7670 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7671 * config.in: Regenerate.
7672 * configure: Regenerate.
7673
c3805894
YQ
76742016-10-27 Yao Qi <yao.qi@linaro.org>
7675
7676 * linux-low.c (linux_supports_range_stepping): Return true if
7677 can_software_single_step return true.
7678
89342618
YQ
76792016-10-27 Yao Qi <yao.qi@linaro.org>
7680
7681 * inferiors.c (find_inferior_in_random): New function.
7682 * inferiors.h (find_inferior_in_random): Declare.
7683 * linux-low.c (linux_wait_for_event_filtered): Call
7684 find_inferior_in_random instead of find_inferior.
7685
e3652c84
YQ
76862016-10-27 Yao Qi <yao.qi@linaro.org>
7687
7688 * linux-low.c (linux_wait_1): If single-step breakpoints are
7689 inserted, remove them.
7690
5a04c4cf
PA
76912016-10-26 Pedro Alves <palves@redhat.com>
7692
7693 * linux-low.c (handle_extended_wait): Link parent/child fork
7694 threads.
7695 (linux_wait_1): Unlink them.
7696 (linux_set_resume_request): Ignore resume requests for
7697 already-resumed and unhandled fork child threads.
7698 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7699 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7700 New functions.
7701 (handle_v_requests) <vCont>: Don't call require_running.
7702 * server.h (in_queued_stop_replies): New declaration.
7703
cb93dc7f
YQ
77042016-10-24 Yao Qi <yao.qi@linaro.org>
7705
7706 PR server/20733
7707 * linux-aarch64-low.c (append_insns): Cast the return value to
7708 'uint32_t *'.
7709
a1078bea
YQ
77102016-10-10 Yao Qi <yao.qi@linaro.org>
7711
7712 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7713
1fb77080
SDJ
77142016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7715
7716 * target.c (target_supports_multi_process): New function, moved
7717 from...
7718 * target.h (target_supports_multi_process): ... here. Remove
7719 macro.
7720
39b5a3b9
TT
77212016-10-05 Tom Tromey <tom@tromey.com>
7722
7723 PR remote/20655:
7724 * tracepoint.c (handle_tracepoint_bkpts): Check
7725 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7726
c1d0b70a
YQ
77272016-10-05 Yao Qi <yao.qi@linaro.org>
7728
7729 * configure.srv: Update the path of arm-*.xml files.
7730
0a69eedb
YQ
77312016-10-05 Terry Guo <terry.guo@arm.com>
7732 Yao Qi <yao.qi@linaro.org>
7733
7734 * Makefile.in: Adjust the path of rules.
7735 * configure.srv: Update the path of xml files.
7736 * regformats/arm-with-iwmmxt.dat: Regenerated.
7737 * regformats/arm-with-neon.dat: Likewise.
7738 * regformats/arm-with-vfpv2.dat: Likewise.
7739 * regformats/arm-with-vfpv3.dat Likewise.
7740
17e16485
YQ
77412016-09-30 Yao Qi <yao.qi@linaro.org>
7742
7743 PR gdbserver/20627
7744 * target.c (target_stop_and_wait): Don't call
7745 target_continue_no_signal, use resume_stop instead.
7746
edeeb602
YQ
77472016-09-26 Yao Qi <yao.qi@linaro.org>
7748
7749 * linux-low.c (linux_wait_1): Call debug_exit.
7750
503b1c39
PA
77512016-09-23 Pedro Alves <palves@redhat.com>
7752
7753 * Makefile.in (SFILES): Add common/new-op.c.
7754 (OBS): Add common/new-op.o.
7755 (new-op.o): New rule.
7756
74172ecf
SM
77572016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7758
7759 * .gitinore: Ignore more files.
7760
fc6cda2e
YQ
77612016-09-21 Yao Qi <yao.qi@linaro.org>
7762
7763 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7764 23.
7765
bc1e6c81
SDJ
77662016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7767
7768 * server.c (start_inferior): Call target_mourn_inferior instead of
7769 mourn_inferior; pass ptid_t argument to it.
7770 (resume): Likewise.
7771 (handle_target_event): Likewise.
7772 * target.c (target_mourn_inferior): New function.
7773 * target.h (mourn_inferior): Delete macro.
7774
0e00e962
AA
77752016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7776
7777 * linux-low.c (lwp_is_stepping): New function.
7778
1d8cb77d
CL
77792016-09-06 Carl Love <cel@us.ibm.com>
7780
7781 * server.c (start_inferior): Fixed comment, requested comment change
7782 didn't get updated correctly. Removed reference to ptrace () call as
7783 it is only true on Linux systems.
7784
7313bced
CL
77852016-09-06 Carl Love <cel@us.ibm.com>
7786
7787 * server.c (start_inferior): Do not call
7788 function target_post_create_inferior () if the
7789 inferior process has already exited.
7790
cf6de44d
PA
77912016-09-05 Pedro Alves <palves@redhat.com>
7792
7793 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7794 (COMPILE.pre, CC_LD): Use CXX directly.
7795 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7796 * acinclude.m4: Don't include build-with-cxx.m4.
7797 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7798 * configure: Regenerate.
7799
c1da6748
AT
78002016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7801
7802 PR gdb/19495
7803 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7804 call writing data to own_buf.
7805
f2b9e3df
SDJ
78062016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7807
7808 * target.c (mywait): Call target_wait instead of
7809 the_target->wait.
7810 (target_wait): New function.
7811
049a8570
SDJ
78122016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7813
7814 * server.c (start_inferior): New variable 'ptid'. Replace calls
7815 to the_target->resume by target_continue{,_no_signal}, depending
7816 on the case.
7817 * target.c (target_stop_and_wait): Call target_continue_no_signal
7818 instead of the_target->resume.
7819 (target_continue): New function.
7820
3aa5cfa0
AT
78212016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7822
7823 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7824
754653a7
AZ
78252016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7826
7827 PR server/20491
7828 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7829 ps_prochandle.
7830 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7831 * linux-arm-low.c (ps_get_thread_area): Likewise.
7832 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7833 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7834 * linux-mips-low.c (ps_get_thread_area): Likewise.
7835 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7836 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7837 * linux-x86-low.c (ps_get_thread_area): Likewise.
7838 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7839
ed036b40
PA
78402016-08-19 Pedro Alves <palves@redhat.com>
7841
7842 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7843
c8ef42ee
PA
78442016-08-19 Pedro Alves <palves@redhat.com>
7845
7846 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7847 comment. Use memcpy instead of casting through unsigned long.
7848
9c235a72
PA
78492016-08-19 Pedro Alves <palves@redhat.com>
7850
7851 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7852 allocating around 0x80000000.
7853
201506da
PA
78542016-08-19 Pedro Alves <palves@redhat.com>
7855
7856 PR gdb/20415
7857 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7858 (x32-avx512-linux-ipa.o): New rules.
7859 * configure.ac (x86_64-*-linux*): New x32 check.
7860 * configure.srv (ipa_x32_linux_regobj): New.
7861 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7862 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7863 descriptions.
7864 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7865 descriptions.
7866 * configure: Regenerate.
7867
f348d89a
PA
78682016-08-09 Pedro Alves <palves@redhat.com>
7869
7870 PR gdb/18653
7871 * Makefile.in (OBS): Add signals-state-save-restore.o.
7872 (signals-state-save-restore.o): New rule.
7873 * config.in: Regenerate.
7874 * configure: Regenerate.
7875 * linux-low.c: Include "signals-state-save-restore.h".
7876 (linux_create_inferior): Call
7877 restore_original_signals_state.
7878 * server.c: Include "dispositions-save-restore.h".
7879 (captured_main): Call save_original_signals_state.
7880
1baf5149
PA
78812016-08-05 Pedro Alves <palves@redhat.com>
7882
7883 * configure: Regenerate.
7884
fcd4a73d
YQ
78852016-08-04 Yao Qi <yao.qi@linaro.org>
7886
7887 * linux-low.c (regsets_fetch_inferior_registers): Check
7888 errno is ESRCH or not.
7889
979659d0
YQ
78902016-08-02 Yao Qi <yao.qi@linaro.org>
7891
7892 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
7893 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
7894 (thread_db_load_search): Update.
7895 (try_thread_db_load_1): Don't look for td_ta_event_addr,
7896 td_ta_set_event and td_ta_event_getmsg.
7897
6598661d
PA
78982016-07-26 Pedro Alves <palves@redhat.com>
7899
7900 PR server/20414
7901 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
7902 of unsigned long for 64-bit registers and use uint32_t instead of
7903 unsigned int for 32-bit registers.
7904
9cf12d57
PA
79052016-07-26 Pedro Alves <palves@redhat.com>
7906
7907 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
7908 to 'ptrace'.
7909
305450ed
TT
79102016-07-21 Tom Tromey <tom@tromey.com>
7911
7912 * configure: Rebuild.
7913
2583da7c
YQ
79142016-07-21 Yao Qi <yao.qi@linaro.org>
7915
7916 * mem-break.c (find_gdb_breakpoint): Cast bp to
7917 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
7918
21536b36
YQ
79192016-07-21 Yao Qi <yao.qi@linaro.org>
7920
7921 * server.c (handle_v_requests): Support s and S actions
7922 if target_supports_software_single_step return true.
7923
8901d193
YQ
79242016-07-21 Yao Qi <yao.qi@linaro.org>
7925
7926 * linux-low.c (resume_stopped_resumed_lwps): If resume request
7927 is resume_step, call maybe_hw_step.
7928 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
7929 and unstop them.
7930 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
7931 breakpoints or not.
7932 (proceed_one_lwp): If resume request is resume_step, install
7933 reinsert breakpoints and call maybe_hw_step.
7934
0e9a339e
YQ
79352016-07-21 Yao Qi <yao.qi@linaro.org>
7936
7937 * linux-low.c (proceed_one_lwp): Declare.
7938 (linux_resume_one_thread): Remove local variable 'step'.
7939 Lift code enqueue signal. Call proceed_one_lwp instead of
7940 linux_resume_one_lwp.
7941
4281b351
YQ
79422016-07-21 Yao Qi <yao.qi@linaro.org>
7943
7944 * linux-low.c (linux_resume_one_thread): Call
7945 enqueue_pending_signal.
7946
984a2c04
YQ
79472016-07-21 Yao Qi <yao.qi@linaro.org>
7948
7949 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
7950 * inferiors.c (do_restore_current_thread_cleanup): New function.
7951 (make_cleanup_restore_current_thread): Likewise.
7952 * linux-low.c (install_software_single_step_breakpoints): Call
7953 make_cleanup_restore_current_thread. Switch current_thread to
7954 thread.
7955
bec903c9
YQ
79562016-07-21 Yao Qi <yao.qi@linaro.org>
7957
7958 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
7959 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
7960 (clone_one_breakpoint): Likewise.
7961 (delete_reinsert_breakpoints): Change parameter to thread.
7962 Callers updated.
7963 (has_reinsert_breakpoints): Likewise.
7964 (uninsert_reinsert_breakpoints): Likewise.
7965 (reinsert_reinsert_breakpoints): Likewise.
7966 * mem-break.h (set_reinsert_breakpoint): Update declaration.
7967 (delete_reinsert_breakpoints): Likewise.
7968 (reinsert_reinsert_breakpoints): Likewise.
7969 (uninsert_reinsert_breakpoints): Likewise.
7970 (has_reinsert_breakpoints): Likewise.
7971
63c40ec7
YQ
79722016-07-21 Yao Qi <yao.qi@linaro.org>
7973
7974 * inferiors.c (get_thread_process): Make parameter const.
7975 * inferiors.h (get_thread_process): Update declaration.
7976 * mem-break.c (clone_all_breakpoints): Remove all parameters.
7977 Add new parameters child_thread and parent_thread. Callers
7978 updated.
7979 * mem-break.h (clone_all_breakpoints): Update declaration.
7980
9aa76cd0
YQ
79812016-07-21 Yao Qi <yao.qi@linaro.org>
7982
7983 * mem-break.c (struct breakpoint) <cond_list>: Remove.
7984 <command_list, handler>: Remove.
7985 (struct gdb_breakpoint): New.
7986 (struct other_breakpoint): New.
7987 (struct reinsert_breakpoint): New.
7988 (is_gdb_breakpoint): New function.
7989 (any_persistent_commands): Update command_list if
7990 is_gdb_breakpoint returns true.
7991 (set_breakpoint): Create breakpoints according to their types.
7992 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
7993 (set_gdb_breakpoint_1): Likewise.
7994 (set_gdb_breakpoint): Likewise.
7995 (clear_breakpoint_conditions): Change parameter type to
7996 'struct gdb_breakpoint *'.
7997 (clear_breakpoint_commands): Likewise.
7998 (clear_breakpoint_conditions_and_commands): Likewise.
7999 (add_condition_to_breakpoint): Likewise.
8000 (add_breakpoint_condition): Likewise.
8001 (add_commands_to_breakpoint): Likewise.
8002 (check_breakpoints): Check other_breakpoint.
8003 (clone_one_breakpoint): Clone breakpopint according to its type.
8004 * mem-break.h (struct gdb_breakpoint): Declare.
8005 (set_gdb_breakpoint): Update declaration.
8006 (clear_breakpoint_conditions_and_commands): Likewise.
8007 (add_breakpoint_condition): Likewise.
8008 (add_breakpoint_commands): Likewise.
8009 * server.c (process_point_options): Change parameter type to
8010 'struct gdb_breakpoint *'.
8011
811f8301
YQ
80122016-07-21 Yao Qi <yao.qi@linaro.org>
8013
8014 * mem-break.c (set_breakpoint_at): Rename it to ...
8015 (set_breakpoint_type_at): ... it.
8016 (set_breakpoint_at): Call set_breakpoint_type_at.
8017 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8018 * mem-break.h (set_breakpoint_at): Update comments.
8019
b1c51e36
CLT
80202016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8021
8022 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8023 to buf parameter.
8024 (nios2_store_gregset): Likewise.
8025
ced2dffb
PA
80262016-07-01 Pedro Alves <palves@redhat.com>
8027 Antoine Tremblay <antoine.tremblay@ericsson.com>
8028
8029 * linux-low.c: Change interface to take the target lwp_info
8030 pointer directly and return void. Handle detaching from a zombie
8031 thread.
8032 (linux_detach_lwp_callback): New function.
8033 (linux_detach): Detach from the leader thread after detaching from
8034 the clone threads.
8035
2ac09a5b
YQ
80362016-06-28 Yao Qi <yao.qi@linaro.org>
8037
8038 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8039 for variable new_offset.
8040 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8041 (aarch64_ftrace_insn_reloc_cb): Likewise.
8042 (aarch64_ftrace_insn_reloc_tb): Likewise.
8043 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8044 PRIx64 instead of PRIx32.
8045
79e7fd4f
YQ
80462016-06-28 Yao Qi <yao.qi@linaro.org>
8047
8048 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8049 (the_low_target): Install arm_get_syscall_trapinfo.
8050
061fc021
YQ
80512016-06-28 Yao Qi <yao.qi@linaro.org>
8052
8053 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8054 function.
8055 (the_low_target): Install aarch64_get_syscall_trapinfo.
8056
4cc32bec
YQ
80572016-06-28 Yao Qi <yao.qi@linaro.org>
8058
8059 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8060 Callers updated.
8061 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8062 Remove parameter sysno.
8063 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8064 sysret.
8065
782c1122
AA
80662016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8067
8068 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8069 (s390_emit_ne_goto): Likewise.
8070 (s390_emit_lt_goto): Likewise.
8071 (s390_emit_le_goto): Likewise.
8072 (s390_emit_gt_goto): Likewise.
8073 (s390_emit_ge_goto): Likewise.
8074 (s390x_emit_eq_goto): Likewise.
8075 (s390x_emit_ne_goto): Likewise.
8076 (s390x_emit_lt_goto): Likewise.
8077 (s390x_emit_le_goto): Likewise.
8078 (s390x_emit_gt_goto): Likewise.
8079 (s390x_emit_ge_goto): Likewise.
8080 (s390_emit_ops_impl): Mark variable static.
8081 (s390x_emit_ops): Likewise.
8082
2e7b624b
YQ
80832016-06-17 Yao Qi <yao.qi@linaro.org>
8084
8085 * linux-low.c (handle_extended_wait): Call
8086 uninsert_reinsert_breakpoints for the parent process. Remove
8087 reinsert breakpoints from the child process. Reinsert them to
8088 the parent process when vfork is done.
8089 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8090 (reinsert_reinsert_breakpoints): New function.
8091 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8092 (reinsert_reinsert_breakpoints): Declare.
8093
8a81c5d7
YQ
80942016-06-17 Yao Qi <yao.qi@linaro.org>
8095
8096 * linux-low.c (handle_extended_wait): If the parent is doing
8097 step-over, remove the reinsert breakpoints from the forked child.
8098
f50bf8e5
YQ
80992016-06-17 Yao Qi <yao.qi@linaro.org>
8100
8101 * linux-low.c (unsuspend_all_lwps): Declare.
8102 (linux_low_filter_event): If thread exited, call finish_step_over.
8103 If step-over is finished, unsuspend other threads.
8104
8376a3cb
YQ
81052016-06-17 Yao Qi <yao.qi@linaro.org>
8106
8107 * linux-low.c (linux_resume_one_lwp_throw): Assert
8108 has_reinsert_breakpoints returns false.
8109 * mem-break.c (delete_disabled_breakpoints): Assert
8110 bp type isn't reinsert_breakpoint.
8111
f79b145d
YQ
81122016-06-17 Yao Qi <yao.qi@linaro.org>
8113
8114 * linux-low.c (maybe_hw_step): New function.
8115 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8116 (finish_step_over): Switch current_thread to lwp temporarily,
8117 and assert has_reinsert_breakpoints returns true.
8118 (proceed_one_lwp): Call maybe_hw_step.
8119 * mem-break.c (has_reinsert_breakpoints): New function.
8120 * mem-break.h (has_reinsert_breakpoints): Declare.
8121
0ae534d2
JT
81222016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8123
8124 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8125
fcdad592
YQ
81262016-05-17 Yao Qi <yao.qi@linaro.org>
8127
8128 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8129 instead of find_inferior.
8130
9e784964
YQ
81312016-05-05 Yao Qi <yao.qi@linaro.org>
8132
8133 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8134 Initialize res to zero.
8135
cf2ebb6e
YQ
81362016-05-05 Yao Qi <yao.qi@linaro.org>
8137
8138 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8139 to uint32_t.
8140
c1aebf87
UW
81412016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8142
8143 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8144 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8145 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8146
35fd2deb 81472016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 8148 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
8149
8150 * tracepoint.c (write_inferior_int8): New function.
8151 (cmd_qtenable_disable): Write enable flag using
8152 write_inferior_int8.
8153
484b3c32
YQ
81542016-04-25 Yao Qi <yao.qi@linaro.org>
8155
8156 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8157 (need_step_over_p): Return zero if the LWP has pending signals
8158 can be delivered on software single step target.
8159
85ba7d86
YQ
81602016-04-25 Yao Qi <yao.qi@linaro.org>
8161
8162 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8163 return instead of error.
8164
3539aa13
YQ
81652016-04-22 Yao Qi <yao.qi@linaro.org>
8166
8167 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8168 to 23.
8169
5b061e98
YQ
81702016-04-22 Yao Qi <yao.qi@linaro.org>
8171
8172 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8173 signal when stepping over breakpoint with software single
8174 step.
8175
3451269c
PA
81762016-04-21 Pedro Alves <palves@redhat.com>
8177
8178 * linux-s390-low.c (s390_collect_ptrace_register)
8179 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8180 add casts.
8181 (s390_check_regset): Use void * instead of gdb_byte *.
8182
a2358508
PA
81832016-04-20 Pedro Alves <palves@redhat.com>
8184
8185 * configure: Renegerate.
8186
6885166d
YQ
81872016-04-20 Yao Qi <yao.qi@linaro.org>
8188
8189 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8190 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8191 number 16.
8192 (arm_store_gregset): Likewise.
8193
2b863f51
WT
81942016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8195
8196 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8197 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8198 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8199 (amd64-avx-mpx-linux.c): New rules.
8200 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8201 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8202 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8203 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8204 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8205 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8206 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8207 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8208 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8209 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8210 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8211 * linux-x86-low.c (x86_linux_read_description): Add case for
8212 X86_XSTATE_AVX_MPX_MASK.
8213 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8214 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8215 init_registers_i386_avx_mpx_linux.
8216 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8217 (initialize_low_tracepoint): Call
8218 init_registers_i386_avx_mpx_linux.
8219 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8220 (initialize_low_tracepoint): Call
8221 init_registers_amd64_avx_mpx_linux.
8222 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8223 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8224 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8225 declarations.
8226
9b30624b
PA
82272016-04-18 Pedro Alves <palves@redhat.com>
8228
8229 * configure: Regenerate.
8230
45e3745e
AT
82312016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8232
8233 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8234 (aarch64_emit_sub): Likewise.
8235
2afc13ff
PA
82362016-04-12 Pedro Alves <palves@redhat.com>
8237
8238 * utils.c (prepare_to_throw_exception): Delete.
8239
6e774b13
SM
82402016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8241
8242 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8243
4dca19f8
MK
82442016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8245
8246 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8247
d0a9981f
MK
82482016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8249
8250 * linux-aarch64-ipa.c: Add <elf.h> include.
8251 * linux-ppc-ipa.c: Add <elf.h> include.
8252 * linux-s390-ipa.c: Add <elf.h> include.
8253
252db07e
MK
82542016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8255
8256 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8257 (get_raw_reg_ptr): Likewise.
8258 (get_trace_state_variable_value_ptr): Likewise.
8259 (set_trace_state_variable_value_ptr): Likewise.
8260 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8261 char *.
8262
14e2b6d9
MK
82632016-03-31 Wei-cheng Wang <cole945@gmail.com>
8264 Marcin Kościelnicki <koriakin@0x04.net>
8265
8266 PR/17221
8267 * linux-ppc-low.c (emit_insns): New function.
8268 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8269 (ppc_emit_prologue): New function.
8270 (ppc_emit_epilogue): New function.
8271 (ppc_emit_add): New function.
8272 (ppc_emit_sub): New function.
8273 (ppc_emit_mul): New function.
8274 (ppc_emit_lsh): New function.
8275 (ppc_emit_rsh_signed): New function.
8276 (ppc_emit_rsh_unsigned): New function.
8277 (ppc_emit_ext): New function.
8278 (ppc_emit_zero_ext): New function.
8279 (ppc_emit_log_not): New function.
8280 (ppc_emit_bit_and): New function.
8281 (ppc_emit_bit_or): New function.
8282 (ppc_emit_bit_xor): New function.
8283 (ppc_emit_bit_not): New function.
8284 (ppc_emit_equal): New function.
8285 (ppc_emit_less_signed): New function.
8286 (ppc_emit_less_unsigned): New function.
8287 (ppc_emit_ref): New function.
8288 (ppc_emit_const): New function.
8289 (ppc_emit_reg): New function.
8290 (ppc_emit_pop): New function.
8291 (ppc_emit_stack_flush): New function.
8292 (ppc_emit_swap): New function.
8293 (ppc_emit_stack_adjust): New function.
8294 (ppc_emit_call): New function.
8295 (ppc_emit_int_call_1): New function.
8296 (ppc_emit_void_call_2): New function.
8297 (ppc_emit_if_goto): New function.
8298 (ppc_emit_goto): New function.
8299 (ppc_emit_eq_goto): New function.
8300 (ppc_emit_ne_goto): New function.
8301 (ppc_emit_lt_goto): New function.
8302 (ppc_emit_le_goto): New function.
8303 (ppc_emit_gt_goto): New function.
8304 (ppc_emit_ge_goto): New function.
8305 (ppc_write_goto_address): New function.
8306 (ppc_emit_ops_impl): New static variable.
8307 (ppc64v1_emit_prologue): New function.
8308 (ppc64v2_emit_prologue): New function.
8309 (ppc64_emit_epilogue): New function.
8310 (ppc64_emit_add): New function.
8311 (ppc64_emit_sub): New function.
8312 (ppc64_emit_mul): New function.
8313 (ppc64_emit_lsh): New function.
8314 (ppc64_emit_rsh_signed): New function.
8315 (ppc64_emit_rsh_unsigned): New function.
8316 (ppc64_emit_ext): New function.
8317 (ppc64_emit_zero_ext): New function.
8318 (ppc64_emit_log_not): New function.
8319 (ppc64_emit_bit_and): New function.
8320 (ppc64_emit_bit_or): New function.
8321 (ppc64_emit_bit_xor): New function.
8322 (ppc64_emit_bit_not): New function.
8323 (ppc64_emit_equal): New function.
8324 (ppc64_emit_less_signed): New function.
8325 (ppc64_emit_less_unsigned): New function.
8326 (ppc64_emit_ref): New function.
8327 (ppc64_emit_const): New function.
8328 (ppc64v1_emit_reg): New function.
8329 (ppc64v2_emit_reg): New function.
8330 (ppc64_emit_pop): New function.
8331 (ppc64_emit_stack_flush): New function.
8332 (ppc64_emit_swap): New function.
8333 (ppc64v1_emit_call): New function.
8334 (ppc64v2_emit_call): New function.
8335 (ppc64v1_emit_int_call_1): New function.
8336 (ppc64v2_emit_int_call_1): New function.
8337 (ppc64v1_emit_void_call_2): New function.
8338 (ppc64v2_emit_void_call_2): New function.
8339 (ppc64_emit_if_goto): New function.
8340 (ppc64_emit_eq_goto): New function.
8341 (ppc64_emit_ne_goto): New function.
8342 (ppc64_emit_lt_goto): New function.
8343 (ppc64_emit_le_goto): New function.
8344 (ppc64_emit_gt_goto): New function.
8345 (ppc64_emit_ge_goto): New function.
8346 (ppc64v1_emit_ops_impl): New static variable.
8347 (ppc64v2_emit_ops_impl): New static variable.
8348 (ppc_emit_ops): New function.
8349 (linux_low_target): Wire in ppc_emit_ops.
8350
a2174ba4
MK
83512016-03-31 Wei-cheng Wang <cole945@gmail.com>
8352 Marcin Kościelnicki <koriakin@0x04.net>
8353
8354 PR/17221
8355 * Makefile.in: Add powerpc-*-ipa.o
8356 * configure.srv: Add ipa_obj for powerpc*-linux.
8357 * linux-ppc-ipa.c: New file.
8358 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8359 includes.
8360 (PPC_FIELD): New macro.
8361 (PPC_SEXT): New macro.
8362 (PPC_OP6): New macro.
8363 (PPC_BO): New macro.
8364 (PPC_LI): New macro.
8365 (PPC_BD): New macro.
8366 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8367 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8368 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8369 (ppc_get_thread_area): New function.
8370 (is_elfv2_inferior): New function.
8371 (gen_ds_form): New function.
8372 (GEN_STD): New macro.
8373 (GEN_STDU): New macro.
8374 (GEN_LD): New macro.
8375 (GEN_LDU): New macro.
8376 (gen_d_form): New function.
8377 (GEN_ADDI): New macro.
8378 (GEN_ADDIS): New macro.
8379 (GEN_LI): New macro.
8380 (GEN_LIS): New macro.
8381 (GEN_ORI): New macro.
8382 (GEN_ORIS): New macro.
8383 (GEN_LWZ): New macro.
8384 (GEN_STW): New macro.
8385 (GEN_STWU): New macro.
8386 (gen_xfx_form): New function.
8387 (GEN_MFSPR): New macro.
8388 (GEN_MTSPR): New macro.
8389 (GEN_MFCR): New macro.
8390 (GEN_MTCR): New macro.
8391 (GEN_SYNC): New macro.
8392 (GEN_LWSYNC): New macro.
8393 (gen_x_form): New function.
8394 (GEN_OR): New macro.
8395 (GEN_MR): New macro.
8396 (GEN_LWARX): New macro.
8397 (GEN_STWCX): New macro.
8398 (GEN_CMPW): New macro.
8399 (gen_md_form): New function.
8400 (GEN_RLDICL): New macro.
8401 (GEN_RLDICR): New macro.
8402 (gen_i_form): New function.
8403 (GEN_B): New macro.
8404 (GEN_BL): New macro.
8405 (gen_b_form): New function.
8406 (GEN_BNE): New macro.
8407 (GEN_LOAD): New macro.
8408 (GEN_STORE): New macro.
8409 (gen_limm): New function.
8410 (gen_atomic_xchg): New function.
8411 (gen_call): New function.
8412 (ppc_relocate_instruction): New function.
8413 (ppc_install_fast_tracepoint_jump_pad): New function.
8414 (ppc_get_min_fast_tracepoint_insn_len): New function.
8415 (ppc_get_ipa_tdesc_idx): New function.
8416 (the_low_target): Wire in the new functions.
8417 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8418 tdescs.
8419 * linux-ppc-tdesc.h: New file.
8420
a13c4696
MK
84212016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8422
8423 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8424 (alloc_jump_pad_buffer): New function.
8425 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8426 (alloc_jump_pad_buffer): New function.
8427 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8428 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8429 (alloc_jump_pad_buffer): New function.
8430 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8431 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8432 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8433 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8434
1cda1512
MK
84352016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8436
8437 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8438 * linux-amd64-ipa.c: Likewise.
8439 * linux-i386-ipa.c: Likewise.
8440 * linux-s390-ipa.c: Likewise.
8441 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8442 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8443 set_trace_state_variable_value_ptr.
8444 (struct ipa_sym_addresses): Likewise.
8445 (symbol_list): Likewise.
8446 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8447 accessing gdb_collect directly.
8448 (gdb_collect_ptr_type): New typedef.
8449 (get_raw_reg_ptr_type): New typedef.
8450 (get_trace_state_variable_value_ptr_type): New typedef.
8451 (set_trace_state_variable_value_ptr_type): New typedef.
8452 (gdb_collect_ptr): New global.
8453 (get_raw_reg_ptr): New global.
8454 (get_trace_state_variable_value_ptr): New global.
8455 (set_trace_state_variable_value_ptr): New global.
8456 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8457 accessing get_raw_reg directly.
8458 (get_get_tsv_func_addr): Likewise for
8459 get_trace_state_variable_value_ptr.
8460 (get_set_tsv_func_addr): Likewise for
8461 set_trace_state_variable_value_ptr.
8462 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8463
72fb5488
SM
84642016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8465
8466 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8467
28170b88
MK
84682016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8469
8470 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8471 packets.
8472 (relocate_instruction): Remove own_buf.
8473 * server.c (own_buf): Make global.
8474 (handle_v_requests): Make global.
8475 * server.h (own_buf): New declaration.
8476 (handle_v_requests): New prototype.
8477
f39e8743
MK
84782016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8479
8480 PR 18377
8481 * linux-s390-low.c (add_insns): New function.
8482 (s390_emit_prologue): New function.
8483 (s390_emit_epilogue): New function.
8484 (s390_emit_add): New function.
8485 (s390_emit_sub): New function.
8486 (s390_emit_mul): New function.
8487 (s390_emit_lsh): New function.
8488 (s390_emit_rsh_signed): New function.
8489 (s390_emit_rsh_unsigned): New function.
8490 (s390_emit_ext): New function.
8491 (s390_emit_log_not): New function.
8492 (s390_emit_bit_and): New function.
8493 (s390_emit_bit_or): New function.
8494 (s390_emit_bit_xor): New function.
8495 (s390_emit_bit_not): New function.
8496 (s390_emit_equal): New function.
8497 (s390_emit_less_signed): New function.
8498 (s390_emit_less_unsigned): New function.
8499 (s390_emit_ref): New function.
8500 (s390_emit_if_goto): New function.
8501 (s390_emit_goto): New function.
8502 (s390_write_goto_address): New function.
8503 (s390_emit_litpool): New function.
8504 (s390_emit_const): New function.
8505 (s390_emit_call): New function.
8506 (s390_emit_reg): New function.
8507 (s390_emit_pop): New function.
8508 (s390_emit_stack_flush): New function.
8509 (s390_emit_zero_ext): New function.
8510 (s390_emit_swap): New function.
8511 (s390_emit_stack_adjust): New function.
8512 (s390_emit_set_r2): New function.
8513 (s390_emit_int_call_1): New function.
8514 (s390_emit_void_call_2): New function.
8515 (s390_emit_eq_goto): New function.
8516 (s390_emit_ne_goto): New function.
8517 (s390_emit_lt_goto): New function.
8518 (s390_emit_le_goto): New function.
8519 (s390_emit_gt_goto): New function.
8520 (s390_emit_ge_goto): New function.
8521 (s390x_emit_prologue): New function.
8522 (s390x_emit_epilogue): New function.
8523 (s390x_emit_add): New function.
8524 (s390x_emit_sub): New function.
8525 (s390x_emit_mul): New function.
8526 (s390x_emit_lsh): New function.
8527 (s390x_emit_rsh_signed): New function.
8528 (s390x_emit_rsh_unsigned): New function.
8529 (s390x_emit_ext): New function.
8530 (s390x_emit_log_not): New function.
8531 (s390x_emit_bit_and): New function.
8532 (s390x_emit_bit_or): New function.
8533 (s390x_emit_bit_xor): New function.
8534 (s390x_emit_bit_not): New function.
8535 (s390x_emit_equal): New function.
8536 (s390x_emit_less_signed): New function.
8537 (s390x_emit_less_unsigned): New function.
8538 (s390x_emit_ref): New function.
8539 (s390x_emit_if_goto): New function.
8540 (s390x_emit_const): New function.
8541 (s390x_emit_call): New function.
8542 (s390x_emit_reg): New function.
8543 (s390x_emit_pop): New function.
8544 (s390x_emit_stack_flush): New function.
8545 (s390x_emit_zero_ext): New function.
8546 (s390x_emit_swap): New function.
8547 (s390x_emit_stack_adjust): New function.
8548 (s390x_emit_int_call_1): New function.
8549 (s390x_emit_void_call_2): New function.
8550 (s390x_emit_eq_goto): New function.
8551 (s390x_emit_ne_goto): New function.
8552 (s390x_emit_lt_goto): New function.
8553 (s390x_emit_le_goto): New function.
8554 (s390x_emit_gt_goto): New function.
8555 (s390x_emit_ge_goto): New function.
8556 (s390_emit_ops): New function.
8557 (struct linux_target_ops): Fill in emit_ops hook.
8558
abd9baf9
MK
85592016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8560
8561 PR 18377
8562 * Makefile.in: Add s390 IPA files.
8563 * configure.srv: Build IPA for s390.
8564 * linux-s390-ipa.c: New file.
8565 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8566 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8567 (tdesc_s390_linux32): Likewise.
8568 (init_registers_s390_linux32v1): Likewise.
8569 (tdesc_s390_linux32v1): Likewise.
8570 (init_registers_s390_linux32v2): Likewise.
8571 (tdesc_s390_linux32v2): Likewise.
8572 (init_registers_s390_linux64): Likewise.
8573 (tdesc_s390_linux64): Likewise.
8574 (init_registers_s390_linux64v1): Likewise.
8575 (tdesc_s390_linux64v1): Likewise.
8576 (init_registers_s390_linux64v2): Likewise.
8577 (tdesc_s390_linux64v2): Likewise.
8578 (init_registers_s390_te_linux64): Likewise.
8579 (tdesc_s390_te_linux64): Likewise.
8580 (init_registers_s390_vx_linux64): Likewise.
8581 (tdesc_s390_vx_linux64): Likewise.
8582 (init_registers_s390_tevx_linux64): Likewise.
8583 (tdesc_s390_tevx_linux64): Likewise.
8584 (init_registers_s390x_linux64): Likewise.
8585 (tdesc_s390x_linux64): Likewise.
8586 (init_registers_s390x_linux64v1): Likewise.
8587 (tdesc_s390x_linux64v1): Likewise.
8588 (init_registers_s390x_linux64v2): Likewise.
8589 (tdesc_s390x_linux64v2): Likewise.
8590 (init_registers_s390x_te_linux64): Likewise.
8591 (tdesc_s390x_te_linux64): Likewise.
8592 (init_registers_s390x_vx_linux64): Likewise.
8593 (tdesc_s390x_vx_linux64): Likewise.
8594 (init_registers_s390x_tevx_linux64): Likewise.
8595 (tdesc_s390x_tevx_linux64): Likewise.
8596 (have_hwcap_s390_vx): New static variable.
8597 (s390_arch_setup): Fill have_hwcap_s390_vx.
8598 (s390_get_thread_area): New function.
8599 (s390_ft_entry_gpr_esa): New const.
8600 (s390_ft_entry_gpr_zarch): New const.
8601 (s390_ft_entry_misc): New const.
8602 (s390_ft_entry_fr): New const.
8603 (s390_ft_entry_vr): New const.
8604 (s390_ft_main_31): New const.
8605 (s390_ft_main_64): New const.
8606 (s390_ft_exit_fr): New const.
8607 (s390_ft_exit_vr): New const.
8608 (s390_ft_exit_misc): New const.
8609 (s390_ft_exit_gpr_esa): New const.
8610 (s390_ft_exit_gpr_zarch): New const.
8611 (append_insns): New function.
8612 (s390_relocate_instruction): New function.
8613 (s390_install_fast_tracepoint_jump_pad): New function.
8614 (s390_get_min_fast_tracepoint_insn_len): New function.
8615 (s390_get_ipa_tdesc_idx): New function.
8616 (struct linux_target_ops): Wire in the above functions.
8617 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8618 * linux-s390-tdesc.h: New file.
8619
a4105d04
MK
86202016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8621
8622 * linux-s390-low.c (s390_supports_tracepoints): New function.
8623 (struct linux_target_ops): Fill supports_tracepoints hook.
8624
35ac8b3e
YQ
86252016-03-18 Yao Qi <yao.qi@linaro.org>
8626
8627 * linux-low.c (lwp_signal_can_be_delivered): New function.
8628 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8629
94610ec4
YQ
86302016-03-18 Yao Qi <yao.qi@linaro.org>
8631
8632 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8633 0 if signal is enqueued. Remove 'signal' from one debugging
8634 message. Move one debugging message to some lines below.
8635 Remove code setting 'signal' to 0.
8636
80aea927
YQ
86372016-03-18 Yao Qi <yao.qi@linaro.org>
8638
8639 * linux-low.c (linux_low_filter_event): Remove redundant
8640 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8641
b04fd3be
MK
86422016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8643
8644 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8645 (struct linux_target_ops): Wire in the above.
8646
c40c8d4b
YQ
86472016-03-03 Yao Qi <yao.qi@linaro.org>
8648
8649 * linux-low.c: Update comments to start_step_over.
8650
0f8288ae
YQ
86512016-03-03 Yao Qi <yao.qi@linaro.org>
8652
8653 PR server/19736
8654 * linux-low.c (handle_extended_wait): Set child suspended
8655 if event_lwp->bp_reinsert isn't zero.
8656
fdbd04a8
YQ
86572016-03-02 Yao Qi <yao.qi@linaro.org>
8658
8659 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8660 enqueue_pending_signal.
8661
6896a8fa
MK
86622016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8663
8664 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8665 is actually loaded.
8666
ab503087
MK
86672016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8668
8669 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8670 (s390_regmap_3264) [!__s390x__]: New global.
8671 (s390_collect_ptrace_register): Skip map entries containing -1.
8672 (s390_supply_ptrace_register): Ditto.
8673 (s390_fill_gprs_high): New function.
8674 (s390_store_gprs_high): New function.
8675 (s390_regsets): Add NT_S390_HIGH_GPRS.
8676 (s390_get_hwcap): Enable on 31-bit.
8677 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8678 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8679 Detect NT_S390_HIGH_GPRS.
8680 (s390_usrregs_info_3264): Enable on 31-bit.
8681 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8682 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8683
ae91f625
MK
86842016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8685
8686 PR gdb/13808
8687 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8688 * configure.srv: Ditto.
8689 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8690 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8691 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8692 (init_registers_amd64_linux): Remove prototype.
8693 (tdesc_amd64_linux): Remove declaration.
8694 (get_ipa_tdesc): New function.
8695 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8696 initialize remaining tdescs.
8697 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8698 (init_registers_i386_linux): Remove prototype.
8699 (tdesc_i386_linux): Remove declaration.
8700 (get_ipa_tdesc): New function.
8701 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8702 initialize remaining tdescs.
8703 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8704 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8705 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8706 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8707 (x86_get_ipa_tdesc_idx): New function.
8708 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8709 * linux-x86-tdesc.h: New file.
8710 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8711 (target_get_ipa_tdesc_idx): New macro.
8712 * tracepoint.c (ipa_tdesc_idx): New macro.
8713 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8714 (symbol_list): Add ipa_tdesc_idx.
8715 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8716 (ipa_tdesc): Remove.
8717 (ipa_tdesc_idx): New variable.
8718 (get_context_regcache): Use get_ipa_tdesc.
8719 (gdb_collect): Ditto.
8720 (gdb_probe): Ditto.
8721 * tracepoint.h (get_ipa_tdesc): New prototype.
8722 (ipa_tdesc): Remove.
8723
e7ad2f14
PA
87242016-02-24 Pedro Alves <palves@redhat.com>
8725
8726 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8727 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8728 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8729 Factor out common code between the USE_SIGTRAP_SIGINFO and
8730 !USE_SIGTRAP_SIGINFO blocks.
8731 (linux_low_filter_event): Call save_stop_reason instead of
8732 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8733 Update comments.
8734 (linux_wait_1): Update comments.
8735
657f9cde
WW
87362016-02-24 Wei-cheng Wang <cole945@gmail.com>
8737
8738 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8739 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8740 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8741 ppc_insert_point, ppc_remove_point.
8742
b00b61e1
MK
87432016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8744
8745 * linux-s390-low.c (s390_supports_z_point_type): New function.
8746 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8747
553cb527
YQ
87482016-02-16 Yao Qi <yao.qi@linaro.org>
8749
8750 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8751 PC. Get pc from regcache_read_pc.
8752
a5652c21
YQ
87532016-02-12 Yao Qi <yao.qi@linaro.org>
8754
8755 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8756 or linux_get_pc_32bit.
8757 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8758
ed443b61
YQ
87592016-02-12 Yao Qi <yao.qi@linaro.org>
8760
8761 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8762 arm_linux_get_next_pcs_fixup.
8763
020ecd38
MK
87642016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8765
8766 * tracepoint.c (x_tracepoint_action_download): Change
8767 write_inferior_data_ptr to write_inferior_data_pointer.
8768 (cmd_qtstart): Likewise.
8769 (write_inferior_data_ptr): Remove.
8770 (download_agent_expr): Change write_inferior_data_ptr to
8771 write_inferior_data_pointer.
8772 (download_tracepoint_1): Likewise.
8773 (download_tracepoint): Likewise.
8774 (download_trace_state_variables): Likewise.
8775
7cae9051
WW
87762016-02-11 Wei-cheng Wang <cole945@gmail.com>
8777 Marcin Kościelnicki <koriakin@0x04.net>
8778
8779 * tracepoint.c (struct tracepoint_action_ops): Remove.
8780 (struct tracepoint_action): Remove ops.
8781 (m_tracepoint_action_download, r_tracepoint_action_download)
8782 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8783 size and offset accordingly.
8784 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8785 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8786 (tracepoint_action_send, tracepoint_action_download): New functions.
8787 Helpers for trace action handlers.
8788 (add_tracepoint_action): Remove setup actions ops.
8789 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8790
9f6a71b4
YQ
87912016-02-10 Yao Qi <yao.qi@linaro.org>
8792
8793 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8794
1e94266c
SM
87952016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8796
8797 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8798 to AC_OUTPUT.
8799 * configure: Regenerate.
8800
8adce034
SM
88012016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8802
8803 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8804 void * to gdb_byte *.
8805 * linux-low.c (siginfo_fixup): Likewise.
8806 (linux_xfer_siginfo): Likewise.
8807 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8808 Likewise.
8809 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8810
93813b37
WT
88112016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8812
8813 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8814 to srv_tgtobj.
8815 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8816 to srv_tgtobj.
8817 * linux-x86-low.c [__x86_64__]: Include
8818 "nat/amd64-linux-siginfo.h".
8819 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8820 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8821 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8822 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8823 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8824 (cpt_si_fd, si_timerid, si_overrun): Move from
8825 nat/amd64-linux-siginfo.c.
8826 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8827
8424cc97
SM
88282016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8829
8830 * server.c (skip_to_semicolon): Remove.
8831 (process_point_options): Use strchrnul instead of
8832 skip_to_semicolon.
8833
4d18591b
YQ
88342016-01-26 Yao Qi <yao.qi@linaro.org>
8835
8836 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8837 * linux-low.c (install_software_single_step_breakpoints): Don't
8838 call regcache_read_pc.
8839 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8840 argument pc.
8841
d8020970
YQ
88422016-01-26 Yao Qi <yao.qi@linaro.org>
8843
8844 * linux-low.c (install_software_single_step_breakpoints): Call
8845 regcache_read_pc instead of get_pc.
8846
8b207339
YQ
88472016-01-26 Yao Qi <yao.qi@linaro.org>
8848
8849 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8850 (unblock_async_io): Rename to ...
8851 (block_unblock_async_io): ... it. New function.
8852 (enable_async_io): Don't install SIGIO handler. Unblock it
8853 instead.
8854 (disable_async_io): Don't ignore SIGIO. Block it instead.
8855 (initialize_async_io): Install SIGIO handler. Don't call
8856 unblock_async_io.
8857
18879fef
YQ
88582016-01-26 Yao Qi <yao.qi@linaro.org>
8859
8860 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8861 first character is '\003', call *the_target->request_interrupt.
8862
a0f8e08a
YQ
88632016-01-25 Yao Qi <yao.qi@linaro.org>
8864
8865 * remote-utils.c (new_thread_notify): Remove.
8866 (dead_thread_notify): Likewise.
8867 * remote-utils.h (new_thread_notify): Remove declaration.
8868 (dead_thread_notify): Likewise.
8869
cc5fd9ab
MK
88702016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8871
8872 * gdb.trace/pending.exp: Fix expected message on continue.
8873
99e8eb11
MK
88742016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8875
8876 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8877 it works properly on big-endian machines where sizeof (CORE_ADDR)
8878 != sizeof (void *).
8879
a994041d
PA
88802016-01-21 Pedro Alves <palves@redhat.com>
8881
8882 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8883 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8884 * configure: Regenerate.
8885
f7a6a40d
YQ
88862016-01-21 Yao Qi <yao.qi@linaro.org>
8887
8888 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
8889 is_thumb and set it according to CPSR saved on the stack.
8890 (get_next_pcs_syscall_next_pc): Pass is_thumb to
8891 arm_sigreturn_next_pc.
8892
6f69e520
YQ
88932016-01-18 Yao Qi <yao.qi@linaro.org>
8894
8895 * linux-low.c (linux_set_pc_64bit): New function.
8896 (linux_get_pc_64bit): New function.
8897 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
8898 Declare.
8899 * linux-sparc-low.c (debug_threads): Remove declaration.
8900 (sparc_get_pc): Remove.
8901 (the_low_target): Use linux_get_pc_64bit instead of
8902 sparc_get_pc.
8903 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
8904 (the_low_target): Use linux_get_pc_64bit and
8905 linux_set_pc_64bit.
8906
276d4552
YQ
89072016-01-18 Yao Qi <yao.qi@linaro.org>
8908
8909 * linux-arm-low.c (debug_threads): Remove declaration.
8910 (arm_get_pc, arm_set_pc): Remove.
8911 (the_low_target): Use linux_get_pc_32bit and
8912 linux_set_pc_32bit.
8913 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
8914 (the_low_target): Use linux_get_pc_32bit and
8915 linux_set_pc_32bit.
8916 * linux-cris-low.c (debug_threads): Remove declaration.
8917 (cris_get_pc, cris_set_pc,): Remove.
8918 (the_low_target): Use linux_get_pc_32bit and
8919 linux_set_pc_32bit.
8920 * linux-crisv32-low.c (debug_threads): Remove declaration.
8921 (cris_get_pc, cris_set_pc): Remove.
8922 (the_low_target): Use linux_get_pc_32bit and
8923 linux_set_pc_32bit.
8924 * linux-low.c: Include inttypes.h.
8925 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
8926 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
8927 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
8928 (the_low_target): Use linux_get_pc_32bit and
8929 linux_set_pc_32bit.
8930 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
8931 (the_low_target): Use linux_get_pc_32bit and
8932 linux_set_pc_32bit.
8933 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
8934 (the_low_target): Use linux_get_pc_32bit and
8935 linux_set_pc_32bit.
8936 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
8937 (the_low_target): Use linux_get_pc_32bit and
8938 linux_set_pc_32bit.
8939 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
8940 (the_low_target): Use linux_get_pc_32bit and
8941 linux_set_pc_32bit.
8942
eb0edac8
GB
89432016-01-18 Gary Benson <gbenson@redhat.com>
8944
8945 * configure.ac (AC_FUNC_FORK): New check.
8946 * config.in: Regenerate.
8947 * configure: Likewise.
8948
1b451dda
YQ
89492016-01-14 Yao Qi <yao.qi@linaro.org>
8950
8951 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
8952 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
8953 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
8954 arm_get_next_pcs_ctor.
8955
82075af2
JS
89562016-01-12 Josh Stone <jistone@redhat.com>
8957 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8958
8959 * inferiors.h: Include "gdb_vecs.h".
8960 (struct process_info): Add syscalls_to_catch.
8961 * inferiors.c (remove_process): Free syscalls_to_catch.
8962 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8963 syscall_return stops.
8964 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
8965 * server.c (handle_general_set): Handle QCatchSyscalls.
8966 (handle_query): Report support for QCatchSyscalls.
8967 * target.h (struct target_ops): Add supports_catch_syscall.
8968 (target_supports_catch_syscall): New macro.
8969 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
8970 (struct lwp_info): Add syscall_state.
8971 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
8972 Maintain syscall_state and syscalls_to_catch across exec.
8973 (get_syscall_trapinfo): New function, proxy to the_low_target.
8974 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
8975 (linux_low_filter_event): Toggle syscall_state entry/return for
8976 syscall traps, and set it ignored for all others.
8977 (gdb_catching_syscalls_p): New function.
8978 (gdb_catch_this_syscall_p): New function.
8979 (linux_wait_1): Handle SYSCALL_SIGTRAP.
8980 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
8981 (linux_supports_catch_syscall): New function.
8982 (linux_target_ops): Install it.
8983 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
8984 (the_low_target): Install it.
8985
8f13a3ce
MF
89862016-01-12 Mike Frysinger <vapier@gentoo.org>
8987
8988 * acinclude.m4: Include new ../warning.m4 file.
8989 * configure: Regenerated.
8990 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
8991
5b3da067
MF
89922016-01-12 Mike Frysinger <vapier@gentoo.org>
8993
8994 * ax.c (is_goto_target): Mark static.
8995 * linux-low.c (register_addr): Likewise.
8996 (linux_fetch_registers, linux_store_registers): Likewise.
8997 * mem-break.c (any_persistent_commands): Fix old prototype.
8998 (add_commands_to_breakpoint): Mark static.
8999 * regcache.c (find_register_by_name): Delete unused func.
9000 * remote-utils.c (hex_or_minus_one): Mark static.
9001 * server.c (monitor_show_help): Mark static.
9002 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9003 handle_v_requests): Likewise.
9004
bc504a31
PA
90052016-01-12 Pedro Alves <palves@redhat.com>
9006
9007 Remove use of the registered trademark symbol throughout.
9008
5a0dd67a
YQ
90092016-01-08 Yao Qi <yao.qi@linaro.org>
9010
9011 * remote-utils.c (getpkt): If c is '\003', call target hook
9012 request_interrupt.
9013
b2ca446f
YQ
90142016-01-06 Yao Qi <yao.qi@linaro.org>
9015
9016 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9017 linux-aarch32-low.c.
9018 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9019 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9020 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9021 (thumb2_breakpoint): Declare.
9022 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9023 linux-aarch32-low.h.
9024 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9025 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9026 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9027
edd88788
JB
90282016-01-01 Joel Brobecker <brobecker@adacore.com>
9029
9030 * gdbreplay.c (gdbreplay_version): Change copyright year in
9031 version message.
9032 * server.c (gdbserver_version): Likewise.
9033
65da7f14
PP
90342015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9035
9036 * server.c (crc32_table): Delete.
9037 (crc32): Use libiberty's xcrc32 function.
9038
4abd5ed2
JB
90392015-12-22 Joel Brobecker <brobecker@adacore.com>
9040
9041 * lynx-low.c (lynx_delete_thread_callback): New function.
9042 (lynx_mourn): Properly delete our process and all of its
9043 threads. Remove call to clear_inferiors.
9044
0e50fe5c
JB
90452015-12-22 Joel Brobecker <brobecker@adacore.com>
9046
9047 * target.c (thread_search_callback): Add check that
9048 the thread_stopped target callback is not NULL before
9049 calling it.
9050
35adc03f
YQ
90512015-12-21 Yao Qi <yao.qi@linaro.org>
9052
9053 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9054 arm breakpoint.
9055
bd2b2909
AT
90562015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9057
9058 * server.c (handle_query): Call target_supports_software_single_step.
9059
7fe5e27e
AT
90602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9061
9062 * linux-low.c (single_step): New function.
9063 (linux_resume_one_lwp_throw): Call single_step.
9064 (start_step_over): Likewise.
9065
d9311bfa
AT
90662015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9067
9068 * Makefile.in (SFILES): Append arch/arm-linux.c,
9069 arch/arm-get-next-pcs.c.
9070 (arm-linux.o): New rule.
9071 (arm-get-next-pcs.o): New rule.
9072 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9073 arm-linux.o.
9074 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9075 to linux-aarch32-low.c.
9076 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9077 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9078 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9079 (thumb2_breakpoint_len): Likewise.
9080 (arm_is_thumb_mode): Make non-static.
9081 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9082 from linux-aarch32-low.c.
9083 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9084 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9085 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9086 (thumb2_breakpoint_len): Likewise.
9087 (arm_is_thumb_mode): New declaration.
9088 * linux-arm-low.c: Include arch/arm-linux.h
9089 aarch/arm-get-next-pcs.h, sys/syscall.h.
9090 (get_next_pcs_ops): New struct.
9091 (get_next_pcs_addr_bits_remove): New function.
9092 (get_next_pcs_is_thumb): New function.
9093 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9094 (arm_sigreturn_next_pc): Likewise.
9095 (get_next_pcs_syscall_next_pc): Likewise.
9096 (arm_gdbserver_get_next_pcs): Likewise.
9097 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9098 Initialize.
9099 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9100 * server.h: Include gdb_vecs.h.
9101
68ce2059
AT
91022015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9103
9104 * Makefile.in (SFILES): Append common/common-regcache.c.
9105 (OBS): Append common-regcache.o.
9106 (common-regcache.o): New rule.
9107 * regcache.c (init_register_cache): Initialize cache to
9108 REG_UNAVAILABLE.
9109 (regcache_raw_read_unsigned): New function.
9110 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9111 register_status enum.
9112
fa5308bd
AT
91132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9114
9115 * linux-aarch64-low.c (the_low_targets): Rename
9116 breakpoint_reinsert_addr to get_next_pcs.
9117 * linux-arm-low.c (the_low_targets): Likewise.
9118 * linux-bfin-low.c (the_low_targets): Likewise.
9119 * linux-cris-low.c (the_low_targets): Likewise.
9120 * linux-crisv32-low.c (the_low_targets): Likewise.
9121 * linux-low.c (can_software_single_step): Likewise.
9122 (install_software_single_step_breakpoints): New function.
9123 (start_step_over): Use install_software_single_step_breakpoints.
9124 * linux-low.h: New CORE_ADDR vector.
9125 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9126 get_next_pcs.
9127 * linux-mips-low.c (the_low_targets): Likewise.
9128 * linux-nios2-low.c (the_low_targets): Likewise.
9129 * linux-sparc-low.c (the_low_targets): Likewise.
9130
4a6ed09b
PA
91312015-12-17 Pedro Alves <palves@redhat.com>
9132
9133 * linux-low.c (linux_kill_one_lwp): Remove references to
9134 LinuxThreads.
9135 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9136 to 'kill'.
9137 (linux_init_signals): Delete.
9138 (initialize_low): Adjust.
9139 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9140
7544db95
PA
91412015-12-16 Pedro Alves <palves@redhat.com>
9142
9143 * configure.ac (compiler warning flags): When testing a
9144 -Wno-foo option, check whether -Wfoo works instead.
9145 * configure: Regenerate.
9146
8020350c
DB
91472015-12-11 Don Breazeal <donb@codesourcery.com>
9148
9149 * server.c (process_serial_event): Don't exit from gdbserver
9150 in remote mode if there are still active inferiors.
9151
db91f502
YQ
91522015-12-11 Yao Qi <yao.qi@linaro.org>
9153
9154 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9155 arm_breakpoint_at if the process is 32-bit.
9156
b37a6290
YQ
91572015-12-11 Yao Qi <yao.qi@linaro.org>
9158
9159 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9160 arm breakpoint.
9161
17b1509a
YQ
91622015-12-07 Yao Qi <yao.qi@linaro.org>
9163
9164 * configure.srv: Append arm.o to srv_tgtobj for
9165 aarch64*-*-linux* target.
9166 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9167 from linux-arm-low.c.
9168 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9169 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9170 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9171 (thumb2_breakpoint_len): Likewise.
9172 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9173 (arm_breakpoint_kinds): Likewise.
9174 (arm_breakpoint_kind_from_pc): Likewise.
9175 (arm_sw_breakpoint_from_kind): Likewise.
9176 (arm_breakpoint_kind_from_current_state): Likewise.
9177 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9178 (arm_sw_breakpoint_from_kind): Declare.
9179 (arm_breakpoint_kind_from_current_state): Declare.
9180 (arm_breakpoint_at): Declare.
9181 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9182 arm_sw_breakpoint_from_kind if process is 32-bit.
9183 (aarch64_breakpoint_kind_from_pc): New function.
9184 (aarch64_breakpoint_kind_from_current_state): New function.
9185 (the_low_target): Initialize fields breakpoint_kind_from_pc
9186 and breakpoint_kind_from_current_state.
9187 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9188 linux-aarch32-low.c.
9189 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9190 (arm_breakpoint, arm_breakpoint_len): Likewise.
9191 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9192 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9193 (arm_is_thumb_mode): Likewise.
9194 (arm_breakpoint_at): Likewise.
9195 (arm_breakpoint_kind_from_pc): Likewise.
9196 (arm_sw_breakpoint_from_kind): Likewise.
9197 (arm_breakpoint_kind_from_current_state): Likewise.
9198
9199 Revert:
9200 2015-08-04 Yao Qi <yao.qi@linaro.org>
9201
9202 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9203 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9204 * server.c (extended_protocol): Remove "static".
9205 * server.h (extended_protocol): Declare it.
9206
ece66d65
JS
92072015-12-04 Josh Stone <jistone@redhat.com>
9208
9209 * target.h (struct target_ops) <arch_setup>: Rename to ...
9210 (struct target_ops) <post_create_inferior>: ... this.
9211 (target_arch_setup): Rename to ...
9212 (target_post_create_inferior): ... this, calling post_create_inferior.
9213 * server.c (start_inferior): Update target_arch_setup calls to
9214 target_post_create_inferior.
9215 * linux-low.c (linux_low_ptrace_options): Forward declare.
9216 (linux_arch_setup): Update its comment for general use.
9217 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9218 (struct linux_target_ops): Use linux_post_create_inferior.
9219 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9220 to post_create_inferior.
9221 * nto-low.c (struct nto_target_ops): Likewise.
9222 * spu-low.c (struct spu_target_ops): Likewise.
9223 * win32-low.c (struct win32_target_ops): Likewise.
9224
e58c48b4
AT
92252015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9226
9227 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9228
fbec8956
AT
92292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9230
9231 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9232 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9233 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9234 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9235 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9236 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9237 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9238 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9239 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9240 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9241 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9242 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9243
9b4c5f87
AT
92442015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9245
9246 * linux-low.c (linux_look_up_symbols): Don't call
9247 linux_supports_traceclone.
9248 * linux-low.h (thread_db_init): Remove use_events argument.
9249 * thread-db.c (thread_db_use_event): Remove global variable.
9250 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9251 (struct thread_db) <td_create_bp>: Remove field.
9252 (thread_db_create_event): Remove function.
9253 (thread_db_enable_reporting): Likewise.
9254 (find_one_thread): Don't check for thread_db_use_events.
9255 (attach_thread): Likewise.
9256 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9257 (try_thread_db_load_1): Don't check for thread_db_use_events.
9258 (thread_db_init): Remove use_events argument and thread events
9259 handling.
9260 (remove_thread_event_breakpoints): Remove function.
9261 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9262
7d00775e
AT
92632015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9264
9265 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9266 New function.
9267 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9268 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9269 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9270 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9271 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9272 Initialize.
9273 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9274 New function.
9275 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9276 * linux-low.c (can_hardware_single_step): Use
9277 supports_hardware_single_step.
9278 (can_software_single_step): New function.
9279 (start_step_over): Call can_software_single_step.
9280 (linux_supports_hardware_single_step): New function.
9281 (struct target_ops) <supports_software_single_step>: Initialize.
9282 * linux-low.h (struct linux_target_ops)
9283 <supports_hardware_single_step>: Initialize.
9284 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9285 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9286 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9287 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9288 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9289 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9290 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9291 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9292 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9293 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9294 Initialize.
9295 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9296 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9297 Initialize.
9298 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9299 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9300 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9301 New function.
9302 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9303 * target.h (struct target_ops): <supports_software_single_step>:
9304 New field.
9305 (target_supports_software_single_step): New macro.
9306
2d97cd35
AT
93072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9308
9309 * linux-low.c (linux_wait_1): Fix pc advance condition.
9310 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9311 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9312
769ef81f
AT
93132015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9314
9315 * linux-arm-low.c (arm_is_thumb_mode): New function.
9316 (arm_breakpoint_at): Use arm_is_thumb_mode.
9317 (arm_breakpoint_kind_from_current_state): New function.
9318 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9319 Initialize.
9320 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9321 (linux_breakpoint_kind_from_current_state): New function.
9322 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9323 * linux-low.h (struct linux_target_ops)
9324 <breakpoint_kind_from_current_state>: New field.
9325 * target.h (struct target_ops): Likewise.
9326 (target_breakpoint_kind_from_current_state): New macro.
9327
1bebeeca
PA
93282015-11-30 Pedro Alves <palves@redhat.com>
9329
9330 * linux-low.c (linux_resume): Wake up the event loop before
9331 returning.
9332
a67a9fae
PA
93332015-11-30 Pedro Alves <palves@redhat.com>
9334
9335 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9336 check.
9337 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9338 to -1.
9339 * target.c (struct thread_search): New structure.
9340 (thread_search_callback): New function.
9341 (prev_general_thread): New global.
9342 (prepare_to_access_memory, done_accessing_memory): New functions.
9343 * target.h (prepare_to_access_memory, done_accessing_memory):
9344 Replace macros with function declarations.
9345
f2faf941
PA
93462015-11-30 Pedro Alves <palves@redhat.com>
9347
9348 PR 14618
9349 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9350 report TARGET_WAITKIND_NO_RESUMED.
9351 * remote-utils.c (prepare_resume_reply): Handle
9352 TARGET_WAITKIND_NO_RESUMED.
9353 * server.c (report_no_resumed): New global.
9354 (handle_query) <qSupported>: Handle "no-resumed+". Report
9355 "no-resumed+" support.
9356 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9357 return error if the client doesn't support no-resumed events.
9358 (push_stop_notification): New function.
9359 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9360 events if the client supports them.
9361
a681f9c9
PA
93622015-11-30 Pedro Alves <palves@redhat.com>
9363
9364 * linux-low.c (thread_still_has_status_pending_p): Don't check
9365 vCont;t here.
9366 (lwp_resumed): New function.
9367 (status_pending_p_callback): Return early if the LWP is not
9368 supposed to be resumed.
9369
65706a29
PA
93702015-11-30 Pedro Alves <palves@redhat.com>
9371
9372 * linux-low.c (handle_extended_wait): Assert that the LWP's
9373 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9374 thread create events, leave the new child's status pending.
9375 (linux_low_filter_event): If GDB wants to hear about thread exit
9376 events, leave the LWP marked dead and don't delete it.
9377 (linux_wait_for_event_filtered): Don't check for thread exit.
9378 (filter_exit_event): New function.
9379 (linux_wait_1): Use it, when returning an exit event.
9380 (linux_resume_one_lwp_throw): Assert that the LWP's
9381 waitstatus is TARGET_WAITKIND_IGNORE.
9382 * remote-utils.c (prepare_resume_reply): Handle
9383 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9384 * server.c (report_thread_events): New global.
9385 (handle_general_set): Handle QThreadEvents.
9386 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9387 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9388 TARGET_WAITKIND_THREAD_EXITED.
9389 * server.h (report_thread_events): Declare.
9390
56cf4bed
PA
93912015-11-30 Pedro Alves <palves@redhat.com>
9392
9393 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9394 the thread's last_resume_kind was resume_stop.
9395
500c1d85
PA
93962015-11-30 Pedro Alves <palves@redhat.com>
9397
9398 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9399 before returning.
9400
de979965
PA
94012015-11-30 Pedro Alves <palves@redhat.com>
9402
9403 * server.c (handle_v_requests): Handle vCtrlC.
9404
34c65914
PA
94052015-11-30 Pedro Alves <palves@redhat.com>
9406
9407 * gdbthread.h (find_any_thread_of_pid): Declare.
9408 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9409 functions.
9410 * server.c (handle_query): If current_thread is NULL, look for
9411 another thread of the selected process.
9412
79efa585 94132015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 9414 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
9415
9416 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9417 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9418 name in reply.
9419 * target.h (struct target_ops) <thread_name>: New field.
9420 (target_thread_name): New macro.
9421
80d82c19
JB
94222015-11-23 Joel Brobecker <brobecker@adacore.com>
9423
9424 * regcache.h (regcache_invalidate_pid): Add declaration.
9425 * regcache.c (regcache_invalidate_pid): New function, extracted
9426 from regcache_invalidate.
9427 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9428 Add trivial documentation comment.
9429 * lynx-low.c: Use regcache_invalidate_pid instead of
9430 regcache_invalidate.
9431
64da5dd5
JB
94322015-11-23 Joel Brobecker <brobecker@adacore.com>
9433
9434 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9435 and Elf64_auxv_t if the target is Android.
9436
37ce4055
DE
94372015-11-22 Doug Evans <xdje42@gmail.com>
9438
9439 * target.h: #include <sys/types.h>.
9440
06e03fff
PA
94412015-11-19 Pedro Alves <palves@redhat.com>
9442
9443 * linux-low.c (linux_process_qsupported): Change prototype.
9444 Adjust.
9445 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9446 Change prototype.
9447 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9448 and adjust to loop over all features.
9449 * server.c (handle_query) <qSupported>: Adjust to call
9450 target_process_qsupported once, passing it a vector of unprocessed
9451 features.
9452 * target.h (struct target_ops) <process_qsupported>: Change
9453 prototype.
9454 (target_process_qsupported): Adjust.
9455
9a084706
PA
94562015-11-19 Pedro Alves <palves@redhat.com>
9457
9458 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9459 mode.
9460 * configure: Regenerate.
9461
dad44a1f
PA
94622015-11-19 Pedro Alves <palves@redhat.com>
9463
9464 * configure: Regenerate.
9465
231c0592
YQ
94662015-11-19 Yao Qi <yao.qi@linaro.org>
9467
9468 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9469 type to uint32_t.
9470
6c1c9a8b
YQ
94712015-11-19 Yao Qi <yao.qi@linaro.org>
9472
9473 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9474 (struct aarch64_operand): Move enum out.
9475
9caa3311
YQ
94762015-11-19 Yao Qi <yao.qi@linaro.org>
9477
9478 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9479 struct user_fpsimd_state *.
9480 (aarch64_store_fpregset): Likewise.
9481
6a69a054
YQ
94822015-11-19 Yao Qi <yao.qi@linaro.org>
9483
9484 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9485 struct user_pt_regs *.
9486 (aarch64_store_gregset): Likewise.
9487
1798301e
PA
94882015-11-18 Pedro Alves <palves@redhat.com>
9489
9490 * Makefile.in (all_object_files): Add $IPA_OBJS.
9491
ce7715e2
PA
94922015-11-17 Pedro Alves <palves@redhat.com>
9493
9494 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9495 GDB_SIGNAL_0 and gdb_signal_to_string.
9496
c0879059
PA
94972015-11-17 Pedro Alves <palves@redhat.com>
9498
9499 * win32-low.c (handle_output_debug_string): Remove parameter.
9500 (win32_kill): Remove our_status local and adjust call to
9501 handle_output_debug_string.
9502 (get_child_debug_event): Adjust call to
9503 handle_output_debug_string.
9504
1996e237
SM
95052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9506
9507 * linux-mips-low.c (mips_fill_gregset): Add cast.
9508 (mips_store_gregset): Likewise.
9509 (mips_fill_fpregset): Likewise.
9510 (mips_store_fpregset): Likewise.
9511
cbec665b
SM
95122015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9513
9514 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9515 priv.
9516
eb3e3c67
SM
95172015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9518
9519 * linux-mips-low.c (mips_linux_new_thread): Change type of
9520 watch_type to enum target_hw_bp_type.
9521
171de4b8
SM
95222015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9523
9524 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9525 Change return type to arm_hwbp_type.
9526
04248ead
SM
95272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9528
9529 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9530 (arm_store_gregset): Likewise.
9531 * linux-arm-low.c (arm_get_hwcap): Likewise.
9532 (arm_read_description): Likewise.
9533
04b3479c
SM
95342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9535
9536 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9537
2bc84e8a
SM
95382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9539
9540 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9541 (ppc_fill_vsxregset): Likewise.
9542 (ppc_store_vsxregset): Likewise.
9543 (ppc_fill_vrregset): Likewise.
9544 (ppc_store_vrregset): Likewise.
9545 (ppc_fill_evrregset): Likewise.
9546 (ppc_store_evrregset): Likewise.
9547
e6c5bb05
SM
95482015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9549
9550 * linux-ppc-low.c (ppc_usrregs_info): Remove
9551 forward-declaration.
9552 (ppc_arch_setup): Move lower in file.
9553
7ea45d72
SM
95542015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9555
9556 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9557 (ps_pdwrite): Likewise.
9558
69291610
HW
95592015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9560
9561 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9562 to after assert checks.
9563
b42945fd
SM
95642015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9565
9566 * proc-service.c (ps_pdread): Add/adjust casts.
9567 (ps_pdwrite): Add/adjust casts.
9568
d6f85c84
SM
95692015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9570
9571 * server.c (handle_search_memory_1): Cast return value of
9572 memmem.
9573
f98cd059
SM
95742015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9575
9576 * server.c (write_qxfer_response): Change type of data to
9577 gdb_byte *.
9578
d2412fa5
PA
95792015-10-29 Pedro Alves <palves@redhat.com>
9580
9581 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9582
c17414a2
PA
95832015-10-29 Pedro Alves <palves@redhat.com>
9584
9585 * tracepoint.c (clear_installed_tracepoints): Add casts.
9586
e053fbc4
PA
95872015-10-29 Pedro Alves <palves@redhat.com>
9588
9589 * server.c (handle_v_cont, process_serial_event): Add enum
9590 gdb_signal casts to signal parsing code.
9591
add67df8
PA
95922015-10-29 Pedro Alves <palves@redhat.com>
9593
9594 * linux-low.h (NULL_REGSET): Define.
9595 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9596 * linux-arm-low.c (arm_regsets): Likewise.
9597 * linux-crisv32-low.c (cris_regsets): Likewise.
9598 * linux-m68k-low.c (m68k_regsets): Likewise.
9599 * linux-mips-low.c (mips_regsets): Likewise.
9600 * linux-nios2-low.c (nios2_regsets): Likewise.
9601 * linux-ppc-low.c (ppc_regsets): Likewise.
9602 * linux-s390-low.c (s390_regsets): Likewise.
9603 * linux-sh-low.c (sh_regsets): Likewise.
9604 * linux-sparc-low.c (sparc_regsets): Likewise.
9605 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9606 * linux-tile-low.c (tile_regsets): Likewise.
9607 * linux-x86-low.c (x86_regsets): Likewise.
9608 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9609
50bc912a
PA
96102015-10-29 Pedro Alves <palves@redhat.com>
9611
9612 * linux-low.h (NULL_REGSET): Define.
9613 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9614 * linux-arm-low.c (arm_regsets): Likewise.
9615 * linux-crisv32-low.c (cris_regsets): Likewise.
9616 * linux-m68k-low.c (m68k_regsets): Likewise.
9617 * linux-mips-low.c (mips_regsets): Likewise.
9618 * linux-nios2-low.c (nios2_regsets): Likewise.
9619 * linux-ppc-low.c (ppc_regsets): Likewise.
9620 * linux-s390-low.c (s390_regsets): Likewise.
9621 * linux-sh-low.c (sh_regsets): Likewise.
9622 * linux-sparc-low.c (sparc_regsets): Likewise.
9623 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9624 * linux-tile-low.c (tile_regsets): Likewise.
9625 * linux-x86-low.c (x86_regsets): Likewise.
9626 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9627
682b2546
DE
96282015-10-26 Doug Evans <dje@google.com>
9629
9630 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9631
963843d4
DE
96322015-10-26 Doug Evans <dje@google.com>
9633
9634 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9635
d41401ac
DE
96362015-10-26 Doug Evans <dje@google.com>
9637
9638 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9639 for debug_printf.
9640 (attach_thread, find_new_threads_callback): Ditto.
9641
3db28855
AT
96422015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9643
9644 * mem-break.h (set_breakpoint_data): Remove.
9645
fb78e89c
AT
96462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9647
9648 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9649 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9650 (initialize_low): Remove set_breakpoint_data call.
9651 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9652 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9653 (initialize_low): Remove set_breakpoint_data call.
9654 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9655 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9656 (initialize_low): Remove set_breakpoint_data call.
9657
2e6ee069
AT
96582015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9659
9660 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9661 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9662 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9663 * target.h (target_breakpoint_kind_from_pc): New macro.
9664
1652a986
AT
96652015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9666
9667 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9668 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9669 the default breakpoint kind.
9670
abeead09
AT
96712015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9672
9673 * linux-arm-low.c (arm_supports_z_point_type): Add software
9674 breakpoint support.
9675
b0b4b501
AT
96762015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9677
9678 * linux-arm-low.c: Refactor breakpoint definitions.
9679 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9680 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9681
8689682c
AT
96822015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9683
9684 * Makefile.in: Add arm.c/o.
9685 * configure.srv: Likewise.
9686 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9687 (arm_breakpoint_kind_from_pc): New function.
9688 (arm_sw_breakpoint_from_kind): Return proper kind.
9689 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9690
27165294
AT
96912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9692
9693 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9694 removal.
9695 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9696 (struct raw_breakpoint) <size>: Remove.
9697 (struct raw_breakpoint) <kind>: Add.
9698 (bp_size): New function.
9699 (bp_opcode): Likewise.
9700 (find_raw_breakpoint_at): Adjust for kind.
9701 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9702 (remove_memory_breakpoint): Adjust for kind call bp_size.
9703 (set_raw_breakpoint_at): Adjust for kind.
9704 (set_breakpoint): Likewise.
9705 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9706 (delete_raw_breakpoint): Adjust for kind.
9707 (delete_breakpoint): Likewise.
9708 (find_gdb_breakpoint): Likewise.
9709 (set_gdb_breakpoint_1): Likewise.
9710 (set_gdb_breakpoint): Likewise.
9711 (delete_gdb_breakpoint_1): Likewise.
9712 (delete_gdb_breakpoint): Likewise.
9713 (uninsert_raw_breakpoint): Likewise.
9714 (reinsert_raw_breakpoint): Likewise.
9715 (set_breakpoint_data): Remove.
9716 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9717 (check_mem_read): Adjust for kind call bp_size.
9718 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9719 (clone_one_breakpoint): Adjust for kind.
9720 * mem-break.h (set_gdb_breakpoint): Likewise.
9721 (delete_gdb_breakpoint): Likewise.
9722 * server.c (process_serial_event): Likewise.
9723
dd373349
AT
97242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9725
9726 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9727 (struct linux_target_ops) <breakpoint>: Remove.
9728 (struct linux_target_ops) <breakpoint_len>: Remove.
9729 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9730 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9731 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9732 (arm_sw_breakpoint_from_kind): New function.
9733 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9734 (struct linux_target_ops) <breakpoint>: Remove.
9735 (struct linux_target_ops) <breakpoint_len>: Remove.
9736 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9737 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9738 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9739 (struct linux_target_ops) <breakpoint>: Remove.
9740 (struct linux_target_ops) <breakpoint_len>: Remove.
9741 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9742 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9743 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9744 (struct linux_target_ops) <breakpoint>: Remove.
9745 (struct linux_target_ops) <breakpoint_len>: Remove.
9746 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9747 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9748 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9749 and sw_breakpoint_from_kind to increment the pc.
9750 (linux_breakpoint_kind_from_pc): New function.
9751 (linux_sw_breakpoint_from_kind): New function.
9752 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9753 (initialize_low): Call breakpoint_kind_from_pc and
9754 sw_breakpoint_from_kind to replace breakpoint_data/len.
9755 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9756 New field.
9757 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9758 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9759 (struct linux_target_ops) <breakpoint>: Remove.
9760 (struct linux_target_ops) <breakpoint_len>: Remove.
9761 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9762 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9763 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9764 (struct linux_target_ops) <breakpoint>: Remove.
9765 (struct linux_target_ops) <breakpoint_len>: Remove.
9766 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9767 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9768 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9769 (struct linux_target_ops) <breakpoint>: Remove.
9770 (struct linux_target_ops) <breakpoint_len>: Remove.
9771 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9772 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9773 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9774 (struct linux_target_ops) <breakpoint>: Remove.
9775 (struct linux_target_ops) <breakpoint_len>: Remove.
9776 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9777 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9778 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9779 (struct linux_target_ops) <breakpoint>: Remove.
9780 (struct linux_target_ops) <breakpoint_len>: Remove.
9781 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9782 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9783 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9784 (struct linux_target_ops) <breakpoint>: Remove.
9785 (struct linux_target_ops) <breakpoint_len>: Remove.
9786 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9787 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9788 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9789 (struct linux_target_ops) <breakpoint>: Remove.
9790 (struct linux_target_ops) <breakpoint_len>: Remove.
9791 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9792 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9793 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9794 (struct linux_target_ops) <breakpoint>: Remove.
9795 (struct linux_target_ops) <breakpoint_len>: Remove.
9796 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9797 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9798 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9799 (struct linux_target_ops) <breakpoint>: Remove.
9800 (struct linux_target_ops) <breakpoint_len>: Remove.
9801 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9802 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9803 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9804 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9805 (struct linux_target_ops) <breakpoint>: Remove.
9806 (struct linux_target_ops) <breakpoint_len>: Remove.
9807 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9808 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9809 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9810 (struct linux_target_ops) <breakpoint>: Remove.
9811 (struct linux_target_ops) <breakpoint_len>: Remove.
9812 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9813 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9814
4cd98a19
AT
98152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9816
9817 * linux-cris-low.c (cris_get_pc): Remove void arg.
9818
774ee6d2
AR
98192015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9820
9821 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9822 variable name.
9823
833dcd29
AR
98242015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9825
9826 * inferiors.c (thread_pid_matches_callback): New function.
9827 (find_thread_process): New function.
9828 (remove_thread): Reset current_thread.
9829 (remove_process): Assert threads have been removed first.
9830
8d689ee5
YQ
98312015-10-15 Yao Qi <yao.qi@linaro.org>
9832
9833 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9834 if it is 3.
9835 (aarch64_remove_point): Likewise.
9836 * regcache.c (regcache_register_size): New function.
9837
1c2e1515
YQ
98382015-10-12 Yao Qi <yao.qi@linaro.org>
9839
9840 * linux-aarch64-low.c: Update all callers as emit_load_store
9841 is renamed to aarch64_emit_load_store.
9842
e1c587c3
YQ
98432015-10-12 Yao Qi <yao.qi@linaro.org>
9844
9845 * linux-aarch64-low.c: Update all callers of function renaming
9846 from emit_insn to aarch64_emit_insn.
9847
b6542f81
YQ
98482015-10-12 Yao Qi <yao.qi@linaro.org>
9849
9850 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9851 arch/aarch64-insn.h.
9852 (struct aarch64_memory_operand): Likewise.
9853 (ENCODE): Likewise.
9854 (emit_insn): Move to arch/aarch64-insn.c.
9855 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9856 (emit_load_store): Move to arch/aarch64-insn.c.
9857 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9858 (can_encode_int32): Remove.
9859
246994ce
YQ
98602015-10-12 Yao Qi <yao.qi@linaro.org>
9861
9862 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9863 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9864 (aarch64_relocate_instruction): Likewise.
9865 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9866 (struct aarch64_insn_visitor): Likewise.
9867
0badd99f
YQ
98682015-10-12 Yao Qi <yao.qi@linaro.org>
9869
9870 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9871 (struct aarch64_insn_visitor): New.
9872 (struct aarch64_insn_relocation_data): New.
9873 (aarch64_ftrace_insn_reloc_b): New function.
9874 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9875 (aarch64_ftrace_insn_reloc_cb): Likewise.
9876 (aarch64_ftrace_insn_reloc_tb): Likewise.
9877 (aarch64_ftrace_insn_reloc_adr): Likewise.
9878 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9879 (aarch64_ftrace_insn_reloc_others): Likewise.
9880 (visitor): New.
9881 (aarch64_relocate_instruction): Use visitor.
9882
dfaffe9d
YQ
98832015-10-12 Yao Qi <yao.qi@linaro.org>
9884
9885 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
9886 int. Add argument buf.
9887 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
9888 aarch64_relocate_instruction.
9889
70b439f0
YQ
98902015-10-12 Yao Qi <yao.qi@linaro.org>
9891
9892 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
9893 argument insn. Remove local variable insn. Don't call
9894 target_read_uint32.
9895 (aarch64_install_fast_tracepoint_jump_pad): Call
9896 target_read_uint32.
9897
7781c06f
YQ
98982015-09-30 Yao Qi <yao.qi@linaro.org>
9899
9900 * linux-aarch64-low.c (emit_movk): Shorten a long line.
9901 (emit_load_store_pair): Likewise.
9902
9a3c8263
SM
99032015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9904
9905 * dll.c (match_dll): Add cast(s).
9906 (unloaded_dll): Likewise.
9907 * linux-low.c (second_thread_of_pid_p): Likewise.
9908 (delete_lwp_callback): Likewise.
9909 (count_events_callback): Likewise.
9910 (select_event_lwp_callback): Likewise.
9911 (linux_set_resume_request): Likewise.
9912 * server.c (accumulate_file_name_length): Likewise.
9913 (emit_dll_description): Likewise.
9914 (handle_qxfer_threads_worker): Likewise.
9915 (visit_actioned_threads): Likewise.
9916 * thread-db.c (any_thread_of): Likewise.
9917 * tracepoint.c (same_process_p): Likewise.
9918 (match_blocktype): Likewise.
9919 (build_traceframe_info_xml): Likewise.
9920
224c3ddb
SM
99212015-09-25 Simon Marchi <simon.marchi@ericsson.com>
9922
9923 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
9924 assignment.
9925 (gdb_unparse_agent_expr): Likewise.
9926 * hostio.c (require_data): Likewise.
9927 (handle_pread): Likewise.
9928 * linux-low.c (disable_regset): Likewise.
9929 (fetch_register): Likewise.
9930 (store_register): Likewise.
9931 (get_dynamic): Likewise.
9932 (linux_qxfer_libraries_svr4): Likewise.
9933 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
9934 (set_fast_tracepoint_jump): Likewise.
9935 (uninsert_fast_tracepoint_jumps_at): Likewise.
9936 (reinsert_fast_tracepoint_jumps_at): Likewise.
9937 (validate_inserted_breakpoint): Likewise.
9938 (clone_agent_expr): Likewise.
9939 * regcache.c (init_register_cache): Likewise.
9940 * remote-utils.c (putpkt_binary_1): Likewise.
9941 (decode_M_packet): Likewise.
9942 (decode_X_packet): Likewise.
9943 (look_up_one_symbol): Likewise.
9944 (relocate_instruction): Likewise.
9945 (monitor_output): Likewise.
9946 * server.c (handle_search_memory): Likewise.
9947 (handle_qxfer_exec_file): Likewise.
9948 (handle_qxfer_libraries): Likewise.
9949 (handle_qxfer): Likewise.
9950 (handle_query): Likewise.
9951 (handle_v_cont): Likewise.
9952 (handle_v_run): Likewise.
9953 (captured_main): Likewise.
9954 * target.c (write_inferior_memory): Likewise.
9955 * thread-db.c (try_thread_db_load_from_dir): Likewise.
9956 * tracepoint.c (init_trace_buffer): Likewise.
9957 (add_tracepoint_action): Likewise.
9958 (add_traceframe): Likewise.
9959 (add_traceframe_block): Likewise.
9960 (cmd_qtdpsrc): Likewise.
9961 (cmd_qtdv): Likewise.
9962 (cmd_qtstatus): Likewise.
9963 (response_source): Likewise.
9964 (response_tsv): Likewise.
9965 (cmd_qtnotes): Likewise.
9966 (gdb_collect): Likewise.
9967 (initialize_tracepoint): Likewise.
9968
afbe19f8
PL
99692015-09-21 Pierre Langlois <pierre.langlois@arm.com>
9970
9971 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
9972 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
9973 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
9974 <NOP>: New.
9975 (enum aarch64_condition_codes): New enum.
9976 (w0): New static global.
9977 (fp): Likewise.
9978 (lr): Likewise.
9979 (struct aarch64_memory_operand) <type>: New
9980 MEMORY_OPERAND_POSTINDEX type.
9981 (postindex_memory_operand): New helper function.
9982 (emit_ret): New function.
9983 (emit_load_store_pair): New function, factored out of emit_stp
9984 with support for MEMORY_OPERAND_POSTINDEX.
9985 (emit_stp): Rewrite using emit_load_store_pair.
9986 (emit_ldp): New function.
9987 (emit_load_store): Likewise.
9988 (emit_ldr): Mention post-index instruction in comment.
9989 (emit_ldrh): New function.
9990 (emit_ldrb): New function.
9991 (emit_ldrsw): Mention post-index instruction in comment.
9992 (emit_str): Likewise.
9993 (emit_subs): New function.
9994 (emit_cmp): Likewise.
9995 (emit_and): Likewise.
9996 (emit_orr): Likewise.
9997 (emit_orn): Likewise.
9998 (emit_eor): Likewise.
9999 (emit_mvn): Likewise.
10000 (emit_lslv): Likewise.
10001 (emit_lsrv): Likewise.
10002 (emit_asrv): Likewise.
10003 (emit_mul): Likewise.
10004 (emit_sbfm): Likewise.
10005 (emit_sbfx): Likewise.
10006 (emit_ubfm): Likewise.
10007 (emit_ubfx): Likewise.
10008 (emit_csinc): Likewise.
10009 (emit_cset): Likewise.
10010 (emit_nop): Likewise.
10011 (emit_ops_insns): New helper function.
10012 (emit_pop): Likewise.
10013 (emit_push): Likewise.
10014 (aarch64_emit_prologue): New function.
10015 (aarch64_emit_epilogue): Likewise.
10016 (aarch64_emit_add): Likewise.
10017 (aarch64_emit_sub): Likewise.
10018 (aarch64_emit_mul): Likewise.
10019 (aarch64_emit_lsh): Likewise.
10020 (aarch64_emit_rsh_signed): Likewise.
10021 (aarch64_emit_rsh_unsigned): Likewise.
10022 (aarch64_emit_ext): Likewise.
10023 (aarch64_emit_log_not): Likewise.
10024 (aarch64_emit_bit_and): Likewise.
10025 (aarch64_emit_bit_or): Likewise.
10026 (aarch64_emit_bit_xor): Likewise.
10027 (aarch64_emit_bit_not): Likewise.
10028 (aarch64_emit_equal): Likewise.
10029 (aarch64_emit_less_signed): Likewise.
10030 (aarch64_emit_less_unsigned): Likewise.
10031 (aarch64_emit_ref): Likewise.
10032 (aarch64_emit_if_goto): Likewise.
10033 (aarch64_emit_goto): Likewise.
10034 (aarch64_write_goto_address): Likewise.
10035 (aarch64_emit_const): Likewise.
10036 (aarch64_emit_call): Likewise.
10037 (aarch64_emit_reg): Likewise.
10038 (aarch64_emit_pop): Likewise.
10039 (aarch64_emit_stack_flush): Likewise.
10040 (aarch64_emit_zero_ext): Likewise.
10041 (aarch64_emit_swap): Likewise.
10042 (aarch64_emit_stack_adjust): Likewise.
10043 (aarch64_emit_int_call_1): Likewise.
10044 (aarch64_emit_void_call_2): Likewise.
10045 (aarch64_emit_eq_goto): Likewise.
10046 (aarch64_emit_ne_goto): Likewise.
10047 (aarch64_emit_lt_goto): Likewise.
10048 (aarch64_emit_le_goto): Likewise.
10049 (aarch64_emit_gt_goto): Likewise.
10050 (aarch64_emit_ge_got): Likewise.
10051 (aarch64_emit_ops_impl): New static global variable.
10052 (aarch64_emit_ops): New target function, return
10053 &aarch64_emit_ops_impl.
10054 (struct linux_target_ops): Install it.
10055
bb903df0
PL
100562015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10057
10058 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10059 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10060 aarch64-ipa.o.
10061 * linux-aarch64-ipa.c: New file.
10062 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10063 and endian.h.
10064 (aarch64_get_thread_area): New target method.
10065 (extract_signed_bitfield): New helper function.
10066 (aarch64_decode_ldr_literal): New function.
10067 (enum aarch64_opcodes): New enum.
10068 (struct aarch64_register): New struct.
10069 (struct aarch64_operand): New struct.
10070 (x0): New static global.
10071 (x1): Likewise.
10072 (x2): Likewise.
10073 (x3): Likewise.
10074 (x4): Likewise.
10075 (w2): Likewise.
10076 (ip0): Likewise.
10077 (sp): Likewise.
10078 (xzr): Likewise.
10079 (aarch64_register): New helper function.
10080 (register_operand): Likewise.
10081 (immediate_operand): Likewise.
10082 (struct aarch64_memory_operand): New struct.
10083 (offset_memory_operand): New helper function.
10084 (preindex_memory_operand): Likewise.
10085 (enum aarch64_system_control_registers): New enum.
10086 (ENCODE): New macro.
10087 (emit_insn): New helper function.
10088 (emit_b): New function.
10089 (emit_bcond): Likewise.
10090 (emit_cb): Likewise.
10091 (emit_tb): Likewise.
10092 (emit_blr): Likewise.
10093 (emit_stp): Likewise.
10094 (emit_ldp_q_offset): Likewise.
10095 (emit_stp_q_offset): Likewise.
10096 (emit_load_store): Likewise.
10097 (emit_ldr): Likewise.
10098 (emit_ldrsw): Likewise.
10099 (emit_str): Likewise.
10100 (emit_ldaxr): Likewise.
10101 (emit_stxr): Likewise.
10102 (emit_stlr): Likewise.
10103 (emit_data_processing_reg): Likewise.
10104 (emit_data_processing): Likewise.
10105 (emit_add): Likewise.
10106 (emit_sub): Likewise.
10107 (emit_mov): Likewise.
10108 (emit_movk): Likewise.
10109 (emit_mov_addr): Likewise.
10110 (emit_mrs): Likewise.
10111 (emit_msr): Likewise.
10112 (emit_sevl): Likewise.
10113 (emit_wfe): Likewise.
10114 (append_insns): Likewise.
10115 (can_encode_int32_in): New helper function.
10116 (aarch64_relocate_instruction): New function.
10117 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10118 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10119 (struct linux_target_ops): Install aarch64_get_thread_area,
10120 aarch64_install_fast_tracepoint_jump_pad and
10121 aarch64_get_min_fast_tracepoint_insn_len.
10122
787749ea
PL
101232015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10124
10125 * Makefile.in (aarch64-insn.o): New rule.
10126 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10127
9812b2e6
YQ
101282015-09-21 Yao Qi <yao.qi@linaro.org>
10129
10130 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10131
18fe412b
YQ
101322015-09-21 Yao Qi <yao.qi@linaro.org>
10133
10134 * tracepoint.c (max_jump_pad_size): Remove.
10135
a0cc84cd
YQ
101362015-09-18 Yao Qi <yao.qi@linaro.org>
10137
10138 * linux-aarch64-low.c: Don't include sys/uio.h.
10139 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10140
d78908cf
WW
101412015-09-16 Wei-cheng Wang <cole945@gmail.com>
10142
10143 * tracepoint.c (eval_result_type): Change prototype.
10144 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10145
d57e0d50
PA
101462015-09-15 Pedro Alves <palves@redhat.com>
10147
10148 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10149 Check whether to report exec events instead of checking whether
10150 multiprocess is enabled.
10151
5a676acc
PA
101522015-09-15 Pedro Alves <palves@redhat.com>
10153
10154 PR remote/18965
10155 * remote-utils.c (prepare_resume_reply): Merge
10156 TARGET_WAITKIND_VFORK_DONE switch case with the
10157 TARGET_WAITKIND_FORKED case.
10158
7c5d0fad
YQ
101592015-09-15 Yao Qi <yao.qi@linaro.org>
10160
10161 * server.c (handle_query): Check string comparison using
10162 "else if" instead of "if".
10163
750ce8d1
YQ
101642015-09-15 Yao Qi <yao.qi@linaro.org>
10165
10166 * server.c (vCont_supported): New global variable.
10167 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10168 matches. Append ";vContSupported+" to own_buf.
10169 (handle_v_requests): Append ";s;S" to own_buf if target supports
10170 hardware single step or vCont_supported is false.
10171 (capture_main): Set vCont_supported to zero.
10172
70b90b91
YQ
101732015-09-15 Yao Qi <yao.qi@linaro.org>
10174
10175 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10176 it to ...
10177 (linux_supports_hardware_single_step): ... New function.
10178 (linux_target_ops): Update.
10179 * lynx-low.c (lynx_target_ops): Set field
10180 supports_hardware_single_step to target_can_do_hardware_single_step.
10181 * nto-low.c (nto_target_ops): Likewise.
10182 * spu-low.c (spu_target_ops): Likewise.
10183 * win32-low.c (win32_target_ops): Likewise.
10184 * target.c (target_can_do_hardware_single_step): New function.
10185 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10186 Remove. <supports_hardware_single_step>: New field.
10187 (target_supports_conditional_breakpoints): Remove.
10188 (target_supports_hardware_single_step): New macro.
10189 (target_can_do_hardware_single_step): Declare.
10190 * server.c (handle_query): Use target_supports_hardware_single_step
10191 instead of target_supports_conditional_breakpoints.
10192
ade90bde
YQ
101932015-09-15 Yao Qi <yao.qi@linaro.org>
10194
10195 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10196 function.
10197 (struct linux_target_ops the_low_target): Install
10198 aarch64_linux_siginfo_fixup.
10199
94585166
DB
102002015-09-11 Don Breazeal <donb@codesourcery.com>
10201 Luis Machado <lgustavo@codesourcery.com>
10202
10203 * linux-low.c (linux_mourn): Static declaration.
10204 (linux_arch_setup): Move in front of
10205 handle_extended_wait.
10206 (linux_arch_setup_thread): New function.
10207 (handle_extended_wait): Handle exec events. Call
10208 linux_arch_setup_thread. Make event_lwp argument a
10209 pointer-to-a-pointer.
10210 (check_zombie_leaders): Do not check stopped threads.
10211 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10212 (linux_low_filter_event): Add lwp and thread for exec'ing
10213 non-leader thread if leader thread has been deleted.
10214 Refactor code into linux_arch_setup_thread and call it.
10215 Pass child lwp pointer by reference to handle_extended_wait.
10216 (linux_wait_for_event_filtered): Update comment.
10217 (linux_wait_1): Prevent clobbering exec event status.
10218 (linux_supports_exec_events): New function.
10219 (linux_target_ops) <supports_exec_events>: Initialize new member.
10220 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10221 new member.
10222 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10223 * server.c (report_exec_events): New global variable.
10224 (handle_query): Handle qSupported query for exec-events feature.
10225 (captured_main): Initialize report_exec_events.
10226 * server.h (report_exec_events): Declare new global variable.
10227 * target.h (struct target_ops) <supports_exec_events>: New
10228 member.
10229 (target_supports_exec_events): New macro.
10230 * win32-low.c (win32_target_ops) <supports_exec_events>:
10231 Initialize new member.
10232
0568462b
MM
102332015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10234
10235 * linux-low.c (linux_low_enable_btrace): Remove.
10236 (linux_target_ops): Replace linux_low_enable_btrace with
10237 linux_enable_btrace.
10238
39edd165
YQ
102392015-09-03 Yao Qi <yao.qi@linaro.org>
10240
10241 * linux-aarch64-low.c (aarch64_insert_point): Call
10242 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10243 returns true.
10244
1db33b5a
UW
102452015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10246
10247 * linux-low.c (check_stopped_by_breakpoint): Use
10248 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10249
ab290430
PA
102502015-08-27 Pedro Alves <palves@redhat.com>
10251
10252 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10253
8d749320
SM
102542015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10255
6711b7f8
SM
10256 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10257 the XNEW-family equivalent.
8d749320
SM
10258 (compile_bytecodes): Likewise.
10259 * dll.c (loaded_dll): Likewise.
10260 * event-loop.c (append_callback_event): Likewise.
10261 (create_file_handler): Likewise.
10262 (create_file_event): Likewise.
10263 * hostio.c (handle_open): Likewise.
10264 * inferiors.c (add_thread): Likewise.
10265 (add_process): Likewise.
10266 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10267 * linux-arm-low.c (arm_new_process): Likewise.
10268 (arm_new_thread): Likewise.
10269 * linux-low.c (add_to_pid_list): Likewise.
10270 (linux_add_process): Likewise.
10271 (handle_extended_wait): Likewise.
10272 (add_lwp): Likewise.
10273 (enqueue_one_deferred_signal): Likewise.
10274 (enqueue_pending_signal): Likewise.
10275 (linux_resume_one_lwp_throw): Likewise.
10276 (linux_resume_one_thread): Likewise.
10277 (linux_read_memory): Likewise.
10278 (linux_write_memory): Likewise.
10279 * linux-mips-low.c (mips_linux_new_process): Likewise.
10280 (mips_linux_new_thread): Likewise.
10281 (mips_add_watchpoint): Likewise.
10282 * linux-x86-low.c (initialize_low_arch): Likewise.
10283 * lynx-low.c (lynx_add_process): Likewise.
10284 * mem-break.c (set_raw_breakpoint_at): Likewise.
10285 (set_breakpoint): Likewise.
10286 (add_condition_to_breakpoint): Likewise.
10287 (add_commands_to_breakpoint): Likewise.
10288 (clone_agent_expr): Likewise.
10289 (clone_one_breakpoint): Likewise.
10290 * regcache.c (new_register_cache): Likewise.
10291 * remote-utils.c (look_up_one_symbol): Likewise.
10292 * server.c (queue_stop_reply): Likewise.
10293 (start_inferior): Likewise.
10294 (queue_stop_reply_callback): Likewise.
10295 (handle_target_event): Likewise.
10296 * spu-low.c (fetch_ppc_memory): Likewise.
10297 (store_ppc_memory): Likewise.
10298 * target.c (set_target_ops): Likewise.
10299 * thread-db.c (thread_db_load_search): Likewise.
10300 (try_thread_db_load_1): Likewise.
10301 * tracepoint.c (add_tracepoint): Likewise.
10302 (add_tracepoint_action): Likewise.
10303 (create_trace_state_variable): Likewise.
10304 (cmd_qtdpsrc): Likewise.
10305 (cmd_qtro): Likewise.
10306 (add_while_stepping_state): Likewise.
10307 * win32-low.c (child_add_thread): Likewise.
10308 (get_image_name): Likewise.
10309
ed8b7b42
YQ
103102015-08-25 Yao Qi <yao.qi@linaro.org>
10311
10312 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10313
db3cb7cb
YQ
103142015-08-25 Yao Qi <yao.qi@linaro.org>
10315
10316 * Makefile.in (aarch64-linux.o): New rule.
10317 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10318 srv_tgtobj.
10319 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10320 (aarch64_init_debug_reg_state): Make it extern.
10321 (aarch64_linux_prepare_to_resume): Remove.
10322
f6011a1c
YQ
103232015-08-25 Yao Qi <yao.qi@linaro.org>
10324
10325 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10326 lwp_arch_private_info and ptid_of_lwp.
10327
88e2cf7e
YQ
103282015-08-25 Yao Qi <yao.qi@linaro.org>
10329
10330 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10331 Find proc_info by find_process_pid. All callers updated.
10332
5e35436e
YQ
103332015-08-25 Yao Qi <yao.qi@linaro.org>
10334
10335 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10336 Remove.
10337 (debug_reg_change_callback): Remove.
10338 (aarch64_notify_debug_reg_change): Remove.
10339
4a8a7965
YQ
103402015-08-25 Yao Qi <yao.qi@linaro.org>
10341
10342 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10343 Call current_lwp_ptid.
10344
32a271ee
YQ
103452015-08-25 Yao Qi <yao.qi@linaro.org>
10346
10347 * linux-aarch64-low.c (debug_reg_change_callback): Use
10348 debug_printf.
10349
0d51c8d7
YQ
103502015-08-25 Yao Qi <yao.qi@linaro.org>
10351
10352 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10353
31a43dd5
YQ
103542015-08-25 Yao Qi <yao.qi@linaro.org>
10355
10356 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10357
8ee52567
YQ
103582015-08-25 Yao Qi <yao.qi@linaro.org>
10359
10360 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10361 the code.
10362
ff3f0f45
YQ
103632015-08-25 Yao Qi <yao.qi@linaro.org>
10364
10365 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10366 Remove.
10367 (debug_reg_change_callback): Remove argument entry and add argument
10368 lwp. Remove local variable thread. Don't print thread id in the
10369 debugging output. Don't check whether pid of thread equals to pid.
10370 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10371 iterate_over_lwps instead find_inferior.
10372
3d40fbb5
PA
103732015-08-24 Pedro Alves <palves@redhat.com>
10374
10375 * inferiors.c (get_first_process): New function.
10376 * inferiors.h (get_first_process): New declaration.
10377 * remote-utils.c (read_ptid): Default to the first process in the
10378 list, instead of to the current thread's process.
10379
438e1e42
PA
103802015-08-24 Pedro Alves <palves@redhat.com>
10381
10382 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10383 * event-loop.c: Likewise.
10384 * remote-utils.c: Likewise.
10385 * tracepoint.c: Likewise.
10386
a8c6d4fc
PA
103872015-08-24 Pedro Alves <palves@redhat.com>
10388
10389 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10390 ptid_get_lwp.
10391
99b0bb12
PA
103922015-08-21 Pedro Alves <palves@redhat.com>
10393
10394 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10395 instead of literal 1.
10396
f8904751
PA
103972015-08-21 Pedro Alves <palves@redhat.com>
10398
10399 * tdesc.c (default_description): Explicitly zero-initialize.
10400
465a859e
PA
104012015-08-21 Pedro Alves <palves@redhat.com>
10402
10403 PR gdb/18749
10404 * inferiors.c (remove_thread): Discard any pending stop reply for
10405 this thread.
10406 * server.c (remove_all_on_match_pid): Rename to ...
10407 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10408 instead of a pid.
10409 (discard_queued_stop_replies): Change parameter to a ptid. Now
10410 extern.
10411 (handle_v_kill, kill_inferior_callback, captured_main)
10412 (process_serial_event): Adjust.
10413 * server.h (discard_queued_stop_replies): Declare.
10414
f0db101d
PA
104152015-08-21 Pedro Alves <palves@redhat.com>
10416
10417 * linux-low.c (wait_for_sigstop): Always switch to no thread
10418 selected if the previously current thread dies.
10419 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10420 process instead of the current thread's.
10421 * remote-utils.c (input_interrupt): Don't check if there's no
10422 current thread.
10423 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10424 current thread to the general thread fails, error out.
10425 (handle_qxfer_auxv, handle_qxfer_libraries)
10426 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10427 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10428 (handle_query): Check if there's a thread selected instead of
10429 checking whether there's any thread in the thread list.
10430 (handle_qxfer_threads, handle_qxfer_btrace)
10431 (handle_qxfer_btrace_conf): Don't error out early if there's no
10432 thread in the thread list.
10433 (handle_v_cont, myresume): Don't set the current thread to the
10434 continue thread.
10435 (process_serial_event) <Hg handling>: Also set thread_id if the
10436 previous general thread is still alive.
10437 (process_serial_event) <g/G handling>: If setting the current
10438 thread to the general thread fails, error out.
10439 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10440 thread's lwp instead of the current thread's.
10441 * target.c (set_desired_thread): If the desired thread was not
10442 found, leave the current thread pointing to NULL. Return an int
10443 (boolean) indicating success.
10444 * target.h (set_desired_thread): Change return type to int.
10445
40045d91
MF
104462015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10447
10448 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10449 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10450 #includes.
10451 (ps_get_thread_area): New function.
10452
45face3b
GB
104532015-08-19 Gary Benson <gbenson@redhat.com>
10454
10455 * hostio.c (handle_pread): Do not attempt to read more data
10456 than hostio_reply_with_data can fit in a packet.
10457
16d5f642
JB
104582015-08-18 Joel Brobecker <brobecker@adacore.com>
10459
10460 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10461
a738da3a
MF
104622015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10463
10464 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10465
33ebda9d
PA
104662015-08-06 Pedro Alves <palves@redhat.com>
10467
10468 * tracepoint.c (expr_eval_result): Now an int.
10469
a44892be
PA
104702015-08-06 Pedro Alves <palves@redhat.com>
10471
10472 * gdbthread.h (struct regcache): Forward declare.
10473 (struct thread_info) <regcache_data>: Now a struct regcache
10474 pointer.
10475 * inferiors.c (inferior_regcache_data)
10476 (set_inferior_regcache_data): Now work with struct regcache
10477 pointers.
10478 * inferiors.h (struct regcache): Forward declare.
10479 (inferior_regcache_data, set_inferior_regcache_data): Now work
10480 with struct regcache pointers.
10481 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10482 (free_register_cache_thread): Remove struct regcache pointer
10483 casts.
10484
608a1e46
PA
104852015-08-06 Pedro Alves <palves@redhat.com>
10486
10487 * server.c (captured_main): On error, print the exception message
10488 to stderr, and if run_once is set, throw a quit.
10489
f0ce0d3a
PA
104902015-08-06 Pedro Alves <palves@redhat.com>
10491
10492 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10493 the current thread.
10494
bf47e248
PA
104952015-08-06 Pedro Alves <palves@redhat.com>
10496
10497 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10498 reading beyond the passed in buffer length.
10499
b6b9ffcc
PL
105002015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10501
10502 * tracepoint.c (symbol_list) <required>: Remove.
10503
863d01bd
PA
105042015-08-06 Pedro Alves <palves@redhat.com>
10505
10506 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10507 count if stopping and suspending threads.
10508 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10509 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10510 (linux_detach): Complete an ongoing step-over.
10511 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10512 throughout.
10513 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10514 (linux_wait_1): If passing a signal to the inferior after
10515 finishing a step-over, unsuspend and re-resume all lwps. If we
10516 see a single-step event but the thread should be continuing, don't
10517 pass the trap to gdb.
10518 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10519 internal_error instead of gdb_assert.
10520 (enqueue_pending_signal): New function.
10521 (check_ptrace_stopped_lwp_gone): Add debug output.
10522 (start_step_over): Use internal_error instead of gdb_assert.
10523 (complete_ongoing_step_over): New function.
10524 (linux_resume_one_thread): Don't resume a suspended thread.
10525 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10526 it stepping.
10527
00db26fa
PA
105282015-08-06 Pedro Alves <palves@redhat.com>
10529
10530 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10531 (linux_thread_alive): Use lwp_is_marked_dead.
10532 (extended_event_reported): Delete.
10533 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10534 instead of extended_event_reported.
10535 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10536 as well.
10537 (lwp_is_marked_dead): New function.
10538 (lwp_running): Use lwp_is_marked_dead.
10539 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10540 comment.
10541
ad071a30
PA
105422015-08-06 Pedro Alves <palves@redhat.com>
10543
10544 * linux-low.c (linux_wait_1): Move fork event output out of the
10545 !report_to_gdb check. Pass event_child->waitstatus to
10546 target_waitstatus_to_string instead of ourstatus.
10547
524b57e6
YQ
105482015-08-04 Yao Qi <yao.qi@linaro.org>
10549
10550 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10551 if current_thread is 32 bit.
10552
6085d6f6
YQ
105532015-08-04 Yao Qi <yao.qi@linaro.org>
10554
10555 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10556 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10557 * server.c (extended_protocol): Remove "static".
10558 * server.h (extended_protocol): Declare it.
10559
8a7e4587
YQ
105602015-08-04 Yao Qi <yao.qi@linaro.org>
10561
10562 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10563 both aarch64 and aarch32.
10564 (aarch64_set_pc): Likewise.
10565
3b53ae99
YQ
105662015-08-04 Yao Qi <yao.qi@linaro.org>
10567
10568 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10569 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10570 arm-with-neon.xml to srv_xmlfiles.
10571 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10572 (is_64bit_tdesc): New function.
10573 (aarch64_linux_read_description): New function.
10574 (aarch64_arch_setup): Call aarch64_linux_read_description.
10575 (regs_info): Rename to regs_info_aarch64.
10576 (aarch64_regs_info): Return right regs_info.
10577 (initialize_low_arch): Call initialize_low_arch_aarch32.
10578
bd9e6534
YQ
105792015-08-04 Yao Qi <yao.qi@linaro.org>
10580
10581 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10582 * linux-aarch32-low.c: New file.
10583 * linux-aarch32-low.h: New file.
10584 * linux-arm-low.c (arm_fill_gregset): Move it to
10585 linux-aarch32-low.c.
10586 (arm_store_gregset): Likewise.
10587 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10588 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10589 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10590 (regs_info): Rename to regs_info_arm.
10591 (arm_regs_info): Return regs_info_aarch32 if
10592 have_ptrace_getregset is 1 and target description is
10593 arm_with_neon or arm_with_vfpv3.
10594 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10595 Call initialize_low_arch_aarch32 instead.
10596
ded48a5e
YQ
105972015-08-04 Yao Qi <yao.qi@linaro.org>
10598
10599 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10600 * linux-low.c: ... here.
10601 * linux-low.h (have_ptrace_getregset): Declare it.
10602
96e9210f
PA
106032015-08-04 Pedro Alves <palves@redhat.com>
10604
10605 * thread-db.c (struct thread_db): Use new typedefs.
10606 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10607 CHK calls.
10608 (disable_thread_event_reporting): Cast result of dlsym to
10609 destination function pointer type.
10610 (thread_db_mourn): Use td_ta_delete_ftype.
10611
af60a1ef
SL
106122015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10613
10614 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10615 arch variant.
10616 (CDX_BREAKPOINT): Define for R2.
10617 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10618 (the_low_target): Add comments.
10619
e8b41681
YQ
106202015-07-30 Yao Qi <yao.qi@linaro.org>
10621
10622 * linux-arm-low.c (arm_hwcap): Remove it.
10623 (arm_read_description): New local variable arm_hwcap. Don't
10624 set arm_hwcap to zero.
10625
89abb039
YQ
106262015-07-30 Yao Qi <yao.qi@linaro.org>
10627
10628 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10629 Use regcache->tdesc instead.
10630 (arm_store_wmmxregset): Likewise.
10631 (arm_fill_vfpregset): Likewise.
10632 (arm_store_vfpregset): Likewise.
10633
deca266c
YQ
106342015-07-30 Yao Qi <yao.qi@linaro.org>
10635
10636 * linux-arm-low.c: Include arch/arm.h.
10637 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10638 (arm_store_gregset): Likewise.
10639
aa58a496
SM
106402015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10641
10642 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10643 ptrace's 4th parameter.
10644
50904b25
YQ
106452015-07-27 Yao Qi <yao.qi@linaro.org>
10646
10647 * configure.srv (case aarch64*-*-linux*): Don't set
10648 srv_linux_usrregs.
10649
5826e159
PA
106502015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10651
10652 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10653 sys/ptrace.h.
10654 * linux-arm-low.c: Likewise.
10655 * linux-cris-low.c: Likewise.
10656 * linux-crisv32-low.c: Likewise.
10657 * linux-low.c: Likewise.
10658 * linux-m68k-low.c: Likewise.
10659 * linux-mips-low.c: Likewise.
10660 * linux-nios2-low.c: Likewise.
10661 * linux-s390-low.c: Likewise.
10662 * linux-sparc-low.c: Likewise.
10663 * linux-tic6x-low.c: Likewise.
10664 * linux-tile-low.c: Likewise.
10665 * linux-x86-low.c: Likewise.
10666
54019719
PA
106672015-07-24 Pedro Alves <palves@redhat.com>
10668
10669 * config.in: Regenerate.
10670 * configure: Regenerate.
10671
eb7aa561
PA
106722015-07-24 Pedro Alves <palves@redhat.com>
10673
10674 * acinclude.m4: Include ../ptrace.m4.
10675 * configure.ac: Call GDB_AC_PTRACE.
10676 * config.in, configure: Regenerate.
10677
55d7b841
YQ
106782015-07-24 Yao Qi <yao.qi@linaro.org>
10679
10680 * linux-low.c (linux_create_inferior): Remove setting to
10681 proc->priv->new_inferior.
10682 (linux_attach): Likewise.
10683 (linux_low_filter_event): Likewise.
10684 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10685
c06cbd92
YQ
106862015-07-24 Yao Qi <yao.qi@linaro.org>
10687
10688 * linux-low.c (linux_arch_setup): New function.
10689 (linux_low_filter_event): If proc->tdesc is NULL and
10690 proc->attached is true, call the_low_target.arch_setup.
10691 Otherwise, keep status pending, and return.
10692 (linux_resume_one_lwp_throw): Don't call get_pc if
10693 thread->while_stepping isn't NULL. Don't call
10694 get_thread_regcache if proc->tdesc is NULL.
10695 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10696 (linux_target_ops): Install arch_setup.
10697 * server.c (start_inferior): Call the_target->arch_setup.
10698 * target.h (struct target_ops) <arch_setup>: New field.
10699 (target_arch_setup): New marco.
10700 * lynx-low.c (lynx_target_ops): Update.
10701 * nto-low.c (nto_target_ops): Update.
10702 * spu-low.c (spu_target_ops): Update.
10703 * win32-low.c (win32_target_ops): Update.
10704
5ae3ebba
YQ
107052015-07-24 Yao Qi <yao.qi@linaro.org>
10706
10707 * linux-low.c (linux_add_process): Don't set
10708 proc->priv->new_inferior.
10709 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10710 (linux_attach): Likewise.
10711
eb97750b
YQ
107122015-07-24 Yao Qi <yao.qi@linaro.org>
10713
10714 * server.c (start_inferior): Code refactor.
10715
51aee833
YQ
107162015-07-24 Yao Qi <yao.qi@linaro.org>
10717
10718 * server.c (process_serial_event): Set general_thread.
10719
af1b22f3
YQ
107202015-07-21 Yao Qi <yao.qi@linaro.org>
10721
10722 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10723 aarch64_linux_get_debug_reg_capacity.
10724
554717a3
YQ
107252015-07-17 Yao Qi <yao.qi@linaro.org>
10726
10727 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10728 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10729 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10730 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10731 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10732 (AARCH64_HWP_ALIGNMENT): Likewise.
10733 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10734 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10735 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10736 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10737 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10738 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10739 (struct aarch64_debug_reg_state): Likewise.
10740 (struct arch_lwp_info): Likewise.
10741 (aarch64_align_watchpoint): Likewise.
10742 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10743 (aarch64_watchpoint_length): Likewise.
10744 (aarch64_point_encode_ctrl_reg): Likewise
10745 (aarch64_point_is_aligned): Likewise.
10746 (aarch64_align_watchpoint): Likewise.
10747 (aarch64_linux_set_debug_regs):
10748 (aarch64_dr_state_insert_one_point): Likewise.
10749 (aarch64_dr_state_remove_one_point): Likewise.
10750 (aarch64_handle_breakpoint): Likewise.
10751 (aarch64_handle_aligned_watchpoint): Likewise.
10752 (aarch64_handle_unaligned_watchpoint): Likewise.
10753 (aarch64_handle_watchpoint): Likewise.
10754
c67ca4de
YQ
107552015-07-17 Yao Qi <yao.qi@linaro.org>
10756
10757 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10758 and don't aarch64_get_debug_reg_state. All callers update.
10759 (aarch64_handle_aligned_watchpoint): Likewise.
10760 (aarch64_handle_unaligned_watchpoint): Likewise.
10761 (aarch64_handle_watchpoint): Likewise.
10762 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10763 (aarch64_remove_point): Likewise.
10764
25abf979
YQ
107652015-07-17 Yao Qi <yao.qi@linaro.org>
10766
10767 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10768 debug_printf.
10769 (aarch64_handle_unaligned_watchpoint): Likewise.
10770
db1ff28b
JK
107712015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10772
10773 Revert the previous 3 commits:
10774 Move gdb_regex* to common/
10775 Move linux_find_memory_regions_full & co.
10776 gdbserver build-id attribute generator
10777
700ca40f
JK
107782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10779 Jan Kratochvil <jan.kratochvil@redhat.com>
10780
10781 gdbserver build-id attribute generator.
10782 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10783 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10784 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10785 (find_phdr): New.
10786 (get_dynamic): Use find_pdhr to traverse program headers.
10787 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10788 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10789 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10790 (get_hex_build_id): New.
10791 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10792 to reply XML document.
10793
9904185c
JK
107942015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10795 Jan Kratochvil <jan.kratochvil@redhat.com>
10796
10797 * target.c: Include target/target-utils.h and fcntl.h.
10798 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10799 (target_fileio_read_stralloc): New functions.
10800
6e5b4429
JK
108012015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10802
10803 * Makefile.in (OBS): Add gdb_regex.o.
10804 (gdb_regex.o): New.
10805 * config.in: Rebuilt.
10806 * configure: Rebuilt.
10807
ddc98fbf
JK
108082015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10809 Jan Kratochvil <jan.kratochvil@redhat.com>
10810
10811 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10812 * Makefile.in (OBS): Add target-utils.o.
10813 (linux-maps.o, target-utils.o): New.
10814 * configure.srv (srv_linux_obj): Add linux-maps.o.
10815
e57bb7a0
PL
108162015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10817
10818 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10819 function, return 1.
10820 (the_low_target): Install it.
10821
586b02a9
PA
108222015-07-14 Pedro Alves <palves@redhat.com>
10823
10824 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10825 Instead, ignore ECHILD, and throw an error for other errnos.
10826
58c1b36c
PA
108272015-07-10 Pedro Alves <palves@redhat.com>
10828
10829 * event-loop.c (struct callback_event) <data>: Change type to
10830 gdb_client_data instance instead of gdb_client_data pointer.
10831 (append_callback_event): Adjust.
10832
421530db
PL
108332015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10834
10835 * linux-aarch64-low.c: Add comments for each linux_target_ops
10836 method. Remove comments already covered in target_ops and
10837 linux_target_ops definitions.
10838 (the_low_target): Add comments for each unimplemented method.
10839
c2d65f38
YQ
108402015-07-09 Yao Qi <yao.qi@linaro.org>
10841
10842 * linux-aarch64-low.c (aarch64_regmap): Remove.
10843 (aarch64_usrregs_info): Remove.
10844 (regs_info): Set field usrregs to NULL.
10845
b20a6524
MM
108462015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10847
10848 * linux-low.c: Include "rsp-low.h"
10849 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10850 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10851 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10852 (handle_btrace_enable_pt): New.
10853 (handle_btrace_general_set): Support "pt".
10854 (handle_btrace_conf_general_set): Support "pt:size".
10855
96c97461
PL
108562015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10857
10858 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10859 Z_PACKET_SW_BP.
10860
37d66942
PL
108612015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10862
10863 * linux-aarch64-low.c: Remove comment about endianness.
10864 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10865 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10866 memcmp.
10867
dc06243f
GB
108682015-06-24 Gary Benson <gbenson@redhat.com>
10869
10870 * linux-i386-ipa.c (stdint.h): Do not include.
10871 * lynx-i386-low.c (stdint.h): Likewise.
10872 * lynx-ppc-low.c (stdint.h): Likewise.
10873 * mem-break.c (stdint.h): Likewise.
10874 * thread-db.c (stdint.h): Likewise.
10875 * tracepoint.c (stdint.h): Likewise.
10876 * win32-low.c (stdint.h): Likewise.
10877
124e13d9
SM
108782015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10879
10880 * server.c (write_qxfer_response): Update call to
10881 remote_escape_output.
10882
909c2cda
JK
108832015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10884 Jan Kratochvil <jan.kratochvil@redhat.com>
10885
10886 Merge multiple hex conversions.
10887 * gdbreplay.c (tohex): Rename to 'fromhex'.
10888 (logchar): Use fromhex.
10889
24c05f46
JK
108902015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
10891
10892 * server.c (handle_qxfer_libraries): Set `version' attribute for
10893 <library-list>.
10894
14d2069a
GB
108952015-06-10 Gary Benson <gbenson@redhat.com>
10896
10897 * target.h (struct target_ops) <multifs_open>: New field.
10898 <multifs_unlink>: Likewise.
10899 <multifs_readlink>: Likewise.
10900 * linux-low.c (nat/linux-namespaces.h): New include.
10901 (linux_target_ops): Initialize the_target->multifs_open,
10902 the_target->multifs_unlink and the_target->multifs_readlink.
10903 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
10904 * hostio.c (hostio_fs_pid): New static variable.
10905 (hostio_handle_new_gdb_connection): New function.
10906 (handle_setfs): Likewise.
10907 (handle_open): Use the_target->multifs_open as appropriate.
10908 (handle_unlink): Use the_target->multifs_unlink as appropriate.
10909 (handle_readlink): Use the_target->multifs_readlink as
10910 appropriate.
10911 (handle_vFile): Handle vFile:setfs packets.
10912 * server.c (handle_query): Call hostio_handle_new_gdb_connection
10913 after target_handle_new_gdb_connection.
10914
4b8b5e72
GB
109152015-06-10 Gary Benson <gbenson@redhat.com>
10916
10917 * configure.ac (AC_CHECK_FUNCS): Add setns.
10918 * config.in: Regenerate.
10919 * configure: Likewise.
10920 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
10921 (linux-namespaces.o): New rule.
10922 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
10923
3ac2e371
GB
109242015-06-09 Gary Benson <gbenson@redhat.com>
10925
10926 * hostio.c (handle_open): Process mode argument with
10927 fileio_to_host_mode.
10928
ca9b78ce
YQ
109292015-06-01 Yao Qi <yao.qi@linaro.org>
10930
10931 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
10932 * linux-x86-low.c: Likewise.
10933
bfacd19d
DB
109342015-05-28 Don Breazeal <donb@codesourcery.com>
10935
10936 * linux-low.c (handle_extended_wait): Initialize
10937 thread_info.last_resume_kind for new fork children.
10938
452003ef
PA
109392015-05-15 Pedro Alves <palves@redhat.com>
10940
10941 * target.h (target_handle_new_gdb_connection): Rewrite using if
10942 wrapped in do/while.
10943
1041a03c
JB
109442015-05-14 Joel Brobecker <brobecker@adacore.com>
10945
10946 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
10947 * configure, config.in: Regenerate.
10948 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
10949 Declare typedef.
10950
c269dbdb
DB
109512015-05-12 Don Breazeal <donb@codesourcery.com>
10952
10953 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
10954 PTRACE_EVENT_VFORK_DONE.
10955 (linux_low_ptrace_options, extended_event_reported): Add vfork
10956 events.
10957 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
10958 and "vforkdone" for RSP 'T' Stop Reply Packet.
10959 * server.h (report_vfork_events): Declare
10960 global variable.
10961
3a8a0396
DB
109622015-05-12 Don Breazeal <donb@codesourcery.com>
10963
10964 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
10965 (the_low_target) <new_fork>: Initialize new member.
10966 * linux-arm-low.c (arm_new_fork): New function.
10967 (the_low_target) <new_fork>: Initialize new member.
10968 * linux-low.c (handle_extended_wait): Call new target function
10969 new_fork.
10970 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
10971 * linux-mips-low.c (mips_add_watchpoint): New function
10972 extracted from mips_insert_point.
10973 (the_low_target) <new_fork>: Initialize new member.
10974 (mips_linux_new_fork): New function.
10975 (mips_insert_point): Call mips_add_watchpoint.
10976 * linux-x86-low.c (x86_linux_new_fork): New function.
10977 (the_low_target) <new_fork>: Initialize new member.
10978
de0d863e
DB
109792015-05-12 Don Breazeal <donb@codesourcery.com>
10980
10981 * linux-low.c (handle_extended_wait): Implement return value,
10982 rename argument 'event_child' to 'event_lwp', handle
10983 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
10984 (linux_low_ptrace_options): New function.
10985 (linux_low_filter_event): Call linux_low_ptrace_options,
10986 use different argument fo linux_enable_event_reporting,
10987 use return value from handle_extended_wait.
10988 (extended_event_reported): New function.
10989 (linux_wait_1): Call extended_event_reported and set
10990 status to report fork events.
10991 (linux_write_memory): Add pid to debug message.
10992 (reset_lwp_ptrace_options_callback): New function.
10993 (linux_handle_new_gdb_connection): New function.
10994 (linux_target_ops): Initialize new structure member.
10995 * linux-low.h (struct lwp_info) <waitstatus>: New member.
10996 * lynx-low.c: Initialize new structure member.
10997 * remote-utils.c (prepare_resume_reply): Implement stop reason
10998 "fork" for "T" stop message.
10999 * server.c (handle_query): Call handle_new_gdb_connection.
11000 * server.h (report_fork_events): Declare global flag.
11001 * target.h (struct target_ops) <handle_new_gdb_connection>:
11002 New member.
11003 (target_handle_new_gdb_connection): New macro.
11004 * win32-low.c: Initialize new structure member.
11005
ddcbc397
DB
110062015-05-12 Don Breazeal <donb@codesourcery.com>
11007
11008 * mem-break.c (APPEND_TO_LIST): Define macro.
11009 (clone_agent_expr): New function.
11010 (clone_one_breakpoint): New function.
11011 (clone_all_breakpoints): New function.
11012 * mem-break.h: Declare new functions.
11013
89245bc0
DB
110142015-05-12 Don Breazeal <donb@codesourcery.com>
11015
11016 * linux-low.c (linux_supports_fork_events): New function.
11017 (linux_supports_vfork_events): New function.
11018 (linux_target_ops): Initialize new structure members.
11019 (initialize_low): Call linux_check_ptrace_features.
11020 * lynx-low.c (lynx_target_ops): Initialize new structure
11021 members.
11022 * server.c (report_fork_events, report_vfork_events):
11023 New global flags.
11024 (handle_query): Add new features to qSupported packet and
11025 response.
11026 (captured_main): Initialize new global variables.
11027 * target.h (struct target_ops) <supports_fork_events>:
11028 New member.
11029 <supports_vfork_events>: New member.
11030 (target_supports_fork_events): New macro.
11031 (target_supports_vfork_events): New macro.
11032 * win32-low.c (win32_target_ops): Initialize new structure
11033 members.
11034
835205d0
GB
110352015-05-12 Gary Benson <gbenson@redhat.com>
11036
11037 * server.c (handle_qxfer_exec_file): Use current process
11038 if annex is empty.
11039
21e94bd9
SL
110402015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11041
11042 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11043 Remove HAVE_PTRACE_GETREGS conditionals.
11044 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11045 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11046
45614f15
YQ
110472015-05-08 Yao Qi <yao.qi@linaro.org>
11048
11049 * linux-low.c (linux_supports_conditional_breakpoints): New
11050 function.
11051 (linux_target_ops): Install new target method.
11052 * lynx-low.c (lynx_target_ops): Install NULL hook for
11053 supports_conditional_breakpoints.
11054 * nto-low.c (nto_target_ops): Likewise.
11055 * spu-low.c (spu_target_ops): Likewise.
11056 * win32-low.c (win32_target_ops): Likewise.
11057 * server.c (handle_query): Check
11058 target_supports_conditional_breakpoints.
11059 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11060 New field.
11061 (target_supports_conditional_breakpoints): New macro.
11062
80ad801e
PA
110632015-05-06 Pedro Alves <palves@redhat.com>
11064
11065 PR server/18081
11066 * server.c (start_inferior): If the process exits, mourn it.
11067
819843c7
GB
110682015-04-21 Gary Benson <gbenson@redhat.com>
11069
11070 * hostio.c (fileio_open_flags_to_host): Factored out to
11071 fileio_to_host_openflags in common/fileio.c. Single use
11072 updated.
11073
a2d5a9d7
MF
110742015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11075
11076 * linux-xtensa-low.c (xtensa_fill_gregset)
11077 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11078 XCHAL_HAVE_LOOP.
11079
deb44829
MF
110802015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11081
11082 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11083 (regs_info): Replace usrregs pointer with NULL.
11084
e57f1de3
GB
110852015-04-17 Gary Benson <gbenson@redhat.com>
11086
11087 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11088 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11089 * server.c (handle_qxfer_exec_file): New function.
11090 (qxfer_packets): Add exec-file entry.
11091 (handle_query): Report qXfer:exec-file:read as supported packet.
11092
62828379
RN
110932015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11094
11095 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11096
b88bb450
GB
110972015-04-09 Gary Benson <gbenson@redhat.com>
11098
11099 * hostio-errno.c (errno_to_fileio_error): Remove function.
11100 Update caller to use remote_fileio_to_fio_error.
11101
c8f4bfdd
YQ
111022015-04-09 Yao Qi <yao.qi@linaro.org>
11103
11104 * linux-low.c (linux_insert_point): Call
11105 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11106 (linux_remove_point): Call remove_memory_breakpoint if type is
11107 raw_bkpt_type_sw.
11108 * linux-x86-low.c (x86_insert_point): Don't call
11109 insert_memory_breakpoint.
11110 (x86_remove_point): Don't call remove_memory_breakpoint.
11111
41f98f02
PA
111122015-04-01 Pedro Alves <palves@redhat.com>
11113 Cleber Rosa <crosa@redhat.com>
11114
11115 * server.c (gdbserver_usage): Reorganize and extend the usage
11116 message.
11117
2bf6fb9d
PA
111182015-03-24 Pedro Alves <palves@redhat.com>
11119
11120 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11121 output. Also dump TRAP_TRACE.
11122 (linux_low_filter_event): In debug output, distinguish a
11123 resume_stop SIGSTOP from a delayed SIGSTOP.
11124
369f6daa
GB
111252015-03-24 Gary Benson <gbenson@redhat.com>
11126
11127 * linux-x86-low.c (x86_linux_new_thread): Moved to
11128 nat/x86-linux.c.
11129 (x86_linux_prepare_to_resume): Likewise.
11130
8e5d4070
GB
111312015-03-24 Gary Benson <gbenson@redhat.com>
11132
11133 * Makefile.in (x86-linux-dregs.o): New rule.
11134 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11135 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11136 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11137 (x86_linux_dr_get): Likewise.
11138 (x86_linux_dr_set): Likewise.
11139 (update_debug_registers_callback): Likewise.
11140 (x86_linux_dr_set_addr): Likewise.
11141 (x86_linux_dr_get_addr): Likewise.
11142 (x86_linux_dr_set_control): Likewise.
11143 (x86_linux_dr_get_control): Likewise.
11144 (x86_linux_dr_get_status): Likewise.
11145 (x86_linux_update_debug_registers): Likewise.
11146
2b95d440
GB
111472015-03-24 Gary Benson <gbenson@redhat.com>
11148
11149 * linux-x86-low.c (x86_linux_update_debug_registers):
11150 New function, factored out from...
11151 (x86_linux_prepare_to_resume): ...this.
11152
14b0bc68
GB
111532015-03-24 Gary Benson <gbenson@redhat.com>
11154
11155 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11156 (x86_linux_dr_set): Likewise.
11157 (update_debug_registers_callback): Likewise.
11158 (x86_linux_dr_set_addr): Likewise.
11159 (x86_linux_dr_get_addr): Likewise.
11160 (x86_linux_dr_set_control): Likewise.
11161 (x86_linux_dr_get_control): Likewise.
11162 (x86_linux_dr_get_status): Likewise.
11163 (x86_linux_prepare_to_resume): Likewise.
11164
5dfe6ca8
GB
111652015-03-24 Gary Benson <gbenson@redhat.com>
11166
11167 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11168 Use perror_with_name. Pass string through gettext.
11169 (x86_linux_dr_set): Likewise.
11170
d33472ad
GB
111712015-03-24 Gary Benson <gbenson@redhat.com>
11172
11173 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11174 (x86_linux_dr_set_addr): ...this.
11175 (x86_dr_low_get_addr): Rename to...
11176 (x86_linux_dr_get_addr): ...this.
11177 (x86_dr_low_set_control): Rename to...
11178 (x86_linux_dr_set_control): ...this.
11179 (x86_dr_low_get_control): Rename to...
11180 (x86_linux_dr_get_control): ...this.
11181 (x86_dr_low_get_status): Rename to...
11182 (x86_linux_dr_get_status): ...this.
11183 (x86_dr_low): Update with new function names.
11184
4b134ca1
GB
111852015-03-24 Gary Benson <gbenson@redhat.com>
11186
11187 * Makefile.in (x86-linux.o): New rule.
11188 * configure.srv: Add x86-linux.o to relevant targets.
11189 * linux-low.c (lwp_set_arch_private_info): New function.
11190 (lwp_arch_private_info): Likewise.
11191 * linux-x86-low.c: Include nat/x86-linux.h.
11192 (arch_lwp_info): Removed structure.
11193 (update_debug_registers_callback):
11194 Use lwp_set_debug_registers_changed.
11195 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11196 and lwp_set_debug_registers_changed.
11197 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11198
34c703da
GB
111992015-03-24 Gary Benson <gbenson@redhat.com>
11200
11201 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11202 * linux-arm-low.c (arm_new_thread): Likewise.
11203 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11204 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11205 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11206 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11207
cff068da
GB
112082015-03-24 Gary Benson <gbenson@redhat.com>
11209
11210 * linux-low.c (ptid_of_lwp): New function.
11211 (lwp_is_stopped): Likewise.
11212 (lwp_stop_reason): Likewise.
11213 * linux-x86-low.c (update_debug_registers_callback):
11214 Use lwp_is_stopped.
11215 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11216 lwp_stop_reason.
11217
b2f7c7e8
GB
112182015-03-24 Gary Benson <gbenson@redhat.com>
11219
11220 * linux-low.h (linux_stop_lwp): Remove declaration.
11221
6d4ee8c6
GB
112222015-03-24 Gary Benson <gbenson@redhat.com>
11223
11224 * linux-low.h: Include nat/linux-nat.h.
11225 * linux-low.c (iterate_over_lwps_args): New structure.
11226 (iterate_over_lwps_filter): New function.
11227 (iterate_over_lwps): Likewise.
11228 * linux-x86-low.c (update_debug_registers_callback):
11229 Update signature to what iterate_over_lwps expects.
11230 Remove PID check that iterate_over_lwps now performs.
11231 (x86_dr_low_set_addr): Use iterate_over_lwps.
11232 (x86_dr_low_set_control): Likewise.
11233
70a0bb6b
GB
112342015-03-24 Gary Benson <gbenson@redhat.com>
11235
11236 * linux-x86-low.c (x86_debug_reg_state): New function.
11237 (x86_linux_prepare_to_resume): Use the above.
11238
7b669087
GB
112392015-03-24 Gary Benson <gbenson@redhat.com>
11240
11241 * linux-low.c (current_lwp_ptid): New function.
11242 * linux-x86-low.c: Include nat/linux-nat.h.
11243 (x86_dr_low_get_addr): Use current_lwp_ptid.
11244 (x86_dr_low_get_control): Likewise.
11245 (x86_dr_low_get_status): Likewise.
11246
eef49a3d
PA
112472015-03-20 Pedro Alves <palves@redhat.com>
11248
11249 * tracepoint.c (cmd_qtstatus): Make "str" const.
11250
b2333d22
PA
112512015-03-20 Pedro Alves <palves@redhat.com>
11252
11253 * server.c (handle_general_set): Make "req_str" const.
11254
23f238d3
PA
112552015-03-19 Pedro Alves <palves@redhat.com>
11256
11257 * linux-low.c (linux_resume_one_lwp): Rename to ...
11258 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11259 instead call perror_with_name.
11260 (check_ptrace_stopped_lwp_gone): New function.
11261 (linux_resume_one_lwp): Reimplement as wrapper around
11262 linux_resume_one_lwp_throw that swallows errors if the LWP is
11263 gone.
11264
91baf43f
PA
112652015-03-19 Pedro Alves <palves@redhat.com>
11266
11267 * linux-low.c (count_events_callback, select_event_lwp_callback):
11268 No longer check whether the thread has resume_stop as last resume
11269 kind.
11270
8bf3b159
PA
112712015-03-19 Pedro Alves <palves@redhat.com>
11272
11273 * linux-low.c (count_events_callback, select_event_lwp_callback):
11274 Use the lwp's status_pending_p field, not the thread's.
11275
b90fc188
PA
112762015-03-19 Pedro Alves <palves@redhat.com>
11277
11278 * linux-low.c (select_event_lwp_callback): Update comments to
11279 no longer mention SIGTRAP.
11280
464b0089
GB
112812015-03-18 Gary Benson <gbenson@redhat.com>
11282
11283 * server.c (handle_query): Do not report vFile:fstat as supported.
11284
aa9e327f
GB
112852015-03-11 Gary Benson <gbenson@redhat.com>
11286
11287 * hostio.c (sys/types.h): New include.
11288 (sys/stat.h): Likewise.
11289 (common-remote-fileio.h): Likewise.
11290 (handle_fstat): New function.
11291 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 11292
791c0056
GB
112932015-03-11 Gary Benson <gbenson@redhat.com>
11294
11295 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11296 struct stat.st_blocks and struct stat.st_blksize.
11297 * configure: Regenerate.
11298 * config.in: Likewise.
11299 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11300 (OBS): Add common-remote-fileio.o.
11301 (common-remote-fileio.o): New rule.
11302
9a9df970
PA
113032015-03-09 Pedro Alves <palves@redhat.com>
11304
11305 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11306 'struct sockaddr' pointer in 'accept' call.
11307
9eb1356e
PA
113082015-03-09 Pedro Alves <palves@redhat.com>
11309
11310 Revert:
11311 2015-03-07 Pedro Alves <palves@redhat.com>
11312 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11313 or <winsock2.h> here. Instead include "gdb_socket.h".
11314 (remote_open): Use union gdb_sockaddr_u.
11315 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11316 or <winsock2.h> here. Instead include "gdb_socket.h".
11317 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11318 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11319 or <sys/un.h>.
11320 (init_named_socket, gdb_agent_helper_thread): Use union
11321 gdb_sockaddr_u.
11322
aac331e4
PA
113232015-03-07 Pedro Alves <palves@redhat.com>
11324
11325 * configure.ac (build_warnings): Move
11326 -Wdeclaration-after-statement to the C-specific set.
11327 * configure: Regenerate.
11328
366c75fc
PA
113292015-03-07 Pedro Alves <palves@redhat.com>
11330
11331 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11332 or <winsock2.h> here. Instead include "gdb_socket.h".
11333 (remote_open): Use union gdb_sockaddr_u.
11334 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11335 or <winsock2.h> here. Instead include "gdb_socket.h".
11336 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11337 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11338 or <sys/un.h>.
11339 (init_named_socket, gdb_agent_helper_thread): Use union
11340 gdb_sockaddr_u.
11341
492d29ea
PA
113422015-03-07 Pedro Alves <palves@redhat.com>
11343
11344 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11345 instead.
11346
60a191ed
YQ
113472015-03-06 Yao Qi <yao.qi@linaro.org>
11348
11349 * linux-aarch64-low.c (aarch64_insert_point): Use
11350 show_debug_regs as a boolean.
11351 (aarch64_remove_point): Likewise.
11352
f5771b1d
PA
113532015-03-05 Pedro Alves <palves@redhat.com>
11354
11355 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11356 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11357 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11358 * nto-low.c (nto_target_ops): Likewise.
11359 * spu-low.c (spu_target_ops): Likewise.
11360 * win32-low.c (win32_target_ops): Likewise.
11361
3e572f71
PA
113622015-03-04 Pedro Alves <palves@redhat.com>
11363
72f4393d 11364 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
11365 Decide whether a breakpoint triggered based on the SIGTRAP's
11366 siginfo.si_code.
72f4393d
L
11367 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11368 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
11369 (linux_low_filter_event): Check for breakpoints before checking
11370 watchpoints.
11371 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11372 siginfo.si_code.
72f4393d
L
11373 (linux_stopped_by_sw_breakpoint)
11374 (linux_supports_stopped_by_sw_breakpoint)
11375 (linux_stopped_by_hw_breakpoint)
11376 (linux_supports_stopped_by_hw_breakpoint): New functions.
11377 (linux_target_ops): Install new target methods.
3e572f71 11378
1ec68e26
PA
113792015-03-04 Pedro Alves <palves@redhat.com>
11380
11381 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11382 * server.c (swbreak_feature, hwbreak_feature): New globals.
11383 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11384 (captured_main): Clear swbreak_feature and hwbreak_feature.
11385 * server.h (swbreak_feature, hwbreak_feature): Declare.
11386 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11387 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11388 supports_stopped_by_hw_breakpoint>: New fields.
11389 (target_supports_stopped_by_sw_breakpoint)
11390 (target_stopped_by_sw_breakpoint)
11391 (target_supports_stopped_by_hw_breakpoint)
11392 (target_stopped_by_hw_breakpoint): Declare.
11393
15c66dd6
PA
113942015-03-04 Pedro Alves <palves@redhat.com>
11395
11396 enum lwp_stop_reason -> enum target_stop_reason
11397 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11398 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11399 (linux_wait_1, stuck_in_jump_pad_callback)
11400 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11401 (linux_stopped_by_watchpoint):
11402 * linux-low.h (enum lwp_stop_reason): Delete.
11403 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11404 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11405
98fc70d6
YQ
114062015-03-04 Yao Qi <yao.qi@linaro.org>
11407
11408 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11409
dd2ac174
GB
114102015-03-03 Gary Benson <gbenson@redhat.com>
11411
11412 * hostio.c (handle_vFile): Fix prefix lengths.
11413
d68e53f4
MM
114142015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11415
11416 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11417 ptr_bits.
11418
bf2d68ab
AA
114192015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11420
11421 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11422 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11423 (clean): Add "rm -f" for above C files.
11424 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11425 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11426 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11427 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11428 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11429 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11430 (init_registers_s390x_vx_linux64)
11431 (init_registers_s390x_tevx_linux64)
11432 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11433 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11434 declarations.
11435 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11436 (s390_store_vxrs_high): New functions.
11437 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11438 NT_S390_VXRS_HIGH.
11439 (s390_arch_setup): Add logic for selecting one of the new target
11440 descriptions. Activate the new vector regsets if applicable.
11441 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11442 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11443 and init_registers_s390x_tevx_linux64.
11444
c966a859
PA
114452015-03-01 Pedro Alves <palves@redhat.com>
11446
11447 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11448 parameter.
11449
4180215b
PA
114502015-02-27 Pedro Alves <palves@redhat.com>
11451
11452 * linux-x86-low.c (u_debugreg_offset): New function.
11453 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11454
749bab01
PA
114552015-02-27 Pedro Alves <palves@redhat.com>
11456
11457 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11458 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11459 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11460 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11461 (ps_lsetfpregs, ps_getpid)
11462 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11463 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11464 (ps_lsetxregs, ps_plog): Declare.
11465
3c14e5a3
PA
114662015-02-27 Pedro Alves <palves@redhat.com>
11467
11468 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11469 IP_AGENT_EXPORT_FUNC.
11470 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11471 IP_AGENT_EXPORT_FUNC.
11472 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11473 (IP_AGENT_EXPORT): Delete.
11474 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11475 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11476 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11477 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11478 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11479 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11480 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11481 (traceframe_read_count, traceframe_write_count)
11482 (traceframes_created, trace_state_variables, get_raw_reg)
11483 (get_trace_state_variable_value, set_trace_state_variable_value)
11484 (ust_loaded, helper_thread_id, cmd_buf): Use
11485 IPA_SYM_EXPORTED_NAME.
11486 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11487 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11488 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11489 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11490 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11491 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11492 EXTERN_C_PUSH/EXTERN_C_POP.
11493 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11494 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11495 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11496 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11497 (traceframe_write_count, traceframe_read_count)
11498 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11499 (about_to_request_buffer_space, get_trace_state_variable_value)
11500 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11501 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11502 EXTERN_C_PUSH/EXTERN_C_POP.
11503 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11504 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11505 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11506 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11507 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11508 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11509 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11510 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11511 Define.
11512 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11513 (IP_AGENT_EXPORT_VAR_DECL): Define.
11514 (tracing): Declare.
11515 (gdb_agent_get_raw_reg): Declare.
11516
fe978cb0
PA
115172015-02-27 Tom Tromey <tromey@redhat.com>
11518 Pedro Alves <palves@redhat.com>
11519
11520 Rename symbols whose names are reserved C++ keywords throughout.
11521
3bc3d82a
PA
115222015-02-27 Pedro Alves <palves@redhat.com>
11523
11524 * Makefile.in (COMPILER): New, get it from autoconf.
11525 (CXX): Get from autoconf instead.
11526 (COMPILE.pre): Use COMPILER.
11527 (CC-LD): Rename to ...
11528 (CC_LD): ... this. Use COMPILER.
11529 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11530 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11531 * acinclude.m4: Include build-with-cxx.m4.
11532 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11533 Disable -Werror by default if building in C++ mode.
11534 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11535 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11536 the C++ compiler. Save/restore CXXFLAGS too.
11537 * configure: Regenerate.
11538
07697489
PA
115392015-02-27 Pedro Alves <palves@redhat.com>
11540
11541 * acinclude.m4: Include libiberty.m4.
11542 * configure.ac: Call libiberty_INIT.
11543 * config.in, configure: Regenerate.
11544
9beb7c4e
PA
115452015-02-26 Pedro Alves <palves@redhat.com>
11546
11547 * linux-low.c (linux_wait_1): When incrementing the PC past a
11548 program breakpoint always use the_low_target.breakpoint_len as
11549 increment, rather than the maximum between that and
11550 the_low_target.decr_pc_after_break.
11551
8090aef2
PA
115522015-02-23 Pedro Alves <palves@redhat.com>
11553
11554 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11555 thread was doing a step-over; always adjust the PC if
11556 we stepped over a permanent breakpoint.
11557 (linux_wait_1): If we stepped over breakpoint that was on top of a
11558 permanent breakpoint, manually advance the PC past it.
11559
bc9540e8
PA
115602015-02-23 Pedro Alves <palves@redhat.com>
11561
11562 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11563 modes.
11564 (x86_fill_gregset, x86_store_gregset): Use it when handling
11565 $orig_eax.
11566
2db9a427
PA
115672015-02-20 Pedro Alves <palves@redhat.com>
11568
11569 * thread-db.c: Include "nat/linux-procfs.h".
11570 (thread_db_init): Skip listing new threads if the kernel supports
11571 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11572
afa8d396
PA
115732015-02-20 Pedro Alves <palves@redhat.com>
11574
11575 * linux-low.c (status_pending_p_callback): Use ptid_match.
11576
c9587f88
AT
115772015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11578
11579 PR breakpoints/16812
11580 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11581 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11582 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11583
b05ec7a5
AT
115842015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11585
11586 PR breakpoints/15956
11587 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11588
d33501a5
MM
115892015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11590
11591 * linux-low.c (linux_low_btrace_conf): Print size.
11592 * server.c (handle_btrace_conf_general_set): New.
11593 (hanle_general_set): Call handle_btrace_conf_general_set.
11594 (handle_query): Report Qbtrace-conf:bts:size as supported.
11595
f4abbc16
MM
115962015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11597
11598 * linux-low.c (linux_low_enable_btrace): Update parameters.
11599 (linux_low_btrace_conf): New.
11600 (linux_target_ops)<to_btrace_conf>: Initialize.
11601 * server.c (current_btrace_conf): New.
11602 (handle_btrace_enable): Rename to ...
11603 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11604 to target_enable_btrace. Update comment. Update users.
11605 (handle_qxfer_btrace_conf): New.
11606 (qxfer_packets): Add btrace-conf entry.
11607 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11608 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11609 (target_ops)<read_btrace_conf>: New.
11610 (target_enable_btrace): Update parameters.
11611 (target_read_btrace_conf): New.
11612
043c3577
MM
116132015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11614
11615 * server.c (handle_btrace_general_set): Remove call to
11616 target_supports_btrace.
11617 (supported_btrace_packets): New.
11618 (handle_query): Call supported_btrace_packets.
11619 * target.h: include btrace-common.h.
11620 (btrace_target_info): Removed.
11621 (supports_btrace, target_supports_btrace): Update parameters.
11622
734b0e4b
MM
116232015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11624
11625 * Makefile.in (SFILES): Add common/btrace-common.c.
11626 (OBS): Add common/btrace-common.o.
11627 (btrace-common.o): Add build rules.
11628 * linux-low: Include btrace-common.h.
11629 (linux_low_read_btrace): Use struct btrace_data. Call
11630 btrace_data_init and btrace_data_fini.
11631
d6c146e9
PA
116322015-02-06 Pedro Alves <palves@redhat.com>
11633
11634 * thread-db.c (find_new_threads_callback): Add debug output.
11635
20ba1ce6
PA
116362015-02-04 Pedro Alves <palves@redhat.com>
11637
11638 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11639 (resume_stopped_resumed_lwps): New function.
11640 (linux_wait_for_event_filtered): Use it.
11641
8cc73a39
SDJ
116422015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11643
11644 * Makefile.in (SFILES): Add linux-personality.c.
11645 (linux-personality.o): New rule.
11646 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11647 list of objects to be built.
11648 * linux-low.c: Include nat/linux-personality.h.
11649 (linux_create_inferior): Remove code to disable address space
11650 randomization (moved to ../nat/linux-personality.c). Create
11651 cleanup to disable address space randomization.
11652
fb23d554
SDJ
116532015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11654
11655 * Makefile.in (posix-strerror.o): New rule.
11656 (mingw-strerror.o): Likewise.
11657 * configure: Regenerated.
11658 * configure.ac: Source file ../common/common.host. Initialize new
11659 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11660
cdf43629
YQ
116612015-01-14 Yao Qi <yao@codesourcery.com>
11662
11663 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11664 (ppc-linux.o): New rule.
11665 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11666 * configure.ac: AC_CHECK_FUNCS(getauxval).
11667 * config.in: Re-generated.
11668 * configure: Re-generated.
11669 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11670 ppc64_64bit_inferior_p
11671
514c5338
YQ
116722015-01-14 Yao Qi <yao@codesourcery.com>
11673
11674 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11675 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11676 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11677 (PT_ORIG_R3, PT_TRAP): Likewise.
11678 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11679 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11680 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11681
3368c1e5
JB
116822015-01-10 Joel Brobecker <brobecker@adacore.com>
11683
11684 * i387-fp.c (i387_cache_to_xsave): In look over
11685 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11686 zmmh_low_space field by use of zmmh_high_space.
11687
582511be
PA
116882015-01-09 Pedro Alves <palves@redhat.com>
11689
11690 * linux-low.c (step_over_bkpt): Move higher up in the file.
11691 (handle_extended_wait): Don't store the stop_pc here.
11692 (get_stop_pc): Adjust comments and rename to ...
11693 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11694 stopped for a software breakpoint or hardware breakpoint.
11695 (thread_still_has_status_pending_p): New function.
11696 (status_pending_p_callback): Use
11697 thread_still_has_status_pending_p. If the event is no longer
11698 interesting, resume the LWP.
11699 (handle_tracepoints): Add assert.
11700 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11701 (wstatus_maybe_breakpoint): New function.
11702 (cancel_breakpoint): Delete function.
11703 (check_stopped_by_watchpoint): New function, factored out from
11704 linux_low_filter_event.
11705 (lp_status_maybe_breakpoint): Delete function.
11706 (linux_low_filter_event): Remove filter_ptid argument.
11707 Leave thread group exits pending here. Store the LWP's stop PC.
11708 Always leave events pending.
11709 (linux_wait_for_event_filtered): Pull all events out of the
11710 kernel, and leave them all pending.
11711 (count_events_callback, select_event_lwp_callback): Consider all
11712 events.
11713 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11714 (select_event_lwp): Only give preference to the stepping LWP in
11715 all-stop mode. Adjust comments.
11716 (ignore_event): New function.
11717 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11718 references to cancel_breakpoints. Adjust to renames. Also give
11719 equal priority to all LWPs that have had events in non-stop mode.
11720 If reporting a software breakpoint event, unadjust the LWP's PC.
11721 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11722 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11723 Adjust.
11724 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11725 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11726 (linux_stopped_by_watchpoint): Adjust.
11727 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11728 * linux-low.h (enum lwp_stop_reason): New.
11729 (struct lwp_info) <stop_pc>: Adjust comment.
11730 <stopped_by_watchpoint>: Delete field.
11731 <stop_reason>: New field.
11732 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11733 * mem-break.c (software_breakpoint_inserted_here)
11734 (hardware_breakpoint_inserted_here): New function.
11735 * mem-break.h (software_breakpoint_inserted_here)
11736 (hardware_breakpoint_inserted_here): Declare.
11737 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11738 (cancel_breakpoints): Delete.
11739 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11740 (upload_fast_traceframes): Remove references to
11741 cancel_breakpoints.
11742
a33e3959
PA
117432015-01-09 Pedro Alves <palves@redhat.com>
11744
11745 * thread-db.c (find_new_threads_callback): Ignore thread if the
11746 kernel thread ID is -1.
11747
8784d563
PA
117482015-01-09 Pedro Alves <palves@redhat.com>
11749
11750 * linux-low.c (linux_attach_fail_reason_string): Move to
11751 nat/linux-ptrace.c, and rename.
11752 (linux_attach_lwp): Update comment.
11753 (attach_proc_task_lwp_callback): New function.
11754 (linux_attach): Adjust to rename and use
11755 linux_proc_attach_tgid_threads.
11756 (linux_attach_fail_reason_string): Delete declaration.
11757
76f2b779
JB
117582015-01-01 Joel Brobecker <brobecker@adacore.com>
11759
11760 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11761 * server.c (gdbserver_version): Likewise.
11762
fafcc06a
SDJ
117632014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11764
11765 * remote-utils.c: Include ctype.h.
11766 (input_interrupt): Explicitly handle the case when the char
11767 received is the NUL byte. Improve the printing of non-ASCII
11768 characters.
11769
beed38b8
JB
117702014-12-16 Joel Brobecker <brobecker@adacore.com>
11771
11772 * linux-low.c (linux_low_filter_event): Update call to
11773 linux_enable_event_reporting following the addition of
11774 a new parameter to that function.
11775
bf330350
CU
117762014-12-16 Catalin Udma <catalin.udma@freescale.com>
11777
11778 PR server/17457
11779 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11780 (AARCH64_FPCR_REGNO): Likewise.
11781 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11782 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11783 (aarch64_store_fpregset): Likewise.
11784
5227d625
JB
117852014-12-15 Joel Brobecker <brobecker@adacore.com>
11786
11787 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11788 Remove FIXME comment about assumption about N.
11789
f93b65a0
JB
117902014-12-13 Joel Brobecker <brobecker@adacore.com>
11791
11792 * configure.ac: If large-file support is disabled in GDBserver,
11793 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11794 * configure: Regenerate.
11795
e5a9158d
AA
117962014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11797
11798 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11799 warning upon ENODATA from ptrace.
11800 * linux-s390-low.c (s390_store_tdb): New.
11801 (s390_regsets): Add regset for NT_S390_TDB.
11802
feea5f36
AA
118032014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11804
11805 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11806 without a fill_function.
11807 * linux-s390-low.c (s390_fill_last_break): Remove.
11808 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11809 (s390_arch_setup): Use regset's size instead of fill_function for
11810 loop end condition.
11811
098dbe61
AA
118122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11813
11814 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11815 the regset's store function when ptrace returned an error.
11816 * regcache.c (get_thread_regcache): Invalidate register cache
11817 before fetching inferior's registers.
11818
28eef672
AA
118192014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11820
11821 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11822 while-loop as for-loop.
11823 (regsets_store_inferior_registers): Likewise.
11824
bdca27a2
YQ
118252014-11-28 Yao Qi <yao@codesourcery.com>
11826
11827 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11828 * config.in, configure: Re-generate.
11829 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11830 is defined.
11831
9c232dda
YQ
118322014-11-21 Yao Qi <yao@codesourcery.com>
11833
11834 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11835 (AC_CHECK_HEADERS): Remove malloc.h.
11836 * configure: Re-generated.
11837 * config.in: Re-generated.
11838 * server.h: Don't include alloca.h and malloc.h.
11839 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11840 Don't include malloc.h.
11841
43968415
JB
118422014-11-17 Joel Brobecker <brobecker@adacore.com>
11843
11844 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11845 corresponding ERRNO check in same block.
11846
40e91bc7
PA
118472014-11-12 Pedro Alves <palves@redhat.com>
11848
11849 * server.c (cont_thread): Update comment.
11850 (start_inferior, attach_inferior): No longer clear cont_thread.
11851 (handle_v_cont): No longer set cont_thread.
11852 (captured_main): Clear cont_thread each time a GDB connects.
11853
c2c118cf
PA
118542014-11-12 Pedro Alves <palves@redhat.com>
11855
11856 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11857 thread, and don't resume all threads if the Hc thread has exited.
11858
78708b7c
PA
118592014-11-12 Pedro Alves <palves@redhat.com>
11860
11861 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11862 the process group instead of to a specific LWP.
11863
a2abc7de
PA
118642014-10-15 Pedro Alves <palves@redhat.com>
11865
11866 PR server/17487
11867 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11868 parameter.
11869 (arm_set_thread_context): Delete.
11870 (the_low_target): Adjust.
11871 * win32-i386-low.c (debug_registers_changed)
11872 (debug_registers_used): Delete.
11873 (update_debug_registers_callback): New function.
11874 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11875 needing to update their debug registers.
11876 (win32_get_current_dr): New function.
11877 (x86_dr_low_get_addr, x86_dr_low_get_control)
11878 (x86_dr_low_get_status): Fetch the debug register from the thread
11879 record's context.
11880 (i386_initial_stuff): Adjust.
11881 (i386_get_thread_context): Remove current_event parameter. Don't
11882 clear debug_registers_changed nor copy DR values to
11883 debug_reg_state.
11884 (i386_set_thread_context): Delete.
11885 (i386_prepare_to_resume): New function.
11886 (i386_thread_added): Mark the thread as needing to update irs
11887 debug registers.
11888 (the_low_target): Remove i386_set_thread_context and install
11889 i386_prepare_to_resume.
11890 * win32-low.c (win32_get_thread_context): Adjust.
11891 (win32_set_thread_context): Use SetThreadContext
11892 directly.
11893 (win32_prepare_to_resume): New function.
11894 (win32_require_context): New function, factored out from ...
11895 (thread_rec): ... this.
11896 (continue_one_thread): Call win32_prepare_to_resume on each thread
11897 we're about to continue.
11898 (win32_resume): Call win32_prepare_to_resume on the event thread.
11899 * win32-low.h (struct win32_thread_info)
11900 <debug_registers_changed>: New field.
11901 (struct win32_target_ops): Change prototype of set_thread_context,
11902 delete set_thread_context and add prepare_to_resume.
11903 (win32_require_context): New declaration.
11904
a442d071
GB
119052014-10-08 Gary Benson <gbenson@redhat.com>
11906
11907 * server.h: Do not include common-exceptions.h.
11908
6f1947e8
GB
119092014-10-08 Gary Benson <gbenson@redhat.com>
11910
11911 * server.h: Do not include cleanups.h.
11912
63b434a4
JH
119132014-09-30 James Hogan <james.hogan@imgtec.com>
11914
11915 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
11916 mips64-dsp-linux.c.
11917
c4d9ceb6
YQ
119182014-09-23 Yao Qi <yao@codesourcery.com>
11919
11920 * linux-low.c (lp_status_maybe_breakpoint): New function.
11921 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
11922 (count_events_callback): Likewise.
11923 (select_event_lwp_callback): Likewise.
11924 (cancel_breakpoints_callback): Likewise.
11925
89a5711c
DB
119262014-09-19 Don Breazeal <donb@codesourcery.com>
11927
11928 * linux-low.c (handle_extended_wait): Call
11929 linux_ptrace_get_extended_event.
11930 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
11931 linux_is_extended_waitstatus.
11932
bffc0964
JB
119332014-09-16 Joel Brobecker <brobecker@adacore.com>
11934
11935 * Makefile.in (CPPFLAGS): Define.
11936 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
11937 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
11938
0bfdf32f
GB
119392014-09-16 Gary Benson <gbenson@redhat.com>
11940
11941 * inferiors.h (current_inferior): Renamed as...
11942 (current_thread): New variable. All uses updated.
11943 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
11944 (maybe_move_out_of_jump_pad): Likewise.
11945 (cancel_breakpoint): Likewise.
11946 (linux_low_filter_event): Likewise.
11947 (wait_for_sigstop): Likewise.
11948 (linux_resume_one_lwp): Likewise.
11949 (need_step_over_p): Likewise.
11950 (start_step_over): Likewise.
11951 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
11952 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
11953 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
11954 and save_inferior as saved_thread.
11955 * regcache.c (get_thread_regcache): Renamed saved_inferior as
11956 saved_thread.
11957 (regcache_invalidate_thread): Likewise.
11958 * remote-utils.c (prepare_resume_reply): Likewise.
11959 * thread-db.c (thread_db_get_tls_address): Likewise.
11960 (disable_thread_event_reporting): Likewise.
11961 (remove_thread_event_breakpoints): Likewise.
11962 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
11963 as saved_thread.
11964 * target.h (set_desired_inferior): Renamed as...
11965 (set_desired_thread): New declaration. All uses updated.
11966 * server.c (myresume): Updated comment to reference thread instead
11967 of inferior.
11968 (handle_serial_event): Likewise.
11969 (handle_target_event): Likewise.
11970
361c8ade
GB
119712014-09-12 Tom Tromey <tromey@redhat.com>
11972 Gary Benson <gbenson@redhat.com>
11973
11974 * regcache.h: Include common-regcache.h.
11975 (regcache_read_pc): Don't declare.
11976 * regcache.c (get_thread_regcache_for_ptid): New function.
11977
bd9269f7
GB
119782014-09-11 Tom Tromey <tromey@redhat.com>
11979 Gary Benson <gbenson@redhat.com>
11980
11981 * symbol.c: New file.
11982 * Makefile.in (SFILES): Add symbol.c.
11983 (OBS): Add symbol.o.
11984
f8c1d06b
GB
119852014-09-11 Gary Benson <gbenson@redhat.com>
11986
11987 * target.c (target_stop_ptid, target_continue_ptid): New
11988 functions.
11989
721ec300
GB
119902014-09-11 Tom Tromey <tromey@redhat.com>
11991 Gary Benson <gbenson@redhat.com>
11992
11993 * target.h: Include target/target.h.
11994 * target.c (target_read_memory, target_read_uint32)
11995 (target_write_memory): New functions.
11996
c5e92cca
GB
119972014-09-11 Gary Benson <gbenson@redhat.com>
11998
11999 * server.h (debug_hw_points): Don't declare.
12000 * server.c (debug_hw_points): Don't define. Replace all uses
12001 with show_debug_regs.
12002 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12003 all uses with show_debug_regs.
12004
2e4bb98a
EBM
120052014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12006
12007 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12008 endianness into account.
12009 (ppc_supply_ptrace_register): Likewise.
12010
ac740bc7
JH
120112014-09-03 James Hogan <james.hogan@imgtec.com>
12012
12013 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12014 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12015
97ea6506
GB
120162014-09-03 Gary Benson <gbenson@redhat.com>
12017
12018 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12019 ALL_DEBUG_ADDRESS_REGISTERS.
12020
df7e5265
GB
120212014-09-02 Gary Benson <gbenson@redhat.com>
12022
12023 * i386-low.h: Renamed as...
12024 * x86-low.h: New file. All type, function and variable name
12025 prefixes changed from "i386_" to "x86_". All references updated.
12026 * i386-low.c: Renamed as...
12027 * x86-low.c: New file. All type, function and variable name
12028 prefixes changed from "i386_" to "x86_". All references updated.
12029
ed859da7
GB
120302014-09-02 Gary Benson <gbenson@redhat.com>
12031
12032 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12033 (x86_linux_new_thread): Likewise.
12034
860789c7
GB
120352014-08-29 Gary Benson <gbenson@redhat.com>
12036
12037 * server.h (setjmp.h): Do not include.
12038 (toplevel): Do not declare.
12039 (common-exceptions.h): Include.
12040 (cleanups.h): Likewise.
12041 * server.c (toplevel): Do not define.
12042 (exit_code): New static global.
12043 (detach_or_kill_for_exit_cleanup): New function.
12044 (main): New function. Original main renamed to...
12045 (captured_main): New function.
12046 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12047
ff55e1b5
GB
120482014-08-29 Gary Benson <gbenson@redhat.com>
12049
12050 * Makefile.in (SFILES): Add common/common-exceptions.c.
12051 (OBS): Add common-exceptions.o.
12052 (common-exceptions.o): New rule.
12053 * utils.c (prepare_to_throw_exception): New function.
12054
e9bcb658
GB
120552014-08-29 Gary Benson <gbenson@redhat.com>
12056
12057 * config.in: Regenerate.
12058 * configure: Likewise.
12059
e3180625
GB
120602014-08-29 Gary Benson <gbenson@redhat.com>
12061
12062 * Makefile.in (SFILES): Add common/cleanups.c.
12063 (OBS): cleanups.o.
12064 (cleanups.o): New rule.
12065
e3d6ba5d
GB
120662014-08-29 Gary Benson <gbenson@redhat.com>
12067
12068 * utils.c (internal_vwarning): New function.
12069
7096e886
GB
120702014-08-28 Gary Benson <gbenson@redhat.com>
12071
12072 * utils.h (fatal): Remove declaration.
12073 * utils.c (fatal): Remove function.
12074
14ce3192
GB
120752014-08-28 Gary Benson <gbenson@redhat.com>
12076
12077 * tracepoint.c (gdb_agent_init): Replace fatal with
12078 perror_with_name.
12079 (initialize_tracepoint): Likewise.
12080
50278d59
GB
120812014-08-28 Gary Benson <gbenson@redhat.com>
12082
12083 * remote-utils.c (remote_prepare): Replace fatal with error.
12084
aa96c426
GB
120852014-08-28 Gary Benson <gbenson@redhat.com>
12086
12087 * linux-low.c (linux_async): Replace fatal with warning.
12088 Tidy up and return.
12089 (linux_start_non_stop): Return -1 if linux_async failed.
12090
f7160e97
GB
120912014-08-28 Gary Benson <gbenson@redhat.com>
12092
12093 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12094 gdb_assert.
12095 (i386_dr_low_get_addr): Remove vague comment.
12096 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12097 gdb_assert.
12098
38e08fca
GB
120992014-08-28 Gary Benson <gbenson@redhat.com>
12100
12101 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12102 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12103 internal_error.
12104 (linux_resume_one_lwp): Likewise.
12105 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12106 gdb_assert.
12107 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12108 with internal_error.
12109 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12110 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12111 (find_register_by_name): Replace fatal with internal_error.
12112 (find_regno): Likewise.
12113 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12114 * thread-db.c (thread_db_create_event): Likewise.
12115 (thread_db_load_search): Likewise.
12116 (try_thread_db_load_1): Likewise.
12117 * tracepoint.c (get_jump_space_head): Replace fatal with
12118 internal_error.
12119 (claim_trampoline_space): Likewise.
12120 (have_fast_tracepoint_trampoline_buffer): Likewise.
12121 (cmd_qtstart): Likewise.
12122 (stop_tracing): Likewise.
12123 (fast_tracepoint_collecting): Likewise.
12124 (target_malloc): Likewise.
12125 (download_tracepoint): Likewise.
12126 (download_trace_state_variables): Replace check with gdb_assert.
12127 (upload_fast_traceframes): Replace fatal with internal_error.
12128
34abf635
GB
121292014-08-19 Tom Tromey <tromey@redhat.com>
12130 Gary Benson <gbenson@redhat.com>
12131
12132 * Makefile.in (SFILES): Add common/common-debug.c.
12133 (OBS): Add common-debug.o.
12134 (common-debug.o): New rule.
12135 * debug.h (debug_printf): Don't declare.
12136 * debug.c (debug_printf): Renamed and rewritten as...
12137 (debug_vprintf): New function.
12138
f6e94d78
GB
121392014-08-19 Gary Benson <gbenson@redhat.com>
12140
12141 * utils.h: Do not include print-utils.h.
12142
9239eeab
GB
121432014-08-19 Tom Tromey <tromey@redhat.com>
12144 Gary Benson <gbenson@redhat.com>
12145
12146 * server.h: Add static assertion.
12147 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12148
ef87c8bb
GB
121492014-08-19 Tom Tromey <tromey@redhat.com>
12150 Gary Benson <gbenson@redhat.com>
12151
12152 * Makefile.in (SFILES): Add common/errors.c.
12153 (OBS): Add errors.o.
12154 (IPA_OBS): Add errors-ipa.o.
12155 (errors.o): New rule.
12156 (errors-ipa.o): Likewise.
12157 * utils.h (perror_with_name, error, warning): Don't declare.
12158 * utils.c (warning): Renamed and rewritten as...
12159 (vwarning): New function.
12160 (error): Renamed and rewritten as...
12161 (verror): New function.
12162 (internal_error): Renamed and rewritten as...
12163 (internal_verror): New function.
12164
bb974a24
GB
121652014-08-07 Gary Benson <gbenson@redhat.com>
12166
12167 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12168 * configure: Regenerate.
12169 * config.in: Likewise.
12170 * server.h: Do not include errno.h.
12171 * event-loop.c: Likewise.
12172 * hostio-errno.c: Likewise.
12173 * linux-low.c: Likewise.
12174 * remote-utils.c: Likewise.
12175 * spu-low.c: Likewise.
12176 * utils.c: Likewise.
12177 * gdbreplay.c: Unconditionally include errno.h.
12178
6d3d12eb
GB
121792014-08-07 Gary Benson <gbenson@redhat.com>
12180
12181 * server.h: Do not include string.h.
12182 * event-loop.c: Likewise.
12183 * linux-low.c: Likewise.
12184 * regcache.c: Likewise.
12185 * remote-utils.c: Likewise.
12186 * spu-low.c: Likewise.
12187 * utils.c: Likewise.
12188
dccbb609
GB
121892014-08-07 Gary Benson <gbenson@redhat.com>
12190
12191 * server.h: Do not include gdb_assert.h.
12192
e76df0d0
GB
121932014-08-07 Gary Benson <gbenson@redhat.com>
12194
12195 * server.h: Do not include common-utils.h.
12196
4cb9c816
GB
121972014-08-07 Gary Benson <gbenson@redhat.com>
12198
12199 * server.h: Do not include ptid.h.
12200 * notif.h: Likewise.
12201
3995eeee
GB
122022014-08-07 Gary Benson <gbenson@redhat.com>
12203
12204 * server.h: Do not include gdb_locale.h.
12205
cb9f1a9b
GB
122062014-08-07 Gary Benson <gbenson@redhat.com>
12207
12208 * server.h: Do not include gdb/signals.h.
12209 * win32-low.c: Likewise.
12210
a5fceff8
GB
122112014-08-07 Gary Benson <gbenson@redhat.com>
12212
12213 * server.h: Do not include pathmax.h.
12214
b9391142
GB
122152014-08-07 Gary Benson <gbenson@redhat.com>
12216
12217 * server.h: Do not include libiberty.h.
12218 * linux-bfin-low.c: Likewise.
12219
0e443c87
GB
122202014-08-07 Gary Benson <gbenson@redhat.com>
12221
12222 * server.h: Do not include ansidecl.h.
12223
8ebb3f56
GB
122242014-08-07 Gary Benson <gbenson@redhat.com>
12225
12226 * linux-x86-low.c: Do not include stddef.h.
12227 * lynx-ppc-low.c: Likewise.
12228 * tracepoint.c: Likewise.
12229
8980bdf6
GB
122302014-08-07 Gary Benson <gbenson@redhat.com>
12231
12232 * server.h: Do not include stdarg.h.
12233 * nto-low.c: Likewise.
12234
d7096f71
GB
122352014-08-07 Gary Benson <gbenson@redhat.com>
12236
12237 * server.h: Do not include stdlib.h.
12238 * inferiors.c: Likewise.
12239 * linux-low.c: Likewise.
12240 * regcache.c: Likewise.
12241 * spu-low.c: Likewise.
12242 * tracepoint.c: Likewise.
12243 * utils.c: Likewise.
12244
d02f550d
GB
122452014-08-07 Gary Benson <gbenson@redhat.com>
12246
12247 * server.h: Do not include stdio.h.
12248 * linux-low.c: Likewise.
12249 * remote-utils.c: Likewise.
12250 * spu-low.c: Likewise.
12251 * utils.c: Likewise.
12252 * wincecompat.c: Likewise.
12253
87f6c4e3
GB
122542014-08-06 Gary Benson <gbenson@redhat.com>
12255
12256 * regcache.c (init_register_cache): Move conditionals inside if.
12257
7089dca4
GB
122582014-08-06 Gary Benson <gbenson@redhat.com>
12259
12260 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12261
462f517e
GB
122622014-07-31 Gary Benson <gbenson@redhat.com>
12263
12264 * ax.h: Do not include server.h.
12265 * gdbthread.h: Likewise.
12266 * lynx-low.h: Likewise.
12267 * notif.h: Likewise.
12268
976411d6
GB
122692014-07-30 Gary Benson <gbenson@redhat.com>
12270
12271 * server.h: Include common-defs.h.
12272 Do not include config.h or build-gnulib-gdbserver/config.h.
12273
d41f6d8e
GB
122742014-07-30 Gary Benson <gbenson@redhat.com>
12275
12276 * hostio-errno.c: Move server.h to top of includes list.
12277 * inferiors.c: Likewise.
12278 * linux-x86-low.c: Likewise.
12279 * notif.c: Include server.h.
12280
314c6a35
TT
122812014-07-24 Tom Tromey <tromey@redhat.com>
12282 Gary Benson <gbenson@redhat.com>
12283
12284 * server.h (CORE_ADDR): Now unsigned.
12285
69ff6be5
PA
122862014-07-16 Pedro Alves <palves@redhat.com>
12287
12288 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12289
ce9e3fe7
PA
122902014-07-15 Pedro Alves <palves@redhat.com>
12291
12292 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12293 copy.
12294
e76126e8
PA
122952014-07-11 Pedro Alves <palves@redhat.com>
12296
12297 * linux-low.c (kill_wait_lwp): New function, based on
12298 kill_one_lwp_callback, but use my_waitpid directly.
12299 (kill_one_lwp_callback, linux_kill): Use it.
12300
8e9db26e
PA
123012014-06-23 Pedro Alves <palves@redhat.com>
12302
12303 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12304 before setting DR0..DR3.
12305
698b3e08
GB
123062014-06-20 Gary Benson <gbenson@redhat.com>
12307
12308 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12309 * configure: Regenerated.
12310 * config.in: Likewise.
12311
125f8a3d
GB
123122014-06-20 Gary Benson <gbenson@redhat.com>
12313
12314 * Makefile.in (SFILES): Update locations for files moved
12315 from common to nat.
12316 (object file files): Reordered.
12317
42995dbd
GB
123182014-06-20 Gary Benson <gbenson@redhat.com>
12319
12320 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12321 (i386_dr_low_set_addr): Likewise.
12322 (i386_dr_low_get_addr): Likewise.
12323 (i386_dr_low_can_set_control): Likewise.
12324 (i386_dr_low_set_control): Likewise.
12325 (i386_dr_low_get_control): Likewise.
12326 (i386_dr_low_get_status): Likewise.
12327 (i386_get_debug_register_length): Likewise.
12328 * linux-x86-low.c (i386_dr_low_set_addr):
12329 Changed signature. Made static.
12330 (i386_dr_low_get_addr): Likewise.
12331 (i386_dr_low_set_control): Likewise.
12332 (i386_dr_low_get_control): Likewise.
12333 (i386_dr_low_get_status): Likewise.
12334 (i386_dr_low): New global variable.
12335 * win32-i386-low.c (i386_dr_low_set_addr):
12336 Changed signature. Made static.
12337 (i386_dr_low_get_addr): Likewise.
12338 (i386_dr_low_set_control): Likewise.
12339 (i386_dr_low_get_control): Likewise.
12340 (i386_dr_low_get_status): Likewise.
12341 (i386_dr_low): New global variable.
12342
e1d2394b
MS
123432014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12344
12345 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12346 * Makefile.in (AR, AR_FLAGS): Define.
12347 * configure: Regenerate.
12348
3a8ee006
GB
123492014-06-19 Gary Benson <gbenson@redhat.com>
12350
12351 * Makefile.in (i386-dregs.o): New rule.
12352 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12353 * i386-low.c (target.h): Remove include.
12354 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12355 (DR_CONTROL_SHIFT): Likewise.
12356 (DR_CONTROL_SIZE): Likewise.
12357 (DR_RW_EXECUTE): Likewise.
12358 (DR_RW_WRITE): Likewise.
12359 (DR_RW_READ): Likewise.
12360 (DR_RW_IORW): Likewise.
12361 (DR_LEN_1): Likewise.
12362 (DR_LEN_2): Likewise.
12363 (DR_LEN_4): Likewise.
12364 (DR_LEN_8): Likewise.
12365 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12366 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12367 (DR_ENABLE_SIZE): Likewise.
12368 (DR_LOCAL_SLOWDOWN): Likewise.
12369 (DR_GLOBAL_SLOWDOWN): Likewise.
12370 (DR_CONTROL_RESERVED): Likewise.
12371 (I386_DR_CONTROL_MASK): Likewise.
12372 (I386_DR_VACANT): Likewise.
12373 (I386_DR_LOCAL_ENABLE): Likewise.
12374 (I386_DR_GLOBAL_ENABLE): Likewise.
12375 (I386_DR_DISABLE): Likewise.
12376 (I386_DR_SET_RW_LEN): Likewise.
12377 (I386_DR_GET_RW_LEN): Likewise.
12378 (I386_DR_WATCH_HIT): Likewise.
12379 (i386_wp_op_t): Likewise.
12380 (i386_show_dr): Likewise.
12381 (i386_length_and_rw_bits): Likewise.
12382 (i386_insert_aligned_watchpoint): Likewise.
12383 (i386_remove_aligned_watchpoint): Likewise.
12384 (i386_handle_nonaligned_watchpoint): Likewise.
12385 i386_update_inferior_debug_regs(): Likewise.
12386 (i386_dr_insert_watchpoint): Likewise.
12387 (i386_dr_remove_watchpoint): Likewise.
12388 (i386_dr_region_ok_for_watchpoint): Likewise.
12389 (i386_dr_stopped_data_address): Likewise.
12390 (i386_dr_stopped_by_watchpoint): Likewise.
12391
8f26655c
GB
123922014-06-19 Gary Benson <gbenson@redhat.com>
12393
12394 * i386-low.c (i386_dr_show): Renamed to
12395 i386_show_dr and made static. All uses updated.
12396 (i386_dr_length_and_rw_bits): Renamed to
12397 i386_length_and_rw_bits and made static.
12398 All uses updated.
12399 (i386_dr_insert_aligned_watchpoint): Renamed to
12400 i386_insert_aligned_watchpoint and made static.
12401 All uses updated.
12402 (i386_dr_remove_aligned_watchpoint): Renamed to
12403 i386_remove_aligned_watchpoint and made static.
12404 All uses updated.
12405 (i386_dr_update_inferior_debug_regs): Renamed to
12406 i386_update_inferior_debug_regs and made static.
12407 All uses updated.
12408
b9228891
GB
124092014-06-18 Gary Benson <gbenson@redhat.com>
12410
5171def3
GB
12411 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12412 (i386_dr_low_can_set_control): Likewise.
12413 (i386_get_debug_register_length): Likewise.
12414 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12415 (i386_dr_low_can_set_control): Likewise.
12416 (i386_get_debug_register_length): Likewise.
12417
124182014-06-17 Gary Benson <gbenson@redhat.com>
12419
b9228891
GB
12420 * i386-low.h (i386-dregs.h): New include.
12421 (DR_FIRSTADDR): Now in i386-dregs.h.
12422 (DR_LASTADDR): Likewise.
12423 (DR_NADDR): Likewise.
12424 (DR_STATUS): Likewise.
12425 (DR_CONTROL): Likewise.
12426 (i386_debug_reg_state): Likewise.
12427 (i386_dr_insert_watchpoint): Likewise.
12428 (i386_dr_remove_watchpoint): Likewise.
12429 (i386_dr_region_ok_for_watchpoint): Likewise.
12430 (i386_dr_stopped_data_address): Likewise.
12431 (i386_dr_stopped_by_watchpoint): Likewise.
12432 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12433
4be83cc2
GB
124342014-06-18 Gary Benson <gbenson@redhat.com>
12435
12436 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12437 i386_dr_insert_watchpoint.
12438 (i386_low_remove_watchpoint): Renamed to
12439 i386_dr_remove_watchpoint.
12440 (i386_low_region_ok_for_watchpoint): Renamed to
12441 i386_dr_region_ok_for_watchpoint.
12442 (i386_low_stopped_data_address): Renamed to
12443 i386_dr_stopped_data_address.
12444 (i386_low_stopped_by_watchpoint): Renamed to
12445 i386_dr_stopped_by_watchpoint.
12446 * i386-low.c (i386_show_dr): Renamed to
12447 i386_dr_show and made nonstatic. All uses updated.
12448 (i386_length_and_rw_bits): Renamed to
12449 i386_dr_length_and_rw_bits and made nonstatic.
12450 All uses updated.
12451 (i386_insert_aligned_watchpoint): Renamed to
12452 i386_dr_insert_aligned_watchpoint and made nonstatic.
12453 All uses updated.
12454 (i386_remove_aligned_watchpoint): Renamed to
12455 i386_dr_remove_aligned_watchpoint and made nonstatic.
12456 All uses updated.
12457 (i386_update_inferior_debug_regs): Renamed to
12458 i386_dr_update_inferior_debug_regs and made nonstatic.
12459 All uses updated.
12460 (i386_low_insert_watchpoint): Renamed to
12461 i386_dr_insert_watchpoint. All uses updated.
12462 (i386_low_remove_watchpoint): Renamed to
12463 i386_dr_remove_watchpoint. All uses updated.
12464 (i386_low_region_ok_for_watchpoint): Renamed to
12465 i386_dr_region_ok_for_watchpoint. All uses updated.
12466 (i386_low_stopped_data_address): Renamed to
12467 i386_dr_stopped_data_address. All uses updated.
12468 (i386_low_stopped_by_watchpoint): Renamed to
12469 i386_dr_stopped_by_watchpoint. All uses updated.
12470
131aa0d4
GB
124712014-06-18 Gary Benson <gbenson@redhat.com>
12472
12473 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12474 (i386_dr_low_can_set_control): Likewise.
12475 (i386_insert_aligned_watchpoint): New check.
12476
d9305f7f
GB
124772014-06-18 Gary Benson <gbenson@redhat.com>
12478
12479 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12480 Renamed to state.
12481
e927c9fc
GB
124822014-06-18 Gary Benson <gbenson@redhat.com>
12483
12484 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12485 instead of fatal and error.
12486 (i386_handle_nonaligned_watchpoint): Likewise.
12487
1b6d4134
GB
124882014-06-18 Gary Benson <gbenson@redhat.com>
12489
12490 * i386-low.c (i386_get_debug_register_length): New macro.
12491 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12492 (i386_show_dr): Use debug_printf instead of fprintf. Use
12493 phex to format values.
12494
6e62758f
GB
124952014-06-18 Gary Benson <gbenson@redhat.com>
12496
12497 * i386-low.h: Comment changes.
12498 * i386-low.c: Likewise.
12499
fc6e2f03
GB
125002014-06-18 Gary Benson <gbenson@redhat.com>
12501
12502 * i386-low.c: Whitespace changes.
12503
f9d1eeed
TT
125042014-06-12 Tom Tromey <tromey@redhat.com>
12505
12506 * utils.c (freeargv): Remove.
12507
0b04e523
TT
125082014-06-12 Tom Tromey <tromey@redhat.com>
12509
12510 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12511 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12512 (parse_debug_format_options): Likewise.
12513 (gdbserver_usage): Likewise.
12514 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12515 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12516 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12517 against libiberty.
12518 ($(LIBGNU)): Depend on libiberty.
12519 (all-lib): Recurse into all subdirs.
12520 (install-only): Invoke "install" target in subdirs.
12521 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12522 targets.
12523 * configure: Rebuild.
12524 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12525 for vasprintf, vsnprintf, or gettimeofday.
12526 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12527 srv_tgtobj.
12528
270c9937
JB
125292014-06-05 Joel Brobecker <brobecker@adacore.com>
12530
12531 * development.sh: Delete.
12532 * Makefile.in (config.status): Adjust dependency on development.sh.
12533 * configure.ac: Adjust development.sh source call.
12534 * configure: Regenerate.
12535
0a261ed8
PA
125362014-06-02 Pedro Alves <palves@redhat.com>
12537
12538 * ax.c (gdb_free_agent_expr): New function.
12539 * ax.h (gdb_free_agent_expr): New declaration.
12540 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12541 list.
12542 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12543 static.
12544 (clear_breakpoint_conditions_and_commands): New function.
12545 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12546 (clear_breakpoint_conditions_and_commands): New declaration.
12547
e9dae05e
RR
125482014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12549
12550 * linux-aarch64-low.c (asm/ptrace.h): Include.
12551
5876f503
JK
125522014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12553
12554 Fix TLS access for -static -pthread.
12555 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12556 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12557 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12558
802e8e6d
PA
125592014-05-20 Pedro Alves <palves@redhat.com>
12560
12561 * linux-aarch64-low.c (aarch64_insert_point)
12562 (aarch64_remove_point): No longer check whether the type is
12563 supported here. Adjust to new interface.
12564 (the_low_target): Install aarch64_supports_z_point_type as
12565 supports_z_point_type method.
12566 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12567 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12568 instead of a Z packet char. Adjust.
12569 (arm_supports_z_point_type): New function.
12570 (arm_insert_point, arm_remove_point): Adjust to new interface.
12571 (the_low_target): Install arm_supports_z_point_type.
12572 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12573 (cris_insert_point, cris_remove_point): Adjust to new interface.
12574 Don't check whether the type is supported here.
12575 (the_low_target): Install cris_supports_z_point_type.
12576 * linux-low.c (linux_supports_z_point_type): New function.
12577 (linux_insert_point, linux_remove_point): Adjust to new interface.
12578 * linux-low.h (struct linux_target_ops) <insert_point,
12579 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12580 raw_breakpoint pointer parameter.
12581 <supports_z_point_type>: New method.
12582 * linux-mips-low.c (mips_supports_z_point_type): New function.
12583 (mips_insert_point, mips_remove_point): Adjust to new interface.
12584 Use mips_supports_z_point_type.
12585 (the_low_target): Install mips_supports_z_point_type.
12586 * linux-ppc-low.c (the_low_target): Install NULL as
12587 supports_z_point_type method.
12588 * linux-s390-low.c (the_low_target): Install NULL as
12589 supports_z_point_type method.
12590 * linux-sparc-low.c (the_low_target): Install NULL as
12591 supports_z_point_type method.
12592 * linux-x86-low.c (x86_supports_z_point_type): New function.
12593 (x86_insert_point): Adjust to new insert_point interface. Use
12594 insert_memory_breakpoint. Adjust to new
12595 i386_low_insert_watchpoint interface.
12596 (x86_remove_point): Adjust to remove_point interface. Use
12597 remove_memory_breakpoint. Adjust to new
12598 i386_low_remove_watchpoint interface.
12599 (the_low_target): Install x86_supports_z_point_type.
12600 * lynx-low.c (lynx_target_ops): Install NULL as
12601 supports_z_point_type callback.
12602 * nto-low.c (nto_supports_z_point_type): New.
12603 (nto_insert_point, nto_remove_point): Adjust to new interface.
12604 (nto_target_ops): Install nto_supports_z_point_type.
12605 * mem-break.c: Adjust intro comment.
12606 (struct raw_breakpoint) <raw_type, size>: New fields.
12607 <inserted>: Update comment.
12608 <shlib_disabled>: Delete field.
12609 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12610 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12611 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12612 (raw_bkpt_type_to_target_hw_bp_type): New function.
12613 (find_enabled_raw_code_breakpoint_at): New function.
12614 (find_raw_breakpoint_at): New type and size parameters. Use them.
12615 (insert_memory_breakpoint): New function, based off
12616 set_raw_breakpoint_at.
12617 (remove_memory_breakpoint): New function.
12618 (set_raw_breakpoint_at): Reimplement.
12619 (set_breakpoint): New, based on set_breakpoint_at.
12620 (set_breakpoint_at): Reimplement.
12621 (delete_raw_breakpoint): Go through the_target->remove_point
12622 instead of assuming memory breakpoints.
12623 (find_gdb_breakpoint_at): Delete.
12624 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12625 (find_gdb_breakpoint): New function.
12626 (set_gdb_breakpoint_at): Delete.
12627 (z_type_supported): New function.
12628 (set_gdb_breakpoint_1): New function, loosely based off
12629 set_gdb_breakpoint_at.
12630 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12631 (delete_gdb_breakpoint_at): Delete.
12632 (delete_gdb_breakpoint_1): New function, loosely based off
12633 delete_gdb_breakpoint_at.
12634 (delete_gdb_breakpoint): New function.
12635 (clear_gdb_breakpoint_conditions): Rename to ...
12636 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12637 breakpoint.
12638 (add_condition_to_breakpoint): Make static.
12639 (add_breakpoint_condition): Take a struct breakpoint pointer
12640 instead of an address. Adjust.
12641 (gdb_condition_true_at_breakpoint): Rename to ...
12642 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12643 z_type parameter.
12644 (gdb_condition_true_at_breakpoint): Reimplement.
12645 (add_breakpoint_commands): Take a struct breakpoint pointer
12646 instead of an address. Adjust.
12647 (gdb_no_commands_at_breakpoint): Rename to ...
12648 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12649 parameter. Return true if no breakpoint was found. Change debug
12650 output.
12651 (gdb_no_commands_at_breakpoint): Reimplement.
12652 (run_breakpoint_commands): Rename to ...
12653 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12654 and change return type to boolean.
12655 (run_breakpoint_commands): New function.
12656 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12657 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12658 breakpoint. Go through the_target->remove_point instead of
12659 assuming memory breakpoint.
12660 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12661 software and hardware breakpoints.
12662 (reinsert_raw_breakpoint): Go through the_target->insert_point
12663 instead of assuming memory breakpoint.
12664 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12665 software and hardware breakpoints.
12666 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12667 Check both software and hardware breakpoints.
12668 (validate_inserted_breakpoint): Assert the breakpoint is a
12669 software breakpoint. Set the inserted flag to -1 instead of
12670 setting shlib_disabled.
12671 (delete_disabled_breakpoints): Adjust.
12672 (validate_breakpoints): Only validate software breakpoints.
12673 Adjust to inserted flag change.
12674 (check_mem_read, check_mem_write): Skip breakpoint types other
12675 than software breakpoints. Adjust to inserted flag change.
12676 * mem-break.h (enum raw_bkpt_type): New enum.
12677 (raw_breakpoint, struct process_info): Forward declare.
12678 (Z_packet_to_target_hw_bp_type): Delete declaration.
12679 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12680 (set_gdb_breakpoint, delete_gdb_breakpoint)
12681 (clear_breakpoint_conditions): New declarations.
12682 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12683 (breakpoint_inserted_here): Update comment.
12684 (add_breakpoint_condition, add_breakpoint_commands): Replace
12685 address parameter with a breakpoint pointer parameter.
12686 (gdb_breakpoint_here): Update comment.
12687 (delete_gdb_breakpoint_at): Delete.
12688 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12689 * server.c (process_point_options): Take a struct breakpoint
12690 pointer instead of an address. Adjust.
12691 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12692 delete_gdb_breakpoint.
12693 * spu-low.c (spu_target_ops): Install NULL as
12694 supports_z_point_type method.
12695 * target.h: Include mem-break.h.
12696 (struct target_ops) <prepare_to_access_memory>: Update comment.
12697 <supports_z_point_type>: New field.
12698 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12699 instead of a char. Also take a raw breakpoint pointer.
12700 * win32-arm-low.c (the_low_target): Install NULL as
12701 supports_z_point_type.
12702 * win32-i386-low.c (i386_supports_z_point_type): New function.
12703 (i386_insert_point, i386_remove_point): Adjust to new interface.
12704 (the_low_target): Install i386_supports_z_point_type.
12705 * win32-low.c (win32_supports_z_point_type): New function.
12706 (win32_insert_point, win32_remove_point): Adjust to new interface.
12707 (win32_target_ops): Install win32_supports_z_point_type.
12708 * win32-low.h (struct win32_target_ops):
12709 <supports_z_point_type>: New method.
12710 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12711 instead of a char. Also take a raw breakpoint pointer.
12712
932539e3
PA
127132014-05-20 Pedro Alves <palves@redhat.com>
12714
12715 * mem-break.h: Include break-common.h.
12716 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12717 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12718 (Z_packet_to_target_hw_bp_type): New declaration.
12719 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12720 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12721 (Z_PACKET_ACCESS_WP): Delete macros.
12722 (Z_packet_to_hw_type): Delete function.
12723 * i386-low.h: Don't include break-common.h here.
12724 (Z_packet_to_hw_type): Delete declaration.
12725 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12726 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12727 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12728 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12729 * linux-aarch64-low.c: Don't include break-common.h here.
12730 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12731 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12732 (Z_packet_to_target_hw_bp_type): Delete function.
12733 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12734 function.
12735 (mips_insert_point, mips_remove_point): Use
12736 Z_packet_to_target_hw_bp_type.
12737
4ff0d3d8
PA
127382014-05-20 Pedro Alves <palves@redhat.com>
12739
12740 * linux-aarch64-low.c: Include break-common.h.
12741 (enum target_point_type): Delete.
12742 (Z_packet_to_point_type): Rename to ...
12743 (Z_packet_to_target_hw_bp_type): ... this, and return a
12744 target_hw_bp_type instead.
12745 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12746 instead of an enum target_point_type.
12747 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12748 breakpoint type.
12749 (aarch64_dr_state_insert_one_point)
12750 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12751 (aarch64_handle_aligned_watchpoint)
12752 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12753 Take an enum target_hw_bp_type instead of an enum
12754 target_point_type.
12755 (aarch64_supports_z_point_type): New function.
12756 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12757 use Z_packet_to_target_hw_bp_type.
12758
786dc519
JB
127592014-05-20 Joel Brobecker <brobecker@adacore.com>
12760
12761 * configure.ac: Only use -Werror by default when DEVELOPMENT
12762 is true.
12763 * configure: Regenerate.
12764
9e0aa64f
JK
127652014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12766
12767 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12768 * linux-x86-low.c (X86_64_USER_REGS): New.
12769 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12770
2b577b92
YQ
127712014-04-28 Yao Qi <yao@codesourcery.com>
12772
12773 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12774 name.
12775
94611da2
PA
127762014-04-25 Pedro Alves <palves@redhat.com>
12777
12778 PR server/16255
12779 * linux-low.c (linux_attach_fail_reason_string): New function.
12780 (linux_attach_lwp): Delete.
12781 (linux_attach_lwp_1): Rename to ...
12782 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12783 argument. Remove "initial" parameter. Return int instead of
12784 void. Don't error or warn here.
12785 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12786 failure to attach to the tgid. Call warning when failing to
12787 attach to an lwp.
12788 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12789 argument. Remove "initial" parameter. Return int instead of
12790 void. Don't error or warn here.
12791 (linux_attach_fail_reason_string): New declaration.
12792 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12793 interface change. Use linux_attach_fail_reason_string.
12794
01f9f808
MS
127952014-04-24 Michael Sturm <michael.sturm@mintel.com>
12796 Walfred Tedeschi <walfred.tedeschi@intel.com>
12797
12798 * Makefile.in: Added rules to handle new files
12799 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12800 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12801 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12802 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12803 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12804 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12805 x32-avx512-linux.o.
12806 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12807 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12808 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12809 i386/x32-avx512.xml.
12810 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12811 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12812 i386/x32-avx512-linux.xml.
12813 * i387-fp.c (num_avx512_k_registers): New constant for number
12814 of K registers.
12815 (num_avx512_zmmh_low_registers): New constant for number of
12816 lower ZMM registers (0-15).
12817 (num_avx512_zmmh_high_registers): New constant for number of
12818 higher ZMM registers (16-31).
12819 (num_avx512_ymmh_registers): New contant for number of higher
12820 YMM registers (ymm16-31 added by avx521 on x86_64).
12821 (num_avx512_xmm_registers): New constant for number of higher
12822 XMM registers (xmm16-31 added by AVX512 on x86_64).
12823 (struct i387_xsave): Add space for AVX512 registers.
12824 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12825 Add code to handle AVX512 registers.
12826 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12827 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12828 prototypei from generated file.
12829 (tdesc_amd64_avx512_linux): Likewise.
12830 (init_registers_x32_avx512_linux): Likewise.
12831 (tdesc_x32_avx512_linux): Likewise.
12832 (init_registers_i386_avx512_linux): Likewise.
12833 (tdesc_i386_avx512_linux): Likewise.
12834 (x86_64_regmap): Add AVX512 registers.
12835 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12836 mask.
12837 (initialize_low_arch): Add code to initialize AVX512 registers.
12838
51aa91f9
PA
128392014-04-23 Pedro Alves <palves@redhat.com>
12840
12841 * mem-break.c (find_gdb_breakpoint_at): Make static.
12842 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12843
a4165e94
PA
128442014-04-23 Pedro Alves <palves@redhat.com>
12845
12846 * i386-low.c: Don't include break-common.h here.
12847 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12848 prototype to take target_hw_bp_type as argument instead of a Z
12849 packet char.
12850 * i386-low.h: Include break-common.h here.
12851 (Z_packet_to_hw_type): Declare.
12852 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12853 prototypes.
12854 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12855 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12856 (x86_remove_point): Convert the packet number to a
12857 target_hw_bp_type before calling i386_low_remove_watchpoint.
12858 * win32-i386-low.c (i386_insert_point): Convert the packet number
12859 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12860 (i386_remove_point): Convert the packet number to a
12861 target_hw_bp_type before calling i386_low_remove_watchpoint.
12862
b8acf843
PA
128632014-04-23 Pedro Alves <palves@redhat.com>
12864
12865 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12866
d708bcd1
PA
128672014-04-10 Pedro Alves <palves@redhat.com>
12868
12869 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12870 Check if the condition or command is NULL before checking if the
12871 breakpoint is known. On success, return true.
12872 * mem-break.h (add_breakpoint_condition): Document return.
12873 (add_breakpoint_commands): Add describing comment.
12874 * server.c (skip_to_semicolon): New function.
12875 (process_point_options): Use it.
12876
2eec7d5b
PA
128772014-04-09 Pedro Alves <palves@redhat.com>
12878
12879 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12880 to lwpid_of.
12881
fa96cb38
PA
128822014-02-27 Pedro Alves <palves@redhat.com>
12883
12884 PR 12702
12885 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
12886 macros.
12887 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
12888 output.
12889 (last_thread_of_process_p): Take a PID argument instead of a
12890 thread pointer.
12891 (linux_wait_for_lwp): Delete.
12892 (num_lwps, check_zombie_leaders, not_stopped_callback): New
12893 functions.
12894 (linux_low_filter_event): New function, party factored out from
12895 linux_wait_for_event.
12896 (linux_wait_for_event): Rename to ...
12897 (linux_wait_for_event_filtered): ... this. Add new filter ptid
12898 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
12899 sigsuspend. Check for zombie leaders.
12900 (linux_wait_for_event): Reimplement as wrapper around
12901 linux_wait_for_event_filtered.
12902 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
12903 a normal or signal exit is seen, it's the whole process exiting.
12904 (wait_for_sigstop): No longer a for_each_inferior callback.
12905 Rewrite on top of linux_wait_for_event_filtered.
12906 (stop_all_lwps): Call wait_for_sigstop directly.
12907 * server.c (resume, handle_target_event): Handle
12908 TARGET_WAITKIND_NO_RESUMED.
12909
d763de10
JB
129102014-02-26 Joel Brobecker <brobecker@adacore.com>
12911
12912 * win32-low.c (psapi_get_dll_name,
12913 * win32_CreateToolhelp32Snapshot): Delete.
12914 (win32_CreateToolhelp32Snapshot, win32_Module32First)
12915 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
12916 Delete.
12917 (handle_load_dll): Add function description.
12918 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
12919
850a0f76
JB
129202014-02-26 Joel Brobecker <brobecker@adacore.com>
12921
12922 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
12923 Add comment.
12924 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
12925 base address when calling win32_add_one_solib.
12926 (handle_load_dll): Delete local variable load_addr.
12927 Remove 0x1000 offset applied to DLL base address when calling
12928 win32_add_one_solib.
12929 (handle_unload_dll): Add comment.
12930
f25b3fc3
JB
129312014-02-26 Joel Brobecker <brobecker@adacore.com>
12932
12933 * win32-low.c (win32_add_all_dlls): Renames
12934 win32_ensure_ntdll_loaded. Rewrite function documentation.
12935 Adjust implementation to always load all DLLs.
12936 Add 0x1000 offset to DLL base address when calling
12937 win32_add_one_solib.
12938 (child_initialization_done): New static global.
12939 (do_initial_child_stuff): Set child_initialization_done to
12940 zero during child initialization, and 1 after. Replace call
12941 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
12942 Add comment.
12943 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
12944 (handle_unload_dll): Add function documentation.
12945 (get_child_debug_event): Ignore load and unload DLL events
12946 during child initialization.
12947
d86d4aaf
DE
129482014-02-20 Doug Evans <dje@google.com>
12949
3bc32da3 12950 Remove global all_lwps.
d86d4aaf
DE
12951 * inferiors.h (ptid_of): Move here from linux-low.h.
12952 (pid_of, lwpid_of): Ditto.
12953 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
12954 parameter is a struct thread_info * now.
12955 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
12956 directly. Pass &all_threads to find_inferior instead of &all_lwps.
12957 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
12958 directly.
12959 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
12960 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
12961 * linux-arm-low.c (update_registers_callback): Update, "entry"
12962 parameter is a struct thread_info * now.
12963 Fetch lwpid from current_inferior directly.
12964 (arm_insert_point): Pass &all_threads to find_inferior instead of
12965 &all_lwps.
12966 (arm_remove_point): Ditto.
12967 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
12968 (arm_prepare_to_resume): Fetch pid from thread.
12969 (arm_read_description): Fetch lwpid from current_inferior directly.
12970 * linux-low.c (all_lwps): Delete.
12971 (delete_lwp): Delete call to remove_inferior.
12972 (handle_extended_wait): Fetch lwpid from thread.
12973 (add_lwp): Don't set lwp->entry.id. Remove call to
12974 add_inferior_to_list.
12975 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
12976 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
12977 (kill_one_lwp_callback): Ditto.
12978 (linux_kill): Don't dereference NULL pointer.
12979 Fetch ptid,lwpid from thread.
12980 (get_detach_signal): Fetch ptid from thread.
12981 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
12982 Simplify call to regcache_invalidate_thread.
12983 (delete_lwp_callback): Update, "entry" parameter is a
12984 struct thread_info * now. Fetch pid from thread.
12985 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
12986 (status_pending_p_callback): Update, "entry" parameter is a
12987 struct thread_info * now. Fetch ptid from thread.
12988 (find_lwp_pid): Update, "entry" parameter is a
12989 struct thread_info * now.
12990 (linux_wait_for_lwp): Fetch pid from thread.
12991 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
12992 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
12993 (enqueue_one_deferred_signal): Fetch lwpid from thread.
12994 (dequeue_one_deferred_signal): Ditto.
12995 (cancel_breakpoint): Fetch ptid from current_inferior.
12996 (linux_wait_for_event): Pass &all_threads to find_inferior,
12997 not &all_lwps. Fetch ptid, lwpid from thread.
12998 (count_events_callback): Update, "entry" parameter is a
12999 struct thread_info * now.
13000 (select_singlestep_lwp_callback): Ditto.
13001 (select_event_lwp_callback): Ditto.
13002 (cancel_breakpoints_callback): Ditto.
13003 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13004 not &all_lwps.
13005 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13006 (unsuspend_one_lwp): Update, "entry" parameter is a
13007 struct thread_info * now.
13008 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13009 not &all_lwps.
13010 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13011 Fetch lwpid from thread, not lwp.
13012 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13013 Pass &all_threads to find_inferior, not &all_lwps.
13014 (send_sigstop): Fetch lwpid from thread, not lwp.
13015 (send_sigstop_callback): Update, "entry" parameter is a
13016 struct thread_info * now.
13017 (suspend_and_send_sigstop_callback): Ditto.
13018 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13019 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13020 struct thread_info * now.
13021 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13022 from thread, lwp.
13023 (lwp_running): Update, "entry" parameter is a
13024 struct thread_info * now.
13025 (stop_all_lwps): Fetch ptid from thread.
13026 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13027 (linux_resume_one_lwp): Fetch lwpid from thread.
13028 (linux_set_resume_request): Update, "entry" parameter is a
13029 struct thread_info * now. Fetch pid, lwpid from thread.
13030 (resume_status_pending_p): Update, "entry" parameter is a
13031 struct thread_info * now.
13032 (need_step_over_p): Ditto. Fetch lwpid from thread.
13033 (start_step_over): Fetch lwpid from thread.
13034 (linux_resume_one_thread): Update, "entry" parameter is a
13035 struct thread_info * now. Fetch lwpid from thread.
13036 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13037 (proceed_one_lwp): Update, "entry" parameter is a
13038 struct thread_info * now. Fetch lwpid from thread.
13039 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13040 struct thread_info * now.
13041 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13042 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13043 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13044 directly.
13045 (regsets_store_inferior_registers): Ditto.
13046 (fetch_register, store_register): Ditto.
13047 (linux_read_memory, linux_write_memory): Ditto.
13048 (linux_request_interrupt): Ditto.
13049 (linux_read_auxv): Ditto.
13050 (linux_xfer_siginfo): Ditto.
13051 (linux_qxfer_spu): Ditto.
13052 (linux_qxfer_libraries_svr4): Ditto.
13053 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13054 moved to inferiors.h.
13055 (get_lwp): Delete.
13056 (get_thread_lwp): Update.
13057 (struct lwp_info): Delete member "entry". Simplify comment for
13058 member "thread".
13059 (all_lwps): Delete.
13060 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13061 current_inferior directly.
13062 (update_watch_registers_callback): Update, "entry" parameter is a
13063 struct thread_info * now. Fetch pid from thread.
13064 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13065 (mips_insert_point): Fetch lwpid from current_inferior.
13066 Pass &all_threads to find_inferior, not &all_lwps.
13067 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13068 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13069 directly.
13070 (mips_stopped_data_address): Ditto.
13071 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13072 directly.
13073 * linux-tile-low.c (tile_arch_setup): Ditto.
13074 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13075 (update_debug_registers_callback): Update, "entry" parameter is a
13076 struct thread_info * now. Fetch pid from thread.
13077 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13078 Pass &all_threads to find_inferior, not &all_lwps.
13079 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13080 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13081 Pass &all_threads to find_inferior, not &all_lwps.
13082 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13083 (i386_dr_low_get_status): Ditto.
13084 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13085 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13086 (x86_linux_read_description): Ditto.
13087 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13088
3b8361aa
DE
130892014-02-20 Doug Evans <dje@google.com>
13090
13091 * inferiors.c (get_first_inferior): Fix buglet.
13092
f7667f0d
DE
130932014-02-19 Doug Evans <dje@google.com>
13094
13095 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13096 * inferiors.c (add_thread): Change result type to struct thread_info *.
13097 All callers updated.
13098 (add_lwp): Call add_thread here instead of in callers.
13099 All callers updated.
13100 * linux-low.h (get_lwp_thread): Rewrite.
13101 (struct lwp_info): New member "thread".
13102
b3312d80
DE
131032014-02-19 Doug Evans <dje@google.com>
13104
13105 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13106 All callers updated.
13107
ecc6f45c
DE
131082014-02-19 Doug Evans <dje@google.com>
13109
13110 * inferiors.c (add_thread): Fix whitespace.
13111
649ebbca
DE
131122014-02-19 Doug Evans <dje@google.com>
13113
13114 * dll.c (clear_dlls): Replace accessing list implemention details
13115 with API function.
13116 * gdbthread.h (get_first_thread): Declare.
13117 * inferiors.c (for_each_inferior_with_data): New function.
13118 (get_first_thread): New function.
13119 (find_thread_ptid): Simplify.
13120 (get_first_inferior): New function.
13121 (clear_list): Delete.
13122 (one_inferior_p): New function.
13123 (clear_inferior_list): New function.
13124 (clear_inferiors): Update.
13125 * inferiors.h (for_each_inferior_with_data): Declare.
13126 (clear_inferior_list): Declare.
13127 (one_inferior_p): Declare.
13128 (get_first_inferior): Declare.
13129 * linux-low.c (linux_wait_for_event): Replace accessing list
13130 implemention details with API function.
13131 * server.c (target_running): Ditto.
13132 (accumulate_file_name_length): New function.
13133 (emit_dll_description): New function.
13134 (handle_qxfer_libraries): Replace accessing list implemention
13135 details with API function.
13136 (handle_qxfer_threads_worker): New function.
13137 (handle_qxfer_threads_proper): Replace accessing list implemention
13138 details with API function.
13139 (handle_query): Ditto.
13140 (visit_actioned_threads_callback_ftype): New typedef.
13141 (visit_actioned_threads_data): New struct.
13142 (visit_actioned_threads): Rewrite to be find_inferior callback.
13143 (resume): Call find_inferior.
13144 (handle_status): Replace accessing list implemention
13145 details with API function.
13146 (process_serial_event): Replace accessing list implemention details
13147 with API function.
13148 * target.c (set_desired_inferior): Replace accessing list implemention
13149 details with API function.
13150 * tracepoint.c (same_process_p): New function.
13151 (gdb_agent_about_to_close): Replace accessing list implemention
13152 details with API function.
13153 * win32-low.c (child_delete_thread): Replace accessing list
13154 implemention details with API function.
13155 (match_dll_by_basename): New function.
13156 (dll_is_loaded_by_basename): New function.
13157 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13158 details call to dll_is_loaded_by_basename.
13159
80894984
DE
131602014-02-19 Doug Evans <dje@google.com>
13161
13162 * dll.h (struct dll_info): Add comment.
13163 * gdbthread.h (struct thread_info): Add comment.
13164 (current_ptid): Simplify.
13165 * inferiors.c (add_process): Update.
13166 (remove_process): Update.
13167 * inferiors.h (struct process_info): Rename member "head" to "entry".
13168 * linux-low.c (delete_lwp): Update.
13169 (add_lwp): Update.
13170 (last_thread_of_process_p): Update.
13171 (kill_one_lwp_callback, linux_kill): Update.
13172 (status_pending_p_callback): Update.
13173 (wait_for_sigstop): Update. Simplify read of ptid.
13174 (start_step_over): Update.
13175 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13176 (get_lwp_thread): Update.
13177 (struct lwp_info): Rename member "head" to "entry".
13178 * regcache.h (inferior_list_entry): Delete.
13179 * server.c (kill_inferior_callback): Update.
13180 (detach_or_kill_inferior_callback): Update.
13181 (print_started_pid): Update.
13182 (print_attached_pid): Update.
13183 (process_serial_event): Simplify read of ptid.
13184 * thread-db.c (thread_db_create_event): Update.
13185 (thread_db_get_tls_address): Update.
13186 * win32-low.c (current_inferior_ptid): Simplify.
13187
46917d26
TT
131882014-02-19 Tom Tromey <tromey@redhat.com>
13189
13190 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13191 argument.
13192 (target_supports_btrace): Update.
13193
0759a81e
YQ
131942014-02-14 Yao Qi <yao@codesourcery.com>
13195
13196 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13197 (rsp-low-ipa.o): New target.
13198
a7191e8b
TT
131992014-02-12 Tom Tromey <tromey@redhat.com>
13200
13201 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13202 convert_ascii_to_int.
13203 * regcache.c (registers_to_string): Likewise.
13204 * remote-utils.c (decode_M_packet): Likewise.
13205 * server.c (process_serial_event): Likewise.
13206
ff0e980e
TT
132072014-02-12 Tom Tromey <tromey@redhat.com>
13208
13209 * server.c (handle_query, handle_v_run): Use hex2bin, not
13210 unhexify.
13211 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13212
e9371aff
TT
132132014-02-12 Tom Tromey <tromey@redhat.com>
13214
13215 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13216 convert_int_to_ascii.
13217 * regcache.c (registers_to_string, collect_register_as_string):
13218 Likewise.
13219 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13220 Likewise.
13221 * server.c (process_serial_event): Likewise.
13222 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13223 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13224
971dc0b8
TT
132252014-02-12 Tom Tromey <tromey@redhat.com>
13226
13227 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13228 bin2hex, not hexify.
13229 * tracepoint.c (cmd_qtstatus): Likewise.
13230
0a822afb
TT
132312014-02-12 Tom Tromey <tromey@redhat.com>
13232
13233 * remote-utils.c (monitor_output): Pass explicit length to
13234 hexify.
13235
9c3d6531
TT
132362014-02-12 Tom Tromey <tromey@redhat.com>
13237
13238 * tracepoint.c: Include rsp-low.h.
13239 * server.c: Include rsp-low.h.
13240 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13241 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13242 declare.
13243 * remote-utils.c: Include rsp-low.h.
13244 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13245 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13246 (convert_int_to_ascii, convert_ascii_to_int): Move to
13247 common/rsp-low.c.
13248 * regcache.c: Include rsp-low.h.
13249 * ax.c: Include rsp-low.h.
13250 * Makefile.in (SFILES): Add common/rsp-low.c.
13251 (OBS): Add rsp-low.o.
13252 (rsp-low.o): New target.
13253
01fd3ea5
TT
132542014-02-12 Tom Tromey <tromey@redhat.com>
13255
13256 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13257 Include print-utils.h.
13258 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13259 (plongest, thirty_two, phex_nz): Remove.
13260 * Makefile.in (SFILES): Add common/print-utils.c.
13261 (OBS): Add print-utils.o.
13262 (print-utils-ipa.o): New target.
13263 (print-utils.o): New target.
13264 (IPA_OBJS): Add print-utils-ipa.o.
13265
e99dc820
TT
132662014-02-06 Tom Tromey <tromey@redhat.com>
13267
13268 * Makefile.in (SFILES): Fix indentation.
13269
ee1e2d4f
DE
132702014-02-05 Doug Evans <dje@google.com>
13271
13272 * linux-low.c (linux_wait_for_event): Improve comment.
13273 (linux_wait_1): Keep current_inferior in sync with event_child.
13274
f5a02773
DE
132752014-01-22 Doug Evans <dje@google.com>
13276
13277 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13278
87ce2a04
DE
132792014-01-22 Doug Evans <dje@google.com>
13280
13281 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13282 * configure: Regenerate.
13283 * config.in: Regenerate.
13284 * Makefile.in (SFILES): Add debug.c.
13285 (OBS): Add debug.o.
13286 * debug.c: New file.
13287 * debug.h: New file.
13288 * linux-aarch64-low.c (*): Update all debugging printfs to use
13289 debug_printf instead of fprintf.
13290 * linux-arm-low.c (*): Ditto.
13291 * linux-cris-low.c (*): Ditto.
13292 * linux-crisv32-low.c (*): Ditto.
13293 * linux-m32r-low.c (*): Ditto.
13294 * linux-sparc-low.c (*): Ditto.
13295 * linux-x86.c (*): Ditto.
13296 * linux-low.c (*): Ditto.
13297 (linux_wait_1): Add calls to debug_enter, debug_exit.
13298 (linux_wait): Remove redundant debugging printf.
13299 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13300 (linux_resume, unstop_all_lwps): Ditto.
13301 * mem-break.c (*): Update all debugging printfs to use
13302 debug_printf instead of fprintf.
13303 * remote-utils.c (*): Ditto.
13304 * thread-db.c (*): Ditto.
13305 * server.c #include <ctype.h>, "gdb_vecs.h".
13306 (debug_threads): Moved to debug.c.
13307 (*): Update all debugging printfs to use debug_printf instead of
13308 fprintf.
13309 (start_inferior): Replace call to fflush with call to debug_flush.
13310 (monitor_show_help): Mention set debug-format.
13311 (parse_debug_format_options): New function.
13312 (handle_monitor_command): Handle "monitor set debug-format".
13313 (gdbserver_usage): Mention --debug-format.
13314 (main): Parse --debug-format.
13315 * server.h (debug_threads): Declaration moved to debug.h.
13316 #include "debug.h".
13317 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13318 trace_debug_1 that uses debug_printf.
13319 (tracepoint_look_up_symbols): Update all debugging printfs to use
13320 debug_printf instead of fprintf.
13321
e671835b
BS
133222014-01-20 Baruch Siach <baruch@tkos.co.il>
13323
13324 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13325 sys/ptrace.h.
13326
b5737fa9
PA
133272014-01-17 Pedro Alves <palves@redhat.com>
13328
ea38d2a9 13329 PR build/16445
c7faa97a
PA
13330 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13331 defined after including gdb_proc_service.h.
b5737fa9 13332
40ed484e
DE
133332014-01-16 Doug Evans <dje@google.com>
13334
13335 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13336 (match_dll): Use it.
13337
969c39fb
MM
133382014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13339
13340 * target.h (target_ops) <read_btrace>: Change parameters and
13341 return type to allow error reporting.
13342 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13343 trace reading errors on.
13344 * linux-low.c (linux_low_read_btrace): Pass trace reading
13345 errors on.
13346 (linux_low_disable_btrace): New.
13347
ab7f45ba
DE
133482014-01-15 Doug Evans <dje@google.com>
13349
13350 * inferiors.c (thread_id_to_gdb_id): Delete.
13351 * inferiors.h (thread_id_to_gdb_id): Delete.
13352
66af0f44
EZ
133532014-01-13 Eli Zaretskii <eliz@gnu.org>
13354
13355 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13356 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13357 versions.
13358
9939e131
PA
133592014-01-08 Pedro Alves <palves@redhat.com>
13360
13361 * server.c (handle_status): Don't discard previous queued stop
13362 replies or thread's pending status here.
13363 (main) <disconnection>: Do it here instead.
13364
b7ea362b
PA
133652014-01-08 Pedro Alves <palves@redhat.com>
13366
13367 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13368 * server.c (visit_actioned_threads, handle_pending_status): New
13369 function.
13370 (handle_v_cont): Factor out parts to ...
13371 (resume): ... this new function. If in all-stop, and a thread
13372 being resumed has a pending status, report it without actually
13373 resuming.
13374 (myresume): Adjust to use the new 'resume' function.
13375 (clear_pending_status_callback, set_pending_status_callback)
13376 (find_status_pending_thread_callback): New functions.
13377 (handle_status): Handle the case of multiple threads having
13378 interesting statuses to report. Report threads' real last signal
13379 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13380 with an interesting thread to report the status for, instead of
13381 always reporting the status of the first thread.
13382
28498c42
JB
133832014-01-01 Joel Brobecker <brobecker@adacore.com>
13384
13385 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13386 * gdbreplay.c (gdbreplay_version): Likewise.
13387
f45c82da
YZ
133882013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13389
13390 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13391 iov.iov_len with the real length in use.
13392
379a5e2d
JB
133932013-12-13 Joel Brobecker <brobecker@adacore.com>
13394
13395 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13396 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13397 for all targets that use win32-low.c.
13398 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13399 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13400
4210d83e
PA
134012013-12-13 Pedro Alves <palves@redhat.com>
13402
13403 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13404 if equal to TARGET_WAITKIND_LOADED.
13405 * win32-low.c (cached_status): New static global.
13406 (win32_wait): Add declaration.
13407 (do_initial_child_stuff): Flush all initial pending debug events
13408 up to the initial breakpoint.
13409 (win32_wait): If CACHED_STATUS was set, return that instead
13410 of doing a real wait. Remove the code resuming the execution
13411 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13412 during the initial phase. Also remove the code changing
13413 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13414 TARGET_WAITKIND_STOPPED.
13415
e7f0d979
YQ
134162013-12-11 Yao Qi <yao@codesourcery.com>
13417
13418 * notif.c (handle_notif_ack): Return 0 if no notification
13419 matches.
13420
ebcf782c
DE
134212013-11-20 Doug Evans <dje@google.com>
13422
13423 * linux-low.c (linux_set_resume_request): Fix comment.
13424
20ad9378
DE
134252013-11-20 Doug Evans <dje@google.com>
13426
13427 * linux-low.c (resume_status_pending_p): Tweak comment.
13428
a196ebeb
WT
134292013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13430
13431 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13432 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13433 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13434 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13435 (srv_amd64_regobj): Add amd64-mpx.o.
13436 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13437 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13438 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13439 * i387-fp.c (num_pl_bnd_register) Added constant.
13440 (num_pl_bnd_cfg_registers) Added constant.
13441 (struct i387_xsave) Added reserved area and MPX fields.
13442 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13443 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13444 function.
13445 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13446 (init_registers_amd64_mpx_linux): Declare new function.
13447 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13448 (x86_64_regmap): Add MPX registers.
13449 (x86_linux_read_description): Add MPX case.
13450 (initialize_low_arch): Initialize MPX targets.
13451
0080a2f6
TT
134522013-11-18 Tom Tromey <tromey@redhat.com>
13453
13454 * configure: Rebuild.
13455 * configure.ac: Don't check for stdlib.h.
13456 * gdbreplay.c: Unconditionally include stdlib.h.
13457
2978b111
TT
134582013-11-18 Tom Tromey <tromey@redhat.com>
13459
13460 * config.in: Rebuild.
13461 * configure: Rebuild.
13462 * configure.ac: Don't use AC_HEADER_DIRENT.
13463
a3d08894
TT
134642013-11-18 Tom Tromey <tromey@redhat.com>
13465
13466 * server.h: Don't check HAVE_STRING_H.
13467 * gdbreplay.c: Don't check HAVE_STRING_H.
13468 * configure: Rebuild.
13469
0a5dd17d
TT
134702013-11-18 Tom Tromey <tromey@redhat.com>
13471
13472 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13473 LIBGNU.
13474
1bd2f0ba
TT
134752013-11-08 Tom Tromey <tromey@redhat.com>
13476
13477 * configure, config.in: Rebuild.
13478 * configure.ac: Remove unused configury.
13479
3266f10b
TT
134802013-11-08 Tom Tromey <tromey@redhat.com>
13481
13482 * acinclude.m4: Include common.m4, codeset.m4.
13483 * configure, config.in: Rebuild.
13484 * configure.ac: Use GDB_AC_COMMON.
13485
6682d959
AA
134862013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13487
13488 * linux-s390-low.c (HWCAP_S390_TE): New define.
13489 (s390_arch_setup): Consider the TE field in the HWCAP for
13490 determining 'have_regset_tdb'.
13491
fd0a4d76
SDJ
134922013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13493
13494 PR gdb/16014
13495 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13496 call to sizeof.
13497
1a3d890b
PA
134982013-10-02 Pedro Alves <palves@redhat.com>
13499
13500 * server.c (process_serial_event): Don't output "GDBserver
13501 exiting" if GDB is connected through stdio.
13502 * target.c (mywait): Likewise, be silent if GDB is connected
13503 through stdio.
13504
97ad4581
JB
135052013-10-01 Joel Brobecker <brobecker@adacore.com>
13506
13507 * lynx-low.c (lynx_add_threads_after_attach): New function.
13508 (lynx_attach): Remove call to add_thread. Add call to
13509 lynx_add_threads_after_attach instead.
13510
5b4e221c
MF
135112013-09-28 Mike Frysinger <vapier@gentoo.org>
13512
13513 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13514 * config.in, configure: Regenerated.
13515
ee47b2f8
YQ
135162013-09-18 Yao Qi <yao@codesourcery.com>
13517
13518 PR server/15959
13519 * server.c (start_inferior): Clear 'resume_info'.
13520
d6707650 135212013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 13522
d6707650
JW
13523 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13524 for each register.
13525
9243dd0e 135262013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 13527
9243dd0e
JW
13528 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13529 linux-tile-low.o to srv_tgtobj.
13530
c623a6ef
WN
135312013-09-16 Will Newton <will.newton@linaro.org>
13532
13533 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13534 out regs.
13535
fb71d39e
PA
135362013-09-06 Pedro Alves <palves@redhat.com>
13537
13538 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13539 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13540 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13541 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13542 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13543 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13544
8e7e9910
PA
135452013-09-06 Pedro Alves <palves@redhat.com>
13546
13547 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13548 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13549
7c3a12ca
PA
135502013-09-06 Pedro Alves <palves@redhat.com>
13551
13552 * linux-amd64-ipa.c: Include tracepoint.h.
13553 * linux-i386-ipa.c: Include tracepoint.h.
13554
8eb3d7b6
RW
135552013-09-06 Ricard Wanderlof <ricardw@axis.com>
13556
13557 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13558 (ps_get_thread_area): New function.
13559
eddddb9d
RW
135602013-09-06 Ricard Wanderlof <ricardw@axis.com>
13561
13562 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13563 (initialize_low_arch): Call init_registers_crisv32 rather than
13564 init_register_crisv32.
13565
533b0600
PA
135662013-09-05 Pedro Alves <palves@redhat.com>
13567
13568 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13569 to ...
13570 * hostio.h: ... this new file.
13571 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13572 win32-low.c: Include hostio.h.
13573
0ce3d3b5
PA
135742013-09-05 Pedro Alves <palves@redhat.com>
13575
13576 * server.h (gdb_client_data, handler_func, callback_handler_func)
13577 (delete_file_handler, add_file_handler, append_callback_event)
13578 (delete_callback_event, start_event_loop, initialize_event_loop):
13579 Move to event-loop.h and include it.
13580 * event-loop.h: New file.
13581
799cdc37
PA
135822013-09-05 Pedro Alves <palves@redhat.com>
13583
13584 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13585 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13586 (loaded_dll, unloaded_dll): Move to ...
13587 * dll.h: ... this new file.
13588 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13589
6a6bbd9d
PA
135902013-09-05 Pedro Alves <palves@redhat.com>
13591
13592 * server.h (current_process, get_thread_process, all_processes)
13593 (add_inferior_to_list, for_each_inferior, current_inferior)
13594 (remove_inferior, add_process, remove_process, find_process_pid)
13595 (have_started_inferiors_p, have_attached_inferiors_p)
13596 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13597 (clear_inferiors, find_inferior, find_inferior_id)
13598 (inferior_target_data, set_inferior_target_data)
13599 (inferior_regcache_data, set_inferior_regcache_data): Move to
13600 inferiors.h, and include it.
13601 * inferiors.h: New file.
13602
f699aaba
PA
136032013-09-05 Pedro Alves <palves@redhat.com>
13604
13605 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13606 Move ...
72f4393d 13607 * ax.h: ... here.
f699aaba 13608
c144c7a0
PA
136092013-09-05 Pedro Alves <palves@redhat.com>
13610
13611 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13612 tracepoint.h.
13613 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13614 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13615 (handle_tracepoint_general_set, handle_tracepoint_query)
13616 (tracepoint_finished_step, tracepoint_was_hit)
13617 (release_while_stepping_state_list, current_traceframe)
13618 (in_readonly_region, traceframe_read_mem)
13619 (fetch_traceframe_registers, traceframe_read_sdata)
13620 (traceframe_read_info, struct fast_tpoint_collect_status)
13621 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13622 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13623 (supply_fast_tracepoint_registers)
13624 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13625 (ipa_tdesc, claim_trampoline_space)
13626 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13627 (agent_mem_read, agent_get_trace_state_variable_value)
13628 (agent_set_trace_state_variable_value, agent_tsv_read)
13629 (agent_mem_read_string, get_raw_reg_func_addr)
13630 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13631 * tracepoint.h: ... this new file.
13632
ff42e6ab
PA
136332013-09-05 Pedro Alves <palves@redhat.com>
13634
13635 * server.h (perror_with_name, error, fatal, warning, paddress)
13636 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13637 include it.
13638 * utils.h: New file.
13639
541af0f4
PA
136402013-09-05 Pedro Alves <palves@redhat.com>
13641
13642 * server.h (remote_debug, noack_mode, transport_is_reliable)
13643 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13644 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13645 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13646 (write_enn, initialize_async_io, enable_async_io)
13647 (disable_async_io, check_remote_input_interrupt_request)
13648 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13649 (dead_thread_notify, prepare_resume_reply)
13650 (decode_address_to_semicolon, decode_address, decode_m_packet)
13651 (decode_M_packet, decode_X_packet, decode_xfer_write)
13652 (decode_search_memory_packet, unhexify, hexify)
13653 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13654 (look_up_one_symbol, relocate_instruction)
13655 (monitor_output): Move to remote-utils.h, and include it.
13656 * remote-utils.h: New file.
13657
eebdf26b
PA
136582013-09-05 Pedro Alves <palves@redhat.com>
13659
13660 * server.h (_): Delete.
13661
3aafd2ff
PA
136622013-09-02 Pedro Alves <palves@redhat.com>
13663
13664 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13665 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13666 allocated.
13667 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13668
cee83bcb
PM
136692013-09-02 Pierre Muller <muller@sourceware.org>
13670
13671 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13672 or WriteProcessMemory complete successfully and handle
13673 ERROR_PARTIAL_COPY error.
13674
9a13b2fa
PA
136752013-09-02 Pedro Alves <palves@redhat.com>
13676
13677 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13678 error instead of EIO.
13679
602e3198
JK
136802013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13681
13682 PR server/15604
13683 * linux-low.c: Include filestuff.h.
13684 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13685 * lynx-low.c: Include filestuff.h.
13686 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13687 * server.c: Include filestuff.h.
13688 (main): Call notice_open_fds.
13689 * spu-low.c: Include filestuff.h.
13690 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13691
96d7229d
LM
136922013-08-22 Luis Machado <lgustavo@codesourcery.com>
13693
13694 * Makefile.in: Explain why ../target and ../nat are not
13695 listed as include file search paths.
13696 (linux-waitpid.o): New object file rule.
13697 * configure.srv (srv_native_linux_obj): New variable.
13698 Replace all occurrences of linux native object files with
13699 $srv_native_linux_obj.
13700 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13701 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13702 (linux_enable_event_reporting): Remove declaration.
13703 (my_waitpid): Moved to common/linux-waitpid.c.
13704 (linux_wait_for_event): Pass ptid when calling
13705 linux_enable_event_reporting.
13706 (linux_supports_tracefork_flag): Remove.
13707 (linux_enable_event_reporting): Likewise.
13708 (linux_tracefork_grandchild): Remove.
13709 (STACK_SIZE): Moved to common/linux-ptrace.c.
13710 (linux_tracefork_child): Remove.
13711 (linux_test_for_tracefork): Remove.
13712 (linux_look_up_symbols): Call linux_supports_traceclone.
13713 (initialize_low): Remove call to linux_test_for_tracefork.
13714 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13715 common/linux-ptrace.h.
13716 (PTRACE_TYPE_ARG4): Likewise.
13717 Include linux-ptrace.h.
13718
32940073
PA
137192013-08-21 Pedro Alves <palves@redhat.com>
13720
13721 * config.in: Renegerate.
13722
33b60d58 137232013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 13724
33b60d58
LM
13725 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13726 (SFILES): Remove $(srcdir)/common/target-common.c and
13727 add $(srcdir)/target/waitstatus.c.
13728 (OBS): Remove target-common.o and add waitstatus.o.
13729 (server_h): Remove $(srcdir)/../common/target-common.h and
13730 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13731 and $(srcdir)/../target/waitstatus.h.
13732 (target-common.o): Remove.
13733 (waitstatus.o): New target object file.
13734 * target.h: Do not include target-common.h and
13735 include target/resume.h, target/wait.h and
13736 target/waitstatus.h.
13737
b8e1b30e
LM
137382013-08-13 Luis Machado <lgustavo@codesourcery.com>
13739
13740 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13741 to PTRACE_TYPE_ARG3.
13742 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13743 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13744 PTRACE_TYPE_ARG4.
13745 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13746 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13747
7a60ad40
YQ
137482013-07-27 Jie Zhang <jie@codesourcery.com>
13749 Daniel Jacobowitz <dan@codesourcery.com>
13750 Yao Qi <yao@codesourcery.com>
13751
13752 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13753 (mips-linux-watch.o): New rule.
13754 (mips_linux_watch_h): New variable.
13755 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13756 srv_tgtobj.
13757 * linux-mips-low.c: Include mips-linux-watch.h.
13758 (struct arch_process_info, struct arch_lwp_info): New.
13759 (update_watch_registers_callback): New function.
13760 (mips_linux_new_process, mips_linux_new_thread) New functions.
13761 (mips_linux_prepare_to_resume, mips_insert_point): New
13762 functions.
13763 (mips_remove_point, mips_stopped_by_watchpoint): New
13764 functions.
13765 (rsp_bp_type_to_target_hw_bp_type): New function.
13766 (mips_stopped_data_address): New function.
13767 (the_low_target): Add watchpoint support functions.
13768
de6f69ad
YQ
137692013-07-27 Yao Qi <yao@codesourcery.com>
13770
13771 * i386-low.c: Include break-common.h.
13772 (enum target_hw_bp_type): Remove.
13773
3360c0bf
LM
137742013-07-24 Luis Machado <lgustavo@codesourcery.com>
13775
13776 * Makefile.in (SFILES): /common/target-common.c.
13777 (OBS): Add target-common.o.
13778 (server_h): Add $(srcdir)/../common/target-common.h.
13779 (target-common.o): New target.
13780 * server.c (queue_stop_reply_callback): Free
13781 status string after use.
13782 * target.c (target_waitstatus_to_string): Remove.
13783 * target.h: Include target-common.h.
13784 (resume_kind): Likewise.
13785 (target_waitkind): Likewise.
13786 (target_waitstatus): Likewise.
13787 (TARGET_WNOHANG): Likewise.
13788
bd885420
YQ
137892013-07-04 Yao Qi <yao@codesourcery.com>
13790
13791 * Makefile.in (host_alias): Use @host_noncanonical@.
13792 (target_alias): Use @target_noncanonical@.
13793 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13794 ACX_NONCANONICAL_HOST.
13795 * configure: Regenerated.
13796
13797 Revert:
13798 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13799
13800 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13801 * configure: Rebuild.
13802 * Makefile.in (version_host, version_target): Get from configure.
13803 (version.c): Use $(version_host) and $(version_target).
13804
17ef446e
PA
138052013-07-03 Pedro Alves <palves@redhat.com>
13806
13807 * Makefile.in (config.status): Depend on development.sh.
13808 * acinclude.m4: Include libmcheck.m4.
13809 * configure: Regenerate.
13810
7a9a7487
MG
138112013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13812
13813 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13814 attribute inside the parentheses.
13815 (winapi_DebugSetProcessKillOnExit): Ditto.
13816 (winapi_DebugBreakProcess): Ditto.
13817 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 13818
49b64de6
MG
138192013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13820
13821 * notif.h (notif_event): Add a dummy member to avoid compiler
13822 errors.
13823
d5749ee7
PA
138242013-07-01 Pedro Alves <palves@redhat.com>
13825
13826 * hostio.c (HOSTIO_PATH_MAX): Define.
13827 (require_filename, handle_open, handle_unlink, handle_readlink):
13828 Use it.
13829
d8d2a3ee
PA
138302013-07-01 Pedro Alves <palves@redhat.com>
13831
13832 * server.h: Include "pathmax.h".
13833 * linux-low.c: Don't include sys/param.h.
13834 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13835 MAXPATHLEN.
13836 * win32-low.c: Don't include sys/param.h.
13837 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13838
bc7dea8d
PA
138392013-07-01 Pedro Alves <palves@redhat.com>
13840
13841 * event-loop.c: Don't check HAVE_UNISTD_H before including
13842 <unistd.h>.
13843 * gdbreplay.c: Likewise.
13844 * remote-utils.c: Likewise.
13845 * server.c: Likewise.
13846 * configure.ac: Don't check for unistd.h.
13847 * configure: Regenerate.
13848
d6c2da54
TT
138492013-06-28 Tom Tromey <tromey@redhat.com>
13850
13851 * Makefile.in (version.c): Use version.in, not
13852 common/version.in.
13853
257b6bec
MG
138542013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13855
13856 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13857 * configure: Rebuild.
13858 * Makefile.in (version_host, version_target): Get from configure.
13859 (version.c): Use $(version_host) and $(version_target).
13860
86ebe149
DK
138612013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13862
13863 Fix trace-status to output user name without trailing colon.
13864 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13865
f30aa5af
DK
138662013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13867
13868 Fix trace-status to output proper start-time and stop-time.
13869 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13870 output start time and stop time in hex as gdb expects.
13871
28a93511
YQ
138722013-06-26 Pedro Alves <pedro@codesourcery.com>
13873
13874 * tracepoint.c (build_traceframe_info_xml): Output trace state
13875 variables present in the trace buffer.
13876
01208463
TT
138772013-06-24 Tom Tromey <tromey@redhat.com>
13878
13879 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13880 create-version.sh.
13881 (version.o): Remove.
13882 * gdbreplay.c: Include version.h.
13883 (version, host_name): Don't declare.
13884 * server.h: Include version.h.
13885 (version, host_name): Don't declare.
13886
760256f9
PA
138872013-06-12 Pedro Alves <palves@redhat.com>
13888
13889 * linux-x86-low.c (linux_is_elf64): Delete global.
13890 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
13891 with local linux_pid_exe_is_elf_64_file use.
13892
030031ee
PA
138932013-06-11 Pedro Alves <palves@redhat.com>
13894
13895 * linux-low.c (regset_disabled, disable_regset): New functions.
13896 (regsets_fetch_inferior_registers)
13897 (regsets_store_inferior_registers): Use them.
13898 (initialize_regsets_info); Don't allocate the disabled_regsets
13899 array here.
13900 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
13901 comment.
13902
5da6eb0a
PA
139032013-06-11 Pedro Alves <palves@redhat.com>
13904
13905 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
13906 xmalloc.
13907
7e5aaa09
PA
139082013-06-11 Pedro Alves <palves@redhat.com>
13909
13910 * linux-x86-low.c (initialize_low_arch): Call
13911 init_registers_x32_avx_linux.
13912
d878444c
JK
139132013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
13914
13915 Fix compatibility with Android Bionic.
13916 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
13917 it is not empty.
13918
3aee8918
PA
139192013-06-07 Pedro Alves <palves@redhat.com>
13920
5f2b57b5 13921 PR server/14823
3aee8918
PA
13922 * Makefile.in (OBS): Add tdesc.o.
13923 (IPA_OBJS): Add tdesc-ipa.o.
13924 (tdesc-ipa.o): New rule.
13925 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
13926 interface.
13927 * linux-low.c (new_inferior): Delete.
13928 (disabled_regsets, num_regsets): Delete.
13929 (linux_add_process): Adjust to set the new per-process
13930 new_inferior flag.
13931 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
13932 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
13933 was a stop. When calling arch_setup, switch the current inferior
13934 to the thread that got an event.
13935 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
13936 (regsets_fetch_inferior_registers)
13937 (regsets_store_inferior_registers): New regsets_info parameter.
13938 Adjust to use it.
13939 (linux_register_in_regsets): New regs_info parameter. Adjust to
13940 use it.
13941 (register_addr, fetch_register, store_register): New usrregs_info
13942 parameter. Adjust to use it.
13943 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
13944 parameter regs_info. Adjust to use it.
13945 (linux_fetch_registers): Get the current inferior's regs_info, and
13946 adjust to use it.
13947 (linux_store_registers): Ditto.
13948 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
13949 (initialize_low): Don't initialize the target_regsets here. Call
13950 initialize_low_arch.
13951 * linux-low.h (target_regsets): Delete declaration.
13952 (struct regsets_info): New.
13953 (struct usrregs_info): New.
13954 (struct regs_info): New.
13955 (struct process_info_private) <new_inferior>: New field.
13956 (struct linux_target_ops): Delete the num_regs, regmap, and
13957 regset_bitmap fields. New field regs_info.
13958 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
13959 * i387-fp.c (num_xmm_registers): Delete.
13960 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
13961 calls to new interface.
13962 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
13963 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
13964 Infer the number of xmm registers from the regcache's target
13965 description.
13966 * i387-fp.h (num_xmm_registers): Delete.
13967 * inferiors.c (add_thread): Don't install the thread's regcache
13968 here.
13969 * proc-service.c (gregset_info): Fetch the current inferior's
13970 regs_info. Adjust to use it.
13971 * regcache.c: Include tdesc.h.
13972 (register_bytes, reg_defs, num_registers)
13973 (gdbserver_expedite_regs): Delete.
13974 (get_thread_regcache): If the thread doesn't have a regcache yet,
13975 create one, instead of aborting gdbserver.
13976 (regcache_invalidate_one): Rename to ...
13977 (regcache_invalidate_thread): ... this.
13978 (regcache_invalidate_one): New.
13979 (regcache_invalidate): Only invalidate registers of the current
13980 process.
13981 (init_register_cache): Add target_desc parameter, and use it.
13982 (new_register_cache): Ditto. Assert the target description has a
13983 non zero registers_size.
13984 (regcache_cpy): Add assertions. Adjust.
13985 (realloc_register_cache, set_register_cache): Delete.
13986 (registers_to_string, registers_from_string): Adjust.
13987 (find_register_by_name, find_regno, find_register_by_number)
13988 (register_cache_size): Add target_desc parameter, and use it.
13989 (free_register_cache_thread, free_register_cache_thread_one)
13990 (regcache_release, register_cache_size): New.
13991 (register_size): Add target_desc parameter, and use it.
13992 (register_data, supply_register, supply_register_zeroed)
13993 (supply_regblock, supply_register_by_name, collect_register)
13994 (collect_register_as_string, collect_register_by_name): Adjust.
13995 * regcache.h (struct target_desc): Forward declare.
13996 (struct regcache) <tdesc>: New field.
13997 (init_register_cache, new_register_cache): Add target_desc
13998 parameter.
13999 (regcache_invalidate_thread): Declare.
14000 (regcache_invalidate_one): Delete declaration.
14001 (regcache_release): Declare.
14002 (find_register_by_number, register_cache_size, register_size)
14003 (find_regno): Add target_desc parameter.
14004 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14005 declarations.
14006 * remote-utils.c: Include tdesc.h.
14007 (outreg, prepare_resume_reply): Adjust.
14008 * server.c: Include tdesc.h.
14009 (gdbserver_xmltarget): Delete declaration.
14010 (get_features_xml, process_serial_event): Adjust.
14011 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14012 declare.
14013 (struct process_info) <tdesc>: New field.
14014 (ipa_tdesc): Declare.
14015 * tdesc.c: New file.
14016 * tdesc.h: New file.
14017 * tracepoint.c: Include tdesc.h.
14018 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14019 (get_context_regcache): Adjust to pass ipa_tdesc down.
14020 (do_action_at_tracepoint): Adjust to get the register cache size
14021 from the context regcache's description.
14022 (traceframe_walk_blocks): Adjust to get the register cache size
14023 from the current trace frame's description.
14024 (traceframe_get_pc): Adjust to get current trace frame's
14025 description and pass it down.
14026 (gdb_collect): Adjust to get the register cache size from the
14027 IPA's description.
14028 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14029 (gdbserver_xmltarget): Delete.
14030 (initialize_low_tracepoint): Set the ipa's target description.
14031 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14032 (initialize_low_tracepoint): Set the ipa's target description.
14033 * linux-x86-low.c: Include tdesc.h.
14034 [__x86_64__] (is_64bit_tdesc): New.
14035 (ps_get_thread_area, x86_get_thread_area): Use it.
14036 (i386_cannot_store_register): Rename to ...
14037 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14038 (i386_cannot_fetch_register): Rename to ...
14039 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14040 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14041 to new interface.
14042 (target_regsets): Rename to ...
14043 (x86_regsets): ... this.
14044 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14045 interface.
14046 (x86_siginfo_fixup): Use is_64bit_tdesc.
14047 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14048 (tdesc_x32_avx_linux, tdesc_x32_linux)
14049 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14050 Declare.
14051 (x86_linux_update_xmltarget): Delete.
14052 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14053 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14054 (AMD64_LINUX_USER64_CS): New.
14055 (x86_linux_read_description): New, based on
14056 x86_linux_update_xmltarget.
14057 (same_process_callback): New.
14058 (x86_arch_setup_process_callback): New.
14059 (x86_linux_update_xmltarget): New.
14060 (x86_regsets_info): New.
14061 (amd64_linux_regs_info): New.
14062 (i386_linux_usrregs_info): New.
14063 (i386_linux_regs_info): New.
14064 (x86_linux_regs_info): New.
14065 (x86_arch_setup): Reimplement.
14066 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14067 (x86_emit_ops): Ditto.
14068 (the_low_target): Adjust. Install x86_linux_regs_info,
14069 x86_cannot_fetch_register, and x86_cannot_store_register.
14070 (initialize_low_arch): New.
14071 * linux-ia64-low.c (tdesc_ia64): Declare.
14072 (ia64_fetch_register): Adjust.
14073 (ia64_usrregs_info, regs_info): New globals.
14074 (ia64_regs_info): New function.
14075 (the_low_target): Adjust.
14076 (initialize_low_arch): New function.
14077 * linux-sparc-low.c (tdesc_sparc64): Declare.
14078 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14079 Adjust.
14080 (sparc_arch_setup): New function.
14081 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14082 (the_low_target): Adjust.
14083 (initialize_low_arch): New function.
14084 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14085 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14086 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14087 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14088 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14089 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14090 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14091 (tdesc_powerpc_isa205_vsx64l): Declare.
14092 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14093 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14094 (ppc_set_pc, ppc_get_hwcap): Adjust.
14095 (ppc_usrregs_info): Forward declare.
14096 (!__powerpc64__) ppc_regmap_adjusted: New global.
14097 (ppc_arch_setup): Adjust to the current process'es target
14098 description.
14099 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14100 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14101 (ppc_store_evrregset): Adjust.
14102 (target_regsets): Rename to ...
14103 (ppc_regsets): ... this, and make static.
14104 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14105 (ppc_regs_info): New function.
14106 (the_low_target): Adjust.
14107 (initialize_low_arch): New function.
14108 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14109 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14110 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14111 (tdesc_s390x_linux64v2): Declare.
14112 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14113 (s390_fill_gregset, s390_store_last_break): Adjust.
14114 (target_regsets): Rename to ...
14115 (s390_regsets): ... this, and make static.
14116 (s390_get_pc, s390_set_pc): Adjust.
14117 (s390_get_hwcap): New target_desc parameter, and use it.
14118 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14119 (s390_arch_setup): Adjust to set the current process'es target
14120 description. Don't adjust the regmap.
14121 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14122 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14123 (regs_info_3264): New globals.
14124 (s390_regs_info): New function.
14125 (the_low_target): Adjust.
14126 (initialize_low_arch): New function.
14127 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14128 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14129 [__mips64] (init_registers_mips_linux)
14130 (init_registers_mips_dsp_linux): Delete defines.
14131 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14132 (have_dsp): New global.
14133 (mips_read_description): New, based on mips_arch_setup.
14134 (mips_arch_setup): Reimplement.
14135 (get_usrregs_info): New function.
14136 (mips_cannot_fetch_register, mips_cannot_store_register)
14137 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14138 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14139 (target_regsets): Rename to ...
14140 (mips_regsets): ... this, and make static.
14141 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14142 (dsp_regs_info, regs_info): New globals.
14143 (mips_regs_info): New function.
14144 (the_low_target): Adjust.
14145 (initialize_low_arch): New function.
14146 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14147 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14148 Declare.
14149 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14150 (arm_read_description): New, with bits factored from
14151 arm_arch_setup.
14152 (arm_arch_setup): Reimplement.
14153 (target_regsets): Rename to ...
14154 (arm_regsets): ... this, and make static.
14155 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14156 (arm_regs_info): New function.
14157 (the_low_target): Adjust.
14158 (initialize_low_arch): New function.
14159 * linux-m68k-low.c (tdesc_m68k): Declare.
14160 (target_regsets): Rename to ...
14161 (m68k_regsets): ... this, and make static.
14162 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14163 (m68k_regs_info): New function.
14164 (m68k_arch_setup): New function.
14165 (the_low_target): Adjust.
14166 (initialize_low_arch): New function.
14167 * linux-sh-low.c (tdesc_sharch): Declare.
14168 (target_regsets): Rename to ...
14169 (sh_regsets): ... this, and make static.
14170 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14171 (sh_regs_info, sh_arch_setup): New functions.
14172 (the_low_target): Adjust.
14173 (initialize_low_arch): New function.
14174 * linux-bfin-low.c (tdesc_bfin): Declare.
14175 (bfin_arch_setup): New function.
14176 (bfin_usrregs_info, regs_info): New globals.
14177 (bfin_regs_info): New function.
14178 (the_low_target): Adjust.
14179 (initialize_low_arch): New function.
14180 * linux-cris-low.c (tdesc_cris): Declare.
14181 (cris_arch_setup): New function.
14182 (cris_usrregs_info, regs_info): New globals.
14183 (cris_regs_info): New function.
14184 (the_low_target): Adjust.
14185 (initialize_low_arch): New function.
14186 * linux-cris-low.c (tdesc_crisv32): Declare.
14187 (cris_arch_setup): New function.
14188 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14189 (cris_regs_info): New function.
14190 (the_low_target): Adjust.
14191 (initialize_low_arch): New function.
14192 * linux-m32r-low.c (tdesc_m32r): Declare.
14193 (m32r_arch_setup): New function.
14194 (m32r_usrregs_info, regs_info): New globals.
14195 (m32r_regs_info): Adjust.
14196 (initialize_low_arch): New function.
14197 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14198 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14199 (tic6x_usrregs_info): Forward declare.
14200 (tic6x_read_description): New function, based on ...
14201 (tic6x_arch_setup): ... this. Reimplement.
14202 (target_regsets): Rename to ...
14203 (tic6x_regsets): ... this, and make static.
14204 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14205 (tic6x_regs_info): New function.
14206 (the_low_target): Adjust.
14207 (initialize_low_arch): New function.
14208 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14209 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14210 (target_regsets): Rename to ...
14211 (xtensa_regsets): ... this, and make static.
14212 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14213 globals.
14214 (xtensa_arch_setup, xtensa_regs_info): New functions.
14215 (the_low_target): Adjust.
14216 (initialize_low_arch): New function.
14217 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14218 (nios2_arch_setup): Set the current process'es tdesc.
14219 (target_regsets): Rename to ...
14220 (nios2_regsets): ... this.
14221 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14222 (nios2_regs_info): New function.
14223 (the_low_target): Adjust.
14224 (initialize_low_arch): New function.
a261b8f5
PA
14225 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14226 (aarch64_arch_setup): Set the current process'es tdesc.
14227 (target_regsets): Rename to ...
14228 (aarch64_regsets): ... this.
14229 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14230 (aarch64_regs_info): New function.
14231 (the_low_target): Adjust.
14232 (initialize_low_arch): New function.
3aee8918
PA
14233 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14234 globals.
14235 (target_regsets): Rename to ...
14236 (tile_regsets): ... this.
14237 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14238 (tile_regs_info): New function.
14239 (tile_arch_setup): Set the current process'es tdesc.
14240 (the_low_target): Adjust.
14241 (initialize_low_arch): New function.
14242 * spu-low.c (tdesc_spu): Declare.
14243 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14244 * win32-arm-low.c (tdesc_arm): Declare.
14245 (arm_arch_setup): New function.
14246 (the_low_target): Install arm_arch_setup instead of
14247 init_registers_arm.
14248 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14249 (init_windows_x86): Rename to ...
14250 (i386_arch_setup): ... this. Set `win32_tdesc'.
14251 (the_low_target): Adjust.
14252 * win32-low.c (win32_tdesc): New global.
14253 (child_add_thread): Don't create the thread cache here.
14254 (do_initial_child_stuff): Set the new process'es tdesc.
14255 * win32-low.h (struct target_desc): Forward declare.
14256 (win32_tdesc): Declare.
14257 * lynx-i386-low.c (tdesc_i386): Declare global.
14258 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14259 * lynx-low.c (lynx_tdesc): New global.
14260 (lynx_add_process): Set the new process'es tdesc.
14261 * lynx-low.h (struct target_desc): Forward declare.
14262 (lynx_tdesc): Declare global.
14263 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14264 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14265 * nto-low.c (nto_tdesc): New global.
14266 (do_attach): Set the new process'es tdesc.
14267 * nto-low.h (struct target_desc): Forward declare.
14268 (nto_tdesc): Declare.
14269 * nto-x86-low.c (tdesc_i386): Declare.
14270 (nto_x86_arch_setup): Set `nto_tdesc'.
14271
b1fbec62
GB
142722013-06-04 Gary Benson <gbenson@redhat.com>
14273
14274 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14275 to qSupported response when appropriate.
14276 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14277 with nonzero-length annex.
14278 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14279 arguments supplied in annex.
14280
d1ec4ce7
DE
142812013-05-31 Doug Evans <dje@google.com>
14282
ac44adcb 14283 PR server/15594
d1ec4ce7
DE
14284 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14285 64 bits in 64-cross-32 environment.
14286
9b25f2d3
PA
142872013-05-28 Pedro Alves <palves@redhat.com>
14288
14289 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14290 (aarch64-without-fpu.c): Delete rule.
14291 * configure.srv (aarch64*-*-linux*): Remove references to
14292 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14293 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14294 declaration.
14295
6740dc9c
PA
142962013-05-24 Pedro Alves <palves@redhat.com>
14297
14298 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14299 instead of strchr/decode_address. Error if the range isn't split
14300 with a ','. Don't assume there's be a ':' in the action.
14301
c2d6af84
PA
143022013-05-23 Yao Qi <yao@codesourcery.com>
14303 Pedro Alves <palves@redhat.com>
14304
14305 * linux-low.c (lwp_in_step_range): New function.
14306 (linux_wait_1): If the thread was range stepping and stopped
14307 outside the stepping range, report the stop to GDB. Otherwise,
14308 continue stepping. Add range stepping debug output.
14309 (linux_set_resume_request): Copy the step range from the resume
14310 request to the lwp.
14311 (linux_supports_range_stepping): New.
14312 (linux_target_ops) <supports_range_stepping>: Set to
14313 linux_supports_range_stepping.
14314 * linux-low.h (struct linux_target_ops)
14315 <supports_range_stepping>: New field.
14316 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14317 * linux-x86-low.c (x86_supports_range_stepping): New.
14318 (the_low_target) <supports_range_stepping>: Set to
14319 x86_supports_range_stepping.
14320 * server.c (handle_v_cont): Handle 'r' action.
14321 (handle_v_requests): Append ";r" if the target supports range
14322 stepping.
14323 * target.h (struct thread_resume) <step_range_start,
14324 step_range_end>: New fields.
14325 (struct target_ops) <supports_range_stepping>:
14326 New field.
14327 (target_supports_range_stepping): New macro.
14328
58794e1a
JB
143292013-05-17 Joel Brobecker <brobecker@adacore.com>
14330
14331 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14332 confusion in comment.
14333
d631c5a7
JB
143342013-05-17 Joel Brobecker <brobecker@adacore.com>
14335
14336 * lynx-low.c (struct process_info_private): New type.
14337 (lynx_add_process): New function.
14338 (lynx_create_inferior, lynx_attach): Replace calls to
14339 add_process by calls to lynx_add_process.
14340 (lynx_resume): If PTID is null, then try using
14341 current_process()->private->last_wait_event_ptid.
14342 Add comments.
14343 (lynx_clear_inferiors): Delete. The contents of that function
14344 has been inlined in lynx_mourn;
14345 (lynx_wait_1): Save the ptid in the process's private data.
14346 (lynx_mourn): Free the process' private data. Replace call
14347 to lynx_clear_inferiors by call to clear_inferiors.
14348
96f7a20f
YQ
143492013-05-17 Yao Qi <yao@codesourcery.com>
14350
14351 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14352 the right place.
14353
db0dfaa0
LM
143542013-05-16 Luis Machado <lgustavo@codesourcery.com>
14355
14356 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14357 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14358 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14359 PT_TEXT_END_ADDR guards. Update comments.
14360 (linux_target_op) <read_offsets>: Conditionally define to
14361 linux_read_offsets if the target is UCLIBC and if it defines
14362 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14363
68f5f838
SL
143642013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14365 Andrew Jenner <andrew@codesourcery.com>
14366
14367 * Makefile.in (SFILES): Add linux-nios2-low.c.
14368 (clean): Add action to delete nios2-linux.c.
14369 (nios2-linux.c): New rule.
14370 * configure.srv: Add nios2*-*-linux*.
14371 * linux-nios2-low.c: New.
14372
1ebff1fd
HAQ
143732013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14374
14375 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14376
f6150862
HZ
143772013-04-25 Hui Zhu <hui@codesourcery.com>
14378
14379 PR gdb/15186
f6150862
HZ
14380 * ax.c (ax_printf): Add fflush.
14381
614c279d
TT
143822013-04-22 Tom Tromey <tromey@redhat.com>
14383
14384 * Makefile.in (SFILES): Add filestuff.c.
14385 (OBS): Add filestuff.o.
14386 (filestuff.o): New target.
14387 * config.in, configure: Rebuild.
14388 * configure.ac: Check for fdwalk, pipe2.
14389
7d4e5717
PA
143902013-04-17 Pedro Alves <palves@redhat.com>
14391
14392 * configure.ac (USE_THREAD_DB): Delete variable.
14393 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14394 Don't AC_SUBST USE_THREAD_DB.
14395 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14396 * config.in, configure: Regenerate.
14397
d5c93e41
PA
143982013-04-16 Pedro Alves <palves@redhat.com>
14399
14400 * linux-low.h (struct lwp_info) <thread_known>: Move under
14401 the USE_THREAD_DB #ifdef.
14402
04f5fe89
PA
144032013-04-16 Pedro Alves <palves@redhat.com>
14404
14405 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14406 (linux-low.o): Delete rule.
14407 * linux-low.h: Always include "gdb_thread_db.h" instead of
14408 conditionally including thread_db.h.
14409 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14410 HAVE_THREAD_DB_H.
14411
480b27bf
JK
144122013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14413
14414 * Makefile.in (install-only): Fix make install regression.
14415
43662968
JK
144162013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14417
14418 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14419 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14420 installation.
14421 * gdbserver.1: Remove.
14422
3e74e146
PA
144232013-03-22 Pedro Alves <palves@redhat.com>
14424
14425 * linux-low.c (handle_extended_wait): Don't call
14426 linux_enable_event_reporting.
14427
a8347a2a
TT
144282013-03-15 Tony Theodore <tonyt@logyst.com>
14429
14430 PR build/9098:
14431 * Makefile.in (SHELL): Use @SHELL@.
14432
eeb56fa7
SDJ
144332013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14434
14435 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14436 compiler warning.
14437
4fa7e2ff
JB
144382013-03-13 Joel Brobecker <brobecker@adacore.com>
14439
14440 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14441 Remove extraneous NULL element.
14442
8ddb1965
YQ
144432013-03-13 Yao Qi <yao@codesourcery.com>
14444
14445 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14446 'V' block in trace frame.
14447
9accd112
MM
144482013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14449
14450 * target.h (struct target_ops): Add btrace ops.
14451 (target_supports_btrace): New macro.
14452 (target_enable_btrace): New macro.
14453 (target_disable_btrace): New macro.
14454 (target_read_btrace): New macro.
14455 * gdbthread.h (struct thread_info): Add btrace field.
14456 * server.c: Include btrace-common.h.
14457 (handle_btrace_general_set): New function.
14458 (handle_btrace_enable): New function.
14459 (handle_btrace_disable): New function.
14460 (handle_general_set): Call handle_btrace_general_set.
14461 (handle_qxfer_btrace): New function.
14462 (struct qxfer qxfer_packets[]): Add btrace entry.
14463 * inferiors.c (remove_thread): Disable btrace.
14464 * linux-low: Include linux-btrace.h.
14465 (linux_low_enable_btrace): New function.
14466 (linux_low_read_btrace): New function.
14467 (linux_target_ops): Add btrace ops.
14468 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14469 Add srv_linux_btrace=yes.
14470 (x86_64-*-linux*): Add linux-btrace.o.
14471 Add srv_linux_btrace=yes.
14472 * configure.ac: Define HAVE_LINUX_BTRACE.
14473 * config.in: Regenerated.
14474 * configure: Regenerated.
14475
5cc22e4c
MM
144762013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14477
14478 * server.c (handle_qxfer): Preserve error message if -3 is
14479 returned.
14480 (qxfer): Document the -3 return value.
14481
7c97f91e
MM
144822013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14483
14484 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14485 (linux_btrace_h): New variable.
14486 (linux-btrace.o): New rule.
14487
be9a119c 144882013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
14489 Hafiz Abid Qadeer <abidh@codesourcery.com>
14490
14491 * tracepoint.c (trace_buffer_size): New global.
14492 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14493 (init_trace_buffer): Change to one-argument function. Allocate
14494 trace buffer memory.
14495 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14496 handle QTBuffer:size packet.
14497 (cmd_bigqtbuffer_size): New function.
14498 (initialize_tracepoint): Call init_trace_buffer with
14499 DEFAULT_TRACE_BUFFER_SIZE.
14500 * server.c (handle_query): Add QTBuffer:size in the
14501 supported packets.
14502
e64f7499
YQ
145032013-03-07 Yao Qi <yao@codesourcery.com>
14504
14505 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14506 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14507 of -1.
14508 (cmd_qtsp): Adjust condition. Do post increment.
14509 Set cur_action and cur_step_action back to 0.
14510
f0ae6fc3
PA
145112013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14512
14513 PR server/15236
14514 * linux-low.c (linux_write_memory): Return early success if LEN is
14515 zero.
14516
b5b0b0af
CV
145172013-03-05 Corinna Vinschen <vinschen@redhat.de>
14518
334ad4a8 14519 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 14520
589bc927
TT
145212013-02-28 Tom Tromey <tromey@redhat.com>
14522
14523 * configure.ac: Invoke AC_SYS_LARGEFILE.
14524 * configure, config.in: Rebuild.
14525
dfe07582
CV
145262013-02-28 Corinna Vinschen <vinschen@redhat.com>
14527
14528 * win32-low.c: Throughout, fix format strings and casts of
14529 printf-like functions to avoid type related warnings on all
14530 platforms.
14531 (get_child_debug_event): Print dwDebugEventCode as hex since
14532 that's how it's usually documented.
14533
736cd585
YQ
145342013-02-28 Yao Qi <yao@codesourcery.com>
14535
14536 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14537 pulongest.
14538
e1f58301
JW
145392013-02-27 Jiong Wang <jiwang@tilera.com>
14540
14541 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14542 (reg-tilegx32.c): New rule.
14543 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14544 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14545 different register info initializer according to elf class.
14546 (init_registers_tilgx32): New function. The tilegx32 register info
14547 initializer.
14548 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14549 (tile_store_gregset): Likewise.
14550
d171ca78
YQ
145512013-02-27 Yao Qi <yao@codesourcery.com>
14552
14553 * server.c (process_point_options): Print debug message when
14554 debug_threads is true.
14555
282bbdf3
YQ
145562013-02-26 Yao Qi <yao@codesourcery.com>
14557
14558 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14559
aca22551
PA
145602013-02-19 Pedro Alves <palves@redhat.com>
14561 Kai Tietz <ktietz@redhat.com>
14562
14563 PR gdb/15161
14564
14565 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14566 instead of strtoul to extract address from packet.
14567 (process_serial_event) <'z'>: Likewise.
14568
4f3cee1c
YQ
145692013-02-18 Yao Qi <yao@codesourcery.com>
14570
14571 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14572
8e1d55a3
PA
145732013-02-14 Pedro Alves <palves@redhat.com>
14574
14575 Plug memory leak.
14576
14577 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14578 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14579
458820da
PA
145802013-02-14 Pedro Alves <palves@redhat.com>
14581
14582 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14583
baea0dae
PA
145842013-02-14 Pedro Alves <palves@redhat.com>
14585
14586 * tracepoint.c (save_string): Delete.
14587 (add_tracepoint_action): Use savestring instead of save_string.
14588
0b1afbb3
PA
145892013-02-12 Pedro Alves <palves@redhat.com>
14590
14591 * linux-xtensa-low.c: Ditto.
14592 * xtensa-xtregs.c: Ditto.
14593
8a4ac37e
PA
145942013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14595
14596 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14597 thread_db.
14598
148de6bb
MS
145992013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14600
14601 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14602 aarch64_num_wp_regs and aarch64_num_bp_regs to
14603 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14604
55fac6e0
MS
146052013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14606
14607 * linux-aarch64-low.c (ps_get_thread_area): Replace
14608 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14609
176eb98c
MS
146102013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14611 Marcus Shawcroft <marcus.shawcroft@arm.com>
14612 Nigel Stephens <nigel.stephens@arm.com>
14613 Yufeng Zhang <yufeng.zhang@arm.com>
14614
14615 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14616 (aarch64.c, aarch64-without-fpu.c): New targets.
14617 * configure.srv (aarch64*-*-linux*): New.
14618 * linux-aarch64-low.c: New file.
14619
56f7af9c
MS
146202013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14621
43aaf8b6 14622 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
14623 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14624 (dequeue_one_deferred_signal, linux_resume_one_thread)
14625 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14626 (linux_tracefork_grandchild, linux_test_for_tracefork)
14627 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14628 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14629 where the argument is 0.
14630
60f662b0
YQ
146312013-01-25 Yao Qi <yao@codesourcery.com>
14632
14633 * event-loop.c: Include "queue.h".
14634 (gdb_event_p): New typedef.
14635 (struct gdb_event) <next_event>: Remove.
14636 (event_queue): Change to QUEUE(gdb_event_p).
14637 (async_queue_event): Remove.
14638 (gdb_event_xfree): New.
14639 (initialize_event_loop): New.
14640 (process_event): Use API from QUEUE.
14641 (wait_for_event): Likewise.
14642 * server.c (main): Call initialize_event_loop.
14643 * server.h (initialize_event_loop): Declare.
14644
5ae4861a
YQ
146452013-01-18 Yao Qi <yao@codesourcery.com>
14646
14647 * ax.h (struct eval_agent_expr_context): New.
14648 (gdb_eval_agent_expr): Update declaration.
14649 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14650 TFRAME. Add new argument CTX.
14651 * server.h (struct eval_agent_expr_context): Declare.
14652 (agent_mem_read, agent_tsv_read): Update declaration.
14653 (agent_mem_read_string): Likewise.
14654 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14655 (add_traceframe_block): Add new argument TPOINT.
14656 Increase TPOINT->traceframe_usage.
14657 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14658 eval_tracepoint_agent_expr.
14659 (condition_true_at_tracepoint): Likewise.
14660 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14661 (agent_mem_read_string, agent_tsv_read): Likewise.
14662
85e00e85
YQ
146632013-01-16 Yao Qi <yao@codesourcery.com>
14664
14665 * linux-low.c (linux_resume_one_lwp): Don't check
14666 'lwp->bp_reinsert != 0'.
14667
4039cf45
JB
146682013-01-07 Joel Brobecker <brobecker@adacore.com>
14669 Pedro Alves <palves@redhat.com>
14670
14671 * lynx-low.c (ptrace_request_to_str): Define a temporary
14672 macro and use it to simplify this function's implementation.
14673
9044dee2
JB
146742013-01-07 Joel Brobecker <brobecker@adacore.com>
14675
14676 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14677 sets errno.
14678
e6352c8f
JB
146792013-01-07 Joel Brobecker <brobecker@adacore.com>
14680
14681 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14682
50681a27
JB
146832013-01-07 Joel Brobecker <brobecker@adacore.com>
14684
14685 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14686
3f6e77ef
JB
146872013-01-07 Joel Brobecker <brobecker@adacore.com>
14688
14689 * lynx-low.c (lynx_resume): Use the resume_info parameter
14690 to determine the ptid for the lynx_ptrace call, unless
14691 it is equal to minus_one_ptid, in which case we use the
14692 ptid of the current_inferior.
14693 (lynx_wait_1): After having received a thread create/exit
14694 event, resume the inferior's execution using the signaling
14695 thread's ptid, rather than the old ptid.
14696
7fda33ae
JB
146972013-01-07 Joel Brobecker <brobecker@adacore.com>
14698
14699 * lynx-low.c (lynx_resume): Delete variable ret.
14700
b9786c74
JB
147012013-01-01 Joel Brobecker <brobecker@adacore.com>
14702
14703 * gdbreplay.c (gdbreplay_version): Update copyright year.
14704 * server.c (gdbserver_version): Likewise.
14705
8b93d60f
JB
147062012-12-17 Joel Brobecker <brobecker@adacore.com>
14707
14708 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14709 new thread.
14710
037335a7
JB
147112012-12-17 Joel Brobecker <brobecker@adacore.com>
14712
14713 * lynx-low.c (ptrace_request_to_str): Add handling for
14714 PTRACE_GETTRACESIG.
14715
52d4cbd8
JB
147162012-12-17 Joel Brobecker <brobecker@adacore.com>
14717
14718 * lynx-low.c (lynx_attach): Delete variable new_process.
14719
ab8f6ca9
JB
147202012-12-17 Joel Brobecker <brobecker@adacore.com>
14721
14722 * lynx-low.c (lynx_create_inferior): Delete variable
14723 new_process.
14724
78cbc024
JB
147252012-12-17 Joel Brobecker <brobecker@adacore.com>
14726
14727 * lynx-low.c (ptrace_request_to_str): Do not handle
14728 PTRACE_GETTHREADLIST if this macro does not exist.
14729
14a00470
YQ
147302012-12-15 Yao Qi <yao@codesourcery.com>
14731
14732 * Makefile.in (OBS): Add notif.o.
14733 * notif.c, notif.h: New.
14734 * server.c: Include "notif.h".
14735 (struct vstop_notif) <next>: Remove.
14736 <base>: New field.
14737 (queue_stop_reply): Update.
14738 (push_event, send_next_stop_reply): Remove.
14739 (discard_queued_stop_replies): Update.
14740 (notif_stop): New variable.
14741 (handle_v_stopped): Remove.
14742 (handle_v_requests): Don't call handle_v_stopped. Call
14743 handle_ack_notif instead.
14744 (queue_stop_reply_callback): Call notif_event_enque instead
14745 of queue_stop_reply.
14746 (handle_status): Don't call send_next_stop_reply, call
14747 notif_write_event instead.
14748 (kill_inferior_callback): Likewise.
14749 (detach_or_kill_inferior_callback): Likewise.
14750 (main): Call initialize_notif.
14751 (process_serial_event): Call QUEUE_is_empty.
14752 (handle_target_event): Call notif_push instead of push event.
14753 * server.h (push_event): Remove declaration.
14754
61c125b9
TT
147552012-12-10 Tom Tromey <tromey@redhat.com>
14756
14757 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14758 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14759 macros.
14760 (.c.o): Rewrite.
14761 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14762 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14763 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14764 (amd64-linux-ipa.o, ax.o): Rewrite.
14765 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14766 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14767 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14768 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14769 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14770 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14771 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14772 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14773 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14774 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14775 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14776 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14777 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14778 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14779 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14780 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14781 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14782 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14783 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14784 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14785 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14786 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14787 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14788 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14789 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14790 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14791 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14792 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14793 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14794 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14795 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14796 (reg-tilegx.o): Remove.
14797 (all_object_files): New macro.
14798 Include .deps files.
14799 * aclocal.m4, configure: Rebuild.
14800 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14801 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14802 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14803
e90e9ad9
TT
148042012-12-05 Tom Tromey <tromey@redhat.com>
14805
14806 PR gdb/14917:
14807 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14808
02d403bf 148092012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
14810
14811 * configure.ac: Check for linux/perf_event.h.
14812 * config.in: Regenerated.
14813 * configure: Regenerated.
14814
0270a750
PA
148152012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14816
14817 * hostio.c (handle_readlink): Decrease buffer size
14818 parameter passed to readlink by one byte.
14819
8c29b58e
YQ
148202012-11-26 Yao Qi <yao@codesourcery.com>
14821
14822 * configure.ac (build_warnings): Append '-Wempty-body'.
14823 * configure: Regenerated.
14824 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14825 body.
14826
8bdce1ff
PM
148272012-11-15 Pierre Muller <muller@sourceware.org>
14828
14829 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14830 * config.in: Regenerate.
14831 * configure: Regenerate.
14832 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14833 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14834 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14835 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14836 header.
14837 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14838 instead of <sys/wait.h> header.
14839 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14840
02d403bf 148412012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
14842
14843 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14844 (various make rules): Remove -DGDBSERVER
14845
fbd5db48
YQ
148462012-11-09 Yao Qi <yao@codesourcery.com>
14847
14848 * spu-low.c (current_ptid): Move it to ..
14849 * gdbthread.h: ... here. New.
14850 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14851 * server.c (myresume, process_serial_event): Likewise.
14852 * thread-db.c (thread_db_find_new_threads): Likewise.
14853 * tracepoint.c (run_inferior_command): Likewise.
14854
b3dc46ff
AB
148552012-10-01 Andrew Burgess <aburgess@broadcom.com>
14856
14857 * server.c (handle_search_memory_1): Include access length in
14858 warning message.
14859
07c04788
HPN
148602012-09-05 Michael Brandt <michael.brandt@axis.com>
14861
14862 * linux-crisv32-low.c: Fix compile errors.
14863
918d227b
YQ
148642012-09-04 Yao Qi <yao@codesourcery.com>
14865
14866 * tracepoint.c (cmd_qtsv): Adjust debug message.
14867 Don't check CUR_TPOINT.
14868
18c1b81a
YQ
148692012-08-28 Yao Qi <yao@codesourcery.com>
14870
14871 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14872 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14873 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14874 Remove declarations of xmalloc, xreallloc, xstrdup and
14875 freeargv.
14876 * Makefile.in (libiberty_h): New.
14877 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14878 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14879
dc82f37b
YQ
148802012-08-23 Yao Qi <yao@codesourcery.com>
14881
14882 * server.h: Remove declaration of 'xsnprintf'.
14883
406b1477
KS
148842012-08-22 Keith Seitz <keiths@redhat.com>
14885
14886 * server.h: Include build-gnulib-gbserver/config.h.
14887 * gdbreplay.c: Likewise.
14888
e6712ff1
DE
148892012-08-08 Doug Evans <dje@google.com>
14890
14891 * Makefile.in (SFILES): Add gdb_vecs.c.
14892 (OBS): Add gdb_vecs.o.
14893 (gdb_vecs_h, host_defs_h): New variables.
14894 (thread-db.o): Add $(gdb_vecs_h) dependency.
14895 (gdb_vecs.o): New rule.
14896 * thread-db.c: #include "gdb_vecs.h".
14897 (thread_db_load_search): Use a vector to iterate over path elements.
14898 Handle text appearing after "$pdir".
14899
14900 * configure.ac: Add check for strstr.
14901 * config.in: Regenerate.
14902 * configure: Regenerate.
14903
7c3270ae
UW
149042012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
14905
14906 * hostio.c (handle_pread): If pread fails, fall back to attempting
14907 lseek/read.
14908 (handle_pwrite): Likewise for pwrite.
14909
b62e2b27
UW
149102012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
14911
14912 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
14913 between unsupported TYPE and unimplementable ADDR/LEN combination.
14914 (arm_insert_point): Act on new return value.
14915
78a99e91
PA
149162012-07-31 Pedro Alves <palves@redhat.com>
14917
14918 * server.c (process_point_options): Only skip tokens if we find
14919 one that is unrecognized. Don't treat 'X' specially while
14920 skipping unrecognized tokens.
14921
fcf303ab
UW
149222012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
14923
14924 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
14925 to 4-byte-align HW breakpoint addresses for Thumb.
14926
7255706c
YQ
149272012-07-27 Yao Qi <yao@codesourcery.com>
14928
14929 PR remote/14161.
14930
14931 * server.h: Declare gdb_agent_about_to_close.
14932 * target.c (kill_inferior): Include "agent.h".
14933 New. Send command 'kill'.
14934 * target.h (kill_inferior): Removed macro.
14935 * tracepoint.c (gdb_agent_about_to_close): New.
14936 (gdb_agent_helper_thread): Handle command 'close'.
14937 Wait endlessly until the inferior stops.
14938 Install gdb_agent_remove_socket to atexit hook.
14939 (agent_socket_name): New static variable.
14940 (gdb_agent_socket_init): Replace local variable 'name' with
14941 'agent_socket_name'.
14942 (gdb_agent_remove_socket): New.
14943
5a3f286f
YQ
149442012-07-27 Yao Qi <yao@codesourcery.com>
14945
14946 * server.c (process_point_options): Stop at 'X' when parsing.
14947
961bd387
ME
149482012-07-19 Michael Eager <eager@eagercon.com>
14949
a261b8f5 14950 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
14951 to hw_execute.
14952 * linux-x86-low.c (x86_insert_point, x86_remove_point):
14953 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
14954 hardware breakpoint.
14955
aa7c7447
JK
149562012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14957
14958 * gdbserver/linux-low.c (initialize_low): Call
14959 linux_ptrace_init_warnings.
14960
7f216e7c
DE
149612012-07-02 Doug Evans <dje@google.com>
14962
14963 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
14964 pointer to int.
14965
d3ce09f5
SS
149662012-07-02 Stan Shebs <stan@codesourcery.com>
14967
14968 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
14969 (ax.o): Add it to build rule.
14970 (ax-ipa.o): Ditto.
14971 (OBS): Add format.o.
14972 (IPA_OBS): Add format.o.
14973 * server.c (handle_query): Claim support for breakpoint commands.
14974 (process_point_options): Add command case.
14975 (process_serial_event): Leave running if there are printfs in
14976 effect.
14977 * mem-break.h (any_persistent_commands): Declare.
14978 (add_breakpoint_commands): Declare.
14979 (gdb_no_commands_at_breakpoint): Declare.
14980 (run_breakpoint_commands): Declare.
14981 * mem-break.c (struct point_command_list): New struct.
14982 (struct breakpoint): New field command_list.
14983 (any_persistent_commands): New function.
14984 (add_commands_to_breakpoint): New function.
14985 (add_breakpoint_commands): New function.
14986 (gdb_no_commands_at_breakpoint): New function.
14987 (run_breakpoint_commands): New function.
14988 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
14989 locally.
14990 * ax.c: Include format.h.
14991 (ax_printf): New function.
14992 (gdb_eval_agent_expr): Add printf opcode.
14993
2f8f6aed
YQ
149942012-06-13 Yao Qi <yao@codesourcery.com>
14995
14996 * server.c (start_inferior): Remove duplicated writes to fields
14997 'last_resume_kind' and 'last_status' of 'current_inferior'.
14998
0c9070b3
YQ
149992012-06-12 Yao Qi <yao@codesourcery.com>
15000 Pedro Alves <palves@redhat.com>
15001
15002 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15003 comment.
15004 * server.c (handle_v_cont): Extend comment.
15005
c52daf70
YQ
150062012-06-11 Yao Qi <yao@codesourcery.com>
15007
15008 * linux-low.c (linux_attach): Add 'static'.
15009
d38bbb0a
YQ
150102012-06-06 Yao Qi <yao@codesourcery.com>
15011
15012 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15013
89dc0afd
JK
150142012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15015
15016 Fix gcc -flto compilation warning.
15017 * server.c (main): Make variable multi_mode and attach volatile.
15018
75f62ce7
TJB
150192012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15020
15021 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15022 if the platform doesn't know about it.
15023
65f479b6
PA
150242012-05-30 Jeff Kenton <jkenton@tilera.com>
15025
15026 * Makefile.in (SFILES): Add linux-tile-low.c.
15027 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15028 * configure.srv: Handle tilegx-*-linux*.
15029 * linux-tile-low.c: New file.
15030
0c5bf5a9
JK
150312012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15032
15033 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15034
a493e3e2
PA
150352012-05-24 Pedro Alves <palves@redhat.com>
15036
15037 PR gdb/7205
15038
43aaf8b6 15039 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 15040
2ea28649
PA
150412012-05-24 Pedro Alves <palves@redhat.com>
15042
15043 PR gdb/7205
15044
15045 Replace target_signal with gdb_signal throughout.
15046
8d409d16
MR
150472012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15048
15049 * linux-low.c (linux_store_registers): Avoid the copying sequence
15050 when no data has been retrieved by ptrace.
15051
23512c01
MGD
150522012-05-22 Will Deacon <will.deacon@arm.com>
15053
15054 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15055 Include asm/ptrace.h.
15056 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15057 already defined.
15058
4934b29e
MR
150592012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15060
15061 * linux-low.c (linux_store_registers): Don't re-retrieve data
15062 with ptrace that has already been obtained from /proc. Always
15063 copy any data retrieved with ptrace to the buffer supplied.
15064
bde24c0a
PA
150652012-05-11 Yao Qi <yao@codesourcery.com>
15066 Pedro Alves <palves@redhat.com>
15067
15068 * linux-low.c (enum stopping_threads_kind): New.
15069 (stopping_threads): Change type to `enum stopping_threads_kind'.
15070 (handle_extended_wait): If stopping and suspending threads, leave
15071 the new_lwp suspended too.
15072 (linux_wait_for_event): Adjust.
15073 (stop_all_lwps): Set `stopping_threads' to
15074 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15075 whether we're suspending threads or just stopping them. Assert no
15076 recursion happens.
15077
623b6bdf
YQ
150782012-04-29 Yao Qi <yao@codesourcery.com>
15079
15080 * server.h: Move some code to ...
15081 * gdbthread.h: ... here. New.
15082 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15083 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15084 (nto-low.o, win32-low.o): Likewise.
15085 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15086 * regcache.c, remote-utils.c, server.c: Likewise.
15087 * target.c, tracepoint.c, win32-low.c: Likewise.
15088
f15f9948
TJB
150892012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15090
15091 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15092 (PTRACE_ARG4_TYPE): Likewise.
15093 (PTRACE_XFER_TYPE): Likewise.
15094 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15095 ptrace to PTRACE_ARG3_TYPE.
15096 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15097 (PTRACE_ARG4_TYPE): Likewise.
15098 (PTRACE_XFER_TYPE): Likewise.
15099 (linux_detach_one_lwp): Cast fourth argument of
15100 ptrace to long then PTRACE_ARG4_TYPE.
15101 (regsets_fetch_inferior_registers): Cast third argument of
15102 ptrace to long then PTRACE_ARG3_TYPE.
15103 (regsets_store_inferior_registers): Likewise.
15104
38ea300a
PA
151052012-04-20 Pedro Alves <palves@redhat.com>
15106
15107 * configure: Regenerate.
15108
c971b7fa
PA
151092012-04-19 Pedro Alves <palves@redhat.com>
15110
43aaf8b6 15111 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 15112 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
15113 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15114 (all, install-only, uninstall, clean-info, all-lib, clean): No
15115 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15116 (maintainer-clean realclean distclean): Use subdir_do.
15117 (subdir_do): New.
15118 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 15119 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
15120 * acinclude.m4: Include acx_configure_dir.m4.
15121 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15122 calls. Call AC_PROG_RANLIB. Configure gnulib using
15123 ACX_CONFIGURE_DIR.
15124 (GNULIB): New.
15125 (GNULIB_STDINT_H): Adjust.
15126 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15127 * gdbreplay.c: Include build-gnulib/config.h.
15128 * server.h: Likewise.
15129 * aclocal.m4: Regenerate.
15130 * config.in: Regenerate.
15131 * configure: Regenerate.
c971b7fa 15132
809277f8
PA
151332012-04-19 Pedro Alves <palves@redhat.com>
15134
15135 * Makefile.in (LIBGNU, INCGNU): Adjust.
15136 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15137 (all, install-only, uninstall, clean-info, all-lib, clean)
15138 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15139 * configure.ac: Adjust AC_OUTPUT output.
15140 * aclocal.m4: Regenerate.
15141 * configure: Regenerate.
15142
fd9bb8b8
PA
151432012-04-19 Pedro Alves <palves@redhat.com>
15144
15145 * Makefile.in (generated_files): New.
15146 (server_h): Remove the explicit dependency on config.h, and depend
15147 on $generated_files.
15148
1c298c66
PA
151492012-04-19 Pedro Alves <palves@redhat.com>
15150
15151 * Makefile.in (INCGNU): Add -Ignulib.
15152
57c4b50b
PA
151532012-04-19 Pedro Alves <palves@redhat.com>
15154
15155 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15156 (INCGNU): ... this, and spell out -I here.
15157 (GNULIB_LIB): Rename to ...
15158 (LIBGNU): ... this.
15159 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15160
1030e047
PA
151612012-04-19 Pedro Alves <palves@redhat.com>
15162
15163 * config.in: Regenerate.
15164
447d4319
PA
151652012-04-19 Pedro Alves <palves@redhat.com>
15166
15167 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15168 * server.h (memmem): Remove declaration.
15169 * config.in: Regenerate.
15170 * configure: Regenerate.
15171
aad9eab9
YQ
151722012-04-19 Yao Qi <yao@codesourcery.com>
15173
15174 * Makefile.in (SFILES): Add common/vec.c.
15175 (OBS): Add vec.o.
15176 (vec.o): New rule.
15177
3e10640f
YQ
151782012-04-19 Yao Qi <yao@codesourcery.com>
15179
15180 * remote-utils.c (prepare_resume_reply): Replace with macro
15181 target_core_of_thread.
15182 * server.c (handle_qxfer_threads_proper): Likewise.
15183 * target.h (traget_core_of_thread): New macro.
15184
71622373
PA
151852012-04-18 Pedro Alves <palves@redhat.com>
15186
15187 * aclocal.m4: Regenerate.
15188 * configure: Regenerate.
15189
80d26939
YQ
151902012-04-16 Yao Qi <yao@codesourcery.com>
15191
15192 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15193 duplicated on address.
15194
42476b70
YQ
151952012-04-16 Yao Qi <yao@codesourcery.com>
15196
15197 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15198 (struct tracepoint_action_ops) <send>: New field.
15199 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15200 (agent_expr_send, x_tracepoint_action_send): New.
15201 (l_tracepoint_action_send): New.
15202 (cmd_qtdp): Download and install tracepoint
15203 according to `use_agent'.
15204 (run_inferior_command): Add one more parameter `len'.
15205 Update callers.
15206 (tracepoint_send_agent): New.
15207 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15208
7bc83639
YQ
152092012-04-16 Yao Qi <yao@codesourcery.com>
15210
15211 * tracepoint.c (download_tracepoints): Moved to ...
15212 (cmd_qtstart): ... here.
15213
5f18041e
YQ
152142012-04-14 Yao Qi <yao@codesourcery.com>
15215
15216 * tracepoint.c: Include inttypes.h.
15217 (struct collect_memory_action): Use sized types.
15218 (struct tracepoint): Likewise.
15219 (cmd_qtdp, stop_tracing): Update print specifiers.
15220 (cmd_qtp, response_tracepoint): Likewise.
15221 (collect_data_at_tracepoint): Likewise.
15222 (collect_data_at_step): Likewise.
15223
55a8c076
YQ
152242012-04-14 Yao Qi <yao@codesourcery.com>
15225
15226 Import gnulib module inttypes.
15227 * aclocal.m4, config.in, configure: Regenerated.
15228
dc750257
YQ
152292012-04-14 Yao Qi <yao@codesourcery.com>
15230
15231 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15232 Makefile and config.status at last.
15233
0ab5faf9
YQ
152342012-04-13 Yao Qi <yao@codesourcery.com>
15235
15236 * tracepoint.c: Include stdint.h unconditionally.
15237
18f5fd81
TJB
152382012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15239
15240 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15241 on BFD_HAVE_SYS_PROCFS_TYPE.
15242 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15243 * configure: Regenerate.
15244 * config.in: Likewise.
15245
4d47af5c
L
152462012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15247
15248 * Makefile.in (clean): Also remove x32.c x32-linux.c
15249 x32-avx.c x32-avx-linux.c.
15250 (x32.o): New target.
15251 (x32.c): Likewise.
15252 (x32-linux.o): Likewise.
15253 (x32-linux.c): Likewise.
15254 (x32-avx.o): Likewise.
15255 (x32-avx.c): Likewise.
15256 (x32-avx-linux.o): Likewise.
15257 (x32-avx-linux.c): Likewise.
15258
15259 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15260 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15261 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15262 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15263 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15264 i386/x32-avx-linux.xml.
15265
15266 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15267 (init_registers_x32_avx_linux): Likwise.
15268 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15269 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15270
ecedbe58
PA
152712012-04-13 Pedro Alves <palves@redhat.com>
15272
15273 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15274 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15275 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15276 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15277 the sub-make.
15278
c92b5177
L
152792012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15280
15281 * linux-x86-low.c (compat_x32_clock_t): New.
15282 (compat_x32_siginfo_t): Likewise.
15283 (compat_x32_siginfo_from_siginfo): Likewise.
15284 (siginfo_from_compat_x32_siginfo): Likewise.
15285 (linux_is_elf64): Likewise.
15286 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15287 and siginfo_from_compat_x32_siginfo for x32.
15288 (x86_arch_setup): Set linux_is_elf64.
15289
214d508e
L
152902012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15291
15292 PR gdb/13969
15293 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15294 e_machine field.
15295 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15296 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15297 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15298 compatible with process.
15299
c9a1864a
YQ
153002012-04-12 Yao Qi <yao@codesourcery.com>
15301
15302 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15303 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15304 (install-only, install-info, clean): Handle sub dir gnulib.
15305 (all-lib, am--refresh): New targets.
15306 (memmem.o): Remove target.
15307 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15308 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15309 (AC_REPLACE_FUNCS): Remove memmem.
15310 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15311 (AC_OUTPUT): Generate Makefile in gnulib/.
15312 * aclocal.m4, config.in, configure: Regenerated.
15313
367ba2c2
MR
153142012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15315
15316 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15317
9d236627
PA
153182012-04-05 Pedro Alves <palves@redhat.com>
15319
15320 -Werror=strict-aliasing
15321
15322 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15323 pointer.
15324
111217b3
PA
153252012-04-04 Pedro Alves <palves@redhat.com>
15326
15327 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15328 (sparc_store_gregset_from_stack, sparc_store_gregset)
15329 (sparc_breakpoint_at): Fix formatting.
15330
8365dcf5
TJB
153312012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15332
15333 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15334 are available.
15335 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15336 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15337 * config.in: Regenerate.
15338 * configure: Likewise.
15339
689cc2ae
PA
153402012-03-29 Pedro Alves <palves@redhat.com>
15341
15342 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15343 Correct ptrace arguments.
15344
c14dfd32
PA
153452012-03-28 Pedro Alves <palves@redhat.com>
15346
15347 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15348 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15349 (IA64_FR1_REGNUM): New defines.
15350 (ia64_fetch_register): New.
15351 (the_low_target): Install it.
15352 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15353 field.
15354 * linux-low.c (linux_fetch_registers): Try the
15355 the_low_target.fetch_register hook first.
15356
15357 * linux-arm-low.c (the_low_target): Adjust.
15358 * linux-bfin-low.c (the_low_target): Adjust.
15359 * linux-cris-low.c (the_low_target): Adjust.
15360 * linux-crisv32-low.c (the_low_target): Adjust.
15361 * linux-m32r-low.c (the_low_target): Adjust.
15362 * linux-m68k-low.c (the_low_target): Adjust.
15363 * linux-mips-low.c (the_low_target): Adjust.
15364 * linux-ppc-low.c (the_low_target): Adjust.
15365 * linux-s390-low.c (the_low_target): Adjust.
15366 * linux-sh-low.c (the_low_target): Adjust.
15367 * linux-sparc-low.c (the_low_target): Adjust.
15368 * linux-tic6x-low.c (the_low_target): Adjust.
15369 * linux-x86-low.c (the_low_target): Adjust.
15370 * linux-xtensa-low.c (the_low_target): Adjust.
15371
63c88e13
PA
153722012-03-26 Pedro Alves <palves@redhat.com>
15373
15374 * server.c (handle_qxfer_libraries): Don't bail early if
15375 the_target->qxfer_libraries_svr4 is not NULL.
15376
fb723180
PA
153772012-03-26 Pedro Alves <palves@redhat.com>
15378
15379 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15380
0afae3cf
PA
153812012-03-23 Pedro Alves <palves@redhat.com>
15382
15383 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15384 "library-list-svr4" element's start tag when the the DSO list is
15385 empty.
15386
485f1ee4
PA
153872012-03-23 Pedro Alves <palves@redhat.com>
15388
15389 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15390 a variable whose type size is the same as the inferior's pointer
15391 size.
15392
a5362b9a
TS
153932012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15394
15395 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15396 struct siginfo.
15397 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15398 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15399 * linux-low.h: Include <signal.h>.
15400 (struct siginfo): Remove forward declaration.
15401 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15402 struct siginfo.
15403
d226c142
MF
154042012-03-21 Mike Frysinger <vapier@gentoo.org>
15405
15406 * .gitignore: Ignore more files.
15407
122f36ef
PA
154082012-03-19 Pedro Alves <palves@redhat.com>
15409 Jan Kratochvil <jan.kratochvil@redhat.com>
15410
15411 * server.c (cont_thread, general_thread): Add describing comments.
15412 (start_inferior): Clear `cont_thread'.
15413 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15414 of a process.
15415
fc3e5175
YQ
154162012-03-15 Yao Qi <yao@codesourcery.com>
15417
15418 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15419 handling to ...
15420 (cmd_qtdp): ... here.
15421
8d0d92cd
YQ
154222012-03-15 Yao Qi <yao@codesourcery.com>
15423
15424 * tracepoint.c (struct tracepoint_action_ops): New.
15425 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15426 (m_tracepoint_action_download): New.
15427 (r_tracepoint_action_download): New.
15428 (x_tracepoint_action_download): New.
15429 (l_tracepoint_action_download): New.
15430 (add_tracepoint_action): Install `action->ops' according type.
15431 (download_tracepoint_1): Move code `download' function pointer
15432 of various tracepoint_action_ops.
15433
87b0bb13
JK
154342012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15435
15436 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15437 linux_ptrace_attach_warnings.
15438
5f572dec
JK
154392012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15440
15441 * Makefile.in (linux-ptrace.o): New.
15442 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15443 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15444 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15445 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15446 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15447 of these targets.
15448 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15449
f4647387
YQ
154502012-03-08 Yao Qi <yao@codesourcery.com>
15451 Pedro Alves <palves@redhat.com>
15452
15453 Fix PR server/13392.
15454 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15455 offset of JMP insn.
15456 * tracepoint.c (remove_tracepoint): New.
15457 (cmd_qtdp): Call remove_tracepoint when failed to install.
15458
9b224c5e
PA
154592012-03-07 Pedro Alves <palves@redhat.com>
15460
15461 * linux-low.c (get_detach_signal): New.
15462 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15463 Pass on pending signals to PTRACE_DETACH. Check the result of the
15464 ptrace call.
15465 * server.c (program_signals, program_signals_p): New.
15466 (handle_general_set): Handle QProgramSignals.
15467 * server.h (program_signals, program_signals_p): Declare.
15468
e237a7e2
JK
154692012-03-05 Pedro Alves <palves@redhat.com>
15470 Jan Kratochvil <jan.kratochvil@redhat.com>
15471
15472 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15473 New comment why.
15474
5808517f
YQ
154752012-03-03 Yao Qi <yao@codesourcery.com>
15476
15477 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15478 agent_look_up_symbols.
15479
58b4daa5
YQ
154802012-03-03 Yao Qi <yao@codesourcery.com>
15481
15482 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15483 (linux-x86-low.o): Likewise.
15484 * server.h: Remove in_process_agent_loaded.
15485 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15486 common/agent.c.
15487 Update callers.
15488
8ffcbaaf
YQ
154892012-03-03 Yao Qi <yao@codesourcery.com>
15490
15491 * tracepoint.c (gdb_agent_capability): New global.
15492 (in_process_agent_loaded_ust): Renamed to
15493 `in_process_agent_supports_ust'.
15494 Update callers.
15495 (in_process_agent_supports_ust): Call agent_capability_check.
15496 (clear_installed_tracepoints): Assert that agent supports
15497 agent.
15498
d1feda86
YQ
154992012-03-03 Yao Qi <yao@codesourcery.com>
15500
15501 * linux-low.c (linux_supports_agent): New.
15502 (linux_target_ops): Initialize field `supports_agent' with
15503 linux_supports_agent.
15504 * target.h (struct target_ops) <supports_agent>: New.
15505 (target_supports_agent): New macro.
15506 * server.c (handle_general_set): Handle packet 'QAgent'.
15507 (handle_query): Send `QAgent+'.
15508 * Makefile.in (server.o): Depends on agent.h.
15509
2fa291ac
YQ
155102012-03-03 Yao Qi <yao@codesourcery.com>
15511
15512 * Makefile.in (OBS): Add agent.o.
15513 Add new rule for agent.o.
15514 Track dependence of tracepoint.c on agent.h.
15515 * tracepoint.c (run_inferior_command_1):
15516 (run_inferior_command): Call agent_run_command.
15517 (gdb_ust_connect_sync_socket): Deleted. Move it to
15518 common/agent.c.
15519 (resume_thread, stop_thread): Likewise.
15520 (gdb_ust_socket_init): Renamed to ...
15521 (gdb_agent_socket_init): ... New.
15522 (gdb_ust_thread): Renamed to ...
15523 (gdb_agent_helper_thread): ... New.
15524 (gdb_ust_init): Move some code to ...
15525 (gdb_agent_init): ... here. New.
15526 [HAVE_UST]: Call gdb_ust_init.
15527 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15528 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15529 * config.in, configure: Regenerated.
15530
05044653
PA
155312012-03-02 Pedro Alves <palves@redhat.com>
15532
15533 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15534 * linux-low.c (struct simple_pid_list): New.
15535 (stopped_pids): New a struct simple_pid_list pointer.
15536 (add_to_pid_list, pull_pid_from_list): New.
15537 (handle_extended_wait): Don't assume the first signal new children
15538 report is SIGSTOP. Adjust call to pull_pid_from_list.
15539 (linux_wait_for_lwp): Adjust.
15540
8d00225b
YQ
155412012-03-02 Yao Qi <yao@codesourcery.com>
15542
15543 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15544 debug log.
15545
19560ba5
YQ
155462012-03-02 Yao Qi <yao@codesourcery.com>
15547
15548 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15549 `stop_pc' and `tpoint'. Update caller.
15550
1faeff08
MR
155512012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15552
15553 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15554 * linux-low.c (use_linux_regsets): New macro.
15555 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15556 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15557 (linux_register_in_regsets): New function.
15558 (usr_fetch_inferior_registers): Skip registers covered by
15559 regsets.
15560 (usr_store_inferior_registers): Likewise.
15561 (usr_fetch_inferior_registers): New macro.
15562 (usr_store_inferior_registers): Likewise.
15563 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15564 (linux_store_registers): Likewise.
15565 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15566 prototype.
15567 (init_registers_mips64_dsp_linux): Likewise.
15568 (init_registers_mips_linux): New macro.
15569 (init_registers_mips_dsp_linux): Likewise.
15570 (mips_dsp_num_regs): Likewise.
15571 (DSP_BASE, DSP_CONTROL): New fallback macros.
15572 (mips_base_regs): New macro.
15573 (mips_regmap): Use it. Fix the size.
15574 (mips_dsp_regmap): New variable.
15575 (mips_dsp_regset_bitmap): Likewise.
15576 (mips_arch_setup): New function.
15577 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15578 than mips_regmap.
15579 (mips_cannot_store_register): Likewise.
15580 (the_low_target): Update .arch_setup, .num_regs and .regmap
15581 initializers. Add .regset_bitmap initializer.
15582 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15583 initializer.
15584 * linux-bfin-low.c (the_low_target): Likewise.
15585 * linux-cris-low.c (the_low_target): Likewise.
15586 * linux-crisv32-low.c (the_low_target): Likewise.
15587 * linux-ia64-low.c (the_low_target): Likewise.
15588 * linux-m32r-low.c (the_low_target): Likewise.
15589 * linux-m68k-low.c (the_low_target): Likewise.
15590 * linux-ppc-low.c (the_low_target): Likewise.
15591 * linux-s390-low.c (the_low_target): Likewise.
15592 * linux-sh-low.c (the_low_target): Likewise.
15593 * linux-sparc-low.c (the_low_target): Likewise.
15594 * linux-tic6x-low.c (the_low_target): Likewise.
15595 * linux-x86-low.c (the_low_target): Likewise.
15596 * linux-xtensa-low.c (the_low_target): Likewise.
15597 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15598 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15599 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15600 srv_xmlfiles.
15601 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15602 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15603
c03e6ccc
YQ
156042012-02-29 Yao Qi <yao@codesourcery.com>
15605 Pedro Alves <palves@redhat.com>
15606
15607 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15608 `step_over_finished' is true.
15609
644cebc9
PA
156102012-02-27 Pedro Alves <palves@redhat.com>
15611
15612 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15613 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15614
c14d7ab2
PA
156152012-02-27 Pedro Alves <palves@redhat.com>
15616
15617 PR server/9684
15618 * linux-low.c (pid_is_stopped): New.
15619 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15620
412c89dd
LM
156212012-02-25 Luis Machado <lgustavo@codesourcery.com>
15622
15623 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15624 of conditions.
15625
b745defe
MR
156262012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15627
15628 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15629
9f3a5c85
LM
156302012-02-24 Luis Machado <lgustavo@codesourcery>
15631
15632 * server.c (handle_query): Advertise support for target-side
15633 breakpoint condition evaluation.
15634 (process_point_options): New function.
15635 (process_serial_event): When inserting a breakpoint, check for
15636 a target-side condition that should be evaluated.
15637
15638 * mem-break.c: Include regcache.h and ax.h.
15639 (point_cond_list_t): New data structure.
15640 (breakpoint) <cond_list>: New field.
15641 (find_gdb_breakpoint_at): Make non-static.
15642 (delete_gdb_breakpoint_at): Clear any target-side
15643 conditions.
15644 (clear_gdb_breakpoint_conditions): New function.
15645 (add_condition_to_breakpoint): Likewise.
15646 (add_breakpoint_condition): Likewise.
15647 (gdb_condition_true_at_breakpoint): Likewise.
15648 (gdb_breakpoint_here): Return result directly instead
15649 of going through a local variable.
15650
15651 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15652 (clear_gdb_breakpoint_conditions): Likewise.
15653 (add_breakpoint_condition): Likewise.
15654 (gdb_condition_true_at_breakpoint): Likewise.
15655
15656 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15657 (need_step_over_p): Take target-side breakpoint condition into
15658 consideration.
15659
5e1dc496
LM
156602012-02-24 Luis Machado <lgustavo@codesourcery>
15661
15662 * server.h: Include tracepoint.h.
15663 (agent_mem_read, agent_get_trace_state_variable_value,
15664 agent_set_trace_state_variable_value,
15665 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15666 get_set_tsv_func_addr): New prototypes.
15667
15668 * ax.h: New include file.
15669 * ax.c: New source file.
15670
15671 * tracepoint.c: Include ax.h.
15672 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15673 agent_expr, eval_result_type): Move to ax.h.
15674 (parse_agent_expr): Rename to ...
15675 (gdb_parse_agent_expr): ... this, make it non-static and move
15676 to ax.h.
15677 (unparse_agent_expr) Rename to ...
15678 (gdb_unparse_agent_expr): ... this, make it non-static and move
15679 to ax.h.
15680 (eval_agent_expr): Rename to ...
15681 (eval_tracepoint_agent_expr): ... this.
15682 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15683 forward declarations.
15684 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15685 (agent_get_trace_state_variable_value): New function.
15686 (agent_set_trace_state_variable_value): New function.
15687 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15688 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15689 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15690 (condition_true_at_tracepoint): Likewise.
15691 (parse_agent_expr): Rename to ...
15692 (gdb_parse_agent_expr): ... this and move to ax.c.
15693 (unparse_agent_expr): Rename to ...
15694 (gdb_unparse_agent_expr): ... this and move to ax.c.
15695 (gdb_agent_op_name): Move to ax.c.
15696 (eval_agent_expr): Rename to ...
15697 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15698 and move to ax.c.
15699 (eval_tracepoint_agent_expr): New function.
15700 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 15701 non-static.
5e1dc496
LM
15702 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15703 ax.c.
15704 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15705 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15706 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15707 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15708 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15709 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15710 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15711 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15712 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15713 (compile_bytecodes): Remove forward declaration.
15714 (is_goto_target): Move to ax.c.
15715 (compile_bytecodes): Move to ax.c and call
15716 agent_get_trace_state_variable_value (...) and
15717 agent_set_trace_state_variable_value (...).
15718
15719 * Makefile.in: Update ax.c and IPA dependencies.
15720
277e4e52
PA
157212012-02-24 Pedro Alves <palves@redhat.com>
15722
15723 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15724 (cmd_bigqtbuffer_circular): ... this. Only handle
15725 'QTBuffer:circular:'.
15726 (handle_tracepoint_general_set): Adjust.
15727
bf4c19f7
YQ
157282012-02-16 Yao Qi <yao@codesourcery.com>
15729
15730 * inferiors.c: Move code to ...
15731 * dll.c: .... here. New.
15732 * server.h: Declare clear_dlls.
15733 * Makefile.in (SFILES): Add dll.c.
15734 (OBS): Add dll.o
15735 (dll.o): New rule.
15736
d73f2619
YQ
157372012-02-11 Yao Qi <yao@codesourcery.com>
15738
15739 * server.c: (handle_monitor_command): Add a new parameter
15740 `own_buf'.
15741 (handle_query): Update caller.
15742
f8255c2a
JB
157432012-02-09 Joel Brobecker <brobecker@adacore.com>
15744
15745 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15746 * configure, config.in: Regenerate.
15747 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15748 is not defined.
15749
da84f473
PA
157502012-02-02 Pedro Alves <palves@redhat.com>
15751
15752 Try SIGKILL first, then PTRACE_KILL.
15753 * linux-low.c (linux_kill_one_lwp): New.
15754 (linux_kill_one_lwp): Rename to ...
15755 (kill_one_lwp_callback): ... this. Use the new
15756 linux_kill_one_lwp.
15757
e886a173
PA
157582012-02-02 Pedro Alves <palves@redhat.com>
15759
15760 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15761 inferior.
15762
be07f1a2
PA
157632012-01-27 Pedro Alves <palves@redhat.com>
15764
15765 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15766 (elf_64_file_p): Make static.
15767 (linux_pid_exe_is_elf_64_file): New.
15768 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15769 Delete declarations.
15770 (linux_pid_exe_is_elf_64_file): Declare.
15771 * linux-x86-low.c (x86_arch_setup): Use
15772 linux_pid_exe_is_elf_64_file.
15773
d8301ad1
JK
157742012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15775
15776 * linux-low.c (linux_wait_for_event_1): Rename to ...
15777 (linux_wait_for_event): ... here and merge it with former
15778 linux_wait_for_event - new variable wait_ptid, use it.
15779 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15780
01b17894
PA
157812012-01-23 Pedro Alves <palves@redhat.com>
15782
15783 * server.c (main): Avoid yet another case of infinite loop while
15784 detaching/killing after a longjmp.
15785
e825046f
JK
157862012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15787
15788 Code cleanup.
15789 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15790
b9e7b9c3
UW
157912012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15792
15793 * hostio.c (handle_readlink): New function.
15794 (handle_vFile): Call it to handle "vFile:readlink" packets.
15795
901f9912
UW
157962012-01-20 Pedro Alves <palves@redhat.com>
15797 Ulrich Weigand <ulrich.weigand@linaro.org>
15798
15799 * server.c (handle_v_requests): Only support vAttach and vRun to
15800 start multiple processes when in extended protocol mode.
15801
fc1ab1a0
PA
158022012-01-17 Pedro Alves <palves@redhat.com>
15803
15804 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15805 memalign plus mprotect to allocate the scratch buffer.
15806
7d5d4e98
PA
158072012-01-13 Pedro Alves <palves@redhat.com>
15808
15809 * server.c (attach_inferior): Clear `cont_thread'.
15810
f128d5e9
PA
158112012-01-13 Pedro Alves <palves@redhat.com>
15812
15813 * server.c (main): Avoid infinite loop while detaching/killing
15814 after a longjmp.
15815
06db92f0
DE
158162012-01-09 Doug Evans <dje@google.com>
15817
15818 * server.c (start_inferior): Set last_ptid in --wrapper case.
15819
32d92999
YQ
158202012-01-06 Yao Qi <yao@codesourcery.com>
15821
15822 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15823 defined.
15824 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15825
5e0a92a9
YQ
158262012-01-04 Yao Qi <yao@codesourcery.com>
15827
15828 * tracepoint.c (cmd_qtdp): Print debug message
15829 for static tracepoint.
15830
ae639e8c
YQ
158312012-01-04 Yao Qi <yao@codesourcery.com>
15832
15833 * tracepoint.c (trace_vdebug): Differentiate debug message
15834 between gdbserver and IPA.
15835
f72429c5
YQ
158362012-01-03 Yao Qi <yao@codesourcery.com>
15837
15838 * tracepoint.c (tracepoint_was_hit): Don't collect for
15839 static tracepoint.
15840
12c3e59c
JB
158412012-01-02 Joel Brobecker <brobecker@adacore.com>
15842
15843 * terminal.h: Reformat copyright header.
15844
67827812
JB
158452012-01-02 Joel Brobecker <brobecker@adacore.com>
15846
15847 * server.c (gdbserver_version): Update copyright year.
15848 * gdbreplay.c (gdbreplay_version): Likewise.
15849
3e52c33d
JK
158502011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15851
15852 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15853
15854 Revert:
15855 2011-12-18 Hui Zhu <teawater@gmail.com>
15856 * linux-low.c (linux_create_inferior): Save return value to ret.
15857
66f1260e
HZ
158582011-12-18 Hui Zhu <teawater@gmail.com>
15859
15860 * linux-low.c (linux_create_inferior): Save return value to ret.
15861
e77616d7
DE
158622011-12-16 Doug Evans <dje@google.com>
15863
e7b06c57
DE
15864 * linux-low.c (linux_create_inferior): If stdio connection,
15865 redirect stdin from /dev/null, stdout to stderr.
15866 * remote-utils.c (remote_is_stdio): New static global.
15867 (remote_connection_is_stdio): New function.
15868 (remote_prepare): Handle stdio connection.
15869 (remote_open): Ditto.
15870 (remote_close): Don't close stdin for stdio connections.
15871 (read_prim,write_prim): New functions. Replace all calls to
15872 read/write to these.
15873 * server.c (main): Watch for "-" argument. Move call to
15874 remote_prepare before start_inferior.
15875 * server.h (STDIO_CONNECTION_NAME): New macro.
15876 (remote_connection_is_stdio): Declare.
15877
e77616d7
DE
15878 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15879 in debugging output.
15880
82067193
YQ
158812011-12-15 Yao Qi <yao@codesourcery.com>
15882
15883 * tracepoint.c: Include sys/syscall.h.
15884 (gdb_ust_thread): Remove preprocessor conditional.
15885
82bfbe7e
PA
158862011-12-14 Pedro Alves <pedro@codesourcery.com>
15887
15888 * linux-low.c (linux_detach_one_lwp): Call
15889 the_low_target.prepare_to_resume before detaching.
15890
712c6575
YQ
158912011-12-14 Yao Qi <yao@codesourcery.com>
15892
15893 * tracepoint.c (gdb_ust_thread): Don't ignore return value
15894 of write.
15895
d54d1edf
YQ
158962011-12-14 Yao Qi <yao@codesourcery.com>
15897
15898 * i386-low.c (i386_low_stopped_data_address): Initialize local
15899 variable `control'.
15900
6210a125
PA
159012011-12-13 Pedro Alves <pedro@codesourcery.com>
15902
15903 PR remote/13492
15904
15905 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
15906 DR_CONTROL unless necessary. Extend comments.
15907 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
15908 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
15909
2ece8244
YQ
159102011-12-13 Yao Qi <yao@codesourcery.com>
15911
15912 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
15913 macros.
15914 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
15915
784867a5
JK
159162011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
15917
15918 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
15919 Print new debug message for such case.
15920
6bf36717
JK
159212011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
15922
15923 Fix overlapping memcpy.
15924 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
15925 the read_inferior_memory transfer.
15926 (delete_fast_tracepoint_jump): New variable buf. Use it for the
15927 write_inferior_memory transfer.
15928 (set_fast_tracepoint_jump): New variable buf. Use it for the
15929 read_inferior_memory and write_inferior_memory transfers.
15930 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
15931 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
15932 Use it for the write_inferior_memory transfer.
15933 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
15934 buffers.
15935
50275556
MR
159362011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15937
15938 * linux-low.c (fetch_register, store_register): Make code
15939 consistent, fix formatting.
15940
7325beb4
MR
159412011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
15942
15943 * linux-low.c (usr_store_inferior_registers): Factor out code
15944 to handle individual registers into...
15945 (store_register): ... this new function.
15946
c642a434
UW
159472011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
15948
15949 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
15950 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
15951 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
15952 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
15953 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
15954 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
15955 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
15956 (srv_xmlfiles): Add new XML files.
15957
15958 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
15959 and <sys/uio.h>.
15960 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
15961 (init_registers_s390_linux32v1): Add prototype.
15962 (init_registers_s390_linux32v2): Likewise.
15963 (init_registers_s390_linux64v1): Likewise.
15964 (init_registers_s390_linux64v2): Likewise.
15965 (init_registers_s390x_linux64v1): Likewise.
15966 (init_registers_s390x_linux64v2): Likewise.
15967 (s390_num_regs): Increment to 52.
15968 (s390_regmap): Add orig_r2 register.
15969 (s390_num_regs_3264): Increment to 68.
15970 (s390_regmap_3264): Add orig_r2 register.
15971 (s390_collect_ptrace_register): Handle orig_r2 register.
15972 (s390_supply_ptrace_register): Likewise.
15973 (s390_fill_last_break): New function.
15974 (s390_store_last_break): Likewise.
15975 (s390_fill_system_call): New function.
15976 (s390_store_system_call): Likewise.
15977 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
15978 register sets.
15979 (s390_check_regset): New function.
15980 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
15981 NT_S390_SYSTEM_CALL regsets and use appropriate description.
15982 Update target_regsets for available register sets.
15983
2268b414
JK
159842011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
15985 Jan Kratochvil <jan.kratochvil@redhat.com>
15986
15987 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
15988 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
15989 New.
15990 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
15991 * linux-low.h (struct process_info_private): New member r_debug.
15992 * server.c (handle_qxfer_libraries): Call
15993 the_target->qxfer_libraries_svr4.
15994 (handle_qxfer_libraries_svr4): New function.
15995 (qxfer_packets): New entry "libraries-svr4".
15996 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
15997 * target.h (struct target_ops): New member qxfer_libraries_svr4.
15998 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
15999 PACKET_qXfer_libraries_svr4.
16000
d6db1fab
UW
160012011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16002
16003 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16004 PSW address/mask between 8-byte and 16-byte formats.
16005 (s390_supply_ptrace_register): Likewise.
16006 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16007 basic addressing mode bit.
16008
242f5f1c
SS
160092011-11-24 Stan Shebs <stan@codesourcery.com>
16010
16011 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16012
f196051f
SS
160132011-11-17 Stan Shebs <stan@codesourcery.com>
16014
16015 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16016 (tracing_start_time): New global.
16017 (tracing_stop_time): New global.
16018 (tracing_user_name): New global.
16019 (tracing_notes): New global.
16020 (tracing_stop_note): New global.
16021 (cmd_qtstart): Set traceframe_usage, start_time.
16022 (stop_tracing): Set stop_time.
16023 (cmd_qtstatus): Report additional status.
16024 (cmd_qtp): New function.
16025 (handle_tracepoint_query): Call it.
16026 (cmd_qtnotes): New function.
16027 (handle_tracepoint_general_set): Call it.
16028 (get_timestamp): Rename from tsv_get_timestamp.
16029
405f8e94
SS
160302011-11-14 Stan Shebs <stan@codesourcery.com>
16031 Kwok Cheung Yeung <kcy@codesourcery.com>
16032
16033 * linux-x86-low.c (small_jump_insn): New.
16034 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16035 trampoline and error message, build a trampoline and issue a small
16036 jump instruction to it.
16037 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16038 trampoline and error message.
16039 (x86_get_min_fast_tracepoint_insn_len): New.
16040 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16041 * linux-low.h (struct linux_target_ops): Add arguments to
16042 install_fast_tracepoint_jump_pad operation, add new operation.
16043 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16044 arguments.
16045 (linux_get_min_fast_tracepoint_insn_len): New function.
16046 (linux_target_op): Add new operation.
16047 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16048 (gdb_trampoline_buffer_end): Ditto.
16049 (gdb_trampoline_buffer_error): Ditto.
16050 (struct ipa_sym_addresses): Add fields for new IPA variables.
16051 (symbol_list): Add entries for new IPA variables.
16052 (struct tracepoint): Add fields to hold the address range of the
16053 trampoline used by the tracepoint.
16054 (trampoline_buffer_head): New static variable.
16055 (trampoline_buffer_tail): Ditto.
16056 (claim_trampoline_space): New function.
16057 (have_fast_tracepoint_trampoline_buffer): New function.
16058 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16059 structure.
16060 (install_fast_tracepoint): Ditto, also add error buffer argument.
16061 (cmd_qtminftpilen): New function.
16062 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16063 (fast_tracepoint_from_trampoline_address): New function.
16064 (fast_tracepoint_collecting): Handle trampoline as part of jump
16065 pad space.
16066 (set_trampoline_buffer_space): New function.
16067 (initialize_tracepoint): Initialize new IPA variables.
16068 * target.h (struct target_ops): Add arguments to
16069 install_fast_tracepoint_jump_pad operation, add new
16070 get_min_fast_tracepoint_insn_len operation.
16071 (target_get_min_fast_tracepoint_insn_len): New.
16072 (install_fast_tracepoint_jump_pad): Add arguments.
16073 * server.h (IPA_BUFSIZ): Define.
16074 * linux-i386-ipa.c: Include extra header files.
16075 (initialize_fast_tracepoint_trampoline_buffer): New function.
16076 (initialize_low_tracepoint): Call it.
16077 * server.h (set_trampoline_buffer_space): Declare.
16078 (claim_trampoline_space): Ditto.
16079 (have_fast_tracepoint_trampoline_buffer): Ditto.
16080
1e4d1764
YQ
160812011-11-14 Yao Qi <yao@codesourcery.com>
16082
16083 * server.c (handle_query): Handle InstallInTrace for qSupported.
16084 * tracepoint.c (add_tracepoint): Sort list.
16085 (install_tracepoint, download_tracepoint): New.
16086 (cmd_qtdp): Call them to install and download tracepoints.
16087 (sort_tracepoints): Removed.
16088 (cmd_qtstart): Update.
16089
5c73ff4e
YQ
160902011-11-14 Yao Qi <yao@codesourcery.com>
16091
16092 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16093 * mem-break.h: Declare.
16094 * tracepoint.c (cmd_qtstart): Move some code to ...
16095 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16096 New.
16097 (download_tracepoints): Move some code to ...
16098 (download_tracepoint_1): ... here. New.
16099
86a30030
YQ
161002011-11-08 Yao Qi <yao@codesourcery.com>
16101
16102 * remote-utils.c (relocate_instruction): A comment fix.
16103
8d26e50c
JB
161042011-11-07 Joel Brobecker <brobecker@adacore.com>
16105
16106 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16107 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16108 dr_status_mirror and dr_control_mirror from debug_reg_state.
16109 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16110 (i386_initial_stuff): Remove use of deleted globals.
16111 (i386_get_thread_context, i386_set_thread_context,
16112 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16113 from debug_reg_state.
16114
a59306a3
YQ
161152011-11-05 Yao Qi <yao@codesourcery.com>
16116
16117 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16118 address as TPOINT's.
16119
3065dfb6
SS
161202011-11-02 Stan Shebs <stan@codesourcery.com>
16121
16122 * tracepoint.c (agent_mem_read_string): New function.
16123 (eval_agent_expr): Call it for tracenz.
16124 * server.c (handle_query): Report support for tracenz.
16125
fd0d8c7c
YQ
161262011-11-02 Yao Qi <yao@codesourcery.com>
16127
16128 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16129
609086b1
YQ
161302011-11-02 Yao Qi <yao@codesourcery.com>
16131
16132 * target.h: Fix a typo in comment.
16133
b9fd1791
PA
161342011-10-31 Pedro Alves <pedro@codesourcery.com>
16135
16136 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16137 clobber the breakpoints' shadows with fast tracepoint jumps.
16138 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16139 * target.c (write_inferior_memory): Also pass MYADDR down to
16140 check_mem_write.
16141
03583c20
UW
161422011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16143
16144 * configure.ac: Check support for personality routine.
16145 * configure: Regenerate.
16146 * config.in: Likewise.
16147 * linux-low.c: Include <sys/personality.h>.
16148 Define ADDR_NO_RANDOMIZE if necessary.
16149 (linux_create_inferior): Disable address space randomization when
16150 forking inferior, if requested.
16151 (linux_supports_disable_randomization): New function.
16152 (linux_target_ops): Install it.
16153 * server.h (disable_randomization): Declare.
16154 * server.c (disable_randomization): New global variable.
16155 (handle_general_set): Handle QDisableRandomization.
16156 (handle_query): Likewise for qSupported.
16157 (main): Support --disable-randomization and --no-disable-randomization
16158 command line arguments.
16159 * target.h (struct target_ops): Add supports_disable_randomization.
16160 (target_supports_disable_randomization): New macro.
16161
723b724b
MF
161622011-09-29 Mike Frysinger <vapier@gentoo.org>
16163
16164 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16165 ifdef check.
16166 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16167 [!PT_GETDSBT] (target_loadmap): New definition.
16168 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16169 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16170 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16171 and PT_GETDSBT to LINUX_LOADMAP.
16172 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16173 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16174
55329a5c 161752011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
16176
16177 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16178 (arm_linux_hwbp_cap): New static variable.
16179 (arm_linux_get_hwbp_cap): Replace by ...
16180 (arm_linux_init_hwbp_cap): ... this new function.
16181 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16182 (arm_linux_get_hw_watchpoint_count): Likewise.
16183 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16184 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16185 (arm_prepare_to_resume): Use perror_with_name instead of error.
16186
55329a5c 161872011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
16188
16189 * linux-arm-low.c: Include <signal.h>.
16190 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16191 (struct arm_linux_hwbp_cap): New data type.
16192 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16193 (struct arm_linux_hw_breakpoint): New data type.
16194 (MAX_BPTS, MAX_WPTS): Define.
16195 (struct arch_process_info, struct arch_lwp_info): New data types.
16196 (arm_linux_get_hwbp_cap): New function.
16197 (arm_linux_get_hw_breakpoint_count): Likewise.
16198 (arm_linux_get_hw_watchpoint_count): Likewise.
16199 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16200 (arm_hwbp_control_initialize): Likewise.
16201 (arm_hwbp_control_is_enabled): Likewise.
16202 (arm_hwbp_control_is_initialized): Likewise.
16203 (arm_hwbp_control_disable): Likewise.
16204 (arm_linux_hw_breakpoint_equal): Likewise.
16205 (arm_linux_hw_point_initialize): Likewise.
16206 (struct update_registers_data): New data structure.
16207 (update_registers_callback: New function.
16208 (arm_insert_point): Likewise.
16209 (arm_remove_point): Likewise.
16210 (arm_stopped_by_watchpoint): Likewise.
16211 (arm_stopped_data_address): Likewise.
16212 (arm_new_process): Likewise.
16213 (arm_new_thread): Likewise.
16214 (arm_prepare_to_resume): Likewise.
16215 (the_low_target): Register arm_insert_point, arm_remove_point,
16216 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16217 arm_new_thread, and arm_prepare_to_resume.
16218
6b9801d4
SS
162192011-09-15 Stan Shebs <stan@codesourcery.com>
16220
16221 * server.h (struct emit_ops): Add compare-goto fields.
16222 * tracepoint.c (gdb_agent_op_sizes): New table.
16223 (emit_eq_goto): New function.
16224 (emit_ne_goto): New function.
16225 (emit_lt_goto): New function.
16226 (emit_le_goto): New function.
16227 (emit_gt_goto): New function.
16228 (emit_ge_goto): New function.
16229 (is_goto_target): New function.
16230 (compile_bytecodes): Recognize special cases of compare-goto
16231 combinations and call specialized emitters for them.
16232 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16233 (amd64_emit_ne_goto): New function.
16234 (amd64_emit_lt_goto): New function.
16235 (amd64_emit_le_goto): New function.
16236 (amd64_emit_gt_goto): New function.
16237 (amd64_emit_ge_goto): New function.
16238 (amd64_emit_ops): Add the new functions.
16239 (i386_emit_eq_goto): New function.
16240 (i386_emit_ne_goto): New function.
16241 (i386_emit_lt_goto): New function.
16242 (i386_emit_le_goto): New function.
16243 (i386_emit_gt_goto): New function.
16244 (i386_emit_ge_goto): New function.
16245 (i386_emit_ops): Add the new functions.
16246
bf15cbda
SS
162472011-09-08 Stan Shebs <stan@codesourcery.com>
16248
16249 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16250 (i386_emit_epilogue): Restore %ebx.
16251
943ca1dd
JZ
162522011-08-31 Jie Zhang <jzhang918@gmail.com>
16253
16254 * server.c (step_thread): Remove definition.
16255 (process_serial_event): Don't handle Hs.
16256 * server.h (step_thread): Remove declaration.
16257 * target.c (set_desired_inferior): Remove use of step_thread.
16258
e3deef73
LM
162592011-08-24 Luis Machado <lgustavo@codesourcery.com>
16260
16261 * linux-low.c: Include linux-procfs.h.
16262 (linux_attach_lwp_1): Update comments.
16263 (linux_attach): Scan for existing threads when attaching to a
16264 process that is the tgid.
16265 * Makefile.in: Update dependencies.
16266
13da1c97
LM
162672011-08-24 Luis Machado <lgustavo@codesourcery.com>
16268
16269 * configure.srv: Add linux-procfs.o dependencies.
16270
881127c9
YQ
162712011-08-14 Yao Qi <yao@codesourcery.com>
16272
16273 * target.h (struct target_ops): Fix indent.
16274 * win32-low.c (win32_target_ops): Fix comment.
16275
58dbd541
YQ
162762011-08-14 Andrew Jenner <andrew@codesourcery.com>
16277 Yao Qi <yao@codesourcery.com>
16278
16279 * Makefile.in (clean): Remove tic6x-*.c files.
16280 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16281 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16282 (tic6x-c64xp-linux.c): Likewise.
16283 * configure.srv: Add support for tic6x-*-uclinux.
16284 * linux-tic6x-low.c: New.
16285 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16286
78d85199
YQ
162872011-08-14 Andrew Stubbs <ams@codesourcery.com>
16288 Yao Qi <yao@codesourcery.com>
16289
16290 * target.h (struct target_ops): Add read_loadmap.
16291 * linux-low.c (struct target_loadseg): New type.
16292 (struct target_loadmap): New type.
16293 (linux_read_loadmap): New function.
16294 (linux_target_ops): Add linux_read_loadmap.
16295 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
16296 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16297 to NULL.
78d85199 16298
a959a88d
EZ
162992011-08-05 Eli Zaretskii <eliz@gnu.org>
16300
16301 * win32-low.c: Include <stdint.h>.
16302
1ced966e
PA
163032011-07-22 Pedro Alves <pedro@codesourcery.com>
16304
16305 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16306 to the inferior here.
16307 (i386_remove_aligned_watchpoint): Ditto.
16308 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16309 fit part of the watchpoint in the debug registers.
16310 (i386_update_inferior_debug_regs): New.
16311 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16312 registers, and only update the inferior on success.
16313 (i386_low_remove_watchpoint): Ditto.
16314
d26e3629
KY
163152011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16316
16317 * linux-low.c (compare_ints, unique, list_threads, show_process,
16318 linux_core_of_thread): Delete.
16319 (linux_target_ops): Change linux_core_of_thread to
16320 linux_common_core_of_thread.
16321 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16322 * utils.c (malloc_failure): Change type of argument.
16323 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16324 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16325 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16326 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16327 (IPA_OBJS): Add common-utils-ipa.o.
16328 (ptid_h, linux_osdata_h): New macros.
16329 (server_h): Add common/common-utils.h, common/xml-utils.h,
16330 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16331 common/ptid.h.
16332 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16333 ptid.o, buffer.o): New rules.
16334 (linux-low.o): Add common/linux-osdata.h as a dependency.
16335 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16336 * configure.ac: Add AC_HEADER_DIRENT check.
16337 * config.in: Regenerate.
16338 * configure: Regenerate.
16339 * remote-utils.c (xml_escape_text): Delete.
16340 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16341 buffer_xml_printf): Move to common/buffer.c.
16342 * server.c (main): Remove call to initialize_inferiors.
16343 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16344 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16345 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16346 internal_error, gdb_assert, gdb_assert_fail): Delete.
16347 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16348 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16349 common/buffer.h.
16350 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16351 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16352 initialize_inferiors): Delete.
16353
2275a1a7
PA
163542011-07-20 Pedro Alves <pedro@codesourcery.com>
16355
16356 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16357 symbol error.
16358
0a5b1e09
PA
163592011-05-31 Pedro Alves <pedro@codesourcery.com>
16360
16361 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16362 assertion.
16363 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16364
6938fd34
YQ
163652011-05-26 Yao Qi <yao@codesourcery.com>
16366
16367 * Makefile.in (thread-db.o): Track dependence to
16368 common/gdb_thread_db.h.
16369 * thread-db.c: include gdb_thread_db.h from right place.
16370
b481f9e0
TT
163712011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16372
16373 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16374 __FILE__ and __LINE__ to internal_error.
16375
98a5dd13
DE
163762011-05-13 Doug Evans <dje@google.com>
16377
16378 * thread-db.c (try_thread_db_load_from_sdir): New function.
16379 (try_thread_db_load_from_dir): New function.
16380 (thread_db_load_search): Handle $sdir, ignore $pdir.
16381 Remove trying of system directories if search of
16382 libthread-db-search-path fails, that is now done via $sdir.
16383
d248b706
KY
163842011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16385
16386 * server.c (handle_query): Add EnableDisableTracepoints to the list
16387 of supported features.
43aaf8b6 16388 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 16389 tracepoints.
43aaf8b6
PA
16390 (cmd_qtenable_disable): New.
16391 (cmd_qtstart): Install tracepoints even if disabled.
16392 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16393 receiving a QTEnable or QTDisable packet.
16394 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16395 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16396 tracepoints.
16397 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 16398
84e578fb
DE
163992011-05-10 Doug Evans <dje@google.com>
16400
16401 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16402
71f55dd8
DE
164032011-05-04 Doug Evans <dje@google.com>
16404
16405 * linux-low.c (linux_join): Skip process lookup.
16406 * spu-low.c (spu_join): Ditto.
16407 * server.c (join_inferiors_callback): Delete.
16408 (process_serial_event): For 'D' packet (detach) call join_inferior
16409 directly.
16410
4d393d60
JM
164112011-05-04 Joseph Myers <joseph@codesourcery.com>
16412
16413 * README: Don't mention xscale*-*-linux*.
16414 * configure.srv (xscale*-*-linux*): Don't handle target.
16415
b00ad6ff
NF
164162011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16417
16418 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16419 casting pointers.
16420 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16421 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16422 (i386_emit_void_call_2): Likewise.
16423
af96c192
YQ
164242011-04-26 Yao Qi <yao@codesourcery.com>
16425
43aaf8b6
PA
16426 * linux-low.c: Move common macros to linux-ptrace.h.
16427 Include linux-ptrace.h.
af96c192
YQ
16428 * Makefile.in (linux_ptrace_h): New.
16429 (linux-low.o): Depends on linux-ptrace.h.
16430
03f2bd59
JK
164312011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16432
16433 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16434 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16435 (remote_prepare): New function with most of the TCP code from ...
16436 (remote_open): ... here. Detect PORT here unconditionally. Move also
16437 setting transport_is_reliable.
16438 * server.c (run_once): New variable.
16439 (gdbserver_usage): Document it.
16440 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16441 the first run if RUN_ONCE.
16442 * server.h (run_once, remote_prepare): New declarations.
16443
7a9dd1b2
TT
164442011-04-19 Tom Tromey <tromey@redhat.com>
16445
16446 * win32-low.c (handle_load_dll): Remove duplicate "the".
16447
81239425
PM
164482011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16449
16450 Remove support for old Cygwin 1.5 versions.
16451 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16452 function to avoid warning.
16453 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16454 warning.
16455
9e0627f1
PM
164562011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16457
16458 * gdbserver/server.h (Macro _): Define it if not available.
16459
588eebee
MS
164602011-03-14 Michael Snyder <msnyder@vmware.com>
16461
348af9f7 16462 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 16463
43f70d4c
JB
164642011-03-10 Joel Brobecker <brobecker@adacore.com>
16465
16466 * Makefile.in (maintainer-clean realclean distclean): Remove
16467 "make ... subdir_do" command.
16468
348af9f7
MS
164692011-03-10 Michael Snyder <msnyder@vmware.com>
16470
16471 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16472
16473 * server.c (handle_v_run): Free alloced buffer on early return.
16474
e637a4f5
YQ
164752011-03-09 Yao Qi <yao@codesourcery.com>
16476
16477 Revert:
16478 2011-03-04 Yao Qi <yao@codesourcery.com>
16479
16480 * Makefile.in: Remove GNU make feature --directory.
16481
16482 2011-03-05 Yao Qi <yao@codesourcery.com>
16483
16484 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16485 (subdir_do): New make target. Copied from gdb/Makefile.
16486 (maintainer-clean, realclean, distclean, clean): Call corresponding
16487 make targets in common/Makefile.
16488
16489 2011-02-11 Yao Qi <yao@codesourcery.com>
16490
16491 * configure.ac: Call AC_PROG_RANLIB.
16492 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16493 * configure: Regenerate.
16494
e6edda56
JK
164952011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16496
16497 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16498
e5141119
JB
164992011-03-06 Yao Qi <yao@codesourcery.com>
16500
16501 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16502
64794aa4
JB
165032011-03-05 Yao Qi <yao@codesourcery.com>
16504
16505 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16506 (subdir_do): New make target. Copied from gdb/Makefile.
16507 (maintainer-clean, realclean, distclean, clean): Call corresponding
16508 make targets in common/Makefile.
16509
7a762829
YQ
165102011-03-04 Yao Qi <yao@codesourcery.com>
16511
16512 * Makefile.in: Remove GNU make feature --directory.
16513
348af9f7
MS
165142011-03-04 Michael Snyder <msnyder@vmware.com>
16515
16516 * server.c (queue_stop_reply): Call xmalloc not malloc.
16517
165182011-03-02 Michael Snyder <msnyder@vmware.com>
16519
16520 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16521
9f72fee2
MS
165222011-02-28 Michael Snyder <msnyder@vmware.com>
16523
588eebee
MS
16524 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16525 (cmd_qtframe): Ditto.
16526 (cmd_qtbuffer): Ditto.
16527 (cmd_bigqtbuffer): Ditto.
16528
9f72fee2
MS
16529 * utils.c (decimal2str): Initialize 'width' to nine, then
16530 don't mess with it.
16531
8040bd49
UW
165322011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16533
16534 * hostio.c (require_data): Free *data, not data.
16535
7e52cbd0
JK
165362011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16537
16538 * hostio.c (require_data): Use free, not xfree.
16539
9130f83e
MS
165402011-02-27 Michael Snyder <msnyder@vmware.com>
16541
4b812f4e
MS
16542 * server.c (handle_query): Discard unused value.
16543
9130f83e
MS
16544 * hostio.c (require_data): Free malloc memory before returning
16545 error.
16546
69d37113
MS
165472011-02-26 Michael Snyder <msnyder@vmware.com>
16548
16549 * linux-low.c (list_threads): Call closedir for dirent.
16550
35f5825a
MS
165512011-02-27 Michael Snyder <msnyder@vmware.com>
16552
2a589cef
MS
16553 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16554 a case statement falls through.
16555
0adea5f7
MS
16556 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16557
35f5825a
MS
16558 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16559 in comparison.
16560
238f1c74
MS
165612011-02-26 Michael Snyder <msnyder@vmware.com>
16562
16563 * utils.c (decimal2str): Eliminate dead code and dead param.
16564 (pulongest): Drop dead param from call to decimal2str.
16565 (plongest): Ditto.
16566
633ff500
JB
165672011-02-24 Joel Brobecker <brobecker@adacore.com>
16568
16569 Revert the following patch (not approved yet):
16570 2011-02-21 Hui Zhu <teawater@gmail.com>
16571 * tracepoint.c (tp_printf): New function.
16572 (eval_agent_expr): Handle gdb_agent_op_printf.
16573
f9c6ff72
HZ
165742011-02-21 Hui Zhu <teawater@gmail.com>
16575
16576 * tracepoint.c (tp_printf): New function.
16577 (eval_agent_expr): Handle gdb_agent_op_printf.
16578
94d5e490
TT
165792011-02-18 Tom Tromey <tromey@redhat.com>
16580
16581 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16582 (tracepoint.o): Likewise.
16583 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16584 (gdb_agent_op_names): Likewise.
16585
c7f96d2b
TT
165862011-02-18 Tom Tromey <tromey@redhat.com>
16587
16588 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16589 gdb_agent_op_rot>: New constants.
16590 (gdb_agent_op_names): Add pick and roll.
16591 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16592 cases.
16593
0feedb2c
JK
165942011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16595
16596 * aclocal.m4: Regenerated with aclocal-1.11.1.
16597
b3b9301e
PA
165982011-02-14 Pedro Alves <pedro@codesourcery.com>
16599
16600 * server.c (handle_qxfer_traceframe_info): New.
16601 (qxfer_packets): Register "traceframe-info".
16602 (handle_query): Report support for qXfer:traceframe-info:read+.
16603 * tracepoint.c (match_blocktype): New.
16604 (traceframe_find_block_type): Rename to ...
16605 (traceframe_walk_blocks): ... this. Add callback filter argument,
16606 and use it.
16607 (traceframe_find_block_type): New, reimplemented on top of
16608 traceframe_walk_blocks.
16609 (build_traceframe_info_xml): New.
16610 (traceframe_read_info): New.
16611 * server.h (traceframe_read_info): Declare.
16612
4f3e6fb7
YQ
166132011-02-11 Yao Qi <yao@codesourcery.com>
16614
16615 * configure.ac: Call AC_PROG_RANLIB.
16616 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16617 * configure: Regenerate.
16618
764880b7
PA
166192011-02-07 Pedro Alves <pedro@codesourcery.com>
16620
16621 * server.c (gdb_read_memory): Change return semantics to allow
16622 partial transfers.
16623 (handle_search_memory_1): Adjust.
16624 (process_serial_event) <'m' packet>: Handle partial transfers.
16625 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16626
1c79eb8a
PA
166272011-01-28 Pedro Alves <pedro@codesourcery.com>
16628
16629 * regcache.c (init_register_cache): Initialize
16630 regcache->register_status.
16631 (free_register_cache): Release regcache->register_status.
16632 (regcache_cpy): Copy register_status.
16633 (registers_to_string): Print 'x's for unavailable registers.
16634 (supply_register): Mark the register's status valid or
16635 unavailable, depending on whether a buffer was passed in or not.
16636 (supply_register_zeroed): New.
16637 (supply_regblock): Mark the registers' status valid or
16638 unavailable, depending on whether a buffer was passed in or not.
16639 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16640 (struct regcache): New `register_status' field.
16641 (supply_register_zeroed): Declare.
16642 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16643 supply_register_zeroed, rather than passing a NULL buffer to
16644 supply_register.
16645 * tracepoint.c (fetch_traceframe_registers): Update comment.
16646
85724a0e
PA
166472011-01-28 Pedro Alves <pedro@codesourcery.com>
16648
16649 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16650 buffer explicit.
16651
d08aafef
PA
166522011-01-25 Pedro Alves <pedro@codesourcery.com>
16653
16654 * server.h (decode_xfer_write): Change prototype.
16655 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16656 and don't extract the annex here.
16657 * server.c (decode_xfer_read): Remove `annex' parameter,
16658 and don't extract the annex here.
16659 (decode_xfer): New.
16660 (struct qxfer): New.
16661 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16662 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16663 (handle_qxfer_statictrace): New functions, abstracted out from
16664 handle_query, and made to use the struct qxfer interface.
16665 (handle_threads_qxfer_proper): Rename to ...
16666 (handle_qxfer_threads_proper): ... this.
16667 (handle_threads_qxfer): Rename to ...
16668 (handle_qxfer_threads): ... this. Adjust.
16669 (qxfer_packets): New array.
16670 (handle_qxfer): New function.
16671 (handle_query): Use handle_qxfer.
16672
493e2a69
MS
166732011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16674
16675 * gdbreplay.c: Shorten lines of >= 80 columns.
16676 * linux-low.c: Ditto.
16677 * linux-ppc-low.c: Ditto.
16678 * linux-s390-low.c: Ditto.
16679 * linux-sparc-low.c: Ditto.
16680 * linux-x86-low.c: Ditto.
16681 * linux-xtensa-low.c: Ditto.
16682 * mem-break.c: Ditto.
16683 * nto-low.c: Ditto.
16684 * regcache.h: Ditto.
16685 * remote-utils.c: Ditto.
16686 * server.c: Ditto.
16687 * server.h: Ditto.
16688 * thread-db.c: Ditto.
16689 * tracepoint.c: Ditto.
16690 * utils.c: Ditto.
16691 * win32-low.h: Ditto.
16692
44944448
JB
166932011-01-05 Joel Brobecker <brobecker@adacore.com>
16694
16695 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16696 update.
16697
71ce852c
JB
166982011-01-01 Joel Brobecker <brobecker@adacore.com>
16699
16700 * server.c (gdbserver_version): Update copyright year in version
16701 output.
16702 * gdbreplay.c (gdbreplay_version): Ditto.
16703
eb826dc6
MF
167042010-12-29 Jie Zhang <jie.zhang@analog.com>
16705
16706 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16707 * linux-bfin-low.c: New file.
16708 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16709 PT_DATA_ADDR for BFIN targets.
16710 * Makefile.in (SFILES): Add linux-bfin-low.c.
16711 (clean): Remove reg-bfin.c.
16712 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16713 * README: Mention supported Blackfin targets.
16714
39ab222a
MF
167152010-12-23 Mike Frysinger <vapier@gentoo.org>
16716
16717 * .gitignore: New file.
16718
a1f2ce7d
MF
167192010-11-16 Mike Frysinger <vapier@gentoo.org>
16720
16721 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16722
f474844c
JZ
167232010-10-22 Jie Zhang <jie@codesourcery.com>
16724
16725 * Makefile.in: Add FLAGS_TO_PASS variable.
16726 (install): Remove dependency of install-only and recursively
16727 invoke make for install-only.
16728
f1048712
DE
167292010-10-04 Doug Evans <dje@google.com>
16730
16731 * Makefile.in (uninstall): Use $(DESTDIR).
16732
b53a1623
PA
167332010-09-24 Pedro Alves <pedro@codesourcery.com>
16734
e6ee044d
PA
16735 PR gdb/11842
16736
b53a1623
PA
16737 * linux-x86-low.c (compat_siginfo_from_siginfo)
16738 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16739 si_code is < 0. Check for si_code == SI_TIMER before checking for
16740 si_code < 0.
16741
fa1bd1e4
JB
167422010-09-13 Joel Brobecker <brobecker@adacore.com>
16743
16744 * lynx-i386-low.c: New file.
16745 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16746
47fac8f8
JB
167472010-09-13 Joel Brobecker <brobecker@adacore.com>
16748
16749 * lynx-low.c (ptrace_request_to_str): Remove handling for
16750 request values that have been removed in LynxOS 5.x.
16751
1adfc54d
JB
167522010-09-13 Joel Brobecker <brobecker@adacore.com>
16753
16754 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16755 <ptrace.h>
16756
c2a66c29
NS
167572010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16758
16759 * configure.ac: Add --enable-inprocess-agent option.
16760 * configure: Rebuilt.
16761
32fcada3
YQ
167622010-09-06 Yao Qi <yao@codesourcery.com>
16763
16764 * linux-low.c (linux_kill): Remove unused variable.
16765 (linux_stabilize_threads): Likewise.
16766 * server.c (start_inferior): Likewise.
16767 (queue_stop_reply_callback): Likewise.
16768 * tracepoint.c (do_action_at_tracepoint): Likewise.
16769
0cccb683
YQ
167702010-09-06 Yao Qi <yao@codesourcery.com>
16771
16772 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16773 on return.
16774
423ec54c
JK
167752010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16776
16777 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16778
12ac6819
PA
167792010-09-06 Pedro Alves <pedro@codesourcery.com>
16780
16781 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16782 "$(IPA_DEPFILES)".
16783
8ed54b31
JB
167842010-09-01 Joel Brobecker <brobecker@adacore.com>
16785
16786 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16787 gdbserver/lynx-ppc-low.c: New files.
16788 * Makefile.in (lynx_low_h): New variable.
16789 (lynx-low.o, lynx-ppc-low.o): New rules.
16790 * configure.ac: On LynxOS, link with -lnetinet.
16791 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16792 * configure: regenerate.
16793
bb0116a4
JB
167942010-09-01 Joel Brobecker <brobecker@adacore.com>
16795
16796 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16797 * configure.ac: Add check for vasprintf and vsnprintf.
16798 * configure, config.in: Regenerate.
16799 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16800
a778ab81 168012010-09-01 Joel Brobecker <brobecker@adacore.com>
16802
16803 * gdbreplay.c: Move include of alloca.h up, next to include of
16804 malloc.h.
16805 * server.h: Add include of malloc.h.
16806 * mem-break.c: Remove include of malloc.h.
16807 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16808
8b034a19 168092010-09-01 Joel Brobecker <brobecker@adacore.com>
16810
16811 * Makefile.in (memmem.o): Build with -Wno-error.
16812
168132010-09-01 Joel Brobecker <brobecker@adacore.com>
16814
16815 * utils.c (xsnprintf): Make non-static.
16816 * server.h: Add xsnprintf declaration.
16817 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16818 replace calls to snprintf by calls to xsnprintf throughout.
16819
168202010-09-01 Joel Brobecker <brobecker@adacore.com>
16821
16822 * configure.ac: Add configure check for alloca.
16823 * configure, config.in: Regenerate.
16824 * server.h: Include alloca.h if it exists.
16825 * gdbreplay.c: Include alloca.h if it exists.
16826
1a981360
PA
168272010-08-28 Pedro Alves <pedro@codesourcery.com>
16828
16829 * linux-low.c (__SIGRTMIN): Define if not already defined.
16830 (linux_create_inferior): Check for __ANDROID__ rather than
16831 __SIGRTMIN.
16832 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16833 are already deferred.
16834 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16835 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16836 stopped and already has a pending signal to report.
16837 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16838 a pending signal to report or is moving out of a jump pad.
16839 (linux_init_signals): Check for __ANDROID__ rather than
16840 __SIGRTMIN.
16841
b4d51a55
PA
168422010-08-28 Pedro Alves <pedro@codesourcery.com>
16843
16844 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16845 debug_threads check. Avoid a linear search when not doing debug
16846 output.
16847
ec48365d
PA
168482010-08-27 Pedro Alves <pedro@codesourcery.com>
16849
16850 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16851 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16852 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16853 (process_event): Change local fd's type to gdb_fildes_t.
16854 (create_file_handler): Adjust prototype.
16855 (delete_file_handler): Adjust prototype.
16856 (handle_file_event): Adjust prototype. Use pfildes.
16857 (create_file_event): Adjsut prototype.
16858 * remote-utils.c (remote_desc, listen_desc): Change type to
16859 gdb_fildes_t.
16860 * server.h: New gdb_fildes_t typedef.
16861 [USE_WIN32API]: Include winsock2.h.
16862 (delete_file_handler, add_file_handler): Adjust prototypes.
16863 (pfildes): Declare.
16864 * utils.c (pfildes): New.
16865
854d88f0
PA
168662010-08-27 Pedro Alves <pedro@codesourcery.com>
16867
16868 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16869 * configure: Regenerate.
16870
0146f85b
PA
168712010-08-27 Pedro Alves <pedro@codesourcery.com>
16872
16873 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16874 (linux_done_accessing_memory): ... this.
16875 (linux_target_ops): Adjust.
16876 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16877 * nto-low.c (nto_target_ops): Adjust comment.
16878 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16879 * spu-low.c (spu_target_ops): Adjust comment.
16880 * target.h (target_ops): Rename unprepare_to_access_memory field
16881 to done_accessing_memory.
16882 (unprepare_to_access_memory): Rename to ...
16883 (done_accessing_memory): ... this.
16884
90d74c30
PA
168852010-08-26 Pedro Alves <pedro@codesourcery.com>
16886
16887 * linux-low.c (linux_prepare_to_access_memory): New.
16888 (linux_unprepare_to_access_memory): New.
16889 (linux_target_ops): Install them.
16890 * server.c (read_memory): Rename to ...
16891 (gdb_read_memory): ... this. Use
16892 prepare_to_access_memory/prepare_to_access_memory.
16893 (write_memory): Rename to ...
16894 (gdb_write_memory): ... this. Use
16895 prepare_to_access_memory/prepare_to_access_memory.
16896 (handle_search_memory_1): Adjust.
16897 (process_serial_event): Adjust.
16898 * target.h (struct target_ops): New fields
16899 prepare_to_access_memory and unprepare_to_access_memory.
16900 (prepare_to_access_memory, unprepare_to_access_memory): New.
16901 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
16902 prepare_to_access_memory/prepare_to_access_memory.
16903 * nto-low.c (nto_target_ops): Adjust.
16904 * spu-low.c (spu_target_ops): Adjust.
16905 * win32-low.c (win32_target_ops): Adjust.
16906
fd467969
PA
169072010-08-26 Pedro Alves <pedro@codesourcery.com>
16908
16909 * Makefile.in (WARN_CFLAGS): Get it from configure.
16910 (WERROR_CFLAGS): New.
16911 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
16912 * configure.ac: Introduce --enable-werror, which adds -Werror to
16913 the compiler command line. Enabled by default. Disable with
16914 --disable-werror. Add -Wdeclaration-after-statement
16915 Wpointer-arith and -Wformat-nonliteral to warning flags.
16916 * configure: Regenerate.
16917
331e2f5f
PA
169182010-08-26 Pedro Alves <pedro@codesourcery.com>
16919
16920 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
16921
e581f2b4
PA
169222010-08-26 Pedro Alves <pedro@codesourcery.com>
16923
16924 * gdbreplay.c (remote_error): New.
16925 (gdbchar): New.
16926 (expect): Use gdbchar. Check for error reading from GDB.
16927 Clarify sync error output.
16928 (play): Check for errors writing to GDB.
16929 * linux-low.c (sigchld_handler): Really ignore `write' errors.
16930 * remote-utils.c (getpkt): Check for errors writing to the remote
16931 descriptor.
16932
3c11dd79
PA
169332010-08-25 Pedro Alves <pedro@codesourcery.com>
16934
16935 * linux-low.c (linux_wait_1): Move non-debugging code out of
16936 `debug_threads' control.
16937
d20a8ad9
PA
169382010-08-25 Pedro Alves <pedro@codesourcery.com>
16939
16940 * linux-low.c (linux_wait_1): Don't set last_status here.
16941 * server.c (push_event, queue_stop_reply_callback): Assert we're
16942 not pushing a TARGET_WAITKIND_IGNORE event.
16943 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
16944 (myresume, handle_target_event): Set the thread's last_resume_kind
16945 and last_status from the target returned status.
16946
964e4306
PA
169472010-08-25 Pedro Alves <pedro@codesourcery.com>
16948
16949 PR threads/10729
16950
16951 * linux-x86-low.c (update_debug_registers_callback): New.
16952 (i386_dr_low_set_addr): Use it.
16953 (i386_dr_low_get_addr): New.
16954 (i386_dr_low_set_control): Use update_debug_registers_callback.
16955 (i386_dr_low_get_control): New.
16956 (i386_dr_low_get_status): Adjust.
16957 * linux-low.c (linux_stop_lwp): New.
16958 * linux-low.h (linux_stop_lwp): Declare.
16959
16960 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
16961 argument instead of a i386_debug_reg_state.
16962 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
16963 a i386_debug_reg_state.
16964 (i386_insert_aligned_watchpoint): Adjust.
16965 (i386_remove_aligned_watchpoint): Adjust.
16966 (i386_low_stopped_data_address): Read the debug registers from the
16967 inferior instead of from the mirrors.
16968 * i386-low.h (struct i386_debug_reg_state): Extend comment.
16969 (i386_dr_low_get_addr): Declare.
16970 (i386_dr_low_get_control): Declare.
16971 (i386_dr_low_get_status): Change prototype.
16972
16973 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
16974 (i386_dr_low_get_addr): New.
16975 (i386_dr_low_get_control): New.
16976 (i386_dr_low_get_status): Adjust prototype. Return
16977 dr_status_mirror.
16978 (i386_initial_stuff): Clear dr_status_mirror and
16979 dr_control_mirror.
16980 (i386_get_thread_context): Adjust.
16981 (i386_set_thread_context): Adjust.
16982 (i386_thread_added): Adjust.
16983
5f21a75b
PA
169842010-08-24 Pedro Alves <pedro@codesourcery.com>
16985
16986 * linux-low.h (linux_thread_area): Delete declaration.
16987
3e4c1235
TS
169882010-08-11 Thomas Schwinge <thomas@codesourcery.com>
16989
16990 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
16991 after its termination.
16992
1971b033
PA
169932010-08-09 Pedro Alves <pedro@codesourcery.com>
16994
16995 * linux-low.c (gdb_wants_lwp_stopped): Delete.
16996 (gdb_wants_all_stopped): Delete.
16997 (linux_wait_1): Don't call them.
16998 * server.c (handle_v_cont): Tag all threads as want-stopped.
16999 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17000 stopped as "client-wants-stopped".
17001
310444ac
PA
170022010-07-31 Pedro Alves <pedro@codesourcery.com>
17003
17004 * Makefile.in (signals_h): New.
17005 (server_h): Depend on it.
17006 (server.o): Don't depend on $(signals_def).
17007 (signals.o): Depend on $(signals_def).
17008
a19cae16
JK
170092010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17010
17011 * Makefile.in (signals_def): New.
17012 (server_h): Append include/gdb/signals.h and signals_def.
17013 (server.o): Append signals_def.
17014
30d50328
JK
170152010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17016
17017 * server.c (handle_target_event): Use target_signal_to_host for
17018 resume_info.sig initialization.
17019 * target.h (struct thread_resume) <sig>: New comment.
17020
5c3216e2
OS
170212010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17022
c6f46ca0
OS
17023 * server.c (handle_query): strcpy() the returned string from paddress()
17024 instead of sprintf().
5c3216e2
OS
17025 * utils.c (paddress): Return phex_nz().
17026
6bd31874
JB
170272010-07-07 Joel Brobecker <brobecker@adacore.com>
17028
17029 * server.c (handle_v_cont): Call mourn_inferior if process
17030 just exited.
17031 (myresume): Likewise.
17032
0fb4aa4b
PA
170332010-07-01 Pedro Alves <pedro@codesourcery.com>
17034
17035 Static tracepoints, and integration with UST.
17036
17037 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17038 * mem-break.c (uninsert_all_breakpoints)
17039 (reinsert_all_breakpoints): New.
17040 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17041 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17042 (gdb_agent_ust_loaded, helper_thread_id)
17043 (gdb_agent_helper_thread_id): New macros.
17044 (struct ipa_sym_addresses): Add addr_ust_loaded,
17045 addr_helper_thread_id, addr_cmd_buf.
17046 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17047 (in_process_agent_loaded_ust): New.
17048 (write_e_ust_not_loaded): New.
17049 (maybe_write_ipa_ust_not_loaded): New.
17050 (struct collect_static_trace_data_action): New.
17051 (enum tracepoint_type) <static_tracepoint>: New.
17052 (struct tracepoint) <handle>: Mention static tracepoints.
17053 (struct static_tracepoint_ctx): New.
17054 (CMD_BUF_SIZE): New.
17055 (add_tracepoint_action): Handle static tracepoint actions.
17056 (unprobe_marker_at): New.
17057 (clear_installed_tracepoints): Handle static tracepoints.
17058 (cmd_qtdp): Handle static tracepoints.
17059 (probe_marker_at): New.
17060 (cmd_qtstart): Handle static tracepoints.
17061 (response_tracepoint): Handle static tracepoints.
17062 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17063 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17064 (get_context_regcache): Handle static tracepoints.
17065 (do_action_at_tracepoint): Handle static tracepoint actions.
17066 (traceframe_find_block_type): Handle static trace data blocks.
17067 (traceframe_read_sdata): New.
17068 (download_tracepoints): Download static tracepoint actions.
17069 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17070 (GDB_PROBE_NAME): New.
17071 (ust_ops): New.
17072 (GET_UST_SYM): New.
17073 (USTF): New.
17074 (dlsym_ust): New.
17075 (ust_marker_to_static_tracepoint): New.
17076 (gdb_probe): New.
17077 (collect_ust_data_at_tracepoint): New.
17078 (gdb_ust_probe): New.
17079 (UNIX_PATH_MAX, SOCK_DIR): New.
17080 (gdb_ust_connect_sync_socket): New.
17081 (resume_thread, stop_thread): New.
17082 (run_inferior_command): New.
17083 (init_named_socket): New.
17084 (gdb_ust_socket_init): New.
17085 (cstr_to_hexstr): New.
17086 (next_st): New.
17087 (first_marker, next_marker): New.
17088 (response_ust_marker): New.
17089 (cmd_qtfstm, cmd_qtsstm): New.
17090 (unprobe_marker_at, probe_marker_at): New.
17091 (cmd_qtstmat, gdb_ust_thread): New.
17092 (gdb_ust_init): New.
17093 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17094 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17095 (ST_REGENTRY): New.
17096 (x86_64_st_collect_regmap): New.
17097 (X86_64_NUM_ST_COLLECT_GREGS): New.
17098 (AMD64_RIP_REGNUM): New.
17099 (supply_static_tracepoint_registers): New.
17100 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17101 (ST_REGENTRY): New.
17102 (i386_st_collect_regmap): New.
17103 (i386_NUM_ST_COLLECT_GREGS): New.
17104 (supply_static_tracepoint_registers): New.
17105 * server.c (handle_query): Handle qXfer:statictrace:read.
17106 <qSupported>: Report support for StaticTracepoints, and
17107 qXfer:statictrace:read features.
17108 * server.h (traceframe_read_sdata)
17109 (supply_static_tracepoint_registers): Declare.
17110 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17111 (unpack_varlen_hex): Include in IPA build.
17112 * Makefile.in (ustlibs, ustinc): New.
17113 (IPA_OBJS): Add remote-utils-ipa.o.
17114 ($(IPA_LIB)): Link -ldl and -lpthread.
17115 (UST_CFLAGS): New.
17116 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17117 * config.in, configure: Regenerate.
17118
9e4344e5
PA
171192010-06-20 Ian Lance Taylor <iant@google.com>
17120 Pedro Alves <pedro@codesourcery.com>
17121
17122 * linux-x86-low.c (always_true): Delete.
17123 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17124 trying to fool the compiler with always_true.
17125
c6beb2cb
PA
171262010-06-20 Pedro Alves <pedro@codesourcery.com>
17127
17128 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17129 conditions in gdbserver.
17130
d2ed6730
UW
171312010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17132
17133 * spu-low.c (spu_read_memory): Wrap around local store limit.
17134 (spu_write_memory): Likewise.
17135
4e29fb54
PA
171362010-06-15 Pedro Alves <pedro@codesourcery.com>
17137
17138 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17139 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17140 LONGEST uses.
17141 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17142 uses.
17143 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17144 uses with LONGEST uses.
17145
6a271cae
PA
171462010-06-14 Stan Shebs <stan@codesourcery.com>
17147 Pedro Alves <pedro@codesourcery.com>
17148
17149 Bytecode compiler.
17150
17151 * linux-x86-low.c: Include limits.h.
17152 (add_insns): New.
17153 (always_true): New.
17154 (EMIT_ASM): New.
17155 (EMIT_ASM32): New.
17156 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17157 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17158 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17159 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17160 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17161 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17162 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17163 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17164 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17165 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17166 (amd64_emit_void_call_2): New.
17167 (amd64_emit_ops): New.
17168 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17169 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17170 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17171 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17172 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17173 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17174 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17175 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17176 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17177 (i386_emit_stack_adjust, i386_emit_int_call_1)
17178 (i386_emit_void_call_2): New.
17179 (i386_emit_ops): New.
17180 (x86_emit_ops): New.
17181 (the_low_target): Install x86_emit_ops.
17182 * server.h (struct emit_ops): New.
17183 (get_raw_reg_func_addr): Declare.
17184 (current_insn_ptr, emit_error): Declare.
17185 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17186 (set_trace_state_variable_value): New defines.
17187 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17188 addr_get_trace_state_variable_value and
17189 addr_set_trace_state_variable_value.
17190 (symbol_list): New fields for get_raw_reg,
17191 get_trace_state_variable_value and set_trace_state_variable_value.
17192 (condfn): New typedef.
17193 (struct tracepoint): New field `compiled_cond'.
17194 (do_action_at_tracepoint): Clear compiled_cond.
17195 (get_trace_state_variable_value, set_trace_state_variable_value):
17196 Export in the IPA.
17197 (condition_true_at_tracepoint): If there's a compiled condition,
17198 run that.
17199 (current_insn_ptr, emit_error): New globals.
17200 (struct bytecode_address): New.
17201 (get_raw_reg_func_addr): New.
17202 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17203 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17204 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17205 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17206 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17207 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17208 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17209 (compile_tracepoint_condition, compile_bytecodes): New.
17210 * target.h (emit_ops): Forward declare.
17211 (struct target_ops): New field emit_ops.
17212 (target_emit_ops): New.
17213 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17214 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17215 * linux-low.c (linux_emit_ops): New.
17216 (linux_target_ops): Install it.
17217 * linux-low.h (struct linux_target_ops): New field emit_ops.
17218
92b72907
UW
172192010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17220
17221 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17222 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17223
fa593d66
PA
172242010-06-01 Pedro Alves <pedro@codesourcery.com>
17225 Stan Shebs <stan@codesourcery.com>
17226
17227 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17228 (all): Depend on $(extra_libraries).
17229 (install-only): Install the IPA.
17230 (IPA_OBJS, IPA_LIB): New.
17231 (clean): Remove the IPA lib.
17232 (IPAGENT_CFLAGS): New.
17233 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17234 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17235 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17236 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17237 * configure.ac: Check for atomic builtins support in the compiler.
17238 (IPA_DEPFILES, extra_libraries): Define.
17239 * configure.srv (ipa_obj): Add description.
17240 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17241 (i[34567]86-*-linux*): Set ipa_obj.
17242 (x86_64-*-linux*): Set ipa_obj.
17243 * linux-low.c (stabilizing_threads): New.
17244 (supports_fast_tracepoints): New.
17245 (linux_detach): Stabilize threads before detaching.
17246 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17247 the lwp is either not stabilizing, or is moving out of a jump pad.
17248 (linux_fast_tracepoint_collecting): New.
17249 (maybe_move_out_of_jump_pad): New.
17250 (enqueue_one_deferred_signal): New.
17251 (dequeue_one_deferred_signal): New.
17252 (linux_wait_for_event_1): If moving out of a jump pad, defer
17253 pending signals to later.
17254 (linux_stabilize_threads): New.
17255 (linux_wait_1): Check if threads need moving out of jump pads, and
17256 do it if so.
17257 (stuck_in_jump_pad_callback): New.
17258 (move_out_of_jump_pad_callback): New.
17259 (lwp_running): New.
17260 (linux_resume_one_lwp): Handle moving out of jump pads.
17261 (linux_set_resume_request): Dequeue deferred signals.
17262 (need_step_over_p): Also step over fast tracepoint jumps.
17263 (start_step_over): Also uninsert fast tracepoint jumps.
17264 (finish_step_over): Also reinsert fast tracepoint jumps.
17265 (linux_install_fast_tracepoint_jump): New.
17266 (linux_target_ops): Install linux_stabilize_threads and
17267 linux_install_fast_tracepoint_jump_pad.
17268 * linux-low.h (linux_target_ops) <get_thread_area,
17269 install_fast_tracepoint_jump_pad>: New fields.
17270 (struct lwp_info) <collecting_fast_tracepoint,
17271 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17272 (linux_get_thread_area): Declare.
17273 * linux-x86-low.c (jump_insn): New.
17274 (x86_get_thread_area): New.
17275 (append_insns): New.
17276 (push_opcode): New.
17277 (amd64_install_fast_tracepoint_jump_pad): New.
17278 (i386_install_fast_tracepoint_jump_pad): New.
17279 (x86_install_fast_tracepoint_jump_pad): New.
17280 (the_low_target): Install x86_get_thread_area and
17281 x86_install_fast_tracepoint_jump_pad.
17282 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17283 (struct fast_tracepoint_jump): New.
17284 (fast_tracepoint_jump_insn): New.
17285 (fast_tracepoint_jump_shadow): New.
17286 (find_fast_tracepoint_jump_at): New.
17287 (fast_tracepoint_jump_here): New.
17288 (delete_fast_tracepoint_jump): New.
17289 (set_fast_tracepoint_jump): New.
17290 (uninsert_fast_tracepoint_jumps_at): New.
17291 (reinsert_fast_tracepoint_jumps_at): New.
17292 (set_breakpoint_at): Use write_inferior_memory.
17293 (uninsert_raw_breakpoint): Use write_inferior_memory.
17294 (check_mem_read): Mask out fast tracepoint jumps.
17295 (check_mem_write): Mask out fast tracepoint jumps.
17296 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17297 (set_fast_tracepoint_jump): Declare.
17298 (delete_fast_tracepoint_jump)
17299 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17300 (reinsert_fast_tracepoint_jumps_at): Declare.
17301 * regcache.c: Don't compile many functions when building the
17302 in-process agent library.
17303 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17304 the register buffer in the heap.
17305 (free_register_cache): If the register buffer isn't owned by the
17306 regcache, don't free it.
17307 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17308 pre-existing register caches.
17309 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17310 type.
17311 (convert_ascii_to_int): : Constify `from' parameter type.
17312 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17313 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17314 the needed buffer in-place.
17315 (relocate_instruction): New.
17316 * server.c (handle_query) <qSymbols>: If the target supports
17317 tracepoints, give it a chance of looking up symbols. Report
17318 support for fast tracepoints.
17319 (handle_status): Stabilize threads.
17320 (process_serial_event): Adjust.
17321 * server.h (struct fast_tracepoint_jump): Forward declare.
17322 (struct process_info) <fast_tracepoint_jumps>: New field.
17323 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17324 (decode_X_packet, decode_M_packet): Adjust.
17325 (relocate_instruction): Declare.
17326 (in_process_agent_loaded): Declare.
17327 (tracepoint_look_up_symbols): Declare.
17328 (struct fast_tpoint_collect_status): Declare.
17329 (fast_tracepoint_collecting): Declare.
17330 (force_unlock_trace_buffer): Declare.
17331 (handle_tracepoint_bkpts): Declare.
17332 (initialize_low_tracepoint)
17333 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17334 * target.h (struct target_ops) <stabilize_threads,
17335 install_fast_tracepoint_jump_pad>: New fields.
17336 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17337 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17338 [HAVE_STDINT_H]: Include stdint.h.
17339 (trace_debug_1): Rename to ...
17340 (trace_vdebug): ... this.
17341 (trace_debug): Rename to ...
17342 (trace_debug_1): ... this. Add `level' parameter.
17343 (trace_debug): New.
17344 (ATTR_USED, ATTR_NOINLINE): New.
17345 (IP_AGENT_EXPORT): New.
17346 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17347 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17348 (about_to_request_buffer_space, trace_buffer_is_full)
17349 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17350 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17351 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17352 (traceframe_write_count, traceframes_created)
17353 (trace_state_variables)
17354 New renaming defines.
17355 (struct ipa_sym_addresses): New.
17356 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17357 (symbol_list): New.
17358 (ipa_sym_addrs): New.
17359 (all_tracepoint_symbols_looked_up): New.
17360 (in_process_agent_loaded): New.
17361 (write_e_ipa_not_loaded): New.
17362 (maybe_write_ipa_not_loaded): New.
17363 (tracepoint_look_up_symbols): New.
17364 (debug_threads) [IN_PROCESS_AGENT]: New.
17365 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17366 (UNKNOWN_SIDE_EFFECTS): New.
17367 (stop_tracing): New.
17368 (flush_trace_buffer): New.
17369 (stop_tracing_bkpt): New.
17370 (flush_trace_buffer_bkpt): New.
17371 (read_inferior_integer): New.
17372 (read_inferior_uinteger): New.
17373 (read_inferior_data_pointer): New.
17374 (write_inferior_data_pointer): New.
17375 (write_inferior_integer): New.
17376 (write_inferior_uinteger): New.
17377 (struct collect_static_trace_data_action): Delete.
17378 (enum tracepoint_type): New.
17379 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
17380 <actions_str, step_actions, step_actions_str>: Only include in
17381 GDBserver.
fa593d66
PA
17382 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17383 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17384 (tracepoints): Use IP_AGENT_EXPORT.
17385 (last_tracepoint): Don't include in the IPA.
17386 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17387 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17388 (alloced_trace_state_variables): New.
17389 (trace_state_variables): Use IP_AGENT_EXPORT.
17390 (traceframe_t): Delete unused variable.
17391 (circular_trace_buffer): Don't include in the IPA.
17392 (trace_buffer_start): Delete.
17393 (struct trace_buffer_control): New.
17394 (trace_buffer_free): Delete.
17395 (struct ipa_trace_buffer_control): New.
17396 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17397 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17398 New.
17399 (trace_buffer_ctrl): New.
17400 (TRACE_BUFFER_CTRL_CURR): New.
17401 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17402 Reimplement as macros.
17403 (trace_buffer_wrap): Delete.
17404 (traceframe_write_count, traceframe_read_count)
17405 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17406 (struct tracepoint_hit_ctx) <type>: New field.
17407 (struct fast_tracepoint_ctx): New.
17408 (memory_barrier): New.
17409 (cmpxchg): New.
17410 (record_tracepoint_error): Update atomically in the IPA.
17411 (clear_inferior_trace_buffer): New.
17412 (about_to_request_buffer_space): New.
17413 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17414 updating the same buffer.
17415 (add_tracepoint): Default the tracepoint's type to trap
17416 tracepoint, and orig_size to -1.
17417 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17418 internal variables.
17419 (create_trace_state_variable): New parameter `gdb'. Handle it.
17420 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17421 (cmd_qtdp): Handle fast tracepoints.
17422 (cmd_qtdv): Adjust.
17423 (max_jump_pad_size): New.
17424 (gdb_jump_pad_head): New.
17425 (get_jump_space_head): New.
17426 (claim_jump_space): New.
17427 (sort_tracepoints): New.
17428 (MAX_JUMP_SIZE): New.
17429 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17430 IPA.
17431 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17432 support. Upload fast traceframes, and delete internal IPA
17433 breakpoints.
17434 (stop_tracing_handler): New.
17435 (flush_trace_buffer_handler): New.
17436 (cmd_qtstop): Upload fast tracepoints.
17437 (response_tracepoint): Handle fast tracepoints.
17438 (tracepoint_finished_step): Upload fast traceframes. Set the
17439 tracepoint hit context's tracepoint type.
17440 (handle_tracepoint_bkpts): New.
17441 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17442 type. Add comment about fast tracepoints.
17443 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17444 non-existing action_str field.
17445 (get_context_regcache): Handle fast tracepoints.
17446 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17447 to the regcache.
17448 (fast_tracepoint_from_jump_pad_address): New.
17449 (fast_tracepoint_from_ipa_tpoint_address): New.
17450 (collecting_t): New.
17451 (force_unlock_trace_buffer): New.
17452 (fast_tracepoint_collecting): New.
17453 (collecting): New.
17454 (gdb_collect): New.
17455 (write_inferior_data_ptr): New.
17456 (target_tp_heap): New.
17457 (target_malloc): New.
17458 (download_agent_expr): New.
17459 (UALIGN): New.
17460 (download_tracepoints): New.
17461 (download_trace_state_variables): New.
17462 (upload_fast_traceframes): New.
17463 (IPA_FIRST_TRACEFRAME): New.
17464 (IPA_NEXT_TRACEFRAME_1): New.
17465 (IPA_NEXT_TRACEFRAME): New.
17466 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17467 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17468 (gdb_jump_pad_buffer_end): New.
17469 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17470 (initialize_tracepoint): Adjust.
17471 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17472 buffer. Initialize the low module.
17473 * utils.c (PREFIX, TOOLNAME): New.
17474 (malloc_failure): Use PREFIX.
17475 (error): In the IPA, an error causes an exit.
17476 (fatal, warning): Use PREFIX.
17477 (internal_error): Use TOOLNAME.
17478 (NUMCELLS): Increase to 10.
17479 * configure, config.in: Regenerate.
17480
d149dd1d
PA
174812010-06-01 Pedro Alves <pedro@codesourcery.com>
17482
17483 * server.c (handle_query) <qSupported>: Do two passes over the
17484 qSupported string to avoid nesting strtok.
17485
f6528abd
JK
174862010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17487
17488 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17489 (CDEPS): New.
17490 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17491 -Wl,--dynamic-list.
17492 * configure: Regenerate.
17493 * proc-service.list: New.
17494
ca2a87a0
JK
174952010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17496
17497 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17498 New comment.
17499
363a6e9f
OS
175002010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17501
17502 * gdbreplay.c (remote_open): Check error return from socket() call by
17503 its equality to -1 not by it being negative.
17504 * remote-utils.c (remote_open): Likewise.
17505
d23b6cb1
PA
175062010-05-23 Pedro Alves <pedro@codesourcery.com>
17507
17508 * config.h: Regenerate.
17509
28d3cf85
MK
175102010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17511
17512 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17513 doesn't provide PTRACE_GET_THREAD_AREA.
17514
fea36a59
MK
175152010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17516
17517 * linux-m68k-low.c: Include <asm/ptrace.h>
17518 (ps_get_thread_area): Implement.
17519
24b066ba
DE
175202010-05-03 Doug Evans <dje@google.com>
17521
17522 * event-loop.c (struct callback_event): New struct.
17523 (callback_list): New global.
17524 (append_callback_event, delete_callback_event): New functions.
17525 (process_callback): New function.
17526 (start_event_loop): Call it.
17527 * remote-utils.c (NOT_SCHEDULED): Define.
17528 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17529 moved out of readchar.
17530 (readchar): Rewrite. Call reschedule before returning.
17531 (reset_readchar): New function.
17532 (remote_close): Call it.
17533 (process_remaining, reschedule): New functions.
17534 * server.h (callback_handler_func): New typedef.
17535 (append_callback_event, delete_callback_event): Declare.
17536
9836d6ea
PA
175372010-05-03 Pedro Alves <pedro@codesourcery.com>
17538
17539 * proc-service.c (ps_pglobal_lookup): Use
17540 thread_db_look_up_one_symbol.
17541 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17542 parameter. Use it instead of all_symbols_looked_up.
17543 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17544 field.
17545 (all_symbols_looked_up): Don't declare.
17546 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17547 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17548 field.
17549 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17550 Set all_symbols_looked_up here.
17551 (thread_db_look_up_one_symbol): New.
17552 (thread_db_get_tls_address): Adjust.
17553 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17554 thread_db object on the heap, and tentatively set it in the
17555 process structure.
17556 (thread_db_init): Don't set all_symbols_looked_up here.
17557 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17558
7984d532
PA
175592010-05-03 Pedro Alves <pedro@codesourcery.com>
17560
17561 * linux-low.c (linux_kill, linux_detach): Adjust.
17562 (status_pending_p_callback): Remove redundant statement. Check
17563 for !TARGET_WAITIKIND_IGNORE, instead of
17564 TARGET_WAITKIND_STOPPED.
17565 (handle_tracepoints): Make sure LWP is locked. Adjust.
17566 (linux_wait_for_event_1): Adjust.
17567 (linux_cancel_breakpoints): New.
17568 (unsuspend_one_lwp): New.
17569 (unsuspend_all_lwps): New.
17570 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17571 (send_sigstop_callback): Change return type to int, add new
17572 `except' parameter and handle it.
17573 (suspend_and_send_sigstop_callback): New.
17574 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17575 pass them down. If SUSPEND, also increment the lwp's suspend
17576 count.
17577 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17578 (need_step_over_p): Don't consider suspended LWPs.
17579 (start_step_over): Adjust.
17580 (proceed_one_lwp): Change return type to int, add new `except'
17581 parameter and handle it.
17582 (unsuspend_and_proceed_one_lwp): New.
17583 (proceed_all_lwps): Use find_inferior instead of
17584 for_each_inferior.
17585 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17586 also decrement the suspend count of LWPs. Pass `except' down,
17587 instead of hacking its suspend count.
17588 (linux_pause_all): Add `freeze' parameter. Adjust.
17589 (linux_unpause_all): New.
17590 (linux_target_ops): Install linux_unpause_all.
17591 * server.c (handle_status): Adjust.
17592 * target.h (struct target_ops): New fields `unpause_all' and
17593 `cancel_breakpoints'. Add new parameter to `pause_all'.
17594 (pause_all): Add new `freeze' parameter.
17595 (unpause_all): New.
17596 (cancel_breakpoints): New.
17597 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17598 cancel breakpoints.
17599 (cmd_qtstart): Pause threads.
17600 (stop_tracing): Pause threads, and cancel breakpoints.
17601 * win32-low.c (win32_target_ops): Adjust.
17602
e471f25b
PA
176032010-05-03 Pedro Alves <pedro@codesourcery.com>
17604
17605 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17606 the inferior right away from here...
17607 (linux_wait_1): ... to here, and adjust to check the thread's
17608 last_resume_kind instead of the lwp's step or stop_expected flags.
17609
1915ef4f
PA
176102010-05-02 Pedro Alves <pedro@codesourcery.com>
17611
17612 * README: Use consistent `GDB' and `GDBserver' spellings.
17613
f9e39928
PA
176142010-05-02 Pedro Alves <pedro@codesourcery.com>
17615
17616 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17617 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17618 (linux_detach_one_lwp): Assume the lwp is stopped.
17619 (any_thread_of): Delete.
17620 (linux_detach): Stop all lwps here. Don't blindly delete all
17621 breakpoints.
17622 (delete_lwp_callback): New.
17623 (linux_mourn): Delete all lwps of the process that is gone.
17624 (linux_wait_1): Don't delete the last lwp of the process here.
17625 * mem-break.h (mark_breakpoints_out): Declare.
17626 * mem-break.c (mark_breakpoints_out): New.
17627 (free_all_breakpoints): Use it.
17628 * server.c (handle_target_event): If the process is gone, mark
17629 breakpoints out.
17630 * thread-db.c (struct thread_db) <create_bp>: New field.
17631 (thread_db_enable_reporting): Fix prototype. Store a thread event
17632 breakpoint reference in the thread_db struct.
17633 (thread_db_load_search): Clear the thread_db object.
17634 (try_thread_db_load_1): Ditto.
17635 (switch_to_process): New.
17636 (disable_thread_event_reporting): Use it.
17637 (remove_thread_event_breakpoints): New.
17638 (thread_db_detach, thread_db_mourn): Use it.
17639
1e7fc18c
PA
176402010-05-01 Pedro Alves <pedro@codesourcery.com>
17641
17642 * linux-low.c (linux_enable_event_reporting): New.
17643 (linux_wait_for_event_1, handle_extended_wait): Use it.
17644
02fc4de7
PA
176452010-04-30 Pedro Alves <pedro@codesourcery.com>
17646
17647 * linux-low.c (linux_kill_one_lwp, linux_kill)
17648 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17649 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17650 SIGSTOP even if the LWP is stopped.
17651 (send_sigstop_callback): New.
17652 (stop_all_lwps): Use send_sigstop_callback instead.
17653 (linux_resume_one_thread): Adjust.
17654 (proceed_one_lwp): Still proceed an LWP that the client has
17655 requested to stop, if we haven't reported it as stopped yet. Make
17656 sure that LWPs the client want stopped, have a pending SIGSTOP.
17657
bc3b5632
DE
176582010-04-26 Doug Evans <dje@google.com>
17659
ae1ada35
DE
17660 * server.c (handle_general_set): Make static.
17661
bc3b5632
DE
17662 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17663 Print received char after testing for error/eof instead of before.
17664 (input_interrupt): Tweak comment.
17665
65730243
DE
176662010-04-23 Doug Evans <dje@google.com>
17667
17668 * server.c (start_inferior): Print inferior argv if --debug.
17669
a8ae7dc0
AR
176702010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17671
17672 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17673 * nto-x86-low.c: Include server.h
17674
1c07cc19
PM
176752010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17676
17677 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17678 be consistent with other sources of this directory.
17679 (init_registers_amd64): Correct name of source file of this function
17680 in the comment.
17681
e0a61e09
PM
176822010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17683
17684 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17685 64-bit executables.
17686
54709339
PM
176872010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17688
17689 * win32-i386-low.c: Add 64-bit support.
17690 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17691 (init_registers_amd64): Declare.
17692 (mappings): Add 64-bit version of array.
17693 (init_windows_x86): New function.
17694 (the_low_target): Change init_arch field to init_windows_x86.
17695
e8f0053d
PM
176962010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17697
17698 * win32-low.c: Adapt to support also 64-bit architecture.
17699 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17700 (get_image_name): Use SIZE_T type for local variable `done'.
17701 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17702 (toolhelp_get_dll_name): Idem.
17703 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17704 Use uintptr_t typecast to avoid warning.
17705 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17706 (handle_exception): Use phex_nz to avoid warning.
17707 (win32_wait): Remove unused local variable `process'.
17708
c481e77e
PM
177092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17710
17711 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17712 `amd64-avx.o'.
17713
12ea4b69
PM
177142010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17715
17716 * configure.ac: Use `ws2_32' library for srv_mingw.
17717 * configure: Regenerate.
17718 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17719 * remote-utils.c: Likewise.
17720
f6d1620c
L
177212010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17722
17723 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17724 if __x86_64__ is defined.
17725
8e642873
PM
177262010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17727
17728 * configure: Regenerate.
17729
711e434b
PM
177302010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17731
17732 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17733 * target.h (target_ops): New get_tib_address field.
17734 * win32-low.h (win32_thread_info): Add thread_local_base field.
17735 * win32-low.c (child_add_thread): Add tlb argument.
17736 Set thread_local_base field to TLB.
17737 (get_child_debug_event): Adapt to child_add_thread change.
17738 (win32_get_tib_address): New function.
17739 (win32_target_ops): Set get_tib_address field to
17740 win32_get_tib_address.
17741 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17742
505106cd
PA
177432010-04-12 Pedro Alves <pedro@codesourcery.com>
17744
505106cd
PA
17745 * linux-low.c (linux_mourn): Also remove the process.
17746 * server.c (handle_target_event): Don't remove the process here.
17747 * nto-low.c (nto_mourn): New.
17748 (nto_target_ops): Install it.
17749 * spu-low.c (spu_mourn): New.
17750 (spu_target_ops): Install it.
17751 * win32-low.c (win32_mourn): New.
17752 (win32_target_ops): Install it.
17753
e8470a06
PA
177542010-04-12 Pedro Alves <pedro@codesourcery.com>
17755
17756 * server.h (buffer_xml_printf): Remove redundant `;'.
17757
45ba0d02
PA
177582010-04-12 Pedro Alves <pedro@codesourcery.com>
17759
17760 * regcache.c (set_register_cache): Invalidate regcaches before
17761 changing the register cache layout.
17762 (regcache_invalidate_one): Allow a NULL regcache.
17763 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17764 regcaches before changing the register cache layout or the target
17765 regsets.
17766
59e04013
L
177672010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17768
17769 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17770 variable warning on Linux/x86-64.
17771
8336d594
PA
177722010-04-11 Pedro Alves <pedro@codesourcery.com>
17773
17774 GDBserver disconnected tracing support.
17775
17776 * linux-low.c (linux_remove_process): Delete.
17777 (add_lwp): Don't set last_resume_kind here.
17778 (linux_kill): Use `mourn'.
17779 (linux_detach): Use `thread_db_detach', and `mourn'.
17780 (linux_mourn): New.
17781 (linux_attach_lwp_1): Adjust comment.
17782 (linux_attach): last_resume_kind moved the thread_info; adjust.
17783 (status_pending_p_callback): Adjust.
17784 (linux_wait_for_event_1): Adjust.
17785 (count_events_callback, select_singlestep_lwp_callback)
17786 (select_event_lwp_callback, cancel_breakpoints_callback)
17787 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17788 (proceed_one_lwp): Adjust.
17789 (linux_async): Add debug output.
17790 (linux_thread_stopped): New.
17791 (linux_pause_all): New.
17792 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17793 linux_pause_all.
17794 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17795 (thread_db_free): Delete declaration.
17796 (thread_db_detach, thread_db_mourn): Declare.
17797 * thread-db.c (thread_db_init): Use thread_db_mourn.
17798 (thread_db_free): Delete, split in two.
17799 (disable_thread_event_reporting): New.
17800 (thread_db_detach): New.
17801 (thread_db_mourn): New.
17802
17803 * server.h (struct thread_info) <last_resume_kind>: New field.
17804 <attached>: Add comment.
17805 <gdb_detached>: New field.
17806 (handler_func): Change return type to int.
17807 (handle_serial_event, handle_target_event): Ditto.
17808 (gdb_connected): Declare.
17809 (tracing): Delete.
17810 (disconnected_tracing): Declare.
17811 (stop_tracing): Declare.
17812
17813 * server.c (handle_query) <qSupported>: Report support for
17814 disconnected tracing.
17815 (queue_stop_reply_callback): Account for running threads.
17816 (gdb_wants_thread_stopped): New.
17817 (gdb_wants_all_threads_stopped): New.
17818 (gdb_reattached_process): New.
17819 (handle_status): Clear the `gdb_detached' flag of all processes.
17820 In all-stop, stop all threads.
17821 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17822 (process_serial_event): If the remote connection breaks, or if an
17823 exit was forced with "monitor exit", force an event loop exit.
17824 Handle disconnected tracing on detach.
17825 (handle_serial_event): Adjust.
17826 (handle_target_event): If GDB isn't connected, forward events back
17827 to the inferior, unless the last process exited, in which case,
17828 exit gdbserver. Adjust interface.
17829
17830 * remote-utils.c (remote_open): Don't block in accept. Instead
17831 register an event loop source on the listen socket file
17832 descriptor. Refactor bits into ...
17833 (listen_desc): ... this new global.
17834 (gdb_connected): ... this new function.
17835 (enable_async_notification): ... this new function.
17836 (handle_accept_event): ... this new function.
17837 (remote_close): Clear remote_desc.
17838
17839 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17840
17841 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17842 New fields.
17843 (mourn_inferior): Define.
17844 (target_process_qsupported): Avoid the dangling else problem.
17845 (thread_stopped): Define.
17846 (pause_all): Define.
17847 (target_waitstatus_to_string): Declare.
17848 * target.c (target_waitstatus_to_string): New.
17849
17850 * tracepoint.c (tracing): Make extern.
17851 (disconnected_tracing): New.
17852 (stop_tracing): Make extern. Handle tracing stops due to GDB
17853 disconnecting.
17854 (cmd_qtdisconnected): New.
17855 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17856 (handle_tracepoint_general_set): Handle QTDisconnected.
17857
17858 * event-loop.c (event_handler_func): Change return type to int.
17859 (process_event): Bail out if the event handler wants the event
17860 loop to stop.
17861 (handle_file_event): Ditto.
17862 (start_event_loop): Bail out if the event handler wants the event
17863 loop to stop.
17864
17865 * nto-low.c (nto_target_ops): Adjust.
17866 * spu-low.c (spu_wait): Don't remove the process here.
17867 (spu_target_ops): Adjust.
17868 * win32-low.c (win32_wait): Don't remove the process here.
17869 (win32_target_ops): Adjust.
17870
5d267c4c
PA
178712010-04-11 Pedro Alves <pedro@codesourcery.com>
17872
17873 * regcache.c (realloc_register_cache): Invalidate inferior's
17874 regcache before recreating it.
17875
623ccd72
PA
178762010-04-09 Pedro Alves <pedro@codesourcery.com>
17877
17878 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17879
219f2f23
PA
178802010-04-09 Stan Shebs <stan@codesourcery.com>
17881 Pedro Alves <pedro@codesourcery.com>
17882
17883 * server.h (LONGEST): New.
17884 (struct thread_info) <while_stepping>: New field.
17885 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
17886 Declare.
17887 (initialize_tracepoint, handle_tracepoint_general_set)
17888 (handle_tracepoint_query, tracepoint_finished_step)
17889 (tracepoint_was_hit, release_while_stepping_state_list):
17890 (current_traceframe): Declare.
17891 * server.c (handle_general_set): Handle tracepoint packets.
17892 (read_memory): New.
17893 (write_memory): New.
17894 (handle_search_memory_1): Use read_memory.
17895 (handle_query): Report support for conditional tracepoints, trace
17896 state variables, and tracepoint sources. Handle tracepoint
17897 queries.
17898 (main): Initialize the tracepoints module.
17899 (process_serial_event): Handle traceframe reads/writes.
17900
17901 * linux-low.c (handle_tracepoints): New.
17902 (linux_wait_1): Call it.
17903 (linux_resume_one_lwp): Handle while-stepping.
17904 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
17905 (linux_target_ops): Install them.
17906 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
17907 New field.
17908 * linux-x86-low.c (x86_supports_tracepoints): New.
17909 (the_low_target). Install it.
17910
17911 * mem-break.h (delete_breakpoint): Declare.
17912 * mem-break.c (delete_breakpoint): Make external.
17913
17914 * target.h (struct target_ops): Add `supports_tracepoints',
17915 `read_pc', and `write_pc' fields.
17916 (target_supports_tracepoints): Define.
17917 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
17918 (phex_nz): New.
17919
17920 * regcache.h (struct regcache) <registers_owned>: New field.
17921 (init_register_cache, regcache_cpy): Declare.
17922 (regcache_read_pc, regcache_write_pc): Declare.
17923 (register_cache_size): Declare.
17924 (supply_regblock): Declare.
17925 * regcache.c (init_register_cache): New.
17926 (new_register_cache): Use it.
17927 (regcache_cpy): New.
17928 (register_cache_size): New.
17929 (supply_regblock): New.
17930 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 17931
219f2f23
PA
17932 * tracepoint.c: New.
17933
17934 * Makefile.in (OBS): Add tracepoint.o.
17935 (tracepoint.o): New rule.
17936
3a13a53b
L
179372010-04-08 H.J. Lu <hongjiu.lu@intel.com>
17938
17939 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
17940 (i386-mmx.o): New.
17941 (i386-mmx.c): Likewise.
17942 (i386-mmx-linux.o): Likewise.
17943 (i386-mmx-linux.c): Likewise.
17944
17945 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
17946 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
17947 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
17948 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
17949
17950 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
17951 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
17952 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
17953
1570b33e
L
179542010-04-07 H.J. Lu <hongjiu.lu@intel.com>
17955
17956 * Makefile.in (clean): Updated.
17957 (i386-avx.o): New.
17958 (i386-avx.c): Likewise.
17959 (i386-avx-linux.o): Likewise.
17960 (i386-avx-linux.c): Likewise.
17961 (amd64-avx.o): Likewise.
17962 (amd64-avx.c): Likewise.
17963 (amd64-avx-linux.o): Likewise.
17964 (amd64-avx-linux.c): Likewise.
17965
17966 * configure.srv (srv_i386_regobj): Add i386-avx.o.
17967 (srv_i386_linux_regobj): Add i386-avx-linux.o.
17968 (srv_amd64_regobj): Add amd64-avx.o.
17969 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
17970 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
17971 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
17972 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
17973 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
17974 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
17975 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
17976
17977 * i387-fp.c: Include "i386-xstate.h".
17978 (i387_xsave): New.
17979 (i387_cache_to_xsave): Likewise.
17980 (i387_xsave_to_cache): Likewise.
17981 (x86_xcr0): Likewise.
17982
17983 * i387-fp.h (i387_cache_to_xsave): Likewise.
17984 (i387_xsave_to_cache): Likewise.
17985 (x86_xcr0): Likewise.
17986
17987 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
17988 * linux-crisv32-low.c (target_regsets): Likewise.
17989 * linux-m68k-low.c (target_regsets): Likewise.
17990 * linux-mips-low.c (target_regsets): Likewise.
17991 * linux-ppc-low.c (target_regsets): Likewise.
17992 * linux-s390-low.c (target_regsets): Likewise.
17993 * linux-sh-low.c (target_regsets): Likewise.
17994 * linux-sparc-low.c (target_regsets): Likewise.
17995 * linux-xtensa-low.c (target_regsets): Likewise.
17996
17997 * linux-low.c: Include <sys/uio.h>.
17998 (regsets_fetch_inferior_registers): Support nt_type.
17999 (regsets_store_inferior_registers): Likewise.
18000 (linux_process_qsupported): New.
18001 (linux_target_ops): Add linux_process_qsupported.
18002
18003 * linux-low.h (regset_info): Add nt_type.
18004 (linux_target_ops): Add process_qsupported.
18005
18006 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18007 and <sys/uio.h>.
18008 (init_registers_i386_avx_linux): New.
18009 (init_registers_amd64_avx_linux): Likewise.
18010 (xmltarget_i386_linux_no_xml): Likewise.
18011 (xmltarget_amd64_linux_no_xml): Likewise.
18012 (PTRACE_GETREGSET): Likewise.
18013 (PTRACE_SETREGSET): Likewise.
18014 (x86_fill_xstateregset): Likewise.
18015 (x86_store_xstateregset): Likewise.
18016 (use_xml): Likewise.
18017 (x86_linux_update_xmltarget): Likewise.
18018 (x86_linux_process_qsupported): Likewise.
18019 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18020 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18021 init_registers_i386_linux here. Call
18022 x86_linux_update_xmltarget.
18023 (the_low_target): Add x86_linux_process_qsupported.
18024
18025 * server.c (handle_query): Call target_process_qsupported.
18026
18027 * target.h (target_ops): Add process_qsupported.
18028 (target_process_qsupported): New.
18029
fc7238bb
PA
180302010-04-03 Pedro Alves <pedro@codesourcery.com>
18031
18032 * inferiors.c (add_thread): Set last_status kind to
18033 TARGET_WAITKIND_IGNORE.
18034 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18035 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18036 (linux_wait_1): Move `thread' local definition to block that uses
18037 it. Don't NULL initialize `event_child'.
18038 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18039 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18040 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18041
bdabb078
PA
180422010-04-01 Pedro Alves <pedro@codesourcery.com>
18043
18044 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18045 an extended waitstatus, or by a watchpoint.
18046 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18047 thread was stepping or has been stopped by a watchpoint.
18048
d3bbe7a0
PA
180492010-04-01 Pedro Alves <pedro@codesourcery.com>
18050
18051 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18052 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18053 of another, then delete the previous, and validate all
18054 breakpoints.
18055 (validate_inserted_breakpoint): New.
18056 (delete_disabled_breakpoints): New.
18057 (validate_breakpoints): New.
18058 (check_mem_read): Validate breakpoints before trusting their
18059 shadow. Delete disabled breakpoints.
18060 (check_mem_write): Validate breakpoints before trusting they
18061 should be inserted. Delete disabled breakpoints.
18062 * mem-break.h (validate_breakpoints):
18063 * server.c (handle_query): Validate breakpoints when we see a
18064 qSymbol query.
18065
8b07ae33
PA
180662010-04-01 Pedro Alves <pedro@codesourcery.com>
18067
18068 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18069 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18070 if we could tell there's a GDB breakpoint at stop_pc.
18071 (need_step_over_p): Don't do a step over if we find a GDB
18072 breakpoint at the resume PC.
18073
18074 * mem-break.c (struct raw_breakpoint): New.
18075 (enum bkpt_type): New type `gdb_breakpoint'.
18076 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18077 fields. New field `raw'.
18078 (find_raw_breakpoint_at): New.
18079 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18080 breakpoint instead.
18081 (set_breakpoint_at): Adjust.
18082 (delete_raw_breakpoint): New.
18083 (release_breakpoint): New.
18084 (delete_breakpoint): Rename to...
18085 (delete_breakpoint_1): ... this. Add proc parameter. Use
18086 release_breakpoint. Return ENOENT.
18087 (delete_breakpoint): Reimplement.
18088 (find_breakpoint_at): Delete.
18089 (find_gdb_breakpoint_at): New.
18090 (delete_breakpoint_at): Delete.
18091 (set_gdb_breakpoint_at): New.
18092 (delete_gdb_breakpoint_at): New.
18093 (gdb_breakpoint_here): New.
18094 (set_reinsert_breakpoint): Use release_breakpoint.
18095 (uninsert_breakpoint): Rename to ...
18096 (uninsert_raw_breakpoint): ... this.
18097 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18098 (reinsert_raw_breakpoint): Change parameter type to
18099 raw_breakpoint.
18100 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18101 instead.
18102 (check_breakpoints): Adjust. Use release_breakpoint.
18103 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18104 (breakpoint_inserted_here): Ditto.
18105 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18106 Don't trust the breakpoint's shadow if it is not inserted.
18107 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18108 (delete_all_breakpoints): Adjust.
18109 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18110 use delete_breakpoint_1.
18111
18112 * mem-break.h (breakpoints_supported): Delete declaration.
18113 (set_gdb_breakpoint_at): Declare.
18114 (gdb_breakpoint_here): Declare.
18115 (delete_breakpoint_at): Delete.
18116 (delete_gdb_breakpoint_at): Declare.
18117
18118 * server.h (struct raw_breakpoint): Forward declare.
18119 (struct process_info): New field `raw_breakpoints'.
18120
18121 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18122 breakpoints.
18123
6bf5e0ba
PA
181242010-03-24 Pedro Alves <pedro@codesourcery.com>
18125
18126 * linux-low.c (status_pending_p_callback): Fix comment.
18127 (linux_wait_for_event_1): Move most of the internal breakpoint
18128 handling from here...
18129 (linux_wait_1): ... to here.
18130 (count_events_callback): New.
18131 (select_singlestep_lwp_callback): New.
18132 (select_event_lwp_callback): New.
18133 (cancel_breakpoints_callback): New.
18134 (select_event_lwp): New.
18135 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18136 priority to all LWPs that have had events that should be reported
18137 to the client. Cancel breakpoints when about to reporting the
18138 event to the client, not while stopping lwps. No longer cancel
18139 finished single-steps here.
18140 (cancel_finished_single_step): Delete.
18141 (cancel_finished_single_steps): Delete.
18142
414a389f
PA
181432010-03-24 Pedro Alves <pedro@codesourcery.com>
18144
18145 * mem-break.c (enum bkpt_type): New.
18146 (struct breakpoint): New field `type'.
18147 (set_breakpoint_at): Change return type to struct breakpoint
18148 pointer. Set type to `other_breakpoint' by default.
18149 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18150 in the breakpoint list.
18151 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18152 (reinsert_breakpoint): Rename to ...
18153 (reinsert_raw_breakpoint): ... this.
18154 (reinsert_breakpoints_at): Adjust.
18155 * mem-break.h (struct breakpoint): Declare.
18156 (set_breakpoint_at): Change return type to struct breakpoint
18157 pointer.
18158
2280c721
PA
181592010-03-24 Pedro Alves <pedro@codesourcery.com>
18160
18161 * server.c (handle_query): Assign, not compare.
18162
d50171e4
PA
181632010-03-24 Pedro Alves <pedro@codesourcery.com>
18164
18165 Teach linux gdbserver to step-over-breakpoints.
18166
18167 * linux-low.c (can_hardware_single_step): New.
18168 (supports_breakpoints): New.
18169 (handle_extended_wait): If stopping threads, read the stop pc of
18170 the new cloned LWP.
18171 (get_pc): New.
18172 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18173 low target doesn't support retrieving the PC.
18174 (add_lwp): Set last_resume_kind to resume_continue.
18175 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18176 (linux_attach): Don't clear stop_expected. Set the lwp's
18177 last_resume_kind to resume_stop.
18178 (linux_detach_one_lwp): Don't check for removed breakpoints.
18179 (check_removed_breakpoint): Delete.
18180 (status_pending_p): Rename to ...
18181 (status_pending_p_callback): ... this. Don't check for removed
18182 breakpoints. Don't consider threads that are stopped from GDB's
18183 perspective.
18184 (linux_wait_for_lwp): Always read the stop_pc here.
18185 (cancel_breakpoint): New.
18186 (step_over_bkpt): New global.
18187 (linux_wait_for_event_1): Implement stepping over breakpoints.
18188 (gdb_wants_lwp_stopped): New.
18189 (gdb_wants_all_stopped): New.
18190 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18191 single-step traps here. Store the thread's last reported target
18192 wait status.
18193 (send_sigstop): Don't clear stop_expected. Always set it,
18194 instead.
18195 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18196 (cancel_finished_single_step): New.
18197 (cancel_finished_single_steps): New.
18198 (wait_for_sigstop): Don't cancel finished single-step traps here.
18199 (linux_resume_one_lwp): Don't check for removed breakpoints.
18200 Don't set `step' on non-hardware step archs.
18201 (linux_set_resume_request): Ignore resume_stop requests if already
18202 stopping or stopped. Set the lwp's last_resume_kind.
18203 (resume_status_pending_p): Don't check for removed breakpoints.
18204 (need_step_over_p): New.
18205 (start_step_over): New.
18206 (finish_step_over): New.
18207 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18208 requests. Clear the thread's last reported target waitstatus.
18209 Don't use the `suspended' flag. Don't consider pending breakpoints.
18210 (linux_resume): Start a step-over if necessary.
18211 (proceed_one_lwp): New.
18212 (proceed_all_lwps): New.
18213 (unstop_all_lwps): New.
18214 * linux-low.h (struct lwp_info): Rewrite comment for the
18215 `suspended' flag. Add the `stop_pc' field. Delete the
18216 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18217 Add `'last_resume_kind' and `need_step_over' fields.
18218 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18219 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18220 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18221 (set_raw_breakpoint_at): New.
18222 (set_breakpoint_at): Rewrite to use it.
18223 (reinsert_breakpoint_handler): Delete.
18224 (set_reinsert_breakpoint): New.
18225 (reinsert_breakpoint_by_bp): Delete.
18226 (delete_reinsert_breakpoints): New.
18227 (uninsert_breakpoint): Rewrite.
18228 (uninsert_breakpoints_at): New.
18229 (reinsert_breakpoint): Rewrite.
18230 (reinsert_breakpoints_at): New.
18231 (check_breakpoints): Rewrite.
18232 (breakpoint_here): New.
18233 (breakpoint_inserted_here): New.
18234 (check_mem_read): Adjust.
18235 * mem-break.h (breakpoints_supported, breakpoint_here)
18236 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18237 (reinsert_breakpoint_by_bp): Delete declaration.
18238 (delete_reinsert_breakpoints): Declare.
18239 (reinsert_breakpoint): Delete declaration.
18240 (reinsert_breakpoints_at): Declare.
18241 (uninsert_breakpoint): Delete declaration.
18242 (uninsert_breakpoints_at): Declare.
18243 (check_breakpoints): Adjust prototype.
18244 * server.h: Adjust include order.
18245 (struct thread_info): Declare here. Add a `last_status' field.
18246
30ba68cb
MS
182472010-03-23 Michael Snyder <msnyder@vmware.com>
18248
18249 * server.c (crc32): New function.
18250 (handle_query): Add handling for 'qCRC:' request.
18251
b9a881c2
PA
182522010-03-23 Pedro Alves <pedro@codesourcery.com>
18253
18254 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18255 lwp had been stopped by a watchpoint.
18256
e92d13d5
PA
182572010-03-16 Pedro Alves <pedro@codesourcery.com>
18258
18259 * server.h (internal_error): Declare.
18260 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18261 * utils.c (internal_error): New function.
18262
64daa791
AS
182632010-03-15 Andreas Schwab <schwab@redhat.com>
18264
18265 * configure.srv: Fix typo setting srv_regobj.
18266
f52cd8cd
PA
182672010-03-15 Pedro Alves <pedro@codesourcery.com>
18268
18269 * linux-low.c (fetch_register): Avoid passing a non string literal
18270 format to `error'.
18271 (usr_store_inferior_registers): Ditto.
18272
93ae6fdc
PA
182732010-03-14 Pedro Alves <pedro@codesourcery.com>
18274
18275 * linux-low.c (linux_write_memory): Bail out early if peeking
18276 memory failed.
18277
c3adc08c
PA
182782010-03-14 Pedro Alves <pedro@codesourcery.com>
18279
18280 * linux-low.h (struct lwp_info): New fields
18281 `stopped_by_watchpoint' and `stopped_data_address'.
18282 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18283 here, and cache them in the lwp object.
18284 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18285 directly.
18286 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18287 field.
18288 (linux_stopped_by_watchpoint): Rewrite.
18289 (linux_stopped_data_address): Rewrite.
18290
bce522a2
PA
182912010-03-06 Simo Melenius <simo.melenius@iki.fi>
18292
18293 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18294 switching the current inferior, not before.
18295
90884b2b
L
182962010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18297
18298 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18299 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18300 i386-linux.c and amd64-linux.c.
18301 (reg-i386.o): Removed.
18302 (reg-i386.c): Likewise.
18303 (reg-i386-linux.o): Likewise.
18304 (reg-i386-linux.c): Likewise.
18305 (reg-x86-64.o): Likewise.
18306 (reg-x86-64.c): Likewise.
18307 (reg-x86-64-linux.o): Likewise.
18308 (reg-x86-64-linux.c): Likewise.
18309 (i386.o): New.
18310 (i386.c): Likewise.
18311 (i386-linux.o): Likewise.
18312 (i386-linux.c): Likewise.
18313 (amd64.o): Likewise.
18314 (amd64.c): Likewise.
18315 (amd64-linux.o): Likewise.
18316 (amd64-linux.c): Likewise.
18317
18318 * configure.srv (srv_i386_regobj): New.
18319 (srv_i386_linux_regobj): Likewise.
18320 (srv_amd64_regobj): Likewise.
18321 (srv_amd64_linux_regobj): Likewise.
18322 (srv_i386_32bit_xmlfiles): Likewise.
18323 (srv_i386_64bit_xmlfiles): Likewise.
18324 (srv_i386_xmlfiles): Likewise.
18325 (srv_amd64_xmlfiles): Likewise.
18326 (srv_i386_linux_xmlfiles): Likewise.
18327 (srv_amd64_linux_xmlfiles): Likewise.
18328 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18329 srv_xmlfiles to $srv_i386_xmlfiles.
18330 (i[34567]86-*-mingw32ce*): Likewise.
18331 (i[34567]86-*-mingw*): Likewise.
18332 (i[34567]86-*-nto*): Likewise.
18333 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18334 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18335 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18336 (x86_64-*-linux*): Likewise.
18337
18338 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18339 (init_registers_amd64_linux): New.
18340 (x86_arch_setup): Replace init_registers_x86_64_linux with
18341 init_registers_amd64_linux.
18342
193f13e6
MK
183432010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18344
18345 * configure.ac: Check for libdl. If it is not available link against
18346 static libthread_db.
18347 * configure: Regenerate.
18348
85d721b8
PA
183492010-02-22 Pedro Alves <pedro@codesourcery.com>
18350
18351 PR9605
18352
18353 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18354 handing a read watchpoint.
18355 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18356
6076632b
DE
183572010-02-12 Doug Evans <dje@google.com>
18358
18359 * linux-low.c (linux_supports_tracefork_flag): Document.
18360 (linux_look_up_symbols): Add comment.
18361
3327ccf7
L
183622010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18363
18364 * regcache.c (supply_register): Clear regcache if buf is NULL.
18365
0718675c 183662010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 18367 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
18368
18369 * inferiors.c (find_inferior): Add function documentation.
18370 (unloaded_dll): Handle the case where the unloaded dll has not
18371 been previously registered in the dll list.
18372
177321bd
DJ
183732010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18374
18375 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18376 (thumb2_breakpoint): New.
18377 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18378
2b009048
DJ
183792010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18380
18381 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18382 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18383 breakpoints.
18384
3be029c7
PA
183852010-01-21 Pedro Alves <pedro@codesourcery.com>
18386
18387 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18388
18f5de3b
JK
183892010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18390
18391 * linux-s390-low.c (s390_collect_ptrace_register)
18392 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18393
3743bb4f
DE
183942010-01-21 Doug Evans <dje@google.com>
18395
14ce3065
DE
18396 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18397 (PTRACE_ARG4_TYPE): New macro.
18398 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18399 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18400 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18401 (usr_store_inferior_registers): Ditto.
18402 (linux_read_memory, linux_write_memory): Ditto.
18403 (linux_test_for_tracefork): Ditto.
18404
3743bb4f
DE
18405 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18406 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18407
8b315be5
PA
184082010-01-21 Pedro Alves <pedro@codesourcery.com>
18409
18410 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18411 target.
18412
85492558
PA
184132010-01-21 Pedro Alves <pedro@codesourcery.com>
18414
18415 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18416 prototype to take a regcache. Adjust.
18417
442ea881
PA
184182010-01-20 Pedro Alves <pedro@codesourcery.com>
18419
18420 * regcache.h (struct thread_info): Forward declare.
18421 (struct regcache): New.
18422 (new_register_cache): Adjust prototype.
18423 (get_thread_regcache): Declare.
18424 (free_register_cache): Adjust prototype.
18425 (registers_to_string, registers_from_string): Ditto.
18426 (supply_register, supply_register_by_name, collect_register)
18427 (collect_register_as_string, collect_register_by_name): Ditto.
18428 * regcache.c (struct inferior_regcache_data): Delete.
18429 (get_regcache): Rename to ...
18430 (get_thread_regcache): ... this. Adjust. Switch inferior before
18431 fetching registers.
18432 (regcache_invalidate_one): Adjust.
18433 (regcache_invalidate): Fix prototype.
18434 (new_register_cache): Return the new register cache.
18435 (free_register_cache): Change prototype.
18436 (realloc_register_cache): Adjust.
18437 (registers_to_string): Change prototype to take a regcache. Adjust.
18438 (registers_from_string): Ditto.
18439 (register_data): Ditto.
18440 (supply_register): Ditto.
18441 (supply_register_by_name): Ditto.
18442 (collect_register): Ditto.
18443 (collect_register_as_string): Ditto.
18444 (collect_register_by_name): Ditto.
18445 * server.c (process_serial_event): Adjust.
18446 * linux-low.h (regset_fill_func, regset_store_func): Change
18447 prototype.
18448 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18449 Change prototype.
18450 * linux-low.c (get_stop_pc): Adjust.
18451 (check_removed_breakpoint): Adjust.
18452 (linux_wait_for_event): Adjust.
18453 (linux_resume_one_lwp): Adjust.
18454 (fetch_register): Add regcache parameter. Adjust.
18455 (usr_store_inferior_registers): Ditto.
18456 (regsets_fetch_inferior_registers): Ditto.
18457 (regsets_store_inferior_registers): Ditto.
18458 (linux_fetch_registers, linux_store_registers): Ditto.
18459 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18460 regcache. Adjust.
43aaf8b6
PA
18461 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18462 Ditto.
442ea881
PA
18463 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18464 prototype to take a regcache.
18465 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18466 * remote-utils.c (convert_ascii_to_int, outreg)
18467 (prepare_resume_reply): Change prototype to take a regcache.
18468 Adjust.
18469 * target.h (struct target_ops) <fetch_registers, store_registers>:
18470 Change prototype to take a regcache.
18471 (fetch_inferior_registers, store_inferior_registers): Change
18472 prototype to take a regcache. Adjust.
18473 * proc-service.c (ps_lgetregs): Adjust.
18474 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18475 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18476 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18477 take a regcache. Adjust.
18478 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18479 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18480 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18481 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18482 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18483 (cris_cannot_fetch_register):
18484 (cris_breakpoint_at): Change prototype to take a regcache.
18485 Adjust.
18486 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18487 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18488 to take a regcache. Adjust.
18489 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18490 Adjust.
18491 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18492 take a regcache. Adjust.
18493 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18494 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18495 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18496 * linux-mips-low.c (mips_get_pc):
18497 (mips_set_pc): Change prototype to take a regcache. Adjust.
18498 (mips_reinsert_addr): Adjust.
18499 (mips_collect_register): Change prototype to take a regcache.
18500 Adjust.
18501 (mips_supply_register):
18502 (mips_collect_register_32bit, mips_supply_register_32bit)
18503 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18504 (mips_store_fpregset): Ditto.
43aaf8b6
PA
18505 * linux-ppc-low.c (ppc_supply_ptrace_register)
18506 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
18507 (parse_spufs_run): Adjust.
18508 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18509 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18510 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18511 take a regcache. Adjust.
18512 * linux-s390-low.c (s390_collect_ptrace_register)
18513 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18514 (s390_set_pc): Change prototype to take a regcache. Adjust.
18515 (s390_arch_setup): Adjust.
18516 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18517 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18518 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18519 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18520 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18521 regcache. Adjust.
18522 (sparc_breakpoint_at): Adjust.
18523 * linux-xtensa-low.c (xtensa_fill_gregset):
18524 (xtensa_store_gregset):
18525 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18526 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18527 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18528 prototype to take a regcache. Adjust.
18529 * win32-arm-low.c (arm_fetch_inferior_register)
18530 (arm_store_inferior_register): Change prototype to take a
18531 regcache. Adjust.
18532 * win32-i386-low.c (i386_fetch_inferior_register)
18533 (i386_store_inferior_register): Change prototype to take a
18534 regcache. Adjust.
18535 * win32-low.c (child_fetch_inferior_registers)
18536 (child_store_inferior_registers): Change prototype to take a
18537 regcache. Adjust.
18538 (win32_wait): Adjust.
18539 (win32_fetch_inferior_registers): Change prototype to take a
18540 regcache. Adjust.
18541 (win32_store_inferior_registers): Adjust.
18542 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18543 store_inferior_register>: Change prototype to take a regcache.
18544
60c3d7b0
DE
185452010-01-20 Doug Evans <dje@google.com>
18546
18547 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18548 #ifdef.
18549 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 18550 (W_STOPCODE): Provide definition if missing.
60c3d7b0 18551
dc146f7c
VP
185522010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18553
18554 * linux-low.c (linux_core_of_thread): New.
18555 (compare_ints, show_process, list_threads): New.
18556 (linux_qxfer_osdata): Report threads and cores.
18557 (linux_target_op): Register linux_core_of_thread.
18558 * remote-utils.c (prepare_resume_reply): Report the core.
18559 (buffer_xml_printf): Support %d specifier.
18560 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18561 New.
18562 (handle_query): Handle qXfer:threads. Announce availability
18563 thereof.
18564 * target.h (struct target_ops): New field core_of_thread.
18565
7803799a
UW
185662010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18567
18568 * Makefile.in (clean): Remove new generated files.
18569 (reg-s390.o, reg-s390.c): Remove rules.
18570 (reg-s390x.o, reg-s390x.c): Likewise.
18571 (s390-linux32.o, s390-linux32.c): Add rules.
18572 (s390-linux64.o, s390-linux64.c): Likewise.
18573 (s390x-linux64.o, s390x-linux64.c): Likewise.
18574 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18575 * linux-s390-low.c: Include <elf.h>.
18576 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18577 (init_registers_s390): Remove prototype.
18578 (init_registers_s390x): Likewise.
18579 (init_registers_s390_linux32): Add prototype.
18580 (init_registers_s390_linux64): Likewise.
18581 (init_registers_s390x_linux64): Likewise.
18582 (s390_num_regs_3264): New define.
18583 (s390_regmap_3264): New global variable.
18584 (s390_cannot_fetch_register): Remove obsolete check.
18585 (s390_cannot_store_register): Likewise.
18586 (s390_collect_ptrace_register): Handle upper/lower register halves.
18587 (s390_supply_ptrace_register): Likewise.
18588 (s390_fill_gregset): Update to register number changes.
18589 (s390_get_hwcap): New routine.
18590 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18591 Install appropriate regmap and register set.
18592
6e7ffa39
JB
185932010-01-01 Joel Brobecker <brobecker@adacore.com>
18594
18595 * server.c (gdbserver_version): Update copyright year to 2010.
18596 * gdbreplay.c (gdbreplay_version): Likewise.
18597
957f3f49
DE
185982009-12-28 Doug Evans <dje@google.com>
18599
18600 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18601 elf/external.h. Include <elf.h> instead but only if necessary.
18602
ca5c370d
PA
186032009-12-28 Pedro Alves <pedro@codesourcery.com>
18604
18605 * linux-low.c (linux_remove_process): Remove `detaching'
18606 parameter. Don't release/detach from thread_db here.
18607 (linux_kill): Release/detach from thread_db here, ...
18608 (linux_detach): ... and here, before actually detaching.
18609 (linux_wait_1): ... and here, when a process exits.
18610 * thread-db.c (any_thread_of): New.
18611 (thread_db_free): Switch the current inferior to a thread of the
18612 passed in process.
18613
4ee62156
DE
186142009-12-21 Doug Evans <dje@google.com>
18615
d90e6a88
DE
18616 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18617
c5f62d5f
DE
18618 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18619 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18620 warning ifndef __NR_tkill. Move setting of errno there too.
18621 Delete unnecessary resetting of errno after syscall.
18622 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18623
10e86dd7
DE
18624 * configure.ac: Check for dladdr.
18625 * config.in: Regenerate.
18626 * configure: Regenerate.
18627 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18628 (try_thread_db_load): Update.
18629
4ee62156
DE
18630 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18631
00f515da
DE
186322009-12-18 Doug Evans <dje@google.com>
18633
e9464885
DE
18634 * event-loop.c: Include unistd.h if it exists.
18635
07d4f67e
DE
18636 * linux-low.c (my_waitpid): Move definition away from being in
18637 between linux_tracefork_child/linux_test_for_tracefork.
18638
00f515da
DE
18639 * gdb_proc_service.h (psaddr_t): Fix type.
18640 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18641 signature to match glibc.
18642
1de1badb
DE
186432009-12-16 Doug Evans <dje@google.com>
18644
18645 * linux-low.c (linux_read_memory): Fix argument to read.
18646
aeeb81d1
PA
186472009-11-26 Pedro Alves <pedro@codesourcery.com>
18648
18649 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18650 events, don't leave current_inferior pointing at null.
18651
10357975
PA
186522009-11-26 Pedro Alves <pedro@codesourcery.com>
18653
18654 * win32-low.c (LOG): Delete.
18655 (OUTMSG): Output to stderr.
18656 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18657 on compile time LOG macro.
18658 (win32_wait): Fix debug output.
18659
cf6e3471
PA
186602009-11-26 Pedro Alves <pedro@codesourcery.com>
18661
18662 * win32-low.c (win32_add_one_solib): If the dll name is
18663 "ntdll.dll", prepend the system directory to the dll path.
18664
0c85e18e
MK
186652009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18666
18667 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18668
9ac544ce 186692009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 18670 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
18671
18672 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18673 * configure.ac: Check for __mcoldfire__ and set
18674 gdb_cv_m68k_is_coldfire.
18675 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18676 reg-cf.o and reg-m68k.o.
18677 * configure: Regenerated.
18678
fd7dd3e6
PA
186792009-11-16 Pedro Alves <pedro@codesourcery.com>
18680
18681 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18682 Pass it to thread_db_free.
18683 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18684 proper `detaching' argument to linux_remove_process.
18685 * linux-low.h (thread_db_free): Add `detaching' parameter.
18686 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18687 to thread_db_free.
18688 (thread_db_free): Add `detaching' parameter. Only
18689 call td_ta_clear_event if detaching from process.
18690
75aa492e
MK
186912009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18692
18693 * thread-db.c (thread_db_free): Fix typo.
18694
21e1bee4
PP
186952009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18696
18697 PR gdb/10838
18698 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18699
8838b45e
NS
187002009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18701
18702 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18703 with an i686 compiler.
18704 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18705 needed.
18706 * configure: Rebuilt.
18707
8a35fb51
SL
187082009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18709
18710 PR gdb/10783
18711
18712 * server.c (handle_search_memory_1): Correct read_addr initialization
18713 in loop for searching subsequent chunks.
18714
96f15937
PP
187152009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18716
18717 * configure.ac: New --with-libthread-db option.
18718 * thread-db.c: Allow direct dependence on libthread_db.
18719 (thread_db_free): Adjust.
18720 * config.in: Regenerate.
18721 * configure: Likewise.
889bf7c5 18722
5f7d1694
PP
187232009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18724
18725 PR gdb/10757
18726 * thread-db.c (attach_thread): New function.
18727 (maybe_attach_thread): Return success/failure.
18728 (find_new_threads_callback): Adjust.
889bf7c5
PA
18729 (thread_db_find_new_threads): Loop until no new threads.
18730
88e3b899
PA
187312009-10-13 Pedro Alves <pedro@codesourcery.com>
18732
18733 * proc-service.c (ps_lgetregs): Formatting.
18734
cdbfd419
PP
187352009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18736
18737 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18738 * configure.ac: Adjust.
18739 * linux-low.h (struct process_info_private): Move members to struct
18740 thread_db.
18741 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18742 * linux-low.c (linux_remove_process): Adjust.
18743 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18744 * server.c (handle_query): Move code ...
18745 (handle_monitor_command): ... here. New function.
18746 * target.h (struct target_ops): New member.
18747 * thread-db.c (struct thread_db): New.
18748 (libthread_db_search_path): New variable.
18749 (thread_db_create_event, thread_db_enable_reporting)
18750 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18751 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18752 (try_thread_db_load_1, dladdr_to_soname): New functions.
18753 (try_thread_db_load, thread_db_load_search): New functions.
18754 (thread_db_init): Search for libthread_db.
18755 (thread_db_free): New function.
18756 (thread_db_handle_monitor_command): Likewise.
18757 * config.in: Regenerate.
18758 * configure: Regenerate.
889bf7c5 18759
4168d2d6
UW
187602009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18761
18762 * spu-low.c (spu_kill): Wait for inferior to terminate.
18763 Call clear_inferiors.
18764 (spu_detach): Call clear_inferiors.
18765
81ecdfbb
RW
187662009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18767
18768 * aclocal.m4: Regenerate.
18769 * config.in: Likewise.
18770 * configure: Likewise.
18771
0b9ff2c0
UW
187722009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18773
18774 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18775 (parse_spufs_run): New function.
18776 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18777 (ppc_breakpoint_at): Handle SPU breakpoints.
18778
efcbbd14
UW
187792009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18780
18781 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18782 (SPUFS_MAGIC): Define.
18783 (spu_enumerate_spu_ids): New function.
18784 (linux_qxfer_spu): New function.
18785 (linux_target_ops): Install linux_qxfer_spu.
18786
f4d9bade
UW
187872009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18788
18789 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18790 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18791 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18792 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18793 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18794 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18795 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18796 (init_registers_powerpc_cell32l): Add prototype.
18797 (init_registers_powerpc_cell64l): Likewise.
18798 (ppc_arch_setup): Detect Cell/B.E. architecture.
18799
96e946ca
RW
188002009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18801
18802 * Makefile.in (datarootdir): New variable.
18803
58d6951d
DJ
188042009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18805
18806 * linux-low.c (linux_write_memory): Update debugging output.
18807 * Makefile.in (clean): Add new descriptions.
18808 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18809 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18810 * configure.srv: Add new files for arm*-*-linux*.
18811 * linux-arm-low.c: Add new declarations.
18812 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18813 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18814 (HWCAP_VFPv3D16): New.
18815 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18816 instead of __IWMMXT__.
18817 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18818 (arm_arch_setup): New.
18819 (target_regsets): Remove #ifdef. Add VFP regset.
18820 (the_low_target): Use arm_arch_setup.
18821
12b42a12
DJ
188222009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18823
18824 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18825 the main thread again.
18826
ac8c974e
AR
188272009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18828
18829 Adding Neutrino gdbserver.
18830 * configure: Regenerated.
18831 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18832 * configure.srv (i[34567]86-*-nto*): New target.
18833 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18834 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18835 (nto_comctrl) [__QNX__]: New function.
18836 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18837
4424e0c3 188382009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
18839
18840 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18841 srv_tgtobj.
18842
912cf4ba
PA
188432009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18844 Pedro Alves <pedro@codesourcery.com>
18845
18846 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18847 don't support CONTEXT_EXTENDED_REGISTERS.
18848 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18849 (the_low_target): Install them.
18850 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18851 failing with ERROR_PIPE_NOT_CONNECTED.
18852
aa5ca48f
DE
188532009-06-30 Doug Evans <dje@google.com>
18854 Pierre Muller <muller@ics.u-strasbg.fr>
18855
18856 Add h/w watchpoint support to x86-linux, win32-i386.
18857 * Makefile.in (SFILES): Add i386-low.c
18858 (i386_low_h): Define.
18859 (i386-low.o): Add dependencies.
18860 (linux-x86-low.o): Add i386-low.h dependency.
18861 (win32-i386-low.o): Ditto.
18862 * i386-low.c: New file.
18863 * i386-low.h: New file.
18864 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18865 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18866 * linux-low.c (linux_add_process): Initialize arch_private.
18867 (linux_remove_process): Free arch_private.
18868 (add_lwp): Initialize arch_private.
18869 (delete_lwp): Free arch_private.
18870 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18871 provided.
18872 * linux-low.h (process_info_private): New member arch_private.
18873 (lwp_info): New member arch_private.
18874 (linux_target_ops): New members new_process, new_thread,
18875 prepare_to_resume.
18876 (ptid_of): New macro.
18877 * linux-x86-low.c: Include stddef.h, i386-low.h.
18878 (arch_process_info): New struct.
18879 (arch_lwp_info): New struct.
18880 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18881 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18882 (i386_dr_low_get_status): New function.
18883 (x86_insert_point, x86_remove_point): New functions.
18884 (x86_stopped_by_watchpoint): New function.
18885 (x86_stopped_data_address): New function.
18886 (x86_linux_new_process, x86_linux_new_thread): New functions.
18887 (x86_linux_prepare_to_resume): New function.
18888 (the_low_target): Add entries for insert_point, remove_point,
18889 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
18890 prepare_to_resume.
18891 * server.c (debug_hw_points): New global.
18892 (monitor_show_help): Document set debug-hw-points.
18893 (handle_query): Process "set debug-hw-points".
18894 * server.h (debug_hw_points): Declare.
18895 (paddress): Declare.
18896 * utils.c (NUMCELLS, CELLSIZE): New macros.
18897 (get_sell, xsnprintf, paddress): New functions.
18898 * win32-arm-low.c (the_low_target): Add entries for insert_point,
18899 remove_point, stopped_by_watchpoint, stopped_data_address.
18900 * win32-i386-low.c: Include i386-low.h.
18901 (debug_reg_state): Replaces dr.
18902 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18903 (i386_dr_low_get_status): New function.
18904 (i386_insert_point, i386_remove_point): New functions.
18905 (i386_stopped_by_watchpoint): New function.
18906 (i386_stopped_data_address): New function.
18907 (i386_initial_stuff): Update.
18908 (get_thread_context,set_thread_context,i386_thread_added): Update.
18909 (the_low_target): Add entries for insert_point,
18910 remove_point, stopped_by_watchpoint, stopped_data_address.
18911 * win32-low.c (win32_insert_watchpoint): New function.
18912 (win32_remove_watchpoint): New function.
18913 (win32_stopped_by_watchpoint): New function.
18914 (win32_stopped_data_address): New function.
18915 (win32_target_ops): Add entries for insert_watchpoint,
18916 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
18917 * win32-low.h (win32_target_ops): New members insert_point,
18918 remove_point, stopped_by_watchpoint, stopped_data_address.
18919
d993e290
PA
189202009-06-25 Pedro Alves <pedro@codesourcery.com>
18921
18922 * server.c (process_serial_event): Re-return unsupported, not
18923 error, if the type isn't recognized. Re-allow supporting only
18924 insert or remove packets. Also call require_running for
18925 breakpoints. Add missing break statement to default case. Tidy.
18926 * target.h (struct target_ops): Rename insert_watchpoint to
18927 insert_point, and remove_watchpoint to remove_point.
18928
18929 * linux-low.h (struct linux_target_ops): Likewise.
18930 * linux-low.c (linux_insert_watchpoint): Rename to ...
18931 (linux_insert_point): ... this. Adjust.
18932 (linux_remove_watchpoint): Rename to ...
18933 (linux_remove_point): ... this. Adjust.
18934 (linux_target_ops): Adjust.
18935 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
18936 (cris_insert_point): ... this.
18937 (cris_remove_watchpoint): Rename to ...
18938 (cris_remove_point): ... this.
18939 (the_low_target): Adjust.
18940
0f54c268
PM
189412009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
18942
18943 * server.c (handle_v_kill): Pass signal_pid to
18944 kill_inferior if multi_process is zero.
18945
c6314022
AR
189462009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
18947
18948 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
18949 * target.h (target_ops): Comment for *_watchpoint to make it clear
18950 the functions can get types '0' and '1'.
18951
4463ce24
AR
189522009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
18953
18954 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
18955 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
18956 * regcache.c (get_regcache): Likewise.
18957 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
18958 * win32-low.c (child_fetch_inferior_registers): Remove check for
18959 regno 0.
18960
cf8fd78b
PA
189612009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
18962 Pedro Alves <pedro@codesourcery.com>
18963
18964 * target.h (struct target_ops) <supports_multi_process>: New
18965 callback.
18966 (target_supports_multi_process): New.
18967 * server.c (handle_query): Even if GDB reports support, only
18968 enable multi-process if the target also supports it. Report
18969 multi-process support only if the target backend supports it.
18970 * linux-low.c (linux_supports_multi_process): New function.
18971 (linux_target_ops): Install it as target_supports_multi_process
18972 callback.
18973
47c0c975
DE
189742009-05-24 Doug Evans <dje@google.com>
18975
e09875d4
DE
18976 Global renaming of find_thread_pid to find_thread_ptid.
18977 * server.h (find_thread_ptid): Renamed from find_thread_pid.
18978 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
18979 All callers updated.
18980
e27d73f6
DE
18981 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
18982 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
18983 directly.
18984
47c0c975
DE
18985 * linux-low.c (get_stop_pc): Print pc if debug_threads.
18986 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
18987 (linux_resume_one_lwp): Ditto.
18988
2acc282a
DE
189892009-05-23 Doug Evans <dje@google.com>
18990
18991 * linux-low.c (linux_resume_one_lwp): Change type of first arg
18992 from struct inferior_list_entry * to struct lwp_info *.
18993 All callers updated.
18994
9f1036c1
DE
189952009-05-13 Doug Evans <dje@google.com>
18996
18997 * linux-x86-low.c: Don't include assert.h.
18998 (x86_siginfo_fixup): Use fatal, not assert.
18999 (x86_arch_setup): Fix comment.
19000
d0722149
DE
190012009-05-12 Doug Evans <dje@google.com>
19002
19003 Biarch support for i386/amd64 gdbserver.
19004 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19005 Add linux-x86-low.c.
19006 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19007 (linux-x86-low.o): Add.
19008 * linux-x86-64-low.c: Delete.
19009 * linux-i386-low.c: Delete.
19010 * linux-x86-low.c: New file.
19011 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19012 linux-x86-low.o.
19013 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19014 linux-x86-low.o.
19015 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19016 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19017 (linux_child_pid_to_exec_file): New function.
19018 (elf_64_header_p, elf_64_file_p): New functions.
19019 (siginfo_fixup): New function.
19020 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19021 give target a chance to convert layout.
19022 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19023 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19024
fdeb2a12
DE
190252009-05-07 Doug Evans <dje@google.com>
19026
19027 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19028 (regsets_store_inferior_registers): Ditto.
19029
a6dbe5df
PA
190302009-05-06 Pedro Alves <pedro@codesourcery.com>
19031
19032 PR server/10048
19033
19034 * linux-low.c (must_set_ptrace_flags): Delete.
19035 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19036 of the global.
19037 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19038 `lwp->must_set_ptrace_flags' instead.
ba42693b 19039 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
19040 (linux_wait_1): ... not here.
19041
5091eb23
DE
190422009-04-30 Doug Evans <dje@google.com>
19043
9f767825
DE
19044 * inferiors.c (started_inferior_callback): New function.
19045 (attached_inferior_callback): New function.
19046 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19047 * server.c (print_started_pid, print_attached_pid): New functions.
19048 (detach_or_kill_for_exit): New function.
19049 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19050 * server.h (have_started_inferiors_p): Declare.
19051 (have_attached_inferiors_p): Declare.
19052
5091eb23
DE
19053 * inferiors.c (remove_process): Fix memory leak, free process.
19054 * linux-low.c (linux_remove_process): New function.
19055 (linux_kill): Call it instead of remove_process.
19056 (linux_detach, linux_wait_1): Ditto.
19057
155c8968
PA
190582009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19059
19060 * configure.srv: Add x86 Windows CE target.
19061
7fe519cb
UW
190622009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19063
19064 * inferiors.c (get_thread_process): Make global.
19065 * server.h (get_thread_process): Add prototype.
19066 * thread-db.c (find_one_thread): Use get_thread_process
19067 instead of current_process.
19068 (thread_db_get_tls_address): Do not crash if called when
19069 thread layer is not yet initialized.
19070
5472f405
UW
190712009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19072
19073 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19074 * spu-low.c (current_tid): Rename to ...
19075 (current_ptid): ... this.
19076 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19077 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19078 ptid_get_lwp (current_ptid) instead of current_tid.
19079 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19080 instead of current_tid. Use find_process_pid to verify pid
19081 argument is valid. Pass proper argument to remove_process.
19082 (spu_thread_alive): Compare current_ptid instead of current_tid.
19083 (spu_resume): Likewise.
19084
55ac2b99
PA
190852009-04-02 Pedro Alves <pedro@codesourcery.com>
19086
19087 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19088 variable.
19089
95954743
PA
190902009-04-01 Pedro Alves <pedro@codesourcery.com>
19091
19092 Implement the multiprocess extensions, and add linux multiprocess
19093 support.
19094
19095 * server.h (ULONGEST): Declare.
19096 (struct ptid, ptid_t): New.
19097 (minus_one_ptid, null_ptid): Declare.
19098 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19099 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19100 (struct inferior_list_entry): Change `id' type from unsigned from
19101 to ptid_t.
19102 (struct sym_cache, struct breakpoint, struct
19103 process_info_private): Forward declare.
19104 (struct process_info): Declare.
19105 (current_process): Declare.
19106 (all_processes): Declare.
19107 (initialize_inferiors): Declare.
19108 (add_thread): Adjust to use ptid_t.
19109 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19110 (add_process, remove_process, find_thread_pid): Declare.
19111 (find_inferior_id): Adjust to use ptid_t.
19112 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19113 (multi_process): Declare.
19114 (push_event): Adjust to use ptid_t.
19115 (read_ptid, write_ptid): Declare.
19116 (prepare_resume_reply): Adjust to use ptid_t.
19117 (clear_symbol_cache): Declare.
19118 * inferiors.c (all_processes): New.
19119 (null_ptid, minus_one_ptid): New.
19120 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19121 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19122 (add_thread): Change unsigned long to ptid. Remove gdb_id
19123 parameter. Adjust.
19124 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19125 (gdb_id_to_thread): Rename to ...
19126 (find_thread_pid): ... this. Change unsigned long to ptid.
19127 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19128 (loaded_dll, pull_pid_from_list): Adjust.
19129 (add_process, remove_process, find_process_pid)
19130 (get_thread_process, current_process, initialize_inferiors): New.
19131 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19132 (struct target_waitstatus) <related_pid>: Ditto.
19133 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19134 return type to int.
19135 (struct target_ops) <join>: Add `pid' argument.
19136 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19137 (struct target_ops) <wait>: Add `ptid' field. Change return type
19138 to ptid.
19139 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19140 (mywait): Add `ptid' argument. Change return type to ptid_t.
19141 (target_pid_to_str): Declare.
19142 * target.c (set_desired_inferior): Adjust to use ptids.
19143 (mywait): Add new `ptid' argument. Adjust.
19144 (target_pid_to_str): New.
19145 * mem-break.h (free_all_breakpoints): Declare.
19146 * mem-break.c (breakpoints): Delelete.
19147 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19148 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19149 to use per-process breakpoint list.
19150 (free_all_breakpoints): New.
19151 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19152 (symbol_cache, all_symbols_looked_up): Delete.
19153 (hexchars): New.
19154 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19155 read_ptid): New.
19156 (prepare_resume_reply): Change ptid argument's type from unsigned
19157 long to ptid_t. Adjust. Implement W;process and X;process.
19158 (free_sym_cache, clear_symbol_cache): New.
19159 (look_up_one_symbol): Adjust to per-process symbol cache. *
19160 * server.c (cont_thread, general_thread, step_thread): Change type
19161 to ptid_t.
19162 (attached): Delete.
19163 (multi_process): New.
19164 (last_ptid): Change type to ptid_t.
19165 (struct vstop_notif) <ptid>: Change type to ptid_t.
19166 (queue_stop_reply, push_event): Change `ptid' argument's type to
19167 ptid_t.
19168 (discard_queued_stop_replies): Add `pid' argument.
19169 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19170 changes. Don't reference the `attached' global.
19171 (attach_inferior): Adjust to mywait interface changes.
19172 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19173 features. Handle and report "multiprocess+". Handle
19174 "qAttached:PID".
19175 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19176 changes.
19177 (handle_v_kill): New.
19178 (handle_v_stopped): Adjust to use target_pid_to_str.
19179 (handle_v_requests): Allow multiple attaches and runs when
19180 multiprocess extensions are in effect. Handle "vKill".
19181 (myresume): Adjust to use ptids.
19182 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19183 (handle_status): Adjust to discard_queued_stop_replies interface
19184 change.
19185 (first_thread_of, kill_inferior_callback)
19186 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19187 (main): Call initialize_inferiors. Adjust to use ptids, killing
19188 and detaching from all inferiors. Handle multiprocess packet
19189 variants.
19190 * linux-low.h: Include gdb_proc_service.h.
19191 (struct process_info_private): New.
19192 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19193 <lwpid_of>: Use ptid_get_lwp.
19194 (get_lwp_thread): Adjust.
19195 (struct lwp_info): Add `dead' member.
19196 (find_lwp_pid): Declare.
19197 * linux-low.c (thread_db_active): Delete.
19198 (new_inferior): Adjust comment.
19199 (inferior_pid): Delete.
19200 (linux_add_process): New.
19201 (handle_extended_wait): Adjust.
19202 (add_lwp): Change unsigned long to ptid.
19203 (linux_create_inferior): Add process to processes table. Adjust
19204 to use ptids. Don't set new_inferior here.
19205 (linux_attach_lwp): Rename to ...
19206 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19207 it. Adjust to use ptids.
19208 (linux_attach_lwp): New.
19209 (linux_attach): Add process to processes table. Don't set
19210 new_inferior here.
19211 (struct counter): New.
19212 (second_thread_of_pid_p, last_thread_of_process_p): New.
19213 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19214 multiple processes.
19215 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19216 processes. Remove process from process table.
19217 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19218 to multiple processes.
19219 (any_thread_of): New.
19220 (linux_detach): Add `pid' argument, and handle it. Remove process
19221 from processes table.
19222 (linux_join): Add `pid' argument. Handle it.
19223 (linux_thread_alive): Change unsighed long argument to ptid_t.
19224 Consider dead lwps as not being alive.
19225 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19226 threads we're not interested in.
19227 (same_lwp, find_lwp_pid): New.
19228 (linux_wait_for_lwp): Change `pid' argument's type from int to
19229 ptid_t. Adjust.
19230 (linux_wait_for_event): Rename to ...
19231 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19232 from int to ptid_t. Adjust.
19233 (linux_wait_for_event): New.
19234 (linux_wait_1): Add `ptid' argument. Change return type to
19235 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19236 that exit from the process table.
19237 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19238 Adjust.
19239 (mark_lwp_dead): New.
19240 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19241 stopping all threads, mark its main lwp as dead.
19242 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19243 ptids.
19244 (fetch_register, usr_store_inferior_registers)
19245 (regsets_fetch_inferior_registers)
19246 (regsets_store_inferior_registers, linux_read_memory)
19247 (linux_write_memory): Inline `inferior_pid'.
19248 (linux_look_up_symbols): Adjust to use per-process
19249 `thread_db_active'.
19250 (linux_request_interrupt): Adjust to use ptids.
19251 (linux_read_auxv): Inline `inferior_pid'.
19252 (initialize_low): Don't reference thread_db_active.
19253 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19254 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19255 (ps_getpid): Return the pid of the current inferior.
19256 * thread-db.c (proc_handle, thread_agent): Delete.
19257 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19258 per-process data.
19259 (find_one_thread): Change argument type to ptid_t. Adjust to
19260 per-process data.
19261 (maybe_attach_thread): Adjust to per-process data and ptids.
19262 (thread_db_find_new_threads): Ditto.
19263 (thread_db_init): Ditto.
19264 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19265 processes table. Adjust to use ptids.
19266 (spu_kill, spu_detach): Adjust interface. Remove process from
19267 processes table.
19268 (spu_join, spu_thread_alive): Adjust interface.
19269 (spu_wait): Adjust interface. Remove process from processes
19270 table. Adjust to use ptids.
19271 * win32-low.c (current_inferior_tid): Delete.
19272 (current_inferior_ptid): New.
19273 (debug_event_ptid): New.
19274 (thread_rec): Take a ptid. Adjust.
19275 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19276 (child_delete_thread): Ditto.
19277 (do_initial_child_stuff): Add `attached' argument. Add process to
19278 processes table.
19279 (child_fetch_inferior_registers, child_store_inferior_registers):
19280 Adjust.
19281 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19282 (win32_attach): Pass 1 to do_initial_child_stuff.
19283 (win32_kill): Adjust interface. Remove process from processes
19284 table.
19285 (win32_detach): Ditto.
19286 (win32_join): Adjust interface.
19287 (win32_thread_alive): Take a ptid.
19288 (win32_resume): Adjust to use ptids.
19289 (get_child_debug_event): Ditto.
19290 (win32_wait): Adjust interface. Remove exiting process from
19291 processes table.
19292
bd99dc85
PA
192932009-04-01 Pedro Alves <pedro@codesourcery.com>
19294
19295 Non-stop mode support.
19296
19297 * server.h (non_stop): Declare.
19298 (gdb_client_data, handler_func): Declare.
19299 (delete_file_handler, add_file_handler, start_event_loop):
19300 Declare.
19301 (handle_serial_event, handle_target_event, push_event)
19302 (putpkt_notif): Declare.
19303 * target.h (enum resume_kind): New.
19304 (struct thread_resume): Replace `step' field by `kind' field.
19305 (TARGET_WNOHANG): Define.
19306 (struct target_ops) <wait>: Add `options' argument.
19307 <supports_non_stop, async, start_non_stop>: New fields.
19308 (target_supports_non_stop, target_async): New.
19309 (start_non_stop): Declare.
19310 (mywait): Add `options' argument.
19311 * target.c (mywait): Add `options' argument. Print child exit
19312 notifications here.
19313 (start_non_stop): New.
19314 * server.c (non_stop, own_buf, mem_buf): New globals.
19315 (struct vstop_notif): New.
19316 (notif_queue): New global.
19317 (queue_stop_reply, push_event, discard_queued_stop_replies)
19318 (send_next_stop_reply): New.
19319 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19320 interface changes.
19321 (attach_inferior): In non-stop mode, don't wait for the target
19322 here.
19323 (handle_general_set): Handle QNonStop.
19324 (handle_query): When handling qC, return the current general
19325 thread, instead of the first thread of the list.
19326 (handle_query): If the backend supports non-stop mode, include
19327 QNonStop+ in the qSupported query response.
19328 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19329 and non-stop mode.
19330 (handle_v_attach, handle_v_run): Handle non-stop mode.
19331 (handle_v_stopped): New.
19332 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19333 (myresume): Adjust to use resume_kind. Handle non-stop.
19334 (queue_stop_reply_callback): New.
19335 (handle_status): Handle non-stop mode.
19336 (main): Clear non_stop flag on reconnection. Use the event-loop.
19337 Refactor serial protocol handling from here ...
19338 (process_serial_event): ... to this new function. When GDB
19339 selects any thread, select one here. In non-stop mode, wait until
19340 GDB acks all pending events before exiting.
19341 (handle_serial_event, handle_target_event): New.
19342 * remote-utils.c (remote_open): Install remote_desc in the event
19343 loop.
19344 (remote_close): Remove remote_desc from the event loop.
19345 (putpkt_binary): Rename to...
19346 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19347 (putpkt_binary): New as wrapper around putpkt_binary_1.
19348 (putpkt_notif): New.
19349 (prepare_resume_reply): In non-stop mode, don't change the
19350 general_thread.
19351 * event-loop.c: New.
19352 * Makefile.in (OBJ): Add event-loop.o.
19353 (event-loop.o): New rule.
19354
19355 * linux-low.h (pid_of): Moved here.
19356 (lwpid_of): New.
19357 (get_lwp_thread): Use lwpid_of.
19358 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19359 * linux-low.c (pid_of): Delete.
19360 (inferior_pid): Use lwpid_of.
19361 (linux_event_pipe): New.
19362 (target_is_async_p): New.
19363 (delete_lwp): New.
19364 (handle_extended_wait): Use lwpid_of.
19365 (add_lwp): Don't set lwpid field.
19366 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19367 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19368 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19369 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19370 first. Adjust to linux_wait_for_event interface changes. Use
19371 lwpid_of.
19372 (linux_detach): Don't delete the main lwp here.
19373 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19374 (status_pending_p): Don't consider explicitly suspended lwps.
19375 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19376 pointer. Add OPTIONS argument. Change return type to int. Use
19377 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19378 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19379 pointer. Add status pointer argument. Return a pid instead of a
19380 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19381 changes. In non-stop mode, don't switch to a random thread.
19382 (linux_wait): Rename to...
19383 (linux_wait_1): ... this. Add target_options argument, and handle
19384 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19385 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19386 clean exit and signal exit code. Don't stop all threads in
19387 non-stop mode. In all-stop mode, only stop all threads when
19388 reporting a stop to GDB. Handle explicit thread stop requests.
19389 (async_file_flush, async_file_mark): New.
19390 (linux_wait): New.
19391 (send_sigstop): Use lwpid_of.
19392 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19393 interface changes. In non-stop mode, don't switch to a random
19394 thread.
19395 (linux_resume_one_lwp): Use lwpid_of.
19396 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19397 (linux_resume_one_thread): ... this. Handle resume_stop. In
19398 non-stop mode, don't look for pending flag in all threads.
19399 (resume_status_pending_p): Don't consider explicitly suspended
19400 threads.
19401 (my_waitpid): Reimplement. Emulate __WALL.
19402 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19403 Use lwpid_of.
19404 (sigchld_handler, linux_supports_non_stop, linux_async)
19405 (linux_start_non_stop): New.
19406 (linux_target_ops): Register linux_supports_non_stop, linux_async
19407 and linux_start_non_stop.
19408 (initialize_low): Install SIGCHLD handler.
19409 * thread-db.c (thread_db_create_event, find_one_thread)
19410 (thread_db_get_tls_address): Use lwpid_of.
19411 * win32-low.c (win32_detach): Adjust to use resume_kind.
19412 (win32_wait): Add `options' argument.
19413 * spu-low.c (spu_resume): Adjust to use resume_kind.
19414 (spu_wait): Add `options' argument.
19415
5b1c542e
PA
194162009-04-01 Pedro Alves <pedro@codesourcery.com>
19417
19418 Decouple target code from remote protocol.
19419
19420 * target.h (enum target_waitkind): New.
19421 (struct target_waitstatus): New.
19422 (struct target_ops) <wait>: Return an unsigned long. Take a
19423 target_waitstatus pointer instead of a char pointer.
19424 (mywait): Likewise.
19425 * target.c (mywait): Change prototype to return an unsigned long.
19426 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19427 * server.h (thread_from_wait, old_thread_from_wait): Delete
19428 declarations.
19429 (prepare_resume_reply): Change prototype to take a
19430 target_waitstatus.
19431 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19432 (last_status, last_ptid): New.
19433 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19434 pid instead of a signal.
19435 (attach_inferior): Remove "status" and "signal" parameters.
19436 Adjust.
19437 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19438 not as an address.
19439 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19440 (handle_v_requests, myresume): Remove "status" and "signal"
19441 parameters. Adjust.
19442 (handle_status): New.
19443 (main): Delete local `status'. Adjust.
19444 * remote-utils.c: Include target.h.
19445 (prepare_resume_reply): Change prototype to take a
19446 target_waitstatus. Adjust.
19447
19448 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19449 interface.
19450 * spu-low.c (spu_wait): Adjust.
19451 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19452 Delete.
19453 (win32_wait): Adjust.
19454
2bd7c093
PA
194552009-04-01 Pedro Alves <pedro@codesourcery.com>
19456
19457 * target.h (struct thread_resume): Delete leave_stopped member.
19458 (struct target_ops): Add a `n' argument to the `resume' callback.
19459 * server.c (start_inferior): Adjust.
19460 (handle_v_cont, myresume): Adjust.
19461 * linux-low.c (check_removed_breakpoint): Adjust to resume
19462 interface change, and to removed leave_stopped field.
19463 (resume_ptr): Delete.
19464 (struct thread_resume_array): New.
19465 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19466 resume interface change.
19467 (linux_continue_one_thread, linux_queue_one_thread)
19468 (resume_status_pending_p): Check if the resume field is NULL
19469 instead of checking the leave_stopped member.
19470 (linux_resume): Adjust to the target resume interface change.
19471 * spu-low.c (spu_resume): Adjust to the target resume interface
19472 change.
19473 * win32-low.c (win32_detach, win32_resume): Ditto.
19474
c35fafde
PA
194752009-04-01 Pedro Alves <pedro@codesourcery.com>
19476
19477 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19478 flag.
19479 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19480 pending.
19481 (linux_continue_one_thread): Only preserve the stepping flag if
19482 there's a pending breakpoint.
19483
0a59d50b
PA
194842009-03-31 Pedro Alves <pedro@codesourcery.com>
19485
19486 * server.c (main): After the inferior having exited, call
19487 remote_close before exiting gdbserver.
19488
f04c6d38
TJB
194892009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19490
19491 Fix size of FPSCR in Power 7 processors.
19492 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19493 (PPC_FEATURE_HAS_DFP): New #define.
19494 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19495 size of the FPSCR.
19496
78e5cee6
PA
194972009-03-23 Pedro Alves <pedro@codesourcery.com>
19498
19499 * server.c (handle_query) Whitespace and formatting.
19500
1b3f6016
PA
195012009-03-22 Pedro Alves <pedro@codesourcery.com>
19502
19503 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19504 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19505 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19506 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19507 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19508 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19509 Makefile.in, configure.ac: Fix whitespace throughout.
19510 * configure: Regenerate.
19511
a07b2135
PA
195122009-03-22 Pedro Alves <pedro@codesourcery.com>
19513
19514 * inferiors.c (find_inferior): Make it safe for the callback
19515 function to delete the currently iterated inferior.
19516
67cc2626
PA
195172009-03-22 Pedro Alves <pedro@codesourcery.com>
19518
19519 * Makefile.in (linuw_low_h): Move higher.
19520 (thread-db.o): Depend on $(linux_low_h).
19521
54a0b537
PA
195222009-03-17 Pedro Alves <pedro@codesourcery.com>
19523
19524 Rename "process" to "lwp" throughout.
19525
19526 * linux-low.c (all_processes): Rename to...
19527 (all_lwps): ... this.
19528 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19529 (add_process): Rename to ...
19530 (add_lwp): ... this. Adjust.
19531 (linux_create_inferior): Adjust.
19532 (linux_attach_lwp): Adjust.
19533 (linux_attach): Adjust.
19534 (linux_kill_one_process): Rename to ...
19535 (linux_kill_one_lwp): ... this. Adjust.
19536 (linux_kill): Adjust.
19537 (linux_detach_one_process): Rename to ...
19538 (linux_detach_one_lwp): ... this. Adjust.
19539 (linux_detach): Adjust.
19540 (check_removed_breakpoint): Adjust.
19541 (status_pending_p): Adjust.
19542 (linux_wait_for_process): Rename to ...
19543 (linux_wait_for_lwp): ... this. Adjust.
19544 (linux_wait_for_event): Adjust.
19545 (send_sigstop): Adjust.
19546 (wait_for_sigstop): Adjust.
19547 (stop_all_processes): Rename to ...
19548 (stop_all_lwps): ... this.
19549 (linux_resume_one_process): Rename to ...
19550 (linux_resume_one_lwp): ... this. Adjust.
19551 (linux_set_resume_request, linux_continue_one_thread)
19552 (linux_queue_one_thread, resume_status_pending_p)
19553 (usr_store_inferior_registers, regsets_store_inferior_registers)
19554 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19555 Adjust.
19556 * linux-low.h (get_process): Rename to ...
19557 (get_lwp): ... this. Adjust.
19558 (get_thread_process): Rename to ...
19559 (get_thread_lwp): ... this. Adjust.
19560 (get_process_thread): Rename to ...
19561 (get_lwp_thread): ... this. Adjust.
19562 (struct process_info): Rename to ...
19563 (struct lwp_info): ... this.
19564 (all_processes): Rename to ...
19565 (all_lwps): ... this.
19566 * proc-service.c (ps_lgetregs): Adjust.
19567 * thread-db.c (thread_db_create_event, find_one_thread)
19568 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19569
0b16c5cf
PA
195702009-03-14 Pedro Alves <pedro@codesourcery.com>
19571
19572 * server.c (handle_query): Handle "qAttached".
19573
32de4b9d
NS
195742009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19575
19576 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19577 GPLv3, update license URL.
19578
2aecd87f
DE
195792009-03-01 Doug Evans <dje@google.com>
19580
93efd302 19581 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
19582 (server_h): Add gdb_signals.h.
19583 (signals.o): Update.
19584 * server.h (target_signal_from_host,target_signal_to_host_p)
19585 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19586
86b1f9c5
PM
195872009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19588
19589 * remote-utils.c (getpkt): Also generate remote-debug
19590 information if noack_mode is set.
19591
4aa995e1
PA
195922009-02-06 Pedro Alves <pedro@codesourcery.com>
19593
19594 * server.c (handle_query): Report qXfer:siginfo:read and
19595 qXfer:siginfo:write as supported and handle them.
19596 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19597 * linux-low.c (linux_xfer_siginfo): New.
19598 (linux_target_ops): Set it.
19599
62709adf
PA
196002009-01-26 Pedro Alves <pedro@codesourcery.com>
19601
19602 * server.c (gdbserver_usage): Mention --remote-debug.
19603 (main): Accept '--remote-debug' switch.
19604
aef93bd7
DE
196052009-01-18 Doug Evans <dje@google.com>
19606
19607 * regcache.c (new_register_cache): No need to check result of xcalloc.
19608 * server.c (handle_search_memory): Back out calls to xmalloc,
19609 result is checked and error is returned to user upon failure.
19610 (handle_query): Ditto. Add more checks for result of malloc.
19611 (handle_v_cont): Check result of malloc, report error back to
19612 user upon failure.
19613 (handle_v_run): Ditto. Call freeargv.
19614 * server.h (freeargv): Declare.
19615 * utils.c (freeargv): New fn.
19616
54363045
DE
196172009-01-15 Doug Evans <dje@google.com>
19618
f626972c
DE
19619 * gdbreplay.c (perror_with_name): Make arg const char *.
19620 * server.h (target_signal_to_name): Make return type const char *.
0842e787 19621 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 19622 * utils.c (perror_with_name): Make arg const char *.
54363045 19623
18aae699
PA
196242009-01-14 Pedro Alves <pedro@codesourcery.com>
19625
19626 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19627 when handling a EXIT_PROCESS_DEBUG_EVENT.
19628
ff703abe
JB
196292009-01-06 Joel Brobecker <brobecker@adacore.com>
19630
19631 * gdbreplay.c (gdbreplay_version): Update copyright year.
19632 * server.c (gdbserver_version): Likewise.
19633
f21cc1a2 196342009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
19635
19636 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 19637 (handle_extended_wait): Improve comment.
0e21c1ec 19638
bca929d3
DE
196392008-12-13 Doug Evans <dje@google.com>
19640
19641 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19642 * server.h (ATTR_MALLOC): New macro.
19643 (xmalloc,xcalloc,xstrdup): Declare.
19644 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19645 * inferiors.c: Ditto.
19646 * linux-low.c: Ditto.
19647 * mem-break.c: Ditto.
19648 * regcache.c: Ditto.
19649 * remote-utils.c: Ditto.
19650 * server.c: Ditto.
19651 * target.c: Ditto.
19652 * win32-low.c: Ditto.
19653
97438e3f
DE
196542008-12-12 Doug Evans <dje@google.com>
19655
896c7fbb
DE
19656 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19657 in debugging printf.
19658
97438e3f
DE
19659 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19660
e3b886f8
DE
196612008-12-09 Doug Evans <dje@google.com>
19662
19663 * linux-low.h (struct process_info): Delete member tid, unused.
19664 * thread-db.c (find_one_thread): Update.
19665 (maybe_attach_thread): Update.
19666
07e059b5
VP
196672008-12-02 Pedro Alves <pedro@codesourcery.com>
19668
889bf7c5
PA
19669 * target.h (struct target_ops): Add qxfer_osdata member.
19670 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19671 and dirent.h.
19672 (linux_qxfer_osdata): New functions.
19673 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19674 callback.
19675 * server.c (handle_query): Handle "qXfer:osdata:read:".
19676 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19677 (buffer_xml_printf): New functions.
19678 * server.h (struct buffer): New.
19679 (buffer_grow_str, buffer_grow_str0): New macros.
19680 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19681 (buffer_xml_printf): Declare.
07e059b5 19682
4cab47ab
DE
196832008-11-24 Doug Evans <dje@google.com>
19684
19685 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19686
f142445f
DJ
196872008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19688
19689 * server.c (handle_v_run): Always use the supplied argument list.
19690
d0107bb6 196912008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 19692
d0107bb6
BW
19693 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19694 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 19695
2c4ad781
TJB
196962008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19697
19698 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19699 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19700 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19701 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19702 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19703 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19704 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19705 XML target descriptions.
19706 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19707 when inferior is running on an ISA 2.05 or later processor. Add
19708 special case to return offset for full 64-bit slot of FPSCR when
19709 in 32-bits.
19710
dfb64f85
DJ
197112008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19712
19713 * Makefile.in (SFILES, clean): Added sparc64 files.
19714 (reg-sparc64.o, reg-sparc64.c): New.
19715 * configure.srv (sparc*-*-linux*): New configuration.
19716 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19717 syscall arguments for SPARC.
19718 (regsets_store_inferior_registers): Likewise.
19719 * linux-sparc-low.c: New file.
19720
66b6e1dd
DE
197212008-10-21 Doug Evans <dje@google.com>
19722
19723 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19724 (READLINE_DIR,READLINE_DEP): Delete.
19725 (INTERNAL_CFLAGS): Update.
19726 (LINTFLAGS): Update.
19727
9b710a42
PA
197282008-10-10 Pedro Alves <pedro@codesourcery.com>
19729
19730 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19731 whole argv from the last run, not just argv[0].
19732
5822d809
PA
197332008-09-08 Pedro Alves <pedro@codesourcery.com>
19734
19735 * regcache.c (new_register_cache): Return NULL if the register
19736 cache size isn't known yet.
19737 (free_register_cache): Avoid dereferencing a NULL regcache.
19738
74aac56f
DJ
197392008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19740
19741 * configure.srv: Merge MIPS and MIPS64.
19742
400b20f5
MR
197432008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19744
19745 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19746
677c5bb1
LM
197472008-08-18 Luis Machado <luisgpm@br.ibm.com>
19748
19749 * Makefile.in: Add required vsx dependencies.
19750
19751 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19752 Declare init_registers_powerpc_vsx32l.
19753 Declare init_registers_powerpc_vsx64l.
19754 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19755 (ppc_arch_setup): Check for VSX in hwcap.
19756 (ppc_fill_vsxregset): New function.
19757 (ppc_store_vsxregset): New function.
19758 Add new VSX entry in regset_info target_regsets.
19759
19760 * configure.srv: Add new VSX dependencies.
19761
a6f3e723
SL
197622008-08-12 Pedro Alves <pedro@codesourcery.com>
19763
19764 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19765 (remote_open): Set or clear transport_is_reliable.
19766 (putpkt_binary): Don't expect acks in noack mode.
19767 (getpkt): Don't send ack/nac in noack mode.
19768 * server.c (handle_general_set): Handle QStartNoAckMode.
19769 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19770 qSupported.
19771 (main): Reset noack_mode on every connection.
19772 * server.h (noack_mode): Declare.
19773
a417dc56
RW
197742008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19775
19776 * Makefile.in (GDBREPLAY_OBS): New variable.
19777 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19778
3221518c
UW
197792008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19780 Daniel Jacobowitz <dan@codesourcery.com>
19781
19782 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19783 (usr_store_inferior_registers): Likewise.
19784 (regsets_store_inferior_registers): Likewise.
19785
ec56be1b
PA
197862008-07-31 Rolf Jansen <rj@surtec.com>
19787 Pedro Alves <pedro@codesourcery.com>
19788
19789 * configure.ac: Check for memmem declaration.
19790 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19791 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19792 (disable_packet_qfThreadInfo): Unconditionally compile.
19793 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19794 * configure, config.in: Regenerate.
19795
2fe5e3ff
DE
197962008-07-28 Doug Kwan <dougkwan@google.com>
19797
19798 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19799 (linux_write_memory): Remove declaration of errno.
19800
836acd6d
UW
198012008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19802
19803 * linux-low.c (handle_extended_wait): Do not use "status"
19804 variable uninitialized.
19805
aeba519e
PA
198062008-07-07 Pedro Alves <pedro@codesourcery.com>
19807
19808 * server.c (handle_v_attach): Inhibit reporting dll changes.
19809
db42f210
PA
198102008-06-27 Pedro Alves <pedro@codesourcery.com>
19811
19812 * remote-utils.c (prepare_resume_reply): If requested, don't
19813 output "thread:TID" in the T stop reply.
19814
19815 * server.c (disable_packet_vCont, disable_packet_Tthread)
19816 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19817 (handle_query): If requested, disable support for qC, qfThreadInfo
19818 and qsThreadInfo.
19819 (handle_v_requests): If requested, disable support for vCont.
19820 (gdbserver_show_disableable): New.
19821 (main): Handle --disable-packet and --disable-packet=LIST.
19822
19823 * server.h (disable_packet_vCont, disable_packet_Tthread)
19824 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19825
8e4c5421
CD
198262008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19827
19828 * server.c (gdbserver_usage): Mention --version.
19829
6e23a804
DJ
198302008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19831
19832 * Makefile.in (gdbreplay.o): New rule.
19833
90aa6a40
JM
198342008-06-06 Joseph Myers <joseph@codesourcery.com>
19835
19836 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19837 message, not gdbserver.
19838
c16158bc 198392008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
19840 Nathan Sidwell <nathan@codesourcery.com>
19841 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
19842
19843 * acinclude.m4: Include ../../config/acx.m4.
19844 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19845 * configure, config.in: Regenerate.
19846 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19847 * server.c (gdbserver_version): Print PKGVERSION.
19848 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19849 (main): Adjust gdbserver_usage calls.
19850 * gdbreplay.c (version, host_name): Add declarations.
19851 (gdbreplay_version, gdbreplay_usage): New.
19852 (main): Accept --version and --help options.
19853
aeb75bf5
DJ
198542008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19855
19856 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19857 (arm_breakpoint_at): Handle Thumb.
19858 (the_low_target): Add comment.
19859
76b233dd
UW
198602008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19861
19862 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19863
08388c79
DE
198642008-05-09 Doug Evans <dje@google.com>
19865
a3c83fae
DE
19866 * server.h (decode_search_memory_packet): Declare.
19867 * remote-utils.c (decode_search_memory_packet): New fn.
19868 * server.c (handle_search_memory_1): New fn.
08388c79
DE
19869 (handle_search_memory): New fn.
19870 (handle_query): Process qSearch:memory packets.
19871
bb9c3d36
UW
198722008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19873
19874 * regcache.c (registers_length): Remove.
19875 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19876 full register packet.
19877 * regcache.h (registers_length): Remove prototype.
19878 * server.h (PBUFSIZ): Define to 16384.
19879
7284e1be
UW
198802008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19881
19882 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19883 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19884 powerpc-64l.o, and powerpc-altivec64l.o.
19885 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
19886 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
19887 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
19888 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
19889 rs6000/power-linux.xml, and rs6000/power64-linux.xml
19890 to srv_xmlfiles.
19891
19892 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
19893 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
19894 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
19895 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
19896 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
19897 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
19898 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
19899 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
19900 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
19901 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
19902 (clean): Update.
19903
19904 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
19905 (init_registers_powerpc_32l): ... this new prototype.
19906 (init_registers_powerpc_32): Remove, replace by ...
19907 (init_registers_powerpc_altivec32l): ... this new prototype.
19908 (init_registers_powerpc_e500): Remove, replace by ...
19909 (init_registers_powerpc_e500l): ... this new prototype.
19910 (init_registers_ppc64): Remove, replace by ...
19911 (init_registers_powerpc_64l): ... this new prototype.
19912 (init_registers_powerpc_64): Remove, replace by ...
19913 (init_registers_powerpc_altivec64l): ... this new prototype.
19914 (ppc_num_regs): Set to 73.
19915 (PT_ORIG_R3, PT_TRAP): Define if necessary.
19916 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
19917 (ppc_cannot_store_register): Handle orig_r3 and trap.
19918 (ppc_arch_setup): Update init_registers_... calls.
19919 (ppc_fill_gregset): Handle orig_r3 and trap.
19920
19921 * inferiors.c (clear_inferiors): Reset current_inferior.
19922
fdc59709
PB
199232008-04-23 Paolo Bonzini <bonzini@gnu.org>
19924
889bf7c5
PA
19925 * acinclude.m4: Add override.m4.
19926 * configure: Regenerate.
fdc59709 19927
c9b2f845
UW
199282008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19929
19930 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
19931 initial call to init_register_ppc64.
19932
550512b8
UW
199332008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
19934
43aaf8b6
PA
19935 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
19936 single powerpc*-*-linux* case.
550512b8
UW
19937 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
19938
b6430ec3
UW
199392008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
19940
19941 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 19942 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
19943 from reg_xmlfiles.
19944 * linux-ppc-low.c: Include <elf.h>.
19945 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
19946 (ppc_hwcap): New global variable.
19947 (ppc_regmap): Remove __SPE__ #ifdef sections.
19948 (ppc_regmap_e500): New global variable.
19949 (ppc_cannot_store_register): Update __SPE__ special case.
19950 (ppc_get_hwcap): New function.
19951 (ppc_arch_setup): Use it to determine whether inferior supports
19952 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
19953 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
19954 Do not access registers if target does not support AltiVec.
19955 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
19956 Do not access registers if target does not support SPE.
19957 (target_regsets): Unconditionally include AltiVec and SPE regsets.
19958
52fa2412
UW
199592008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
19960
19961 * linux-low.c (disabled_regsets, num_regsets): New.
19962 (use_regsets_p): Delete.
19963 (linux_wait_for_process): Clear disabled_regsets.
19964 (regsets_fetch_inferior_registers): Check and set it.
19965 (regsets_store_inferior_registers): Likewise.
19966 (linux_fetch_registers, linux_store_registers): Do not use
19967 use_regsets_p.
19968 (initialize_low): Allocate disabled_regsets.
19969
e28b3332
DJ
199702008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
19971
19972 * Makefile.in (LIBOBJS): New.
19973 (OBS): Use LIBOBJS.
19974 (memmem.o): New rule.
19975 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
19976 * configure: Regenerated.
19977
4536995d
UW
199782008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
19979
19980 * server.c (handle_query): Never return "unsupported" for
19981 qXfer:features:read queries.
19982
221c031f
UW
199832008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
19984
19985 * server.c (get_features_xml): Fix inverted condition.
19986 (handle_query): Always support qXfer:feature:read.
19987
ccd213ac
DJ
199882008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
19989
19990 * server.c (wrapper_argv): New.
19991 (start_inferior): Handle wrapper_argv. If set, expect an extra
19992 trap.
19993 (gdbserver_usage): Document --wrapper.
19994 (main): Parse --wrapper.
19995
6fe305f7
UW
199962008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
19997
19998 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
19999 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20000 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20001 (ppc_set_pc): Likewise.
20002 (ppc_arch_setup): New function.
20003 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20004 of collect_register.
889bf7c5 20005 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 20006
5b0a002e
UW
200072008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20008
20009 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20010 instead of linux-ppc64-low.o.
20011 * linux-ppc64-low.c: Remove file.
20012 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20013 (linux-ppc64-low.o): Remove rule.
20014
20015 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20016 (init_registers_powerpc_64): Likewise.
20017 (ppc_regmap): Conditionally define depending on __powerpc64__.
20018 (ppc_cannot_store_register): Do not special-case "fpscr" when
20019 compiled on __powerpc64__.
20020 (ppc_collect_ptrace_register): New function.
20021 (ppc_supply_ptrace_register): New function.
20022 (ppc_breakpoint): Change type to "unsigned int".
20023 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20024 (the_low_target): Conditionally provide initializers for the
889bf7c5 20025 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
20026 collect_ptrace_register and supply_ptrace_register members.
20027
9b4b61c8
UW
200282008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20029
20030 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20031 * server.c (gdbserver_xmltarget): Define.
20032 (get_features_xml): Use it to replace "target.xml" and arch_string.
20033
20034 * configure.srv: Remove srv_xmltarget. Add XML files that were
20035 mentioned there to srv_xmlfiles instead. Remove conditional tests
20036 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20037 srv_xmlfiles and srv_regobj to include all possible choices.
20038 * configure.ac (srv_xmltarget): Remove.
20039 (srv_xmlfiles): Do not add "target.xml".
20040 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20041 checks for supplementary target information.
20042 * configure: Regenerate.
20043 * Makefile.in (XML_TARGET): Remove.
20044 (target.xml): Remove rule.
20045 (clean): Do not clean up target.xml.
20046 (.PRECIOUS): Do not mention target.xml.
20047
20048 * target.h (struct target_ops): Remove arch_string member.
20049 * linux-low.c (linux_arch_string): Remove.
20050 (linux_target_ops): Remove arch_string initializer.
20051 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20052 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20053 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20054 * spu-low.c (spu_arch_string): Remove.
20055 (spu_target_ops): Remove arch_string initializer.
20056 * win32-low.c (win32_arch_string): Remove.
20057 (win32_target_ops): Remove arch_string initializer.
20058 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20059 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20060 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20061
ee1a7ae4
UW
200622008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20063
20064 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20065 by collect_ptrace_register and supply_ptrace_register hooks.
20066 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20067 instead of checking for the_low_target.left_pad_xfer.
20068 (usr_store_inferior_registers): Use collect_ptrace_register callback
20069 instead of checking for the_low_target.left_pad_xfer.
20070
20071 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20072 (s390_supply_ptrace_register): Likewise.
20073 (s390_fill_gregset): Call s390_collect_ptrace_register.
20074 (the_low_target): Update.
20075
20076 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20077 (ppc_supply_ptrace_register): Likewise.
20078 (the_low_target): Update.
20079
20080 * linux-i386-low.c (the_low_target): Update.
20081 * linux-x86-64-low.c (the_low_target): Update.
20082
d61ddec4
UW
200832008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20084
20085 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20086 reg-s390.o and reg-s390x.o.
20087
20088 * linux-low.c (new_inferior): New global variable.
20089 (linux_create_inferior, linux_attach): Set it.
20090 (linux_wait_for_process): Call the_low_target.arch_setup after the
20091 target has stopped for the first time.
20092 (initialize_low): Do not call the_low_target.arch_setup.
20093
20094 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20095 (s390_set_pc): Likewise.
20096 (s390_arch_setup): New function.
20097 (the_low_target): Use s390_arch_setup as arch_setup routine.
20098
20099 * regcache.c (realloc_register_cache): New function.
20100 (set_register_cache): Call it for each existing regcache.
20101
d05b4ac3
UW
201022008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20103
20104 * server.h (init_registers): Remove prototype.
20105
20106 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20107 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20108 instead of init_registers ().
20109 * linux-arm-low.c (init_registers_arm): Add prototype.
20110 (init_registers_arm_with_iwmmxt): Likewise.
20111 (the_low_target): Add initializer for arch_setup field.
20112 * linux-cris-low.c (init_registers_cris): Add prototype.
20113 (the_low_target): Add initializer for arch_setup field.
20114 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20115 (the_low_target): Add initializer for arch_setup field.
20116 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20117 (the_low_target): Add initializer for arch_setup field.
20118 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20119 (the_low_target): Add initializer for arch_setup field.
20120 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20121 (the_low_target): Add initializer for arch_setup field.
20122 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20123 (the_low_target): Add initializer for arch_setup field.
20124 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20125 (init_registers_mips64_linux): Likewise.
20126 (the_low_target): Add initializer for arch_setup field.
20127 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20128 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20129 (the_low_target): Add initializer for arch_setup field.
20130 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20131 (init_registers_powerpc_64): Likewise.
20132 (the_low_target): Add initializer for arch_setup field.
20133 * linux-s390-low.c (init_registers_s390): Add prototype.
20134 (init_registers_s390x): Likewise.
20135 (the_low_target): Add initializer for arch_setup field.
20136 * linux-sh-low.c (init_registers_sh): Add prototype.
20137 (the_low_target): Add initializer for arch_setup field.
20138 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20139 (the_low_target): Add initializer for arch_setup field.
20140 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20141 (the_low_target): Add initializer for arch_setup field.
20142
20143 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20144 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20145 instead of init_registers ().
20146 * win32-arm-low.c (init_registers_arm): Add prototype.
20147 (the_low_target): Add initializer for arch_setup field.
20148 * win32-i386-low.c (init_registers_i386): Add prototype.
20149 (the_low_target): Add initializer for arch_setup field.
20150
20151 * spu-low.c (init_registers_spu): Add prototype.
20152 (initialize_low): Call initialie_registers_spu () instead of
20153 initialize_registers ().
20154
fd96d250
PA
201552008-02-19 Pedro Alves <pedro@codesourcery.com>
20156
20157 * server.c (handle_v_requests): When handling the vRun and vAttach
20158 packets, if already debugging a process, don't kill it. Return an
20159 error instead.
20160
d41b6bb4
DJ
201612008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20162
20163 * server.c (handle_query): Correct length check.
20164
5ac588cf
PA
201652008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20166
20167 * win32-low.c (do_initial_child_stuff): Add process handle
20168 parameter. Set current_process_handle and current_process_id from the
20169 parameters. Clear globals.
20170 (win32_create_inferior): Don't set current_process_handle and
20171 current_process_id here. Instead pass them on the call to
20172 do_initial_child_stuff.
20173 (win32_attach): Likewise.
20174 (win32_clear_inferiors): New.
20175 (win32_kill): Don't close the current process handle or the
20176 current thread handle here. Instead call win32_clear_inferiors.
20177 (win32_detach): Don't open a new handle to the process. Call
20178 win32_clear_inferiors.
20179 (win32_join): Don't rely on current_process_handle; open a new
20180 handle using the process id.
20181 (win32_wait): Call win32_clear_inferiors when the inferior process
20182 has exited.
20183
ecd7ecbc
DJ
201842008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20185
20186 * server.c (monitor_show_help): Add "exit".
20187
1525d545
MG
201882008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20189
ecd7ecbc 20190 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
20191 (clean): Add reg-xtensa.c.
20192 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
20193 * configure.srv (xtensa*-*-linux*) New target.
20194 * linux-xtensa-low.c: New.
20195 * xtensa-xtregs.c: New.
1525d545 20196
59a016f0
PA
201972008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20198
20199 * hostio.c: Don't include errno.h.
20200 (errno_to_fileio_errno): Move to hostio-errno.
20201 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20202 error number outputting to the target->hostio_last_error callback.
20203 (hostio_packet_error): Use FILEIO_EINVAL directly.
20204 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20205 calls to hostio_error.
20206 * hostio-errno.c: New.
20207 * server.h (hostio_last_error_from_errno): Declare.
20208 * target.h (target_ops): Add hostio_last_error member.
20209 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20210 as hostio_last_error handler.
889bf7c5 20211 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
20212 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20213 (wince_hostio_last_error): New functions.
20214 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20215 as hostio_last_error handler.
20216 (win32_target_ops) [!_WIN32_WCE]: Register
20217 hostio_last_error_from_errno as hostio_last_error handler.
20218 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20219 (hostio-errno.o): New rule.
20220 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20221 * configure.srv (srv_hostio_err_objs): New variable. Default to
20222 hostio-errno.o.
20223 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20224 * configure: Regenerate.
20225
2d717e4f
DJ
202262008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20227
20228 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20229 (linux_kill, linux_detach): Clean up the process list.
20230 * remote-utils.c (remote_open): Improve port number parsing.
20231 (putpkt_binary, input_interrupt): Only send interrupts if the target
20232 is running.
20233 * server.c (extended_protocol): Make static.
20234 (attached): Define earlier.
20235 (exit_requested, response_needed, program_argv): New variables.
20236 (target_running): New.
20237 (start_inferior): Clear attached here.
20238 (attach_inferior): Set attached here.
20239 (require_running): Define.
20240 (handle_query): Use require_running and target_running. Implement
20241 "monitor exit".
20242 (handle_v_attach, handle_v_run): New.
20243 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20244 (gdbserver_usage): Update.
20245 (main): Redo argument parsing. Handle --debug and --multi. Handle
20246 --attach along with other options or after the port. Save
20247 program_argv. Support no initial program. Resynchronize
20248 communication with GDB after an error. Handle "monitor exit".
20249 Use require_running and target_running. Always allow the extended
20250 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20251 restart in extended mode.
20252 * README: Refer to the GDB manual. Update --attach usage.
20253
7407e2de
AS
202542007-12-20 Andreas Schwab <schwab@suse.de>
20255
20256 * linux-low.c (STACK_SIZE): Define.
20257 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20258 (linux_test_for_tracefork): Likewise.
20259
b65d95c5
DJ
202602007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20261
20262 * linux-low.c (linux_wait_for_event): Update messages. Do not
20263 reinsert auto-delete breakpoints.
20264 * mem-break.c (struct breakpoint): Change return type of handler to
20265 int.
20266 (set_breakpoint_at): Update handler type.
20267 (reinsert_breakpoint_handler): Return 1 instead of calling
20268 delete_breakpoint.
20269 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20270 setting a new one.
20271 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20272 * mem-break.h (set_breakpoint_at): Update handler type.
20273 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20274 * win32-low.c (auto_delete_breakpoint): New.
20275 (get_child_debug_event): Use it.
20276
4e799345
DJ
202772007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20278
20279 * configure.ac: Check for pread and pwrite.
20280 * hostio.c (handle_pread): Fall back to lseek and read.
20281 (handle_pwrite): Fall back to lseek and write.
20282 * config.in, configure: Regenerated.
20283
27524b67
DJ
202842007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20285
20286 * server.c (myresume): Add own_buf argument.
20287 (main): Update calls.
20288
a20d5e98
DJ
202892007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20290
20291 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20292 * remote-utils.c (remote_open): Do not call disable_async_io.
20293 (block_async_io): Delete.
20294 (unblock_async_io): Make static.
20295 (initialize_async_io): New.
20296 * server.c (handle_v_cont): Handle async I/O here.
20297 (myresume): Likewise. Move other common resume tasks here...
20298 (main): ... from here. Call initialize_async_io. Disable async
20299 I/O before the main loop.
20300 * server.h (initialize_async_io): Declare.
20301 (block_async_io, unblock_async_io): Delete prototypes.
20302 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20303
b79d787e
DJ
203042007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20305
20306 * remote-utils.c (readchar): Allow binary data in received messages.
20307
d97903b2
PA
203082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20309
20310 * win32-low.c (attaching): New global.
20311 (win32_create_inferior): Clear the `attaching' global.
20312 (win32_attach): Set the `attaching' global.
20313 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20314 attaching. Only set a breakpoint at the entry point if not
20315 attaching.
20316
311de423
PA
203172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20318
20319 * server.c (main): Don't report dll events on the initial
20320 connection on attaches.
20321
6c2d16d2
PA
203222007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20323
20324 * server.c (main): Relax numerical bases supported for the pid of
20325 the --attach command line argument.
20326
5ca906e6
PA
203272007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20328
20329 * win32-low.c (win32_attach): Call OpenProcess before
20330 DebugActiveProcess, not after. Add last error output to error
20331 call.
20332
9c6c8194
PA
203332007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20334
20335 * win32-low.c (win32_get_thread_context)
20336 (win32_set_thread_context): New functions.
20337 (thread_rec): Use win32_get_thread_context.
20338 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20339 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20340 field.
20341
4d5d1aaa
PA
203422007-12-03 Leo Zayas
20343 Pedro Alves <pedro_alves@portugalmail.pt>
20344
20345 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20346 global variables.
20347 (child_add_thread): Minor cleanup.
20348 (child_continue): Resume artificially suspended threads before
20349 calling ContinueDebugEvent.
20350 (suspend_one_thread): New.
20351 (fake_breakpoint_event): New.
20352 (get_child_debug_event): Change return type to int. Check here if
20353 gdb sent an interrupt request. If a soft interrupt was requested,
20354 fake a breakpoint event. Return 0 if there is no event to handle,
20355 and 1 otherwise.
20356 (win32_wait): Don't check here if gdb sent an interrupt request.
20357 Ensure there is a valid event to handle.
20358 (win32_request_interrupt): Add soft interruption method as last
20359 resort.
20360
c436e841
PA
203612007-12-03 Leo Zayas
20362 Pedro Alves <pedro_alves@portugalmail.pt>
20363
20364 * win32-low.h (win32_thread_info): Add descriptions to the
20365 structure members. Replace `suspend_count' counter by a
20366 `suspended' flag.
20367 * win32-low.c (thread_rec): Update condition of when to get the
20368 context from the inferior. Rely on ContextFlags being set if it
20369 has already been retrieved. Only suspend the inferior thread if
20370 we haven't already. Warn if that fails.
20371 (continue_one_thread): s/suspend_count/suspended/. Only call
20372 ResumeThread once. Warn if that fails.
20373
e7b5fa67
PA
203742007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20375
20376 * win32-low.c (win32_wait): Don't read from the inferior when it
20377 has already exited.
20378
a385171d
PA
203792007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20380
20381 * Makefile.in (win32_low_h): New variable.
20382 (win32-low.o): Add dependency on $(win32_low_h).
20383 (win32-arm-low.o, win32-i386-low.o): New rules.
20384
f80c84b3
DJ
203852007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20386
20387 * hostio.c: Correct copyright year.
20388
a6b151f1
DJ
203892007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20390
20391 * Makefile.in (OBS): Add hostio.o.
20392 (hostio.o): New rule.
20393 * server.h (handle_vFile): Declare.
20394 * hostio.c: New file.
20395 * server.c (handle_v_requests): Take packet_len and new_packet_len
20396 for binary packets. Call handle_vFile.
20397 (main): Update call to handle_v_requests.
20398
f9387fc3
DJ
203992007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20400
20401 * linux-low.c: Include <sched.h>.
20402
51c2684e
DJ
204032007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20404
20405 * linux-low.c (linux_tracefork_grandchild): New.
20406 (linux_tracefork_child): Use clone.
20407 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20408
75f83163
JB
204092007-10-31 Joel Brobecker <brobecker@adacore.com>
20410
20411 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20412
da5898ce
DJ
204132007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20414
20415 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20416
24a09b5f
DJ
204172007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20418
20419 * inferiors.c (change_inferior_id): Delete.
20420 (add_pid_to_list, pull_pid_from_list): New.
20421 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20422 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20423 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20424 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20425 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20426 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20427 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20428 (using_threads): Always set to 1.
20429 (handle_extended_wait): New.
20430 (add_process): Do not set TID.
20431 (linux_create_inferior): Set must_set_ptrace_flags.
20432 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20433 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20434 (linux_thread_alive): Rename TID argument to LWPID.
20435 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20436 (linux_wait_for_event): Do not use TID or check using_threads. Update
20437 call to dead_thread_notify. Call handle_extended_wait.
20438 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20439 (send_sigstop): Delete sigstop_sent.
20440 (wait_for_sigstop): Avoid TID.
20441 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20442 (linux_test_for_tracefork): New.
20443 (linux_lookup_signals): Use thread_db_active and
20444 linux_supports_tracefork_flag.
20445 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20446 * linux-low.h (get_process_thread): Avoid TID.
20447 (struct process_ifo): Move thread_known and tid to the end. Remove
20448 sigstop_sent.
20449 (linux_attach_lwp, thread_db_init): Update prototypes.
20450 * server.h (change_inferior_id): Delete prototype.
20451 (add_pid_to_list, pull_pid_from_list): New prototypes.
20452 * thread-db.c (thread_db_use_events): New.
20453 (find_first_thread): Rename to...
20454 (find_one_thread): ...this. Update callers and messages. Do not
20455 call fatal. Check thread_db_use_events. Do not call
20456 change_inferior_id or new_thread_notify.
20457 (maybe_attach_thread): Update. Do not call new_thread_notify.
20458 (thread_db_init): Set thread_db_use_events. Check use_events.
20459 * utils.c (fatal, warning): Correct message prefix.
20460
30ed0a8f
DJ
204612007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20462
20463 * Makefile.in (clean): Remove new files.
20464 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20465 (powerpc-64.o, powerpc-64.c): New rules.
20466 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20467 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20468 with SPE.
20469 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20470 SPE targets.
20471 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20472 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20473 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20474 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20475 (target_regsets): Add AltiVec and SPE register sets.
20476 * configure.ac: Check for AltiVec and SPE.
20477 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20478 (ppc_fill_vrregset, ppc_store_vrregset): New.
20479 (target_regsets): Add AltiVec register set.
20480 * configure: Regenerated.
20481
fd462a61
DJ
204822007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20483
20484 * linux-low.c (O_LARGEFILE): Define.
20485 (linux_read_memory): Use /proc/PID/mem.
20486 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20487 * configure, config.in: Regenerated.
20488
69f223ed
DJ
204892007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20490
20491 * linux-low.c (linux_wait_for_event): Do not pass signals while
20492 single-stepping.
20493
aec18585
PA
204942007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20495
20496 * win32-low.c (create_process): New.
20497 (win32_create_inferior): Use create_process instead of
20498 CreateProcess. If create_process failed retry appending an ".exe"
20499 suffix. Store the GetLastError result immediatelly after
20500 create_process calls and use it on the call to error.
20501
34d86ddd
PA
205022007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20503
20504 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20505
5a0e3bd0
JB
205062007-08-23 Joel Brobecker <brobecker@adacore.com>
20507
20508 * configure.ac: Switch license to GPLv3.
20509
f88c79e6
MS
205102007-08-01 Michael Snyder <msnyder@access-company.com>
20511
20512 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20513
6b3d9b83
PA
205142007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20515
20516 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20517 typedef.
20518 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20519 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20520 CloseToolhelp32Snapshot.
20521 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20522 CloseToolhelp32Snapshot.
20523
c588c53c
MS
205242007-07-27 Michael Snyder <michael.snyder@access-company.com>
20525
20526 * server.c (main): Check for inferior exit before main loop.
20527
aa0403d9
PA
205282007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20529
20530 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20531 instead of on tmp_desc.
20532
255e7678
DJ
205332007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20534 Daniel Jacobowitz <dan@codesourcery.com>
20535
20536 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20537 (add_thread): Minor cleanups.
20538 (clear_inferiors): Move lower in the file. Clear the DLL
20539 list.
20540 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20541 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20542 (xml_escape_text): New.
20543 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20544 for qSupported.
20545 (handle_v_cont): Report errors.
20546 (gdbserver_version): Update.
20547 (main): Correct size of own_buf. Do not report initial DLL events.
20548 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20549 (unloaded_dll, xml_escape_text): New.
20550 * win32-low.c (enum target_waitkind): Update comments.
20551 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20552 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20553 (win32_EnumProcessModules, win32_GetModuleInformation)
20554 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20555 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20556 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20557 (win32_Module32First, win32_Module32Next, load_toolhelp)
20558 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20559 (get_child_debug_event): Handle DLL events.
20560 (win32_wait): Likewise.
20561
0d37add9
DJ
205622007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20563
20564 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20565 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20566
45e2715e
PA
205672007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20568
20569 * win32-low.c (handle_output_debug_string): Ignore event if not
20570 waiting.
20571
c5674cf1
PA
205722007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20573
20574 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20575
2bbe3cc1
DJ
205762007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20577
20578 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20579
ae13219e
DJ
205802007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20581
20582 * inferiors.c (change_inferior_id): Add comment.
20583 * linux-low.c (check_removed_breakpoint): Add an early
20584 prototype. Improve debug output.
20585 (linux_attach): Doc update.
20586 (linux_detach_one_process, linux_detach): Clean up before releasing
20587 each process.
20588 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20589 * linux-low.h (struct process_info): Doc improvement.
20590 * mem-break.c (delete_all_breakpoints): New.
20591 * mem-break.h (delete_all_breakpoints): New prototype.
20592 * thread-db.c (find_first_thread): New.
20593 (thread_db_create_event): Call it instead of
20594 thread_db_find_new_threads. Clean up unused variables.
20595 (maybe_attach_thread): Remove first thread handling.
20596 (thread_db_find_new_threads): Use find_first_thread.
20597 (thread_db_get_tls_address): Likewise.
20598
4105de34
DJ
205992007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20600
20601 * thread-db.c (thread_db_find_new_threads): Add prototype.
20602 (thread_db_create_event): Check for the main thread before adding
20603 a new thread.
20604 (maybe_attach_thread): Only enable event reporting if TID == 0.
20605 (thread_db_get_tls_address): Check for new threads.
20606
2b876972
DJ
206072007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20608
20609 * linux-low.c (linux_create_inferior): Try execv before execvp.
20610 * spu-low.c (spu_create_inferior): Likewise.
20611
7a245884
DJ
206122007-06-13 Mike Frysinger <vapier@gentoo.org>
20613
20614 * linux-low.c (linux_create_inferior): Change execv to execvp.
20615 * spu-low.c (spu_create_inferior): Likewies.
20616
117ce543
DJ
206172007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20618
20619 * Makefile.in (clean): Clean new files instead of deleted ones.
20620 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20621 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20622 rules.
20623 * configure.srv: Specify XML files and new regformats for MIPS and
20624 MIPS64 GNU/Linux.
20625 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20626 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20627 an entry for the restart register.
20628 (mips_cannot_fetch_register, mips_cannot_store_register)
20629 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20630 register names to match the XML descriptions.
20631 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20632 restart register instead of $0.
20633
0e7f50da
UW
206342007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20635 Markus Deuling <deuling@de.ibm.com>
20636
20637 * remote-utils.c (decode_xfer_write): New function.
20638 * server.h (decode_xfer_write): Add prototype.
20639 * server.c (handle_query): Add PACKET_LEN argument. Support
20640 qXfer:spu:read and qXfer:spu:write packets.
20641 (main): Pass packet_len to handle_query.
20642 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20643 * target.h (target_ops): Add qxfer_spu.
20644
374c1d38
UW
206452007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20646
20647 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20648 accessing non-seekable spufs files.
20649
bb63802a
UW
206502007-05-16 Markus Deuling <deuling@de.ibm.com>
20651
889bf7c5 20652 * server.c (handle_query): Add reply for qC packet.
bb63802a 20653
7390519e
PA
206542007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20655 Leo Zayas <lerele@champenstudios@com>
20656
20657 * server.h (check_remote_input_interrupt_request): New function.
20658 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20659 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20660 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20661 (check_remote_input_interrupt_request): New function.
20662 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 20663 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
20664 winapi_GenerateConsoleCtrlEvent): New typedefs.
20665 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20666 to 250 ms.
20667 (win32_wait): Check for remote interrupt request
20668 with check_remote_input_interrupt_request.
20669 (win32_request_interrupt): New function.
20670 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20671
34b34921
PA
206722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20673
20674 * win32-low.c (debug_registers_changed,
20675 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20676 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20677 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20678 (thread_rec): Get context using the low target.
20679 (child_add_thread): Call thread_added on the low target,
20680 which does the same thing.
20681 (regptr): Delete.
20682 (do_initial_child_stuff): Remove debug registers references.
20683 Set context using the low target. Resume threads after
20684 setting the contexts.
20685 (child_continue): Remove dead variable. Remove debug
20686 registers references.
20687 (child_fetch_inferior_registers): Go through the low target.
20688 (do_child_store_inferior_registers): Remove.
20689 (child_store_inferior_registers): Go through the low target.
20690 (win32_resume): Remove debug registers references.
20691 Set context using the low target.
20692 (handle_exception): Change return type to void. Don't record
20693 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20694 first chance exception.
889bf7c5 20695 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
20696 goto loop. Always return after waiting for debug event.
20697 (win32_wait): Convert to switch statement. Handle spurious
20698 events.
20699
20700 * win32-i386-low.c (debug_registers_changed,
20701 debug_registers_used): New.
20702 (initial_stuff): Rename to ...
20703 (i386_initial_stuff): ... this. Clear debug registers
20704 state variables.
20705 (store_debug_registers): Delete.
20706 (i386_get_thread_context): New.
20707 (load_debug_registers): Delete.
20708 (i386_set_thread_context): New.
20709 (i386_thread_added): New.
20710 (single_step): Rename to ...
20711 (i386_single_step): ... this.
20712 (do_fetch_inferior_registers): Rename to ...
20713 (i386_fetch_inferior_register): ... this.
20714 (i386_store_inferior_register): New.
20715 (the_low_target): Adapt to new interface.
20716
20717 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20718 (arm_get_thread_context): New.
20719 (arm_set_thread_context): New.
20720 (regptr): New.
20721 (do_fetch_inferior_registers): Rename to ...
20722 (arm_fetch_inferior_register): ... this.
20723 (arm_store_inferior_register): New.
20724 (arm_wince_breakpoint): Reimplement as unsigned long.
20725 (arm_wince_breakpoint_len): Define.
20726 (the_low_target): Adapt to new interface.
20727
20728 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20729 load_debug_registers. Add get_thread_context, set_thread_context,
20730 thread_added and store_inferior_register. Rename
20731 fetch_inferior_registers to fetch_inferior_register.
20732 (regptr): Remove declaration.
20733
dd6953e1
PA
207342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20735
20736 * linux-low.c (linux_detach): Change return type to int. Return 0.
20737 * spu-low.c (spu_detach): Likewise.
20738
444d6139
PA
207392007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20740
20741 * target.h (target_ops): Change return type of detach to int.
20742 Add join.
20743 (join_inferior): New.
20744 * server.c (main): Don't skip detach support on mingw32.
20745 If the inferior doesn't support detaching return error.
20746 Call join_inferior instead of using waitpid.
20747 * linux-low.c (linux_join): New.
20748 (linux_target_op): Add linux_join.
20749 * spu-low.c (spu_join): New.
20750 (spu_target_ops): Add spu_join.
20751 * win32-low.c (win32_detach): Adapt to new interface.
20752 Reopen current_process_handle before detaching. Issue a child
20753 resume before detaching.
20754 (win32_join): New.
20755 (win32_target_op): Add win32_join.
20756
1d5315fe
PA
207572007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20758
20759 * win32-low.c (win32-attach): Fix return value.
20760 * target.h (target_ops): Describe ATTACH return values.
20761
bf914831
PA
207622007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20763
20764 * win32-low.c (GETPROCADDRESS): Define.
20765 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20766 (winapi_DebugSetProcessKillOnExit): Likewise.
20767 (win32_create_inferior): Force usage of ansi CreateProcessA.
20768 (win32_attach): Use GETPROCADDRESS.
20769 (win32_detach): Likewise.
20770
f72f3e60
PA
207712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20772
20773 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20774
ed50f18f
PA
207752007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20776
20777 * win32-low.c: Commit leftover changes from 2007-03-29.
20778
0c2ead7e
DJ
207792007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20780
20781 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20782 fields short instead of int. Add explicit padding.
20783 (i387_cache_to_fsave): Remove unnecessary casts.
20784 (i387_fsave_to_cache): Doc fix.
20785 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20786
73725ff3
DJ
207872007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20788
20789 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20790 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20791
d99f33d8
PA
207922007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20793
20794 * configure.srv (arm*-*-mingw32ce*): Move near the other
20795 arm targets.
20796
68070c10
PA
207972007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20798
2482afc6 20799 * configure.ac: Add errno checking.
68070c10
PA
20800 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20801 sys/file.h and malloc.h.
20802 (AC_CHECK_DECLS): Add perror.
20803 (srv_mingwce): Handle.
2482afc6 20804 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
20805 win32-i386-low.o to srv_tgtobj.
20806 (i[34567]86-*-mingw*): Likewise.
20807 (arm*-*-mingw32ce*): Add case.
20808 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20809 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20810 [__MINGW32CE__] (strerror): New function.
20811 [__MINGW32CE__] (errno): Define to GetLastError.
20812 [__MINGW32CE__] (COUNTOF): New macro.
20813 (remote_open): Remove extra close call.
20814 * mem-break.c (delete_breakpoint_at): New function.
20815 * mem-break.h (delete_breakpoint_at): Declare.
20816 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20817 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20818 [USE_WIN32API] (read, write): Add char* casts.
20819 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20820 * server.h: Include wincecompat.h on Windows CE.
20821 [HAVE_ERRNO_H]: Check.
20822 (perror): Declare if not declared.
20823 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20824 (perror_with_name): Remove errno declaration.
20825 * wincecompat.h: New.
20826 * wincecompat.c: New.
20827 * win32-low.h: New.
20828 * win32-arm-low.c: New.
20829 * win32-i386-low.c: New.
20830 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20831 (OUTMSG2): Make it safe.
20832 (_T): New macro.
20833 (COUNTOF): New macro.
20834 (NUM_REGS): Get it from the low target.
20835 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20836 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20837 (thread_rec): Let low target handle debug registers.
20838 (child_add_thread): Likewise.
20839 (child_init_thread_list): Likewise.
20840 (continue_one_thread): Likewise.
20841 (regptr): New.
20842 (do_child_fetch_inferior_registers): Move to ...
20843 * win32-i386-low.c: ... here, and rename to ...
20844 (do_fetch_inferior_registers): ... this.
889bf7c5 20845 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
20846 Go through the low target.
20847 (do_child_store_inferior_registers): Use regptr.
20848 (strwinerror): New function.
20849 (win32_create_inferior): Handle Windows CE.
20850 Use strwinerror instead of strerror on Windows error
20851 codes. Add program to the error output.
20852 Don't close the main thread handle on Windows CE.
20853 (win32_attach): Use coredll.dll on Windows CE.
20854 (win32_kill): Close current process and current
20855 thread handles.
20856 (win32_detach): Use coredll.dll on Windows CE.
20857 (win32_resume): Let low target handle debug registers, and
20858 step request.
20859 (handle_exception): Add/Remove initial breakpoint. Avoid
20860 non-existant WSTOPSIG on Windows CE.
20861 (win32_read_inferior_memory): Cast to remove warning.
20862 (win32_arch_string): Go through the low target.
20863 (initialize_low): Call set_breakpoint_data with the low
20864 target's breakpoint.
20865 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20866 FOP_REGNUM, mappings): Move to ...
20867 * win32-i386-low.c: ... here.
20868 * win32-low.c (win32_thread_info): Move to ...
20869 * win32-low.h: ... here.
20870 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20871 win32-arm-low.c and wincecompat.c.
20872 (all:): Add $EXEEXT.
20873 (install-only:): Likewise.
20874 (gdbserver:): Likewise.
20875 (gdbreplay:): Likewise.
20876 * config.in: Regenerate.
20877 * configure: Regenerate.
20878
41093d81
PA
208792007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20880
20881 * win32-low.c: Rename typedef thread_info to
20882 win32_thread_info throughout.
20883
544afa54
PA
208842007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20885
20886 * win32-i386-low.c: Rename to ...
20887 * win32-low.c: ... this.
20888 * configure.srv: Replace win32-i386-low.o with win32-low.o.
20889 * Makefile.in: Likewise.
20890
bce7165d
PA
208912007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
20892
20893 * remote-utils.c (monitor_output): Constify msg parameter.
20894 * server.h (monitor_output): Likewise.
20895 * win32-i386-low.c (handle_output_debug_string): New.
20896 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
20897 handle_output_debug_string.
20898 (get_child_debug_event): Likewise.
20899
506c7aa0
DJ
209002007-03-27 Mat Hostetter <mat@lcs.mit.edu>
20901
20902 * server.c (main): Correct strtoul check.
20903
42c81e2a
DJ
209042007-03-27 Jon Ringle <jon@ringle.org>
20905
20906 * linux-low.c: Check __ARCH_HAS_MMU__ also.
20907
9453113a
DJ
209082007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
20909
20910 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
20911
64a69107
DJ
209122007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
20913
20914 * terminal.h: Check HAVE_SGTTY_H.
20915
209162007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
20917
20918 * remote-utils.c (remote_open): Print out the assigned port number.
20919
c74d0ad8
DJ
209202007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
20921
20922 * remote-utils.c (monitor_output): New function.
20923 * server.c (debug_threads): Define here.
20924 (monitor_show_help): New function.
20925 (handle_query): Handle qRcmd.
20926 (main): Do not handle 'd' packet.
20927 * server.h (debug_threads, remote_debug, monitor_output): Declare.
20928 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
20929 of debug_threads.
20930
de7c3b4a
PA
209312007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20932
20933 * Makefile.in (EXEEXT): New.
20934 (clean): Use $(EXEEXT).
20935
ef57601b
PA
209362007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20937
20938 * target.h (target_ops): Rename send_signal to request_interrupt,
20939 and remove enum target_signal parameter.
20940 * linux-low.c (linux_request_interrupt): Rename from
20941 linux_send_signal, and always send SIGINT.
20942 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
20943 and always send SIGINT.
20944 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
20945 of send_signal.
20946 (input_interrupt): Likewise.
20947
820f2bda
PA
209482007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
20949
20950 * server.c (get_features_xml): Check if target implemented
20951 arch_string.
20952 * win32-i386-low.c (win32_arch_string): New.
20953 (win32_target_ops): Add win32_arch_string as arch_string member.
20954
ab39bf24
UW
209552007-02-22 Markus Deuling <deuling@de.ibm.com>
20956
20957 * spu-low.c (spu_arch_string): New.
20958 (spu_target_ops): Add spu_arch_string.
20959
61ff6e04
DJ
209602007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
20961
20962 * remote-utils.c: Remove HAVE_TERMINAL_H check.
20963 * configure.ac: Do not check for terminal.h.
20964 * configure, config.in: Regenerated.
20965
fb1e4ffc
DJ
209662007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
20967
20968 * Makefile.in (OBS): Add $(XML_BUILTIN).
20969 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
20970 (clean): Update.
20971 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
20972 (arm-with-iwmmxt.c): New.
20973 * config.in, configure: Regenerate.
20974 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
20975 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
20976 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
20977 (arm*-*-linux*): Add iWMMXt and regset support.
20978 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
20979 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
20980 (arm_store_wmmxregset, target_regsets): New.
20981 * server.c (get_features_xml): Take annex argument. Check builtin
20982 XML documents.
20983 (handle_query): Handle multiple annexes.
20984
0f48aa01
DJ
209852007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20986
20987 * remote-utils.c [USE_WIN32API] (read, write): Define.
20988 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
20989 write.
20990
23181151
DJ
209912007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
20992
20993 * linux-i386-low.c (the_low_target): Set arch_string.
20994 * linux-x86-64-low.c (the_low_target): Likewise.
20995 * linux-low.c (linux_arch_string): New.
20996 (linux_target_ops): Add it.
20997 * linux-low.h (struct linux_target_ops): Add arch_string.
20998 * server.c (write_qxfer_response): Use const void * for DATA.
20999 (get_features_xml): New.
21000 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21001 * target.h (struct target_ops): Add arch_string method.
21002
9d606399
DJ
210032007-01-03 Denis Pilat <denis.pilat@st.com>
21004 Daniel Jacobowitz <dan@codesourcery.com>
21005
21006 * linux-low.c (linux_kill): Handle being called with no threads.
21007 * win32-i386-low.c (win32_kill): Likewise.
21008 (get_child_debug_event): Clear current_process_handle.
21009
210102006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
21011 Daniel Jacobowitz <dan@codesourcery.com>
21012
21013 * remote-utils.c (remote_open): Check the type of specified
21014 serial port devices before opening them.
21015 * server.c (main): Kill the inferior if an error occurs during
21016 the first remote_open.
21017
a5e13d24
DJ
210182006-12-05 Markus Deuling <deuling@de.ibm.com>
21019
21020 * README: Update supported targets.
21021
186947f7
DJ
210222006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21023
21024 * Makefile.in (clean): Remove reg-mips64.c.
21025 (reg-mips64.c, reg-mips64.o): New rules.
21026 * configure.srv: Handle mips64. Include regset support for mips.
21027 * linux-mips-low.c (union mips_register): New.
21028 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21029 (mips_breakpoint, mips_breakpoint_at): Use int.
21030 (mips_collect_register, mips_supply_register)
21031 (mips_collect_register_32bit, mips_supply_register_32bit)
21032 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21033 (mips_store_fpregset, target_regsets): New.
21034 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21035
a13e2c95
UW
210362006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21037
21038 * configure.srv: Add target "spu*-*-*".
21039 * Makefile.in (clean): Remove reg-spu.c.
21040 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21041 * spu-low.c: New file.
21042
cb7283db
DJ
210432006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21044
21045 * configure.ac: Correct td_thr_tls_get_addr test.
21046 * configure: Regenerated.
21047
89be2091
DJ
210482006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21049
21050 * linux-low.c (linux_wait_for_event): Reformat. Use the
21051 pass_signals array.
21052 * remote-utils.c (decode_address_to_semicolon): New.
21053 * server.c (pass_signals, handle_general_set): New.
21054 (handle_query): Mention QPassSignals for qSupported.
21055 (main): Call handle_general_set.
21056 * server.h (pass_signals, decode_address_to_semicolon): New.
21057
000ef4f0
DJ
210582006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21059
21060 * server.c (handle_query): Correct error handling for read_auxv.
21061
b7149293
UW
210622005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21063
21064 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21065 and srv_linux_thread_db to yes.
21066 * linux-s390-low.c (s390_fill_gregset): New function.
21067 (target_regsets): Define data structure.
21068
dae5f5cf
DJ
210692006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21070
21071 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21072 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21073 * config.in, configure: Regenerated.
21074 * inferiors.c (gdb_id_to_thread): New function.
21075 (gdb_id_to_thread_id): Use it.
21076 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21077 * linux-low.h (struct process_info): Add th member.
21078 (thread_db_get_tls_address): New prototype.
21079 * remote-utils.c (decode_address): Make non-static.
21080 * server.c (handle_query): Handle qGetTLSAddr.
21081 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21082 * target.h (struct target_ops): Add get_tls_address.
21083 * thread-db.c (maybe_attach_thread): Save the thread handle.
21084 (thread_db_get_tls_address): New.
21085
32ca6d61
DJ
210862006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21087
21088 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21089 (linux_resume_one_process): Take a siginfo_t *. Update all
21090 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21091 (struct pending_signals): Add a siginfo_t.
21092 (linux_wait_for_process): Always set last_status.
21093 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21094 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21095 * linux-low.h (struct process_info): Add last_status.
21096
5ffff7c1
DJ
210972006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21098
21099 * remote-utils.c (try_rle): New function.
21100 (putpkt_binary): Use it.
21101
8695c747
DJ
211022006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21103
21104 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21105 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21106 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21107 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21108 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21109 point registers.
21110
290fadea
RS
211112006-08-08 Richard Sandiford <richard@codesourcery.com>
21112
21113 * server.c (terminal_fd): New variable.
21114 (old_foreground_pgrp): Likewise.
21115 (restore_old_foreground_pgrp): New function.
21116 (start_inferior): Record the terminal file descriptor in terminal_fd
21117 and its original foreground group in old_foreground_pgrp. Register
21118 restore_old_foreground_pgrp with atexit().
21119
9f2e1e63
DJ
211202006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21121
21122 * server.c (handle_query): Correct qPart to qXfer.
21123
b80864fb
DJ
211242006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21125
21126 * configure.ac: Check for more headers which are missing on
21127 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21128 * configure.srv: Add Cygwin and mingw32.
21129 * remote-utils.c: Don't include headers unconditionally which
21130 are missing on mingw32. Include <winsock.h> for mingw32.
21131 (remote_open): Adjust for mingw32 support. Flush
21132 standard error after writing to it.
21133 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21134 (unblock_async_io, enable_async_io, disable_async_io)
21135 (readchar, getpkt): Update for Winsock support.
21136 (prepare_resume_reply): Expect a protocol signal number.
21137 * server.c: Disable <sys/wait.h> on mingw32.
21138 (start_inferior): Adjust for mingw32 support. Flush
21139 standard error after writing to it.
21140 (attach_inferior): Likewise. Use protocol signal
21141 numbers.
21142 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21143 and names.
21144 * win32-i386-low.c: New file.
21145 * Makefile.in (XM_CLIBS): Set.
21146 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21147 (win32-i386-low.o): New dependency rule.
21148 * linux-low.c (linux_wait): Use target signal numbers.
21149 * target.h (struct target_ops): Doc fix.
21150 * server.h (target_signal_to_name): New prototype.
21151 * gdbreplay.c: Don't include headers unconditionally which
21152 are missing on mingw32. Include <winsock.h> for mingw32.
21153 (remote_close, remote_open): Adjust for Winsock support.
21154 * configure, config.in: Regenerated.
21155
0876f84a
DJ
211562006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21157
21158 * server.c (decode_xfer_read, write_qxfer_response): New.
21159 (handle_query): Take a packet length argument. Handle
21160 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21161 the qSupported response.
21162 (main): Update call to handle_query.
21163
01f9e8fa
DJ
211642006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21165
21166 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21167 (putpkt_binary): Renamed from putpkt and adjusted for binary
21168 data.
21169 (putpkt): New wrapper for putpkt_binary.
21170 (readchar): Don't mask off the high bit.
21171 (decode_X_packet): New function.
21172 * server.c (main): Call putpkt_binary if a handler sets the packet
21173 length. Save the length of the incoming packet. Handle 'X'.
21174 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21175
be2a5f71
DJ
211762006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21177
21178 * server.c (handle_query): Handle qSupported.
21179
ea025f5f
DJ
211802006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21181
21182 * remote-utils.c (all_symbols_looked_up): New variable.
21183 (look_up_one_symbol): Check it.
21184 * server.h (look_up_one_symbol): New declaration.
21185 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21186
9308fc88
DJ
211872006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21188
21189 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 21190 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
21191 (PTRACE_GET_THREAD_AREA): Define.
21192 (ps_get_thread_area): New function.
21193
52fb6437
NS
211942006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21195
21196 * configure.srv (m68k*-*-uclinux*): New target.
21197 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21198 (linux_resume_one_process): Remove extraneous cast.
21199 (linux_read_offsets): New.
21200 (linux_target_op): Add linux_read_offsets on mmuless systems.
21201 * server.c (handle_query): Add qOffsets logic.
21202 * target.h (struct target_ops): Add read_offsets.
21203
21b0f40c
DJ
212042006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21205
21206 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21207 (PTRACE_GET_THREAD_AREA): Define.
21208 (ps_get_thread_area): New function.
21209 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21210 (linux-x86-64-low.o): Update.
21211
0050a760
DJ
212122006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21213
21214 * configure.ac: Remove checks for prfpregset_t.
21215 * gdb_proc_service.h: New file.
21216 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21217 new "gdb_proc_service.h".
21218 * proc-service.c: Likewise.
21219 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21220 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21221 * Makefile.in (gdb_proc_service_h): Updated.
21222 * configure, config.in: Regenerated.
21223
b92a518e
DJ
212242006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21225
21226 * remote-utils.c (prepare_resume_reply): Move declaration
21227 of gdb_id_from_wait to the top of the block.
21228
545587ee
DJ
212292006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21230
21231 * linux-low.c (regsets_store_inferior_registers): Read the regset
21232 from the target before filling it.
21233
9db87ebd
DJ
212342006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21235
21236 * server.c (attach_inferior): Return SIGTRAP for a successful
21237 attach.
21238
dd24457d
DJ
212392006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21240
21241 * Makefile.in (OBS): Add version.o.
21242 (STAGESTUFF): Delete.
21243 (version.o): Add dependencies.
21244 (version.c): Replace rule.
21245 (clean): Remove version.c.
21246 * server.c (gdbserver_version): New.
21247 (gdbserver_usage): Use printf.
21248 (main): Handle --version and --help.
21249 * server.h (version, host_name): Add declarations.
21250
6f0f660e
EZ
212512005-12-23 Eli Zaretskii <eliz@gnu.org>
21252
889bf7c5
PA
21253 * linux-arm-low.c:
21254 * linux-arm-low.c:
21255 * inferiors.c:
21256 * i387-fp.h:
21257 * i387-fp.c:
21258 * gdbreplay.c:
21259 * regcache.c:
21260 * proc-service.c:
21261 * mem-break.h:
21262 * mem-break.c:
21263 * linux-x86-64-low.c:
21264 * linux-sh-low.c:
21265 * linux-s390-low.c:
21266 * linux-ppc64-low.c:
21267 * linux-ppc-low.c:
21268 * linux-mips-low.c:
21269 * linux-m68k-low.c:
21270 * linux-m32r-low.c:
21271 * linux-low.h:
21272 * linux-low.c:
21273 * linux-ia64-low.c:
21274 * linux-i386-low.c:
21275 * linux-crisv32-low.c:
21276 * thread-db.c:
21277 * terminal.h:
21278 * target.h:
21279 * target.c:
21280 * server.h:
21281 * server.c:
21282 * remote-utils.c:
21283 * regcache.h:
21284 * utils.c:
21285 * Makefile.in:
21286 * configure.ac:
6f0f660e
EZ
21287 * gdbserver.1: Add (C) after Copyright. Update the FSF
21288 address.
21289
9d1fb177
DJ
212902005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21291
21292 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21293 (arm_breakpoint_at): Recognize both breakpoints.
21294 (the_low_target): Use the correct breakpoint instruction.
21295
011a70c2
DJ
212962005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21297
21298 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21299 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21300 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21301 (the_low_target): Update.
21302
7fb85e41
AS
213032005-10-25 Andreas Schwab <schwab@suse.de>
21304
21305 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21306
21307 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21308 (ia64_num_regs): Reduce to 462.
21309
3db0444b
DJ
213102005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21311
21312 * acinclude.m4: Correct quoting.
21313 * aclocal.m4: Regenerated.
21314
21315 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21316 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21317 (thread_db_init): Call thread_db_err_str.
21318 * configure.ac: Check for TD_VERSION.
21319 * config.in, configure: Regenerated.
21320
bee0189a
DJ
213212005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21322
21323 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21324
e9d25b98
DJ
213252005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21326
21327 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21328 is not available. Define HAVE_PTRACE_GETREGS if it is.
21329 * config.in, configure: Regenerated.
21330 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21331 * linux-i386-low.c, linux-m68k-low.c: Update to use
21332 HAVE_PTRACE_GETREGS.
21333 * linux-low.c (regsets_fetch_inferior_registers)
21334 (regsets_store_inferior_registers): Only return 0 if we processed
21335 GENERAL_REGS.
21336 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21337 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21338
a06660f7
DJ
213392005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21340
21341 * inferiors.c (struct thread_info): Add gdb_id.
21342 (add_thread): Add gdb_id argument.
21343 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21344 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21345 calls to add_thread.
21346 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21347 * server.c (handle_query): Use thread_to_gdb_id.
21348 (handle_v_cont, main): Use gdb_id_to_thread_id.
21349 * server.h (add_thread): Update prototype.
21350 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21351 prototypes.
21352
5a1f5858
DJ
213532005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21354
21355 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21356 left-padded registers.
21357 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21358 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21359
e122f1f5
SE
213602005-07-01 Steve Ellcey <sje@cup.hp.com>
21361
21362 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21363 * configure: Regenerate.
21364 * config.in: Regenerate.
21365 * server.h (NEED_DECLARATION_STRERROR):
21366 Replace with !HAVE_DECL_STRERROR.
21367
d592fa2f
DJ
213682005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21369
21370 * linux-low.c (linux_wait, linux_send_signal): Don't test
21371 an unsigned long variable for > 0 if it could be MAX_ULONG.
21372 * server.c (myresume): Likewise.
21373 * target.c (set_desired_inferior): Likewise.
21374
ccbd4912
MK
213752005-06-13 Mark Kettenis <kettenis@gnu.org>
21376
21377 * configure.ac: Simplify and improve check for socklen_t.
21378 * configure, config.in: Regenerate.
21379
f450004a
DJ
213802005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21381
21382 * acconfig.h: Remove.
21383 * configure.ac: Add a test for socklen_t. Use three-argument
21384 AC_DEFINE throughout.
21385 * config.in: Regenerated using autoheader 2.59.
21386 * configure: Regenerated.
21387
21388 * gdbreplay.c (socklen_t): Provide a default.
21389 (remote_open): Use socklen_t.
21390 * remote-utils.c (socklen_t): Provide a default.
21391 (remote_open): Use socklen_t.
21392 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21393 unsigned char.
21394
21395 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21396 char for buffers.
21397 * linux-low.c (linux_read_memory, linux_write_memory)
21398 (linux_read_auxv): Likewise.
21399 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21400 (check_mem_write): Likewise.
21401 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21402 Likewise.
21403 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21404 (registers_from_string, register_data): Likewise.
21405 * server.c (handle_query, main): Likewise.
21406 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21407 (decode_M_packet): Likewise.
21408 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21409 * target.h (struct target_ops): Update read_memory, write_memory,
21410 and read_auxv.
21411 (read_inferior_memory, write_inferior_memory): Update.
21412 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21413 to unsigned char *.
21414 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21415 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21416 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21417 linux-s390-low.c, linux-sh-low.c: Update for changes in
21418 read_inferior_memory and the_low_target->breakpoint.
21419
eee84df1
DJ
214202005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21421
21422 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21423 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21424 * configure.srv: Add powerpc64-*-linux*.
21425 * linux-ppc64-low.c: New file.
21426
45b134e5
OF
214272005-05-23 Orjan Friberg <orjanf@axis.com>
21428
21429 * linux-cris-low.c: New file with support for CRIS.
21430 * linux-crisv32-low.c: Ditto for CRISv32.
21431 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21432 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 21433 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
21434 reg-crisv32.o, and reg-crisv32.c to make rules.
21435 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21436 recognized targets.
21437
48d93c75
UW
214382005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21439
21440 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21441 of sizeof (PTRACE_XFER_TYPE).
21442 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21443
e013ee27
OF
214442005-05-12 Orjan Friberg <orjanf@axis.com>
21445
889bf7c5 21446 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
21447 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21448 pointers for hardware watchpoint support.
21449 * linux-low.h (struct linux_target_ops): Ditto.
21450 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21451 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21452 to linux_target_ops.
21453 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21454 reply packet.
21455 * server.c (main): Recognize 'Z' and 'z' packets.
21456
b0ded00b
UW
214572005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21458
21459 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21460 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21461 (the_low_target): Add new members.
21462
8643e2ad
DJ
214632005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21464
21465 * proc-service.c (ps_lgetregs): Search all_processes instead of
21466 all_threads.
21467
fc620387
DJ
214682005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21469
21470 * server.c (start_inferior): Change return type to int.
21471 (attach_inferior): Change sigptr to int *.
21472 (handle_v_cont, handle_v_requests): Change signal to int *.
21473 (main): Change signal to int.
21474
214752005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
21476
21477 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21478 * configure.srv: Add m32r*-*-linux*.
21479 * linux-m32r-low.c: New file.
21480
e0e76420
DJ
214812005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21482
21483 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21484
a1928bad
DJ
214852005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21486
21487 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21488 Take unsigned long arguments for PIDs.
21489 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21490 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21491 (wait_for_sigstop, linux_resume_one_process)
21492 (regsets_fetch_inferior_registers, linux_send_signal)
21493 (linux_read_auxv): Likewise. Update the types of variables holding
21494 PIDs. Update format string specifiers.
21495 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21496 * remote-utils.c (prepare_resume_reply): Likewise.
21497 * server.c (cont_thread, general_thread, step_thread)
21498 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21499 unsigned long.
21500 (handle_query): Update format specifiers.
21501 (handle_v_cont, main): Use strtoul for thread IDs.
21502 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21503 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21504 (general_thread, step_thread, thread_from_wait)
21505 (old_thread_from_wait): Update.
21506 * target.h (struct thread_resume): Use unsigned long for THREAD.
21507 (struct target_ops): Use unsigned long for arguments to attach and
21508 thread_alive.
21509
dcdb98d2
DJ
215102005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21511
21512 * acinclude.m4: Include bfd/bfd.m4 directly.
21513 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21514 <agriffis@toolchain.org>.
21515 * aclocal.m4, configure: Regenerated.
21516
bec39cab
AC
215172005-01-07 Andrew Cagney <cagney@gnu.org>
21518
21519 * configure.ac: Rename configure.in, require autoconf 2.59.
21520 * configure: Re-generate.
21521
434c4c77
DJ
215222004-12-08 Daniel Jacobowitz <dan@debian.org>
21523
21524 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21525 LIBS when finished.
21526 * aclocal.m4: Regenerated.
21527 * configure: Regenerated.
21528
db1d3e1b
AS
215292004-11-21 Andreas Schwab <schwab@suse.de>
21530
21531 * linux-m68k-low.c (m68k_num_gregs): Define.
21532 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21533 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21534 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21535 (m68k_breakpoint_at): New. Add to the_low_target.
21536
21537 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21538 srv_linux_thread_db to yes.
21539
43360365
JB
215402004-10-20 Joel Brobecker <brobecker@gnat.com>
21541
21542 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21543 (ARCH_SET_FS): Likewise.
21544 (ARCH_GET_FS): Likewise.
21545 (ARCH_GET_GS): Likewise.
21546
fd500816
DJ
215472004-10-16 Daniel Jacobowitz <dan@debian.org>
21548
21549 * linux-i386-low.c (ps_get_thread_area): New.
21550 * linux-x86-64-low.c (ps_get_thread_area): New.
21551 * linux-low.c: Include <sys/syscall.h>.
21552 (linux_kill_one_process): Don't kill the first thread here.
21553 (linux_kill): Kill the first thread here.
21554 (kill_lwp): New function.
21555 (send_sigstop, linux_send_signal): Use it.
21556 * proc-service.c: Clean up #ifdefs.
21557 (fpregset_info): Delete.
21558 (ps_lgetregs): Update and enable implementation.
21559 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21560 implementations.
21561 * remote-utils.c (struct sym_cache, symbol_cache): New.
21562 (input_interrupt): Print a clearer message.
21563 (async_io_enabled): New variable.
21564 (enable_async_io, disable_async_io): Use it. Update comments.
21565 (look_up_one_symbol): Use the symbol cache.
21566 * thread-db.c (thread_db_look_up_symbols): New function.
21567 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21568
f6de3c42
DJ
215692004-10-16 Daniel Jacobowitz <dan@debian.org>
21570
21571 * configure.in: Test for -rdynamic.
21572 * configure: Regenerated.
21573 * Makefile (INTERNAL_LDFLAGS): New.
21574 (gdbserver, gdbreplay): Use it.
21575
2c0fc042
AC
215762004-09-02 Andrew Cagney <cagney@gnu.org>
21577
21578 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21579
075b3282
DJ
215802004-03-23 Daniel Jacobowitz <drow@mvista.com>
21581
21582 * linux-low.c (linux_wait): Clear all_processes list also.
21583
fa6a77dc
DJ
215842004-03-12 Daniel Jacobowitz <drow@mvista.com>
21585
21586 * linux-low.c: Include <errno.h>. Remove extern declaration of
21587 errno.
21588
6d782a97
DJ
215892004-03-12 Daniel Jacobowitz <drow@mvista.com>
21590
21591 * gdbreplay.c, server.h, utils.c: Update copyright years.
21592
3a7fb99b
DJ
215932004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21594
21595 * server.c (main): Print child status or termination signal from
21596 variable 'signal', not 'sig'.
21597
c3e735a6
DJ
215982004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21599
21600 * linux-low.c (linux_read_memory): Change return type to
21601 int. Check for and return error from ptrace().
21602 * target.c (read_inferior_memory): Change return type to int. Pass
21603 back return status from the_target->read_memory().
21604 * target.h (struct target_ops): Adapt *read_memory() prototype.
21605 Update comment.
21606 (read_inferior_memory): Adapt prototype.
21607 * server.c (main): Return an error packet if
21608 read_inferior_memory() returns an error.
21609
a59d1c82
DJ
216102004-03-04 Daniel Jacobowitz <drow@mvista.com>
21611
21612 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21613 Unify with other clean targets.
21614
dc3f8883
DJ
216152004-02-29 Daniel Jacobowitz <drow@mvista.com>
21616
21617 * server.c (handle_v_cont): Call set_desired_inferior.
21618
89a208da
DJ
216192004-02-29 Daniel Jacobowitz <drow@mvista.com>
21620
21621 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21622
62ea82f5
DJ
216232004-02-29 Daniel Jacobowitz <drow@mvista.com>
21624
21625 * linux-low.c (linux_wait): Unblock async I/O.
21626 (linux_resume): Block and enable async I/O.
21627 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21628 * server.h (block_async_io, unblock_async_io): Add prototypes.
21629
6910d122
DJ
216302004-02-29 Daniel Jacobowitz <drow@mvista.com>
21631
21632 * remote-utils.c (remote_open): Print a status notice after
21633 opening a TCP port.
21634 * server.c (attach_inferior): Print a status notice after
21635 attaching.
21636
216372004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
21638
21639 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21640
c89dc5d4
DJ
216412004-02-26 Daniel Jacobowitz <drow@mvista.com>
21642
21643 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21644 error packet.
21645 * server.c, target.h: Update copyright years.
21646
4b8dad4a
RM
216472004-02-25 Roland McGrath <roland@redhat.com>
21648
21649 * target.h (struct target_ops): New member `read_auxv'.
21650 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21651 * linux-low.c (linux_read_auxv): New function.
21652 (linux_target_ops): Initialize `read_auxv' member to that.
21653
d7446758
JB
216542004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21655
21656 Committed by Jim Blandy <jimb@redhat.com>.
21657
21658 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 21659 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
21660 instead of GPR_SIZE to distiguish s390 and s390x targets.
21661
5544ad89
DJ
216622004-01-31 Daniel Jacobowitz <drow@mvista.com>
21663
21664 * linux-low.c: Update copyright year.
21665 (check_removed_breakpoint): Clear pending_is_breakpoint.
21666 (linux_set_resume_request, linux_queue_one_thread)
21667 (resume_status_pending_p): New functions.
21668 (linux_continue_one_thread): Use process->resume.
21669 (linux_resume): Only resume threads if there are no pending events.
21670 * linux-low.h (struct process_info): Add resume request
21671 pointer.
21672
2a68b70e
DJ
216732004-01-30 Daniel Jacobowitz <drow@mvista.com>
21674
21675 * regcache.c (new_register_cache): Clear the allocated register
21676 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21677
64386c31
DJ
216782003-10-13 Daniel Jacobowitz <drow@mvista.com>
21679
21680 * linux-low.c (linux_resume): Take a struct thread_resume *
21681 argument.
21682 (linux_wait): Update call.
21683 (resume_ptr): New static variable.
21684 (linux_continue_one_thread): Renamed from
21685 linux_continue_one_process. Use resume_ptr.
21686 (linux_resume): Use linux_continue_one_thread.
21687 * server.c (handle_v_cont, handle_v_requests): New functions.
21688 (myresume): New function.
21689 (main): Handle 'v' case.
21690 * target.h (struct thread_resume): New type.
21691 (struct target_ops): Change argument of "resume" to struct
21692 thread_resume *.
21693 (myresume): Delete macro.
21694
c938e9b0
L
216952003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21696
21697 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21698 (uninstall): Support DESTDIR.
21699
7f313d07
BC
21700Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21701
21702 * configure.srv: Add xscale*linux copy of arm*linux entry.
21703
3b2fc2ea
DJ
217042003-07-24 Daniel Jacobowitz <drow@mvista.com>
21705
21706 * linux-arm-low.c (arm_reinsert_addr): New function.
21707 (the_low_target): Add arm_reinsert_addr.
21708
1c0a559e
MK
217092003-07-08 Mark Kettenis <kettenis@gnu.org>
21710
21711 * mem-break.c: Remove whitespace at end of file.
21712
43d5792c
DJ
217132003-06-28 Daniel Jacobowitz <drow@mvista.com>
21714
21715 * configure.in: Check whether we need to prototype strerror.
21716 * server.h: Optionally prototype strerror.
21717 * gdbreplay.c (perror_with_name): Use strerror.
21718 * linux-low.c (linux_attach_lwp): Use strerror.
21719 * utils.c (perror_with_name): Use strerror.
21720 * config.in, configure: Regenerated.
21721
c8a86edf
DJ
217222003-06-28 Daniel Jacobowitz <drow@mvista.com>
21723
21724 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21725 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21726
73d37363
DJ
217272003-06-20 Daniel Jacobowitz <drow@mvista.com>
21728
21729 * Makefile.in (SFILES): Update.
21730 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21731 low-sun3.c: Remove files.
21732
6ad8ae5c
DJ
217332003-06-17 Daniel Jacobowitz <drow@mvista.com>
21734
21735 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21736 (linux_detach_one_process, linux_detach): New functions.
21737 (linux_target_ops): Add linux_detach.
21738 * server.c (main): Handle 'D' packet.
21739 * target.h (struct target_ops): Add "detach" member.
21740 (detach_inferior): Define.
21741
1581182a
MK
217422003-06-13 Mark Kettenis <kettenis@gnu.org>
21743
21744 From Kelley Cook <kelleycook@wideopenwest.com>:
21745 * configure.srv: Accept i[34567]86 variants.
21746
e5379b03
DJ
217472003-06-05 Daniel Jacobowitz <drow@mvista.com>
21748
21749 * linux-low.c (linux_wait_for_event): Correct comment typos.
21750 (linux_resume_one_process): Call check_removed_breakpoint.
21751 (linux_send_signal): New function.
21752 (linux_target_ops): Add linux_send_signal.
21753 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21754 of kill.
21755 * target.h (struct target_ops): Add send_signal.
21756
2ff29de4
JB
217572003-05-29 Jim Blandy <jimb@redhat.com>
21758
21759 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21760 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21761 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21762 away part of the register's value.
21763
254787d4
DJ
217642003-03-26 Daniel Jacobowitz <drow@mvista.com>
21765
21766 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21767 (linux_wait_for_event, linux_init_signals): Likewise.
21768
94e10508
DJ
217692003-03-17 Daniel Jacobowitz <drow@mvista.com>
21770
21771 * configure.in: Check for stdlib.h.
21772 * configure: Regenerated.
21773 * config.in: Regenerated.
21774
4c0711e0
DJ
217752003-01-04 Andreas Schwab <schwab@suse.de>
21776
21777 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21778
ef66e766
AC
217792003-01-02 Andrew Cagney <ac131313@redhat.com>
21780
21781 * Makefile.in: Remove obsolete code.
21782
a1358604
DJ
217832002-11-20 Daniel Jacobowitz <drow@mvista.com>
21784
21785 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21786 defined(PT_FPR0_HI).
21787
23ce3b1c
DJ
217882002-11-17 Stuart Hughes <seh@zee2.com>
21789
21790 * linux-arm-low.c (arm_num_regs): Increase.
21791 (arm_regmap): Include status register.
21792
217932002-11-17 Daniel Jacobowitz <drow@mvista.com>
21794
21795 * linux-low.c (register_addr): Remove incorrect -1 check.
21796
a9fa9f7d
DJ
217972002-08-29 Daniel Jacobowitz <drow@mvista.com>
21798
21799 * linux-low.c (linux_create_inferior): Call setpgid. Return
21800 the new PID.
21801 (unstopped_p, linux_signal_pid): Remove.
21802 (linux_target_ops): Remove linux_signal_pid.
21803 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21804 global instead of target method.
21805 * target.h (struct target_ops): Remove signal_pid. Update comment
21806 for create_inferior.
21807 * server.c (signal_pid): New variable.
21808 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 21809 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
21810 (attach_inferior): Set signal_pid.
21811
17574093
DJ
218122002-08-23 Daniel Jacobowitz <drow@mvista.com>
21813
21814 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21815
218162002-08-20 Jim Blandy <jimb@redhat.com>
21817
21818 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21819 default for this.
21820
218212002-08-01 Andrew Cagney <cagney@redhat.com>
21822
21823 * Makefile.in: Make chill references obsolete.
21824
218252002-07-24 Kevin Buettner <kevinb@redhat.com>
21826
21827 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21828 * configure: Regenerate.
21829 * config.in: Regenerate.
21830
218312002-07-09 David O'Brien <obrien@FreeBSD.org>
21832
21833 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21834 (perror_with_name, remote_close, remote_open, expect, play): Static.
21835
218362002-07-04 Michal Ludvig <mludvig@suse.cz>
21837
4b8dad4a 21838 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
21839 byte offsets instead of an array of indexes.
21840 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21841
218422002-06-13 Daniel Jacobowitz <drow@mvista.com>
21843
21844 * regcache.c: Add comment.
21845
218462002-06-11 Daniel Jacobowitz <drow@mvista.com>
21847
21848 * thread-db.c: New file.
21849 * proc-service.c: New file.
21850 * acinclude.m4: New file.
21851 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21852 proc-service.o, and thread-db.o.
21853 (linux-low.o): Add USE_THREAD_DB.
21854 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21855 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21856 * aclocal.m4: Regenerated.
21857 * config.in: Regenerated.
21858 * configure: Regenerated.
21859 * configure.in: Check for proc_service.h, sys/procfs.h,
21860 thread_db.h, and linux/elf.h headrs.
21861 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21862 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21863 Check for -lthread_db and thread support.
21864 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21865 PowerPC, and SuperH.
21866 * i387-fp.c: Constify arguments.
21867 * i387-fp.h: Likewise.
21868 * inferiors.c: (struct thread_info): Renamed from
21869 `struct inferior_info'. Remove PID member. Use generic inferior
21870 list header. All uses updated.
21871 (inferiors, signal_pid): Removed.
21872 (all_threads): New variable.
21873 (get_thread): Define.
21874 (add_inferior_to_list): New function.
21875 (for_each_inferior): New function.
21876 (change_inferior_id): New function.
21877 (add_inferior): Removed.
21878 (remove_inferior): New function.
21879 (add_thread): New function.
21880 (free_one_thread): New function.
21881 (remove_thread): New function.
21882 (clear_inferiors): Use for_each_inferior and free_one_thread.
21883 (find_inferior): New function.
21884 (find_inferior_id): New function.
21885 (inferior_target_data): Update argument type.
21886 (set_inferior_target_data): Likewise.
21887 (inferior_regcache_data): Likewise.
21888 (set_inferior_regcache_data): Likewise.
21889 * linux-low.c (linux_bp_reinsert): Remove.
21890 (all_processes, stopping_threads, using_thrads)
21891 (struct pending_signals, debug_threads, pid_of): New.
21892 (inferior_pid): Replace with macro.
21893 (struct inferior_linux_data): Remove.
21894 (get_stop_pc, add_process): New functions.
21895 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
21896 Use add_process and add_thread.
21897 (linux_attach_lwp): New function, based on old linux_attach. Use
21898 add_process and add_thread. Set stop_expected for new threads.
21899 (linux_attach): New function.
21900 (linux_kill_one_process): New function.
21901 (linux_kill): Kill all LWPs.
21902 (linux_thread_alive): Use find_inferior_id.
21903 (check_removed_breakpoints, status_pending_p): New functions.
21904 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
21905 Update. Use WNOHANG. Wait for cloned processes also. Update process
21906 struct for the found process.
21907 (linux_wait_for_event): New function.
21908 (linux_wait): Use it. Support LWPs.
21909 (send_sigstop, wait_for_sigstop, stop_all_processes)
21910 (linux_resume_one_process, linux_continue_one_process): New functions.
21911 (linux_resume): Support LWPs.
21912 (REGISTER_RAW_SIZE): Remove.
21913 (fetch_register): Use register_size instead. Call supply_register.
21914 (usr_store_inferior_registers): Likewise. Call collect_register.
21915 Fix recursive case.
21916 (regsets_fetch_inferior_registers): Improve error message.
21917 (regsets_store_inferior_registers): Add debugging.
21918 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
21919 (unstopped_p, linux_signal_pid): New functions.
21920 (linux_target_ops): Add linux_signal_pid.
21921 (linux_init_signals): New function.
21922 (initialize_low): Call it. Initialize using_threads.
21923 * regcache.c (inferior_regcache_data): Add valid
21924 flag.
21925 (get_regcache): Fetch registers lazily. Add fetch argument
21926 and update all callers.
21927 (regcache_invalidate_one, regcache_invalidate): New
21928 functions.
21929 (new_register_cache): Renamed from create_register_cache.
21930 Return the new regcache.
21931 (free_register_cache): Change argument to a void *.
21932 (registers_to_string, registers_from_string): Call get_regcache
21933 with fetch flag set.
21934 (register_data): Make static. Pass fetch flag to get_regcache.
21935 (supply_register): Call get_regcache with fetch flag clear.
21936 (collect_register): Call get_regcache with fetch flag set.
21937 (collect_register_as_string): New function.
21938 * regcache.h: Update.
21939 * remote-utils.c (putpkt): Flush after debug output and use
21940 stderr.
21941 Handle input interrupts while waiting for an ACK.
21942 (input_interrupt): Use signal_pid method.
21943 (getpkt): Flush after debug output and use stderr.
21944 (outreg): Use collect_register_as_string.
21945 (new_thread_notify, dead_thread_notify): New functions.
21946 (prepare_resume_reply): Check using_threads. Set thread_from_wait
21947 and general_thread.
21948 (look_up_one_symbol): Flush after debug output.
21949 * server.c (step_thread, server_waiting): New variables.
21950 (start_inferior): Don't use signal_pid. Update call to mywait.
21951 (attach_inferior): Update call to mywait.
21952 (handle_query): Handle qfThreadInfo and qsThreadInfo.
21953 (main): Don't fetch/store registers explicitly. Use
21954 set_desired_inferior. Support proposed ``Hs'' packet. Update
21955 calls to mywait.
21956 * server.h: Update.
21957 (struct inferior_list, struct_inferior_list_entry): New.
21958 * target.c (set_desired_inferior): New.
21959 (write_inferior_memory): Constify.
21960 (mywait): New function.
21961 * target.h: Update.
21962 (struct target_ops): New signal_pid method.
21963 (mywait): Removed macro, added prototype.
21964
21965 * linux-low.h (regset_func): Removed.
21966 (regset_fill_func, regset_store_func): New.
21967 (enum regset_type): New.
21968 (struct regset_info): Add type field. Use new operation types.
21969 (struct linux_target_ops): stop_pc renamed to get_pc.
21970 Add decr_pc_after_break and breakpoint_at.
21971 (get_process, get_thread_proess, get_process_thread)
21972 (strut process_info, all_processes, linux_attach_lwp)
21973 (thread_db_init): New.
21974
21975 * linux-arm-low.c (arm_get_pc, arm_set_pc,
21976 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
21977 (the_low_target): Add new members.
21978 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
21979 (i386_store_fpxregset): Constify.
21980 (target_regsets): Add new kind identifier.
21981 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
21982 (i386_set_pc): Add debugging.
21983 (i386_breakpoint_at): New function.
21984 (the_low_target): Add new members.
21985 * linux-mips-low.c (mips_get_pc, mips_set_pc)
21986 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
21987 (mips_breakpoint_at): New.
21988 (the_low_target): Add new members.
21989 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
21990 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
21991 (the_low_target): Add new members.
21992 * linux-sh-low.c (sh_get_pc, sh_set_pc)
21993 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
21994 (the_low_target): Add new members.
21995 * linux-x86-64-low.c (target_regsets): Add new kind
21996 identifier.
21997
219982002-05-15 Daniel Jacobowitz <drow@mvista.com>
21999
22000 From Martin Pool <mbp@samba.org>:
22001 * server.c (gdbserver_usage): New function.
22002 (main): Call it.
22003
220042002-05-14 Daniel Jacobowitz <drow@mvista.com>
22005
22006 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22007 stop_at -> stop_pc.
22008
220092002-05-04 Andrew Cagney <ac131313@redhat.com>
22010
22011 * Makefile.in: Remove obsolete code.
22012
220132002-04-24 Michal Ludvig <mludvig@suse.cz>
22014
22015 * linux-low.c (regsets_fetch_inferior_registers),
22016 (regsets_store_inferior_registers): Removed cast to int from
22017 ptrace() calls.
22018 * regcache.h: Added declaration of struct inferior_info.
22019
220202002-04-20 Daniel Jacobowitz <drow@mvista.com>
22021
22022 * inferiors.c (struct inferior_info): Add regcache_data.
22023 (add_inferior): Call create_register_cache.
22024 (clear_inferiors): Call free_register_cache.
22025 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22026 * regcache.c (struct inferior_regcache_data): New.
22027 (registers): Remove.
22028 (get_regcache): New function.
22029 (create_register_cache, free_register_cache): New functions.
22030 (set_register_cache): Don't initialize the register cache here.
22031 (registers_to_string, registers_from_string, register_data): Call
22032 get_regcache.
22033 * regcache.h: Add prototypes.
22034 * server.h: Likewise.
22035
220362002-04-20 Daniel Jacobowitz <drow@mvista.com>
22037
22038 * mem-break.c: New file.
22039 * mem-break.h: New file.
22040 * Makefile.in: Add mem-break.o rule; update server.h
22041 dependencies.
22042 * inferiors.c (struct inferior_info): Add target_data
22043 member.
22044 (clear_inferiors): Free target_data member if set.
22045 (inferior_target_data, set_inferior_target_data): New functions.
22046 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22047 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22048 * linux-low.c (linux_bp_reinsert): New variable.
22049 (struct inferior_linux_data): New.
22050 (linux_create_inferior): Use set_inferior_target_data.
22051 (linux_attach): Likewise. Call add_inferior.
22052 (linux_wait_for_one_inferior): New function.
22053 (linux_wait): Call it.
22054 (linux_write_memory): Add const.
22055 (initialize_low): Call set_breakpoint_data.
22056 * linux-low.h (struct linux_target_ops): Add breakpoint
22057 handling members.
22058 * server.c (attach_inferior): Remove extra add_inferior
22059 call.
22060 * server.h: Include mem-break.h. Update inferior.c
22061 prototypes.
22062 * target.c (read_inferior_memory)
22063 (write_inferior_memory): New functions.
22064 * target.h (read_inferior_memory)
22065 (write_inferior_memory): Change macros to prototypes.
22066 (struct target_ops): Update comments. Add const to write_memory
22067 definition.
22068
220692002-04-11 Daniel Jacobowitz <drow@mvista.com>
22070
22071 * linux-low.c (usr_store_inferior_registers): Support
22072 registers which are allowed to fail to store.
22073 * linux-low.h (linux_target_ops): Likewise.
22074 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22075 (ppc_cannot_store_register): FPSCR may not be storable.
22076
220772002-04-09 Daniel Jacobowitz <drow@mvista.com>
22078
22079 * server.h: Include <string.h> if HAVE_STRING_H.
22080 * ChangeLog: Correct paths in last ChangeLog entry.
22081
220822002-04-09 Daniel Jacobowitz <drow@mvista.com>
22083
22084 * linux-low.h: Remove obsolete prototypes.
22085 (struct linux_target_ops): New.
22086 (extern the_low_target): New.
22087 * linux-low.c (num_regs, regmap): Remove declarations.
22088 (register_addr): Use the_low_target explicitly.
22089 (fetch_register): Likewise.
22090 (usr_fetch_inferior_registers): Likewise.
22091 (usr_store_inferior_registers): Likewise.
22092 * linux-arm-low.c (num_regs): Remove.
22093 (arm_num_regs): Define.
22094 (arm_regmap): Renamed from regmap, made static.
22095 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22096 made static.
22097 (arm_cannot_store_register): Renamed from cannot_store_register,
22098 made static.
22099 (the_low_target): New.
22100 * linux-i386-low.c (num_regs): Remove.
22101 (i386_num_regs): Define.
22102 (i386_regmap): Renamed from regmap, made static.
22103 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22104 made static.
22105 (i386_cannot_store_register): Renamed from cannot_store_register,
22106 made static.
22107 (the_low_target): New.
22108 * linux-ia64-low.c (num_regs): Remove.
22109 (ia64_num_regs): Define.
22110 (ia64_regmap): Renamed from regmap, made static.
22111 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22112 made static.
22113 (ia64_cannot_store_register): Renamed from cannot_store_register,
22114 made static.
22115 (the_low_target): New.
22116 * linux-m68k-low.c (num_regs): Remove.
22117 (m68k_num_regs): Define.
22118 (m68k_regmap): Renamed from regmap, made static.
22119 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22120 made static.
22121 (m68k_cannot_store_register): Renamed from cannot_store_register,
22122 made static.
22123 (the_low_target): New.
22124 * linux-mips-low.c (num_regs): Remove.
22125 (mips_num_regs): Define.
22126 (mips_regmap): Renamed from regmap, made static.
22127 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22128 made static.
22129 (mips_cannot_store_register): Renamed from cannot_store_register,
22130 made static.
22131 (the_low_target): New.
22132 * linux-ppc-low.c (num_regs): Remove.
22133 (ppc_num_regs): Define.
22134 (ppc_regmap): Renamed from regmap, made static.
22135 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22136 made static.
22137 (ppc_cannot_store_register): Renamed from cannot_store_register,
22138 made static.
22139 (the_low_target): New.
22140 * linux-s390-low.c (num_regs): Remove.
22141 (s390_num_regs): Define.
22142 (s390_regmap): Renamed from regmap, made static.
22143 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22144 made static.
22145 (s390_cannot_store_register): Renamed from cannot_store_register,
22146 made static.
22147 (the_low_target): New.
22148 * linux-sh-low.c (num_regs): Remove.
22149 (sh_num_regs): Define.
22150 (sh_regmap): Renamed from regmap, made static.
22151 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22152 made static.
22153 (sh_cannot_store_register): Renamed from cannot_store_register,
22154 made static.
22155 (the_low_target): New.
22156 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22157 (the_low_target): New.
22158
221592002-04-09 Daniel Jacobowitz <drow@mvista.com>
22160
22161 * Makefile.in: Add stamp-h target.
22162 * configure.in: Create stamp-h.
22163 * configure: Regenerated.
22164
221652002-04-09 Daniel Jacobowitz <drow@mvista.com>
22166
22167 * inferiors.c: New file.
22168 * target.c: New file.
22169 * target.h: New file.
22170 * Makefile.in: Add target.o and inferiors.o. Update
22171 dependencies.
22172 * linux-low.c (inferior_pid): New static variable,
22173 moved from server.c.
22174 (linux_create_inferior): Renamed from create_inferior.
22175 Call add_inferior. Return 0 on success instead of a PID.
22176 (linux_attach): Renamed from myattach.
22177 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22178 (linux_thread_alive): Renamed from mythread_alive.
22179 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22180 child dies.
22181 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22182 (regsets_store_inferior_registers): Correct error message.
22183 Add missing ``return 0''.
22184 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22185 (linux_store_registers): Renamed from store_inferior_registers.
22186 (linux_read_memory): Renamed from read_inferior_memory.
22187 (linux_write_memory): Renamed from write_inferior_memory.
22188 (linux_target_ops): New structure.
22189 (initialize_low): Call set_target_ops ().
22190 * remote-utils.c (unhexify): New function.
22191 (hexify): New function.
22192 (input_interrupt): Send signals to ``signal_pid''.
22193 * server.c (inferior_pid): Remove.
22194 (start_inferior): Update create_inferior call.
22195 (attach_inferior): Call add_inferior.
22196 (handle_query): New function.
22197 (main): Call handle_query for `q' packets.
22198 * server.h: Include "target.h". Remove obsolete prototypes.
22199 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22200
222012002-04-09 Daniel Jacobowitz <drow@mvista.com>
22202
22203 * Makefile.in: Add WARN_CFLAGS. Update configury
22204 dependencies.
22205 * configure.in: Check for <string.h>
22206 * configure: Regenerate.
22207 * config.in: Regenerate.
22208 * gdbreplay.c: Include needed system headers.
22209 (remote_open): Remove strchr prototype.
22210 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22211 * regcache.c (supply_register): Change buf argument to const void *.
22212 (supply_register_by_name): Likewise.
22213 (collect_register): Change buf argument to void *.
22214 (collect_register_by_name): Likewise.
22215 * regcache.h: Add missing prototypes.
22216 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22217 * server.c (handle_query): New function.
22218 (attached): New static variable, moved out of main.
22219 (main): Quiet longjmp clobber warnings.
22220 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22221 * utils.c (error): Remove NORETURN.
22222 (fatal): Likewise.