Commonise tdesc types and makes use of them in gdbserver tdesc
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-04-18 Alan Hayward <alan.hayward@arm.com>
2
3 * tdesc.c (tdesc_create_flags): Remove.
4 (tdesc_add_flag): Likewise.
5 (tdesc_named_type): Likewise.
6 (tdesc_create_union): Likewise.
7 (tdesc_create_struct): Likewise.
8 (tdesc_create_vector): Likewise.
9 (tdesc_add_bitfield): Likewise.
10 (tdesc_add_field): Likewise.
11 (tdesc_set_struct_size): Likewise.
12
13 2018-04-18 Alan Hayward <alan.hayward@arm.com>
14
15 * tdesc.c (~target_desc): Remove implictly deleted items.
16 (init_target_desc): Iterate all features.
17 (tdesc_get_features_xml): Use vector.
18 (tdesc_create_feature): Create feature.
19 * tdesc.h (tdesc_feature) Remove
20 (target_desc): Add features.
21
22 2018-04-18 Alan Hayward <alan.hayward@arm.com>
23
24 * Makefile.in: Add common/tdesc.c
25 * tdesc.c (init_target_desc): init all reg_defs from register
26 vector.
27 (tdesc_create_reg): Create tdesc_reg.
28 * tdesc.h (tdesc_feature): Add register vector.
29
30 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
31
32 * tdesc.h (struct target_desc) <features>: Change type to
33 std::vector<std::string>.
34 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
35 changes.
36 (tdesc_get_features_xml): Likewise.
37 (tdesc_create_feature): Likewise.
38
39 2018-03-26 Alan Hayward <alan.hayward@arm.com>
40
41 * regcache.c (find_register_by_number): Return a ref.
42 (find_regno): Use references.
43 (register_size): Likewise.
44 (register_data): Likewise.
45 * tdesc.c (target_desc::~target_desc): Remove free calls.
46 (target_desc::operator==): Use std::vector compare.
47 (init_target_desc): Use reference.
48 (tdesc_create_reg): Use reg constructors.
49 * tdesc.h (struct target_desc): Replace pointer with object.
50
51 2018-03-23 Alan Hayward <alan.hayward@arm.com>
52
53 * regcache.c (find_register_by_number): Make static.
54 (find_regno): Use find_register_by_number
55 * regcache.h (struct reg): Remove declaration.
56
57 2018-03-23 Alan Hayward <alan.hayward@arm.com>
58
59 * tdesc.c (target_desc::~target_desc): Move to here.
60 (target_desc::operator==): Likewise.
61 * tdesc.h (target_desc::~target_desc): Move from here.
62 (target_desc::operator==): Likewise.
63
64 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
65
66 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
67
68 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
69
70 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
71 S390_TDESC_GS.
72 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
73 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
74 and init_registers_s390_gs_linux64.
75
76 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
77
78 * linux-s390-low.c (s390_fill_gs): Remove function.
79 (s390_fill_gsbc): Remove function.
80 (s390_regsets): Set fill functions for the guarded storage regsets
81 to NULL.
82
83 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
84
85 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
86 the word size. Add comment.
87 (s390_get_wordsize): New function.
88 (s390_arch_setup): No longer select a temporary tdesc to fetch the
89 pswm with it. Instead, use s390_get_wordsize to determine the
90 word size first and derive the correct tdesc from that directly.
91
92 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
93
94 * Makefile.in: Include silent-rules.mk.
95 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
96 (COMPILE): Add ECHO_CXX.
97 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
98 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
99 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
100 (version-generated.c): Add ECHO_GEN.
101 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
102 (IPAGENT_COMPILE): Add ECHO_CXX.
103 (%-generated.c): Add ECHO_REGDAT.
104
105 2018-03-14 Tom Tromey <tom@tromey.com>
106
107 PR cli/14977:
108 * ax.c (ax_printf): Special case for NULL.
109
110 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * linux-low.c (linux_qxfer_libraries_svr4): Use
113 xml_escape_text_append.
114
115 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
116
117 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
118
119 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
120
121 * server.c (handle_general_set): Remove unnecessary xstrdup.
122
123 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
124
125 * server.c (parse_debug_format_options): Adjust to
126 delim_string_to_char_ptr_vec changes.
127 * thread-db.c (thread_db_load_search): Adjust to
128 dirnames_to_char_ptr_vec changes.
129
130 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
131
132 * target.h (target_enable_btrace, target_disable_btrace)
133 (target_read_btrace, target_read_btrace_conf): Turn macro into
134 inline function. Throw error if target method is not defined.
135 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
136 check for btrace target method. Be prepared to handle exceptions
137 from btrace target methods.
138
139 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
140
141 * server.c (captured_main): Change order of error message printed
142 when the current working directory cannot be found.
143
144 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
145
146 * server.c: Include "filenames.h" and "pathstuff.h".
147 (program_name): Delete variable.
148 (program_path): New anonymous class.
149 (get_exec_wrapper): Use "program_path" instead of
150 "program_name".
151 (handle_v_run): Likewise.
152 (captured_main): Likewise.
153 (process_serial_event): Likewise.
154
155 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
156
157 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
158 (OBJS): Add "pathstuff.o".
159 * server.c (current_directory): New global variable.
160 (captured_main): Initialize "current_directory".
161
162 2018-02-26 Alan Hayward <alan.hayward@arm.com>
163
164 * tdesc.c: Use common/tdesc.h.
165 * tdesc.h: Likewise.
166
167 2018-02-20 Alan Hayward <alan.hayward@arm.com>
168 Simon Marchi <simon.marchi@ericsson.com>
169
170 * Makefile.in: Switch order of make rules.
171
172 2018-02-19 Alan Hayward <alan.hayward@arm.com>
173
174 * Makefile.in: Add common directory in build.
175 * configure.ac: Add common reference.
176 * configure: Regenerate.
177
178 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
179
180 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
181 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
182 * spu-low.c (spu_target_ops): Likewise.
183 * win32-low.c (win32_target_ops): Likewise.
184 * server.c (supported_btrace_packets): Report packets unconditionally.
185 * target.h (target_ops) <supports_btrace>: Remove.
186 (target_supports_btrace): Remove.
187
188 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
189
190 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
191 (handle_btrace_disable): Change return type to void. Use exceptions
192 to report errors.
193 (handle_btrace_general_set): Catch exception and copy message to
194 return message.
195
196 2018-02-08 Tom Tromey <tom@tromey.com>
197
198 * linux-low.c (install_software_single_step_breakpoints): Use
199 make_scoped_restore.
200 * inferiors.c (make_cleanup_restore_current_thread): Remove.
201 (do_restore_current_thread_cleanup): Remove.
202 * gdbthread.h (make_cleanup_restore_current_thread): Don't
203 declare.
204
205 2018-02-08 Tom Tromey <tom@tromey.com>
206
207 * mem-break.c (set_raw_breakpoint_at): Use
208 gdb::unique_xmalloc_ptr.
209
210 2018-01-30 Pedro Alves <palves@redhat.com>
211
212 PR gdb/13211
213 * target.c (target_terminal::terminal_state): Rename to ...
214 (target_terminal::m_terminal_state): ... this.
215
216 2018-01-19 James Clarke <jrtc27@jrtc27.com>
217
218 * linux-low.c (handle_extended_wait): Surround call to
219 thread_db_notice_clone with #ifdef USE_THREAD_DB.
220
221 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
222
223 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
224 linux_ptrace_attach_fail_reason_string now returning an
225 std::string.
226 (linux_attach): Likewise.
227 * thread-db.c (attach_thread): Likewise.
228
229 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
230
231 PR gdb/21559
232 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
233 checking for fs_base/gs_base fields in struct user_regs_struct.
234 * configure: Regenerate.
235
236 2018-01-16 Yao Qi <yao.qi@linaro.org>
237
238 PR gdb/18749
239 * linux-low.c (fetch_register): Call supply_register instead of
240 error.
241
242 2018-01-08 Yao Qi <yao.qi@linaro.org>
243 Simon Marchi <simon.marchi@ericsson.com>
244
245 * Makefile.in (OBS): Remove selftest.o.
246 * configure.ac: Set srv_selftest_objs if $development is true.
247 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
248 * configure: Re-generated.
249 * server.c (captured_main): Wrap variable selftest_filter with
250 GDB_SELF_TEST.
251
252 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
253
254 * server.c (parse_debug_format_options): Return std::string.
255 (handle_monitor_command, captured_main): Adjust.
256
257 2018-01-05 Pedro Alves <palves@redhat.com>
258
259 PR gdb/18653
260 * server.c (captured_main): Pass quiet=false to
261 save_original_signals_state.
262
263 2018-01-01 Joel Brobecker <brobecker@adacore.com>
264
265 * gdbreplay.c (gdbreplay_version): Update copyright year in
266 version message.
267 * server.c (gdbserver_version): Likewise.
268
269 2017-12-08 Tom Tromey <tom@tromey.com>
270
271 * ax.c (ax_printf): Update.
272
273 2017-12-07 Yao Qi <yao.qi@linaro.org>
274
275 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
276 aarch64_linux_read_description.
277 * linux-amd64-ipa.c (idx2mask): New array.
278 (get_ipa_tdesc): Move idx2mask out.
279 (initialize_low_tracepoint): Initialize target descriptions.
280 * linux-i386-ipa.c (idx2mask): New array.
281 (get_ipa_tdesc): Move idx2mask out.
282 (initialize_low_tracepoint): Initialize target descriptions.
283
284 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
285
286 * tdesc.c (struct tdesc_type): Change return type.
287 (tdesc_add_flag): Change parameter type.
288 (tdesc_add_bitfield): Likewise.
289 (tdesc_add_field): Likewise.
290 (tdesc_set_struct_size): Likewise.
291
292 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
293
294 * regcache.c (registers_to_string): Remove unused variable.
295
296 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
297
298 * inferiors.c (for_each_inferior_with_data): Remove.
299 * inferiors.h (for_each_inferior_with_data): Remove.
300 * server.c (handle_qxfer_threads_worker): Change parameter type.
301 (handle_qxfer_threads_proper): Use for_each_thread.
302
303 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
304
305 * inferiors.c (for_each_inferior): Remove.
306 (clear_inferiors): Use for_each_thread.
307 * inferiors.h (for_each_inferior): Remove.
308 * linux-low.c (linux_wait_for_event_filtered): Use
309 for_each_thread.
310 (linux_stabilize_threads): Likewise.
311 * regcache.c (regcache_release): Likewise.
312 * server.c (gdb_wants_all_threads_stopped): Likewise.
313 (clear_pending_status_callback): Remove.
314 (handle_status): Use for_each_thread.
315 (captured_main): Likewise.
316 * win32-low.c (child_init_thread_list): Likewise.
317 (win32_clear_inferiors): Likewise.
318 (fake_breakpoint_event): Likewise.
319
320 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
321
322 * inferiors.h (find_inferior): Remove.
323 * inferiors.c (find_inferior): Remove.
324
325 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
326
327 * linux-low.c (resume_status_pending_p): Update comment.
328 (need_step_over_p): Update comment.
329
330 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
331
332 * linux-low.c (proceed_one_lwp): Return void, change parameter
333 type.
334 (unsuspend_and_proceed_one_lwp): Likewise.
335 (proceed_all_lwps): Use for_each_thread.
336 (unstop_all_lwps): Likewise.
337
338 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
339
340 * linux-low.c (linux_resume_one_thread): Return void, take
341 parameter directly.
342 (linux_resume): Use for_each_thread.
343
344 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
345
346 * linux-low.c (send_sigstop_callback): Return void, change
347 parameter type. Rename to...
348 (send_sigstop): ... this.
349 (suspend_and_send_sigstop_callback): Return void, change parameter
350 type. Rename to...
351 (suspend_and_send_sigstop): ... this.
352 (stop_all_lwps): Use for_each_thread.
353
354 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
355
356 * linux-low.c (lwp_running): Return bool, remove unused
357 argument.
358 (linux_stabilize_threads): Use find_thread.
359
360 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
361
362 * linux-low.c (select_singlestep_lwp_callback): Remove.
363 (count_events_callback): Remove.
364 (select_event_lwp_callback): Remove.
365 (select_event_lwp): Use find_thread/for_each_thread.
366
367 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
368
369 * linux-low.c (not_stopped_callback): Return bool, take filter
370 argument directly.
371 (linux_wait_for_event_filtered): Use find_thread.
372 (linux_wait_1): Likewise.
373
374 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
375
376 * linux-low.c (same_lwp): Remove.
377 (find_lwp_pid): Use find_thread.
378
379 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
380
381 * linux-low.c (delete_lwp_callback): Remove.
382 (linux_mourn): Use for_each_thread.
383
384 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
385
386 * linux-low.c (linux_detach_lwp_callback): Return void, remove
387 args parameter, don't check for pid.
388 (linux_detach): Use for_each_thread.
389
390 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
391
392 * linux-low.c (struct counter): Remove.
393 (second_thread_of_pid_p): Remove.
394 (last_thread_of_process_p): Use find_thread.
395
396 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
397
398 * inferiors.c (find_inferior_in_random): Remove.
399 * inferiors.h (find_inferior_in_random): Remove.
400 * linux-low.c (status_pending_p_callback): Return bool, accept
401 parameter ptid directly.
402 (linux_wait_for_event_filtered): Use find_thread_in_random.
403 (linux_wait_1): Likewise.
404
405 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
406
407 * inferiors.c (find_inferior_id): Remove.
408 (find_thread_ptid): Move implemention from find_inferior_id to
409 here.
410 * inferiors.h (find_inferior_id): Remove.
411 * server.c (handle_status): Use find_thread_ptid.
412 (process_serial_event): Likewise.
413 * thread-db.c (find_one_thread): Likewise.
414 (thread_db_thread_handle): Likewise.
415 * win32-low.c (thread_rec): Likewise.
416 (child_delete_thread): Likewise.
417 (win32_thread_alive): Likewise.
418 (get_child_debug_event): Likewise.
419
420 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
421
422 * linux-mips-low.c (update_watch_registers_callback): Return
423 void, remove pid_p parameter, don't check for pid.
424 (mips_insert_point, mips_remove_point): Use for_each_thread.
425
426 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
427
428 * lynx.low (lynx_delete_thread_callback): Remove.
429 (lynx_mourn): Use for_each_thread.
430
431 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
432
433 * regcache.c (regcache_invalidate_one): Remove.
434 (regcache_invalidate_pid): use for_each_thread.
435
436 2017-11-26 Tom Tromey <tom@tromey.com>
437
438 * linux-low.c (linux_create_inferior): Update.
439
440 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
441
442 * spu-low.c (spu_create_inferior): Fix typo in argument name.
443
444 2017-11-24 Alan Hayward <alan.hayward@arm.com>
445
446 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
447 * linux-aarch64-low.c (initialize_low_arch): Call init func.
448 * linux-aarch64-tdesc-selftest.c: New file.
449 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
450
451 2017-11-24 Alan Hayward <alan.hayward@arm.com>
452
453 * configure.srv: Add new file.
454 * linux-aarch64-low.c (initialize_low_arch): Call init func.
455 * linux-aarch64-tdesc-selftest.c: New file.
456 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
457
458 2017-11-24 Alan Hayward <alan.hayward@arm.com>
459
460 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
461 * linux-aarch64-low.c (initialize_low_arch): Remove init.
462 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
463
464 2017-11-24 Alan Hayward <alan.hayward@arm.com>
465
466 * configure.srv: Add new files.
467 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
468 aarch64_linux_read_description.
469 * linux-aarch64-low.c (aarch64_linux_read_description):
470 Merge with aarch64_arch_setup.
471 (aarch64_arch_setup): Call aarch64_linux_read_description.
472 * linux-aarch64-tdesc.c: New file.
473 * linux-aarch64-tdesc.h: New file.
474
475 2017-11-24 Yao Qi <yao.qi@linaro.org>
476
477 * configure.srv: Set $srv_regobj for tic6x-linux.
478 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
479 (tic6x_read_description): Move some code to tic6x_arch_setup.
480 (tic6x_tdesc_test): New function.
481 (initialize_low_arch): Call selftests::register_test.
482
483 2017-11-22 Yao Qi <yao.qi@linaro.org>
484
485 * remote-utils.c (prepare_resume_reply): Use memcpy.
486
487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
488
489 * linux-low.c (kill_one_lwp_callback): Return void, take
490 argument directly, don't filter on pid.
491 (linux_kill): Use for_each_thread.
492
493 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
494
495 * linux-low.c (need_step_over_p): Return bool, remove dummy
496 argument.
497 (linux_resume, proceed_all_lwps): Use find_thread.
498
499 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
500
501 * linux-low.c (resume_status_pending_p): Return bool, remove
502 flag_p argument.
503 (linux_resume): Use find_thread.
504
505 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
506
507 * linux-low.c (struct thread_resume_array): Remove.
508 (linux_set_resume_request): Return void, take arguments
509 directly.
510 (linux_resume): Use for_each_thread.
511
512 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
513
514 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
515 return bool, remove data argument.
516 (linux_stabilize_threads): Use find_thread.
517
518 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
519
520 * linux-low.c (unsuspend_one_lwp): Remove.
521 (unsuspend_all_lwps): Use for_each_thread, inline code from
522 unsuspend_one_lwp.
523
524 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
525
526 * gdbthread.h (find_thread): Add overload with ptid_t filter.
527 * linux-low.c (struct iterate_over_lwps_args): Remove.
528 (iterate_over_lwps_filter): Remove.
529 (iterate_over_lwps): Use find_thread.
530
531 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
532
533 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
534 (linux_handle_new_gdb_connection): Use for_each_thread, inline
535 code from reset_lwp_ptrace_options_callback.
536
537 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
538
539 * linux-arm-low.c (struct update_registers_data): Remove.
540 (update_registers_callback): Return void, take arguments
541 directly, don't check thread's pid.
542 (arm_insert_point, arm_remove_point): Use for_each_thread.
543
544 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
545
546 * win32-low.c (continue_one_thread): Return void, take argument
547 directly.
548 (child_continue): Use for_each_thread.
549
550 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
551
552 * win32-i386-low.c (update_debug_registers_callback): Rename
553 to ...
554 (update_debug_registers): ... this, return void, remove pid_p arg.
555 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
556
557 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
558
559 * inferiors.h (struct process_info): Add constructor, initialize
560 fields..
561 <syscalls_to_catch>: Change type to std::vector<int>.
562 * inferiors.c (add_process): Allocate process_info with new.
563 (remove_process): Free process_info with delete.
564 * linux-low.c (handle_extended_wait): Adjust.
565 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
566 * server.c (handle_general_set): Adjust.
567
568 2017-11-16 Pedro Alves <palves@redhat.com>
569
570 * remote-utils.c (remote_close): Block SIGIO signals instead of
571 uninstalling the SIGIO handler.
572
573 2017-11-16 Alan Hayward <alan.hayward@arm.com>
574
575 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
576
577 2017-11-16 Yao Qi <yao.qi@linaro.org>
578
579 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
580 (tic6x_store_gregset): Likewise.
581 (tic6x_usrregs_info): Move it up.
582
583 2017-11-15 Alan Hayward <alan.hayward@arm.com>
584
585 * Makefile.in: Update arch rules.
586 * configure.srv: Explicitly mark arch/ files.
587
588 2017-11-13 Andreas Schwab <schwab@suse.de>
589
590 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
591 function.
592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
593
594 2017-11-06 Pedro Alves <palves@redhat.com>
595
596 * config.in, configure: Regenerate.
597
598 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
599
600 * target.c (struct thread_search): Remove.
601 (thread_search_callback): Remove.
602 (prepare_to_access_memory): Use for_each_thread instead of
603 find_inferior. Inline code from thread_search_callback.
604
605 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
606
607 * server.c (struct visit_actioned_threads_data): Remove.
608 (visit_actioned_threads): Change prototype to take arguments
609 directly.
610 (resume): Use find_thread instead of find_inferior.
611
612 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
613
614 * server.c (queue_stop_reply_callback): Change prototype, return
615 void.
616 (find_status_pending_thread_callback): Remove.
617 (handle_status): Replace find_inferior with find_thread and
618 for_each_thread.
619
620 2017-10-25 Alan Hayward <alan.hayward@arm.com>
621
622 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
623 with REGNO.
624 (aarch64_store_gregset): Likewise.
625 (aarch64_fill_fpregset): Likewise.
626 (aarch64_store_fpregset): Likewise.
627
628 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
629
630 * gdbthread.h (find_thread, for_each_thread): New functions.
631 * inferiors.c (thread_of_pid): Remove.
632 (find_any_thread_of_pid): Use find_thread.
633 * linux-low.c (num_lwps): Use for_each_thread.
634
635 2017-10-17 Yao Qi <yao.qi@linaro.org>
636
637 * Makefile.in: Remove one rule.
638 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
639
640 2017-10-17 Yao Qi <yao.qi@linaro.org>
641
642 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
643 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
644
645 2017-10-17 Yao Qi <yao.qi@linaro.org>
646
647 * configure.srv: Rename arm.o with arch/arm.o.
648
649 2017-10-17 Yao Qi <yao.qi@linaro.org>
650
651 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
652 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
653 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
654 (arch-i386.o, arch-amd64.o): Remove rules.
655 (arch/%.o): New rule.
656 Update POSTCOMPILE and COMPILE.pre.
657 * configure.ac: Invoke AC_CONFIG_COMMANDS.
658 * configure: Re-generated.
659 * configure.srv: Replace arch-i386.o with arch/i386.o.
660 Replace arch-amd64.o with arch/amd64.o.
661
662 2017-10-16 Yao Qi <yao.qi@linaro.org>
663
664 * configure: Regenerated.
665
666 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
667
668 * inferiors.h: (struct inferior_list): Remove.
669 (struct inferior_list_entry); Remove.
670 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
671 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
672 get_first_inferior): Remove.
673 (for_each_inferior, for_each_inferior_with_data, find_inferior,
674 find_inferior_id, find_inferior_in_random): Change signature.
675 * inferiors.c (all_threads): Change type to
676 std::list<thread_info *>.
677 (get_thread): Remove macro.
678 (find_inferior, find_inferior_id): Change signature, implement
679 using find_thread.
680 (find_inferior_in_random): Change signature, implement using
681 find_thread_in_random.
682 (for_each_inferior, for_each_inferior_with_data): Change
683 signature, implement using for_each_thread.
684 (add_inferior_to_list, remove_inferior): Remove.
685 (add_thread, get_first_thread, thread_of_pid,
686 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
687 (get_first_inferior, one_inferior_p, clear_inferior_list):
688 Remove.
689 (clear_inferiors, get_thread_process): Update.
690 * gdbthread.h: Include <list>.
691 (struct thread_info) <entry>: Remove field.
692 <id>: New field.
693 (all_threads): Change type to std::list<thread_info *>.
694 (get_first_inferior): Add doc.
695 (find_thread, for_each_thread, find_thread_in_random): New
696 functions.
697 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
698 * linux-arm-low.c (update_registers_callback): Update.
699 * linux-low.c (second_thread_of_pid_p): Update.
700 (kill_one_lwp_callback, linux_detach_lwp_callback,
701 delete_lwp_callback, status_pending_p_callback, same_lwp,
702 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
703 iterate_over_lwps, not_stopped_callback,
704 resume_stopped_resumed_lwps, count_events_callback,
705 select_singlestep_lwp_callback, select_event_lwp_callback,
706 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
707 suspend_and_send_sigstop_callback, wait_for_sigstop,
708 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
709 lwp_running, linux_set_resume_request, resume_status_pending_p,
710 need_step_over_p, start_step_over, linux_resume_one_thread,
711 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
712 reset_lwp_ptrace_options_callback): Update.
713 * linux-mips-low.c (update_watch_registers_callback): Update.
714 * regcache.c (regcache_invalidate_one, regcache_invalidate):
715 Update.
716 (free_register_cache_thread_one): Remove.
717 (regcache_release): Update.
718 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
719 handle_qxfer_threads_worker): Update.
720 (handle_query): Update, use list iterator.
721 (visit_actioned_threads, handle_pending_status,
722 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
723 clear_pending_status_callback, set_pending_status_callback,
724 find_status_pending_thread_callback, handle_status,
725 process_serial_event): Update.
726 * target.c (thread_search_callback): Update.
727 * thread-db.c (thread_db_get_tls_address): Update.
728 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
729 Update.
730 * win32-i386-low.c (update_debug_registers_callback): Update.
731 * win32-low.c (delete_thread_info, child_delete_thread,
732 continue_one_thread, suspend_one_thread,
733 get_child_debug_event): Adjust.
734
735 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
736
737 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
738 * inferiors.h: Include <list>.
739 (struct process_info) <entry>: Remove field.
740 <pid>: New field.
741 (pid_of): Change macro to function.
742 (ptid_of, lwpid_of): Remove macro.
743 (all_processes): Change type to std::list<process_info *>.
744 (ALL_PROCESSES): Remove macro.
745 (for_each_process, find_process): New function.
746 * inferiors.c (all_processes): Change type to
747 std::list<process_info *>.
748 (find_thread_process): Adjust.
749 (add_process): Likewise.
750 (remove_process): Likewise.
751 (find_process_pid): Likewise.
752 (get_first_process): Likewise.
753 (started_inferior_callback): Remove.
754 (have_started_inferiors_p): Adjust.
755 (attached_inferior_callback): Remove.
756 (have_attached_inferiors_p): Adjust.
757 * linux-low.c (check_zombie_leaders): Likewise.
758 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
759 (x86_linux_update_xmltarget): Adjust.
760 * server.c (handle_query): Likewise.
761 (gdb_reattached_process): Remove.
762 (handle_status): Adjust.
763 (kill_inferior_callback): Likewise.
764 (detach_or_kill_inferior): Remove.
765 (print_started_pid): Likewise.
766 (print_attached_pid): Likewise.
767 (detach_or_kill_for_exit): Update.
768 (process_serial_event): Likewise.
769 * linux-arm-low.c (arm_new_fork): Likewise.
770
771 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
772
773 * dll.h: Include <list>.
774 (struct dll_info): Add constructor.
775 <entry>: Remove field.
776 (all_dlls): Change type to std::list<dll_info>.
777 * dll.c: Include <algorithm>.
778 (get_dll): Remove macro.
779 (all_dlls): Change type to std::list<dll_info *>.
780 (free_one_dll): Remove.
781 (match_dll): Likewise.
782 (loaded_dll): Adjust.
783 (unloaded_dll): Adjust to all_dlls type change, use
784 std::find_if. Inline code from match_dll.
785 (clear_dlls): Adjust to all_dlls type change.
786 * server.c (emit_dll_description): Remove.
787 (handle_qxfer_libraries): Adjust to all_dlls type change,
788 integrate emit_dll_description's functionality.
789
790 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
791
792 * linux-low.h (struct linux_target_ops) <delete_process>: New
793 field.
794 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
795 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
796 (struct linux_target_ops): Add delete_process callback.
797 * linux-arm-low.c (arm_delete_process): New.
798 (struct linux_target_ops): Add delete_process callback.
799 * linux-bfin-low.c (struct linux_target_ops): Likewise.
800 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
801 * linux-m32r-low.c (struct linux_target_ops): Likewise.
802 * linux-mips-low.c (mips_linux_delete_process): New.
803 (struct linux_target_ops): Add delete_process callback.
804 * linux-ppc-low.c (struct linux_target_ops): Likewise.
805 * linux-s390-low.c (struct linux_target_ops): Likewise.
806 * linux-sh-low.c (struct linux_target_ops): Likewise.
807 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
808 * linux-tile-low.c (struct linux_target_ops): Likewise.
809 * linux-x86-low.c (x86_linux_delete_process): New.
810 (struct linux_target_ops): Add delete_process callback.
811 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
812
813 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
814
815 * linux-aarch64-low.c (the_low_target): Add thread delete
816 callback.
817 * linux-arm-low.c (arm_delete_thread): New function.
818 (the_low_target): Add thread delete callback.
819 * linux-bfin-low.c (the_low_target): Likewise.
820 * linux-crisv32-low.c (the_low_target): Likewise.
821 * linux-low.c (delete_lwp): Invoke delete_thread callback if
822 set.
823 * linux-low.h (struct linux_target_ops) <delete_thread>: New
824 field.
825 * linux-m32r-low.c (the_low_target): Add thread delete callback.
826 * linux-mips-low.c (mips_linux_delete_thread): New function.
827 (the_low_target): Add thread delete callback.
828 * linux-ppc-low.c (the_low_target): Likewise.
829 * linux-s390-low.c (the_low_target): Likewise.
830 * linux-sh-low.c (the_low_target): Likewise.
831 * linux-tic6x-low.c (the_low_target): Likewise.
832 * linux-tile-low.c (the_low_target): Likewise.
833 * linux-x86-low.c (the_low_target): Likewise.
834 * linux-xtensa-low.c (the_low_target): Likewise.
835
836 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
837
838 * win32-low.c: Include "common-inferior.h".
839
840 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
841
842 * inferiors.c (set_inferior_cwd): New function.
843 * server.c (handle_general_set): Handle QSetWorkingDir packet.
844 (handle_query): Inform that QSetWorkingDir is supported.
845 * win32-low.c (create_process): Pass the inferior's cwd to
846 CreateProcess.
847
848 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
849
850 * inferiors.c (current_inferior_cwd): New global variable.
851 (get_inferior_cwd): New function.
852 * inferiors.h (struct process_info) <cwd>: New field.
853
854 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
855
856 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
857 (OBS): Add gdb_tilde_expand.o.
858
859 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
860
861 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
862 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
863
864 2017-09-29 Pedro Alves <palves@redhat.com>
865
866 * ax.c (gdb_parse_agent_expr): Constify.
867 * ax.h (gdb_parse_agent_expr): Constify.
868 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
869 Constify.
870 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
871 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
872 * remote-utils.h (read_ptid): Constify.
873 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
874 (process_point_options, process_serial_event): Constify.
875 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
876 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
877 (cmd_qtbuffer): Constify.
878
879 2017-09-29 Pedro Alves <palves@redhat.com>
880
881 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
882 fails.
883
884 2017-09-29 Pedro Alves <palves@redhat.com>
885
886 * linux-low.c (handle_extended_wait): Pass parent thread instead
887 of process to thread_db_notice_clone.
888 * linux-low.h (thread_db_notice_clone): Replace parent process
889 parameter with parent thread parameter.
890 * thread-db.c (find_one_thread): Add comment.
891 (thread_db_notice_clone): Replace parent process parameter with
892 parent thread parameter. Temporarily switch to the parent thread.
893
894 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
895
896 * gdbthread.h: Include "common-gdbthread.h".
897 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
898 "if" when validating the ptid.
899 * remote-utils.c: Include "gdbthread.h".
900 (prepare_resume_reply): Use "switch_to_thread".
901 * target.c (done_accessing_memory): Likewise.
902
903 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
904
905 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
906 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
907 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
908 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
909 s390x-gs-linux64-ipa.o to ipa_obj.
910 * linux-s390-low.c (HWCAP_S390_GS): New define.
911 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
912 New functions.
913 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
914 (s390_arch_setup): Check for guarded-storage support and choose
915 appropriate tdesc.
916 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
917 init_registers_s390x_gs_linux64.
918 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
919 enum value.
920 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
921 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
922
923 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
924
925 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
926
927 2017-09-21 Kevin Buettner <kevinb@redhat.com>
928
929 * linux-low.h (struct lwp_info): Add new field, thread_handle.
930 (thread_db_thread_handle): Declare.
931 * linux-low.c (linux_target_ops): Initialize thread_handle.
932 * server.c (handle_qxfer_threads_worker): Add support for
933 "handle" attribute.
934 * target.h (struct target_ops): Add new function pointer,
935 thread_handle.
936 (target_thread_handle): Define.
937 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
938 field in lwp.
939 (thread_db_thread_handle): New function.
940
941 2017-09-21 Kevin Buettner <kevinb@redhat.com>
942
943 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
944 * linux-low.h (thread_db_notice_clone): Declare.
945 * thread-db.c (thread_db_notice_clone): New function.
946
947 2017-09-21 Pedro Alves <palves@redhat.com>
948
949 * server.c (gdb_read_memory, handle_status, process_serial_event)
950 (handle_serial_event, handle_target_event): Adjust to
951 set_desired_thread prototype change.
952 * target.c (set_desired_thread): Remove 'use_general' parameter
953 and adjust.
954 * target.h (set_desired_thread): Remove 'use_general' parameter.
955
956 2017-09-20 Tom Tromey <tom@tromey.com>
957
958 * target.c (target_terminal::terminal_state): Define.
959 (target_terminal::init): Rename from target_terminal_init.
960 (target_terminal::inferior): Rename from
961 target_terminal_inferior.
962 (target_terminal::ours): Rename from target_terminal_ours.
963 (target_terminal::ours_for_output, target_terminal::info): New.
964
965 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
966
967 * server.c (accumulate_file_name_length): Remove.
968 (emit_dll_description): Adjust to std::string change.
969 (handle_qxfer_libraries): Use std::string to hold document.
970
971 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
972
973 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
974 return type of xml_escape_text.
975 * server.c (emit_dll_description): Likewise.
976
977 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
978
979 * server.c (captured_main): Accept argument for --selftest.
980 Update run_tests call.
981 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
982 when registering selftests.
983
984 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
985
986 * regcache.c (get_thread_regcache): Update code to use "std::vector"
987 instead of "VEC" for "target_desc.reg_defs".
988 (regcache_cpy): Likewise.
989 (registers_to_string): Likewise.
990 (registers_from_string): Likewise.
991 (find_regno): Likewise.
992 (supply_regblock): Likewise.
993 (regcache_raw_read_unsigned): Likewise.
994 * tdesc.c (init_target_desc): Likewise.
995 (tdesc_create_reg): Likewise.
996 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
997 (struct target_desc) <reg_defs>: Convert to "std::vector".
998 (target_desc): Do not initialize "reg_defs".
999 (~target_desc): Update code to use "std::vector" instead of "VEC"
1000 for "target_desc.reg_defs".
1001 (operator==): Likewise.
1002
1003 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1004
1005 * inferiors.h (thread_to_gdb_id): Remove.
1006 * inferiors.c (thread_to_gdb_id): Remove.
1007 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1008 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1009 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1010 Likewise.
1011 * nto-low.c (nto_fetch_registers, nto_store_registers,
1012 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1013
1014 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1015
1016 * inferiors.h (gdb_id_to_thread_id): Remove.
1017 * inferiors.c (gdb_id_to_thread_id): Remove.
1018 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1019 removal. Move pid declaration closer to where it's used.
1020
1021 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1022
1023 * server.c (handle_detach): New function.
1024 (process_serial_event): Move code out, call handle_detach.
1025
1026 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1027
1028 * server.c (require_running): Rename to ...
1029 (require_running_or_return): ... this ...
1030 (require_running_or_break): ... and this.
1031 (handle_query, process_serial_event): Adjust.
1032
1033 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1034
1035 * linux-low.c (linux_set_resume_request): Remove unused
1036 variables.
1037
1038 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1039
1040 * server.c (first_thread_of): Remove.
1041 (process_serial_event): Replace usage of first_thread_of with
1042 find_any_thread_of_pid.
1043 * tracepoint.c (same_process_p): Remove.
1044 (gdb_agent_about_to_close): Replace usage of same_process_p with
1045 find_any_thread_of_pid.
1046 * linux-x86-low.c (same_process_callback): Remove.
1047 (x86_arch_setup_process_callback): Replace usage of
1048 same_process_callback with find_any_thread_of_pid.
1049 * thread-db.c (any_thread_of): Remove.
1050 (switch_to_process): Replace usage of any_thread_of with
1051 find_any_thread_of_pid.
1052 * inferiors.c (thread_pid_matches_callback): Remove.
1053 (find_thread_process): Adjust to use find_any_thread_of_pid.
1054
1055 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1056
1057 * regcache.c (get_thread_regcache): Guard calls to "memset"
1058 with "!VEC_empty".
1059
1060 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1061
1062 * linux-low.c (handle_extended_wait): Use
1063 "allocate_target_description" instead of "XNEW".
1064 * linux-x86-low.c (initialize_low_arch): Likewise.
1065
1066 2017-09-05 Yao Qi <yao.qi@linaro.org>
1067
1068 * configure.srv (srv_i386_regobj): Remove.
1069 (srv_amd64_regobj): Remove.
1070 (srv_regobj): Set it to "" for x86 non-linux targets.
1071 * linux-x86-tdesc.c (i386_linux_read_description):
1072 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1073 (init_registers_i386): Remove the declaration.
1074 (tdesc_i386): Remove the declaration.
1075 (lynx_i386_arch_setup): Call i386_create_target_description.
1076 * nto-x86-low.c: Likewise.
1077 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1078 [!__x86_64__]: include arch/i386.h.
1079 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1080
1081 2017-09-05 Yao Qi <yao.qi@linaro.org>
1082
1083 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1084 i386/amd64-XXX-linux from it.
1085
1086 2017-09-05 Yao Qi <yao.qi@linaro.org>
1087
1088 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1089 false.
1090 (ipa_amd64_linux_regobj): Remove.
1091 (ipa_x32_linux_regobj): Remove.
1092
1093 2017-09-05 Yao Qi <yao.qi@linaro.org>
1094
1095 * Makefile.in (arch-amd64.o): New rule.
1096 * configure.srv: Append arch-amd64.o.
1097 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1098 (get_ipa_tdesc): Call amd64_linux_read_description.
1099 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1100 and init_registers_amd64_XXX.
1101 * linux-x86-low.c (x86_linux_read_description): Call
1102 amd64_linux_read_description.
1103 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1104 (initialize_low_arch): Don't call init_registers_x32_XXX and
1105 init_registers_amd64_XXX.
1106 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1107 and tdesc_amd64_XXX.
1108 [__x86_64__] (amd64_tdesc_test): New function.
1109 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1110 and init_registers_amd64_XXX.
1111 * linux-x86-tdesc.c: Include arch/amd64.h.
1112 (xcr0_to_tdesc_idx): New function.
1113 (i386_linux_read_description): New function.
1114 (amd64_get_ipa_tdesc_idx): New function.
1115 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1116 (amd64_get_ipa_tdesc): Declare.
1117
1118 2017-09-05 Yao Qi <yao.qi@linaro.org>
1119
1120 * configure.srv (srv_i386_linux_xmlfiles): Remove
1121 i386/i386-XXX-linux.xml from it.
1122
1123 2017-09-05 Yao Qi <yao.qi@linaro.org>
1124
1125 * configure.srv: Set srv_i386_linux_regobj empty if $development
1126 is false.
1127 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1128 initialize_low_tdesc.
1129 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1130 with #if initialize_low_tdesc.
1131 * linux-x86-tdesc-selftest.c: New file.
1132 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1133
1134 2017-09-05 Yao Qi <yao.qi@linaro.org>
1135
1136 * Makefile.in (arch-i386.o): New rule.
1137 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1138 (x86_64-*-linux*): Likewise.
1139 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1140 include arch/i386.h.
1141 (i386_linux_read_description): Remove code and call
1142 i386_create_target_description.
1143 * tdesc.c (allocate_target_description): New function.
1144 * tdesc.h (set_tdesc_architecture): Remove declaration.
1145 (set_tdesc_osabi): Likewise.
1146
1147 2017-09-05 Yao Qi <yao.qi@linaro.org>
1148
1149 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1150 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1151 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1152 .xmltarget.
1153 * server.c (get_features_xml): Call tdesc_get_features_xml.
1154 * tdesc.c (set_tdesc_architecture): New function.
1155 (set_tdesc_osabi): New function.
1156 (tdesc_get_features_xml): New function.
1157 (tdesc_create_feature): Add an argument.
1158 * tdesc.h (struct target_desc) <features>: New field.
1159 <arch, osabi>: New field.
1160 (~target_desc): xfree features, arch, and osabi.
1161 (target_desc::oerator==): Don't compare .xmltarget.
1162 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1163 (set_tdesc_osabi): Likewise.
1164 (tdesc_get_features_xml): Likewise.
1165
1166 2017-09-05 Yao Qi <yao.qi@linaro.org>
1167
1168 * linux-x86-tdesc.c: Include selftest.h.
1169 (i386_tdesc_test): New function.
1170 (initialize_low_tdesc): Call selftests::register_test.
1171 * tdesc.h: Include regdef.h.
1172 (target_desc): Override operator == and !=.
1173
1174 2017-09-05 Yao Qi <yao.qi@linaro.org>
1175
1176 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1177 (ipa_obj): Likewise.
1178 * linux-i386-ipa.c: Include common/x86-xstate.h
1179 (get_ipa_tdesc): Call i386_linux_read_description.
1180 (initialize_low_tracepoint): Don't call init_registers_XXX
1181 functions, call initialize_low_tdesc instead.
1182 * linux-x86-low.c (x86_linux_read_description): Call
1183 i386_linux_read_description.
1184 (initialize_low_arch): Don't call init_registers_i386_XXX
1185 functions, call initialize_low_tdesc.
1186 * linux-x86-tdesc.c: New file.
1187 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1188 (i386_get_ipa_tdesc_idx): Declare.
1189 (i386_get_ipa_tdesc): Declare.
1190 (initialize_low_tdesc): Declare.
1191
1192 2017-09-05 Yao Qi <yao.qi@linaro.org>
1193
1194 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1195 instead of 0.
1196
1197 2017-09-05 Yao Qi <yao.qi@linaro.org>
1198
1199 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1200 * regcache.c (get_thread_regcache): Use VEC_length.
1201 (init_register_cache): Likewise.
1202 (regcache_cpy): Likewise.
1203 (registers_to_string): Iterate reg_defs via VEC_iterate.
1204 (find_regno): Likewise.
1205 (find_register_by_number): Use VEC_index.
1206 (register_size): Call find_register_by_number.
1207 (register_data): Call find_register_by_number.
1208 (supply_regblock): Use VEC_length.
1209 (regcache_raw_read_unsigned): Likewise.
1210 * tdesc.c (init_target_desc): Iterate reg_defs via
1211 VEC_iterate.
1212 (default_description): Update initializer.
1213 (copy_target_description): Don't update field num_registers.
1214 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1215 <num_registers>: Remove.
1216
1217 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1218
1219 * Makefile.in (.SECONDARY): Define target.
1220
1221 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * linux-low.c (linux_wait_1): Adjust.
1224 * server.c (queue_stop_reply_callback): Adjust.
1225
1226 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1227
1228 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1229 QEnvironmentUnset and QEnvironmentReset packets.
1230 (handle_query): Inform remote that QEnvironmentHexEncoded,
1231 QEnvironmentUnset and QEnvironmentReset are supported.
1232
1233 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1234
1235 * inferiors.h (inferior_target_data): Rename to ...
1236 (thread_target_data): ... this.
1237 (inferior_regcache_data): Rename to ...
1238 (thread_regcache_data): ... this.
1239 (set_inferior_regcache_data): Rename to ...
1240 (set_thread_regcache_data): ... this.
1241 * inferiors.c (inferior_target_data): Rename to ...
1242 (thread_target_data): ... this.
1243 (inferior_regcache_data): Rename to ...
1244 (thread_regcache_data): ... this.
1245 (set_inferior_regcache_data): Rename to ...
1246 (set_thread_regcache_data): ... this.
1247 (free_one_thread): Update.
1248 * linux-low.h (get_thread_lwp): Update.
1249 * regcache.c (get_thread_regcache): Update.
1250 (regcache_invalidate_thread): Update.
1251 (free_register_cache_thread): Update.
1252 * win32-i386-low.c (update_debug_registers_callback): Update.
1253 (win32_get_current_dr): Update.
1254 * win32-low.c (thread_rec): Update.
1255 (delete_thread_info): Update.
1256 (continue_one_thread): Update.
1257 (suspend_one_thread): Update.
1258
1259 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1260
1261 * inferiors.c (set_inferior_target_data): Remove.
1262 * inferiors.h (set_inferior_target_data): Remove.
1263
1264 2017-08-18 Yao Qi <yao.qi@linaro.org>
1265
1266 * Makefile.in (OBS): Add selftest.o.
1267 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1268 * configure, config.in: Re-generated.
1269 * server.c: Include common/sefltest.h.
1270 (captured_main): Handle option --selftest.
1271
1272 2017-08-09 Yao Qi <yao.qi@linaro.org>
1273
1274 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1275 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1276 i386-avx-mpx.o and i386-mmx.o.
1277 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1278 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1279 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1280 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1281 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1282 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1283 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1284 i386/amd64-avx-mpx.xml.
1285
1286 2017-08-09 Yao Qi <yao.qi@linaro.org>
1287
1288 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1289 and x32-avx-avx512.o.
1290 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1291 i386/x32-avx-avx512.xml.
1292
1293 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1294
1295 * tracepoint.h (enum class fast_tpoint_collect_result): New
1296 enumeration.
1297 (fast_tracepoint_collecting): Change return type to
1298 fast_tpoint_collect_result.
1299 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1300 * linux-low.h: Include tracepoint.h.
1301 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1302 fast_tpoint_collect_result.
1303 * linux-low.c (handle_tracepoints): Adjust.
1304 (linux_fast_tracepoint_collecting): Change return type to
1305 fast_tpoint_collect_result.
1306 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1307 linux_wait_1, stuck_in_jump_pad_callback,
1308 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1309 proceed_one_lwp): Adjust to type change.
1310
1311 2017-07-10 Yao Qi <yao.qi@linaro.org>
1312
1313 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1314
1315 2017-06-29 Yao Qi <yao.qi@linaro.org>
1316
1317 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1318 Remove.
1319 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1320
1321 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1324
1325 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1326
1327 * linux-low.c (linux_create_inferior): Adjust code to access the
1328 environment information via 'gdb_environ' class.
1329 * lynx-low.c (lynx_create_inferior): Likewise.
1330 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1331 (get_environ): Return a pointer to 'our_environ'.
1332 (captured_main): Initialize 'our_environ'.
1333 * server.h (get_environ): Adjust prototype.
1334 * spu-low.c (spu_create_inferior): Adjust code to access the
1335 environment information via 'gdb_environ' class.
1336
1337 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1338
1339 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1340 usage of "register" keyword.
1341
1342 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1343
1344 * configure: Re-generate.
1345
1346 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1347
1348 * configure: Re-generate.
1349
1350 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1351
1352 * Makefile.in (COMPILE.pre): Add "-x c++".
1353
1354 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1355
1356 * fork-child.c: Conditionally include <signal.h>.
1357
1358 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1359
1360 * server.c (handle_general_set): Handle new packet
1361 "QStartupWithShell".
1362 (handle_query): Add "QStartupWithShell" to the list of supported
1363 packets.
1364 (gdbserver_usage): Add help text explaining the
1365 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1366 options.
1367 (captured_main): Recognize and act upon the presence of the new
1368 CLI options.
1369
1370 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1371 Pedro Alves <palves@redhat.com>
1372
1373 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1374 * configure: Regenerate.
1375 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1376 "fork-inferior.o".
1377 (i[34567]86-*-lynxos*): Likewise.
1378 (spu*-*-*): Likewise.
1379 * fork-child.c: New file.
1380 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1381 and "environ.h".
1382 (linux_ptrace_fun): New function.
1383 (linux_create_inferior): Adjust function prototype to reflect
1384 change on "target.h". Adjust function code to use
1385 "fork_inferior".
1386 (linux_request_interrupt): Delete "signal_pid".
1387 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1388 (lynx_ptrace_fun): New function.
1389 (lynx_create_inferior): Adjust function prototype to reflect
1390 change on "target.h". Adjust function code to use
1391 "fork_inferior".
1392 * nto-low.c (nto_create_inferior): Adjust function prototype and
1393 code to reflect change on "target.h". Update comments.
1394 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1395 "common-terminal.h" and "environ.h".
1396 (terminal_fd): Moved to fork-child.c.
1397 (old_foreground_pgrp): Likewise.
1398 (restore_old_foreground_pgrp): Likewise.
1399 (last_status): Make it global.
1400 (last_ptid): Likewise.
1401 (our_environ): New variable.
1402 (startup_with_shell): Likewise.
1403 (program_name): Likewise.
1404 (program_argv): Rename to...
1405 (program_args): ...this.
1406 (wrapper_argv): New variable.
1407 (start_inferior): Delete function.
1408 (get_exec_wrapper): New function.
1409 (get_exec_file): Likewise.
1410 (get_environ): Likewise.
1411 (prefork_hook): Likewise.
1412 (post_fork_inferior): Likewise.
1413 (postfork_hook): Likewise.
1414 (postfork_child_hook): Likewise.
1415 (handle_v_run): Update code to deal with arguments coming from the
1416 remote host. Update calls from "start_inferior" to
1417 "create_inferior".
1418 (captured_main): Likewise. Initialize environment variable. Call
1419 "have_job_control".
1420 * server.h (post_fork_inferior): New prototype.
1421 (get_environ): Likewise.
1422 (last_status): Declare.
1423 (last_ptid): Likewise.
1424 (signal_pid): Likewise.
1425 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1426 (spu_ptrace_fun): New function.
1427 (spu_create_inferior): Adjust function prototype to reflect change
1428 on "target.h". Adjust function code to use "fork_inferior".
1429 * target.c (target_terminal_init): New function.
1430 (target_terminal_inferior): Likewise.
1431 (target_terminal_ours): Likewise.
1432 * target.h: Include <vector>.
1433 (struct target_ops) <create_inferior>: Update prototype.
1434 (create_inferior): Update macro.
1435 * utils.c (gdb_flush_out_err): New function.
1436 * win32-low.c (win32_create_inferior): Adjust function prototype
1437 and code to reflect change on "target.h".
1438
1439 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1440
1441 * inferiors.c (switch_to_thread): New function.
1442
1443 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1444
1445 * Makefile.in (SFILE): Add "common/job-control.c".
1446 (OBS): Add "job-control.o".
1447
1448 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1449
1450 * Makefile: Remove "@host_makefile_frag@".
1451
1452 2017-05-05 Pedro Alves <palves@redhat.com>
1453
1454 * configure: Regenerate.
1455
1456 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1457
1458 * configure: Regenerate.
1459
1460 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1461
1462 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1463 software_single_step change of return type to
1464 std::vector<CORE_ADDR>.
1465 * linux-low.c (install_software_single_step_breakpoints):
1466 Likewise.
1467 * linux-low.h (install_software_single_step_breakpoints):
1468 Likewise.
1469
1470 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1471
1472 * remote-utils.c: Include "gdb_termios.h" instead of
1473 "terminal.h".
1474 * terminal.h: Delete file.
1475
1476 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1477
1478 * server.c: Include <vector>.
1479 <program_argv, wrapper_argv>: Convert to std::vector.
1480 (start_inferior): Rewrite function to use C++.
1481 (handle_v_run): Likewise. Update code that calculates the argv
1482 based on the vRun packet; use C++.
1483 (captured_main): Likewise.
1484
1485 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1486
1487 * server.c (handle_v_cont): Initialize thread_resume::thread
1488 with null_ptid.
1489
1490 2017-04-05 Pedro Alves <palves@redhat.com>
1491
1492 * configure: Regenerate.
1493
1494 2017-04-05 Pedro Alves <palves@redhat.com>
1495
1496 * gdbreplay.c (sync_error): Constify.
1497 * linux-x86-low.c (push_opcode): Constify.
1498
1499 2017-04-05 Pedro Alves <palves@redhat.com>
1500
1501 * win32-low.c (get_child_debug_event)
1502 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1503 Report TARGET_WAITKIND_SPURIOUS instead.
1504
1505 2017-04-05 Pedro Alves <palves@redhat.com>
1506
1507 * remote-utils.c (remote_prepare, remote_open): Constify.
1508 * remote-utils.h (remote_prepare, remote_open): Constify.
1509 * server.c (captured_main): Constify 'port' handling.
1510
1511 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * Makefile.in (clean): Clear .deps.
1514
1515 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1516
1517 * .gitignore: Remove generated files, replace with wildcard.
1518 * (clean): Replace removal of generated files with wildcard.
1519 (version.c): Replace with...
1520 (version-generated.c): ...this.
1521 (xml-builtin.c): Replace with...
1522 (xml-builtin-generated.c): ...this.
1523 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1524 (%.c: *regformats*): Replace with...
1525 (%-generated.c: *regformats*): ...this.
1526
1527 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1528
1529 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1530 (xtensa_fill_gregset): Call collect_register_by_name for
1531 threadptr register.
1532 (xtensa_store_gregset): Call supply_register_by_name for
1533 threadptr register.
1534
1535 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1536
1537 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1538 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1539 (xtensa_store_gregset): Call supply_register for all registers in
1540 a0_regnum..a0_regnum + C0_NREGS range.
1541
1542 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1543
1544 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1545 (ax-ipa.o: ax.c): Remove.
1546 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1547 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1548 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1549 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1550 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1551
1552 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1553
1554 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1555 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1556 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1557 (errors-ipa.o: ../common/errors.c): Remove.
1558 (format-ipa.o: ../common/format.c): Remove.
1559 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1560
1561 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1562
1563 * Makefile.in (%-ipa.o: %.c): New rule.
1564 (tracepoint-ipa.o: tracepoint.c): Remove.
1565 (utils-ipa.o: utils.c): Remove.
1566 (remote-utils-ipa.o: remote-utils.c): Remove.
1567 (regcache-ipa.o: regcache.c): Remove.
1568 (i386-linux-ipa.o: i386-linux.c): Remove.
1569 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1570 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1571 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1572 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1573 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1574 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1575 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1576 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1577 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1578 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1579 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1580 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1581 (aarch64-ipa.o: aarch64.c): Remove.
1582 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1583 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1584 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1585 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1586 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1587 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1588 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1589 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1590 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1591 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1592 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1593 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1594 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1595 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1596 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1597 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1598 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1599 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1600 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1601 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1602 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1603 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1604 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1605 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1606 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1607 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1608 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1609 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1610 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1611 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1612 (tdesc-ipa.o: tdesc.c): Remove.
1613 (x32-linux-ipa.o: x32-linux.c): Remove.
1614 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1615 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1616
1617 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1618
1619 * Makefile.in (%.o: ../arch/%.c): New rule.
1620 (arm.o: ../arch/arm.c): Remove.
1621 (arm-linux.o: ../arch/arm-linux.c): Remove.
1622 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1623 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1624
1625 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1626
1627 * Makefile.in (%.o: ../nat/%.c): New rule.
1628 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1629 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1630 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1631 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1632 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1633 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1634 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1635 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1636 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1637 (linux-personality.o: ../nat/linux-personality.c): Remove.
1638 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1639 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1640 (x86-linux.o: ../nat/x86-linux.c): Remove.
1641 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1642 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1643
1644 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1645
1646 * Makefile.in (%.o: ../common/%.c): New rule.
1647 (signals.o: ../common/signals.c): Remove.
1648 (print-utils.o: ../common/print-utils.c): Remove.
1649 (rsp-low.o: ../common/rsp-low.c): Remove.
1650 (common-utils.o: ../common/common-utils.c): Remove.
1651 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1652 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1653 (vec.o: ../common/vec.c): Remove.
1654 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1655 (xml-utils.o: ../common/xml-utils.c): Remove.
1656 (ptid.o: ../common/ptid.c): Remove.
1657 (buffer.o: ../common/buffer.c): Remove.
1658 (format.o: ../common/format.c): Remove.
1659 (filestuff.o: ../common/filestuff.c): Remove.
1660 (agent.o: ../common/agent.c): Remove.
1661 (errors.o: ../common/errors.c): Remove.
1662 (environ.o: ../common/environ.c): Remove.
1663 (common-debug.o: ../common/common-debug.c): Remove.
1664 (cleanups.o: ../common/cleanups.c): Remove.
1665 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1666 (fileio.o: ../common/fileio.c): Remove.
1667 (common-regcache.o: ../common/common-regcache.c): Remove.
1668 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1669 (new-op.o: ../common/new-op.c): Remove.
1670 (btrace-common.o: ../common/btrace-common.c): Remove.
1671
1672 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1673
1674 * Makefile.in (%.o: ../target/%.c): New rule.
1675 (waitstatus.o: ../target/waitstatus.c): Remove.
1676
1677 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1678
1679 * Makefile.in
1680 (%.c: ../regformats/%.dat,
1681 (%.c: ../regformats/arm/%.dat,
1682 (%.c: ../regformats/i386/%.dat,
1683 (%.c: ../regformats/rs6000/%.dat): New rules.
1684 (aarch64.c): Remove.
1685 (reg-arm.c): Remove.
1686 (arm-with-iwmmxt.c): Remove.
1687 (arm-with-vfpv2.c): Remove.
1688 (arm-with-vfpv3.c): Remove.
1689 (arm-with-neon.c): Remove.
1690 (reg-bfin.c): Remove.
1691 (reg-cris.c): Remove.
1692 (reg-crisv32.c): Remove.
1693 (i386.c): Remove.
1694 (i386-linux.c): Remove.
1695 (i386-avx.c): Remove.
1696 (i386-avx-linux.c): Remove.
1697 (i386-avx-avx512.c): Remove.
1698 (i386-avx-avx512-linux.c): Remove.
1699 (i386-mpx.c): Remove.
1700 (i386-mpx-linux.c): Remove.
1701 (i386-avx-mpx-avx512-pku.c): Remove.
1702 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1703 (i386-avx-mpx.c): Remove.
1704 (i386-avx-mpx-linux.c): Remove.
1705 (i386-mmx.c): Remove.
1706 (i386-mmx-linux.c): Remove.
1707 (reg-ia64.c): Remove.
1708 (reg-m32r.c): Remove.
1709 (reg-m68k.c): Remove.
1710 (reg-cf.c): Remove.
1711 (mips-linux.c): Remove.
1712 (mips-dsp-linux.c): Remove.
1713 (mips64-linux.c): Remove.
1714 (mips64-dsp-linux.c): Remove.
1715 (nios2-linux.c): Remove.
1716 (powerpc-32.c): Remove.
1717 (powerpc-32l.c): Remove.
1718 (powerpc-altivec32l.c): Remove.
1719 (powerpc-cell32l.c): Remove.
1720 (powerpc-vsx32l.c): Remove.
1721 (powerpc-isa205-32l.c): Remove.
1722 (powerpc-isa205-altivec32l.c): Remove.
1723 (powerpc-isa205-vsx32l.c): Remove.
1724 (powerpc-e500l.c): Remove.
1725 (powerpc-64l.c): Remove.
1726 (powerpc-altivec64l.c): Remove.
1727 (powerpc-cell64l.c): Remove.
1728 (powerpc-vsx64l.c): Remove.
1729 (powerpc-isa205-64l.c): Remove.
1730 (powerpc-isa205-altivec64l.c): Remove.
1731 (powerpc-isa205-vsx64l.c): Remove.
1732 (s390-linux32.c): Remove.
1733 (s390-linux32v1.c): Remove.
1734 (s390-linux32v2.c): Remove.
1735 (s390-linux64.c): Remove.
1736 (s390-linux64v1.c): Remove.
1737 (s390-linux64v2.c): Remove.
1738 (s390-te-linux64.c): Remove.
1739 (s390-vx-linux64.c): Remove.
1740 (s390-tevx-linux64.c): Remove.
1741 (s390x-linux64.c): Remove.
1742 (s390x-linux64v1.c): Remove.
1743 (s390x-linux64v2.c): Remove.
1744 (s390x-te-linux64.c): Remove.
1745 (s390x-vx-linux64.c): Remove.
1746 (s390x-tevx-linux64.c): Remove.
1747 (tic6x-c64xp-linux.c): Remove.
1748 (tic6x-c64x-linux.c): Remove.
1749 (tic6x-c62x-linux.c): Remove.
1750 (reg-sh.c): Remove.
1751 (reg-sparc64.c): Remove.
1752 (reg-spu.c): Remove.
1753 (amd64.c): Remove.
1754 (amd64-linux.c): Remove.
1755 (amd64-avx.c): Remove.
1756 (amd64-avx-linux.c): Remove.
1757 (amd64-avx-avx512.c): Remove.
1758 (amd64-avx-avx512-linux.c): Remove.
1759 (amd64-mpx.c): Remove.
1760 (amd64-mpx-linux.c): Remove.
1761 (amd64-avx-mpx-avx512-pku.c): Remove.
1762 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1763 (amd64-avx-mpx.c): Remove.
1764 (amd64-avx-mpx-linux.c): Remove.
1765 (x32.c): Remove.
1766 (x32-linux.c): Remove.
1767 (x32-avx.c): Remove.
1768 (x32-avx-linux.c): Remove.
1769 (x32-avx-avx512.c): Remove.
1770 (x32-avx-avx512-linux.c): Remove.
1771 (reg-xtensa.c): Remove.
1772 (reg-tilegx.c): Remove.
1773 (reg-tilegx32.c): Remove.
1774
1775 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1776
1777 * Makefile.in (SFILES): Add "common/environ.c".
1778 (OBJS): Add "common/environ.h".
1779
1780 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1781
1782 * configure.ac: Check if the fs_base and gs_base members of
1783 `struct user_regs_struct' exist.
1784 * config.in: Regenerated.
1785 * configure: Likewise.
1786
1787 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1788
1789 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1790 target_read_memory.
1791 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1792 (get_next_pcs_syscall_next_pc): Likewise.
1793
1794 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
1795
1796 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1797 * nto-x86-low.c: Likewise.
1798
1799 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1800
1801 * Makefile.in: Include disable-implicit-rules.mk.
1802
1803 2016-11-23 Pedro Alves <palves@redhat.com>
1804
1805 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1806 (debug_vprintf): Use std::chrono::steady_clock instead of
1807 gettimeofday. Use '.' instead of ':'.
1808 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1809 (get_timestamp): Use std::chrono::steady_clock instead of
1810 gettimeofday.
1811
1812 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1813
1814 * Makefile.in: Fix whitespace formatting.
1815
1816 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1817
1818 * Makefile.in (SFILES, OBS): Flatten list and order
1819 alphabetically.
1820
1821 2016-11-23 Pedro Alves <palves@redhat.com>
1822
1823 * event-loop.c (handle_file_event): Use warning.
1824 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1825 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1826 Use warning.
1827
1828 2016-11-23 Pedro Alves <palves@redhat.com>
1829
1830 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1831 output.
1832 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1833 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1834 debug_printf and debug_flush for debug output.
1835 * server.c (handle_general_set): Likewise.
1836 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1837 output.
1838
1839 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1840
1841 * Makefile.in (.c.o): Replace rule with ...
1842 (%.o: %.c): ... this one.
1843
1844 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1845
1846 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1847 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1848 make.
1849 * configure.ac: Remove checks for the make program.
1850 * configure: Re-generate.
1851
1852 2016-10-28 Pedro Alves <palves@redhat.com>
1853
1854 * Makefile.in (CXX_DIALECT): Get from configure.
1855 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1856 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1857 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1858 * config.in: Regenerate.
1859 * configure: Regenerate.
1860
1861 2016-10-27 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-low.c (linux_supports_range_stepping): Return true if
1864 can_software_single_step return true.
1865
1866 2016-10-27 Yao Qi <yao.qi@linaro.org>
1867
1868 * inferiors.c (find_inferior_in_random): New function.
1869 * inferiors.h (find_inferior_in_random): Declare.
1870 * linux-low.c (linux_wait_for_event_filtered): Call
1871 find_inferior_in_random instead of find_inferior.
1872
1873 2016-10-27 Yao Qi <yao.qi@linaro.org>
1874
1875 * linux-low.c (linux_wait_1): If single-step breakpoints are
1876 inserted, remove them.
1877
1878 2016-10-26 Pedro Alves <palves@redhat.com>
1879
1880 * linux-low.c (handle_extended_wait): Link parent/child fork
1881 threads.
1882 (linux_wait_1): Unlink them.
1883 (linux_set_resume_request): Ignore resume requests for
1884 already-resumed and unhandled fork child threads.
1885 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1886 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1887 New functions.
1888 (handle_v_requests) <vCont>: Don't call require_running.
1889 * server.h (in_queued_stop_replies): New declaration.
1890
1891 2016-10-24 Yao Qi <yao.qi@linaro.org>
1892
1893 PR server/20733
1894 * linux-aarch64-low.c (append_insns): Cast the return value to
1895 'uint32_t *'.
1896
1897 2016-10-10 Yao Qi <yao.qi@linaro.org>
1898
1899 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1900
1901 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1902
1903 * target.c (target_supports_multi_process): New function, moved
1904 from...
1905 * target.h (target_supports_multi_process): ... here. Remove
1906 macro.
1907
1908 2016-10-05 Tom Tromey <tom@tromey.com>
1909
1910 PR remote/20655:
1911 * tracepoint.c (handle_tracepoint_bkpts): Check
1912 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1913
1914 2016-10-05 Yao Qi <yao.qi@linaro.org>
1915
1916 * configure.srv: Update the path of arm-*.xml files.
1917
1918 2016-10-05 Terry Guo <terry.guo@arm.com>
1919 Yao Qi <yao.qi@linaro.org>
1920
1921 * Makefile.in: Adjust the path of rules.
1922 * configure.srv: Update the path of xml files.
1923 * regformats/arm-with-iwmmxt.dat: Regenerated.
1924 * regformats/arm-with-neon.dat: Likewise.
1925 * regformats/arm-with-vfpv2.dat: Likewise.
1926 * regformats/arm-with-vfpv3.dat Likewise.
1927
1928 2016-09-30 Yao Qi <yao.qi@linaro.org>
1929
1930 PR gdbserver/20627
1931 * target.c (target_stop_and_wait): Don't call
1932 target_continue_no_signal, use resume_stop instead.
1933
1934 2016-09-26 Yao Qi <yao.qi@linaro.org>
1935
1936 * linux-low.c (linux_wait_1): Call debug_exit.
1937
1938 2016-09-23 Pedro Alves <palves@redhat.com>
1939
1940 * Makefile.in (SFILES): Add common/new-op.c.
1941 (OBS): Add common/new-op.o.
1942 (new-op.o): New rule.
1943
1944 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1945
1946 * .gitinore: Ignore more files.
1947
1948 2016-09-21 Yao Qi <yao.qi@linaro.org>
1949
1950 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1951 23.
1952
1953 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1954
1955 * server.c (start_inferior): Call target_mourn_inferior instead of
1956 mourn_inferior; pass ptid_t argument to it.
1957 (resume): Likewise.
1958 (handle_target_event): Likewise.
1959 * target.c (target_mourn_inferior): New function.
1960 * target.h (mourn_inferior): Delete macro.
1961
1962 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1963
1964 * linux-low.c (lwp_is_stepping): New function.
1965
1966 2016-09-06 Carl Love <cel@us.ibm.com>
1967
1968 * server.c (start_inferior): Fixed comment, requested comment change
1969 didn't get updated correctly. Removed reference to ptrace () call as
1970 it is only true on Linux systems.
1971
1972 2016-09-06 Carl Love <cel@us.ibm.com>
1973
1974 * server.c (start_inferior): Do not call
1975 function target_post_create_inferior () if the
1976 inferior process has already exited.
1977
1978 2016-09-05 Pedro Alves <palves@redhat.com>
1979
1980 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1981 (COMPILE.pre, CC_LD): Use CXX directly.
1982 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1983 * acinclude.m4: Don't include build-with-cxx.m4.
1984 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1985 * configure: Regenerate.
1986
1987 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1988
1989 PR gdb/19495
1990 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1991 call writing data to own_buf.
1992
1993 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1994
1995 * target.c (mywait): Call target_wait instead of
1996 the_target->wait.
1997 (target_wait): New function.
1998
1999 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2000
2001 * server.c (start_inferior): New variable 'ptid'. Replace calls
2002 to the_target->resume by target_continue{,_no_signal}, depending
2003 on the case.
2004 * target.c (target_stop_and_wait): Call target_continue_no_signal
2005 instead of the_target->resume.
2006 (target_continue): New function.
2007
2008 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2009
2010 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2011
2012 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2013
2014 PR server/20491
2015 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2016 ps_prochandle.
2017 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2018 * linux-arm-low.c (ps_get_thread_area): Likewise.
2019 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2020 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2021 * linux-mips-low.c (ps_get_thread_area): Likewise.
2022 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2023 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2024 * linux-x86-low.c (ps_get_thread_area): Likewise.
2025 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2026
2027 2016-08-19 Pedro Alves <palves@redhat.com>
2028
2029 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2030
2031 2016-08-19 Pedro Alves <palves@redhat.com>
2032
2033 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2034 comment. Use memcpy instead of casting through unsigned long.
2035
2036 2016-08-19 Pedro Alves <palves@redhat.com>
2037
2038 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2039 allocating around 0x80000000.
2040
2041 2016-08-19 Pedro Alves <palves@redhat.com>
2042
2043 PR gdb/20415
2044 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2045 (x32-avx512-linux-ipa.o): New rules.
2046 * configure.ac (x86_64-*-linux*): New x32 check.
2047 * configure.srv (ipa_x32_linux_regobj): New.
2048 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2049 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2050 descriptions.
2051 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2052 descriptions.
2053 * configure: Regenerate.
2054
2055 2016-08-09 Pedro Alves <palves@redhat.com>
2056
2057 PR gdb/18653
2058 * Makefile.in (OBS): Add signals-state-save-restore.o.
2059 (signals-state-save-restore.o): New rule.
2060 * config.in: Regenerate.
2061 * configure: Regenerate.
2062 * linux-low.c: Include "signals-state-save-restore.h".
2063 (linux_create_inferior): Call
2064 restore_original_signals_state.
2065 * server.c: Include "dispositions-save-restore.h".
2066 (captured_main): Call save_original_signals_state.
2067
2068 2016-08-05 Pedro Alves <palves@redhat.com>
2069
2070 * configure: Regenerate.
2071
2072 2016-08-04 Yao Qi <yao.qi@linaro.org>
2073
2074 * linux-low.c (regsets_fetch_inferior_registers): Check
2075 errno is ESRCH or not.
2076
2077 2016-08-02 Yao Qi <yao.qi@linaro.org>
2078
2079 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2080 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2081 (thread_db_load_search): Update.
2082 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2083 td_ta_set_event and td_ta_event_getmsg.
2084
2085 2016-07-26 Pedro Alves <palves@redhat.com>
2086
2087 PR server/20414
2088 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2089 of unsigned long for 64-bit registers and use uint32_t instead of
2090 unsigned int for 32-bit registers.
2091
2092 2016-07-26 Pedro Alves <palves@redhat.com>
2093
2094 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2095 to 'ptrace'.
2096
2097 2016-07-21 Tom Tromey <tom@tromey.com>
2098
2099 * configure: Rebuild.
2100
2101 2016-07-21 Yao Qi <yao.qi@linaro.org>
2102
2103 * mem-break.c (find_gdb_breakpoint): Cast bp to
2104 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2105
2106 2016-07-21 Yao Qi <yao.qi@linaro.org>
2107
2108 * server.c (handle_v_requests): Support s and S actions
2109 if target_supports_software_single_step return true.
2110
2111 2016-07-21 Yao Qi <yao.qi@linaro.org>
2112
2113 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2114 is resume_step, call maybe_hw_step.
2115 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2116 and unstop them.
2117 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2118 breakpoints or not.
2119 (proceed_one_lwp): If resume request is resume_step, install
2120 reinsert breakpoints and call maybe_hw_step.
2121
2122 2016-07-21 Yao Qi <yao.qi@linaro.org>
2123
2124 * linux-low.c (proceed_one_lwp): Declare.
2125 (linux_resume_one_thread): Remove local variable 'step'.
2126 Lift code enqueue signal. Call proceed_one_lwp instead of
2127 linux_resume_one_lwp.
2128
2129 2016-07-21 Yao Qi <yao.qi@linaro.org>
2130
2131 * linux-low.c (linux_resume_one_thread): Call
2132 enqueue_pending_signal.
2133
2134 2016-07-21 Yao Qi <yao.qi@linaro.org>
2135
2136 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2137 * inferiors.c (do_restore_current_thread_cleanup): New function.
2138 (make_cleanup_restore_current_thread): Likewise.
2139 * linux-low.c (install_software_single_step_breakpoints): Call
2140 make_cleanup_restore_current_thread. Switch current_thread to
2141 thread.
2142
2143 2016-07-21 Yao Qi <yao.qi@linaro.org>
2144
2145 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2146 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2147 (clone_one_breakpoint): Likewise.
2148 (delete_reinsert_breakpoints): Change parameter to thread.
2149 Callers updated.
2150 (has_reinsert_breakpoints): Likewise.
2151 (uninsert_reinsert_breakpoints): Likewise.
2152 (reinsert_reinsert_breakpoints): Likewise.
2153 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2154 (delete_reinsert_breakpoints): Likewise.
2155 (reinsert_reinsert_breakpoints): Likewise.
2156 (uninsert_reinsert_breakpoints): Likewise.
2157 (has_reinsert_breakpoints): Likewise.
2158
2159 2016-07-21 Yao Qi <yao.qi@linaro.org>
2160
2161 * inferiors.c (get_thread_process): Make parameter const.
2162 * inferiors.h (get_thread_process): Update declaration.
2163 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2164 Add new parameters child_thread and parent_thread. Callers
2165 updated.
2166 * mem-break.h (clone_all_breakpoints): Update declaration.
2167
2168 2016-07-21 Yao Qi <yao.qi@linaro.org>
2169
2170 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2171 <command_list, handler>: Remove.
2172 (struct gdb_breakpoint): New.
2173 (struct other_breakpoint): New.
2174 (struct reinsert_breakpoint): New.
2175 (is_gdb_breakpoint): New function.
2176 (any_persistent_commands): Update command_list if
2177 is_gdb_breakpoint returns true.
2178 (set_breakpoint): Create breakpoints according to their types.
2179 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2180 (set_gdb_breakpoint_1): Likewise.
2181 (set_gdb_breakpoint): Likewise.
2182 (clear_breakpoint_conditions): Change parameter type to
2183 'struct gdb_breakpoint *'.
2184 (clear_breakpoint_commands): Likewise.
2185 (clear_breakpoint_conditions_and_commands): Likewise.
2186 (add_condition_to_breakpoint): Likewise.
2187 (add_breakpoint_condition): Likewise.
2188 (add_commands_to_breakpoint): Likewise.
2189 (check_breakpoints): Check other_breakpoint.
2190 (clone_one_breakpoint): Clone breakpopint according to its type.
2191 * mem-break.h (struct gdb_breakpoint): Declare.
2192 (set_gdb_breakpoint): Update declaration.
2193 (clear_breakpoint_conditions_and_commands): Likewise.
2194 (add_breakpoint_condition): Likewise.
2195 (add_breakpoint_commands): Likewise.
2196 * server.c (process_point_options): Change parameter type to
2197 'struct gdb_breakpoint *'.
2198
2199 2016-07-21 Yao Qi <yao.qi@linaro.org>
2200
2201 * mem-break.c (set_breakpoint_at): Rename it to ...
2202 (set_breakpoint_type_at): ... it.
2203 (set_breakpoint_at): Call set_breakpoint_type_at.
2204 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2205 * mem-break.h (set_breakpoint_at): Update comments.
2206
2207 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2208
2209 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2210 to buf parameter.
2211 (nios2_store_gregset): Likewise.
2212
2213 2016-07-01 Pedro Alves <palves@redhat.com>
2214 Antoine Tremblay <antoine.tremblay@ericsson.com>
2215
2216 * linux-low.c: Change interface to take the target lwp_info
2217 pointer directly and return void. Handle detaching from a zombie
2218 thread.
2219 (linux_detach_lwp_callback): New function.
2220 (linux_detach): Detach from the leader thread after detaching from
2221 the clone threads.
2222
2223 2016-06-28 Yao Qi <yao.qi@linaro.org>
2224
2225 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2226 for variable new_offset.
2227 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2228 (aarch64_ftrace_insn_reloc_cb): Likewise.
2229 (aarch64_ftrace_insn_reloc_tb): Likewise.
2230 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2231 PRIx64 instead of PRIx32.
2232
2233 2016-06-28 Yao Qi <yao.qi@linaro.org>
2234
2235 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2236 (the_low_target): Install arm_get_syscall_trapinfo.
2237
2238 2016-06-28 Yao Qi <yao.qi@linaro.org>
2239
2240 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2241 function.
2242 (the_low_target): Install aarch64_get_syscall_trapinfo.
2243
2244 2016-06-28 Yao Qi <yao.qi@linaro.org>
2245
2246 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2247 Callers updated.
2248 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2249 Remove parameter sysno.
2250 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2251 sysret.
2252
2253 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2254
2255 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2256 (s390_emit_ne_goto): Likewise.
2257 (s390_emit_lt_goto): Likewise.
2258 (s390_emit_le_goto): Likewise.
2259 (s390_emit_gt_goto): Likewise.
2260 (s390_emit_ge_goto): Likewise.
2261 (s390x_emit_eq_goto): Likewise.
2262 (s390x_emit_ne_goto): Likewise.
2263 (s390x_emit_lt_goto): Likewise.
2264 (s390x_emit_le_goto): Likewise.
2265 (s390x_emit_gt_goto): Likewise.
2266 (s390x_emit_ge_goto): Likewise.
2267 (s390_emit_ops_impl): Mark variable static.
2268 (s390x_emit_ops): Likewise.
2269
2270 2016-06-17 Yao Qi <yao.qi@linaro.org>
2271
2272 * linux-low.c (handle_extended_wait): Call
2273 uninsert_reinsert_breakpoints for the parent process. Remove
2274 reinsert breakpoints from the child process. Reinsert them to
2275 the parent process when vfork is done.
2276 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2277 (reinsert_reinsert_breakpoints): New function.
2278 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2279 (reinsert_reinsert_breakpoints): Declare.
2280
2281 2016-06-17 Yao Qi <yao.qi@linaro.org>
2282
2283 * linux-low.c (handle_extended_wait): If the parent is doing
2284 step-over, remove the reinsert breakpoints from the forked child.
2285
2286 2016-06-17 Yao Qi <yao.qi@linaro.org>
2287
2288 * linux-low.c (unsuspend_all_lwps): Declare.
2289 (linux_low_filter_event): If thread exited, call finish_step_over.
2290 If step-over is finished, unsuspend other threads.
2291
2292 2016-06-17 Yao Qi <yao.qi@linaro.org>
2293
2294 * linux-low.c (linux_resume_one_lwp_throw): Assert
2295 has_reinsert_breakpoints returns false.
2296 * mem-break.c (delete_disabled_breakpoints): Assert
2297 bp type isn't reinsert_breakpoint.
2298
2299 2016-06-17 Yao Qi <yao.qi@linaro.org>
2300
2301 * linux-low.c (maybe_hw_step): New function.
2302 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2303 (finish_step_over): Switch current_thread to lwp temporarily,
2304 and assert has_reinsert_breakpoints returns true.
2305 (proceed_one_lwp): Call maybe_hw_step.
2306 * mem-break.c (has_reinsert_breakpoints): New function.
2307 * mem-break.h (has_reinsert_breakpoints): Declare.
2308
2309 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2310
2311 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2312
2313 2016-05-17 Yao Qi <yao.qi@linaro.org>
2314
2315 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2316 instead of find_inferior.
2317
2318 2016-05-05 Yao Qi <yao.qi@linaro.org>
2319
2320 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2321 Initialize res to zero.
2322
2323 2016-05-05 Yao Qi <yao.qi@linaro.org>
2324
2325 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2326 to uint32_t.
2327
2328 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2329
2330 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2331 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2332 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2333
2334 2016-04-28 Par Olsson <par.olsson@windriver.com>
2335 Simon Marchi <simon.marchi@ericsson.com>
2336
2337 * tracepoint.c (write_inferior_int8): New function.
2338 (cmd_qtenable_disable): Write enable flag using
2339 write_inferior_int8.
2340
2341 2016-04-25 Yao Qi <yao.qi@linaro.org>
2342
2343 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2344 (need_step_over_p): Return zero if the LWP has pending signals
2345 can be delivered on software single step target.
2346
2347 2016-04-25 Yao Qi <yao.qi@linaro.org>
2348
2349 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2350 return instead of error.
2351
2352 2016-04-22 Yao Qi <yao.qi@linaro.org>
2353
2354 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2355 to 23.
2356
2357 2016-04-22 Yao Qi <yao.qi@linaro.org>
2358
2359 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2360 signal when stepping over breakpoint with software single
2361 step.
2362
2363 2016-04-21 Pedro Alves <palves@redhat.com>
2364
2365 * linux-s390-low.c (s390_collect_ptrace_register)
2366 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2367 add casts.
2368 (s390_check_regset): Use void * instead of gdb_byte *.
2369
2370 2016-04-20 Pedro Alves <palves@redhat.com>
2371
2372 * configure: Renegerate.
2373
2374 2016-04-20 Yao Qi <yao.qi@linaro.org>
2375
2376 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2377 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2378 number 16.
2379 (arm_store_gregset): Likewise.
2380
2381 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2382
2383 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2384 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2385 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2386 (amd64-avx-mpx-linux.c): New rules.
2387 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2388 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2389 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2390 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2391 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2392 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2393 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2394 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2395 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2396 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2397 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2398 * linux-x86-low.c (x86_linux_read_description): Add case for
2399 X86_XSTATE_AVX_MPX_MASK.
2400 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2401 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2402 init_registers_i386_avx_mpx_linux.
2403 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2404 (initialize_low_tracepoint): Call
2405 init_registers_i386_avx_mpx_linux.
2406 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2407 (initialize_low_tracepoint): Call
2408 init_registers_amd64_avx_mpx_linux.
2409 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2410 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2411 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2412 declarations.
2413
2414 2016-04-18 Pedro Alves <palves@redhat.com>
2415
2416 * configure: Regenerate.
2417
2418 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2419
2420 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2421 (aarch64_emit_sub): Likewise.
2422
2423 2016-04-12 Pedro Alves <palves@redhat.com>
2424
2425 * utils.c (prepare_to_throw_exception): Delete.
2426
2427 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2428
2429 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2430
2431 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2432
2433 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2434
2435 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2436
2437 * linux-aarch64-ipa.c: Add <elf.h> include.
2438 * linux-ppc-ipa.c: Add <elf.h> include.
2439 * linux-s390-ipa.c: Add <elf.h> include.
2440
2441 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2442
2443 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2444 (get_raw_reg_ptr): Likewise.
2445 (get_trace_state_variable_value_ptr): Likewise.
2446 (set_trace_state_variable_value_ptr): Likewise.
2447 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2448 char *.
2449
2450 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2451 Marcin Kościelnicki <koriakin@0x04.net>
2452
2453 PR/17221
2454 * linux-ppc-low.c (emit_insns): New function.
2455 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2456 (ppc_emit_prologue): New function.
2457 (ppc_emit_epilogue): New function.
2458 (ppc_emit_add): New function.
2459 (ppc_emit_sub): New function.
2460 (ppc_emit_mul): New function.
2461 (ppc_emit_lsh): New function.
2462 (ppc_emit_rsh_signed): New function.
2463 (ppc_emit_rsh_unsigned): New function.
2464 (ppc_emit_ext): New function.
2465 (ppc_emit_zero_ext): New function.
2466 (ppc_emit_log_not): New function.
2467 (ppc_emit_bit_and): New function.
2468 (ppc_emit_bit_or): New function.
2469 (ppc_emit_bit_xor): New function.
2470 (ppc_emit_bit_not): New function.
2471 (ppc_emit_equal): New function.
2472 (ppc_emit_less_signed): New function.
2473 (ppc_emit_less_unsigned): New function.
2474 (ppc_emit_ref): New function.
2475 (ppc_emit_const): New function.
2476 (ppc_emit_reg): New function.
2477 (ppc_emit_pop): New function.
2478 (ppc_emit_stack_flush): New function.
2479 (ppc_emit_swap): New function.
2480 (ppc_emit_stack_adjust): New function.
2481 (ppc_emit_call): New function.
2482 (ppc_emit_int_call_1): New function.
2483 (ppc_emit_void_call_2): New function.
2484 (ppc_emit_if_goto): New function.
2485 (ppc_emit_goto): New function.
2486 (ppc_emit_eq_goto): New function.
2487 (ppc_emit_ne_goto): New function.
2488 (ppc_emit_lt_goto): New function.
2489 (ppc_emit_le_goto): New function.
2490 (ppc_emit_gt_goto): New function.
2491 (ppc_emit_ge_goto): New function.
2492 (ppc_write_goto_address): New function.
2493 (ppc_emit_ops_impl): New static variable.
2494 (ppc64v1_emit_prologue): New function.
2495 (ppc64v2_emit_prologue): New function.
2496 (ppc64_emit_epilogue): New function.
2497 (ppc64_emit_add): New function.
2498 (ppc64_emit_sub): New function.
2499 (ppc64_emit_mul): New function.
2500 (ppc64_emit_lsh): New function.
2501 (ppc64_emit_rsh_signed): New function.
2502 (ppc64_emit_rsh_unsigned): New function.
2503 (ppc64_emit_ext): New function.
2504 (ppc64_emit_zero_ext): New function.
2505 (ppc64_emit_log_not): New function.
2506 (ppc64_emit_bit_and): New function.
2507 (ppc64_emit_bit_or): New function.
2508 (ppc64_emit_bit_xor): New function.
2509 (ppc64_emit_bit_not): New function.
2510 (ppc64_emit_equal): New function.
2511 (ppc64_emit_less_signed): New function.
2512 (ppc64_emit_less_unsigned): New function.
2513 (ppc64_emit_ref): New function.
2514 (ppc64_emit_const): New function.
2515 (ppc64v1_emit_reg): New function.
2516 (ppc64v2_emit_reg): New function.
2517 (ppc64_emit_pop): New function.
2518 (ppc64_emit_stack_flush): New function.
2519 (ppc64_emit_swap): New function.
2520 (ppc64v1_emit_call): New function.
2521 (ppc64v2_emit_call): New function.
2522 (ppc64v1_emit_int_call_1): New function.
2523 (ppc64v2_emit_int_call_1): New function.
2524 (ppc64v1_emit_void_call_2): New function.
2525 (ppc64v2_emit_void_call_2): New function.
2526 (ppc64_emit_if_goto): New function.
2527 (ppc64_emit_eq_goto): New function.
2528 (ppc64_emit_ne_goto): New function.
2529 (ppc64_emit_lt_goto): New function.
2530 (ppc64_emit_le_goto): New function.
2531 (ppc64_emit_gt_goto): New function.
2532 (ppc64_emit_ge_goto): New function.
2533 (ppc64v1_emit_ops_impl): New static variable.
2534 (ppc64v2_emit_ops_impl): New static variable.
2535 (ppc_emit_ops): New function.
2536 (linux_low_target): Wire in ppc_emit_ops.
2537
2538 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2539 Marcin Kościelnicki <koriakin@0x04.net>
2540
2541 PR/17221
2542 * Makefile.in: Add powerpc-*-ipa.o
2543 * configure.srv: Add ipa_obj for powerpc*-linux.
2544 * linux-ppc-ipa.c: New file.
2545 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2546 includes.
2547 (PPC_FIELD): New macro.
2548 (PPC_SEXT): New macro.
2549 (PPC_OP6): New macro.
2550 (PPC_BO): New macro.
2551 (PPC_LI): New macro.
2552 (PPC_BD): New macro.
2553 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2554 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2555 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2556 (ppc_get_thread_area): New function.
2557 (is_elfv2_inferior): New function.
2558 (gen_ds_form): New function.
2559 (GEN_STD): New macro.
2560 (GEN_STDU): New macro.
2561 (GEN_LD): New macro.
2562 (GEN_LDU): New macro.
2563 (gen_d_form): New function.
2564 (GEN_ADDI): New macro.
2565 (GEN_ADDIS): New macro.
2566 (GEN_LI): New macro.
2567 (GEN_LIS): New macro.
2568 (GEN_ORI): New macro.
2569 (GEN_ORIS): New macro.
2570 (GEN_LWZ): New macro.
2571 (GEN_STW): New macro.
2572 (GEN_STWU): New macro.
2573 (gen_xfx_form): New function.
2574 (GEN_MFSPR): New macro.
2575 (GEN_MTSPR): New macro.
2576 (GEN_MFCR): New macro.
2577 (GEN_MTCR): New macro.
2578 (GEN_SYNC): New macro.
2579 (GEN_LWSYNC): New macro.
2580 (gen_x_form): New function.
2581 (GEN_OR): New macro.
2582 (GEN_MR): New macro.
2583 (GEN_LWARX): New macro.
2584 (GEN_STWCX): New macro.
2585 (GEN_CMPW): New macro.
2586 (gen_md_form): New function.
2587 (GEN_RLDICL): New macro.
2588 (GEN_RLDICR): New macro.
2589 (gen_i_form): New function.
2590 (GEN_B): New macro.
2591 (GEN_BL): New macro.
2592 (gen_b_form): New function.
2593 (GEN_BNE): New macro.
2594 (GEN_LOAD): New macro.
2595 (GEN_STORE): New macro.
2596 (gen_limm): New function.
2597 (gen_atomic_xchg): New function.
2598 (gen_call): New function.
2599 (ppc_relocate_instruction): New function.
2600 (ppc_install_fast_tracepoint_jump_pad): New function.
2601 (ppc_get_min_fast_tracepoint_insn_len): New function.
2602 (ppc_get_ipa_tdesc_idx): New function.
2603 (the_low_target): Wire in the new functions.
2604 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2605 tdescs.
2606 * linux-ppc-tdesc.h: New file.
2607
2608 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2609
2610 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2611 (alloc_jump_pad_buffer): New function.
2612 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2613 (alloc_jump_pad_buffer): New function.
2614 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2615 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2616 (alloc_jump_pad_buffer): New function.
2617 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2618 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2619 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2620 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2621
2622 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2623
2624 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2625 * linux-amd64-ipa.c: Likewise.
2626 * linux-i386-ipa.c: Likewise.
2627 * linux-s390-ipa.c: Likewise.
2628 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2629 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2630 set_trace_state_variable_value_ptr.
2631 (struct ipa_sym_addresses): Likewise.
2632 (symbol_list): Likewise.
2633 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2634 accessing gdb_collect directly.
2635 (gdb_collect_ptr_type): New typedef.
2636 (get_raw_reg_ptr_type): New typedef.
2637 (get_trace_state_variable_value_ptr_type): New typedef.
2638 (set_trace_state_variable_value_ptr_type): New typedef.
2639 (gdb_collect_ptr): New global.
2640 (get_raw_reg_ptr): New global.
2641 (get_trace_state_variable_value_ptr): New global.
2642 (set_trace_state_variable_value_ptr): New global.
2643 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2644 accessing get_raw_reg directly.
2645 (get_get_tsv_func_addr): Likewise for
2646 get_trace_state_variable_value_ptr.
2647 (get_set_tsv_func_addr): Likewise for
2648 set_trace_state_variable_value_ptr.
2649 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2650
2651 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2652
2653 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2654
2655 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2656
2657 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2658 packets.
2659 (relocate_instruction): Remove own_buf.
2660 * server.c (own_buf): Make global.
2661 (handle_v_requests): Make global.
2662 * server.h (own_buf): New declaration.
2663 (handle_v_requests): New prototype.
2664
2665 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2666
2667 PR 18377
2668 * linux-s390-low.c (add_insns): New function.
2669 (s390_emit_prologue): New function.
2670 (s390_emit_epilogue): New function.
2671 (s390_emit_add): New function.
2672 (s390_emit_sub): New function.
2673 (s390_emit_mul): New function.
2674 (s390_emit_lsh): New function.
2675 (s390_emit_rsh_signed): New function.
2676 (s390_emit_rsh_unsigned): New function.
2677 (s390_emit_ext): New function.
2678 (s390_emit_log_not): New function.
2679 (s390_emit_bit_and): New function.
2680 (s390_emit_bit_or): New function.
2681 (s390_emit_bit_xor): New function.
2682 (s390_emit_bit_not): New function.
2683 (s390_emit_equal): New function.
2684 (s390_emit_less_signed): New function.
2685 (s390_emit_less_unsigned): New function.
2686 (s390_emit_ref): New function.
2687 (s390_emit_if_goto): New function.
2688 (s390_emit_goto): New function.
2689 (s390_write_goto_address): New function.
2690 (s390_emit_litpool): New function.
2691 (s390_emit_const): New function.
2692 (s390_emit_call): New function.
2693 (s390_emit_reg): New function.
2694 (s390_emit_pop): New function.
2695 (s390_emit_stack_flush): New function.
2696 (s390_emit_zero_ext): New function.
2697 (s390_emit_swap): New function.
2698 (s390_emit_stack_adjust): New function.
2699 (s390_emit_set_r2): New function.
2700 (s390_emit_int_call_1): New function.
2701 (s390_emit_void_call_2): New function.
2702 (s390_emit_eq_goto): New function.
2703 (s390_emit_ne_goto): New function.
2704 (s390_emit_lt_goto): New function.
2705 (s390_emit_le_goto): New function.
2706 (s390_emit_gt_goto): New function.
2707 (s390_emit_ge_goto): New function.
2708 (s390x_emit_prologue): New function.
2709 (s390x_emit_epilogue): New function.
2710 (s390x_emit_add): New function.
2711 (s390x_emit_sub): New function.
2712 (s390x_emit_mul): New function.
2713 (s390x_emit_lsh): New function.
2714 (s390x_emit_rsh_signed): New function.
2715 (s390x_emit_rsh_unsigned): New function.
2716 (s390x_emit_ext): New function.
2717 (s390x_emit_log_not): New function.
2718 (s390x_emit_bit_and): New function.
2719 (s390x_emit_bit_or): New function.
2720 (s390x_emit_bit_xor): New function.
2721 (s390x_emit_bit_not): New function.
2722 (s390x_emit_equal): New function.
2723 (s390x_emit_less_signed): New function.
2724 (s390x_emit_less_unsigned): New function.
2725 (s390x_emit_ref): New function.
2726 (s390x_emit_if_goto): New function.
2727 (s390x_emit_const): New function.
2728 (s390x_emit_call): New function.
2729 (s390x_emit_reg): New function.
2730 (s390x_emit_pop): New function.
2731 (s390x_emit_stack_flush): New function.
2732 (s390x_emit_zero_ext): New function.
2733 (s390x_emit_swap): New function.
2734 (s390x_emit_stack_adjust): New function.
2735 (s390x_emit_int_call_1): New function.
2736 (s390x_emit_void_call_2): New function.
2737 (s390x_emit_eq_goto): New function.
2738 (s390x_emit_ne_goto): New function.
2739 (s390x_emit_lt_goto): New function.
2740 (s390x_emit_le_goto): New function.
2741 (s390x_emit_gt_goto): New function.
2742 (s390x_emit_ge_goto): New function.
2743 (s390_emit_ops): New function.
2744 (struct linux_target_ops): Fill in emit_ops hook.
2745
2746 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2747
2748 PR 18377
2749 * Makefile.in: Add s390 IPA files.
2750 * configure.srv: Build IPA for s390.
2751 * linux-s390-ipa.c: New file.
2752 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2753 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2754 (tdesc_s390_linux32): Likewise.
2755 (init_registers_s390_linux32v1): Likewise.
2756 (tdesc_s390_linux32v1): Likewise.
2757 (init_registers_s390_linux32v2): Likewise.
2758 (tdesc_s390_linux32v2): Likewise.
2759 (init_registers_s390_linux64): Likewise.
2760 (tdesc_s390_linux64): Likewise.
2761 (init_registers_s390_linux64v1): Likewise.
2762 (tdesc_s390_linux64v1): Likewise.
2763 (init_registers_s390_linux64v2): Likewise.
2764 (tdesc_s390_linux64v2): Likewise.
2765 (init_registers_s390_te_linux64): Likewise.
2766 (tdesc_s390_te_linux64): Likewise.
2767 (init_registers_s390_vx_linux64): Likewise.
2768 (tdesc_s390_vx_linux64): Likewise.
2769 (init_registers_s390_tevx_linux64): Likewise.
2770 (tdesc_s390_tevx_linux64): Likewise.
2771 (init_registers_s390x_linux64): Likewise.
2772 (tdesc_s390x_linux64): Likewise.
2773 (init_registers_s390x_linux64v1): Likewise.
2774 (tdesc_s390x_linux64v1): Likewise.
2775 (init_registers_s390x_linux64v2): Likewise.
2776 (tdesc_s390x_linux64v2): Likewise.
2777 (init_registers_s390x_te_linux64): Likewise.
2778 (tdesc_s390x_te_linux64): Likewise.
2779 (init_registers_s390x_vx_linux64): Likewise.
2780 (tdesc_s390x_vx_linux64): Likewise.
2781 (init_registers_s390x_tevx_linux64): Likewise.
2782 (tdesc_s390x_tevx_linux64): Likewise.
2783 (have_hwcap_s390_vx): New static variable.
2784 (s390_arch_setup): Fill have_hwcap_s390_vx.
2785 (s390_get_thread_area): New function.
2786 (s390_ft_entry_gpr_esa): New const.
2787 (s390_ft_entry_gpr_zarch): New const.
2788 (s390_ft_entry_misc): New const.
2789 (s390_ft_entry_fr): New const.
2790 (s390_ft_entry_vr): New const.
2791 (s390_ft_main_31): New const.
2792 (s390_ft_main_64): New const.
2793 (s390_ft_exit_fr): New const.
2794 (s390_ft_exit_vr): New const.
2795 (s390_ft_exit_misc): New const.
2796 (s390_ft_exit_gpr_esa): New const.
2797 (s390_ft_exit_gpr_zarch): New const.
2798 (append_insns): New function.
2799 (s390_relocate_instruction): New function.
2800 (s390_install_fast_tracepoint_jump_pad): New function.
2801 (s390_get_min_fast_tracepoint_insn_len): New function.
2802 (s390_get_ipa_tdesc_idx): New function.
2803 (struct linux_target_ops): Wire in the above functions.
2804 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2805 * linux-s390-tdesc.h: New file.
2806
2807 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2808
2809 * linux-s390-low.c (s390_supports_tracepoints): New function.
2810 (struct linux_target_ops): Fill supports_tracepoints hook.
2811
2812 2016-03-18 Yao Qi <yao.qi@linaro.org>
2813
2814 * linux-low.c (lwp_signal_can_be_delivered): New function.
2815 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2816
2817 2016-03-18 Yao Qi <yao.qi@linaro.org>
2818
2819 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2820 0 if signal is enqueued. Remove 'signal' from one debugging
2821 message. Move one debugging message to some lines below.
2822 Remove code setting 'signal' to 0.
2823
2824 2016-03-18 Yao Qi <yao.qi@linaro.org>
2825
2826 * linux-low.c (linux_low_filter_event): Remove redundant
2827 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2828
2829 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2830
2831 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2832 (struct linux_target_ops): Wire in the above.
2833
2834 2016-03-03 Yao Qi <yao.qi@linaro.org>
2835
2836 * linux-low.c: Update comments to start_step_over.
2837
2838 2016-03-03 Yao Qi <yao.qi@linaro.org>
2839
2840 PR server/19736
2841 * linux-low.c (handle_extended_wait): Set child suspended
2842 if event_lwp->bp_reinsert isn't zero.
2843
2844 2016-03-02 Yao Qi <yao.qi@linaro.org>
2845
2846 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2847 enqueue_pending_signal.
2848
2849 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2850
2851 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2852 is actually loaded.
2853
2854 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2855
2856 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2857 (s390_regmap_3264) [!__s390x__]: New global.
2858 (s390_collect_ptrace_register): Skip map entries containing -1.
2859 (s390_supply_ptrace_register): Ditto.
2860 (s390_fill_gprs_high): New function.
2861 (s390_store_gprs_high): New function.
2862 (s390_regsets): Add NT_S390_HIGH_GPRS.
2863 (s390_get_hwcap): Enable on 31-bit.
2864 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2865 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2866 Detect NT_S390_HIGH_GPRS.
2867 (s390_usrregs_info_3264): Enable on 31-bit.
2868 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2869 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2870
2871 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2872
2873 PR gdb/13808
2874 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2875 * configure.srv: Ditto.
2876 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2877 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2878 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2879 (init_registers_amd64_linux): Remove prototype.
2880 (tdesc_amd64_linux): Remove declaration.
2881 (get_ipa_tdesc): New function.
2882 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2883 initialize remaining tdescs.
2884 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2885 (init_registers_i386_linux): Remove prototype.
2886 (tdesc_i386_linux): Remove declaration.
2887 (get_ipa_tdesc): New function.
2888 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2889 initialize remaining tdescs.
2890 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2891 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2892 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2893 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2894 (x86_get_ipa_tdesc_idx): New function.
2895 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2896 * linux-x86-tdesc.h: New file.
2897 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2898 (target_get_ipa_tdesc_idx): New macro.
2899 * tracepoint.c (ipa_tdesc_idx): New macro.
2900 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2901 (symbol_list): Add ipa_tdesc_idx.
2902 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2903 (ipa_tdesc): Remove.
2904 (ipa_tdesc_idx): New variable.
2905 (get_context_regcache): Use get_ipa_tdesc.
2906 (gdb_collect): Ditto.
2907 (gdb_probe): Ditto.
2908 * tracepoint.h (get_ipa_tdesc): New prototype.
2909 (ipa_tdesc): Remove.
2910
2911 2016-02-24 Pedro Alves <palves@redhat.com>
2912
2913 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2914 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2915 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2916 Factor out common code between the USE_SIGTRAP_SIGINFO and
2917 !USE_SIGTRAP_SIGINFO blocks.
2918 (linux_low_filter_event): Call save_stop_reason instead of
2919 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2920 Update comments.
2921 (linux_wait_1): Update comments.
2922
2923 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
2924
2925 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2926 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2927 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2928 ppc_insert_point, ppc_remove_point.
2929
2930 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2931
2932 * linux-s390-low.c (s390_supports_z_point_type): New function.
2933 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2934
2935 2016-02-16 Yao Qi <yao.qi@linaro.org>
2936
2937 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2938 PC. Get pc from regcache_read_pc.
2939
2940 2016-02-12 Yao Qi <yao.qi@linaro.org>
2941
2942 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2943 or linux_get_pc_32bit.
2944 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2945
2946 2016-02-12 Yao Qi <yao.qi@linaro.org>
2947
2948 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2949 arm_linux_get_next_pcs_fixup.
2950
2951 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2952
2953 * tracepoint.c (x_tracepoint_action_download): Change
2954 write_inferior_data_ptr to write_inferior_data_pointer.
2955 (cmd_qtstart): Likewise.
2956 (write_inferior_data_ptr): Remove.
2957 (download_agent_expr): Change write_inferior_data_ptr to
2958 write_inferior_data_pointer.
2959 (download_tracepoint_1): Likewise.
2960 (download_tracepoint): Likewise.
2961 (download_trace_state_variables): Likewise.
2962
2963 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
2964 Marcin Kościelnicki <koriakin@0x04.net>
2965
2966 * tracepoint.c (struct tracepoint_action_ops): Remove.
2967 (struct tracepoint_action): Remove ops.
2968 (m_tracepoint_action_download, r_tracepoint_action_download)
2969 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2970 size and offset accordingly.
2971 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2972 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2973 (tracepoint_action_send, tracepoint_action_download): New functions.
2974 Helpers for trace action handlers.
2975 (add_tracepoint_action): Remove setup actions ops.
2976 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2977
2978 2016-02-10 Yao Qi <yao.qi@linaro.org>
2979
2980 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2981
2982 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2983
2984 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2985 to AC_OUTPUT.
2986 * configure: Regenerate.
2987
2988 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2989
2990 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2991 void * to gdb_byte *.
2992 * linux-low.c (siginfo_fixup): Likewise.
2993 (linux_xfer_siginfo): Likewise.
2994 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2995 Likewise.
2996 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2997
2998 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2999
3000 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3001 to srv_tgtobj.
3002 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3003 to srv_tgtobj.
3004 * linux-x86-low.c [__x86_64__]: Include
3005 "nat/amd64-linux-siginfo.h".
3006 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3007 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3008 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3009 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3010 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3011 (cpt_si_fd, si_timerid, si_overrun): Move from
3012 nat/amd64-linux-siginfo.c.
3013 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3014
3015 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3016
3017 * server.c (skip_to_semicolon): Remove.
3018 (process_point_options): Use strchrnul instead of
3019 skip_to_semicolon.
3020
3021 2016-01-26 Yao Qi <yao.qi@linaro.org>
3022
3023 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3024 * linux-low.c (install_software_single_step_breakpoints): Don't
3025 call regcache_read_pc.
3026 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3027 argument pc.
3028
3029 2016-01-26 Yao Qi <yao.qi@linaro.org>
3030
3031 * linux-low.c (install_software_single_step_breakpoints): Call
3032 regcache_read_pc instead of get_pc.
3033
3034 2016-01-26 Yao Qi <yao.qi@linaro.org>
3035
3036 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3037 (unblock_async_io): Rename to ...
3038 (block_unblock_async_io): ... it. New function.
3039 (enable_async_io): Don't install SIGIO handler. Unblock it
3040 instead.
3041 (disable_async_io): Don't ignore SIGIO. Block it instead.
3042 (initialize_async_io): Install SIGIO handler. Don't call
3043 unblock_async_io.
3044
3045 2016-01-26 Yao Qi <yao.qi@linaro.org>
3046
3047 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3048 first character is '\003', call *the_target->request_interrupt.
3049
3050 2016-01-25 Yao Qi <yao.qi@linaro.org>
3051
3052 * remote-utils.c (new_thread_notify): Remove.
3053 (dead_thread_notify): Likewise.
3054 * remote-utils.h (new_thread_notify): Remove declaration.
3055 (dead_thread_notify): Likewise.
3056
3057 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3058
3059 * gdb.trace/pending.exp: Fix expected message on continue.
3060
3061 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3062
3063 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3064 it works properly on big-endian machines where sizeof (CORE_ADDR)
3065 != sizeof (void *).
3066
3067 2016-01-21 Pedro Alves <palves@redhat.com>
3068
3069 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3070 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3071 * configure: Regenerate.
3072
3073 2016-01-21 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3076 is_thumb and set it according to CPSR saved on the stack.
3077 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3078 arm_sigreturn_next_pc.
3079
3080 2016-01-18 Yao Qi <yao.qi@linaro.org>
3081
3082 * linux-low.c (linux_set_pc_64bit): New function.
3083 (linux_get_pc_64bit): New function.
3084 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3085 Declare.
3086 * linux-sparc-low.c (debug_threads): Remove declaration.
3087 (sparc_get_pc): Remove.
3088 (the_low_target): Use linux_get_pc_64bit instead of
3089 sparc_get_pc.
3090 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3091 (the_low_target): Use linux_get_pc_64bit and
3092 linux_set_pc_64bit.
3093
3094 2016-01-18 Yao Qi <yao.qi@linaro.org>
3095
3096 * linux-arm-low.c (debug_threads): Remove declaration.
3097 (arm_get_pc, arm_set_pc): Remove.
3098 (the_low_target): Use linux_get_pc_32bit and
3099 linux_set_pc_32bit.
3100 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3101 (the_low_target): Use linux_get_pc_32bit and
3102 linux_set_pc_32bit.
3103 * linux-cris-low.c (debug_threads): Remove declaration.
3104 (cris_get_pc, cris_set_pc,): Remove.
3105 (the_low_target): Use linux_get_pc_32bit and
3106 linux_set_pc_32bit.
3107 * linux-crisv32-low.c (debug_threads): Remove declaration.
3108 (cris_get_pc, cris_set_pc): Remove.
3109 (the_low_target): Use linux_get_pc_32bit and
3110 linux_set_pc_32bit.
3111 * linux-low.c: Include inttypes.h.
3112 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3113 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3114 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3115 (the_low_target): Use linux_get_pc_32bit and
3116 linux_set_pc_32bit.
3117 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3118 (the_low_target): Use linux_get_pc_32bit and
3119 linux_set_pc_32bit.
3120 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3121 (the_low_target): Use linux_get_pc_32bit and
3122 linux_set_pc_32bit.
3123 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3124 (the_low_target): Use linux_get_pc_32bit and
3125 linux_set_pc_32bit.
3126 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3127 (the_low_target): Use linux_get_pc_32bit and
3128 linux_set_pc_32bit.
3129
3130 2016-01-18 Gary Benson <gbenson@redhat.com>
3131
3132 * configure.ac (AC_FUNC_FORK): New check.
3133 * config.in: Regenerate.
3134 * configure: Likewise.
3135
3136 2016-01-14 Yao Qi <yao.qi@linaro.org>
3137
3138 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3139 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3140 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3141 arm_get_next_pcs_ctor.
3142
3143 2016-01-12 Josh Stone <jistone@redhat.com>
3144 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3145
3146 * inferiors.h: Include "gdb_vecs.h".
3147 (struct process_info): Add syscalls_to_catch.
3148 * inferiors.c (remove_process): Free syscalls_to_catch.
3149 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3150 syscall_return stops.
3151 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3152 * server.c (handle_general_set): Handle QCatchSyscalls.
3153 (handle_query): Report support for QCatchSyscalls.
3154 * target.h (struct target_ops): Add supports_catch_syscall.
3155 (target_supports_catch_syscall): New macro.
3156 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3157 (struct lwp_info): Add syscall_state.
3158 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3159 Maintain syscall_state and syscalls_to_catch across exec.
3160 (get_syscall_trapinfo): New function, proxy to the_low_target.
3161 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3162 (linux_low_filter_event): Toggle syscall_state entry/return for
3163 syscall traps, and set it ignored for all others.
3164 (gdb_catching_syscalls_p): New function.
3165 (gdb_catch_this_syscall_p): New function.
3166 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3167 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3168 (linux_supports_catch_syscall): New function.
3169 (linux_target_ops): Install it.
3170 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3171 (the_low_target): Install it.
3172
3173 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3174
3175 * acinclude.m4: Include new ../warning.m4 file.
3176 * configure: Regenerated.
3177 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3178
3179 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3180
3181 * ax.c (is_goto_target): Mark static.
3182 * linux-low.c (register_addr): Likewise.
3183 (linux_fetch_registers, linux_store_registers): Likewise.
3184 * mem-break.c (any_persistent_commands): Fix old prototype.
3185 (add_commands_to_breakpoint): Mark static.
3186 * regcache.c (find_register_by_name): Delete unused func.
3187 * remote-utils.c (hex_or_minus_one): Mark static.
3188 * server.c (monitor_show_help): Mark static.
3189 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3190 handle_v_requests): Likewise.
3191
3192 2016-01-12 Pedro Alves <palves@redhat.com>
3193
3194 Remove use of the registered trademark symbol throughout.
3195
3196 2016-01-08 Yao Qi <yao.qi@linaro.org>
3197
3198 * remote-utils.c (getpkt): If c is '\003', call target hook
3199 request_interrupt.
3200
3201 2016-01-06 Yao Qi <yao.qi@linaro.org>
3202
3203 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3204 linux-aarch32-low.c.
3205 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3206 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3207 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3208 (thumb2_breakpoint): Declare.
3209 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3210 linux-aarch32-low.h.
3211 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3212 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3213 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3214
3215 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3216
3217 * gdbreplay.c (gdbreplay_version): Change copyright year in
3218 version message.
3219 * server.c (gdbserver_version): Likewise.
3220
3221 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3222
3223 * server.c (crc32_table): Delete.
3224 (crc32): Use libiberty's xcrc32 function.
3225
3226 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3227
3228 * lynx-low.c (lynx_delete_thread_callback): New function.
3229 (lynx_mourn): Properly delete our process and all of its
3230 threads. Remove call to clear_inferiors.
3231
3232 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3233
3234 * target.c (thread_search_callback): Add check that
3235 the thread_stopped target callback is not NULL before
3236 calling it.
3237
3238 2015-12-21 Yao Qi <yao.qi@linaro.org>
3239
3240 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3241 arm breakpoint.
3242
3243 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3244
3245 * server.c (handle_query): Call target_supports_software_single_step.
3246
3247 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3248
3249 * linux-low.c (single_step): New function.
3250 (linux_resume_one_lwp_throw): Call single_step.
3251 (start_step_over): Likewise.
3252
3253 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3254
3255 * Makefile.in (SFILES): Append arch/arm-linux.c,
3256 arch/arm-get-next-pcs.c.
3257 (arm-linux.o): New rule.
3258 (arm-get-next-pcs.o): New rule.
3259 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3260 arm-linux.o.
3261 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3262 to linux-aarch32-low.c.
3263 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3264 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3265 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3266 (thumb2_breakpoint_len): Likewise.
3267 (arm_is_thumb_mode): Make non-static.
3268 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3269 from linux-aarch32-low.c.
3270 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3271 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3272 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3273 (thumb2_breakpoint_len): Likewise.
3274 (arm_is_thumb_mode): New declaration.
3275 * linux-arm-low.c: Include arch/arm-linux.h
3276 aarch/arm-get-next-pcs.h, sys/syscall.h.
3277 (get_next_pcs_ops): New struct.
3278 (get_next_pcs_addr_bits_remove): New function.
3279 (get_next_pcs_is_thumb): New function.
3280 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3281 (arm_sigreturn_next_pc): Likewise.
3282 (get_next_pcs_syscall_next_pc): Likewise.
3283 (arm_gdbserver_get_next_pcs): Likewise.
3284 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3285 Initialize.
3286 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3287 * server.h: Include gdb_vecs.h.
3288
3289 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3290
3291 * Makefile.in (SFILES): Append common/common-regcache.c.
3292 (OBS): Append common-regcache.o.
3293 (common-regcache.o): New rule.
3294 * regcache.c (init_register_cache): Initialize cache to
3295 REG_UNAVAILABLE.
3296 (regcache_raw_read_unsigned): New function.
3297 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3298 register_status enum.
3299
3300 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3301
3302 * linux-aarch64-low.c (the_low_targets): Rename
3303 breakpoint_reinsert_addr to get_next_pcs.
3304 * linux-arm-low.c (the_low_targets): Likewise.
3305 * linux-bfin-low.c (the_low_targets): Likewise.
3306 * linux-cris-low.c (the_low_targets): Likewise.
3307 * linux-crisv32-low.c (the_low_targets): Likewise.
3308 * linux-low.c (can_software_single_step): Likewise.
3309 (install_software_single_step_breakpoints): New function.
3310 (start_step_over): Use install_software_single_step_breakpoints.
3311 * linux-low.h: New CORE_ADDR vector.
3312 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3313 get_next_pcs.
3314 * linux-mips-low.c (the_low_targets): Likewise.
3315 * linux-nios2-low.c (the_low_targets): Likewise.
3316 * linux-sparc-low.c (the_low_targets): Likewise.
3317
3318 2015-12-17 Pedro Alves <palves@redhat.com>
3319
3320 * linux-low.c (linux_kill_one_lwp): Remove references to
3321 LinuxThreads.
3322 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3323 to 'kill'.
3324 (linux_init_signals): Delete.
3325 (initialize_low): Adjust.
3326 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3327
3328 2015-12-16 Pedro Alves <palves@redhat.com>
3329
3330 * configure.ac (compiler warning flags): When testing a
3331 -Wno-foo option, check whether -Wfoo works instead.
3332 * configure: Regenerate.
3333
3334 2015-12-11 Don Breazeal <donb@codesourcery.com>
3335
3336 * server.c (process_serial_event): Don't exit from gdbserver
3337 in remote mode if there are still active inferiors.
3338
3339 2015-12-11 Yao Qi <yao.qi@linaro.org>
3340
3341 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3342 arm_breakpoint_at if the process is 32-bit.
3343
3344 2015-12-11 Yao Qi <yao.qi@linaro.org>
3345
3346 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3347 arm breakpoint.
3348
3349 2015-12-07 Yao Qi <yao.qi@linaro.org>
3350
3351 * configure.srv: Append arm.o to srv_tgtobj for
3352 aarch64*-*-linux* target.
3353 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3354 from linux-arm-low.c.
3355 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3356 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3357 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3358 (thumb2_breakpoint_len): Likewise.
3359 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3360 (arm_breakpoint_kinds): Likewise.
3361 (arm_breakpoint_kind_from_pc): Likewise.
3362 (arm_sw_breakpoint_from_kind): Likewise.
3363 (arm_breakpoint_kind_from_current_state): Likewise.
3364 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3365 (arm_sw_breakpoint_from_kind): Declare.
3366 (arm_breakpoint_kind_from_current_state): Declare.
3367 (arm_breakpoint_at): Declare.
3368 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3369 arm_sw_breakpoint_from_kind if process is 32-bit.
3370 (aarch64_breakpoint_kind_from_pc): New function.
3371 (aarch64_breakpoint_kind_from_current_state): New function.
3372 (the_low_target): Initialize fields breakpoint_kind_from_pc
3373 and breakpoint_kind_from_current_state.
3374 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3375 linux-aarch32-low.c.
3376 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3377 (arm_breakpoint, arm_breakpoint_len): Likewise.
3378 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3379 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3380 (arm_is_thumb_mode): Likewise.
3381 (arm_breakpoint_at): Likewise.
3382 (arm_breakpoint_kind_from_pc): Likewise.
3383 (arm_sw_breakpoint_from_kind): Likewise.
3384 (arm_breakpoint_kind_from_current_state): Likewise.
3385
3386 Revert:
3387 2015-08-04 Yao Qi <yao.qi@linaro.org>
3388
3389 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3390 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3391 * server.c (extended_protocol): Remove "static".
3392 * server.h (extended_protocol): Declare it.
3393
3394 2015-12-04 Josh Stone <jistone@redhat.com>
3395
3396 * target.h (struct target_ops) <arch_setup>: Rename to ...
3397 (struct target_ops) <post_create_inferior>: ... this.
3398 (target_arch_setup): Rename to ...
3399 (target_post_create_inferior): ... this, calling post_create_inferior.
3400 * server.c (start_inferior): Update target_arch_setup calls to
3401 target_post_create_inferior.
3402 * linux-low.c (linux_low_ptrace_options): Forward declare.
3403 (linux_arch_setup): Update its comment for general use.
3404 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3405 (struct linux_target_ops): Use linux_post_create_inferior.
3406 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3407 to post_create_inferior.
3408 * nto-low.c (struct nto_target_ops): Likewise.
3409 * spu-low.c (struct spu_target_ops): Likewise.
3410 * win32-low.c (struct win32_target_ops): Likewise.
3411
3412 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3413
3414 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3415
3416 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3417
3418 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3419 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3420 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3421 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3422 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3423 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3424 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3425 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3426 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3427 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3428 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3429 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3430
3431 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3432
3433 * linux-low.c (linux_look_up_symbols): Don't call
3434 linux_supports_traceclone.
3435 * linux-low.h (thread_db_init): Remove use_events argument.
3436 * thread-db.c (thread_db_use_event): Remove global variable.
3437 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3438 (struct thread_db) <td_create_bp>: Remove field.
3439 (thread_db_create_event): Remove function.
3440 (thread_db_enable_reporting): Likewise.
3441 (find_one_thread): Don't check for thread_db_use_events.
3442 (attach_thread): Likewise.
3443 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3444 (try_thread_db_load_1): Don't check for thread_db_use_events.
3445 (thread_db_init): Remove use_events argument and thread events
3446 handling.
3447 (remove_thread_event_breakpoints): Remove function.
3448 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3449
3450 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3453 New function.
3454 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3455 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3456 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3457 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3458 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3459 Initialize.
3460 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3461 New function.
3462 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3463 * linux-low.c (can_hardware_single_step): Use
3464 supports_hardware_single_step.
3465 (can_software_single_step): New function.
3466 (start_step_over): Call can_software_single_step.
3467 (linux_supports_hardware_single_step): New function.
3468 (struct target_ops) <supports_software_single_step>: Initialize.
3469 * linux-low.h (struct linux_target_ops)
3470 <supports_hardware_single_step>: Initialize.
3471 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3472 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3473 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3474 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3475 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3476 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3477 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3478 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3479 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3480 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3481 Initialize.
3482 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3483 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3484 Initialize.
3485 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3486 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3487 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3488 New function.
3489 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3490 * target.h (struct target_ops): <supports_software_single_step>:
3491 New field.
3492 (target_supports_software_single_step): New macro.
3493
3494 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3495
3496 * linux-low.c (linux_wait_1): Fix pc advance condition.
3497 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3498 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3499
3500 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3501
3502 * linux-arm-low.c (arm_is_thumb_mode): New function.
3503 (arm_breakpoint_at): Use arm_is_thumb_mode.
3504 (arm_breakpoint_kind_from_current_state): New function.
3505 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3506 Initialize.
3507 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3508 (linux_breakpoint_kind_from_current_state): New function.
3509 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3510 * linux-low.h (struct linux_target_ops)
3511 <breakpoint_kind_from_current_state>: New field.
3512 * target.h (struct target_ops): Likewise.
3513 (target_breakpoint_kind_from_current_state): New macro.
3514
3515 2015-11-30 Pedro Alves <palves@redhat.com>
3516
3517 * linux-low.c (linux_resume): Wake up the event loop before
3518 returning.
3519
3520 2015-11-30 Pedro Alves <palves@redhat.com>
3521
3522 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3523 check.
3524 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3525 to -1.
3526 * target.c (struct thread_search): New structure.
3527 (thread_search_callback): New function.
3528 (prev_general_thread): New global.
3529 (prepare_to_access_memory, done_accessing_memory): New functions.
3530 * target.h (prepare_to_access_memory, done_accessing_memory):
3531 Replace macros with function declarations.
3532
3533 2015-11-30 Pedro Alves <palves@redhat.com>
3534
3535 PR 14618
3536 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3537 report TARGET_WAITKIND_NO_RESUMED.
3538 * remote-utils.c (prepare_resume_reply): Handle
3539 TARGET_WAITKIND_NO_RESUMED.
3540 * server.c (report_no_resumed): New global.
3541 (handle_query) <qSupported>: Handle "no-resumed+". Report
3542 "no-resumed+" support.
3543 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3544 return error if the client doesn't support no-resumed events.
3545 (push_stop_notification): New function.
3546 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3547 events if the client supports them.
3548
3549 2015-11-30 Pedro Alves <palves@redhat.com>
3550
3551 * linux-low.c (thread_still_has_status_pending_p): Don't check
3552 vCont;t here.
3553 (lwp_resumed): New function.
3554 (status_pending_p_callback): Return early if the LWP is not
3555 supposed to be resumed.
3556
3557 2015-11-30 Pedro Alves <palves@redhat.com>
3558
3559 * linux-low.c (handle_extended_wait): Assert that the LWP's
3560 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3561 thread create events, leave the new child's status pending.
3562 (linux_low_filter_event): If GDB wants to hear about thread exit
3563 events, leave the LWP marked dead and don't delete it.
3564 (linux_wait_for_event_filtered): Don't check for thread exit.
3565 (filter_exit_event): New function.
3566 (linux_wait_1): Use it, when returning an exit event.
3567 (linux_resume_one_lwp_throw): Assert that the LWP's
3568 waitstatus is TARGET_WAITKIND_IGNORE.
3569 * remote-utils.c (prepare_resume_reply): Handle
3570 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3571 * server.c (report_thread_events): New global.
3572 (handle_general_set): Handle QThreadEvents.
3573 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3574 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3575 TARGET_WAITKIND_THREAD_EXITED.
3576 * server.h (report_thread_events): Declare.
3577
3578 2015-11-30 Pedro Alves <palves@redhat.com>
3579
3580 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3581 the thread's last_resume_kind was resume_stop.
3582
3583 2015-11-30 Pedro Alves <palves@redhat.com>
3584
3585 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3586 before returning.
3587
3588 2015-11-30 Pedro Alves <palves@redhat.com>
3589
3590 * server.c (handle_v_requests): Handle vCtrlC.
3591
3592 2015-11-30 Pedro Alves <palves@redhat.com>
3593
3594 * gdbthread.h (find_any_thread_of_pid): Declare.
3595 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3596 functions.
3597 * server.c (handle_query): If current_thread is NULL, look for
3598 another thread of the selected process.
3599
3600 2015-11-26 Daniel Colascione <dancol@dancol.org>
3601 Simon Marchi <simon.marchi@ericsson.com>
3602
3603 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3604 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3605 name in reply.
3606 * target.h (struct target_ops) <thread_name>: New field.
3607 (target_thread_name): New macro.
3608
3609 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3610
3611 * regcache.h (regcache_invalidate_pid): Add declaration.
3612 * regcache.c (regcache_invalidate_pid): New function, extracted
3613 from regcache_invalidate.
3614 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3615 Add trivial documentation comment.
3616 * lynx-low.c: Use regcache_invalidate_pid instead of
3617 regcache_invalidate.
3618
3619 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3620
3621 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3622 and Elf64_auxv_t if the target is Android.
3623
3624 2015-11-22 Doug Evans <xdje42@gmail.com>
3625
3626 * target.h: #include <sys/types.h>.
3627
3628 2015-11-19 Pedro Alves <palves@redhat.com>
3629
3630 * linux-low.c (linux_process_qsupported): Change prototype.
3631 Adjust.
3632 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3633 Change prototype.
3634 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3635 and adjust to loop over all features.
3636 * server.c (handle_query) <qSupported>: Adjust to call
3637 target_process_qsupported once, passing it a vector of unprocessed
3638 features.
3639 * target.h (struct target_ops) <process_qsupported>: Change
3640 prototype.
3641 (target_process_qsupported): Adjust.
3642
3643 2015-11-19 Pedro Alves <palves@redhat.com>
3644
3645 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3646 mode.
3647 * configure: Regenerate.
3648
3649 2015-11-19 Pedro Alves <palves@redhat.com>
3650
3651 * configure: Regenerate.
3652
3653 2015-11-19 Yao Qi <yao.qi@linaro.org>
3654
3655 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3656 type to uint32_t.
3657
3658 2015-11-19 Yao Qi <yao.qi@linaro.org>
3659
3660 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3661 (struct aarch64_operand): Move enum out.
3662
3663 2015-11-19 Yao Qi <yao.qi@linaro.org>
3664
3665 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3666 struct user_fpsimd_state *.
3667 (aarch64_store_fpregset): Likewise.
3668
3669 2015-11-19 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3672 struct user_pt_regs *.
3673 (aarch64_store_gregset): Likewise.
3674
3675 2015-11-18 Pedro Alves <palves@redhat.com>
3676
3677 * Makefile.in (all_object_files): Add $IPA_OBJS.
3678
3679 2015-11-17 Pedro Alves <palves@redhat.com>
3680
3681 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3682 GDB_SIGNAL_0 and gdb_signal_to_string.
3683
3684 2015-11-17 Pedro Alves <palves@redhat.com>
3685
3686 * win32-low.c (handle_output_debug_string): Remove parameter.
3687 (win32_kill): Remove our_status local and adjust call to
3688 handle_output_debug_string.
3689 (get_child_debug_event): Adjust call to
3690 handle_output_debug_string.
3691
3692 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3693
3694 * linux-mips-low.c (mips_fill_gregset): Add cast.
3695 (mips_store_gregset): Likewise.
3696 (mips_fill_fpregset): Likewise.
3697 (mips_store_fpregset): Likewise.
3698
3699 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3700
3701 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3702 priv.
3703
3704 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3705
3706 * linux-mips-low.c (mips_linux_new_thread): Change type of
3707 watch_type to enum target_hw_bp_type.
3708
3709 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3710
3711 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3712 Change return type to arm_hwbp_type.
3713
3714 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3715
3716 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3717 (arm_store_gregset): Likewise.
3718 * linux-arm-low.c (arm_get_hwcap): Likewise.
3719 (arm_read_description): Likewise.
3720
3721 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3722
3723 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3724
3725 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3726
3727 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3728 (ppc_fill_vsxregset): Likewise.
3729 (ppc_store_vsxregset): Likewise.
3730 (ppc_fill_vrregset): Likewise.
3731 (ppc_store_vrregset): Likewise.
3732 (ppc_fill_evrregset): Likewise.
3733 (ppc_store_evrregset): Likewise.
3734
3735 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3736
3737 * linux-ppc-low.c (ppc_usrregs_info): Remove
3738 forward-declaration.
3739 (ppc_arch_setup): Move lower in file.
3740
3741 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3742
3743 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3744 (ps_pdwrite): Likewise.
3745
3746 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3747
3748 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3749 to after assert checks.
3750
3751 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3752
3753 * proc-service.c (ps_pdread): Add/adjust casts.
3754 (ps_pdwrite): Add/adjust casts.
3755
3756 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3757
3758 * server.c (handle_search_memory_1): Cast return value of
3759 memmem.
3760
3761 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3762
3763 * server.c (write_qxfer_response): Change type of data to
3764 gdb_byte *.
3765
3766 2015-10-29 Pedro Alves <palves@redhat.com>
3767
3768 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3769
3770 2015-10-29 Pedro Alves <palves@redhat.com>
3771
3772 * tracepoint.c (clear_installed_tracepoints): Add casts.
3773
3774 2015-10-29 Pedro Alves <palves@redhat.com>
3775
3776 * server.c (handle_v_cont, process_serial_event): Add enum
3777 gdb_signal casts to signal parsing code.
3778
3779 2015-10-29 Pedro Alves <palves@redhat.com>
3780
3781 * linux-low.h (NULL_REGSET): Define.
3782 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3783 * linux-arm-low.c (arm_regsets): Likewise.
3784 * linux-crisv32-low.c (cris_regsets): Likewise.
3785 * linux-m68k-low.c (m68k_regsets): Likewise.
3786 * linux-mips-low.c (mips_regsets): Likewise.
3787 * linux-nios2-low.c (nios2_regsets): Likewise.
3788 * linux-ppc-low.c (ppc_regsets): Likewise.
3789 * linux-s390-low.c (s390_regsets): Likewise.
3790 * linux-sh-low.c (sh_regsets): Likewise.
3791 * linux-sparc-low.c (sparc_regsets): Likewise.
3792 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3793 * linux-tile-low.c (tile_regsets): Likewise.
3794 * linux-x86-low.c (x86_regsets): Likewise.
3795 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3796
3797 2015-10-29 Pedro Alves <palves@redhat.com>
3798
3799 * linux-low.h (NULL_REGSET): Define.
3800 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3801 * linux-arm-low.c (arm_regsets): Likewise.
3802 * linux-crisv32-low.c (cris_regsets): Likewise.
3803 * linux-m68k-low.c (m68k_regsets): Likewise.
3804 * linux-mips-low.c (mips_regsets): Likewise.
3805 * linux-nios2-low.c (nios2_regsets): Likewise.
3806 * linux-ppc-low.c (ppc_regsets): Likewise.
3807 * linux-s390-low.c (s390_regsets): Likewise.
3808 * linux-sh-low.c (sh_regsets): Likewise.
3809 * linux-sparc-low.c (sparc_regsets): Likewise.
3810 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3811 * linux-tile-low.c (tile_regsets): Likewise.
3812 * linux-x86-low.c (x86_regsets): Likewise.
3813 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3814
3815 2015-10-26 Doug Evans <dje@google.com>
3816
3817 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3818
3819 2015-10-26 Doug Evans <dje@google.com>
3820
3821 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3822
3823 2015-10-26 Doug Evans <dje@google.com>
3824
3825 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3826 for debug_printf.
3827 (attach_thread, find_new_threads_callback): Ditto.
3828
3829 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3830
3831 * mem-break.h (set_breakpoint_data): Remove.
3832
3833 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3834
3835 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3836 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3837 (initialize_low): Remove set_breakpoint_data call.
3838 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3839 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3840 (initialize_low): Remove set_breakpoint_data call.
3841 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3842 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3843 (initialize_low): Remove set_breakpoint_data call.
3844
3845 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3846
3847 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3848 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3849 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3850 * target.h (target_breakpoint_kind_from_pc): New macro.
3851
3852 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3853
3854 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3855 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3856 the default breakpoint kind.
3857
3858 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3859
3860 * linux-arm-low.c (arm_supports_z_point_type): Add software
3861 breakpoint support.
3862
3863 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3864
3865 * linux-arm-low.c: Refactor breakpoint definitions.
3866 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3867 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3868
3869 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3870
3871 * Makefile.in: Add arm.c/o.
3872 * configure.srv: Likewise.
3873 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3874 (arm_breakpoint_kind_from_pc): New function.
3875 (arm_sw_breakpoint_from_kind): Return proper kind.
3876 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3877
3878 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3879
3880 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3881 removal.
3882 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3883 (struct raw_breakpoint) <size>: Remove.
3884 (struct raw_breakpoint) <kind>: Add.
3885 (bp_size): New function.
3886 (bp_opcode): Likewise.
3887 (find_raw_breakpoint_at): Adjust for kind.
3888 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3889 (remove_memory_breakpoint): Adjust for kind call bp_size.
3890 (set_raw_breakpoint_at): Adjust for kind.
3891 (set_breakpoint): Likewise.
3892 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3893 (delete_raw_breakpoint): Adjust for kind.
3894 (delete_breakpoint): Likewise.
3895 (find_gdb_breakpoint): Likewise.
3896 (set_gdb_breakpoint_1): Likewise.
3897 (set_gdb_breakpoint): Likewise.
3898 (delete_gdb_breakpoint_1): Likewise.
3899 (delete_gdb_breakpoint): Likewise.
3900 (uninsert_raw_breakpoint): Likewise.
3901 (reinsert_raw_breakpoint): Likewise.
3902 (set_breakpoint_data): Remove.
3903 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3904 (check_mem_read): Adjust for kind call bp_size.
3905 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3906 (clone_one_breakpoint): Adjust for kind.
3907 * mem-break.h (set_gdb_breakpoint): Likewise.
3908 (delete_gdb_breakpoint): Likewise.
3909 * server.c (process_serial_event): Likewise.
3910
3911 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3912
3913 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3914 (struct linux_target_ops) <breakpoint>: Remove.
3915 (struct linux_target_ops) <breakpoint_len>: Remove.
3916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3918 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3919 (arm_sw_breakpoint_from_kind): New function.
3920 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3921 (struct linux_target_ops) <breakpoint>: Remove.
3922 (struct linux_target_ops) <breakpoint_len>: Remove.
3923 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3925 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3926 (struct linux_target_ops) <breakpoint>: Remove.
3927 (struct linux_target_ops) <breakpoint_len>: Remove.
3928 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3929 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3930 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3931 (struct linux_target_ops) <breakpoint>: Remove.
3932 (struct linux_target_ops) <breakpoint_len>: Remove.
3933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3935 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3936 and sw_breakpoint_from_kind to increment the pc.
3937 (linux_breakpoint_kind_from_pc): New function.
3938 (linux_sw_breakpoint_from_kind): New function.
3939 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3940 (initialize_low): Call breakpoint_kind_from_pc and
3941 sw_breakpoint_from_kind to replace breakpoint_data/len.
3942 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3943 New field.
3944 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3945 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3946 (struct linux_target_ops) <breakpoint>: Remove.
3947 (struct linux_target_ops) <breakpoint_len>: Remove.
3948 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3949 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3950 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3951 (struct linux_target_ops) <breakpoint>: Remove.
3952 (struct linux_target_ops) <breakpoint_len>: Remove.
3953 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3954 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3955 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3956 (struct linux_target_ops) <breakpoint>: Remove.
3957 (struct linux_target_ops) <breakpoint_len>: Remove.
3958 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3959 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3960 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3961 (struct linux_target_ops) <breakpoint>: Remove.
3962 (struct linux_target_ops) <breakpoint_len>: Remove.
3963 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3964 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3965 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3966 (struct linux_target_ops) <breakpoint>: Remove.
3967 (struct linux_target_ops) <breakpoint_len>: Remove.
3968 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3969 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3970 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3971 (struct linux_target_ops) <breakpoint>: Remove.
3972 (struct linux_target_ops) <breakpoint_len>: Remove.
3973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3975 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3976 (struct linux_target_ops) <breakpoint>: Remove.
3977 (struct linux_target_ops) <breakpoint_len>: Remove.
3978 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3979 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3980 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3981 (struct linux_target_ops) <breakpoint>: Remove.
3982 (struct linux_target_ops) <breakpoint_len>: Remove.
3983 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3984 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3985 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3986 (struct linux_target_ops) <breakpoint>: Remove.
3987 (struct linux_target_ops) <breakpoint_len>: Remove.
3988 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3989 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3990 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3991 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3992 (struct linux_target_ops) <breakpoint>: Remove.
3993 (struct linux_target_ops) <breakpoint_len>: Remove.
3994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3995 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3996 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3997 (struct linux_target_ops) <breakpoint>: Remove.
3998 (struct linux_target_ops) <breakpoint_len>: Remove.
3999 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4000 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4001
4002 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4003
4004 * linux-cris-low.c (cris_get_pc): Remove void arg.
4005
4006 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4007
4008 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4009 variable name.
4010
4011 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4012
4013 * inferiors.c (thread_pid_matches_callback): New function.
4014 (find_thread_process): New function.
4015 (remove_thread): Reset current_thread.
4016 (remove_process): Assert threads have been removed first.
4017
4018 2015-10-15 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4021 if it is 3.
4022 (aarch64_remove_point): Likewise.
4023 * regcache.c (regcache_register_size): New function.
4024
4025 2015-10-12 Yao Qi <yao.qi@linaro.org>
4026
4027 * linux-aarch64-low.c: Update all callers as emit_load_store
4028 is renamed to aarch64_emit_load_store.
4029
4030 2015-10-12 Yao Qi <yao.qi@linaro.org>
4031
4032 * linux-aarch64-low.c: Update all callers of function renaming
4033 from emit_insn to aarch64_emit_insn.
4034
4035 2015-10-12 Yao Qi <yao.qi@linaro.org>
4036
4037 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4038 arch/aarch64-insn.h.
4039 (struct aarch64_memory_operand): Likewise.
4040 (ENCODE): Likewise.
4041 (emit_insn): Move to arch/aarch64-insn.c.
4042 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4043 (emit_load_store): Move to arch/aarch64-insn.c.
4044 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4045 (can_encode_int32): Remove.
4046
4047 2015-10-12 Yao Qi <yao.qi@linaro.org>
4048
4049 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4050 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4051 (aarch64_relocate_instruction): Likewise.
4052 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4053 (struct aarch64_insn_visitor): Likewise.
4054
4055 2015-10-12 Yao Qi <yao.qi@linaro.org>
4056
4057 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4058 (struct aarch64_insn_visitor): New.
4059 (struct aarch64_insn_relocation_data): New.
4060 (aarch64_ftrace_insn_reloc_b): New function.
4061 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4062 (aarch64_ftrace_insn_reloc_cb): Likewise.
4063 (aarch64_ftrace_insn_reloc_tb): Likewise.
4064 (aarch64_ftrace_insn_reloc_adr): Likewise.
4065 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4066 (aarch64_ftrace_insn_reloc_others): Likewise.
4067 (visitor): New.
4068 (aarch64_relocate_instruction): Use visitor.
4069
4070 2015-10-12 Yao Qi <yao.qi@linaro.org>
4071
4072 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4073 int. Add argument buf.
4074 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4075 aarch64_relocate_instruction.
4076
4077 2015-10-12 Yao Qi <yao.qi@linaro.org>
4078
4079 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4080 argument insn. Remove local variable insn. Don't call
4081 target_read_uint32.
4082 (aarch64_install_fast_tracepoint_jump_pad): Call
4083 target_read_uint32.
4084
4085 2015-09-30 Yao Qi <yao.qi@linaro.org>
4086
4087 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4088 (emit_load_store_pair): Likewise.
4089
4090 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4091
4092 * dll.c (match_dll): Add cast(s).
4093 (unloaded_dll): Likewise.
4094 * linux-low.c (second_thread_of_pid_p): Likewise.
4095 (delete_lwp_callback): Likewise.
4096 (count_events_callback): Likewise.
4097 (select_event_lwp_callback): Likewise.
4098 (linux_set_resume_request): Likewise.
4099 * server.c (accumulate_file_name_length): Likewise.
4100 (emit_dll_description): Likewise.
4101 (handle_qxfer_threads_worker): Likewise.
4102 (visit_actioned_threads): Likewise.
4103 * thread-db.c (any_thread_of): Likewise.
4104 * tracepoint.c (same_process_p): Likewise.
4105 (match_blocktype): Likewise.
4106 (build_traceframe_info_xml): Likewise.
4107
4108 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4109
4110 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4111 assignment.
4112 (gdb_unparse_agent_expr): Likewise.
4113 * hostio.c (require_data): Likewise.
4114 (handle_pread): Likewise.
4115 * linux-low.c (disable_regset): Likewise.
4116 (fetch_register): Likewise.
4117 (store_register): Likewise.
4118 (get_dynamic): Likewise.
4119 (linux_qxfer_libraries_svr4): Likewise.
4120 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4121 (set_fast_tracepoint_jump): Likewise.
4122 (uninsert_fast_tracepoint_jumps_at): Likewise.
4123 (reinsert_fast_tracepoint_jumps_at): Likewise.
4124 (validate_inserted_breakpoint): Likewise.
4125 (clone_agent_expr): Likewise.
4126 * regcache.c (init_register_cache): Likewise.
4127 * remote-utils.c (putpkt_binary_1): Likewise.
4128 (decode_M_packet): Likewise.
4129 (decode_X_packet): Likewise.
4130 (look_up_one_symbol): Likewise.
4131 (relocate_instruction): Likewise.
4132 (monitor_output): Likewise.
4133 * server.c (handle_search_memory): Likewise.
4134 (handle_qxfer_exec_file): Likewise.
4135 (handle_qxfer_libraries): Likewise.
4136 (handle_qxfer): Likewise.
4137 (handle_query): Likewise.
4138 (handle_v_cont): Likewise.
4139 (handle_v_run): Likewise.
4140 (captured_main): Likewise.
4141 * target.c (write_inferior_memory): Likewise.
4142 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4143 * tracepoint.c (init_trace_buffer): Likewise.
4144 (add_tracepoint_action): Likewise.
4145 (add_traceframe): Likewise.
4146 (add_traceframe_block): Likewise.
4147 (cmd_qtdpsrc): Likewise.
4148 (cmd_qtdv): Likewise.
4149 (cmd_qtstatus): Likewise.
4150 (response_source): Likewise.
4151 (response_tsv): Likewise.
4152 (cmd_qtnotes): Likewise.
4153 (gdb_collect): Likewise.
4154 (initialize_tracepoint): Likewise.
4155
4156 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4157
4158 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4159 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4160 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4161 <NOP>: New.
4162 (enum aarch64_condition_codes): New enum.
4163 (w0): New static global.
4164 (fp): Likewise.
4165 (lr): Likewise.
4166 (struct aarch64_memory_operand) <type>: New
4167 MEMORY_OPERAND_POSTINDEX type.
4168 (postindex_memory_operand): New helper function.
4169 (emit_ret): New function.
4170 (emit_load_store_pair): New function, factored out of emit_stp
4171 with support for MEMORY_OPERAND_POSTINDEX.
4172 (emit_stp): Rewrite using emit_load_store_pair.
4173 (emit_ldp): New function.
4174 (emit_load_store): Likewise.
4175 (emit_ldr): Mention post-index instruction in comment.
4176 (emit_ldrh): New function.
4177 (emit_ldrb): New function.
4178 (emit_ldrsw): Mention post-index instruction in comment.
4179 (emit_str): Likewise.
4180 (emit_subs): New function.
4181 (emit_cmp): Likewise.
4182 (emit_and): Likewise.
4183 (emit_orr): Likewise.
4184 (emit_orn): Likewise.
4185 (emit_eor): Likewise.
4186 (emit_mvn): Likewise.
4187 (emit_lslv): Likewise.
4188 (emit_lsrv): Likewise.
4189 (emit_asrv): Likewise.
4190 (emit_mul): Likewise.
4191 (emit_sbfm): Likewise.
4192 (emit_sbfx): Likewise.
4193 (emit_ubfm): Likewise.
4194 (emit_ubfx): Likewise.
4195 (emit_csinc): Likewise.
4196 (emit_cset): Likewise.
4197 (emit_nop): Likewise.
4198 (emit_ops_insns): New helper function.
4199 (emit_pop): Likewise.
4200 (emit_push): Likewise.
4201 (aarch64_emit_prologue): New function.
4202 (aarch64_emit_epilogue): Likewise.
4203 (aarch64_emit_add): Likewise.
4204 (aarch64_emit_sub): Likewise.
4205 (aarch64_emit_mul): Likewise.
4206 (aarch64_emit_lsh): Likewise.
4207 (aarch64_emit_rsh_signed): Likewise.
4208 (aarch64_emit_rsh_unsigned): Likewise.
4209 (aarch64_emit_ext): Likewise.
4210 (aarch64_emit_log_not): Likewise.
4211 (aarch64_emit_bit_and): Likewise.
4212 (aarch64_emit_bit_or): Likewise.
4213 (aarch64_emit_bit_xor): Likewise.
4214 (aarch64_emit_bit_not): Likewise.
4215 (aarch64_emit_equal): Likewise.
4216 (aarch64_emit_less_signed): Likewise.
4217 (aarch64_emit_less_unsigned): Likewise.
4218 (aarch64_emit_ref): Likewise.
4219 (aarch64_emit_if_goto): Likewise.
4220 (aarch64_emit_goto): Likewise.
4221 (aarch64_write_goto_address): Likewise.
4222 (aarch64_emit_const): Likewise.
4223 (aarch64_emit_call): Likewise.
4224 (aarch64_emit_reg): Likewise.
4225 (aarch64_emit_pop): Likewise.
4226 (aarch64_emit_stack_flush): Likewise.
4227 (aarch64_emit_zero_ext): Likewise.
4228 (aarch64_emit_swap): Likewise.
4229 (aarch64_emit_stack_adjust): Likewise.
4230 (aarch64_emit_int_call_1): Likewise.
4231 (aarch64_emit_void_call_2): Likewise.
4232 (aarch64_emit_eq_goto): Likewise.
4233 (aarch64_emit_ne_goto): Likewise.
4234 (aarch64_emit_lt_goto): Likewise.
4235 (aarch64_emit_le_goto): Likewise.
4236 (aarch64_emit_gt_goto): Likewise.
4237 (aarch64_emit_ge_got): Likewise.
4238 (aarch64_emit_ops_impl): New static global variable.
4239 (aarch64_emit_ops): New target function, return
4240 &aarch64_emit_ops_impl.
4241 (struct linux_target_ops): Install it.
4242
4243 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4244
4245 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4246 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4247 aarch64-ipa.o.
4248 * linux-aarch64-ipa.c: New file.
4249 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4250 and endian.h.
4251 (aarch64_get_thread_area): New target method.
4252 (extract_signed_bitfield): New helper function.
4253 (aarch64_decode_ldr_literal): New function.
4254 (enum aarch64_opcodes): New enum.
4255 (struct aarch64_register): New struct.
4256 (struct aarch64_operand): New struct.
4257 (x0): New static global.
4258 (x1): Likewise.
4259 (x2): Likewise.
4260 (x3): Likewise.
4261 (x4): Likewise.
4262 (w2): Likewise.
4263 (ip0): Likewise.
4264 (sp): Likewise.
4265 (xzr): Likewise.
4266 (aarch64_register): New helper function.
4267 (register_operand): Likewise.
4268 (immediate_operand): Likewise.
4269 (struct aarch64_memory_operand): New struct.
4270 (offset_memory_operand): New helper function.
4271 (preindex_memory_operand): Likewise.
4272 (enum aarch64_system_control_registers): New enum.
4273 (ENCODE): New macro.
4274 (emit_insn): New helper function.
4275 (emit_b): New function.
4276 (emit_bcond): Likewise.
4277 (emit_cb): Likewise.
4278 (emit_tb): Likewise.
4279 (emit_blr): Likewise.
4280 (emit_stp): Likewise.
4281 (emit_ldp_q_offset): Likewise.
4282 (emit_stp_q_offset): Likewise.
4283 (emit_load_store): Likewise.
4284 (emit_ldr): Likewise.
4285 (emit_ldrsw): Likewise.
4286 (emit_str): Likewise.
4287 (emit_ldaxr): Likewise.
4288 (emit_stxr): Likewise.
4289 (emit_stlr): Likewise.
4290 (emit_data_processing_reg): Likewise.
4291 (emit_data_processing): Likewise.
4292 (emit_add): Likewise.
4293 (emit_sub): Likewise.
4294 (emit_mov): Likewise.
4295 (emit_movk): Likewise.
4296 (emit_mov_addr): Likewise.
4297 (emit_mrs): Likewise.
4298 (emit_msr): Likewise.
4299 (emit_sevl): Likewise.
4300 (emit_wfe): Likewise.
4301 (append_insns): Likewise.
4302 (can_encode_int32_in): New helper function.
4303 (aarch64_relocate_instruction): New function.
4304 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4305 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4306 (struct linux_target_ops): Install aarch64_get_thread_area,
4307 aarch64_install_fast_tracepoint_jump_pad and
4308 aarch64_get_min_fast_tracepoint_insn_len.
4309
4310 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4311
4312 * Makefile.in (aarch64-insn.o): New rule.
4313 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4314
4315 2015-09-21 Yao Qi <yao.qi@linaro.org>
4316
4317 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4318
4319 2015-09-21 Yao Qi <yao.qi@linaro.org>
4320
4321 * tracepoint.c (max_jump_pad_size): Remove.
4322
4323 2015-09-18 Yao Qi <yao.qi@linaro.org>
4324
4325 * linux-aarch64-low.c: Don't include sys/uio.h.
4326 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4327
4328 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4329
4330 * tracepoint.c (eval_result_type): Change prototype.
4331 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4332
4333 2015-09-15 Pedro Alves <palves@redhat.com>
4334
4335 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4336 Check whether to report exec events instead of checking whether
4337 multiprocess is enabled.
4338
4339 2015-09-15 Pedro Alves <palves@redhat.com>
4340
4341 PR remote/18965
4342 * remote-utils.c (prepare_resume_reply): Merge
4343 TARGET_WAITKIND_VFORK_DONE switch case with the
4344 TARGET_WAITKIND_FORKED case.
4345
4346 2015-09-15 Yao Qi <yao.qi@linaro.org>
4347
4348 * server.c (handle_query): Check string comparison using
4349 "else if" instead of "if".
4350
4351 2015-09-15 Yao Qi <yao.qi@linaro.org>
4352
4353 * server.c (vCont_supported): New global variable.
4354 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4355 matches. Append ";vContSupported+" to own_buf.
4356 (handle_v_requests): Append ";s;S" to own_buf if target supports
4357 hardware single step or vCont_supported is false.
4358 (capture_main): Set vCont_supported to zero.
4359
4360 2015-09-15 Yao Qi <yao.qi@linaro.org>
4361
4362 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4363 it to ...
4364 (linux_supports_hardware_single_step): ... New function.
4365 (linux_target_ops): Update.
4366 * lynx-low.c (lynx_target_ops): Set field
4367 supports_hardware_single_step to target_can_do_hardware_single_step.
4368 * nto-low.c (nto_target_ops): Likewise.
4369 * spu-low.c (spu_target_ops): Likewise.
4370 * win32-low.c (win32_target_ops): Likewise.
4371 * target.c (target_can_do_hardware_single_step): New function.
4372 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4373 Remove. <supports_hardware_single_step>: New field.
4374 (target_supports_conditional_breakpoints): Remove.
4375 (target_supports_hardware_single_step): New macro.
4376 (target_can_do_hardware_single_step): Declare.
4377 * server.c (handle_query): Use target_supports_hardware_single_step
4378 instead of target_supports_conditional_breakpoints.
4379
4380 2015-09-15 Yao Qi <yao.qi@linaro.org>
4381
4382 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4383 function.
4384 (struct linux_target_ops the_low_target): Install
4385 aarch64_linux_siginfo_fixup.
4386
4387 2015-09-11 Don Breazeal <donb@codesourcery.com>
4388 Luis Machado <lgustavo@codesourcery.com>
4389
4390 * linux-low.c (linux_mourn): Static declaration.
4391 (linux_arch_setup): Move in front of
4392 handle_extended_wait.
4393 (linux_arch_setup_thread): New function.
4394 (handle_extended_wait): Handle exec events. Call
4395 linux_arch_setup_thread. Make event_lwp argument a
4396 pointer-to-a-pointer.
4397 (check_zombie_leaders): Do not check stopped threads.
4398 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4399 (linux_low_filter_event): Add lwp and thread for exec'ing
4400 non-leader thread if leader thread has been deleted.
4401 Refactor code into linux_arch_setup_thread and call it.
4402 Pass child lwp pointer by reference to handle_extended_wait.
4403 (linux_wait_for_event_filtered): Update comment.
4404 (linux_wait_1): Prevent clobbering exec event status.
4405 (linux_supports_exec_events): New function.
4406 (linux_target_ops) <supports_exec_events>: Initialize new member.
4407 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4408 new member.
4409 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4410 * server.c (report_exec_events): New global variable.
4411 (handle_query): Handle qSupported query for exec-events feature.
4412 (captured_main): Initialize report_exec_events.
4413 * server.h (report_exec_events): Declare new global variable.
4414 * target.h (struct target_ops) <supports_exec_events>: New
4415 member.
4416 (target_supports_exec_events): New macro.
4417 * win32-low.c (win32_target_ops) <supports_exec_events>:
4418 Initialize new member.
4419
4420 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4421
4422 * linux-low.c (linux_low_enable_btrace): Remove.
4423 (linux_target_ops): Replace linux_low_enable_btrace with
4424 linux_enable_btrace.
4425
4426 2015-09-03 Yao Qi <yao.qi@linaro.org>
4427
4428 * linux-aarch64-low.c (aarch64_insert_point): Call
4429 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4430 returns true.
4431
4432 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4433
4434 * linux-low.c (check_stopped_by_breakpoint): Use
4435 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4436
4437 2015-08-27 Pedro Alves <palves@redhat.com>
4438
4439 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4440
4441 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4442
4443 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4444 the XNEW-family equivalent.
4445 (compile_bytecodes): Likewise.
4446 * dll.c (loaded_dll): Likewise.
4447 * event-loop.c (append_callback_event): Likewise.
4448 (create_file_handler): Likewise.
4449 (create_file_event): Likewise.
4450 * hostio.c (handle_open): Likewise.
4451 * inferiors.c (add_thread): Likewise.
4452 (add_process): Likewise.
4453 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4454 * linux-arm-low.c (arm_new_process): Likewise.
4455 (arm_new_thread): Likewise.
4456 * linux-low.c (add_to_pid_list): Likewise.
4457 (linux_add_process): Likewise.
4458 (handle_extended_wait): Likewise.
4459 (add_lwp): Likewise.
4460 (enqueue_one_deferred_signal): Likewise.
4461 (enqueue_pending_signal): Likewise.
4462 (linux_resume_one_lwp_throw): Likewise.
4463 (linux_resume_one_thread): Likewise.
4464 (linux_read_memory): Likewise.
4465 (linux_write_memory): Likewise.
4466 * linux-mips-low.c (mips_linux_new_process): Likewise.
4467 (mips_linux_new_thread): Likewise.
4468 (mips_add_watchpoint): Likewise.
4469 * linux-x86-low.c (initialize_low_arch): Likewise.
4470 * lynx-low.c (lynx_add_process): Likewise.
4471 * mem-break.c (set_raw_breakpoint_at): Likewise.
4472 (set_breakpoint): Likewise.
4473 (add_condition_to_breakpoint): Likewise.
4474 (add_commands_to_breakpoint): Likewise.
4475 (clone_agent_expr): Likewise.
4476 (clone_one_breakpoint): Likewise.
4477 * regcache.c (new_register_cache): Likewise.
4478 * remote-utils.c (look_up_one_symbol): Likewise.
4479 * server.c (queue_stop_reply): Likewise.
4480 (start_inferior): Likewise.
4481 (queue_stop_reply_callback): Likewise.
4482 (handle_target_event): Likewise.
4483 * spu-low.c (fetch_ppc_memory): Likewise.
4484 (store_ppc_memory): Likewise.
4485 * target.c (set_target_ops): Likewise.
4486 * thread-db.c (thread_db_load_search): Likewise.
4487 (try_thread_db_load_1): Likewise.
4488 * tracepoint.c (add_tracepoint): Likewise.
4489 (add_tracepoint_action): Likewise.
4490 (create_trace_state_variable): Likewise.
4491 (cmd_qtdpsrc): Likewise.
4492 (cmd_qtro): Likewise.
4493 (add_while_stepping_state): Likewise.
4494 * win32-low.c (child_add_thread): Likewise.
4495 (get_image_name): Likewise.
4496
4497 2015-08-25 Yao Qi <yao.qi@linaro.org>
4498
4499 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4500
4501 2015-08-25 Yao Qi <yao.qi@linaro.org>
4502
4503 * Makefile.in (aarch64-linux.o): New rule.
4504 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4505 srv_tgtobj.
4506 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4507 (aarch64_init_debug_reg_state): Make it extern.
4508 (aarch64_linux_prepare_to_resume): Remove.
4509
4510 2015-08-25 Yao Qi <yao.qi@linaro.org>
4511
4512 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4513 lwp_arch_private_info and ptid_of_lwp.
4514
4515 2015-08-25 Yao Qi <yao.qi@linaro.org>
4516
4517 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4518 Find proc_info by find_process_pid. All callers updated.
4519
4520 2015-08-25 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4523 Remove.
4524 (debug_reg_change_callback): Remove.
4525 (aarch64_notify_debug_reg_change): Remove.
4526
4527 2015-08-25 Yao Qi <yao.qi@linaro.org>
4528
4529 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4530 Call current_lwp_ptid.
4531
4532 2015-08-25 Yao Qi <yao.qi@linaro.org>
4533
4534 * linux-aarch64-low.c (debug_reg_change_callback): Use
4535 debug_printf.
4536
4537 2015-08-25 Yao Qi <yao.qi@linaro.org>
4538
4539 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4540
4541 2015-08-25 Yao Qi <yao.qi@linaro.org>
4542
4543 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4544
4545 2015-08-25 Yao Qi <yao.qi@linaro.org>
4546
4547 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4548 the code.
4549
4550 2015-08-25 Yao Qi <yao.qi@linaro.org>
4551
4552 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4553 Remove.
4554 (debug_reg_change_callback): Remove argument entry and add argument
4555 lwp. Remove local variable thread. Don't print thread id in the
4556 debugging output. Don't check whether pid of thread equals to pid.
4557 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4558 iterate_over_lwps instead find_inferior.
4559
4560 2015-08-24 Pedro Alves <palves@redhat.com>
4561
4562 * inferiors.c (get_first_process): New function.
4563 * inferiors.h (get_first_process): New declaration.
4564 * remote-utils.c (read_ptid): Default to the first process in the
4565 list, instead of to the current thread's process.
4566
4567 2015-08-24 Pedro Alves <palves@redhat.com>
4568
4569 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4570 * event-loop.c: Likewise.
4571 * remote-utils.c: Likewise.
4572 * tracepoint.c: Likewise.
4573
4574 2015-08-24 Pedro Alves <palves@redhat.com>
4575
4576 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4577 ptid_get_lwp.
4578
4579 2015-08-21 Pedro Alves <palves@redhat.com>
4580
4581 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4582 instead of literal 1.
4583
4584 2015-08-21 Pedro Alves <palves@redhat.com>
4585
4586 * tdesc.c (default_description): Explicitly zero-initialize.
4587
4588 2015-08-21 Pedro Alves <palves@redhat.com>
4589
4590 PR gdb/18749
4591 * inferiors.c (remove_thread): Discard any pending stop reply for
4592 this thread.
4593 * server.c (remove_all_on_match_pid): Rename to ...
4594 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4595 instead of a pid.
4596 (discard_queued_stop_replies): Change parameter to a ptid. Now
4597 extern.
4598 (handle_v_kill, kill_inferior_callback, captured_main)
4599 (process_serial_event): Adjust.
4600 * server.h (discard_queued_stop_replies): Declare.
4601
4602 2015-08-21 Pedro Alves <palves@redhat.com>
4603
4604 * linux-low.c (wait_for_sigstop): Always switch to no thread
4605 selected if the previously current thread dies.
4606 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4607 process instead of the current thread's.
4608 * remote-utils.c (input_interrupt): Don't check if there's no
4609 current thread.
4610 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4611 current thread to the general thread fails, error out.
4612 (handle_qxfer_auxv, handle_qxfer_libraries)
4613 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4614 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4615 (handle_query): Check if there's a thread selected instead of
4616 checking whether there's any thread in the thread list.
4617 (handle_qxfer_threads, handle_qxfer_btrace)
4618 (handle_qxfer_btrace_conf): Don't error out early if there's no
4619 thread in the thread list.
4620 (handle_v_cont, myresume): Don't set the current thread to the
4621 continue thread.
4622 (process_serial_event) <Hg handling>: Also set thread_id if the
4623 previous general thread is still alive.
4624 (process_serial_event) <g/G handling>: If setting the current
4625 thread to the general thread fails, error out.
4626 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4627 thread's lwp instead of the current thread's.
4628 * target.c (set_desired_thread): If the desired thread was not
4629 found, leave the current thread pointing to NULL. Return an int
4630 (boolean) indicating success.
4631 * target.h (set_desired_thread): Change return type to int.
4632
4633 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4634
4635 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4636 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4637 #includes.
4638 (ps_get_thread_area): New function.
4639
4640 2015-08-19 Gary Benson <gbenson@redhat.com>
4641
4642 * hostio.c (handle_pread): Do not attempt to read more data
4643 than hostio_reply_with_data can fit in a packet.
4644
4645 2015-08-18 Joel Brobecker <brobecker@adacore.com>
4646
4647 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4648
4649 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4650
4651 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4652
4653 2015-08-06 Pedro Alves <palves@redhat.com>
4654
4655 * tracepoint.c (expr_eval_result): Now an int.
4656
4657 2015-08-06 Pedro Alves <palves@redhat.com>
4658
4659 * gdbthread.h (struct regcache): Forward declare.
4660 (struct thread_info) <regcache_data>: Now a struct regcache
4661 pointer.
4662 * inferiors.c (inferior_regcache_data)
4663 (set_inferior_regcache_data): Now work with struct regcache
4664 pointers.
4665 * inferiors.h (struct regcache): Forward declare.
4666 (inferior_regcache_data, set_inferior_regcache_data): Now work
4667 with struct regcache pointers.
4668 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4669 (free_register_cache_thread): Remove struct regcache pointer
4670 casts.
4671
4672 2015-08-06 Pedro Alves <palves@redhat.com>
4673
4674 * server.c (captured_main): On error, print the exception message
4675 to stderr, and if run_once is set, throw a quit.
4676
4677 2015-08-06 Pedro Alves <palves@redhat.com>
4678
4679 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4680 the current thread.
4681
4682 2015-08-06 Pedro Alves <palves@redhat.com>
4683
4684 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4685 reading beyond the passed in buffer length.
4686
4687 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4688
4689 * tracepoint.c (symbol_list) <required>: Remove.
4690
4691 2015-08-06 Pedro Alves <palves@redhat.com>
4692
4693 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4694 count if stopping and suspending threads.
4695 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4696 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4697 (linux_detach): Complete an ongoing step-over.
4698 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4699 throughout.
4700 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4701 (linux_wait_1): If passing a signal to the inferior after
4702 finishing a step-over, unsuspend and re-resume all lwps. If we
4703 see a single-step event but the thread should be continuing, don't
4704 pass the trap to gdb.
4705 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4706 internal_error instead of gdb_assert.
4707 (enqueue_pending_signal): New function.
4708 (check_ptrace_stopped_lwp_gone): Add debug output.
4709 (start_step_over): Use internal_error instead of gdb_assert.
4710 (complete_ongoing_step_over): New function.
4711 (linux_resume_one_thread): Don't resume a suspended thread.
4712 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4713 it stepping.
4714
4715 2015-08-06 Pedro Alves <palves@redhat.com>
4716
4717 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4718 (linux_thread_alive): Use lwp_is_marked_dead.
4719 (extended_event_reported): Delete.
4720 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4721 instead of extended_event_reported.
4722 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4723 as well.
4724 (lwp_is_marked_dead): New function.
4725 (lwp_running): Use lwp_is_marked_dead.
4726 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4727 comment.
4728
4729 2015-08-06 Pedro Alves <palves@redhat.com>
4730
4731 * linux-low.c (linux_wait_1): Move fork event output out of the
4732 !report_to_gdb check. Pass event_child->waitstatus to
4733 target_waitstatus_to_string instead of ourstatus.
4734
4735 2015-08-04 Yao Qi <yao.qi@linaro.org>
4736
4737 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4738 if current_thread is 32 bit.
4739
4740 2015-08-04 Yao Qi <yao.qi@linaro.org>
4741
4742 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4743 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4744 * server.c (extended_protocol): Remove "static".
4745 * server.h (extended_protocol): Declare it.
4746
4747 2015-08-04 Yao Qi <yao.qi@linaro.org>
4748
4749 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4750 both aarch64 and aarch32.
4751 (aarch64_set_pc): Likewise.
4752
4753 2015-08-04 Yao Qi <yao.qi@linaro.org>
4754
4755 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4756 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4757 arm-with-neon.xml to srv_xmlfiles.
4758 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4759 (is_64bit_tdesc): New function.
4760 (aarch64_linux_read_description): New function.
4761 (aarch64_arch_setup): Call aarch64_linux_read_description.
4762 (regs_info): Rename to regs_info_aarch64.
4763 (aarch64_regs_info): Return right regs_info.
4764 (initialize_low_arch): Call initialize_low_arch_aarch32.
4765
4766 2015-08-04 Yao Qi <yao.qi@linaro.org>
4767
4768 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4769 * linux-aarch32-low.c: New file.
4770 * linux-aarch32-low.h: New file.
4771 * linux-arm-low.c (arm_fill_gregset): Move it to
4772 linux-aarch32-low.c.
4773 (arm_store_gregset): Likewise.
4774 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4775 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4776 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4777 (regs_info): Rename to regs_info_arm.
4778 (arm_regs_info): Return regs_info_aarch32 if
4779 have_ptrace_getregset is 1 and target description is
4780 arm_with_neon or arm_with_vfpv3.
4781 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4782 Call initialize_low_arch_aarch32 instead.
4783
4784 2015-08-04 Yao Qi <yao.qi@linaro.org>
4785
4786 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4787 * linux-low.c: ... here.
4788 * linux-low.h (have_ptrace_getregset): Declare it.
4789
4790 2015-08-04 Pedro Alves <palves@redhat.com>
4791
4792 * thread-db.c (struct thread_db): Use new typedefs.
4793 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4794 CHK calls.
4795 (disable_thread_event_reporting): Cast result of dlsym to
4796 destination function pointer type.
4797 (thread_db_mourn): Use td_ta_delete_ftype.
4798
4799 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4800
4801 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4802 arch variant.
4803 (CDX_BREAKPOINT): Define for R2.
4804 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4805 (the_low_target): Add comments.
4806
4807 2015-07-30 Yao Qi <yao.qi@linaro.org>
4808
4809 * linux-arm-low.c (arm_hwcap): Remove it.
4810 (arm_read_description): New local variable arm_hwcap. Don't
4811 set arm_hwcap to zero.
4812
4813 2015-07-30 Yao Qi <yao.qi@linaro.org>
4814
4815 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4816 Use regcache->tdesc instead.
4817 (arm_store_wmmxregset): Likewise.
4818 (arm_fill_vfpregset): Likewise.
4819 (arm_store_vfpregset): Likewise.
4820
4821 2015-07-30 Yao Qi <yao.qi@linaro.org>
4822
4823 * linux-arm-low.c: Include arch/arm.h.
4824 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4825 (arm_store_gregset): Likewise.
4826
4827 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4828
4829 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4830 ptrace's 4th parameter.
4831
4832 2015-07-27 Yao Qi <yao.qi@linaro.org>
4833
4834 * configure.srv (case aarch64*-*-linux*): Don't set
4835 srv_linux_usrregs.
4836
4837 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4838
4839 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4840 sys/ptrace.h.
4841 * linux-arm-low.c: Likewise.
4842 * linux-cris-low.c: Likewise.
4843 * linux-crisv32-low.c: Likewise.
4844 * linux-low.c: Likewise.
4845 * linux-m68k-low.c: Likewise.
4846 * linux-mips-low.c: Likewise.
4847 * linux-nios2-low.c: Likewise.
4848 * linux-s390-low.c: Likewise.
4849 * linux-sparc-low.c: Likewise.
4850 * linux-tic6x-low.c: Likewise.
4851 * linux-tile-low.c: Likewise.
4852 * linux-x86-low.c: Likewise.
4853
4854 2015-07-24 Pedro Alves <palves@redhat.com>
4855
4856 * config.in: Regenerate.
4857 * configure: Regenerate.
4858
4859 2015-07-24 Pedro Alves <palves@redhat.com>
4860
4861 * acinclude.m4: Include ../ptrace.m4.
4862 * configure.ac: Call GDB_AC_PTRACE.
4863 * config.in, configure: Regenerate.
4864
4865 2015-07-24 Yao Qi <yao.qi@linaro.org>
4866
4867 * linux-low.c (linux_create_inferior): Remove setting to
4868 proc->priv->new_inferior.
4869 (linux_attach): Likewise.
4870 (linux_low_filter_event): Likewise.
4871 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4872
4873 2015-07-24 Yao Qi <yao.qi@linaro.org>
4874
4875 * linux-low.c (linux_arch_setup): New function.
4876 (linux_low_filter_event): If proc->tdesc is NULL and
4877 proc->attached is true, call the_low_target.arch_setup.
4878 Otherwise, keep status pending, and return.
4879 (linux_resume_one_lwp_throw): Don't call get_pc if
4880 thread->while_stepping isn't NULL. Don't call
4881 get_thread_regcache if proc->tdesc is NULL.
4882 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4883 (linux_target_ops): Install arch_setup.
4884 * server.c (start_inferior): Call the_target->arch_setup.
4885 * target.h (struct target_ops) <arch_setup>: New field.
4886 (target_arch_setup): New marco.
4887 * lynx-low.c (lynx_target_ops): Update.
4888 * nto-low.c (nto_target_ops): Update.
4889 * spu-low.c (spu_target_ops): Update.
4890 * win32-low.c (win32_target_ops): Update.
4891
4892 2015-07-24 Yao Qi <yao.qi@linaro.org>
4893
4894 * linux-low.c (linux_add_process): Don't set
4895 proc->priv->new_inferior.
4896 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4897 (linux_attach): Likewise.
4898
4899 2015-07-24 Yao Qi <yao.qi@linaro.org>
4900
4901 * server.c (start_inferior): Code refactor.
4902
4903 2015-07-24 Yao Qi <yao.qi@linaro.org>
4904
4905 * server.c (process_serial_event): Set general_thread.
4906
4907 2015-07-21 Yao Qi <yao.qi@linaro.org>
4908
4909 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4910 aarch64_linux_get_debug_reg_capacity.
4911
4912 2015-07-17 Yao Qi <yao.qi@linaro.org>
4913
4914 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4915 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4916 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4917 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4918 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4919 (AARCH64_HWP_ALIGNMENT): Likewise.
4920 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4921 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4922 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4923 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4924 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4925 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4926 (struct aarch64_debug_reg_state): Likewise.
4927 (struct arch_lwp_info): Likewise.
4928 (aarch64_align_watchpoint): Likewise.
4929 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4930 (aarch64_watchpoint_length): Likewise.
4931 (aarch64_point_encode_ctrl_reg): Likewise
4932 (aarch64_point_is_aligned): Likewise.
4933 (aarch64_align_watchpoint): Likewise.
4934 (aarch64_linux_set_debug_regs):
4935 (aarch64_dr_state_insert_one_point): Likewise.
4936 (aarch64_dr_state_remove_one_point): Likewise.
4937 (aarch64_handle_breakpoint): Likewise.
4938 (aarch64_handle_aligned_watchpoint): Likewise.
4939 (aarch64_handle_unaligned_watchpoint): Likewise.
4940 (aarch64_handle_watchpoint): Likewise.
4941
4942 2015-07-17 Yao Qi <yao.qi@linaro.org>
4943
4944 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4945 and don't aarch64_get_debug_reg_state. All callers update.
4946 (aarch64_handle_aligned_watchpoint): Likewise.
4947 (aarch64_handle_unaligned_watchpoint): Likewise.
4948 (aarch64_handle_watchpoint): Likewise.
4949 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4950 (aarch64_remove_point): Likewise.
4951
4952 2015-07-17 Yao Qi <yao.qi@linaro.org>
4953
4954 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4955 debug_printf.
4956 (aarch64_handle_unaligned_watchpoint): Likewise.
4957
4958 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4959
4960 Revert the previous 3 commits:
4961 Move gdb_regex* to common/
4962 Move linux_find_memory_regions_full & co.
4963 gdbserver build-id attribute generator
4964
4965 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4966 Jan Kratochvil <jan.kratochvil@redhat.com>
4967
4968 gdbserver build-id attribute generator.
4969 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4970 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4971 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4972 (find_phdr): New.
4973 (get_dynamic): Use find_pdhr to traverse program headers.
4974 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4975 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4976 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4977 (get_hex_build_id): New.
4978 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4979 to reply XML document.
4980
4981 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4982 Jan Kratochvil <jan.kratochvil@redhat.com>
4983
4984 * target.c: Include target/target-utils.h and fcntl.h.
4985 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4986 (target_fileio_read_stralloc): New functions.
4987
4988 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4989
4990 * Makefile.in (OBS): Add gdb_regex.o.
4991 (gdb_regex.o): New.
4992 * config.in: Rebuilt.
4993 * configure: Rebuilt.
4994
4995 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4996 Jan Kratochvil <jan.kratochvil@redhat.com>
4997
4998 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4999 * Makefile.in (OBS): Add target-utils.o.
5000 (linux-maps.o, target-utils.o): New.
5001 * configure.srv (srv_linux_obj): Add linux-maps.o.
5002
5003 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5004
5005 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5006 function, return 1.
5007 (the_low_target): Install it.
5008
5009 2015-07-14 Pedro Alves <palves@redhat.com>
5010
5011 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5012 Instead, ignore ECHILD, and throw an error for other errnos.
5013
5014 2015-07-10 Pedro Alves <palves@redhat.com>
5015
5016 * event-loop.c (struct callback_event) <data>: Change type to
5017 gdb_client_data instance instead of gdb_client_data pointer.
5018 (append_callback_event): Adjust.
5019
5020 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5021
5022 * linux-aarch64-low.c: Add comments for each linux_target_ops
5023 method. Remove comments already covered in target_ops and
5024 linux_target_ops definitions.
5025 (the_low_target): Add comments for each unimplemented method.
5026
5027 2015-07-09 Yao Qi <yao.qi@linaro.org>
5028
5029 * linux-aarch64-low.c (aarch64_regmap): Remove.
5030 (aarch64_usrregs_info): Remove.
5031 (regs_info): Set field usrregs to NULL.
5032
5033 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5034
5035 * linux-low.c: Include "rsp-low.h"
5036 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5037 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5038 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5039 (handle_btrace_enable_pt): New.
5040 (handle_btrace_general_set): Support "pt".
5041 (handle_btrace_conf_general_set): Support "pt:size".
5042
5043 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5044
5045 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5046 Z_PACKET_SW_BP.
5047
5048 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5049
5050 * linux-aarch64-low.c: Remove comment about endianness.
5051 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5052 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5053 memcmp.
5054
5055 2015-06-24 Gary Benson <gbenson@redhat.com>
5056
5057 * linux-i386-ipa.c (stdint.h): Do not include.
5058 * lynx-i386-low.c (stdint.h): Likewise.
5059 * lynx-ppc-low.c (stdint.h): Likewise.
5060 * mem-break.c (stdint.h): Likewise.
5061 * thread-db.c (stdint.h): Likewise.
5062 * tracepoint.c (stdint.h): Likewise.
5063 * win32-low.c (stdint.h): Likewise.
5064
5065 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5066
5067 * server.c (write_qxfer_response): Update call to
5068 remote_escape_output.
5069
5070 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5071 Jan Kratochvil <jan.kratochvil@redhat.com>
5072
5073 Merge multiple hex conversions.
5074 * gdbreplay.c (tohex): Rename to 'fromhex'.
5075 (logchar): Use fromhex.
5076
5077 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5078
5079 * server.c (handle_qxfer_libraries): Set `version' attribute for
5080 <library-list>.
5081
5082 2015-06-10 Gary Benson <gbenson@redhat.com>
5083
5084 * target.h (struct target_ops) <multifs_open>: New field.
5085 <multifs_unlink>: Likewise.
5086 <multifs_readlink>: Likewise.
5087 * linux-low.c (nat/linux-namespaces.h): New include.
5088 (linux_target_ops): Initialize the_target->multifs_open,
5089 the_target->multifs_unlink and the_target->multifs_readlink.
5090 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5091 * hostio.c (hostio_fs_pid): New static variable.
5092 (hostio_handle_new_gdb_connection): New function.
5093 (handle_setfs): Likewise.
5094 (handle_open): Use the_target->multifs_open as appropriate.
5095 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5096 (handle_readlink): Use the_target->multifs_readlink as
5097 appropriate.
5098 (handle_vFile): Handle vFile:setfs packets.
5099 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5100 after target_handle_new_gdb_connection.
5101
5102 2015-06-10 Gary Benson <gbenson@redhat.com>
5103
5104 * configure.ac (AC_CHECK_FUNCS): Add setns.
5105 * config.in: Regenerate.
5106 * configure: Likewise.
5107 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5108 (linux-namespaces.o): New rule.
5109 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5110
5111 2015-06-09 Gary Benson <gbenson@redhat.com>
5112
5113 * hostio.c (handle_open): Process mode argument with
5114 fileio_to_host_mode.
5115
5116 2015-06-01 Yao Qi <yao.qi@linaro.org>
5117
5118 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5119 * linux-x86-low.c: Likewise.
5120
5121 2015-05-28 Don Breazeal <donb@codesourcery.com>
5122
5123 * linux-low.c (handle_extended_wait): Initialize
5124 thread_info.last_resume_kind for new fork children.
5125
5126 2015-05-15 Pedro Alves <palves@redhat.com>
5127
5128 * target.h (target_handle_new_gdb_connection): Rewrite using if
5129 wrapped in do/while.
5130
5131 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5132
5133 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5134 * configure, config.in: Regenerate.
5135 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5136 Declare typedef.
5137
5138 2015-05-12 Don Breazeal <donb@codesourcery.com>
5139
5140 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5141 PTRACE_EVENT_VFORK_DONE.
5142 (linux_low_ptrace_options, extended_event_reported): Add vfork
5143 events.
5144 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5145 and "vforkdone" for RSP 'T' Stop Reply Packet.
5146 * server.h (report_vfork_events): Declare
5147 global variable.
5148
5149 2015-05-12 Don Breazeal <donb@codesourcery.com>
5150
5151 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5152 (the_low_target) <new_fork>: Initialize new member.
5153 * linux-arm-low.c (arm_new_fork): New function.
5154 (the_low_target) <new_fork>: Initialize new member.
5155 * linux-low.c (handle_extended_wait): Call new target function
5156 new_fork.
5157 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5158 * linux-mips-low.c (mips_add_watchpoint): New function
5159 extracted from mips_insert_point.
5160 (the_low_target) <new_fork>: Initialize new member.
5161 (mips_linux_new_fork): New function.
5162 (mips_insert_point): Call mips_add_watchpoint.
5163 * linux-x86-low.c (x86_linux_new_fork): New function.
5164 (the_low_target) <new_fork>: Initialize new member.
5165
5166 2015-05-12 Don Breazeal <donb@codesourcery.com>
5167
5168 * linux-low.c (handle_extended_wait): Implement return value,
5169 rename argument 'event_child' to 'event_lwp', handle
5170 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5171 (linux_low_ptrace_options): New function.
5172 (linux_low_filter_event): Call linux_low_ptrace_options,
5173 use different argument fo linux_enable_event_reporting,
5174 use return value from handle_extended_wait.
5175 (extended_event_reported): New function.
5176 (linux_wait_1): Call extended_event_reported and set
5177 status to report fork events.
5178 (linux_write_memory): Add pid to debug message.
5179 (reset_lwp_ptrace_options_callback): New function.
5180 (linux_handle_new_gdb_connection): New function.
5181 (linux_target_ops): Initialize new structure member.
5182 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5183 * lynx-low.c: Initialize new structure member.
5184 * remote-utils.c (prepare_resume_reply): Implement stop reason
5185 "fork" for "T" stop message.
5186 * server.c (handle_query): Call handle_new_gdb_connection.
5187 * server.h (report_fork_events): Declare global flag.
5188 * target.h (struct target_ops) <handle_new_gdb_connection>:
5189 New member.
5190 (target_handle_new_gdb_connection): New macro.
5191 * win32-low.c: Initialize new structure member.
5192
5193 2015-05-12 Don Breazeal <donb@codesourcery.com>
5194
5195 * mem-break.c (APPEND_TO_LIST): Define macro.
5196 (clone_agent_expr): New function.
5197 (clone_one_breakpoint): New function.
5198 (clone_all_breakpoints): New function.
5199 * mem-break.h: Declare new functions.
5200
5201 2015-05-12 Don Breazeal <donb@codesourcery.com>
5202
5203 * linux-low.c (linux_supports_fork_events): New function.
5204 (linux_supports_vfork_events): New function.
5205 (linux_target_ops): Initialize new structure members.
5206 (initialize_low): Call linux_check_ptrace_features.
5207 * lynx-low.c (lynx_target_ops): Initialize new structure
5208 members.
5209 * server.c (report_fork_events, report_vfork_events):
5210 New global flags.
5211 (handle_query): Add new features to qSupported packet and
5212 response.
5213 (captured_main): Initialize new global variables.
5214 * target.h (struct target_ops) <supports_fork_events>:
5215 New member.
5216 <supports_vfork_events>: New member.
5217 (target_supports_fork_events): New macro.
5218 (target_supports_vfork_events): New macro.
5219 * win32-low.c (win32_target_ops): Initialize new structure
5220 members.
5221
5222 2015-05-12 Gary Benson <gbenson@redhat.com>
5223
5224 * server.c (handle_qxfer_exec_file): Use current process
5225 if annex is empty.
5226
5227 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5228
5229 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5230 Remove HAVE_PTRACE_GETREGS conditionals.
5231 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5232 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5233
5234 2015-05-08 Yao Qi <yao.qi@linaro.org>
5235
5236 * linux-low.c (linux_supports_conditional_breakpoints): New
5237 function.
5238 (linux_target_ops): Install new target method.
5239 * lynx-low.c (lynx_target_ops): Install NULL hook for
5240 supports_conditional_breakpoints.
5241 * nto-low.c (nto_target_ops): Likewise.
5242 * spu-low.c (spu_target_ops): Likewise.
5243 * win32-low.c (win32_target_ops): Likewise.
5244 * server.c (handle_query): Check
5245 target_supports_conditional_breakpoints.
5246 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5247 New field.
5248 (target_supports_conditional_breakpoints): New macro.
5249
5250 2015-05-06 Pedro Alves <palves@redhat.com>
5251
5252 PR server/18081
5253 * server.c (start_inferior): If the process exits, mourn it.
5254
5255 2015-04-21 Gary Benson <gbenson@redhat.com>
5256
5257 * hostio.c (fileio_open_flags_to_host): Factored out to
5258 fileio_to_host_openflags in common/fileio.c. Single use
5259 updated.
5260
5261 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5262
5263 * linux-xtensa-low.c (xtensa_fill_gregset)
5264 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5265 XCHAL_HAVE_LOOP.
5266
5267 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5268
5269 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5270 (regs_info): Replace usrregs pointer with NULL.
5271
5272 2015-04-17 Gary Benson <gbenson@redhat.com>
5273
5274 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5275 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5276 * server.c (handle_qxfer_exec_file): New function.
5277 (qxfer_packets): Add exec-file entry.
5278 (handle_query): Report qXfer:exec-file:read as supported packet.
5279
5280 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5281
5282 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5283
5284 2015-04-09 Gary Benson <gbenson@redhat.com>
5285
5286 * hostio-errno.c (errno_to_fileio_error): Remove function.
5287 Update caller to use remote_fileio_to_fio_error.
5288
5289 2015-04-09 Yao Qi <yao.qi@linaro.org>
5290
5291 * linux-low.c (linux_insert_point): Call
5292 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5293 (linux_remove_point): Call remove_memory_breakpoint if type is
5294 raw_bkpt_type_sw.
5295 * linux-x86-low.c (x86_insert_point): Don't call
5296 insert_memory_breakpoint.
5297 (x86_remove_point): Don't call remove_memory_breakpoint.
5298
5299 2015-04-01 Pedro Alves <palves@redhat.com>
5300 Cleber Rosa <crosa@redhat.com>
5301
5302 * server.c (gdbserver_usage): Reorganize and extend the usage
5303 message.
5304
5305 2015-03-24 Pedro Alves <palves@redhat.com>
5306
5307 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5308 output. Also dump TRAP_TRACE.
5309 (linux_low_filter_event): In debug output, distinguish a
5310 resume_stop SIGSTOP from a delayed SIGSTOP.
5311
5312 2015-03-24 Gary Benson <gbenson@redhat.com>
5313
5314 * linux-x86-low.c (x86_linux_new_thread): Moved to
5315 nat/x86-linux.c.
5316 (x86_linux_prepare_to_resume): Likewise.
5317
5318 2015-03-24 Gary Benson <gbenson@redhat.com>
5319
5320 * Makefile.in (x86-linux-dregs.o): New rule.
5321 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5322 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5323 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5324 (x86_linux_dr_get): Likewise.
5325 (x86_linux_dr_set): Likewise.
5326 (update_debug_registers_callback): Likewise.
5327 (x86_linux_dr_set_addr): Likewise.
5328 (x86_linux_dr_get_addr): Likewise.
5329 (x86_linux_dr_set_control): Likewise.
5330 (x86_linux_dr_get_control): Likewise.
5331 (x86_linux_dr_get_status): Likewise.
5332 (x86_linux_update_debug_registers): Likewise.
5333
5334 2015-03-24 Gary Benson <gbenson@redhat.com>
5335
5336 * linux-x86-low.c (x86_linux_update_debug_registers):
5337 New function, factored out from...
5338 (x86_linux_prepare_to_resume): ...this.
5339
5340 2015-03-24 Gary Benson <gbenson@redhat.com>
5341
5342 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5343 (x86_linux_dr_set): Likewise.
5344 (update_debug_registers_callback): Likewise.
5345 (x86_linux_dr_set_addr): Likewise.
5346 (x86_linux_dr_get_addr): Likewise.
5347 (x86_linux_dr_set_control): Likewise.
5348 (x86_linux_dr_get_control): Likewise.
5349 (x86_linux_dr_get_status): Likewise.
5350 (x86_linux_prepare_to_resume): Likewise.
5351
5352 2015-03-24 Gary Benson <gbenson@redhat.com>
5353
5354 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5355 Use perror_with_name. Pass string through gettext.
5356 (x86_linux_dr_set): Likewise.
5357
5358 2015-03-24 Gary Benson <gbenson@redhat.com>
5359
5360 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5361 (x86_linux_dr_set_addr): ...this.
5362 (x86_dr_low_get_addr): Rename to...
5363 (x86_linux_dr_get_addr): ...this.
5364 (x86_dr_low_set_control): Rename to...
5365 (x86_linux_dr_set_control): ...this.
5366 (x86_dr_low_get_control): Rename to...
5367 (x86_linux_dr_get_control): ...this.
5368 (x86_dr_low_get_status): Rename to...
5369 (x86_linux_dr_get_status): ...this.
5370 (x86_dr_low): Update with new function names.
5371
5372 2015-03-24 Gary Benson <gbenson@redhat.com>
5373
5374 * Makefile.in (x86-linux.o): New rule.
5375 * configure.srv: Add x86-linux.o to relevant targets.
5376 * linux-low.c (lwp_set_arch_private_info): New function.
5377 (lwp_arch_private_info): Likewise.
5378 * linux-x86-low.c: Include nat/x86-linux.h.
5379 (arch_lwp_info): Removed structure.
5380 (update_debug_registers_callback):
5381 Use lwp_set_debug_registers_changed.
5382 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5383 and lwp_set_debug_registers_changed.
5384 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5385
5386 2015-03-24 Gary Benson <gbenson@redhat.com>
5387
5388 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5389 * linux-arm-low.c (arm_new_thread): Likewise.
5390 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5391 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5392 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5393 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5394
5395 2015-03-24 Gary Benson <gbenson@redhat.com>
5396
5397 * linux-low.c (ptid_of_lwp): New function.
5398 (lwp_is_stopped): Likewise.
5399 (lwp_stop_reason): Likewise.
5400 * linux-x86-low.c (update_debug_registers_callback):
5401 Use lwp_is_stopped.
5402 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5403 lwp_stop_reason.
5404
5405 2015-03-24 Gary Benson <gbenson@redhat.com>
5406
5407 * linux-low.h (linux_stop_lwp): Remove declaration.
5408
5409 2015-03-24 Gary Benson <gbenson@redhat.com>
5410
5411 * linux-low.h: Include nat/linux-nat.h.
5412 * linux-low.c (iterate_over_lwps_args): New structure.
5413 (iterate_over_lwps_filter): New function.
5414 (iterate_over_lwps): Likewise.
5415 * linux-x86-low.c (update_debug_registers_callback):
5416 Update signature to what iterate_over_lwps expects.
5417 Remove PID check that iterate_over_lwps now performs.
5418 (x86_dr_low_set_addr): Use iterate_over_lwps.
5419 (x86_dr_low_set_control): Likewise.
5420
5421 2015-03-24 Gary Benson <gbenson@redhat.com>
5422
5423 * linux-x86-low.c (x86_debug_reg_state): New function.
5424 (x86_linux_prepare_to_resume): Use the above.
5425
5426 2015-03-24 Gary Benson <gbenson@redhat.com>
5427
5428 * linux-low.c (current_lwp_ptid): New function.
5429 * linux-x86-low.c: Include nat/linux-nat.h.
5430 (x86_dr_low_get_addr): Use current_lwp_ptid.
5431 (x86_dr_low_get_control): Likewise.
5432 (x86_dr_low_get_status): Likewise.
5433
5434 2015-03-20 Pedro Alves <palves@redhat.com>
5435
5436 * tracepoint.c (cmd_qtstatus): Make "str" const.
5437
5438 2015-03-20 Pedro Alves <palves@redhat.com>
5439
5440 * server.c (handle_general_set): Make "req_str" const.
5441
5442 2015-03-19 Pedro Alves <palves@redhat.com>
5443
5444 * linux-low.c (linux_resume_one_lwp): Rename to ...
5445 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5446 instead call perror_with_name.
5447 (check_ptrace_stopped_lwp_gone): New function.
5448 (linux_resume_one_lwp): Reimplement as wrapper around
5449 linux_resume_one_lwp_throw that swallows errors if the LWP is
5450 gone.
5451
5452 2015-03-19 Pedro Alves <palves@redhat.com>
5453
5454 * linux-low.c (count_events_callback, select_event_lwp_callback):
5455 No longer check whether the thread has resume_stop as last resume
5456 kind.
5457
5458 2015-03-19 Pedro Alves <palves@redhat.com>
5459
5460 * linux-low.c (count_events_callback, select_event_lwp_callback):
5461 Use the lwp's status_pending_p field, not the thread's.
5462
5463 2015-03-19 Pedro Alves <palves@redhat.com>
5464
5465 * linux-low.c (select_event_lwp_callback): Update comments to
5466 no longer mention SIGTRAP.
5467
5468 2015-03-18 Gary Benson <gbenson@redhat.com>
5469
5470 * server.c (handle_query): Do not report vFile:fstat as supported.
5471
5472 2015-03-11 Gary Benson <gbenson@redhat.com>
5473
5474 * hostio.c (sys/types.h): New include.
5475 (sys/stat.h): Likewise.
5476 (common-remote-fileio.h): Likewise.
5477 (handle_fstat): New function.
5478 (handle_vFile): Handle vFile:fstat packets.
5479
5480 2015-03-11 Gary Benson <gbenson@redhat.com>
5481
5482 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5483 struct stat.st_blocks and struct stat.st_blksize.
5484 * configure: Regenerate.
5485 * config.in: Likewise.
5486 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5487 (OBS): Add common-remote-fileio.o.
5488 (common-remote-fileio.o): New rule.
5489
5490 2015-03-09 Pedro Alves <palves@redhat.com>
5491
5492 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5493 'struct sockaddr' pointer in 'accept' call.
5494
5495 2015-03-09 Pedro Alves <palves@redhat.com>
5496
5497 Revert:
5498 2015-03-07 Pedro Alves <palves@redhat.com>
5499 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5500 or <winsock2.h> here. Instead include "gdb_socket.h".
5501 (remote_open): Use union gdb_sockaddr_u.
5502 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5503 or <winsock2.h> here. Instead include "gdb_socket.h".
5504 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5505 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5506 or <sys/un.h>.
5507 (init_named_socket, gdb_agent_helper_thread): Use union
5508 gdb_sockaddr_u.
5509
5510 2015-03-07 Pedro Alves <palves@redhat.com>
5511
5512 * configure.ac (build_warnings): Move
5513 -Wdeclaration-after-statement to the C-specific set.
5514 * configure: Regenerate.
5515
5516 2015-03-07 Pedro Alves <palves@redhat.com>
5517
5518 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5519 or <winsock2.h> here. Instead include "gdb_socket.h".
5520 (remote_open): Use union gdb_sockaddr_u.
5521 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5522 or <winsock2.h> here. Instead include "gdb_socket.h".
5523 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5524 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5525 or <sys/un.h>.
5526 (init_named_socket, gdb_agent_helper_thread): Use union
5527 gdb_sockaddr_u.
5528
5529 2015-03-07 Pedro Alves <palves@redhat.com>
5530
5531 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5532 instead.
5533
5534 2015-03-06 Yao Qi <yao.qi@linaro.org>
5535
5536 * linux-aarch64-low.c (aarch64_insert_point): Use
5537 show_debug_regs as a boolean.
5538 (aarch64_remove_point): Likewise.
5539
5540 2015-03-05 Pedro Alves <palves@redhat.com>
5541
5542 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5543 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5544 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5545 * nto-low.c (nto_target_ops): Likewise.
5546 * spu-low.c (spu_target_ops): Likewise.
5547 * win32-low.c (win32_target_ops): Likewise.
5548
5549 2015-03-04 Pedro Alves <palves@redhat.com>
5550
5551 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5552 Decide whether a breakpoint triggered based on the SIGTRAP's
5553 siginfo.si_code.
5554 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5555 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5556 (linux_low_filter_event): Check for breakpoints before checking
5557 watchpoints.
5558 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5559 siginfo.si_code.
5560 (linux_stopped_by_sw_breakpoint)
5561 (linux_supports_stopped_by_sw_breakpoint)
5562 (linux_stopped_by_hw_breakpoint)
5563 (linux_supports_stopped_by_hw_breakpoint): New functions.
5564 (linux_target_ops): Install new target methods.
5565
5566 2015-03-04 Pedro Alves <palves@redhat.com>
5567
5568 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5569 * server.c (swbreak_feature, hwbreak_feature): New globals.
5570 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5571 (captured_main): Clear swbreak_feature and hwbreak_feature.
5572 * server.h (swbreak_feature, hwbreak_feature): Declare.
5573 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5574 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5575 supports_stopped_by_hw_breakpoint>: New fields.
5576 (target_supports_stopped_by_sw_breakpoint)
5577 (target_stopped_by_sw_breakpoint)
5578 (target_supports_stopped_by_hw_breakpoint)
5579 (target_stopped_by_hw_breakpoint): Declare.
5580
5581 2015-03-04 Pedro Alves <palves@redhat.com>
5582
5583 enum lwp_stop_reason -> enum target_stop_reason
5584 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5585 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5586 (linux_wait_1, stuck_in_jump_pad_callback)
5587 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5588 (linux_stopped_by_watchpoint):
5589 * linux-low.h (enum lwp_stop_reason): Delete.
5590 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5591 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5592
5593 2015-03-04 Yao Qi <yao.qi@linaro.org>
5594
5595 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5596
5597 2015-03-03 Gary Benson <gbenson@redhat.com>
5598
5599 * hostio.c (handle_vFile): Fix prefix lengths.
5600
5601 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5602
5603 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5604 ptr_bits.
5605
5606 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5607
5608 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5609 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5610 (clean): Add "rm -f" for above C files.
5611 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5612 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5613 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5614 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5615 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5616 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5617 (init_registers_s390x_vx_linux64)
5618 (init_registers_s390x_tevx_linux64)
5619 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5620 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5621 declarations.
5622 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5623 (s390_store_vxrs_high): New functions.
5624 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5625 NT_S390_VXRS_HIGH.
5626 (s390_arch_setup): Add logic for selecting one of the new target
5627 descriptions. Activate the new vector regsets if applicable.
5628 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5629 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5630 and init_registers_s390x_tevx_linux64.
5631
5632 2015-03-01 Pedro Alves <palves@redhat.com>
5633
5634 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5635 parameter.
5636
5637 2015-02-27 Pedro Alves <palves@redhat.com>
5638
5639 * linux-x86-low.c (u_debugreg_offset): New function.
5640 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5641
5642 2015-02-27 Pedro Alves <palves@redhat.com>
5643
5644 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5645 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5646 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5647 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5648 (ps_lsetfpregs, ps_getpid)
5649 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5650 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5651 (ps_lsetxregs, ps_plog): Declare.
5652
5653 2015-02-27 Pedro Alves <palves@redhat.com>
5654
5655 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5656 IP_AGENT_EXPORT_FUNC.
5657 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5658 IP_AGENT_EXPORT_FUNC.
5659 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5660 (IP_AGENT_EXPORT): Delete.
5661 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5662 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5663 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5664 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5665 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5666 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5667 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5668 (traceframe_read_count, traceframe_write_count)
5669 (traceframes_created, trace_state_variables, get_raw_reg)
5670 (get_trace_state_variable_value, set_trace_state_variable_value)
5671 (ust_loaded, helper_thread_id, cmd_buf): Use
5672 IPA_SYM_EXPORTED_NAME.
5673 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5674 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5675 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5676 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5677 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5678 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5679 EXTERN_C_PUSH/EXTERN_C_POP.
5680 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5681 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5682 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5683 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5684 (traceframe_write_count, traceframe_read_count)
5685 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5686 (about_to_request_buffer_space, get_trace_state_variable_value)
5687 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5688 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5689 EXTERN_C_PUSH/EXTERN_C_POP.
5690 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5691 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5692 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5693 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5694 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5695 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5696 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5697 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5698 Define.
5699 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5700 (IP_AGENT_EXPORT_VAR_DECL): Define.
5701 (tracing): Declare.
5702 (gdb_agent_get_raw_reg): Declare.
5703
5704 2015-02-27 Tom Tromey <tromey@redhat.com>
5705 Pedro Alves <palves@redhat.com>
5706
5707 Rename symbols whose names are reserved C++ keywords throughout.
5708
5709 2015-02-27 Pedro Alves <palves@redhat.com>
5710
5711 * Makefile.in (COMPILER): New, get it from autoconf.
5712 (CXX): Get from autoconf instead.
5713 (COMPILE.pre): Use COMPILER.
5714 (CC-LD): Rename to ...
5715 (CC_LD): ... this. Use COMPILER.
5716 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5717 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5718 * acinclude.m4: Include build-with-cxx.m4.
5719 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5720 Disable -Werror by default if building in C++ mode.
5721 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5722 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5723 the C++ compiler. Save/restore CXXFLAGS too.
5724 * configure: Regenerate.
5725
5726 2015-02-27 Pedro Alves <palves@redhat.com>
5727
5728 * acinclude.m4: Include libiberty.m4.
5729 * configure.ac: Call libiberty_INIT.
5730 * config.in, configure: Regenerate.
5731
5732 2015-02-26 Pedro Alves <palves@redhat.com>
5733
5734 * linux-low.c (linux_wait_1): When incrementing the PC past a
5735 program breakpoint always use the_low_target.breakpoint_len as
5736 increment, rather than the maximum between that and
5737 the_low_target.decr_pc_after_break.
5738
5739 2015-02-23 Pedro Alves <palves@redhat.com>
5740
5741 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5742 thread was doing a step-over; always adjust the PC if
5743 we stepped over a permanent breakpoint.
5744 (linux_wait_1): If we stepped over breakpoint that was on top of a
5745 permanent breakpoint, manually advance the PC past it.
5746
5747 2015-02-23 Pedro Alves <palves@redhat.com>
5748
5749 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5750 modes.
5751 (x86_fill_gregset, x86_store_gregset): Use it when handling
5752 $orig_eax.
5753
5754 2015-02-20 Pedro Alves <palves@redhat.com>
5755
5756 * thread-db.c: Include "nat/linux-procfs.h".
5757 (thread_db_init): Skip listing new threads if the kernel supports
5758 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5759
5760 2015-02-20 Pedro Alves <palves@redhat.com>
5761
5762 * linux-low.c (status_pending_p_callback): Use ptid_match.
5763
5764 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5765
5766 PR breakpoints/16812
5767 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5768 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5769 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5770
5771 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5772
5773 PR breakpoints/15956
5774 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5775
5776 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5777
5778 * linux-low.c (linux_low_btrace_conf): Print size.
5779 * server.c (handle_btrace_conf_general_set): New.
5780 (hanle_general_set): Call handle_btrace_conf_general_set.
5781 (handle_query): Report Qbtrace-conf:bts:size as supported.
5782
5783 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5784
5785 * linux-low.c (linux_low_enable_btrace): Update parameters.
5786 (linux_low_btrace_conf): New.
5787 (linux_target_ops)<to_btrace_conf>: Initialize.
5788 * server.c (current_btrace_conf): New.
5789 (handle_btrace_enable): Rename to ...
5790 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5791 to target_enable_btrace. Update comment. Update users.
5792 (handle_qxfer_btrace_conf): New.
5793 (qxfer_packets): Add btrace-conf entry.
5794 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5795 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5796 (target_ops)<read_btrace_conf>: New.
5797 (target_enable_btrace): Update parameters.
5798 (target_read_btrace_conf): New.
5799
5800 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5801
5802 * server.c (handle_btrace_general_set): Remove call to
5803 target_supports_btrace.
5804 (supported_btrace_packets): New.
5805 (handle_query): Call supported_btrace_packets.
5806 * target.h: include btrace-common.h.
5807 (btrace_target_info): Removed.
5808 (supports_btrace, target_supports_btrace): Update parameters.
5809
5810 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5811
5812 * Makefile.in (SFILES): Add common/btrace-common.c.
5813 (OBS): Add common/btrace-common.o.
5814 (btrace-common.o): Add build rules.
5815 * linux-low: Include btrace-common.h.
5816 (linux_low_read_btrace): Use struct btrace_data. Call
5817 btrace_data_init and btrace_data_fini.
5818
5819 2015-02-06 Pedro Alves <palves@redhat.com>
5820
5821 * thread-db.c (find_new_threads_callback): Add debug output.
5822
5823 2015-02-04 Pedro Alves <palves@redhat.com>
5824
5825 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5826 (resume_stopped_resumed_lwps): New function.
5827 (linux_wait_for_event_filtered): Use it.
5828
5829 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5830
5831 * Makefile.in (SFILES): Add linux-personality.c.
5832 (linux-personality.o): New rule.
5833 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5834 list of objects to be built.
5835 * linux-low.c: Include nat/linux-personality.h.
5836 (linux_create_inferior): Remove code to disable address space
5837 randomization (moved to ../nat/linux-personality.c). Create
5838 cleanup to disable address space randomization.
5839
5840 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5841
5842 * Makefile.in (posix-strerror.o): New rule.
5843 (mingw-strerror.o): Likewise.
5844 * configure: Regenerated.
5845 * configure.ac: Source file ../common/common.host. Initialize new
5846 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5847
5848 2015-01-14 Yao Qi <yao@codesourcery.com>
5849
5850 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5851 (ppc-linux.o): New rule.
5852 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5853 * configure.ac: AC_CHECK_FUNCS(getauxval).
5854 * config.in: Re-generated.
5855 * configure: Re-generated.
5856 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5857 ppc64_64bit_inferior_p
5858
5859 2015-01-14 Yao Qi <yao@codesourcery.com>
5860
5861 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5862 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5863 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5864 (PT_ORIG_R3, PT_TRAP): Likewise.
5865 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5866 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5867 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5868
5869 2015-01-10 Joel Brobecker <brobecker@adacore.com>
5870
5871 * i387-fp.c (i387_cache_to_xsave): In look over
5872 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5873 zmmh_low_space field by use of zmmh_high_space.
5874
5875 2015-01-09 Pedro Alves <palves@redhat.com>
5876
5877 * linux-low.c (step_over_bkpt): Move higher up in the file.
5878 (handle_extended_wait): Don't store the stop_pc here.
5879 (get_stop_pc): Adjust comments and rename to ...
5880 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5881 stopped for a software breakpoint or hardware breakpoint.
5882 (thread_still_has_status_pending_p): New function.
5883 (status_pending_p_callback): Use
5884 thread_still_has_status_pending_p. If the event is no longer
5885 interesting, resume the LWP.
5886 (handle_tracepoints): Add assert.
5887 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5888 (wstatus_maybe_breakpoint): New function.
5889 (cancel_breakpoint): Delete function.
5890 (check_stopped_by_watchpoint): New function, factored out from
5891 linux_low_filter_event.
5892 (lp_status_maybe_breakpoint): Delete function.
5893 (linux_low_filter_event): Remove filter_ptid argument.
5894 Leave thread group exits pending here. Store the LWP's stop PC.
5895 Always leave events pending.
5896 (linux_wait_for_event_filtered): Pull all events out of the
5897 kernel, and leave them all pending.
5898 (count_events_callback, select_event_lwp_callback): Consider all
5899 events.
5900 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5901 (select_event_lwp): Only give preference to the stepping LWP in
5902 all-stop mode. Adjust comments.
5903 (ignore_event): New function.
5904 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5905 references to cancel_breakpoints. Adjust to renames. Also give
5906 equal priority to all LWPs that have had events in non-stop mode.
5907 If reporting a software breakpoint event, unadjust the LWP's PC.
5908 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5909 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5910 Adjust.
5911 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5912 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5913 (linux_stopped_by_watchpoint): Adjust.
5914 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5915 * linux-low.h (enum lwp_stop_reason): New.
5916 (struct lwp_info) <stop_pc>: Adjust comment.
5917 <stopped_by_watchpoint>: Delete field.
5918 <stop_reason>: New field.
5919 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5920 * mem-break.c (software_breakpoint_inserted_here)
5921 (hardware_breakpoint_inserted_here): New function.
5922 * mem-break.h (software_breakpoint_inserted_here)
5923 (hardware_breakpoint_inserted_here): Declare.
5924 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5925 (cancel_breakpoints): Delete.
5926 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5927 (upload_fast_traceframes): Remove references to
5928 cancel_breakpoints.
5929
5930 2015-01-09 Pedro Alves <palves@redhat.com>
5931
5932 * thread-db.c (find_new_threads_callback): Ignore thread if the
5933 kernel thread ID is -1.
5934
5935 2015-01-09 Pedro Alves <palves@redhat.com>
5936
5937 * linux-low.c (linux_attach_fail_reason_string): Move to
5938 nat/linux-ptrace.c, and rename.
5939 (linux_attach_lwp): Update comment.
5940 (attach_proc_task_lwp_callback): New function.
5941 (linux_attach): Adjust to rename and use
5942 linux_proc_attach_tgid_threads.
5943 (linux_attach_fail_reason_string): Delete declaration.
5944
5945 2015-01-01 Joel Brobecker <brobecker@adacore.com>
5946
5947 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5948 * server.c (gdbserver_version): Likewise.
5949
5950 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5951
5952 * remote-utils.c: Include ctype.h.
5953 (input_interrupt): Explicitly handle the case when the char
5954 received is the NUL byte. Improve the printing of non-ASCII
5955 characters.
5956
5957 2014-12-16 Joel Brobecker <brobecker@adacore.com>
5958
5959 * linux-low.c (linux_low_filter_event): Update call to
5960 linux_enable_event_reporting following the addition of
5961 a new parameter to that function.
5962
5963 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
5964
5965 PR server/17457
5966 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5967 (AARCH64_FPCR_REGNO): Likewise.
5968 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5969 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5970 (aarch64_store_fpregset): Likewise.
5971
5972 2014-12-15 Joel Brobecker <brobecker@adacore.com>
5973
5974 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5975 Remove FIXME comment about assumption about N.
5976
5977 2014-12-13 Joel Brobecker <brobecker@adacore.com>
5978
5979 * configure.ac: If large-file support is disabled in GDBserver,
5980 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5981 * configure: Regenerate.
5982
5983 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5984
5985 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5986 warning upon ENODATA from ptrace.
5987 * linux-s390-low.c (s390_store_tdb): New.
5988 (s390_regsets): Add regset for NT_S390_TDB.
5989
5990 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5991
5992 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5993 without a fill_function.
5994 * linux-s390-low.c (s390_fill_last_break): Remove.
5995 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5996 (s390_arch_setup): Use regset's size instead of fill_function for
5997 loop end condition.
5998
5999 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6000
6001 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6002 the regset's store function when ptrace returned an error.
6003 * regcache.c (get_thread_regcache): Invalidate register cache
6004 before fetching inferior's registers.
6005
6006 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6007
6008 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6009 while-loop as for-loop.
6010 (regsets_store_inferior_registers): Likewise.
6011
6012 2014-11-28 Yao Qi <yao@codesourcery.com>
6013
6014 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6015 * config.in, configure: Re-generate.
6016 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6017 is defined.
6018
6019 2014-11-21 Yao Qi <yao@codesourcery.com>
6020
6021 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6022 (AC_CHECK_HEADERS): Remove malloc.h.
6023 * configure: Re-generated.
6024 * config.in: Re-generated.
6025 * server.h: Don't include alloca.h and malloc.h.
6026 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6027 Don't include malloc.h.
6028
6029 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6030
6031 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6032 corresponding ERRNO check in same block.
6033
6034 2014-11-12 Pedro Alves <palves@redhat.com>
6035
6036 * server.c (cont_thread): Update comment.
6037 (start_inferior, attach_inferior): No longer clear cont_thread.
6038 (handle_v_cont): No longer set cont_thread.
6039 (captured_main): Clear cont_thread each time a GDB connects.
6040
6041 2014-11-12 Pedro Alves <palves@redhat.com>
6042
6043 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6044 thread, and don't resume all threads if the Hc thread has exited.
6045
6046 2014-11-12 Pedro Alves <palves@redhat.com>
6047
6048 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6049 the process group instead of to a specific LWP.
6050
6051 2014-10-15 Pedro Alves <palves@redhat.com>
6052
6053 PR server/17487
6054 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6055 parameter.
6056 (arm_set_thread_context): Delete.
6057 (the_low_target): Adjust.
6058 * win32-i386-low.c (debug_registers_changed)
6059 (debug_registers_used): Delete.
6060 (update_debug_registers_callback): New function.
6061 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6062 needing to update their debug registers.
6063 (win32_get_current_dr): New function.
6064 (x86_dr_low_get_addr, x86_dr_low_get_control)
6065 (x86_dr_low_get_status): Fetch the debug register from the thread
6066 record's context.
6067 (i386_initial_stuff): Adjust.
6068 (i386_get_thread_context): Remove current_event parameter. Don't
6069 clear debug_registers_changed nor copy DR values to
6070 debug_reg_state.
6071 (i386_set_thread_context): Delete.
6072 (i386_prepare_to_resume): New function.
6073 (i386_thread_added): Mark the thread as needing to update irs
6074 debug registers.
6075 (the_low_target): Remove i386_set_thread_context and install
6076 i386_prepare_to_resume.
6077 * win32-low.c (win32_get_thread_context): Adjust.
6078 (win32_set_thread_context): Use SetThreadContext
6079 directly.
6080 (win32_prepare_to_resume): New function.
6081 (win32_require_context): New function, factored out from ...
6082 (thread_rec): ... this.
6083 (continue_one_thread): Call win32_prepare_to_resume on each thread
6084 we're about to continue.
6085 (win32_resume): Call win32_prepare_to_resume on the event thread.
6086 * win32-low.h (struct win32_thread_info)
6087 <debug_registers_changed>: New field.
6088 (struct win32_target_ops): Change prototype of set_thread_context,
6089 delete set_thread_context and add prepare_to_resume.
6090 (win32_require_context): New declaration.
6091
6092 2014-10-08 Gary Benson <gbenson@redhat.com>
6093
6094 * server.h: Do not include common-exceptions.h.
6095
6096 2014-10-08 Gary Benson <gbenson@redhat.com>
6097
6098 * server.h: Do not include cleanups.h.
6099
6100 2014-09-30 James Hogan <james.hogan@imgtec.com>
6101
6102 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6103 mips64-dsp-linux.c.
6104
6105 2014-09-23 Yao Qi <yao@codesourcery.com>
6106
6107 * linux-low.c (lp_status_maybe_breakpoint): New function.
6108 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6109 (count_events_callback): Likewise.
6110 (select_event_lwp_callback): Likewise.
6111 (cancel_breakpoints_callback): Likewise.
6112
6113 2014-09-19 Don Breazeal <donb@codesourcery.com>
6114
6115 * linux-low.c (handle_extended_wait): Call
6116 linux_ptrace_get_extended_event.
6117 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6118 linux_is_extended_waitstatus.
6119
6120 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6121
6122 * Makefile.in (CPPFLAGS): Define.
6123 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6124 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6125
6126 2014-09-16 Gary Benson <gbenson@redhat.com>
6127
6128 * inferiors.h (current_inferior): Renamed as...
6129 (current_thread): New variable. All uses updated.
6130 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6131 (maybe_move_out_of_jump_pad): Likewise.
6132 (cancel_breakpoint): Likewise.
6133 (linux_low_filter_event): Likewise.
6134 (wait_for_sigstop): Likewise.
6135 (linux_resume_one_lwp): Likewise.
6136 (need_step_over_p): Likewise.
6137 (start_step_over): Likewise.
6138 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6139 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6140 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6141 and save_inferior as saved_thread.
6142 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6143 saved_thread.
6144 (regcache_invalidate_thread): Likewise.
6145 * remote-utils.c (prepare_resume_reply): Likewise.
6146 * thread-db.c (thread_db_get_tls_address): Likewise.
6147 (disable_thread_event_reporting): Likewise.
6148 (remove_thread_event_breakpoints): Likewise.
6149 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6150 as saved_thread.
6151 * target.h (set_desired_inferior): Renamed as...
6152 (set_desired_thread): New declaration. All uses updated.
6153 * server.c (myresume): Updated comment to reference thread instead
6154 of inferior.
6155 (handle_serial_event): Likewise.
6156 (handle_target_event): Likewise.
6157
6158 2014-09-12 Tom Tromey <tromey@redhat.com>
6159 Gary Benson <gbenson@redhat.com>
6160
6161 * regcache.h: Include common-regcache.h.
6162 (regcache_read_pc): Don't declare.
6163 * regcache.c (get_thread_regcache_for_ptid): New function.
6164
6165 2014-09-11 Tom Tromey <tromey@redhat.com>
6166 Gary Benson <gbenson@redhat.com>
6167
6168 * symbol.c: New file.
6169 * Makefile.in (SFILES): Add symbol.c.
6170 (OBS): Add symbol.o.
6171
6172 2014-09-11 Gary Benson <gbenson@redhat.com>
6173
6174 * target.c (target_stop_ptid, target_continue_ptid): New
6175 functions.
6176
6177 2014-09-11 Tom Tromey <tromey@redhat.com>
6178 Gary Benson <gbenson@redhat.com>
6179
6180 * target.h: Include target/target.h.
6181 * target.c (target_read_memory, target_read_uint32)
6182 (target_write_memory): New functions.
6183
6184 2014-09-11 Gary Benson <gbenson@redhat.com>
6185
6186 * server.h (debug_hw_points): Don't declare.
6187 * server.c (debug_hw_points): Don't define. Replace all uses
6188 with show_debug_regs.
6189 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6190 all uses with show_debug_regs.
6191
6192 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6193
6194 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6195 endianness into account.
6196 (ppc_supply_ptrace_register): Likewise.
6197
6198 2014-09-03 James Hogan <james.hogan@imgtec.com>
6199
6200 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6201 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6202
6203 2014-09-03 Gary Benson <gbenson@redhat.com>
6204
6205 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6206 ALL_DEBUG_ADDRESS_REGISTERS.
6207
6208 2014-09-02 Gary Benson <gbenson@redhat.com>
6209
6210 * i386-low.h: Renamed as...
6211 * x86-low.h: New file. All type, function and variable name
6212 prefixes changed from "i386_" to "x86_". All references updated.
6213 * i386-low.c: Renamed as...
6214 * x86-low.c: New file. All type, function and variable name
6215 prefixes changed from "i386_" to "x86_". All references updated.
6216
6217 2014-09-02 Gary Benson <gbenson@redhat.com>
6218
6219 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6220 (x86_linux_new_thread): Likewise.
6221
6222 2014-08-29 Gary Benson <gbenson@redhat.com>
6223
6224 * server.h (setjmp.h): Do not include.
6225 (toplevel): Do not declare.
6226 (common-exceptions.h): Include.
6227 (cleanups.h): Likewise.
6228 * server.c (toplevel): Do not define.
6229 (exit_code): New static global.
6230 (detach_or_kill_for_exit_cleanup): New function.
6231 (main): New function. Original main renamed to...
6232 (captured_main): New function.
6233 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6234
6235 2014-08-29 Gary Benson <gbenson@redhat.com>
6236
6237 * Makefile.in (SFILES): Add common/common-exceptions.c.
6238 (OBS): Add common-exceptions.o.
6239 (common-exceptions.o): New rule.
6240 * utils.c (prepare_to_throw_exception): New function.
6241
6242 2014-08-29 Gary Benson <gbenson@redhat.com>
6243
6244 * config.in: Regenerate.
6245 * configure: Likewise.
6246
6247 2014-08-29 Gary Benson <gbenson@redhat.com>
6248
6249 * Makefile.in (SFILES): Add common/cleanups.c.
6250 (OBS): cleanups.o.
6251 (cleanups.o): New rule.
6252
6253 2014-08-29 Gary Benson <gbenson@redhat.com>
6254
6255 * utils.c (internal_vwarning): New function.
6256
6257 2014-08-28 Gary Benson <gbenson@redhat.com>
6258
6259 * utils.h (fatal): Remove declaration.
6260 * utils.c (fatal): Remove function.
6261
6262 2014-08-28 Gary Benson <gbenson@redhat.com>
6263
6264 * tracepoint.c (gdb_agent_init): Replace fatal with
6265 perror_with_name.
6266 (initialize_tracepoint): Likewise.
6267
6268 2014-08-28 Gary Benson <gbenson@redhat.com>
6269
6270 * remote-utils.c (remote_prepare): Replace fatal with error.
6271
6272 2014-08-28 Gary Benson <gbenson@redhat.com>
6273
6274 * linux-low.c (linux_async): Replace fatal with warning.
6275 Tidy up and return.
6276 (linux_start_non_stop): Return -1 if linux_async failed.
6277
6278 2014-08-28 Gary Benson <gbenson@redhat.com>
6279
6280 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6281 gdb_assert.
6282 (i386_dr_low_get_addr): Remove vague comment.
6283 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6284 gdb_assert.
6285
6286 2014-08-28 Gary Benson <gbenson@redhat.com>
6287
6288 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6289 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6290 internal_error.
6291 (linux_resume_one_lwp): Likewise.
6292 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6293 gdb_assert.
6294 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6295 with internal_error.
6296 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6297 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6298 (find_register_by_name): Replace fatal with internal_error.
6299 (find_regno): Likewise.
6300 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6301 * thread-db.c (thread_db_create_event): Likewise.
6302 (thread_db_load_search): Likewise.
6303 (try_thread_db_load_1): Likewise.
6304 * tracepoint.c (get_jump_space_head): Replace fatal with
6305 internal_error.
6306 (claim_trampoline_space): Likewise.
6307 (have_fast_tracepoint_trampoline_buffer): Likewise.
6308 (cmd_qtstart): Likewise.
6309 (stop_tracing): Likewise.
6310 (fast_tracepoint_collecting): Likewise.
6311 (target_malloc): Likewise.
6312 (download_tracepoint): Likewise.
6313 (download_trace_state_variables): Replace check with gdb_assert.
6314 (upload_fast_traceframes): Replace fatal with internal_error.
6315
6316 2014-08-19 Tom Tromey <tromey@redhat.com>
6317 Gary Benson <gbenson@redhat.com>
6318
6319 * Makefile.in (SFILES): Add common/common-debug.c.
6320 (OBS): Add common-debug.o.
6321 (common-debug.o): New rule.
6322 * debug.h (debug_printf): Don't declare.
6323 * debug.c (debug_printf): Renamed and rewritten as...
6324 (debug_vprintf): New function.
6325
6326 2014-08-19 Gary Benson <gbenson@redhat.com>
6327
6328 * utils.h: Do not include print-utils.h.
6329
6330 2014-08-19 Tom Tromey <tromey@redhat.com>
6331 Gary Benson <gbenson@redhat.com>
6332
6333 * server.h: Add static assertion.
6334 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6335
6336 2014-08-19 Tom Tromey <tromey@redhat.com>
6337 Gary Benson <gbenson@redhat.com>
6338
6339 * Makefile.in (SFILES): Add common/errors.c.
6340 (OBS): Add errors.o.
6341 (IPA_OBS): Add errors-ipa.o.
6342 (errors.o): New rule.
6343 (errors-ipa.o): Likewise.
6344 * utils.h (perror_with_name, error, warning): Don't declare.
6345 * utils.c (warning): Renamed and rewritten as...
6346 (vwarning): New function.
6347 (error): Renamed and rewritten as...
6348 (verror): New function.
6349 (internal_error): Renamed and rewritten as...
6350 (internal_verror): New function.
6351
6352 2014-08-07 Gary Benson <gbenson@redhat.com>
6353
6354 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6355 * configure: Regenerate.
6356 * config.in: Likewise.
6357 * server.h: Do not include errno.h.
6358 * event-loop.c: Likewise.
6359 * hostio-errno.c: Likewise.
6360 * linux-low.c: Likewise.
6361 * remote-utils.c: Likewise.
6362 * spu-low.c: Likewise.
6363 * utils.c: Likewise.
6364 * gdbreplay.c: Unconditionally include errno.h.
6365
6366 2014-08-07 Gary Benson <gbenson@redhat.com>
6367
6368 * server.h: Do not include string.h.
6369 * event-loop.c: Likewise.
6370 * linux-low.c: Likewise.
6371 * regcache.c: Likewise.
6372 * remote-utils.c: Likewise.
6373 * spu-low.c: Likewise.
6374 * utils.c: Likewise.
6375
6376 2014-08-07 Gary Benson <gbenson@redhat.com>
6377
6378 * server.h: Do not include gdb_assert.h.
6379
6380 2014-08-07 Gary Benson <gbenson@redhat.com>
6381
6382 * server.h: Do not include common-utils.h.
6383
6384 2014-08-07 Gary Benson <gbenson@redhat.com>
6385
6386 * server.h: Do not include ptid.h.
6387 * notif.h: Likewise.
6388
6389 2014-08-07 Gary Benson <gbenson@redhat.com>
6390
6391 * server.h: Do not include gdb_locale.h.
6392
6393 2014-08-07 Gary Benson <gbenson@redhat.com>
6394
6395 * server.h: Do not include gdb/signals.h.
6396 * win32-low.c: Likewise.
6397
6398 2014-08-07 Gary Benson <gbenson@redhat.com>
6399
6400 * server.h: Do not include pathmax.h.
6401
6402 2014-08-07 Gary Benson <gbenson@redhat.com>
6403
6404 * server.h: Do not include libiberty.h.
6405 * linux-bfin-low.c: Likewise.
6406
6407 2014-08-07 Gary Benson <gbenson@redhat.com>
6408
6409 * server.h: Do not include ansidecl.h.
6410
6411 2014-08-07 Gary Benson <gbenson@redhat.com>
6412
6413 * linux-x86-low.c: Do not include stddef.h.
6414 * lynx-ppc-low.c: Likewise.
6415 * tracepoint.c: Likewise.
6416
6417 2014-08-07 Gary Benson <gbenson@redhat.com>
6418
6419 * server.h: Do not include stdarg.h.
6420 * nto-low.c: Likewise.
6421
6422 2014-08-07 Gary Benson <gbenson@redhat.com>
6423
6424 * server.h: Do not include stdlib.h.
6425 * inferiors.c: Likewise.
6426 * linux-low.c: Likewise.
6427 * regcache.c: Likewise.
6428 * spu-low.c: Likewise.
6429 * tracepoint.c: Likewise.
6430 * utils.c: Likewise.
6431
6432 2014-08-07 Gary Benson <gbenson@redhat.com>
6433
6434 * server.h: Do not include stdio.h.
6435 * linux-low.c: Likewise.
6436 * remote-utils.c: Likewise.
6437 * spu-low.c: Likewise.
6438 * utils.c: Likewise.
6439 * wincecompat.c: Likewise.
6440
6441 2014-08-06 Gary Benson <gbenson@redhat.com>
6442
6443 * regcache.c (init_register_cache): Move conditionals inside if.
6444
6445 2014-08-06 Gary Benson <gbenson@redhat.com>
6446
6447 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6448
6449 2014-07-31 Gary Benson <gbenson@redhat.com>
6450
6451 * ax.h: Do not include server.h.
6452 * gdbthread.h: Likewise.
6453 * lynx-low.h: Likewise.
6454 * notif.h: Likewise.
6455
6456 2014-07-30 Gary Benson <gbenson@redhat.com>
6457
6458 * server.h: Include common-defs.h.
6459 Do not include config.h or build-gnulib-gdbserver/config.h.
6460
6461 2014-07-30 Gary Benson <gbenson@redhat.com>
6462
6463 * hostio-errno.c: Move server.h to top of includes list.
6464 * inferiors.c: Likewise.
6465 * linux-x86-low.c: Likewise.
6466 * notif.c: Include server.h.
6467
6468 2014-07-24 Tom Tromey <tromey@redhat.com>
6469 Gary Benson <gbenson@redhat.com>
6470
6471 * server.h (CORE_ADDR): Now unsigned.
6472
6473 2014-07-16 Pedro Alves <palves@redhat.com>
6474
6475 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6476
6477 2014-07-15 Pedro Alves <palves@redhat.com>
6478
6479 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6480 copy.
6481
6482 2014-07-11 Pedro Alves <palves@redhat.com>
6483
6484 * linux-low.c (kill_wait_lwp): New function, based on
6485 kill_one_lwp_callback, but use my_waitpid directly.
6486 (kill_one_lwp_callback, linux_kill): Use it.
6487
6488 2014-06-23 Pedro Alves <palves@redhat.com>
6489
6490 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6491 before setting DR0..DR3.
6492
6493 2014-06-20 Gary Benson <gbenson@redhat.com>
6494
6495 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6496 * configure: Regenerated.
6497 * config.in: Likewise.
6498
6499 2014-06-20 Gary Benson <gbenson@redhat.com>
6500
6501 * Makefile.in (SFILES): Update locations for files moved
6502 from common to nat.
6503 (object file files): Reordered.
6504
6505 2014-06-20 Gary Benson <gbenson@redhat.com>
6506
6507 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6508 (i386_dr_low_set_addr): Likewise.
6509 (i386_dr_low_get_addr): Likewise.
6510 (i386_dr_low_can_set_control): Likewise.
6511 (i386_dr_low_set_control): Likewise.
6512 (i386_dr_low_get_control): Likewise.
6513 (i386_dr_low_get_status): Likewise.
6514 (i386_get_debug_register_length): Likewise.
6515 * linux-x86-low.c (i386_dr_low_set_addr):
6516 Changed signature. Made static.
6517 (i386_dr_low_get_addr): Likewise.
6518 (i386_dr_low_set_control): Likewise.
6519 (i386_dr_low_get_control): Likewise.
6520 (i386_dr_low_get_status): Likewise.
6521 (i386_dr_low): New global variable.
6522 * win32-i386-low.c (i386_dr_low_set_addr):
6523 Changed signature. Made static.
6524 (i386_dr_low_get_addr): Likewise.
6525 (i386_dr_low_set_control): Likewise.
6526 (i386_dr_low_get_control): Likewise.
6527 (i386_dr_low_get_status): Likewise.
6528 (i386_dr_low): New global variable.
6529
6530 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6531
6532 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6533 * Makefile.in (AR, AR_FLAGS): Define.
6534 * configure: Regenerate.
6535
6536 2014-06-19 Gary Benson <gbenson@redhat.com>
6537
6538 * Makefile.in (i386-dregs.o): New rule.
6539 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6540 * i386-low.c (target.h): Remove include.
6541 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6542 (DR_CONTROL_SHIFT): Likewise.
6543 (DR_CONTROL_SIZE): Likewise.
6544 (DR_RW_EXECUTE): Likewise.
6545 (DR_RW_WRITE): Likewise.
6546 (DR_RW_READ): Likewise.
6547 (DR_RW_IORW): Likewise.
6548 (DR_LEN_1): Likewise.
6549 (DR_LEN_2): Likewise.
6550 (DR_LEN_4): Likewise.
6551 (DR_LEN_8): Likewise.
6552 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6553 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6554 (DR_ENABLE_SIZE): Likewise.
6555 (DR_LOCAL_SLOWDOWN): Likewise.
6556 (DR_GLOBAL_SLOWDOWN): Likewise.
6557 (DR_CONTROL_RESERVED): Likewise.
6558 (I386_DR_CONTROL_MASK): Likewise.
6559 (I386_DR_VACANT): Likewise.
6560 (I386_DR_LOCAL_ENABLE): Likewise.
6561 (I386_DR_GLOBAL_ENABLE): Likewise.
6562 (I386_DR_DISABLE): Likewise.
6563 (I386_DR_SET_RW_LEN): Likewise.
6564 (I386_DR_GET_RW_LEN): Likewise.
6565 (I386_DR_WATCH_HIT): Likewise.
6566 (i386_wp_op_t): Likewise.
6567 (i386_show_dr): Likewise.
6568 (i386_length_and_rw_bits): Likewise.
6569 (i386_insert_aligned_watchpoint): Likewise.
6570 (i386_remove_aligned_watchpoint): Likewise.
6571 (i386_handle_nonaligned_watchpoint): Likewise.
6572 i386_update_inferior_debug_regs(): Likewise.
6573 (i386_dr_insert_watchpoint): Likewise.
6574 (i386_dr_remove_watchpoint): Likewise.
6575 (i386_dr_region_ok_for_watchpoint): Likewise.
6576 (i386_dr_stopped_data_address): Likewise.
6577 (i386_dr_stopped_by_watchpoint): Likewise.
6578
6579 2014-06-19 Gary Benson <gbenson@redhat.com>
6580
6581 * i386-low.c (i386_dr_show): Renamed to
6582 i386_show_dr and made static. All uses updated.
6583 (i386_dr_length_and_rw_bits): Renamed to
6584 i386_length_and_rw_bits and made static.
6585 All uses updated.
6586 (i386_dr_insert_aligned_watchpoint): Renamed to
6587 i386_insert_aligned_watchpoint and made static.
6588 All uses updated.
6589 (i386_dr_remove_aligned_watchpoint): Renamed to
6590 i386_remove_aligned_watchpoint and made static.
6591 All uses updated.
6592 (i386_dr_update_inferior_debug_regs): Renamed to
6593 i386_update_inferior_debug_regs and made static.
6594 All uses updated.
6595
6596 2014-06-18 Gary Benson <gbenson@redhat.com>
6597
6598 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6599 (i386_dr_low_can_set_control): Likewise.
6600 (i386_get_debug_register_length): Likewise.
6601 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6602 (i386_dr_low_can_set_control): Likewise.
6603 (i386_get_debug_register_length): Likewise.
6604
6605 2014-06-17 Gary Benson <gbenson@redhat.com>
6606
6607 * i386-low.h (i386-dregs.h): New include.
6608 (DR_FIRSTADDR): Now in i386-dregs.h.
6609 (DR_LASTADDR): Likewise.
6610 (DR_NADDR): Likewise.
6611 (DR_STATUS): Likewise.
6612 (DR_CONTROL): Likewise.
6613 (i386_debug_reg_state): Likewise.
6614 (i386_dr_insert_watchpoint): Likewise.
6615 (i386_dr_remove_watchpoint): Likewise.
6616 (i386_dr_region_ok_for_watchpoint): Likewise.
6617 (i386_dr_stopped_data_address): Likewise.
6618 (i386_dr_stopped_by_watchpoint): Likewise.
6619 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6620
6621 2014-06-18 Gary Benson <gbenson@redhat.com>
6622
6623 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6624 i386_dr_insert_watchpoint.
6625 (i386_low_remove_watchpoint): Renamed to
6626 i386_dr_remove_watchpoint.
6627 (i386_low_region_ok_for_watchpoint): Renamed to
6628 i386_dr_region_ok_for_watchpoint.
6629 (i386_low_stopped_data_address): Renamed to
6630 i386_dr_stopped_data_address.
6631 (i386_low_stopped_by_watchpoint): Renamed to
6632 i386_dr_stopped_by_watchpoint.
6633 * i386-low.c (i386_show_dr): Renamed to
6634 i386_dr_show and made nonstatic. All uses updated.
6635 (i386_length_and_rw_bits): Renamed to
6636 i386_dr_length_and_rw_bits and made nonstatic.
6637 All uses updated.
6638 (i386_insert_aligned_watchpoint): Renamed to
6639 i386_dr_insert_aligned_watchpoint and made nonstatic.
6640 All uses updated.
6641 (i386_remove_aligned_watchpoint): Renamed to
6642 i386_dr_remove_aligned_watchpoint and made nonstatic.
6643 All uses updated.
6644 (i386_update_inferior_debug_regs): Renamed to
6645 i386_dr_update_inferior_debug_regs and made nonstatic.
6646 All uses updated.
6647 (i386_low_insert_watchpoint): Renamed to
6648 i386_dr_insert_watchpoint. All uses updated.
6649 (i386_low_remove_watchpoint): Renamed to
6650 i386_dr_remove_watchpoint. All uses updated.
6651 (i386_low_region_ok_for_watchpoint): Renamed to
6652 i386_dr_region_ok_for_watchpoint. All uses updated.
6653 (i386_low_stopped_data_address): Renamed to
6654 i386_dr_stopped_data_address. All uses updated.
6655 (i386_low_stopped_by_watchpoint): Renamed to
6656 i386_dr_stopped_by_watchpoint. All uses updated.
6657
6658 2014-06-18 Gary Benson <gbenson@redhat.com>
6659
6660 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6661 (i386_dr_low_can_set_control): Likewise.
6662 (i386_insert_aligned_watchpoint): New check.
6663
6664 2014-06-18 Gary Benson <gbenson@redhat.com>
6665
6666 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6667 Renamed to state.
6668
6669 2014-06-18 Gary Benson <gbenson@redhat.com>
6670
6671 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6672 instead of fatal and error.
6673 (i386_handle_nonaligned_watchpoint): Likewise.
6674
6675 2014-06-18 Gary Benson <gbenson@redhat.com>
6676
6677 * i386-low.c (i386_get_debug_register_length): New macro.
6678 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6679 (i386_show_dr): Use debug_printf instead of fprintf. Use
6680 phex to format values.
6681
6682 2014-06-18 Gary Benson <gbenson@redhat.com>
6683
6684 * i386-low.h: Comment changes.
6685 * i386-low.c: Likewise.
6686
6687 2014-06-18 Gary Benson <gbenson@redhat.com>
6688
6689 * i386-low.c: Whitespace changes.
6690
6691 2014-06-12 Tom Tromey <tromey@redhat.com>
6692
6693 * utils.c (freeargv): Remove.
6694
6695 2014-06-12 Tom Tromey <tromey@redhat.com>
6696
6697 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6698 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6699 (parse_debug_format_options): Likewise.
6700 (gdbserver_usage): Likewise.
6701 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6702 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6703 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6704 against libiberty.
6705 ($(LIBGNU)): Depend on libiberty.
6706 (all-lib): Recurse into all subdirs.
6707 (install-only): Invoke "install" target in subdirs.
6708 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6709 targets.
6710 * configure: Rebuild.
6711 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6712 for vasprintf, vsnprintf, or gettimeofday.
6713 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6714 srv_tgtobj.
6715
6716 2014-06-05 Joel Brobecker <brobecker@adacore.com>
6717
6718 * development.sh: Delete.
6719 * Makefile.in (config.status): Adjust dependency on development.sh.
6720 * configure.ac: Adjust development.sh source call.
6721 * configure: Regenerate.
6722
6723 2014-06-02 Pedro Alves <palves@redhat.com>
6724
6725 * ax.c (gdb_free_agent_expr): New function.
6726 * ax.h (gdb_free_agent_expr): New declaration.
6727 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6728 list.
6729 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6730 static.
6731 (clear_breakpoint_conditions_and_commands): New function.
6732 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6733 (clear_breakpoint_conditions_and_commands): New declaration.
6734
6735 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6736
6737 * linux-aarch64-low.c (asm/ptrace.h): Include.
6738
6739 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6740
6741 Fix TLS access for -static -pthread.
6742 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6743 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6744 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6745
6746 2014-05-20 Pedro Alves <palves@redhat.com>
6747
6748 * linux-aarch64-low.c (aarch64_insert_point)
6749 (aarch64_remove_point): No longer check whether the type is
6750 supported here. Adjust to new interface.
6751 (the_low_target): Install aarch64_supports_z_point_type as
6752 supports_z_point_type method.
6753 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6754 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6755 instead of a Z packet char. Adjust.
6756 (arm_supports_z_point_type): New function.
6757 (arm_insert_point, arm_remove_point): Adjust to new interface.
6758 (the_low_target): Install arm_supports_z_point_type.
6759 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6760 (cris_insert_point, cris_remove_point): Adjust to new interface.
6761 Don't check whether the type is supported here.
6762 (the_low_target): Install cris_supports_z_point_type.
6763 * linux-low.c (linux_supports_z_point_type): New function.
6764 (linux_insert_point, linux_remove_point): Adjust to new interface.
6765 * linux-low.h (struct linux_target_ops) <insert_point,
6766 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6767 raw_breakpoint pointer parameter.
6768 <supports_z_point_type>: New method.
6769 * linux-mips-low.c (mips_supports_z_point_type): New function.
6770 (mips_insert_point, mips_remove_point): Adjust to new interface.
6771 Use mips_supports_z_point_type.
6772 (the_low_target): Install mips_supports_z_point_type.
6773 * linux-ppc-low.c (the_low_target): Install NULL as
6774 supports_z_point_type method.
6775 * linux-s390-low.c (the_low_target): Install NULL as
6776 supports_z_point_type method.
6777 * linux-sparc-low.c (the_low_target): Install NULL as
6778 supports_z_point_type method.
6779 * linux-x86-low.c (x86_supports_z_point_type): New function.
6780 (x86_insert_point): Adjust to new insert_point interface. Use
6781 insert_memory_breakpoint. Adjust to new
6782 i386_low_insert_watchpoint interface.
6783 (x86_remove_point): Adjust to remove_point interface. Use
6784 remove_memory_breakpoint. Adjust to new
6785 i386_low_remove_watchpoint interface.
6786 (the_low_target): Install x86_supports_z_point_type.
6787 * lynx-low.c (lynx_target_ops): Install NULL as
6788 supports_z_point_type callback.
6789 * nto-low.c (nto_supports_z_point_type): New.
6790 (nto_insert_point, nto_remove_point): Adjust to new interface.
6791 (nto_target_ops): Install nto_supports_z_point_type.
6792 * mem-break.c: Adjust intro comment.
6793 (struct raw_breakpoint) <raw_type, size>: New fields.
6794 <inserted>: Update comment.
6795 <shlib_disabled>: Delete field.
6796 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6797 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6798 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6799 (raw_bkpt_type_to_target_hw_bp_type): New function.
6800 (find_enabled_raw_code_breakpoint_at): New function.
6801 (find_raw_breakpoint_at): New type and size parameters. Use them.
6802 (insert_memory_breakpoint): New function, based off
6803 set_raw_breakpoint_at.
6804 (remove_memory_breakpoint): New function.
6805 (set_raw_breakpoint_at): Reimplement.
6806 (set_breakpoint): New, based on set_breakpoint_at.
6807 (set_breakpoint_at): Reimplement.
6808 (delete_raw_breakpoint): Go through the_target->remove_point
6809 instead of assuming memory breakpoints.
6810 (find_gdb_breakpoint_at): Delete.
6811 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6812 (find_gdb_breakpoint): New function.
6813 (set_gdb_breakpoint_at): Delete.
6814 (z_type_supported): New function.
6815 (set_gdb_breakpoint_1): New function, loosely based off
6816 set_gdb_breakpoint_at.
6817 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6818 (delete_gdb_breakpoint_at): Delete.
6819 (delete_gdb_breakpoint_1): New function, loosely based off
6820 delete_gdb_breakpoint_at.
6821 (delete_gdb_breakpoint): New function.
6822 (clear_gdb_breakpoint_conditions): Rename to ...
6823 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6824 breakpoint.
6825 (add_condition_to_breakpoint): Make static.
6826 (add_breakpoint_condition): Take a struct breakpoint pointer
6827 instead of an address. Adjust.
6828 (gdb_condition_true_at_breakpoint): Rename to ...
6829 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6830 z_type parameter.
6831 (gdb_condition_true_at_breakpoint): Reimplement.
6832 (add_breakpoint_commands): Take a struct breakpoint pointer
6833 instead of an address. Adjust.
6834 (gdb_no_commands_at_breakpoint): Rename to ...
6835 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6836 parameter. Return true if no breakpoint was found. Change debug
6837 output.
6838 (gdb_no_commands_at_breakpoint): Reimplement.
6839 (run_breakpoint_commands): Rename to ...
6840 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6841 and change return type to boolean.
6842 (run_breakpoint_commands): New function.
6843 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6844 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6845 breakpoint. Go through the_target->remove_point instead of
6846 assuming memory breakpoint.
6847 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6848 software and hardware breakpoints.
6849 (reinsert_raw_breakpoint): Go through the_target->insert_point
6850 instead of assuming memory breakpoint.
6851 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6852 software and hardware breakpoints.
6853 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6854 Check both software and hardware breakpoints.
6855 (validate_inserted_breakpoint): Assert the breakpoint is a
6856 software breakpoint. Set the inserted flag to -1 instead of
6857 setting shlib_disabled.
6858 (delete_disabled_breakpoints): Adjust.
6859 (validate_breakpoints): Only validate software breakpoints.
6860 Adjust to inserted flag change.
6861 (check_mem_read, check_mem_write): Skip breakpoint types other
6862 than software breakpoints. Adjust to inserted flag change.
6863 * mem-break.h (enum raw_bkpt_type): New enum.
6864 (raw_breakpoint, struct process_info): Forward declare.
6865 (Z_packet_to_target_hw_bp_type): Delete declaration.
6866 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6867 (set_gdb_breakpoint, delete_gdb_breakpoint)
6868 (clear_breakpoint_conditions): New declarations.
6869 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6870 (breakpoint_inserted_here): Update comment.
6871 (add_breakpoint_condition, add_breakpoint_commands): Replace
6872 address parameter with a breakpoint pointer parameter.
6873 (gdb_breakpoint_here): Update comment.
6874 (delete_gdb_breakpoint_at): Delete.
6875 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6876 * server.c (process_point_options): Take a struct breakpoint
6877 pointer instead of an address. Adjust.
6878 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6879 delete_gdb_breakpoint.
6880 * spu-low.c (spu_target_ops): Install NULL as
6881 supports_z_point_type method.
6882 * target.h: Include mem-break.h.
6883 (struct target_ops) <prepare_to_access_memory>: Update comment.
6884 <supports_z_point_type>: New field.
6885 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6886 instead of a char. Also take a raw breakpoint pointer.
6887 * win32-arm-low.c (the_low_target): Install NULL as
6888 supports_z_point_type.
6889 * win32-i386-low.c (i386_supports_z_point_type): New function.
6890 (i386_insert_point, i386_remove_point): Adjust to new interface.
6891 (the_low_target): Install i386_supports_z_point_type.
6892 * win32-low.c (win32_supports_z_point_type): New function.
6893 (win32_insert_point, win32_remove_point): Adjust to new interface.
6894 (win32_target_ops): Install win32_supports_z_point_type.
6895 * win32-low.h (struct win32_target_ops):
6896 <supports_z_point_type>: New method.
6897 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6898 instead of a char. Also take a raw breakpoint pointer.
6899
6900 2014-05-20 Pedro Alves <palves@redhat.com>
6901
6902 * mem-break.h: Include break-common.h.
6903 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6904 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6905 (Z_packet_to_target_hw_bp_type): New declaration.
6906 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6907 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6908 (Z_PACKET_ACCESS_WP): Delete macros.
6909 (Z_packet_to_hw_type): Delete function.
6910 * i386-low.h: Don't include break-common.h here.
6911 (Z_packet_to_hw_type): Delete declaration.
6912 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6913 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6914 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6915 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6916 * linux-aarch64-low.c: Don't include break-common.h here.
6917 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6918 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6919 (Z_packet_to_target_hw_bp_type): Delete function.
6920 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6921 function.
6922 (mips_insert_point, mips_remove_point): Use
6923 Z_packet_to_target_hw_bp_type.
6924
6925 2014-05-20 Pedro Alves <palves@redhat.com>
6926
6927 * linux-aarch64-low.c: Include break-common.h.
6928 (enum target_point_type): Delete.
6929 (Z_packet_to_point_type): Rename to ...
6930 (Z_packet_to_target_hw_bp_type): ... this, and return a
6931 target_hw_bp_type instead.
6932 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6933 instead of an enum target_point_type.
6934 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6935 breakpoint type.
6936 (aarch64_dr_state_insert_one_point)
6937 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6938 (aarch64_handle_aligned_watchpoint)
6939 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6940 Take an enum target_hw_bp_type instead of an enum
6941 target_point_type.
6942 (aarch64_supports_z_point_type): New function.
6943 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6944 use Z_packet_to_target_hw_bp_type.
6945
6946 2014-05-20 Joel Brobecker <brobecker@adacore.com>
6947
6948 * configure.ac: Only use -Werror by default when DEVELOPMENT
6949 is true.
6950 * configure: Regenerate.
6951
6952 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6953
6954 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6955 * linux-x86-low.c (X86_64_USER_REGS): New.
6956 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6957
6958 2014-04-28 Yao Qi <yao@codesourcery.com>
6959
6960 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6961 name.
6962
6963 2014-04-25 Pedro Alves <palves@redhat.com>
6964
6965 PR server/16255
6966 * linux-low.c (linux_attach_fail_reason_string): New function.
6967 (linux_attach_lwp): Delete.
6968 (linux_attach_lwp_1): Rename to ...
6969 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6970 argument. Remove "initial" parameter. Return int instead of
6971 void. Don't error or warn here.
6972 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6973 failure to attach to the tgid. Call warning when failing to
6974 attach to an lwp.
6975 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6976 argument. Remove "initial" parameter. Return int instead of
6977 void. Don't error or warn here.
6978 (linux_attach_fail_reason_string): New declaration.
6979 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6980 interface change. Use linux_attach_fail_reason_string.
6981
6982 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
6983 Walfred Tedeschi <walfred.tedeschi@intel.com>
6984
6985 * Makefile.in: Added rules to handle new files
6986 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6987 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6988 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6989 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6990 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6991 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6992 x32-avx512-linux.o.
6993 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6994 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6995 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6996 i386/x32-avx512.xml.
6997 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6998 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6999 i386/x32-avx512-linux.xml.
7000 * i387-fp.c (num_avx512_k_registers): New constant for number
7001 of K registers.
7002 (num_avx512_zmmh_low_registers): New constant for number of
7003 lower ZMM registers (0-15).
7004 (num_avx512_zmmh_high_registers): New constant for number of
7005 higher ZMM registers (16-31).
7006 (num_avx512_ymmh_registers): New contant for number of higher
7007 YMM registers (ymm16-31 added by avx521 on x86_64).
7008 (num_avx512_xmm_registers): New constant for number of higher
7009 XMM registers (xmm16-31 added by AVX512 on x86_64).
7010 (struct i387_xsave): Add space for AVX512 registers.
7011 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7012 Add code to handle AVX512 registers.
7013 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7014 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7015 prototypei from generated file.
7016 (tdesc_amd64_avx512_linux): Likewise.
7017 (init_registers_x32_avx512_linux): Likewise.
7018 (tdesc_x32_avx512_linux): Likewise.
7019 (init_registers_i386_avx512_linux): Likewise.
7020 (tdesc_i386_avx512_linux): Likewise.
7021 (x86_64_regmap): Add AVX512 registers.
7022 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7023 mask.
7024 (initialize_low_arch): Add code to initialize AVX512 registers.
7025
7026 2014-04-23 Pedro Alves <palves@redhat.com>
7027
7028 * mem-break.c (find_gdb_breakpoint_at): Make static.
7029 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7030
7031 2014-04-23 Pedro Alves <palves@redhat.com>
7032
7033 * i386-low.c: Don't include break-common.h here.
7034 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7035 prototype to take target_hw_bp_type as argument instead of a Z
7036 packet char.
7037 * i386-low.h: Include break-common.h here.
7038 (Z_packet_to_hw_type): Declare.
7039 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7040 prototypes.
7041 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7042 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7043 (x86_remove_point): Convert the packet number to a
7044 target_hw_bp_type before calling i386_low_remove_watchpoint.
7045 * win32-i386-low.c (i386_insert_point): Convert the packet number
7046 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7047 (i386_remove_point): Convert the packet number to a
7048 target_hw_bp_type before calling i386_low_remove_watchpoint.
7049
7050 2014-04-23 Pedro Alves <palves@redhat.com>
7051
7052 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7053
7054 2014-04-10 Pedro Alves <palves@redhat.com>
7055
7056 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7057 Check if the condition or command is NULL before checking if the
7058 breakpoint is known. On success, return true.
7059 * mem-break.h (add_breakpoint_condition): Document return.
7060 (add_breakpoint_commands): Add describing comment.
7061 * server.c (skip_to_semicolon): New function.
7062 (process_point_options): Use it.
7063
7064 2014-04-09 Pedro Alves <palves@redhat.com>
7065
7066 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7067 to lwpid_of.
7068
7069 2014-02-27 Pedro Alves <palves@redhat.com>
7070
7071 PR 12702
7072 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7073 macros.
7074 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7075 output.
7076 (last_thread_of_process_p): Take a PID argument instead of a
7077 thread pointer.
7078 (linux_wait_for_lwp): Delete.
7079 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7080 functions.
7081 (linux_low_filter_event): New function, party factored out from
7082 linux_wait_for_event.
7083 (linux_wait_for_event): Rename to ...
7084 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7085 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7086 sigsuspend. Check for zombie leaders.
7087 (linux_wait_for_event): Reimplement as wrapper around
7088 linux_wait_for_event_filtered.
7089 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7090 a normal or signal exit is seen, it's the whole process exiting.
7091 (wait_for_sigstop): No longer a for_each_inferior callback.
7092 Rewrite on top of linux_wait_for_event_filtered.
7093 (stop_all_lwps): Call wait_for_sigstop directly.
7094 * server.c (resume, handle_target_event): Handle
7095 TARGET_WAITKIND_NO_RESUMED.
7096
7097 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7098
7099 * win32-low.c (psapi_get_dll_name,
7100 * win32_CreateToolhelp32Snapshot): Delete.
7101 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7102 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7103 Delete.
7104 (handle_load_dll): Add function description.
7105 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7106
7107 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7108
7109 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7110 Add comment.
7111 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7112 base address when calling win32_add_one_solib.
7113 (handle_load_dll): Delete local variable load_addr.
7114 Remove 0x1000 offset applied to DLL base address when calling
7115 win32_add_one_solib.
7116 (handle_unload_dll): Add comment.
7117
7118 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7119
7120 * win32-low.c (win32_add_all_dlls): Renames
7121 win32_ensure_ntdll_loaded. Rewrite function documentation.
7122 Adjust implementation to always load all DLLs.
7123 Add 0x1000 offset to DLL base address when calling
7124 win32_add_one_solib.
7125 (child_initialization_done): New static global.
7126 (do_initial_child_stuff): Set child_initialization_done to
7127 zero during child initialization, and 1 after. Replace call
7128 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7129 Add comment.
7130 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7131 (handle_unload_dll): Add function documentation.
7132 (get_child_debug_event): Ignore load and unload DLL events
7133 during child initialization.
7134
7135 2014-02-20 Doug Evans <dje@google.com>
7136
7137 Remove global all_lwps.
7138 * inferiors.h (ptid_of): Move here from linux-low.h.
7139 (pid_of, lwpid_of): Ditto.
7140 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7141 parameter is a struct thread_info * now.
7142 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7143 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7144 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7145 directly.
7146 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7147 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7148 * linux-arm-low.c (update_registers_callback): Update, "entry"
7149 parameter is a struct thread_info * now.
7150 Fetch lwpid from current_inferior directly.
7151 (arm_insert_point): Pass &all_threads to find_inferior instead of
7152 &all_lwps.
7153 (arm_remove_point): Ditto.
7154 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7155 (arm_prepare_to_resume): Fetch pid from thread.
7156 (arm_read_description): Fetch lwpid from current_inferior directly.
7157 * linux-low.c (all_lwps): Delete.
7158 (delete_lwp): Delete call to remove_inferior.
7159 (handle_extended_wait): Fetch lwpid from thread.
7160 (add_lwp): Don't set lwp->entry.id. Remove call to
7161 add_inferior_to_list.
7162 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7163 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7164 (kill_one_lwp_callback): Ditto.
7165 (linux_kill): Don't dereference NULL pointer.
7166 Fetch ptid,lwpid from thread.
7167 (get_detach_signal): Fetch ptid from thread.
7168 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7169 Simplify call to regcache_invalidate_thread.
7170 (delete_lwp_callback): Update, "entry" parameter is a
7171 struct thread_info * now. Fetch pid from thread.
7172 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7173 (status_pending_p_callback): Update, "entry" parameter is a
7174 struct thread_info * now. Fetch ptid from thread.
7175 (find_lwp_pid): Update, "entry" parameter is a
7176 struct thread_info * now.
7177 (linux_wait_for_lwp): Fetch pid from thread.
7178 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7179 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7180 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7181 (dequeue_one_deferred_signal): Ditto.
7182 (cancel_breakpoint): Fetch ptid from current_inferior.
7183 (linux_wait_for_event): Pass &all_threads to find_inferior,
7184 not &all_lwps. Fetch ptid, lwpid from thread.
7185 (count_events_callback): Update, "entry" parameter is a
7186 struct thread_info * now.
7187 (select_singlestep_lwp_callback): Ditto.
7188 (select_event_lwp_callback): Ditto.
7189 (cancel_breakpoints_callback): Ditto.
7190 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7191 not &all_lwps.
7192 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7193 (unsuspend_one_lwp): Update, "entry" parameter is a
7194 struct thread_info * now.
7195 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7196 not &all_lwps.
7197 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7198 Fetch lwpid from thread, not lwp.
7199 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7200 Pass &all_threads to find_inferior, not &all_lwps.
7201 (send_sigstop): Fetch lwpid from thread, not lwp.
7202 (send_sigstop_callback): Update, "entry" parameter is a
7203 struct thread_info * now.
7204 (suspend_and_send_sigstop_callback): Ditto.
7205 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7206 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7207 struct thread_info * now.
7208 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7209 from thread, lwp.
7210 (lwp_running): Update, "entry" parameter is a
7211 struct thread_info * now.
7212 (stop_all_lwps): Fetch ptid from thread.
7213 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7214 (linux_resume_one_lwp): Fetch lwpid from thread.
7215 (linux_set_resume_request): Update, "entry" parameter is a
7216 struct thread_info * now. Fetch pid, lwpid from thread.
7217 (resume_status_pending_p): Update, "entry" parameter is a
7218 struct thread_info * now.
7219 (need_step_over_p): Ditto. Fetch lwpid from thread.
7220 (start_step_over): Fetch lwpid from thread.
7221 (linux_resume_one_thread): Update, "entry" parameter is a
7222 struct thread_info * now. Fetch lwpid from thread.
7223 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7224 (proceed_one_lwp): Update, "entry" parameter is a
7225 struct thread_info * now. Fetch lwpid from thread.
7226 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7227 struct thread_info * now.
7228 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7229 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7230 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7231 directly.
7232 (regsets_store_inferior_registers): Ditto.
7233 (fetch_register, store_register): Ditto.
7234 (linux_read_memory, linux_write_memory): Ditto.
7235 (linux_request_interrupt): Ditto.
7236 (linux_read_auxv): Ditto.
7237 (linux_xfer_siginfo): Ditto.
7238 (linux_qxfer_spu): Ditto.
7239 (linux_qxfer_libraries_svr4): Ditto.
7240 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7241 moved to inferiors.h.
7242 (get_lwp): Delete.
7243 (get_thread_lwp): Update.
7244 (struct lwp_info): Delete member "entry". Simplify comment for
7245 member "thread".
7246 (all_lwps): Delete.
7247 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7248 current_inferior directly.
7249 (update_watch_registers_callback): Update, "entry" parameter is a
7250 struct thread_info * now. Fetch pid from thread.
7251 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7252 (mips_insert_point): Fetch lwpid from current_inferior.
7253 Pass &all_threads to find_inferior, not &all_lwps.
7254 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7255 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7256 directly.
7257 (mips_stopped_data_address): Ditto.
7258 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7259 directly.
7260 * linux-tile-low.c (tile_arch_setup): Ditto.
7261 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7262 (update_debug_registers_callback): Update, "entry" parameter is a
7263 struct thread_info * now. Fetch pid from thread.
7264 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7265 Pass &all_threads to find_inferior, not &all_lwps.
7266 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7267 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7268 Pass &all_threads to find_inferior, not &all_lwps.
7269 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7270 (i386_dr_low_get_status): Ditto.
7271 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7272 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7273 (x86_linux_read_description): Ditto.
7274 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7275
7276 2014-02-20 Doug Evans <dje@google.com>
7277
7278 * inferiors.c (get_first_inferior): Fix buglet.
7279
7280 2014-02-19 Doug Evans <dje@google.com>
7281
7282 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7283 * inferiors.c (add_thread): Change result type to struct thread_info *.
7284 All callers updated.
7285 (add_lwp): Call add_thread here instead of in callers.
7286 All callers updated.
7287 * linux-low.h (get_lwp_thread): Rewrite.
7288 (struct lwp_info): New member "thread".
7289
7290 2014-02-19 Doug Evans <dje@google.com>
7291
7292 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7293 All callers updated.
7294
7295 2014-02-19 Doug Evans <dje@google.com>
7296
7297 * inferiors.c (add_thread): Fix whitespace.
7298
7299 2014-02-19 Doug Evans <dje@google.com>
7300
7301 * dll.c (clear_dlls): Replace accessing list implemention details
7302 with API function.
7303 * gdbthread.h (get_first_thread): Declare.
7304 * inferiors.c (for_each_inferior_with_data): New function.
7305 (get_first_thread): New function.
7306 (find_thread_ptid): Simplify.
7307 (get_first_inferior): New function.
7308 (clear_list): Delete.
7309 (one_inferior_p): New function.
7310 (clear_inferior_list): New function.
7311 (clear_inferiors): Update.
7312 * inferiors.h (for_each_inferior_with_data): Declare.
7313 (clear_inferior_list): Declare.
7314 (one_inferior_p): Declare.
7315 (get_first_inferior): Declare.
7316 * linux-low.c (linux_wait_for_event): Replace accessing list
7317 implemention details with API function.
7318 * server.c (target_running): Ditto.
7319 (accumulate_file_name_length): New function.
7320 (emit_dll_description): New function.
7321 (handle_qxfer_libraries): Replace accessing list implemention
7322 details with API function.
7323 (handle_qxfer_threads_worker): New function.
7324 (handle_qxfer_threads_proper): Replace accessing list implemention
7325 details with API function.
7326 (handle_query): Ditto.
7327 (visit_actioned_threads_callback_ftype): New typedef.
7328 (visit_actioned_threads_data): New struct.
7329 (visit_actioned_threads): Rewrite to be find_inferior callback.
7330 (resume): Call find_inferior.
7331 (handle_status): Replace accessing list implemention
7332 details with API function.
7333 (process_serial_event): Replace accessing list implemention details
7334 with API function.
7335 * target.c (set_desired_inferior): Replace accessing list implemention
7336 details with API function.
7337 * tracepoint.c (same_process_p): New function.
7338 (gdb_agent_about_to_close): Replace accessing list implemention
7339 details with API function.
7340 * win32-low.c (child_delete_thread): Replace accessing list
7341 implemention details with API function.
7342 (match_dll_by_basename): New function.
7343 (dll_is_loaded_by_basename): New function.
7344 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7345 details call to dll_is_loaded_by_basename.
7346
7347 2014-02-19 Doug Evans <dje@google.com>
7348
7349 * dll.h (struct dll_info): Add comment.
7350 * gdbthread.h (struct thread_info): Add comment.
7351 (current_ptid): Simplify.
7352 * inferiors.c (add_process): Update.
7353 (remove_process): Update.
7354 * inferiors.h (struct process_info): Rename member "head" to "entry".
7355 * linux-low.c (delete_lwp): Update.
7356 (add_lwp): Update.
7357 (last_thread_of_process_p): Update.
7358 (kill_one_lwp_callback, linux_kill): Update.
7359 (status_pending_p_callback): Update.
7360 (wait_for_sigstop): Update. Simplify read of ptid.
7361 (start_step_over): Update.
7362 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7363 (get_lwp_thread): Update.
7364 (struct lwp_info): Rename member "head" to "entry".
7365 * regcache.h (inferior_list_entry): Delete.
7366 * server.c (kill_inferior_callback): Update.
7367 (detach_or_kill_inferior_callback): Update.
7368 (print_started_pid): Update.
7369 (print_attached_pid): Update.
7370 (process_serial_event): Simplify read of ptid.
7371 * thread-db.c (thread_db_create_event): Update.
7372 (thread_db_get_tls_address): Update.
7373 * win32-low.c (current_inferior_ptid): Simplify.
7374
7375 2014-02-19 Tom Tromey <tromey@redhat.com>
7376
7377 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7378 argument.
7379 (target_supports_btrace): Update.
7380
7381 2014-02-14 Yao Qi <yao@codesourcery.com>
7382
7383 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7384 (rsp-low-ipa.o): New target.
7385
7386 2014-02-12 Tom Tromey <tromey@redhat.com>
7387
7388 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7389 convert_ascii_to_int.
7390 * regcache.c (registers_to_string): Likewise.
7391 * remote-utils.c (decode_M_packet): Likewise.
7392 * server.c (process_serial_event): Likewise.
7393
7394 2014-02-12 Tom Tromey <tromey@redhat.com>
7395
7396 * server.c (handle_query, handle_v_run): Use hex2bin, not
7397 unhexify.
7398 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7399
7400 2014-02-12 Tom Tromey <tromey@redhat.com>
7401
7402 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7403 convert_int_to_ascii.
7404 * regcache.c (registers_to_string, collect_register_as_string):
7405 Likewise.
7406 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7407 Likewise.
7408 * server.c (process_serial_event): Likewise.
7409 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7410 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7411
7412 2014-02-12 Tom Tromey <tromey@redhat.com>
7413
7414 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7415 bin2hex, not hexify.
7416 * tracepoint.c (cmd_qtstatus): Likewise.
7417
7418 2014-02-12 Tom Tromey <tromey@redhat.com>
7419
7420 * remote-utils.c (monitor_output): Pass explicit length to
7421 hexify.
7422
7423 2014-02-12 Tom Tromey <tromey@redhat.com>
7424
7425 * tracepoint.c: Include rsp-low.h.
7426 * server.c: Include rsp-low.h.
7427 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7428 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7429 declare.
7430 * remote-utils.c: Include rsp-low.h.
7431 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7432 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7433 (convert_int_to_ascii, convert_ascii_to_int): Move to
7434 common/rsp-low.c.
7435 * regcache.c: Include rsp-low.h.
7436 * ax.c: Include rsp-low.h.
7437 * Makefile.in (SFILES): Add common/rsp-low.c.
7438 (OBS): Add rsp-low.o.
7439 (rsp-low.o): New target.
7440
7441 2014-02-12 Tom Tromey <tromey@redhat.com>
7442
7443 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7444 Include print-utils.h.
7445 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7446 (plongest, thirty_two, phex_nz): Remove.
7447 * Makefile.in (SFILES): Add common/print-utils.c.
7448 (OBS): Add print-utils.o.
7449 (print-utils-ipa.o): New target.
7450 (print-utils.o): New target.
7451 (IPA_OBJS): Add print-utils-ipa.o.
7452
7453 2014-02-06 Tom Tromey <tromey@redhat.com>
7454
7455 * Makefile.in (SFILES): Fix indentation.
7456
7457 2014-02-05 Doug Evans <dje@google.com>
7458
7459 * linux-low.c (linux_wait_for_event): Improve comment.
7460 (linux_wait_1): Keep current_inferior in sync with event_child.
7461
7462 2014-01-22 Doug Evans <dje@google.com>
7463
7464 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7465
7466 2014-01-22 Doug Evans <dje@google.com>
7467
7468 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7469 * configure: Regenerate.
7470 * config.in: Regenerate.
7471 * Makefile.in (SFILES): Add debug.c.
7472 (OBS): Add debug.o.
7473 * debug.c: New file.
7474 * debug.h: New file.
7475 * linux-aarch64-low.c (*): Update all debugging printfs to use
7476 debug_printf instead of fprintf.
7477 * linux-arm-low.c (*): Ditto.
7478 * linux-cris-low.c (*): Ditto.
7479 * linux-crisv32-low.c (*): Ditto.
7480 * linux-m32r-low.c (*): Ditto.
7481 * linux-sparc-low.c (*): Ditto.
7482 * linux-x86.c (*): Ditto.
7483 * linux-low.c (*): Ditto.
7484 (linux_wait_1): Add calls to debug_enter, debug_exit.
7485 (linux_wait): Remove redundant debugging printf.
7486 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7487 (linux_resume, unstop_all_lwps): Ditto.
7488 * mem-break.c (*): Update all debugging printfs to use
7489 debug_printf instead of fprintf.
7490 * remote-utils.c (*): Ditto.
7491 * thread-db.c (*): Ditto.
7492 * server.c #include <ctype.h>, "gdb_vecs.h".
7493 (debug_threads): Moved to debug.c.
7494 (*): Update all debugging printfs to use debug_printf instead of
7495 fprintf.
7496 (start_inferior): Replace call to fflush with call to debug_flush.
7497 (monitor_show_help): Mention set debug-format.
7498 (parse_debug_format_options): New function.
7499 (handle_monitor_command): Handle "monitor set debug-format".
7500 (gdbserver_usage): Mention --debug-format.
7501 (main): Parse --debug-format.
7502 * server.h (debug_threads): Declaration moved to debug.h.
7503 #include "debug.h".
7504 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7505 trace_debug_1 that uses debug_printf.
7506 (tracepoint_look_up_symbols): Update all debugging printfs to use
7507 debug_printf instead of fprintf.
7508
7509 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7510
7511 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7512 sys/ptrace.h.
7513
7514 2014-01-17 Pedro Alves <palves@redhat.com>
7515
7516 PR build/16445
7517 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7518 defined after including gdb_proc_service.h.
7519
7520 2014-01-16 Doug Evans <dje@google.com>
7521
7522 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7523 (match_dll): Use it.
7524
7525 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7526
7527 * target.h (target_ops) <read_btrace>: Change parameters and
7528 return type to allow error reporting.
7529 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7530 trace reading errors on.
7531 * linux-low.c (linux_low_read_btrace): Pass trace reading
7532 errors on.
7533 (linux_low_disable_btrace): New.
7534
7535 2014-01-15 Doug Evans <dje@google.com>
7536
7537 * inferiors.c (thread_id_to_gdb_id): Delete.
7538 * inferiors.h (thread_id_to_gdb_id): Delete.
7539
7540 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7541
7542 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7543 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7544 versions.
7545
7546 2014-01-08 Pedro Alves <palves@redhat.com>
7547
7548 * server.c (handle_status): Don't discard previous queued stop
7549 replies or thread's pending status here.
7550 (main) <disconnection>: Do it here instead.
7551
7552 2014-01-08 Pedro Alves <palves@redhat.com>
7553
7554 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7555 * server.c (visit_actioned_threads, handle_pending_status): New
7556 function.
7557 (handle_v_cont): Factor out parts to ...
7558 (resume): ... this new function. If in all-stop, and a thread
7559 being resumed has a pending status, report it without actually
7560 resuming.
7561 (myresume): Adjust to use the new 'resume' function.
7562 (clear_pending_status_callback, set_pending_status_callback)
7563 (find_status_pending_thread_callback): New functions.
7564 (handle_status): Handle the case of multiple threads having
7565 interesting statuses to report. Report threads' real last signal
7566 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7567 with an interesting thread to report the status for, instead of
7568 always reporting the status of the first thread.
7569
7570 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7571
7572 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7573 * gdbreplay.c (gdbreplay_version): Likewise.
7574
7575 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7576
7577 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7578 iov.iov_len with the real length in use.
7579
7580 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7581
7582 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7583 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7584 for all targets that use win32-low.c.
7585 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7586 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7587
7588 2013-12-13 Pedro Alves <palves@redhat.com>
7589
7590 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7591 if equal to TARGET_WAITKIND_LOADED.
7592 * win32-low.c (cached_status): New static global.
7593 (win32_wait): Add declaration.
7594 (do_initial_child_stuff): Flush all initial pending debug events
7595 up to the initial breakpoint.
7596 (win32_wait): If CACHED_STATUS was set, return that instead
7597 of doing a real wait. Remove the code resuming the execution
7598 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7599 during the initial phase. Also remove the code changing
7600 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7601 TARGET_WAITKIND_STOPPED.
7602
7603 2013-12-11 Yao Qi <yao@codesourcery.com>
7604
7605 * notif.c (handle_notif_ack): Return 0 if no notification
7606 matches.
7607
7608 2013-11-20 Doug Evans <dje@google.com>
7609
7610 * linux-low.c (linux_set_resume_request): Fix comment.
7611
7612 2013-11-20 Doug Evans <dje@google.com>
7613
7614 * linux-low.c (resume_status_pending_p): Tweak comment.
7615
7616 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7617
7618 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7619 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7620 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7621 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7622 (srv_amd64_regobj): Add amd64-mpx.o.
7623 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7624 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7625 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7626 * i387-fp.c (num_pl_bnd_register) Added constant.
7627 (num_pl_bnd_cfg_registers) Added constant.
7628 (struct i387_xsave) Added reserved area and MPX fields.
7629 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7630 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7631 function.
7632 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7633 (init_registers_amd64_mpx_linux): Declare new function.
7634 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7635 (x86_64_regmap): Add MPX registers.
7636 (x86_linux_read_description): Add MPX case.
7637 (initialize_low_arch): Initialize MPX targets.
7638
7639 2013-11-18 Tom Tromey <tromey@redhat.com>
7640
7641 * configure: Rebuild.
7642 * configure.ac: Don't check for stdlib.h.
7643 * gdbreplay.c: Unconditionally include stdlib.h.
7644
7645 2013-11-18 Tom Tromey <tromey@redhat.com>
7646
7647 * config.in: Rebuild.
7648 * configure: Rebuild.
7649 * configure.ac: Don't use AC_HEADER_DIRENT.
7650
7651 2013-11-18 Tom Tromey <tromey@redhat.com>
7652
7653 * server.h: Don't check HAVE_STRING_H.
7654 * gdbreplay.c: Don't check HAVE_STRING_H.
7655 * configure: Rebuild.
7656
7657 2013-11-18 Tom Tromey <tromey@redhat.com>
7658
7659 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7660 LIBGNU.
7661
7662 2013-11-08 Tom Tromey <tromey@redhat.com>
7663
7664 * configure, config.in: Rebuild.
7665 * configure.ac: Remove unused configury.
7666
7667 2013-11-08 Tom Tromey <tromey@redhat.com>
7668
7669 * acinclude.m4: Include common.m4, codeset.m4.
7670 * configure, config.in: Rebuild.
7671 * configure.ac: Use GDB_AC_COMMON.
7672
7673 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7674
7675 * linux-s390-low.c (HWCAP_S390_TE): New define.
7676 (s390_arch_setup): Consider the TE field in the HWCAP for
7677 determining 'have_regset_tdb'.
7678
7679 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7680
7681 PR gdb/16014
7682 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7683 call to sizeof.
7684
7685 2013-10-02 Pedro Alves <palves@redhat.com>
7686
7687 * server.c (process_serial_event): Don't output "GDBserver
7688 exiting" if GDB is connected through stdio.
7689 * target.c (mywait): Likewise, be silent if GDB is connected
7690 through stdio.
7691
7692 2013-10-01 Joel Brobecker <brobecker@adacore.com>
7693
7694 * lynx-low.c (lynx_add_threads_after_attach): New function.
7695 (lynx_attach): Remove call to add_thread. Add call to
7696 lynx_add_threads_after_attach instead.
7697
7698 2013-09-28 Mike Frysinger <vapier@gentoo.org>
7699
7700 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7701 * config.in, configure: Regenerated.
7702
7703 2013-09-18 Yao Qi <yao@codesourcery.com>
7704
7705 PR server/15959
7706 * server.c (start_inferior): Clear 'resume_info'.
7707
7708 2013-09-16 Jiong Wang <jiwang@tilera.com>
7709
7710 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7711 for each register.
7712
7713 2013-09-16 Jiong Wang <jiwang@tilera.com>
7714
7715 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7716 linux-tile-low.o to srv_tgtobj.
7717
7718 2013-09-16 Will Newton <will.newton@linaro.org>
7719
7720 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7721 out regs.
7722
7723 2013-09-06 Pedro Alves <palves@redhat.com>
7724
7725 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7726 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7727 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7728 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7729 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7730 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7731
7732 2013-09-06 Pedro Alves <palves@redhat.com>
7733
7734 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7735 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7736
7737 2013-09-06 Pedro Alves <palves@redhat.com>
7738
7739 * linux-amd64-ipa.c: Include tracepoint.h.
7740 * linux-i386-ipa.c: Include tracepoint.h.
7741
7742 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7743
7744 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7745 (ps_get_thread_area): New function.
7746
7747 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
7748
7749 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7750 (initialize_low_arch): Call init_registers_crisv32 rather than
7751 init_register_crisv32.
7752
7753 2013-09-05 Pedro Alves <palves@redhat.com>
7754
7755 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7756 to ...
7757 * hostio.h: ... this new file.
7758 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7759 win32-low.c: Include hostio.h.
7760
7761 2013-09-05 Pedro Alves <palves@redhat.com>
7762
7763 * server.h (gdb_client_data, handler_func, callback_handler_func)
7764 (delete_file_handler, add_file_handler, append_callback_event)
7765 (delete_callback_event, start_event_loop, initialize_event_loop):
7766 Move to event-loop.h and include it.
7767 * event-loop.h: New file.
7768
7769 2013-09-05 Pedro Alves <palves@redhat.com>
7770
7771 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7772 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7773 (loaded_dll, unloaded_dll): Move to ...
7774 * dll.h: ... this new file.
7775 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7776
7777 2013-09-05 Pedro Alves <palves@redhat.com>
7778
7779 * server.h (current_process, get_thread_process, all_processes)
7780 (add_inferior_to_list, for_each_inferior, current_inferior)
7781 (remove_inferior, add_process, remove_process, find_process_pid)
7782 (have_started_inferiors_p, have_attached_inferiors_p)
7783 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7784 (clear_inferiors, find_inferior, find_inferior_id)
7785 (inferior_target_data, set_inferior_target_data)
7786 (inferior_regcache_data, set_inferior_regcache_data): Move to
7787 inferiors.h, and include it.
7788 * inferiors.h: New file.
7789
7790 2013-09-05 Pedro Alves <palves@redhat.com>
7791
7792 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7793 Move ...
7794 * ax.h: ... here.
7795
7796 2013-09-05 Pedro Alves <palves@redhat.com>
7797
7798 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7799 tracepoint.h.
7800 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7801 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7802 (handle_tracepoint_general_set, handle_tracepoint_query)
7803 (tracepoint_finished_step, tracepoint_was_hit)
7804 (release_while_stepping_state_list, current_traceframe)
7805 (in_readonly_region, traceframe_read_mem)
7806 (fetch_traceframe_registers, traceframe_read_sdata)
7807 (traceframe_read_info, struct fast_tpoint_collect_status)
7808 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7809 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7810 (supply_fast_tracepoint_registers)
7811 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7812 (ipa_tdesc, claim_trampoline_space)
7813 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7814 (agent_mem_read, agent_get_trace_state_variable_value)
7815 (agent_set_trace_state_variable_value, agent_tsv_read)
7816 (agent_mem_read_string, get_raw_reg_func_addr)
7817 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7818 * tracepoint.h: ... this new file.
7819
7820 2013-09-05 Pedro Alves <palves@redhat.com>
7821
7822 * server.h (perror_with_name, error, fatal, warning, paddress)
7823 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7824 include it.
7825 * utils.h: New file.
7826
7827 2013-09-05 Pedro Alves <palves@redhat.com>
7828
7829 * server.h (remote_debug, noack_mode, transport_is_reliable)
7830 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7831 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7832 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7833 (write_enn, initialize_async_io, enable_async_io)
7834 (disable_async_io, check_remote_input_interrupt_request)
7835 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7836 (dead_thread_notify, prepare_resume_reply)
7837 (decode_address_to_semicolon, decode_address, decode_m_packet)
7838 (decode_M_packet, decode_X_packet, decode_xfer_write)
7839 (decode_search_memory_packet, unhexify, hexify)
7840 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7841 (look_up_one_symbol, relocate_instruction)
7842 (monitor_output): Move to remote-utils.h, and include it.
7843 * remote-utils.h: New file.
7844
7845 2013-09-05 Pedro Alves <palves@redhat.com>
7846
7847 * server.h (_): Delete.
7848
7849 2013-09-02 Pedro Alves <palves@redhat.com>
7850
7851 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7852 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7853 allocated.
7854 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7855
7856 2013-09-02 Pierre Muller <muller@sourceware.org>
7857
7858 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7859 or WriteProcessMemory complete successfully and handle
7860 ERROR_PARTIAL_COPY error.
7861
7862 2013-09-02 Pedro Alves <palves@redhat.com>
7863
7864 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7865 error instead of EIO.
7866
7867 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7868
7869 PR server/15604
7870 * linux-low.c: Include filestuff.h.
7871 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7872 * lynx-low.c: Include filestuff.h.
7873 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7874 * server.c: Include filestuff.h.
7875 (main): Call notice_open_fds.
7876 * spu-low.c: Include filestuff.h.
7877 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7878
7879 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
7880
7881 * Makefile.in: Explain why ../target and ../nat are not
7882 listed as include file search paths.
7883 (linux-waitpid.o): New object file rule.
7884 * configure.srv (srv_native_linux_obj): New variable.
7885 Replace all occurrences of linux native object files with
7886 $srv_native_linux_obj.
7887 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7888 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7889 (linux_enable_event_reporting): Remove declaration.
7890 (my_waitpid): Moved to common/linux-waitpid.c.
7891 (linux_wait_for_event): Pass ptid when calling
7892 linux_enable_event_reporting.
7893 (linux_supports_tracefork_flag): Remove.
7894 (linux_enable_event_reporting): Likewise.
7895 (linux_tracefork_grandchild): Remove.
7896 (STACK_SIZE): Moved to common/linux-ptrace.c.
7897 (linux_tracefork_child): Remove.
7898 (linux_test_for_tracefork): Remove.
7899 (linux_look_up_symbols): Call linux_supports_traceclone.
7900 (initialize_low): Remove call to linux_test_for_tracefork.
7901 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7902 common/linux-ptrace.h.
7903 (PTRACE_TYPE_ARG4): Likewise.
7904 Include linux-ptrace.h.
7905
7906 2013-08-21 Pedro Alves <palves@redhat.com>
7907
7908 * config.in: Renegerate.
7909
7910 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
7911
7912 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7913 (SFILES): Remove $(srcdir)/common/target-common.c and
7914 add $(srcdir)/target/waitstatus.c.
7915 (OBS): Remove target-common.o and add waitstatus.o.
7916 (server_h): Remove $(srcdir)/../common/target-common.h and
7917 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7918 and $(srcdir)/../target/waitstatus.h.
7919 (target-common.o): Remove.
7920 (waitstatus.o): New target object file.
7921 * target.h: Do not include target-common.h and
7922 include target/resume.h, target/wait.h and
7923 target/waitstatus.h.
7924
7925 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
7926
7927 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7928 to PTRACE_TYPE_ARG3.
7929 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7930 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7931 PTRACE_TYPE_ARG4.
7932 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7933 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7934
7935 2013-07-27 Jie Zhang <jie@codesourcery.com>
7936 Daniel Jacobowitz <dan@codesourcery.com>
7937 Yao Qi <yao@codesourcery.com>
7938
7939 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7940 (mips-linux-watch.o): New rule.
7941 (mips_linux_watch_h): New variable.
7942 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7943 srv_tgtobj.
7944 * linux-mips-low.c: Include mips-linux-watch.h.
7945 (struct arch_process_info, struct arch_lwp_info): New.
7946 (update_watch_registers_callback): New function.
7947 (mips_linux_new_process, mips_linux_new_thread) New functions.
7948 (mips_linux_prepare_to_resume, mips_insert_point): New
7949 functions.
7950 (mips_remove_point, mips_stopped_by_watchpoint): New
7951 functions.
7952 (rsp_bp_type_to_target_hw_bp_type): New function.
7953 (mips_stopped_data_address): New function.
7954 (the_low_target): Add watchpoint support functions.
7955
7956 2013-07-27 Yao Qi <yao@codesourcery.com>
7957
7958 * i386-low.c: Include break-common.h.
7959 (enum target_hw_bp_type): Remove.
7960
7961 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
7962
7963 * Makefile.in (SFILES): /common/target-common.c.
7964 (OBS): Add target-common.o.
7965 (server_h): Add $(srcdir)/../common/target-common.h.
7966 (target-common.o): New target.
7967 * server.c (queue_stop_reply_callback): Free
7968 status string after use.
7969 * target.c (target_waitstatus_to_string): Remove.
7970 * target.h: Include target-common.h.
7971 (resume_kind): Likewise.
7972 (target_waitkind): Likewise.
7973 (target_waitstatus): Likewise.
7974 (TARGET_WNOHANG): Likewise.
7975
7976 2013-07-04 Yao Qi <yao@codesourcery.com>
7977
7978 * Makefile.in (host_alias): Use @host_noncanonical@.
7979 (target_alias): Use @target_noncanonical@.
7980 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7981 ACX_NONCANONICAL_HOST.
7982 * configure: Regenerated.
7983
7984 Revert:
7985 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7986
7987 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7988 * configure: Rebuild.
7989 * Makefile.in (version_host, version_target): Get from configure.
7990 (version.c): Use $(version_host) and $(version_target).
7991
7992 2013-07-03 Pedro Alves <palves@redhat.com>
7993
7994 * Makefile.in (config.status): Depend on development.sh.
7995 * acinclude.m4: Include libmcheck.m4.
7996 * configure: Regenerate.
7997
7998 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7999
8000 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8001 attribute inside the parentheses.
8002 (winapi_DebugSetProcessKillOnExit): Ditto.
8003 (winapi_DebugBreakProcess): Ditto.
8004 (winapi_GenerateConsoleCtrlEvent): Ditto.
8005
8006 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8007
8008 * notif.h (notif_event): Add a dummy member to avoid compiler
8009 errors.
8010
8011 2013-07-01 Pedro Alves <palves@redhat.com>
8012
8013 * hostio.c (HOSTIO_PATH_MAX): Define.
8014 (require_filename, handle_open, handle_unlink, handle_readlink):
8015 Use it.
8016
8017 2013-07-01 Pedro Alves <palves@redhat.com>
8018
8019 * server.h: Include "pathmax.h".
8020 * linux-low.c: Don't include sys/param.h.
8021 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8022 MAXPATHLEN.
8023 * win32-low.c: Don't include sys/param.h.
8024 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8025
8026 2013-07-01 Pedro Alves <palves@redhat.com>
8027
8028 * event-loop.c: Don't check HAVE_UNISTD_H before including
8029 <unistd.h>.
8030 * gdbreplay.c: Likewise.
8031 * remote-utils.c: Likewise.
8032 * server.c: Likewise.
8033 * configure.ac: Don't check for unistd.h.
8034 * configure: Regenerate.
8035
8036 2013-06-28 Tom Tromey <tromey@redhat.com>
8037
8038 * Makefile.in (version.c): Use version.in, not
8039 common/version.in.
8040
8041 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8042
8043 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8044 * configure: Rebuild.
8045 * Makefile.in (version_host, version_target): Get from configure.
8046 (version.c): Use $(version_host) and $(version_target).
8047
8048 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8049
8050 Fix trace-status to output user name without trailing colon.
8051 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8052
8053 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8054
8055 Fix trace-status to output proper start-time and stop-time.
8056 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8057 output start time and stop time in hex as gdb expects.
8058
8059 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8060
8061 * tracepoint.c (build_traceframe_info_xml): Output trace state
8062 variables present in the trace buffer.
8063
8064 2013-06-24 Tom Tromey <tromey@redhat.com>
8065
8066 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8067 create-version.sh.
8068 (version.o): Remove.
8069 * gdbreplay.c: Include version.h.
8070 (version, host_name): Don't declare.
8071 * server.h: Include version.h.
8072 (version, host_name): Don't declare.
8073
8074 2013-06-12 Pedro Alves <palves@redhat.com>
8075
8076 * linux-x86-low.c (linux_is_elf64): Delete global.
8077 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8078 with local linux_pid_exe_is_elf_64_file use.
8079
8080 2013-06-11 Pedro Alves <palves@redhat.com>
8081
8082 * linux-low.c (regset_disabled, disable_regset): New functions.
8083 (regsets_fetch_inferior_registers)
8084 (regsets_store_inferior_registers): Use them.
8085 (initialize_regsets_info); Don't allocate the disabled_regsets
8086 array here.
8087 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8088 comment.
8089
8090 2013-06-11 Pedro Alves <palves@redhat.com>
8091
8092 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8093 xmalloc.
8094
8095 2013-06-11 Pedro Alves <palves@redhat.com>
8096
8097 * linux-x86-low.c (initialize_low_arch): Call
8098 init_registers_x32_avx_linux.
8099
8100 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8101
8102 Fix compatibility with Android Bionic.
8103 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8104 it is not empty.
8105
8106 2013-06-07 Pedro Alves <palves@redhat.com>
8107
8108 PR server/14823
8109 * Makefile.in (OBS): Add tdesc.o.
8110 (IPA_OBJS): Add tdesc-ipa.o.
8111 (tdesc-ipa.o): New rule.
8112 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8113 interface.
8114 * linux-low.c (new_inferior): Delete.
8115 (disabled_regsets, num_regsets): Delete.
8116 (linux_add_process): Adjust to set the new per-process
8117 new_inferior flag.
8118 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8119 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8120 was a stop. When calling arch_setup, switch the current inferior
8121 to the thread that got an event.
8122 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8123 (regsets_fetch_inferior_registers)
8124 (regsets_store_inferior_registers): New regsets_info parameter.
8125 Adjust to use it.
8126 (linux_register_in_regsets): New regs_info parameter. Adjust to
8127 use it.
8128 (register_addr, fetch_register, store_register): New usrregs_info
8129 parameter. Adjust to use it.
8130 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8131 parameter regs_info. Adjust to use it.
8132 (linux_fetch_registers): Get the current inferior's regs_info, and
8133 adjust to use it.
8134 (linux_store_registers): Ditto.
8135 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8136 (initialize_low): Don't initialize the target_regsets here. Call
8137 initialize_low_arch.
8138 * linux-low.h (target_regsets): Delete declaration.
8139 (struct regsets_info): New.
8140 (struct usrregs_info): New.
8141 (struct regs_info): New.
8142 (struct process_info_private) <new_inferior>: New field.
8143 (struct linux_target_ops): Delete the num_regs, regmap, and
8144 regset_bitmap fields. New field regs_info.
8145 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8146 * i387-fp.c (num_xmm_registers): Delete.
8147 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8148 calls to new interface.
8149 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8150 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8151 Infer the number of xmm registers from the regcache's target
8152 description.
8153 * i387-fp.h (num_xmm_registers): Delete.
8154 * inferiors.c (add_thread): Don't install the thread's regcache
8155 here.
8156 * proc-service.c (gregset_info): Fetch the current inferior's
8157 regs_info. Adjust to use it.
8158 * regcache.c: Include tdesc.h.
8159 (register_bytes, reg_defs, num_registers)
8160 (gdbserver_expedite_regs): Delete.
8161 (get_thread_regcache): If the thread doesn't have a regcache yet,
8162 create one, instead of aborting gdbserver.
8163 (regcache_invalidate_one): Rename to ...
8164 (regcache_invalidate_thread): ... this.
8165 (regcache_invalidate_one): New.
8166 (regcache_invalidate): Only invalidate registers of the current
8167 process.
8168 (init_register_cache): Add target_desc parameter, and use it.
8169 (new_register_cache): Ditto. Assert the target description has a
8170 non zero registers_size.
8171 (regcache_cpy): Add assertions. Adjust.
8172 (realloc_register_cache, set_register_cache): Delete.
8173 (registers_to_string, registers_from_string): Adjust.
8174 (find_register_by_name, find_regno, find_register_by_number)
8175 (register_cache_size): Add target_desc parameter, and use it.
8176 (free_register_cache_thread, free_register_cache_thread_one)
8177 (regcache_release, register_cache_size): New.
8178 (register_size): Add target_desc parameter, and use it.
8179 (register_data, supply_register, supply_register_zeroed)
8180 (supply_regblock, supply_register_by_name, collect_register)
8181 (collect_register_as_string, collect_register_by_name): Adjust.
8182 * regcache.h (struct target_desc): Forward declare.
8183 (struct regcache) <tdesc>: New field.
8184 (init_register_cache, new_register_cache): Add target_desc
8185 parameter.
8186 (regcache_invalidate_thread): Declare.
8187 (regcache_invalidate_one): Delete declaration.
8188 (regcache_release): Declare.
8189 (find_register_by_number, register_cache_size, register_size)
8190 (find_regno): Add target_desc parameter.
8191 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8192 declarations.
8193 * remote-utils.c: Include tdesc.h.
8194 (outreg, prepare_resume_reply): Adjust.
8195 * server.c: Include tdesc.h.
8196 (gdbserver_xmltarget): Delete declaration.
8197 (get_features_xml, process_serial_event): Adjust.
8198 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8199 declare.
8200 (struct process_info) <tdesc>: New field.
8201 (ipa_tdesc): Declare.
8202 * tdesc.c: New file.
8203 * tdesc.h: New file.
8204 * tracepoint.c: Include tdesc.h.
8205 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8206 (get_context_regcache): Adjust to pass ipa_tdesc down.
8207 (do_action_at_tracepoint): Adjust to get the register cache size
8208 from the context regcache's description.
8209 (traceframe_walk_blocks): Adjust to get the register cache size
8210 from the current trace frame's description.
8211 (traceframe_get_pc): Adjust to get current trace frame's
8212 description and pass it down.
8213 (gdb_collect): Adjust to get the register cache size from the
8214 IPA's description.
8215 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8216 (gdbserver_xmltarget): Delete.
8217 (initialize_low_tracepoint): Set the ipa's target description.
8218 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8219 (initialize_low_tracepoint): Set the ipa's target description.
8220 * linux-x86-low.c: Include tdesc.h.
8221 [__x86_64__] (is_64bit_tdesc): New.
8222 (ps_get_thread_area, x86_get_thread_area): Use it.
8223 (i386_cannot_store_register): Rename to ...
8224 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8225 (i386_cannot_fetch_register): Rename to ...
8226 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8227 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8228 to new interface.
8229 (target_regsets): Rename to ...
8230 (x86_regsets): ... this.
8231 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8232 interface.
8233 (x86_siginfo_fixup): Use is_64bit_tdesc.
8234 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8235 (tdesc_x32_avx_linux, tdesc_x32_linux)
8236 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8237 Declare.
8238 (x86_linux_update_xmltarget): Delete.
8239 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8240 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8241 (AMD64_LINUX_USER64_CS): New.
8242 (x86_linux_read_description): New, based on
8243 x86_linux_update_xmltarget.
8244 (same_process_callback): New.
8245 (x86_arch_setup_process_callback): New.
8246 (x86_linux_update_xmltarget): New.
8247 (x86_regsets_info): New.
8248 (amd64_linux_regs_info): New.
8249 (i386_linux_usrregs_info): New.
8250 (i386_linux_regs_info): New.
8251 (x86_linux_regs_info): New.
8252 (x86_arch_setup): Reimplement.
8253 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8254 (x86_emit_ops): Ditto.
8255 (the_low_target): Adjust. Install x86_linux_regs_info,
8256 x86_cannot_fetch_register, and x86_cannot_store_register.
8257 (initialize_low_arch): New.
8258 * linux-ia64-low.c (tdesc_ia64): Declare.
8259 (ia64_fetch_register): Adjust.
8260 (ia64_usrregs_info, regs_info): New globals.
8261 (ia64_regs_info): New function.
8262 (the_low_target): Adjust.
8263 (initialize_low_arch): New function.
8264 * linux-sparc-low.c (tdesc_sparc64): Declare.
8265 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8266 Adjust.
8267 (sparc_arch_setup): New function.
8268 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8269 (the_low_target): Adjust.
8270 (initialize_low_arch): New function.
8271 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8272 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8273 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8274 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8275 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8276 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8277 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8278 (tdesc_powerpc_isa205_vsx64l): Declare.
8279 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8280 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8281 (ppc_set_pc, ppc_get_hwcap): Adjust.
8282 (ppc_usrregs_info): Forward declare.
8283 (!__powerpc64__) ppc_regmap_adjusted: New global.
8284 (ppc_arch_setup): Adjust to the current process'es target
8285 description.
8286 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8287 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8288 (ppc_store_evrregset): Adjust.
8289 (target_regsets): Rename to ...
8290 (ppc_regsets): ... this, and make static.
8291 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8292 (ppc_regs_info): New function.
8293 (the_low_target): Adjust.
8294 (initialize_low_arch): New function.
8295 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8296 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8297 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8298 (tdesc_s390x_linux64v2): Declare.
8299 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8300 (s390_fill_gregset, s390_store_last_break): Adjust.
8301 (target_regsets): Rename to ...
8302 (s390_regsets): ... this, and make static.
8303 (s390_get_pc, s390_set_pc): Adjust.
8304 (s390_get_hwcap): New target_desc parameter, and use it.
8305 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8306 (s390_arch_setup): Adjust to set the current process'es target
8307 description. Don't adjust the regmap.
8308 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8309 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8310 (regs_info_3264): New globals.
8311 (s390_regs_info): New function.
8312 (the_low_target): Adjust.
8313 (initialize_low_arch): New function.
8314 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8315 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8316 [__mips64] (init_registers_mips_linux)
8317 (init_registers_mips_dsp_linux): Delete defines.
8318 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8319 (have_dsp): New global.
8320 (mips_read_description): New, based on mips_arch_setup.
8321 (mips_arch_setup): Reimplement.
8322 (get_usrregs_info): New function.
8323 (mips_cannot_fetch_register, mips_cannot_store_register)
8324 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8325 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8326 (target_regsets): Rename to ...
8327 (mips_regsets): ... this, and make static.
8328 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8329 (dsp_regs_info, regs_info): New globals.
8330 (mips_regs_info): New function.
8331 (the_low_target): Adjust.
8332 (initialize_low_arch): New function.
8333 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8334 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8335 Declare.
8336 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8337 (arm_read_description): New, with bits factored from
8338 arm_arch_setup.
8339 (arm_arch_setup): Reimplement.
8340 (target_regsets): Rename to ...
8341 (arm_regsets): ... this, and make static.
8342 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8343 (arm_regs_info): New function.
8344 (the_low_target): Adjust.
8345 (initialize_low_arch): New function.
8346 * linux-m68k-low.c (tdesc_m68k): Declare.
8347 (target_regsets): Rename to ...
8348 (m68k_regsets): ... this, and make static.
8349 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8350 (m68k_regs_info): New function.
8351 (m68k_arch_setup): New function.
8352 (the_low_target): Adjust.
8353 (initialize_low_arch): New function.
8354 * linux-sh-low.c (tdesc_sharch): Declare.
8355 (target_regsets): Rename to ...
8356 (sh_regsets): ... this, and make static.
8357 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8358 (sh_regs_info, sh_arch_setup): New functions.
8359 (the_low_target): Adjust.
8360 (initialize_low_arch): New function.
8361 * linux-bfin-low.c (tdesc_bfin): Declare.
8362 (bfin_arch_setup): New function.
8363 (bfin_usrregs_info, regs_info): New globals.
8364 (bfin_regs_info): New function.
8365 (the_low_target): Adjust.
8366 (initialize_low_arch): New function.
8367 * linux-cris-low.c (tdesc_cris): Declare.
8368 (cris_arch_setup): New function.
8369 (cris_usrregs_info, regs_info): New globals.
8370 (cris_regs_info): New function.
8371 (the_low_target): Adjust.
8372 (initialize_low_arch): New function.
8373 * linux-cris-low.c (tdesc_crisv32): Declare.
8374 (cris_arch_setup): New function.
8375 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8376 (cris_regs_info): New function.
8377 (the_low_target): Adjust.
8378 (initialize_low_arch): New function.
8379 * linux-m32r-low.c (tdesc_m32r): Declare.
8380 (m32r_arch_setup): New function.
8381 (m32r_usrregs_info, regs_info): New globals.
8382 (m32r_regs_info): Adjust.
8383 (initialize_low_arch): New function.
8384 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8385 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8386 (tic6x_usrregs_info): Forward declare.
8387 (tic6x_read_description): New function, based on ...
8388 (tic6x_arch_setup): ... this. Reimplement.
8389 (target_regsets): Rename to ...
8390 (tic6x_regsets): ... this, and make static.
8391 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8392 (tic6x_regs_info): New function.
8393 (the_low_target): Adjust.
8394 (initialize_low_arch): New function.
8395 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8396 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8397 (target_regsets): Rename to ...
8398 (xtensa_regsets): ... this, and make static.
8399 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8400 globals.
8401 (xtensa_arch_setup, xtensa_regs_info): New functions.
8402 (the_low_target): Adjust.
8403 (initialize_low_arch): New function.
8404 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8405 (nios2_arch_setup): Set the current process'es tdesc.
8406 (target_regsets): Rename to ...
8407 (nios2_regsets): ... this.
8408 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8409 (nios2_regs_info): New function.
8410 (the_low_target): Adjust.
8411 (initialize_low_arch): New function.
8412 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8413 (aarch64_arch_setup): Set the current process'es tdesc.
8414 (target_regsets): Rename to ...
8415 (aarch64_regsets): ... this.
8416 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8417 (aarch64_regs_info): New function.
8418 (the_low_target): Adjust.
8419 (initialize_low_arch): New function.
8420 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8421 globals.
8422 (target_regsets): Rename to ...
8423 (tile_regsets): ... this.
8424 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8425 (tile_regs_info): New function.
8426 (tile_arch_setup): Set the current process'es tdesc.
8427 (the_low_target): Adjust.
8428 (initialize_low_arch): New function.
8429 * spu-low.c (tdesc_spu): Declare.
8430 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8431 * win32-arm-low.c (tdesc_arm): Declare.
8432 (arm_arch_setup): New function.
8433 (the_low_target): Install arm_arch_setup instead of
8434 init_registers_arm.
8435 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8436 (init_windows_x86): Rename to ...
8437 (i386_arch_setup): ... this. Set `win32_tdesc'.
8438 (the_low_target): Adjust.
8439 * win32-low.c (win32_tdesc): New global.
8440 (child_add_thread): Don't create the thread cache here.
8441 (do_initial_child_stuff): Set the new process'es tdesc.
8442 * win32-low.h (struct target_desc): Forward declare.
8443 (win32_tdesc): Declare.
8444 * lynx-i386-low.c (tdesc_i386): Declare global.
8445 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8446 * lynx-low.c (lynx_tdesc): New global.
8447 (lynx_add_process): Set the new process'es tdesc.
8448 * lynx-low.h (struct target_desc): Forward declare.
8449 (lynx_tdesc): Declare global.
8450 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8451 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8452 * nto-low.c (nto_tdesc): New global.
8453 (do_attach): Set the new process'es tdesc.
8454 * nto-low.h (struct target_desc): Forward declare.
8455 (nto_tdesc): Declare.
8456 * nto-x86-low.c (tdesc_i386): Declare.
8457 (nto_x86_arch_setup): Set `nto_tdesc'.
8458
8459 2013-06-04 Gary Benson <gbenson@redhat.com>
8460
8461 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8462 to qSupported response when appropriate.
8463 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8464 with nonzero-length annex.
8465 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8466 arguments supplied in annex.
8467
8468 2013-05-31 Doug Evans <dje@google.com>
8469
8470 PR server/15594
8471 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8472 64 bits in 64-cross-32 environment.
8473
8474 2013-05-28 Pedro Alves <palves@redhat.com>
8475
8476 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8477 (aarch64-without-fpu.c): Delete rule.
8478 * configure.srv (aarch64*-*-linux*): Remove references to
8479 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8480 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8481 declaration.
8482
8483 2013-05-24 Pedro Alves <palves@redhat.com>
8484
8485 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8486 instead of strchr/decode_address. Error if the range isn't split
8487 with a ','. Don't assume there's be a ':' in the action.
8488
8489 2013-05-23 Yao Qi <yao@codesourcery.com>
8490 Pedro Alves <palves@redhat.com>
8491
8492 * linux-low.c (lwp_in_step_range): New function.
8493 (linux_wait_1): If the thread was range stepping and stopped
8494 outside the stepping range, report the stop to GDB. Otherwise,
8495 continue stepping. Add range stepping debug output.
8496 (linux_set_resume_request): Copy the step range from the resume
8497 request to the lwp.
8498 (linux_supports_range_stepping): New.
8499 (linux_target_ops) <supports_range_stepping>: Set to
8500 linux_supports_range_stepping.
8501 * linux-low.h (struct linux_target_ops)
8502 <supports_range_stepping>: New field.
8503 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8504 * linux-x86-low.c (x86_supports_range_stepping): New.
8505 (the_low_target) <supports_range_stepping>: Set to
8506 x86_supports_range_stepping.
8507 * server.c (handle_v_cont): Handle 'r' action.
8508 (handle_v_requests): Append ";r" if the target supports range
8509 stepping.
8510 * target.h (struct thread_resume) <step_range_start,
8511 step_range_end>: New fields.
8512 (struct target_ops) <supports_range_stepping>:
8513 New field.
8514 (target_supports_range_stepping): New macro.
8515
8516 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8517
8518 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8519 confusion in comment.
8520
8521 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8522
8523 * lynx-low.c (struct process_info_private): New type.
8524 (lynx_add_process): New function.
8525 (lynx_create_inferior, lynx_attach): Replace calls to
8526 add_process by calls to lynx_add_process.
8527 (lynx_resume): If PTID is null, then try using
8528 current_process()->private->last_wait_event_ptid.
8529 Add comments.
8530 (lynx_clear_inferiors): Delete. The contents of that function
8531 has been inlined in lynx_mourn;
8532 (lynx_wait_1): Save the ptid in the process's private data.
8533 (lynx_mourn): Free the process' private data. Replace call
8534 to lynx_clear_inferiors by call to clear_inferiors.
8535
8536 2013-05-17 Yao Qi <yao@codesourcery.com>
8537
8538 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8539 the right place.
8540
8541 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8542
8543 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8544 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8545 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8546 PT_TEXT_END_ADDR guards. Update comments.
8547 (linux_target_op) <read_offsets>: Conditionally define to
8548 linux_read_offsets if the target is UCLIBC and if it defines
8549 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8550
8551 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8552 Andrew Jenner <andrew@codesourcery.com>
8553
8554 * Makefile.in (SFILES): Add linux-nios2-low.c.
8555 (clean): Add action to delete nios2-linux.c.
8556 (nios2-linux.c): New rule.
8557 * configure.srv: Add nios2*-*-linux*.
8558 * linux-nios2-low.c: New.
8559
8560 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8561
8562 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8563
8564 2013-04-25 Hui Zhu <hui@codesourcery.com>
8565
8566 PR gdb/15186
8567 * ax.c (ax_printf): Add fflush.
8568
8569 2013-04-22 Tom Tromey <tromey@redhat.com>
8570
8571 * Makefile.in (SFILES): Add filestuff.c.
8572 (OBS): Add filestuff.o.
8573 (filestuff.o): New target.
8574 * config.in, configure: Rebuild.
8575 * configure.ac: Check for fdwalk, pipe2.
8576
8577 2013-04-17 Pedro Alves <palves@redhat.com>
8578
8579 * configure.ac (USE_THREAD_DB): Delete variable.
8580 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8581 Don't AC_SUBST USE_THREAD_DB.
8582 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8583 * config.in, configure: Regenerate.
8584
8585 2013-04-16 Pedro Alves <palves@redhat.com>
8586
8587 * linux-low.h (struct lwp_info) <thread_known>: Move under
8588 the USE_THREAD_DB #ifdef.
8589
8590 2013-04-16 Pedro Alves <palves@redhat.com>
8591
8592 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8593 (linux-low.o): Delete rule.
8594 * linux-low.h: Always include "gdb_thread_db.h" instead of
8595 conditionally including thread_db.h.
8596 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8597 HAVE_THREAD_DB_H.
8598
8599 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8600
8601 * Makefile.in (install-only): Fix make install regression.
8602
8603 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8604
8605 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8606 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8607 installation.
8608 * gdbserver.1: Remove.
8609
8610 2013-03-22 Pedro Alves <palves@redhat.com>
8611
8612 * linux-low.c (handle_extended_wait): Don't call
8613 linux_enable_event_reporting.
8614
8615 2013-03-15 Tony Theodore <tonyt@logyst.com>
8616
8617 PR build/9098:
8618 * Makefile.in (SHELL): Use @SHELL@.
8619
8620 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8621
8622 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8623 compiler warning.
8624
8625 2013-03-13 Joel Brobecker <brobecker@adacore.com>
8626
8627 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8628 Remove extraneous NULL element.
8629
8630 2013-03-13 Yao Qi <yao@codesourcery.com>
8631
8632 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8633 'V' block in trace frame.
8634
8635 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8636
8637 * target.h (struct target_ops): Add btrace ops.
8638 (target_supports_btrace): New macro.
8639 (target_enable_btrace): New macro.
8640 (target_disable_btrace): New macro.
8641 (target_read_btrace): New macro.
8642 * gdbthread.h (struct thread_info): Add btrace field.
8643 * server.c: Include btrace-common.h.
8644 (handle_btrace_general_set): New function.
8645 (handle_btrace_enable): New function.
8646 (handle_btrace_disable): New function.
8647 (handle_general_set): Call handle_btrace_general_set.
8648 (handle_qxfer_btrace): New function.
8649 (struct qxfer qxfer_packets[]): Add btrace entry.
8650 * inferiors.c (remove_thread): Disable btrace.
8651 * linux-low: Include linux-btrace.h.
8652 (linux_low_enable_btrace): New function.
8653 (linux_low_read_btrace): New function.
8654 (linux_target_ops): Add btrace ops.
8655 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8656 Add srv_linux_btrace=yes.
8657 (x86_64-*-linux*): Add linux-btrace.o.
8658 Add srv_linux_btrace=yes.
8659 * configure.ac: Define HAVE_LINUX_BTRACE.
8660 * config.in: Regenerated.
8661 * configure: Regenerated.
8662
8663 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8664
8665 * server.c (handle_qxfer): Preserve error message if -3 is
8666 returned.
8667 (qxfer): Document the -3 return value.
8668
8669 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8670
8671 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8672 (linux_btrace_h): New variable.
8673 (linux-btrace.o): New rule.
8674
8675 2013-03-08 Stan Shebs <stan@codesourcery.com>
8676 Hafiz Abid Qadeer <abidh@codesourcery.com>
8677
8678 * tracepoint.c (trace_buffer_size): New global.
8679 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8680 (init_trace_buffer): Change to one-argument function. Allocate
8681 trace buffer memory.
8682 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8683 handle QTBuffer:size packet.
8684 (cmd_bigqtbuffer_size): New function.
8685 (initialize_tracepoint): Call init_trace_buffer with
8686 DEFAULT_TRACE_BUFFER_SIZE.
8687 * server.c (handle_query): Add QTBuffer:size in the
8688 supported packets.
8689
8690 2013-03-07 Yao Qi <yao@codesourcery.com>
8691
8692 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8693 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8694 of -1.
8695 (cmd_qtsp): Adjust condition. Do post increment.
8696 Set cur_action and cur_step_action back to 0.
8697
8698 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8699
8700 PR server/15236
8701 * linux-low.c (linux_write_memory): Return early success if LEN is
8702 zero.
8703
8704 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
8705
8706 * configure.srv: Add x86_64-*-cygwin* as target.
8707
8708 2013-02-28 Tom Tromey <tromey@redhat.com>
8709
8710 * configure.ac: Invoke AC_SYS_LARGEFILE.
8711 * configure, config.in: Rebuild.
8712
8713 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
8714
8715 * win32-low.c: Throughout, fix format strings and casts of
8716 printf-like functions to avoid type related warnings on all
8717 platforms.
8718 (get_child_debug_event): Print dwDebugEventCode as hex since
8719 that's how it's usually documented.
8720
8721 2013-02-28 Yao Qi <yao@codesourcery.com>
8722
8723 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8724 pulongest.
8725
8726 2013-02-27 Jiong Wang <jiwang@tilera.com>
8727
8728 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8729 (reg-tilegx32.c): New rule.
8730 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8731 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8732 different register info initializer according to elf class.
8733 (init_registers_tilgx32): New function. The tilegx32 register info
8734 initializer.
8735 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8736 (tile_store_gregset): Likewise.
8737
8738 2013-02-27 Yao Qi <yao@codesourcery.com>
8739
8740 * server.c (process_point_options): Print debug message when
8741 debug_threads is true.
8742
8743 2013-02-26 Yao Qi <yao@codesourcery.com>
8744
8745 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8746
8747 2013-02-19 Pedro Alves <palves@redhat.com>
8748 Kai Tietz <ktietz@redhat.com>
8749
8750 PR gdb/15161
8751
8752 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8753 instead of strtoul to extract address from packet.
8754 (process_serial_event) <'z'>: Likewise.
8755
8756 2013-02-18 Yao Qi <yao@codesourcery.com>
8757
8758 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8759
8760 2013-02-14 Pedro Alves <palves@redhat.com>
8761
8762 Plug memory leak.
8763
8764 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8765 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8766
8767 2013-02-14 Pedro Alves <palves@redhat.com>
8768
8769 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8770
8771 2013-02-14 Pedro Alves <palves@redhat.com>
8772
8773 * tracepoint.c (save_string): Delete.
8774 (add_tracepoint_action): Use savestring instead of save_string.
8775
8776 2013-02-12 Pedro Alves <palves@redhat.com>
8777
8778 * linux-xtensa-low.c: Ditto.
8779 * xtensa-xtregs.c: Ditto.
8780
8781 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8782
8783 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8784 thread_db.
8785
8786 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8787
8788 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8789 aarch64_num_wp_regs and aarch64_num_bp_regs to
8790 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8791
8792 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8793
8794 * linux-aarch64-low.c (ps_get_thread_area): Replace
8795 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8796
8797 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8798 Marcus Shawcroft <marcus.shawcroft@arm.com>
8799 Nigel Stephens <nigel.stephens@arm.com>
8800 Yufeng Zhang <yufeng.zhang@arm.com>
8801
8802 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8803 (aarch64.c, aarch64-without-fpu.c): New targets.
8804 * configure.srv (aarch64*-*-linux*): New.
8805 * linux-aarch64-low.c: New file.
8806
8807 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8808
8809 * linux-low.c (handle_extended_wait, linux_create_inferior)
8810 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8811 (dequeue_one_deferred_signal, linux_resume_one_thread)
8812 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8813 (linux_tracefork_grandchild, linux_test_for_tracefork)
8814 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8815 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8816 where the argument is 0.
8817
8818 2013-01-25 Yao Qi <yao@codesourcery.com>
8819
8820 * event-loop.c: Include "queue.h".
8821 (gdb_event_p): New typedef.
8822 (struct gdb_event) <next_event>: Remove.
8823 (event_queue): Change to QUEUE(gdb_event_p).
8824 (async_queue_event): Remove.
8825 (gdb_event_xfree): New.
8826 (initialize_event_loop): New.
8827 (process_event): Use API from QUEUE.
8828 (wait_for_event): Likewise.
8829 * server.c (main): Call initialize_event_loop.
8830 * server.h (initialize_event_loop): Declare.
8831
8832 2013-01-18 Yao Qi <yao@codesourcery.com>
8833
8834 * ax.h (struct eval_agent_expr_context): New.
8835 (gdb_eval_agent_expr): Update declaration.
8836 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8837 TFRAME. Add new argument CTX.
8838 * server.h (struct eval_agent_expr_context): Declare.
8839 (agent_mem_read, agent_tsv_read): Update declaration.
8840 (agent_mem_read_string): Likewise.
8841 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8842 (add_traceframe_block): Add new argument TPOINT.
8843 Increase TPOINT->traceframe_usage.
8844 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8845 eval_tracepoint_agent_expr.
8846 (condition_true_at_tracepoint): Likewise.
8847 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8848 (agent_mem_read_string, agent_tsv_read): Likewise.
8849
8850 2013-01-16 Yao Qi <yao@codesourcery.com>
8851
8852 * linux-low.c (linux_resume_one_lwp): Don't check
8853 'lwp->bp_reinsert != 0'.
8854
8855 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8856 Pedro Alves <palves@redhat.com>
8857
8858 * lynx-low.c (ptrace_request_to_str): Define a temporary
8859 macro and use it to simplify this function's implementation.
8860
8861 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8862
8863 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8864 sets errno.
8865
8866 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8867
8868 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8869
8870 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8871
8872 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8873
8874 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8875
8876 * lynx-low.c (lynx_resume): Use the resume_info parameter
8877 to determine the ptid for the lynx_ptrace call, unless
8878 it is equal to minus_one_ptid, in which case we use the
8879 ptid of the current_inferior.
8880 (lynx_wait_1): After having received a thread create/exit
8881 event, resume the inferior's execution using the signaling
8882 thread's ptid, rather than the old ptid.
8883
8884 2013-01-07 Joel Brobecker <brobecker@adacore.com>
8885
8886 * lynx-low.c (lynx_resume): Delete variable ret.
8887
8888 2013-01-01 Joel Brobecker <brobecker@adacore.com>
8889
8890 * gdbreplay.c (gdbreplay_version): Update copyright year.
8891 * server.c (gdbserver_version): Likewise.
8892
8893 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8894
8895 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8896 new thread.
8897
8898 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8899
8900 * lynx-low.c (ptrace_request_to_str): Add handling for
8901 PTRACE_GETTRACESIG.
8902
8903 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8904
8905 * lynx-low.c (lynx_attach): Delete variable new_process.
8906
8907 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8908
8909 * lynx-low.c (lynx_create_inferior): Delete variable
8910 new_process.
8911
8912 2012-12-17 Joel Brobecker <brobecker@adacore.com>
8913
8914 * lynx-low.c (ptrace_request_to_str): Do not handle
8915 PTRACE_GETTHREADLIST if this macro does not exist.
8916
8917 2012-12-15 Yao Qi <yao@codesourcery.com>
8918
8919 * Makefile.in (OBS): Add notif.o.
8920 * notif.c, notif.h: New.
8921 * server.c: Include "notif.h".
8922 (struct vstop_notif) <next>: Remove.
8923 <base>: New field.
8924 (queue_stop_reply): Update.
8925 (push_event, send_next_stop_reply): Remove.
8926 (discard_queued_stop_replies): Update.
8927 (notif_stop): New variable.
8928 (handle_v_stopped): Remove.
8929 (handle_v_requests): Don't call handle_v_stopped. Call
8930 handle_ack_notif instead.
8931 (queue_stop_reply_callback): Call notif_event_enque instead
8932 of queue_stop_reply.
8933 (handle_status): Don't call send_next_stop_reply, call
8934 notif_write_event instead.
8935 (kill_inferior_callback): Likewise.
8936 (detach_or_kill_inferior_callback): Likewise.
8937 (main): Call initialize_notif.
8938 (process_serial_event): Call QUEUE_is_empty.
8939 (handle_target_event): Call notif_push instead of push event.
8940 * server.h (push_event): Remove declaration.
8941
8942 2012-12-10 Tom Tromey <tromey@redhat.com>
8943
8944 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8945 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8946 macros.
8947 (.c.o): Rewrite.
8948 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8949 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8950 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8951 (amd64-linux-ipa.o, ax.o): Rewrite.
8952 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8953 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8954 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8955 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8956 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8957 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8958 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8959 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8960 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8961 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8962 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8963 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8964 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8965 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8966 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8967 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8968 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8969 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8970 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8971 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8972 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8973 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8974 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8975 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8976 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8977 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8978 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8979 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8980 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8981 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8982 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8983 (reg-tilegx.o): Remove.
8984 (all_object_files): New macro.
8985 Include .deps files.
8986 * aclocal.m4, configure: Rebuild.
8987 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8988 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8989 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8990
8991 2012-12-05 Tom Tromey <tromey@redhat.com>
8992
8993 PR gdb/14917:
8994 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8995
8996 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
8997
8998 * configure.ac: Check for linux/perf_event.h.
8999 * config.in: Regenerated.
9000 * configure: Regenerated.
9001
9002 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9003
9004 * hostio.c (handle_readlink): Decrease buffer size
9005 parameter passed to readlink by one byte.
9006
9007 2012-11-26 Yao Qi <yao@codesourcery.com>
9008
9009 * configure.ac (build_warnings): Append '-Wempty-body'.
9010 * configure: Regenerated.
9011 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9012 body.
9013
9014 2012-11-15 Pierre Muller <muller@sourceware.org>
9015
9016 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9017 * config.in: Regenerate.
9018 * configure: Regenerate.
9019 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9020 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9021 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9022 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9023 header.
9024 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9025 instead of <sys/wait.h> header.
9026 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9027
9028 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9029
9030 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9031 (various make rules): Remove -DGDBSERVER
9032
9033 2012-11-09 Yao Qi <yao@codesourcery.com>
9034
9035 * spu-low.c (current_ptid): Move it to ..
9036 * gdbthread.h: ... here. New.
9037 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9038 * server.c (myresume, process_serial_event): Likewise.
9039 * thread-db.c (thread_db_find_new_threads): Likewise.
9040 * tracepoint.c (run_inferior_command): Likewise.
9041
9042 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9043
9044 * server.c (handle_search_memory_1): Include access length in
9045 warning message.
9046
9047 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9048
9049 * linux-crisv32-low.c: Fix compile errors.
9050
9051 2012-09-04 Yao Qi <yao@codesourcery.com>
9052
9053 * tracepoint.c (cmd_qtsv): Adjust debug message.
9054 Don't check CUR_TPOINT.
9055
9056 2012-08-28 Yao Qi <yao@codesourcery.com>
9057
9058 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9059 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9060 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9061 Remove declarations of xmalloc, xreallloc, xstrdup and
9062 freeargv.
9063 * Makefile.in (libiberty_h): New.
9064 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9065 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9066
9067 2012-08-23 Yao Qi <yao@codesourcery.com>
9068
9069 * server.h: Remove declaration of 'xsnprintf'.
9070
9071 2012-08-22 Keith Seitz <keiths@redhat.com>
9072
9073 * server.h: Include build-gnulib-gbserver/config.h.
9074 * gdbreplay.c: Likewise.
9075
9076 2012-08-08 Doug Evans <dje@google.com>
9077
9078 * Makefile.in (SFILES): Add gdb_vecs.c.
9079 (OBS): Add gdb_vecs.o.
9080 (gdb_vecs_h, host_defs_h): New variables.
9081 (thread-db.o): Add $(gdb_vecs_h) dependency.
9082 (gdb_vecs.o): New rule.
9083 * thread-db.c: #include "gdb_vecs.h".
9084 (thread_db_load_search): Use a vector to iterate over path elements.
9085 Handle text appearing after "$pdir".
9086
9087 * configure.ac: Add check for strstr.
9088 * config.in: Regenerate.
9089 * configure: Regenerate.
9090
9091 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9092
9093 * hostio.c (handle_pread): If pread fails, fall back to attempting
9094 lseek/read.
9095 (handle_pwrite): Likewise for pwrite.
9096
9097 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9098
9099 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9100 between unsupported TYPE and unimplementable ADDR/LEN combination.
9101 (arm_insert_point): Act on new return value.
9102
9103 2012-07-31 Pedro Alves <palves@redhat.com>
9104
9105 * server.c (process_point_options): Only skip tokens if we find
9106 one that is unrecognized. Don't treat 'X' specially while
9107 skipping unrecognized tokens.
9108
9109 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9110
9111 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9112 to 4-byte-align HW breakpoint addresses for Thumb.
9113
9114 2012-07-27 Yao Qi <yao@codesourcery.com>
9115
9116 PR remote/14161.
9117
9118 * server.h: Declare gdb_agent_about_to_close.
9119 * target.c (kill_inferior): Include "agent.h".
9120 New. Send command 'kill'.
9121 * target.h (kill_inferior): Removed macro.
9122 * tracepoint.c (gdb_agent_about_to_close): New.
9123 (gdb_agent_helper_thread): Handle command 'close'.
9124 Wait endlessly until the inferior stops.
9125 Install gdb_agent_remove_socket to atexit hook.
9126 (agent_socket_name): New static variable.
9127 (gdb_agent_socket_init): Replace local variable 'name' with
9128 'agent_socket_name'.
9129 (gdb_agent_remove_socket): New.
9130
9131 2012-07-27 Yao Qi <yao@codesourcery.com>
9132
9133 * server.c (process_point_options): Stop at 'X' when parsing.
9134
9135 2012-07-19 Michael Eager <eager@eagercon.com>
9136
9137 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9138 to hw_execute.
9139 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9140 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9141 hardware breakpoint.
9142
9143 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9144
9145 * gdbserver/linux-low.c (initialize_low): Call
9146 linux_ptrace_init_warnings.
9147
9148 2012-07-02 Doug Evans <dje@google.com>
9149
9150 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9151 pointer to int.
9152
9153 2012-07-02 Stan Shebs <stan@codesourcery.com>
9154
9155 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9156 (ax.o): Add it to build rule.
9157 (ax-ipa.o): Ditto.
9158 (OBS): Add format.o.
9159 (IPA_OBS): Add format.o.
9160 * server.c (handle_query): Claim support for breakpoint commands.
9161 (process_point_options): Add command case.
9162 (process_serial_event): Leave running if there are printfs in
9163 effect.
9164 * mem-break.h (any_persistent_commands): Declare.
9165 (add_breakpoint_commands): Declare.
9166 (gdb_no_commands_at_breakpoint): Declare.
9167 (run_breakpoint_commands): Declare.
9168 * mem-break.c (struct point_command_list): New struct.
9169 (struct breakpoint): New field command_list.
9170 (any_persistent_commands): New function.
9171 (add_commands_to_breakpoint): New function.
9172 (add_breakpoint_commands): New function.
9173 (gdb_no_commands_at_breakpoint): New function.
9174 (run_breakpoint_commands): New function.
9175 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9176 locally.
9177 * ax.c: Include format.h.
9178 (ax_printf): New function.
9179 (gdb_eval_agent_expr): Add printf opcode.
9180
9181 2012-06-13 Yao Qi <yao@codesourcery.com>
9182
9183 * server.c (start_inferior): Remove duplicated writes to fields
9184 'last_resume_kind' and 'last_status' of 'current_inferior'.
9185
9186 2012-06-12 Yao Qi <yao@codesourcery.com>
9187 Pedro Alves <palves@redhat.com>
9188
9189 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9190 comment.
9191 * server.c (handle_v_cont): Extend comment.
9192
9193 2012-06-11 Yao Qi <yao@codesourcery.com>
9194
9195 * linux-low.c (linux_attach): Add 'static'.
9196
9197 2012-06-06 Yao Qi <yao@codesourcery.com>
9198
9199 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9200
9201 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9202
9203 Fix gcc -flto compilation warning.
9204 * server.c (main): Make variable multi_mode and attach volatile.
9205
9206 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9207
9208 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9209 if the platform doesn't know about it.
9210
9211 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9212
9213 * Makefile.in (SFILES): Add linux-tile-low.c.
9214 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9215 * configure.srv: Handle tilegx-*-linux*.
9216 * linux-tile-low.c: New file.
9217
9218 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9219
9220 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9221
9222 2012-05-24 Pedro Alves <palves@redhat.com>
9223
9224 PR gdb/7205
9225
9226 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9227
9228 2012-05-24 Pedro Alves <palves@redhat.com>
9229
9230 PR gdb/7205
9231
9232 Replace target_signal with gdb_signal throughout.
9233
9234 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9235
9236 * linux-low.c (linux_store_registers): Avoid the copying sequence
9237 when no data has been retrieved by ptrace.
9238
9239 2012-05-22 Will Deacon <will.deacon@arm.com>
9240
9241 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9242 Include asm/ptrace.h.
9243 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9244 already defined.
9245
9246 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9247
9248 * linux-low.c (linux_store_registers): Don't re-retrieve data
9249 with ptrace that has already been obtained from /proc. Always
9250 copy any data retrieved with ptrace to the buffer supplied.
9251
9252 2012-05-11 Yao Qi <yao@codesourcery.com>
9253 Pedro Alves <palves@redhat.com>
9254
9255 * linux-low.c (enum stopping_threads_kind): New.
9256 (stopping_threads): Change type to `enum stopping_threads_kind'.
9257 (handle_extended_wait): If stopping and suspending threads, leave
9258 the new_lwp suspended too.
9259 (linux_wait_for_event): Adjust.
9260 (stop_all_lwps): Set `stopping_threads' to
9261 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9262 whether we're suspending threads or just stopping them. Assert no
9263 recursion happens.
9264
9265 2012-04-29 Yao Qi <yao@codesourcery.com>
9266
9267 * server.h: Move some code to ...
9268 * gdbthread.h: ... here. New.
9269 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9270 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9271 (nto-low.o, win32-low.o): Likewise.
9272 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9273 * regcache.c, remote-utils.c, server.c: Likewise.
9274 * target.c, tracepoint.c, win32-low.c: Likewise.
9275
9276 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9277
9278 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9279 (PTRACE_ARG4_TYPE): Likewise.
9280 (PTRACE_XFER_TYPE): Likewise.
9281 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9282 ptrace to PTRACE_ARG3_TYPE.
9283 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9284 (PTRACE_ARG4_TYPE): Likewise.
9285 (PTRACE_XFER_TYPE): Likewise.
9286 (linux_detach_one_lwp): Cast fourth argument of
9287 ptrace to long then PTRACE_ARG4_TYPE.
9288 (regsets_fetch_inferior_registers): Cast third argument of
9289 ptrace to long then PTRACE_ARG3_TYPE.
9290 (regsets_store_inferior_registers): Likewise.
9291
9292 2012-04-20 Pedro Alves <palves@redhat.com>
9293
9294 * configure: Regenerate.
9295
9296 2012-04-19 Pedro Alves <palves@redhat.com>
9297
9298 * Makefile.in (GNULIB_BUILDDIR): New.
9299 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9300 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9301 (all, install-only, uninstall, clean-info, all-lib, clean): No
9302 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9303 (maintainer-clean realclean distclean): Use subdir_do.
9304 (subdir_do): New.
9305 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9306 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9307 * acinclude.m4: Include acx_configure_dir.m4.
9308 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9309 calls. Call AC_PROG_RANLIB. Configure gnulib using
9310 ACX_CONFIGURE_DIR.
9311 (GNULIB): New.
9312 (GNULIB_STDINT_H): Adjust.
9313 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9314 * gdbreplay.c: Include build-gnulib/config.h.
9315 * server.h: Likewise.
9316 * aclocal.m4: Regenerate.
9317 * config.in: Regenerate.
9318 * configure: Regenerate.
9319
9320 2012-04-19 Pedro Alves <palves@redhat.com>
9321
9322 * Makefile.in (LIBGNU, INCGNU): Adjust.
9323 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9324 (all, install-only, uninstall, clean-info, all-lib, clean)
9325 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9326 * configure.ac: Adjust AC_OUTPUT output.
9327 * aclocal.m4: Regenerate.
9328 * configure: Regenerate.
9329
9330 2012-04-19 Pedro Alves <palves@redhat.com>
9331
9332 * Makefile.in (generated_files): New.
9333 (server_h): Remove the explicit dependency on config.h, and depend
9334 on $generated_files.
9335
9336 2012-04-19 Pedro Alves <palves@redhat.com>
9337
9338 * Makefile.in (INCGNU): Add -Ignulib.
9339
9340 2012-04-19 Pedro Alves <palves@redhat.com>
9341
9342 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9343 (INCGNU): ... this, and spell out -I here.
9344 (GNULIB_LIB): Rename to ...
9345 (LIBGNU): ... this.
9346 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9347
9348 2012-04-19 Pedro Alves <palves@redhat.com>
9349
9350 * config.in: Regenerate.
9351
9352 2012-04-19 Pedro Alves <palves@redhat.com>
9353
9354 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9355 * server.h (memmem): Remove declaration.
9356 * config.in: Regenerate.
9357 * configure: Regenerate.
9358
9359 2012-04-19 Yao Qi <yao@codesourcery.com>
9360
9361 * Makefile.in (SFILES): Add common/vec.c.
9362 (OBS): Add vec.o.
9363 (vec.o): New rule.
9364
9365 2012-04-19 Yao Qi <yao@codesourcery.com>
9366
9367 * remote-utils.c (prepare_resume_reply): Replace with macro
9368 target_core_of_thread.
9369 * server.c (handle_qxfer_threads_proper): Likewise.
9370 * target.h (traget_core_of_thread): New macro.
9371
9372 2012-04-18 Pedro Alves <palves@redhat.com>
9373
9374 * aclocal.m4: Regenerate.
9375 * configure: Regenerate.
9376
9377 2012-04-16 Yao Qi <yao@codesourcery.com>
9378
9379 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9380 duplicated on address.
9381
9382 2012-04-16 Yao Qi <yao@codesourcery.com>
9383
9384 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9385 (struct tracepoint_action_ops) <send>: New field.
9386 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9387 (agent_expr_send, x_tracepoint_action_send): New.
9388 (l_tracepoint_action_send): New.
9389 (cmd_qtdp): Download and install tracepoint
9390 according to `use_agent'.
9391 (run_inferior_command): Add one more parameter `len'.
9392 Update callers.
9393 (tracepoint_send_agent): New.
9394 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9395
9396 2012-04-16 Yao Qi <yao@codesourcery.com>
9397
9398 * tracepoint.c (download_tracepoints): Moved to ...
9399 (cmd_qtstart): ... here.
9400
9401 2012-04-14 Yao Qi <yao@codesourcery.com>
9402
9403 * tracepoint.c: Include inttypes.h.
9404 (struct collect_memory_action): Use sized types.
9405 (struct tracepoint): Likewise.
9406 (cmd_qtdp, stop_tracing): Update print specifiers.
9407 (cmd_qtp, response_tracepoint): Likewise.
9408 (collect_data_at_tracepoint): Likewise.
9409 (collect_data_at_step): Likewise.
9410
9411 2012-04-14 Yao Qi <yao@codesourcery.com>
9412
9413 Import gnulib module inttypes.
9414 * aclocal.m4, config.in, configure: Regenerated.
9415
9416 2012-04-14 Yao Qi <yao@codesourcery.com>
9417
9418 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9419 Makefile and config.status at last.
9420
9421 2012-04-13 Yao Qi <yao@codesourcery.com>
9422
9423 * tracepoint.c: Include stdint.h unconditionally.
9424
9425 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9426
9427 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9428 on BFD_HAVE_SYS_PROCFS_TYPE.
9429 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9430 * configure: Regenerate.
9431 * config.in: Likewise.
9432
9433 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9434
9435 * Makefile.in (clean): Also remove x32.c x32-linux.c
9436 x32-avx.c x32-avx-linux.c.
9437 (x32.o): New target.
9438 (x32.c): Likewise.
9439 (x32-linux.o): Likewise.
9440 (x32-linux.c): Likewise.
9441 (x32-avx.o): Likewise.
9442 (x32-avx.c): Likewise.
9443 (x32-avx-linux.o): Likewise.
9444 (x32-avx-linux.c): Likewise.
9445
9446 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9447 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9448 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9449 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9450 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9451 i386/x32-avx-linux.xml.
9452
9453 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9454 (init_registers_x32_avx_linux): Likwise.
9455 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9456 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9457
9458 2012-04-13 Pedro Alves <palves@redhat.com>
9459
9460 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9461 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9462 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9463 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9464 the sub-make.
9465
9466 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9467
9468 * linux-x86-low.c (compat_x32_clock_t): New.
9469 (compat_x32_siginfo_t): Likewise.
9470 (compat_x32_siginfo_from_siginfo): Likewise.
9471 (siginfo_from_compat_x32_siginfo): Likewise.
9472 (linux_is_elf64): Likewise.
9473 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9474 and siginfo_from_compat_x32_siginfo for x32.
9475 (x86_arch_setup): Set linux_is_elf64.
9476
9477 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9478
9479 PR gdb/13969
9480 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9481 e_machine field.
9482 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9483 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9484 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9485 compatible with process.
9486
9487 2012-04-12 Yao Qi <yao@codesourcery.com>
9488
9489 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9490 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9491 (install-only, install-info, clean): Handle sub dir gnulib.
9492 (all-lib, am--refresh): New targets.
9493 (memmem.o): Remove target.
9494 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9495 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9496 (AC_REPLACE_FUNCS): Remove memmem.
9497 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9498 (AC_OUTPUT): Generate Makefile in gnulib/.
9499 * aclocal.m4, config.in, configure: Regenerated.
9500
9501 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9502
9503 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9504
9505 2012-04-05 Pedro Alves <palves@redhat.com>
9506
9507 -Werror=strict-aliasing
9508
9509 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9510 pointer.
9511
9512 2012-04-04 Pedro Alves <palves@redhat.com>
9513
9514 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9515 (sparc_store_gregset_from_stack, sparc_store_gregset)
9516 (sparc_breakpoint_at): Fix formatting.
9517
9518 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9519
9520 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9521 are available.
9522 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9523 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9524 * config.in: Regenerate.
9525 * configure: Likewise.
9526
9527 2012-03-29 Pedro Alves <palves@redhat.com>
9528
9529 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9530 Correct ptrace arguments.
9531
9532 2012-03-28 Pedro Alves <palves@redhat.com>
9533
9534 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9535 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9536 (IA64_FR1_REGNUM): New defines.
9537 (ia64_fetch_register): New.
9538 (the_low_target): Install it.
9539 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9540 field.
9541 * linux-low.c (linux_fetch_registers): Try the
9542 the_low_target.fetch_register hook first.
9543
9544 * linux-arm-low.c (the_low_target): Adjust.
9545 * linux-bfin-low.c (the_low_target): Adjust.
9546 * linux-cris-low.c (the_low_target): Adjust.
9547 * linux-crisv32-low.c (the_low_target): Adjust.
9548 * linux-m32r-low.c (the_low_target): Adjust.
9549 * linux-m68k-low.c (the_low_target): Adjust.
9550 * linux-mips-low.c (the_low_target): Adjust.
9551 * linux-ppc-low.c (the_low_target): Adjust.
9552 * linux-s390-low.c (the_low_target): Adjust.
9553 * linux-sh-low.c (the_low_target): Adjust.
9554 * linux-sparc-low.c (the_low_target): Adjust.
9555 * linux-tic6x-low.c (the_low_target): Adjust.
9556 * linux-x86-low.c (the_low_target): Adjust.
9557 * linux-xtensa-low.c (the_low_target): Adjust.
9558
9559 2012-03-26 Pedro Alves <palves@redhat.com>
9560
9561 * server.c (handle_qxfer_libraries): Don't bail early if
9562 the_target->qxfer_libraries_svr4 is not NULL.
9563
9564 2012-03-26 Pedro Alves <palves@redhat.com>
9565
9566 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9567
9568 2012-03-23 Pedro Alves <palves@redhat.com>
9569
9570 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9571 "library-list-svr4" element's start tag when the the DSO list is
9572 empty.
9573
9574 2012-03-23 Pedro Alves <palves@redhat.com>
9575
9576 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9577 a variable whose type size is the same as the inferior's pointer
9578 size.
9579
9580 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9581
9582 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9583 struct siginfo.
9584 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9585 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9586 * linux-low.h: Include <signal.h>.
9587 (struct siginfo): Remove forward declaration.
9588 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9589 struct siginfo.
9590
9591 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9592
9593 * .gitignore: Ignore more files.
9594
9595 2012-03-19 Pedro Alves <palves@redhat.com>
9596 Jan Kratochvil <jan.kratochvil@redhat.com>
9597
9598 * server.c (cont_thread, general_thread): Add describing comments.
9599 (start_inferior): Clear `cont_thread'.
9600 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9601 of a process.
9602
9603 2012-03-15 Yao Qi <yao@codesourcery.com>
9604
9605 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9606 handling to ...
9607 (cmd_qtdp): ... here.
9608
9609 2012-03-15 Yao Qi <yao@codesourcery.com>
9610
9611 * tracepoint.c (struct tracepoint_action_ops): New.
9612 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9613 (m_tracepoint_action_download): New.
9614 (r_tracepoint_action_download): New.
9615 (x_tracepoint_action_download): New.
9616 (l_tracepoint_action_download): New.
9617 (add_tracepoint_action): Install `action->ops' according type.
9618 (download_tracepoint_1): Move code `download' function pointer
9619 of various tracepoint_action_ops.
9620
9621 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9622
9623 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9624 linux_ptrace_attach_warnings.
9625
9626 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9627
9628 * Makefile.in (linux-ptrace.o): New.
9629 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9630 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9631 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9632 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9633 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9634 of these targets.
9635 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9636
9637 2012-03-08 Yao Qi <yao@codesourcery.com>
9638 Pedro Alves <palves@redhat.com>
9639
9640 Fix PR server/13392.
9641 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9642 offset of JMP insn.
9643 * tracepoint.c (remove_tracepoint): New.
9644 (cmd_qtdp): Call remove_tracepoint when failed to install.
9645
9646 2012-03-07 Pedro Alves <palves@redhat.com>
9647
9648 * linux-low.c (get_detach_signal): New.
9649 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9650 Pass on pending signals to PTRACE_DETACH. Check the result of the
9651 ptrace call.
9652 * server.c (program_signals, program_signals_p): New.
9653 (handle_general_set): Handle QProgramSignals.
9654 * server.h (program_signals, program_signals_p): Declare.
9655
9656 2012-03-05 Pedro Alves <palves@redhat.com>
9657 Jan Kratochvil <jan.kratochvil@redhat.com>
9658
9659 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9660 New comment why.
9661
9662 2012-03-03 Yao Qi <yao@codesourcery.com>
9663
9664 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9665 agent_look_up_symbols.
9666
9667 2012-03-03 Yao Qi <yao@codesourcery.com>
9668
9669 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9670 (linux-x86-low.o): Likewise.
9671 * server.h: Remove in_process_agent_loaded.
9672 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9673 common/agent.c.
9674 Update callers.
9675
9676 2012-03-03 Yao Qi <yao@codesourcery.com>
9677
9678 * tracepoint.c (gdb_agent_capability): New global.
9679 (in_process_agent_loaded_ust): Renamed to
9680 `in_process_agent_supports_ust'.
9681 Update callers.
9682 (in_process_agent_supports_ust): Call agent_capability_check.
9683 (clear_installed_tracepoints): Assert that agent supports
9684 agent.
9685
9686 2012-03-03 Yao Qi <yao@codesourcery.com>
9687
9688 * linux-low.c (linux_supports_agent): New.
9689 (linux_target_ops): Initialize field `supports_agent' with
9690 linux_supports_agent.
9691 * target.h (struct target_ops) <supports_agent>: New.
9692 (target_supports_agent): New macro.
9693 * server.c (handle_general_set): Handle packet 'QAgent'.
9694 (handle_query): Send `QAgent+'.
9695 * Makefile.in (server.o): Depends on agent.h.
9696
9697 2012-03-03 Yao Qi <yao@codesourcery.com>
9698
9699 * Makefile.in (OBS): Add agent.o.
9700 Add new rule for agent.o.
9701 Track dependence of tracepoint.c on agent.h.
9702 * tracepoint.c (run_inferior_command_1):
9703 (run_inferior_command): Call agent_run_command.
9704 (gdb_ust_connect_sync_socket): Deleted. Move it to
9705 common/agent.c.
9706 (resume_thread, stop_thread): Likewise.
9707 (gdb_ust_socket_init): Renamed to ...
9708 (gdb_agent_socket_init): ... New.
9709 (gdb_ust_thread): Renamed to ...
9710 (gdb_agent_helper_thread): ... New.
9711 (gdb_ust_init): Move some code to ...
9712 (gdb_agent_init): ... here. New.
9713 [HAVE_UST]: Call gdb_ust_init.
9714 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9715 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9716 * config.in, configure: Regenerated.
9717
9718 2012-03-02 Pedro Alves <palves@redhat.com>
9719
9720 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9721 * linux-low.c (struct simple_pid_list): New.
9722 (stopped_pids): New a struct simple_pid_list pointer.
9723 (add_to_pid_list, pull_pid_from_list): New.
9724 (handle_extended_wait): Don't assume the first signal new children
9725 report is SIGSTOP. Adjust call to pull_pid_from_list.
9726 (linux_wait_for_lwp): Adjust.
9727
9728 2012-03-02 Yao Qi <yao@codesourcery.com>
9729
9730 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9731 debug log.
9732
9733 2012-03-02 Yao Qi <yao@codesourcery.com>
9734
9735 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9736 `stop_pc' and `tpoint'. Update caller.
9737
9738 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9739
9740 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9741 * linux-low.c (use_linux_regsets): New macro.
9742 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9743 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9744 (linux_register_in_regsets): New function.
9745 (usr_fetch_inferior_registers): Skip registers covered by
9746 regsets.
9747 (usr_store_inferior_registers): Likewise.
9748 (usr_fetch_inferior_registers): New macro.
9749 (usr_store_inferior_registers): Likewise.
9750 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9751 (linux_store_registers): Likewise.
9752 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9753 prototype.
9754 (init_registers_mips64_dsp_linux): Likewise.
9755 (init_registers_mips_linux): New macro.
9756 (init_registers_mips_dsp_linux): Likewise.
9757 (mips_dsp_num_regs): Likewise.
9758 (DSP_BASE, DSP_CONTROL): New fallback macros.
9759 (mips_base_regs): New macro.
9760 (mips_regmap): Use it. Fix the size.
9761 (mips_dsp_regmap): New variable.
9762 (mips_dsp_regset_bitmap): Likewise.
9763 (mips_arch_setup): New function.
9764 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9765 than mips_regmap.
9766 (mips_cannot_store_register): Likewise.
9767 (the_low_target): Update .arch_setup, .num_regs and .regmap
9768 initializers. Add .regset_bitmap initializer.
9769 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9770 initializer.
9771 * linux-bfin-low.c (the_low_target): Likewise.
9772 * linux-cris-low.c (the_low_target): Likewise.
9773 * linux-crisv32-low.c (the_low_target): Likewise.
9774 * linux-ia64-low.c (the_low_target): Likewise.
9775 * linux-m32r-low.c (the_low_target): Likewise.
9776 * linux-m68k-low.c (the_low_target): Likewise.
9777 * linux-ppc-low.c (the_low_target): Likewise.
9778 * linux-s390-low.c (the_low_target): Likewise.
9779 * linux-sh-low.c (the_low_target): Likewise.
9780 * linux-sparc-low.c (the_low_target): Likewise.
9781 * linux-tic6x-low.c (the_low_target): Likewise.
9782 * linux-x86-low.c (the_low_target): Likewise.
9783 * linux-xtensa-low.c (the_low_target): Likewise.
9784 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9785 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9786 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9787 srv_xmlfiles.
9788 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9789 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9790
9791 2012-02-29 Yao Qi <yao@codesourcery.com>
9792 Pedro Alves <palves@redhat.com>
9793
9794 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9795 `step_over_finished' is true.
9796
9797 2012-02-27 Pedro Alves <palves@redhat.com>
9798
9799 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9800 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9801
9802 2012-02-27 Pedro Alves <palves@redhat.com>
9803
9804 PR server/9684
9805 * linux-low.c (pid_is_stopped): New.
9806 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9807
9808 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
9809
9810 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9811 of conditions.
9812
9813 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9814
9815 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9816
9817 2012-02-24 Luis Machado <lgustavo@codesourcery>
9818
9819 * server.c (handle_query): Advertise support for target-side
9820 breakpoint condition evaluation.
9821 (process_point_options): New function.
9822 (process_serial_event): When inserting a breakpoint, check for
9823 a target-side condition that should be evaluated.
9824
9825 * mem-break.c: Include regcache.h and ax.h.
9826 (point_cond_list_t): New data structure.
9827 (breakpoint) <cond_list>: New field.
9828 (find_gdb_breakpoint_at): Make non-static.
9829 (delete_gdb_breakpoint_at): Clear any target-side
9830 conditions.
9831 (clear_gdb_breakpoint_conditions): New function.
9832 (add_condition_to_breakpoint): Likewise.
9833 (add_breakpoint_condition): Likewise.
9834 (gdb_condition_true_at_breakpoint): Likewise.
9835 (gdb_breakpoint_here): Return result directly instead
9836 of going through a local variable.
9837
9838 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9839 (clear_gdb_breakpoint_conditions): Likewise.
9840 (add_breakpoint_condition): Likewise.
9841 (gdb_condition_true_at_breakpoint): Likewise.
9842
9843 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9844 (need_step_over_p): Take target-side breakpoint condition into
9845 consideration.
9846
9847 2012-02-24 Luis Machado <lgustavo@codesourcery>
9848
9849 * server.h: Include tracepoint.h.
9850 (agent_mem_read, agent_get_trace_state_variable_value,
9851 agent_set_trace_state_variable_value,
9852 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9853 get_set_tsv_func_addr): New prototypes.
9854
9855 * ax.h: New include file.
9856 * ax.c: New source file.
9857
9858 * tracepoint.c: Include ax.h.
9859 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9860 agent_expr, eval_result_type): Move to ax.h.
9861 (parse_agent_expr): Rename to ...
9862 (gdb_parse_agent_expr): ... this, make it non-static and move
9863 to ax.h.
9864 (unparse_agent_expr) Rename to ...
9865 (gdb_unparse_agent_expr): ... this, make it non-static and move
9866 to ax.h.
9867 (eval_agent_expr): Rename to ...
9868 (eval_tracepoint_agent_expr): ... this.
9869 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9870 forward declarations.
9871 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9872 (agent_get_trace_state_variable_value): New function.
9873 (agent_set_trace_state_variable_value): New function.
9874 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9875 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9876 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9877 (condition_true_at_tracepoint): Likewise.
9878 (parse_agent_expr): Rename to ...
9879 (gdb_parse_agent_expr): ... this and move to ax.c.
9880 (unparse_agent_expr): Rename to ...
9881 (gdb_unparse_agent_expr): ... this and move to ax.c.
9882 (gdb_agent_op_name): Move to ax.c.
9883 (eval_agent_expr): Rename to ...
9884 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9885 and move to ax.c.
9886 (eval_tracepoint_agent_expr): New function.
9887 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
9888 non-static.
9889 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9890 ax.c.
9891 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9892 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9893 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9894 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9895 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9896 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9897 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9898 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9899 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9900 (compile_bytecodes): Remove forward declaration.
9901 (is_goto_target): Move to ax.c.
9902 (compile_bytecodes): Move to ax.c and call
9903 agent_get_trace_state_variable_value (...) and
9904 agent_set_trace_state_variable_value (...).
9905
9906 * Makefile.in: Update ax.c and IPA dependencies.
9907
9908 2012-02-24 Pedro Alves <palves@redhat.com>
9909
9910 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9911 (cmd_bigqtbuffer_circular): ... this. Only handle
9912 'QTBuffer:circular:'.
9913 (handle_tracepoint_general_set): Adjust.
9914
9915 2012-02-16 Yao Qi <yao@codesourcery.com>
9916
9917 * inferiors.c: Move code to ...
9918 * dll.c: .... here. New.
9919 * server.h: Declare clear_dlls.
9920 * Makefile.in (SFILES): Add dll.c.
9921 (OBS): Add dll.o
9922 (dll.o): New rule.
9923
9924 2012-02-11 Yao Qi <yao@codesourcery.com>
9925
9926 * server.c: (handle_monitor_command): Add a new parameter
9927 `own_buf'.
9928 (handle_query): Update caller.
9929
9930 2012-02-09 Joel Brobecker <brobecker@adacore.com>
9931
9932 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9933 * configure, config.in: Regenerate.
9934 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9935 is not defined.
9936
9937 2012-02-02 Pedro Alves <palves@redhat.com>
9938
9939 Try SIGKILL first, then PTRACE_KILL.
9940 * linux-low.c (linux_kill_one_lwp): New.
9941 (linux_kill_one_lwp): Rename to ...
9942 (kill_one_lwp_callback): ... this. Use the new
9943 linux_kill_one_lwp.
9944
9945 2012-02-02 Pedro Alves <palves@redhat.com>
9946
9947 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9948 inferior.
9949
9950 2012-01-27 Pedro Alves <palves@redhat.com>
9951
9952 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9953 (elf_64_file_p): Make static.
9954 (linux_pid_exe_is_elf_64_file): New.
9955 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9956 Delete declarations.
9957 (linux_pid_exe_is_elf_64_file): Declare.
9958 * linux-x86-low.c (x86_arch_setup): Use
9959 linux_pid_exe_is_elf_64_file.
9960
9961 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9962
9963 * linux-low.c (linux_wait_for_event_1): Rename to ...
9964 (linux_wait_for_event): ... here and merge it with former
9965 linux_wait_for_event - new variable wait_ptid, use it.
9966 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9967
9968 2012-01-23 Pedro Alves <palves@redhat.com>
9969
9970 * server.c (main): Avoid yet another case of infinite loop while
9971 detaching/killing after a longjmp.
9972
9973 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9974
9975 Code cleanup.
9976 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9977
9978 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9979
9980 * hostio.c (handle_readlink): New function.
9981 (handle_vFile): Call it to handle "vFile:readlink" packets.
9982
9983 2012-01-20 Pedro Alves <palves@redhat.com>
9984 Ulrich Weigand <ulrich.weigand@linaro.org>
9985
9986 * server.c (handle_v_requests): Only support vAttach and vRun to
9987 start multiple processes when in extended protocol mode.
9988
9989 2012-01-17 Pedro Alves <palves@redhat.com>
9990
9991 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9992 memalign plus mprotect to allocate the scratch buffer.
9993
9994 2012-01-13 Pedro Alves <palves@redhat.com>
9995
9996 * server.c (attach_inferior): Clear `cont_thread'.
9997
9998 2012-01-13 Pedro Alves <palves@redhat.com>
9999
10000 * server.c (main): Avoid infinite loop while detaching/killing
10001 after a longjmp.
10002
10003 2012-01-09 Doug Evans <dje@google.com>
10004
10005 * server.c (start_inferior): Set last_ptid in --wrapper case.
10006
10007 2012-01-06 Yao Qi <yao@codesourcery.com>
10008
10009 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10010 defined.
10011 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10012
10013 2012-01-04 Yao Qi <yao@codesourcery.com>
10014
10015 * tracepoint.c (cmd_qtdp): Print debug message
10016 for static tracepoint.
10017
10018 2012-01-04 Yao Qi <yao@codesourcery.com>
10019
10020 * tracepoint.c (trace_vdebug): Differentiate debug message
10021 between gdbserver and IPA.
10022
10023 2012-01-03 Yao Qi <yao@codesourcery.com>
10024
10025 * tracepoint.c (tracepoint_was_hit): Don't collect for
10026 static tracepoint.
10027
10028 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10029
10030 * terminal.h: Reformat copyright header.
10031
10032 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10033
10034 * server.c (gdbserver_version): Update copyright year.
10035 * gdbreplay.c (gdbreplay_version): Likewise.
10036
10037 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10038
10039 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10040
10041 Revert:
10042 2011-12-18 Hui Zhu <teawater@gmail.com>
10043 * linux-low.c (linux_create_inferior): Save return value to ret.
10044
10045 2011-12-18 Hui Zhu <teawater@gmail.com>
10046
10047 * linux-low.c (linux_create_inferior): Save return value to ret.
10048
10049 2011-12-16 Doug Evans <dje@google.com>
10050
10051 * linux-low.c (linux_create_inferior): If stdio connection,
10052 redirect stdin from /dev/null, stdout to stderr.
10053 * remote-utils.c (remote_is_stdio): New static global.
10054 (remote_connection_is_stdio): New function.
10055 (remote_prepare): Handle stdio connection.
10056 (remote_open): Ditto.
10057 (remote_close): Don't close stdin for stdio connections.
10058 (read_prim,write_prim): New functions. Replace all calls to
10059 read/write to these.
10060 * server.c (main): Watch for "-" argument. Move call to
10061 remote_prepare before start_inferior.
10062 * server.h (STDIO_CONNECTION_NAME): New macro.
10063 (remote_connection_is_stdio): Declare.
10064
10065 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10066 in debugging output.
10067
10068 2011-12-15 Yao Qi <yao@codesourcery.com>
10069
10070 * tracepoint.c: Include sys/syscall.h.
10071 (gdb_ust_thread): Remove preprocessor conditional.
10072
10073 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10074
10075 * linux-low.c (linux_detach_one_lwp): Call
10076 the_low_target.prepare_to_resume before detaching.
10077
10078 2011-12-14 Yao Qi <yao@codesourcery.com>
10079
10080 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10081 of write.
10082
10083 2011-12-14 Yao Qi <yao@codesourcery.com>
10084
10085 * i386-low.c (i386_low_stopped_data_address): Initialize local
10086 variable `control'.
10087
10088 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10089
10090 PR remote/13492
10091
10092 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10093 DR_CONTROL unless necessary. Extend comments.
10094 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10095 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10096
10097 2011-12-13 Yao Qi <yao@codesourcery.com>
10098
10099 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10100 macros.
10101 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10102
10103 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10104
10105 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10106 Print new debug message for such case.
10107
10108 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10109
10110 Fix overlapping memcpy.
10111 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10112 the read_inferior_memory transfer.
10113 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10114 write_inferior_memory transfer.
10115 (set_fast_tracepoint_jump): New variable buf. Use it for the
10116 read_inferior_memory and write_inferior_memory transfers.
10117 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10118 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10119 Use it for the write_inferior_memory transfer.
10120 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10121 buffers.
10122
10123 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10124
10125 * linux-low.c (fetch_register, store_register): Make code
10126 consistent, fix formatting.
10127
10128 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10129
10130 * linux-low.c (usr_store_inferior_registers): Factor out code
10131 to handle individual registers into...
10132 (store_register): ... this new function.
10133
10134 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10135
10136 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10137 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10138 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10139 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10140 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10141 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10142 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10143 (srv_xmlfiles): Add new XML files.
10144
10145 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10146 and <sys/uio.h>.
10147 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10148 (init_registers_s390_linux32v1): Add prototype.
10149 (init_registers_s390_linux32v2): Likewise.
10150 (init_registers_s390_linux64v1): Likewise.
10151 (init_registers_s390_linux64v2): Likewise.
10152 (init_registers_s390x_linux64v1): Likewise.
10153 (init_registers_s390x_linux64v2): Likewise.
10154 (s390_num_regs): Increment to 52.
10155 (s390_regmap): Add orig_r2 register.
10156 (s390_num_regs_3264): Increment to 68.
10157 (s390_regmap_3264): Add orig_r2 register.
10158 (s390_collect_ptrace_register): Handle orig_r2 register.
10159 (s390_supply_ptrace_register): Likewise.
10160 (s390_fill_last_break): New function.
10161 (s390_store_last_break): Likewise.
10162 (s390_fill_system_call): New function.
10163 (s390_store_system_call): Likewise.
10164 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10165 register sets.
10166 (s390_check_regset): New function.
10167 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10168 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10169 Update target_regsets for available register sets.
10170
10171 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10172 Jan Kratochvil <jan.kratochvil@redhat.com>
10173
10174 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10175 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10176 New.
10177 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10178 * linux-low.h (struct process_info_private): New member r_debug.
10179 * server.c (handle_qxfer_libraries): Call
10180 the_target->qxfer_libraries_svr4.
10181 (handle_qxfer_libraries_svr4): New function.
10182 (qxfer_packets): New entry "libraries-svr4".
10183 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10184 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10185 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10186 PACKET_qXfer_libraries_svr4.
10187
10188 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10189
10190 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10191 PSW address/mask between 8-byte and 16-byte formats.
10192 (s390_supply_ptrace_register): Likewise.
10193 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10194 basic addressing mode bit.
10195
10196 2011-11-24 Stan Shebs <stan@codesourcery.com>
10197
10198 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10199
10200 2011-11-17 Stan Shebs <stan@codesourcery.com>
10201
10202 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10203 (tracing_start_time): New global.
10204 (tracing_stop_time): New global.
10205 (tracing_user_name): New global.
10206 (tracing_notes): New global.
10207 (tracing_stop_note): New global.
10208 (cmd_qtstart): Set traceframe_usage, start_time.
10209 (stop_tracing): Set stop_time.
10210 (cmd_qtstatus): Report additional status.
10211 (cmd_qtp): New function.
10212 (handle_tracepoint_query): Call it.
10213 (cmd_qtnotes): New function.
10214 (handle_tracepoint_general_set): Call it.
10215 (get_timestamp): Rename from tsv_get_timestamp.
10216
10217 2011-11-14 Stan Shebs <stan@codesourcery.com>
10218 Kwok Cheung Yeung <kcy@codesourcery.com>
10219
10220 * linux-x86-low.c (small_jump_insn): New.
10221 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10222 trampoline and error message, build a trampoline and issue a small
10223 jump instruction to it.
10224 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10225 trampoline and error message.
10226 (x86_get_min_fast_tracepoint_insn_len): New.
10227 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10228 * linux-low.h (struct linux_target_ops): Add arguments to
10229 install_fast_tracepoint_jump_pad operation, add new operation.
10230 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10231 arguments.
10232 (linux_get_min_fast_tracepoint_insn_len): New function.
10233 (linux_target_op): Add new operation.
10234 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10235 (gdb_trampoline_buffer_end): Ditto.
10236 (gdb_trampoline_buffer_error): Ditto.
10237 (struct ipa_sym_addresses): Add fields for new IPA variables.
10238 (symbol_list): Add entries for new IPA variables.
10239 (struct tracepoint): Add fields to hold the address range of the
10240 trampoline used by the tracepoint.
10241 (trampoline_buffer_head): New static variable.
10242 (trampoline_buffer_tail): Ditto.
10243 (claim_trampoline_space): New function.
10244 (have_fast_tracepoint_trampoline_buffer): New function.
10245 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10246 structure.
10247 (install_fast_tracepoint): Ditto, also add error buffer argument.
10248 (cmd_qtminftpilen): New function.
10249 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10250 (fast_tracepoint_from_trampoline_address): New function.
10251 (fast_tracepoint_collecting): Handle trampoline as part of jump
10252 pad space.
10253 (set_trampoline_buffer_space): New function.
10254 (initialize_tracepoint): Initialize new IPA variables.
10255 * target.h (struct target_ops): Add arguments to
10256 install_fast_tracepoint_jump_pad operation, add new
10257 get_min_fast_tracepoint_insn_len operation.
10258 (target_get_min_fast_tracepoint_insn_len): New.
10259 (install_fast_tracepoint_jump_pad): Add arguments.
10260 * server.h (IPA_BUFSIZ): Define.
10261 * linux-i386-ipa.c: Include extra header files.
10262 (initialize_fast_tracepoint_trampoline_buffer): New function.
10263 (initialize_low_tracepoint): Call it.
10264 * server.h (set_trampoline_buffer_space): Declare.
10265 (claim_trampoline_space): Ditto.
10266 (have_fast_tracepoint_trampoline_buffer): Ditto.
10267
10268 2011-11-14 Yao Qi <yao@codesourcery.com>
10269
10270 * server.c (handle_query): Handle InstallInTrace for qSupported.
10271 * tracepoint.c (add_tracepoint): Sort list.
10272 (install_tracepoint, download_tracepoint): New.
10273 (cmd_qtdp): Call them to install and download tracepoints.
10274 (sort_tracepoints): Removed.
10275 (cmd_qtstart): Update.
10276
10277 2011-11-14 Yao Qi <yao@codesourcery.com>
10278
10279 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10280 * mem-break.h: Declare.
10281 * tracepoint.c (cmd_qtstart): Move some code to ...
10282 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10283 New.
10284 (download_tracepoints): Move some code to ...
10285 (download_tracepoint_1): ... here. New.
10286
10287 2011-11-08 Yao Qi <yao@codesourcery.com>
10288
10289 * remote-utils.c (relocate_instruction): A comment fix.
10290
10291 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10292
10293 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10294 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10295 dr_status_mirror and dr_control_mirror from debug_reg_state.
10296 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10297 (i386_initial_stuff): Remove use of deleted globals.
10298 (i386_get_thread_context, i386_set_thread_context,
10299 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10300 from debug_reg_state.
10301
10302 2011-11-05 Yao Qi <yao@codesourcery.com>
10303
10304 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10305 address as TPOINT's.
10306
10307 2011-11-02 Stan Shebs <stan@codesourcery.com>
10308
10309 * tracepoint.c (agent_mem_read_string): New function.
10310 (eval_agent_expr): Call it for tracenz.
10311 * server.c (handle_query): Report support for tracenz.
10312
10313 2011-11-02 Yao Qi <yao@codesourcery.com>
10314
10315 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10316
10317 2011-11-02 Yao Qi <yao@codesourcery.com>
10318
10319 * target.h: Fix a typo in comment.
10320
10321 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10322
10323 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10324 clobber the breakpoints' shadows with fast tracepoint jumps.
10325 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10326 * target.c (write_inferior_memory): Also pass MYADDR down to
10327 check_mem_write.
10328
10329 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10330
10331 * configure.ac: Check support for personality routine.
10332 * configure: Regenerate.
10333 * config.in: Likewise.
10334 * linux-low.c: Include <sys/personality.h>.
10335 Define ADDR_NO_RANDOMIZE if necessary.
10336 (linux_create_inferior): Disable address space randomization when
10337 forking inferior, if requested.
10338 (linux_supports_disable_randomization): New function.
10339 (linux_target_ops): Install it.
10340 * server.h (disable_randomization): Declare.
10341 * server.c (disable_randomization): New global variable.
10342 (handle_general_set): Handle QDisableRandomization.
10343 (handle_query): Likewise for qSupported.
10344 (main): Support --disable-randomization and --no-disable-randomization
10345 command line arguments.
10346 * target.h (struct target_ops): Add supports_disable_randomization.
10347 (target_supports_disable_randomization): New macro.
10348
10349 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10350
10351 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10352 ifdef check.
10353 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10354 [!PT_GETDSBT] (target_loadmap): New definition.
10355 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10356 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10357 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10358 and PT_GETDSBT to LINUX_LOADMAP.
10359 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10360 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10361
10362 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10363
10364 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10365 (arm_linux_hwbp_cap): New static variable.
10366 (arm_linux_get_hwbp_cap): Replace by ...
10367 (arm_linux_init_hwbp_cap): ... this new function.
10368 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10369 (arm_linux_get_hw_watchpoint_count): Likewise.
10370 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10371 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10372 (arm_prepare_to_resume): Use perror_with_name instead of error.
10373
10374 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10375
10376 * linux-arm-low.c: Include <signal.h>.
10377 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10378 (struct arm_linux_hwbp_cap): New data type.
10379 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10380 (struct arm_linux_hw_breakpoint): New data type.
10381 (MAX_BPTS, MAX_WPTS): Define.
10382 (struct arch_process_info, struct arch_lwp_info): New data types.
10383 (arm_linux_get_hwbp_cap): New function.
10384 (arm_linux_get_hw_breakpoint_count): Likewise.
10385 (arm_linux_get_hw_watchpoint_count): Likewise.
10386 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10387 (arm_hwbp_control_initialize): Likewise.
10388 (arm_hwbp_control_is_enabled): Likewise.
10389 (arm_hwbp_control_is_initialized): Likewise.
10390 (arm_hwbp_control_disable): Likewise.
10391 (arm_linux_hw_breakpoint_equal): Likewise.
10392 (arm_linux_hw_point_initialize): Likewise.
10393 (struct update_registers_data): New data structure.
10394 (update_registers_callback: New function.
10395 (arm_insert_point): Likewise.
10396 (arm_remove_point): Likewise.
10397 (arm_stopped_by_watchpoint): Likewise.
10398 (arm_stopped_data_address): Likewise.
10399 (arm_new_process): Likewise.
10400 (arm_new_thread): Likewise.
10401 (arm_prepare_to_resume): Likewise.
10402 (the_low_target): Register arm_insert_point, arm_remove_point,
10403 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10404 arm_new_thread, and arm_prepare_to_resume.
10405
10406 2011-09-15 Stan Shebs <stan@codesourcery.com>
10407
10408 * server.h (struct emit_ops): Add compare-goto fields.
10409 * tracepoint.c (gdb_agent_op_sizes): New table.
10410 (emit_eq_goto): New function.
10411 (emit_ne_goto): New function.
10412 (emit_lt_goto): New function.
10413 (emit_le_goto): New function.
10414 (emit_gt_goto): New function.
10415 (emit_ge_goto): New function.
10416 (is_goto_target): New function.
10417 (compile_bytecodes): Recognize special cases of compare-goto
10418 combinations and call specialized emitters for them.
10419 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10420 (amd64_emit_ne_goto): New function.
10421 (amd64_emit_lt_goto): New function.
10422 (amd64_emit_le_goto): New function.
10423 (amd64_emit_gt_goto): New function.
10424 (amd64_emit_ge_goto): New function.
10425 (amd64_emit_ops): Add the new functions.
10426 (i386_emit_eq_goto): New function.
10427 (i386_emit_ne_goto): New function.
10428 (i386_emit_lt_goto): New function.
10429 (i386_emit_le_goto): New function.
10430 (i386_emit_gt_goto): New function.
10431 (i386_emit_ge_goto): New function.
10432 (i386_emit_ops): Add the new functions.
10433
10434 2011-09-08 Stan Shebs <stan@codesourcery.com>
10435
10436 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10437 (i386_emit_epilogue): Restore %ebx.
10438
10439 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10440
10441 * server.c (step_thread): Remove definition.
10442 (process_serial_event): Don't handle Hs.
10443 * server.h (step_thread): Remove declaration.
10444 * target.c (set_desired_inferior): Remove use of step_thread.
10445
10446 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10447
10448 * linux-low.c: Include linux-procfs.h.
10449 (linux_attach_lwp_1): Update comments.
10450 (linux_attach): Scan for existing threads when attaching to a
10451 process that is the tgid.
10452 * Makefile.in: Update dependencies.
10453
10454 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10455
10456 * configure.srv: Add linux-procfs.o dependencies.
10457
10458 2011-08-14 Yao Qi <yao@codesourcery.com>
10459
10460 * target.h (struct target_ops): Fix indent.
10461 * win32-low.c (win32_target_ops): Fix comment.
10462
10463 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10464 Yao Qi <yao@codesourcery.com>
10465
10466 * Makefile.in (clean): Remove tic6x-*.c files.
10467 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10468 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10469 (tic6x-c64xp-linux.c): Likewise.
10470 * configure.srv: Add support for tic6x-*-uclinux.
10471 * linux-tic6x-low.c: New.
10472 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10473
10474 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10475 Yao Qi <yao@codesourcery.com>
10476
10477 * target.h (struct target_ops): Add read_loadmap.
10478 * linux-low.c (struct target_loadseg): New type.
10479 (struct target_loadmap): New type.
10480 (linux_read_loadmap): New function.
10481 (linux_target_ops): Add linux_read_loadmap.
10482 * server.c (handle_query): Support qXfer:fdpic:read packet.
10483 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10484 to NULL.
10485
10486 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10487
10488 * win32-low.c: Include <stdint.h>.
10489
10490 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10491
10492 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10493 to the inferior here.
10494 (i386_remove_aligned_watchpoint): Ditto.
10495 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10496 fit part of the watchpoint in the debug registers.
10497 (i386_update_inferior_debug_regs): New.
10498 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10499 registers, and only update the inferior on success.
10500 (i386_low_remove_watchpoint): Ditto.
10501
10502 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10503
10504 * linux-low.c (compare_ints, unique, list_threads, show_process,
10505 linux_core_of_thread): Delete.
10506 (linux_target_ops): Change linux_core_of_thread to
10507 linux_common_core_of_thread.
10508 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10509 * utils.c (malloc_failure): Change type of argument.
10510 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10511 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10512 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10513 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10514 (IPA_OBJS): Add common-utils-ipa.o.
10515 (ptid_h, linux_osdata_h): New macros.
10516 (server_h): Add common/common-utils.h, common/xml-utils.h,
10517 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10518 common/ptid.h.
10519 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10520 ptid.o, buffer.o): New rules.
10521 (linux-low.o): Add common/linux-osdata.h as a dependency.
10522 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10523 * configure.ac: Add AC_HEADER_DIRENT check.
10524 * config.in: Regenerate.
10525 * configure: Regenerate.
10526 * remote-utils.c (xml_escape_text): Delete.
10527 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10528 buffer_xml_printf): Move to common/buffer.c.
10529 * server.c (main): Remove call to initialize_inferiors.
10530 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10531 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10532 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10533 internal_error, gdb_assert, gdb_assert_fail): Delete.
10534 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10535 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10536 common/buffer.h.
10537 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10538 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10539 initialize_inferiors): Delete.
10540
10541 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10542
10543 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10544 symbol error.
10545
10546 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10547
10548 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10549 assertion.
10550 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10551
10552 2011-05-26 Yao Qi <yao@codesourcery.com>
10553
10554 * Makefile.in (thread-db.o): Track dependence to
10555 common/gdb_thread_db.h.
10556 * thread-db.c: include gdb_thread_db.h from right place.
10557
10558 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10559
10560 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10561 __FILE__ and __LINE__ to internal_error.
10562
10563 2011-05-13 Doug Evans <dje@google.com>
10564
10565 * thread-db.c (try_thread_db_load_from_sdir): New function.
10566 (try_thread_db_load_from_dir): New function.
10567 (thread_db_load_search): Handle $sdir, ignore $pdir.
10568 Remove trying of system directories if search of
10569 libthread-db-search-path fails, that is now done via $sdir.
10570
10571 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10572
10573 * server.c (handle_query): Add EnableDisableTracepoints to the list
10574 of supported features.
10575 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10576 tracepoints.
10577 (cmd_qtenable_disable): New.
10578 (cmd_qtstart): Install tracepoints even if disabled.
10579 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10580 receiving a QTEnable or QTDisable packet.
10581 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10582 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10583 tracepoints.
10584 (gdb_probe): Skip data collection if static tracepoint is disabled.
10585
10586 2011-05-10 Doug Evans <dje@google.com>
10587
10588 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10589
10590 2011-05-04 Doug Evans <dje@google.com>
10591
10592 * linux-low.c (linux_join): Skip process lookup.
10593 * spu-low.c (spu_join): Ditto.
10594 * server.c (join_inferiors_callback): Delete.
10595 (process_serial_event): For 'D' packet (detach) call join_inferior
10596 directly.
10597
10598 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10599
10600 * README: Don't mention xscale*-*-linux*.
10601 * configure.srv (xscale*-*-linux*): Don't handle target.
10602
10603 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10604
10605 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10606 casting pointers.
10607 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10608 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10609 (i386_emit_void_call_2): Likewise.
10610
10611 2011-04-26 Yao Qi <yao@codesourcery.com>
10612
10613 * linux-low.c: Move common macros to linux-ptrace.h.
10614 Include linux-ptrace.h.
10615 * Makefile.in (linux_ptrace_h): New.
10616 (linux-low.o): Depends on linux-ptrace.h.
10617
10618 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10619
10620 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10621 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10622 (remote_prepare): New function with most of the TCP code from ...
10623 (remote_open): ... here. Detect PORT here unconditionally. Move also
10624 setting transport_is_reliable.
10625 * server.c (run_once): New variable.
10626 (gdbserver_usage): Document it.
10627 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10628 the first run if RUN_ONCE.
10629 * server.h (run_once, remote_prepare): New declarations.
10630
10631 2011-04-19 Tom Tromey <tromey@redhat.com>
10632
10633 * win32-low.c (handle_load_dll): Remove duplicate "the".
10634
10635 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10636
10637 Remove support for old Cygwin 1.5 versions.
10638 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10639 function to avoid warning.
10640 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10641 warning.
10642
10643 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10644
10645 * gdbserver/server.h (Macro _): Define it if not available.
10646
10647 2011-03-14 Michael Snyder <msnyder@vmware.com>
10648
10649 * hostio.c (handle_close): Remove unnecessary null test.
10650
10651 2011-03-10 Joel Brobecker <brobecker@adacore.com>
10652
10653 * Makefile.in (maintainer-clean realclean distclean): Remove
10654 "make ... subdir_do" command.
10655
10656 2011-03-10 Michael Snyder <msnyder@vmware.com>
10657
10658 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10659
10660 * server.c (handle_v_run): Free alloced buffer on early return.
10661
10662 2011-03-09 Yao Qi <yao@codesourcery.com>
10663
10664 Revert:
10665 2011-03-04 Yao Qi <yao@codesourcery.com>
10666
10667 * Makefile.in: Remove GNU make feature --directory.
10668
10669 2011-03-05 Yao Qi <yao@codesourcery.com>
10670
10671 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10672 (subdir_do): New make target. Copied from gdb/Makefile.
10673 (maintainer-clean, realclean, distclean, clean): Call corresponding
10674 make targets in common/Makefile.
10675
10676 2011-02-11 Yao Qi <yao@codesourcery.com>
10677
10678 * configure.ac: Call AC_PROG_RANLIB.
10679 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10680 * configure: Regenerate.
10681
10682 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10683
10684 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10685
10686 2011-03-06 Yao Qi <yao@codesourcery.com>
10687
10688 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10689
10690 2011-03-05 Yao Qi <yao@codesourcery.com>
10691
10692 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10693 (subdir_do): New make target. Copied from gdb/Makefile.
10694 (maintainer-clean, realclean, distclean, clean): Call corresponding
10695 make targets in common/Makefile.
10696
10697 2011-03-04 Yao Qi <yao@codesourcery.com>
10698
10699 * Makefile.in: Remove GNU make feature --directory.
10700
10701 2011-03-04 Michael Snyder <msnyder@vmware.com>
10702
10703 * server.c (queue_stop_reply): Call xmalloc not malloc.
10704
10705 2011-03-02 Michael Snyder <msnyder@vmware.com>
10706
10707 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10708
10709 2011-02-28 Michael Snyder <msnyder@vmware.com>
10710
10711 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10712 (cmd_qtframe): Ditto.
10713 (cmd_qtbuffer): Ditto.
10714 (cmd_bigqtbuffer): Ditto.
10715
10716 * utils.c (decimal2str): Initialize 'width' to nine, then
10717 don't mess with it.
10718
10719 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10720
10721 * hostio.c (require_data): Free *data, not data.
10722
10723 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10724
10725 * hostio.c (require_data): Use free, not xfree.
10726
10727 2011-02-27 Michael Snyder <msnyder@vmware.com>
10728
10729 * server.c (handle_query): Discard unused value.
10730
10731 * hostio.c (require_data): Free malloc memory before returning
10732 error.
10733
10734 2011-02-26 Michael Snyder <msnyder@vmware.com>
10735
10736 * linux-low.c (list_threads): Call closedir for dirent.
10737
10738 2011-02-27 Michael Snyder <msnyder@vmware.com>
10739
10740 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10741 a case statement falls through.
10742
10743 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10744
10745 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10746 in comparison.
10747
10748 2011-02-26 Michael Snyder <msnyder@vmware.com>
10749
10750 * utils.c (decimal2str): Eliminate dead code and dead param.
10751 (pulongest): Drop dead param from call to decimal2str.
10752 (plongest): Ditto.
10753
10754 2011-02-24 Joel Brobecker <brobecker@adacore.com>
10755
10756 Revert the following patch (not approved yet):
10757 2011-02-21 Hui Zhu <teawater@gmail.com>
10758 * tracepoint.c (tp_printf): New function.
10759 (eval_agent_expr): Handle gdb_agent_op_printf.
10760
10761 2011-02-21 Hui Zhu <teawater@gmail.com>
10762
10763 * tracepoint.c (tp_printf): New function.
10764 (eval_agent_expr): Handle gdb_agent_op_printf.
10765
10766 2011-02-18 Tom Tromey <tromey@redhat.com>
10767
10768 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10769 (tracepoint.o): Likewise.
10770 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10771 (gdb_agent_op_names): Likewise.
10772
10773 2011-02-18 Tom Tromey <tromey@redhat.com>
10774
10775 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10776 gdb_agent_op_rot>: New constants.
10777 (gdb_agent_op_names): Add pick and roll.
10778 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10779 cases.
10780
10781 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10782
10783 * aclocal.m4: Regenerated with aclocal-1.11.1.
10784
10785 2011-02-14 Pedro Alves <pedro@codesourcery.com>
10786
10787 * server.c (handle_qxfer_traceframe_info): New.
10788 (qxfer_packets): Register "traceframe-info".
10789 (handle_query): Report support for qXfer:traceframe-info:read+.
10790 * tracepoint.c (match_blocktype): New.
10791 (traceframe_find_block_type): Rename to ...
10792 (traceframe_walk_blocks): ... this. Add callback filter argument,
10793 and use it.
10794 (traceframe_find_block_type): New, reimplemented on top of
10795 traceframe_walk_blocks.
10796 (build_traceframe_info_xml): New.
10797 (traceframe_read_info): New.
10798 * server.h (traceframe_read_info): Declare.
10799
10800 2011-02-11 Yao Qi <yao@codesourcery.com>
10801
10802 * configure.ac: Call AC_PROG_RANLIB.
10803 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10804 * configure: Regenerate.
10805
10806 2011-02-07 Pedro Alves <pedro@codesourcery.com>
10807
10808 * server.c (gdb_read_memory): Change return semantics to allow
10809 partial transfers.
10810 (handle_search_memory_1): Adjust.
10811 (process_serial_event) <'m' packet>: Handle partial transfers.
10812 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10813
10814 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10815
10816 * regcache.c (init_register_cache): Initialize
10817 regcache->register_status.
10818 (free_register_cache): Release regcache->register_status.
10819 (regcache_cpy): Copy register_status.
10820 (registers_to_string): Print 'x's for unavailable registers.
10821 (supply_register): Mark the register's status valid or
10822 unavailable, depending on whether a buffer was passed in or not.
10823 (supply_register_zeroed): New.
10824 (supply_regblock): Mark the registers' status valid or
10825 unavailable, depending on whether a buffer was passed in or not.
10826 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10827 (struct regcache): New `register_status' field.
10828 (supply_register_zeroed): Declare.
10829 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10830 supply_register_zeroed, rather than passing a NULL buffer to
10831 supply_register.
10832 * tracepoint.c (fetch_traceframe_registers): Update comment.
10833
10834 2011-01-28 Pedro Alves <pedro@codesourcery.com>
10835
10836 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10837 buffer explicit.
10838
10839 2011-01-25 Pedro Alves <pedro@codesourcery.com>
10840
10841 * server.h (decode_xfer_write): Change prototype.
10842 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10843 and don't extract the annex here.
10844 * server.c (decode_xfer_read): Remove `annex' parameter,
10845 and don't extract the annex here.
10846 (decode_xfer): New.
10847 (struct qxfer): New.
10848 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10849 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10850 (handle_qxfer_statictrace): New functions, abstracted out from
10851 handle_query, and made to use the struct qxfer interface.
10852 (handle_threads_qxfer_proper): Rename to ...
10853 (handle_qxfer_threads_proper): ... this.
10854 (handle_threads_qxfer): Rename to ...
10855 (handle_qxfer_threads): ... this. Adjust.
10856 (qxfer_packets): New array.
10857 (handle_qxfer): New function.
10858 (handle_query): Use handle_qxfer.
10859
10860 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10861
10862 * gdbreplay.c: Shorten lines of >= 80 columns.
10863 * linux-low.c: Ditto.
10864 * linux-ppc-low.c: Ditto.
10865 * linux-s390-low.c: Ditto.
10866 * linux-sparc-low.c: Ditto.
10867 * linux-x86-low.c: Ditto.
10868 * linux-xtensa-low.c: Ditto.
10869 * mem-break.c: Ditto.
10870 * nto-low.c: Ditto.
10871 * regcache.h: Ditto.
10872 * remote-utils.c: Ditto.
10873 * server.c: Ditto.
10874 * server.h: Ditto.
10875 * thread-db.c: Ditto.
10876 * tracepoint.c: Ditto.
10877 * utils.c: Ditto.
10878 * win32-low.h: Ditto.
10879
10880 2011-01-05 Joel Brobecker <brobecker@adacore.com>
10881
10882 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10883 update.
10884
10885 2011-01-01 Joel Brobecker <brobecker@adacore.com>
10886
10887 * server.c (gdbserver_version): Update copyright year in version
10888 output.
10889 * gdbreplay.c (gdbreplay_version): Ditto.
10890
10891 2010-12-29 Jie Zhang <jie.zhang@analog.com>
10892
10893 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10894 * linux-bfin-low.c: New file.
10895 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10896 PT_DATA_ADDR for BFIN targets.
10897 * Makefile.in (SFILES): Add linux-bfin-low.c.
10898 (clean): Remove reg-bfin.c.
10899 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10900 * README: Mention supported Blackfin targets.
10901
10902 2010-12-23 Mike Frysinger <vapier@gentoo.org>
10903
10904 * .gitignore: New file.
10905
10906 2010-11-16 Mike Frysinger <vapier@gentoo.org>
10907
10908 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10909
10910 2010-10-22 Jie Zhang <jie@codesourcery.com>
10911
10912 * Makefile.in: Add FLAGS_TO_PASS variable.
10913 (install): Remove dependency of install-only and recursively
10914 invoke make for install-only.
10915
10916 2010-10-04 Doug Evans <dje@google.com>
10917
10918 * Makefile.in (uninstall): Use $(DESTDIR).
10919
10920 2010-09-24 Pedro Alves <pedro@codesourcery.com>
10921
10922 PR gdb/11842
10923
10924 * linux-x86-low.c (compat_siginfo_from_siginfo)
10925 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10926 si_code is < 0. Check for si_code == SI_TIMER before checking for
10927 si_code < 0.
10928
10929 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10930
10931 * lynx-i386-low.c: New file.
10932 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10933
10934 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10935
10936 * lynx-low.c (ptrace_request_to_str): Remove handling for
10937 request values that have been removed in LynxOS 5.x.
10938
10939 2010-09-13 Joel Brobecker <brobecker@adacore.com>
10940
10941 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10942 <ptrace.h>
10943
10944 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10945
10946 * configure.ac: Add --enable-inprocess-agent option.
10947 * configure: Rebuilt.
10948
10949 2010-09-06 Yao Qi <yao@codesourcery.com>
10950
10951 * linux-low.c (linux_kill): Remove unused variable.
10952 (linux_stabilize_threads): Likewise.
10953 * server.c (start_inferior): Likewise.
10954 (queue_stop_reply_callback): Likewise.
10955 * tracepoint.c (do_action_at_tracepoint): Likewise.
10956
10957 2010-09-06 Yao Qi <yao@codesourcery.com>
10958
10959 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10960 on return.
10961
10962 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10963
10964 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10965
10966 2010-09-06 Pedro Alves <pedro@codesourcery.com>
10967
10968 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10969 "$(IPA_DEPFILES)".
10970
10971 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10972
10973 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10974 gdbserver/lynx-ppc-low.c: New files.
10975 * Makefile.in (lynx_low_h): New variable.
10976 (lynx-low.o, lynx-ppc-low.o): New rules.
10977 * configure.ac: On LynxOS, link with -lnetinet.
10978 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10979 * configure: regenerate.
10980
10981 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10982
10983 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10984 * configure.ac: Add check for vasprintf and vsnprintf.
10985 * configure, config.in: Regenerate.
10986 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10987
10988 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10989
10990 * gdbreplay.c: Move include of alloca.h up, next to include of
10991 malloc.h.
10992 * server.h: Add include of malloc.h.
10993 * mem-break.c: Remove include of malloc.h.
10994 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10995
10996 2010-09-01 Joel Brobecker <brobecker@adacore.com>
10997
10998 * Makefile.in (memmem.o): Build with -Wno-error.
10999
11000 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11001
11002 * utils.c (xsnprintf): Make non-static.
11003 * server.h: Add xsnprintf declaration.
11004 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11005 replace calls to snprintf by calls to xsnprintf throughout.
11006
11007 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11008
11009 * configure.ac: Add configure check for alloca.
11010 * configure, config.in: Regenerate.
11011 * server.h: Include alloca.h if it exists.
11012 * gdbreplay.c: Include alloca.h if it exists.
11013
11014 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11015
11016 * linux-low.c (__SIGRTMIN): Define if not already defined.
11017 (linux_create_inferior): Check for __ANDROID__ rather than
11018 __SIGRTMIN.
11019 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11020 are already deferred.
11021 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11022 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11023 stopped and already has a pending signal to report.
11024 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11025 a pending signal to report or is moving out of a jump pad.
11026 (linux_init_signals): Check for __ANDROID__ rather than
11027 __SIGRTMIN.
11028
11029 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11030
11031 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11032 debug_threads check. Avoid a linear search when not doing debug
11033 output.
11034
11035 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11036
11037 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11038 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11039 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11040 (process_event): Change local fd's type to gdb_fildes_t.
11041 (create_file_handler): Adjust prototype.
11042 (delete_file_handler): Adjust prototype.
11043 (handle_file_event): Adjust prototype. Use pfildes.
11044 (create_file_event): Adjsut prototype.
11045 * remote-utils.c (remote_desc, listen_desc): Change type to
11046 gdb_fildes_t.
11047 * server.h: New gdb_fildes_t typedef.
11048 [USE_WIN32API]: Include winsock2.h.
11049 (delete_file_handler, add_file_handler): Adjust prototypes.
11050 (pfildes): Declare.
11051 * utils.c (pfildes): New.
11052
11053 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11054
11055 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11056 * configure: Regenerate.
11057
11058 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11059
11060 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11061 (linux_done_accessing_memory): ... this.
11062 (linux_target_ops): Adjust.
11063 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11064 * nto-low.c (nto_target_ops): Adjust comment.
11065 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11066 * spu-low.c (spu_target_ops): Adjust comment.
11067 * target.h (target_ops): Rename unprepare_to_access_memory field
11068 to done_accessing_memory.
11069 (unprepare_to_access_memory): Rename to ...
11070 (done_accessing_memory): ... this.
11071
11072 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11073
11074 * linux-low.c (linux_prepare_to_access_memory): New.
11075 (linux_unprepare_to_access_memory): New.
11076 (linux_target_ops): Install them.
11077 * server.c (read_memory): Rename to ...
11078 (gdb_read_memory): ... this. Use
11079 prepare_to_access_memory/prepare_to_access_memory.
11080 (write_memory): Rename to ...
11081 (gdb_write_memory): ... this. Use
11082 prepare_to_access_memory/prepare_to_access_memory.
11083 (handle_search_memory_1): Adjust.
11084 (process_serial_event): Adjust.
11085 * target.h (struct target_ops): New fields
11086 prepare_to_access_memory and unprepare_to_access_memory.
11087 (prepare_to_access_memory, unprepare_to_access_memory): New.
11088 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11089 prepare_to_access_memory/prepare_to_access_memory.
11090 * nto-low.c (nto_target_ops): Adjust.
11091 * spu-low.c (spu_target_ops): Adjust.
11092 * win32-low.c (win32_target_ops): Adjust.
11093
11094 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11095
11096 * Makefile.in (WARN_CFLAGS): Get it from configure.
11097 (WERROR_CFLAGS): New.
11098 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11099 * configure.ac: Introduce --enable-werror, which adds -Werror to
11100 the compiler command line. Enabled by default. Disable with
11101 --disable-werror. Add -Wdeclaration-after-statement
11102 Wpointer-arith and -Wformat-nonliteral to warning flags.
11103 * configure: Regenerate.
11104
11105 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11106
11107 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11108
11109 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11110
11111 * gdbreplay.c (remote_error): New.
11112 (gdbchar): New.
11113 (expect): Use gdbchar. Check for error reading from GDB.
11114 Clarify sync error output.
11115 (play): Check for errors writing to GDB.
11116 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11117 * remote-utils.c (getpkt): Check for errors writing to the remote
11118 descriptor.
11119
11120 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11121
11122 * linux-low.c (linux_wait_1): Move non-debugging code out of
11123 `debug_threads' control.
11124
11125 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11126
11127 * linux-low.c (linux_wait_1): Don't set last_status here.
11128 * server.c (push_event, queue_stop_reply_callback): Assert we're
11129 not pushing a TARGET_WAITKIND_IGNORE event.
11130 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11131 (myresume, handle_target_event): Set the thread's last_resume_kind
11132 and last_status from the target returned status.
11133
11134 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11135
11136 PR threads/10729
11137
11138 * linux-x86-low.c (update_debug_registers_callback): New.
11139 (i386_dr_low_set_addr): Use it.
11140 (i386_dr_low_get_addr): New.
11141 (i386_dr_low_set_control): Use update_debug_registers_callback.
11142 (i386_dr_low_get_control): New.
11143 (i386_dr_low_get_status): Adjust.
11144 * linux-low.c (linux_stop_lwp): New.
11145 * linux-low.h (linux_stop_lwp): Declare.
11146
11147 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11148 argument instead of a i386_debug_reg_state.
11149 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11150 a i386_debug_reg_state.
11151 (i386_insert_aligned_watchpoint): Adjust.
11152 (i386_remove_aligned_watchpoint): Adjust.
11153 (i386_low_stopped_data_address): Read the debug registers from the
11154 inferior instead of from the mirrors.
11155 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11156 (i386_dr_low_get_addr): Declare.
11157 (i386_dr_low_get_control): Declare.
11158 (i386_dr_low_get_status): Change prototype.
11159
11160 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11161 (i386_dr_low_get_addr): New.
11162 (i386_dr_low_get_control): New.
11163 (i386_dr_low_get_status): Adjust prototype. Return
11164 dr_status_mirror.
11165 (i386_initial_stuff): Clear dr_status_mirror and
11166 dr_control_mirror.
11167 (i386_get_thread_context): Adjust.
11168 (i386_set_thread_context): Adjust.
11169 (i386_thread_added): Adjust.
11170
11171 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11172
11173 * linux-low.h (linux_thread_area): Delete declaration.
11174
11175 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11176
11177 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11178 after its termination.
11179
11180 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11181
11182 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11183 (gdb_wants_all_stopped): Delete.
11184 (linux_wait_1): Don't call them.
11185 * server.c (handle_v_cont): Tag all threads as want-stopped.
11186 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11187 stopped as "client-wants-stopped".
11188
11189 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11190
11191 * Makefile.in (signals_h): New.
11192 (server_h): Depend on it.
11193 (server.o): Don't depend on $(signals_def).
11194 (signals.o): Depend on $(signals_def).
11195
11196 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11197
11198 * Makefile.in (signals_def): New.
11199 (server_h): Append include/gdb/signals.h and signals_def.
11200 (server.o): Append signals_def.
11201
11202 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11203
11204 * server.c (handle_target_event): Use target_signal_to_host for
11205 resume_info.sig initialization.
11206 * target.h (struct thread_resume) <sig>: New comment.
11207
11208 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11209
11210 * server.c (handle_query): strcpy() the returned string from paddress()
11211 instead of sprintf().
11212 * utils.c (paddress): Return phex_nz().
11213
11214 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11215
11216 * server.c (handle_v_cont): Call mourn_inferior if process
11217 just exited.
11218 (myresume): Likewise.
11219
11220 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11221
11222 Static tracepoints, and integration with UST.
11223
11224 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11225 * mem-break.c (uninsert_all_breakpoints)
11226 (reinsert_all_breakpoints): New.
11227 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11228 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11229 (gdb_agent_ust_loaded, helper_thread_id)
11230 (gdb_agent_helper_thread_id): New macros.
11231 (struct ipa_sym_addresses): Add addr_ust_loaded,
11232 addr_helper_thread_id, addr_cmd_buf.
11233 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11234 (in_process_agent_loaded_ust): New.
11235 (write_e_ust_not_loaded): New.
11236 (maybe_write_ipa_ust_not_loaded): New.
11237 (struct collect_static_trace_data_action): New.
11238 (enum tracepoint_type) <static_tracepoint>: New.
11239 (struct tracepoint) <handle>: Mention static tracepoints.
11240 (struct static_tracepoint_ctx): New.
11241 (CMD_BUF_SIZE): New.
11242 (add_tracepoint_action): Handle static tracepoint actions.
11243 (unprobe_marker_at): New.
11244 (clear_installed_tracepoints): Handle static tracepoints.
11245 (cmd_qtdp): Handle static tracepoints.
11246 (probe_marker_at): New.
11247 (cmd_qtstart): Handle static tracepoints.
11248 (response_tracepoint): Handle static tracepoints.
11249 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11250 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11251 (get_context_regcache): Handle static tracepoints.
11252 (do_action_at_tracepoint): Handle static tracepoint actions.
11253 (traceframe_find_block_type): Handle static trace data blocks.
11254 (traceframe_read_sdata): New.
11255 (download_tracepoints): Download static tracepoint actions.
11256 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11257 (GDB_PROBE_NAME): New.
11258 (ust_ops): New.
11259 (GET_UST_SYM): New.
11260 (USTF): New.
11261 (dlsym_ust): New.
11262 (ust_marker_to_static_tracepoint): New.
11263 (gdb_probe): New.
11264 (collect_ust_data_at_tracepoint): New.
11265 (gdb_ust_probe): New.
11266 (UNIX_PATH_MAX, SOCK_DIR): New.
11267 (gdb_ust_connect_sync_socket): New.
11268 (resume_thread, stop_thread): New.
11269 (run_inferior_command): New.
11270 (init_named_socket): New.
11271 (gdb_ust_socket_init): New.
11272 (cstr_to_hexstr): New.
11273 (next_st): New.
11274 (first_marker, next_marker): New.
11275 (response_ust_marker): New.
11276 (cmd_qtfstm, cmd_qtsstm): New.
11277 (unprobe_marker_at, probe_marker_at): New.
11278 (cmd_qtstmat, gdb_ust_thread): New.
11279 (gdb_ust_init): New.
11280 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11281 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11282 (ST_REGENTRY): New.
11283 (x86_64_st_collect_regmap): New.
11284 (X86_64_NUM_ST_COLLECT_GREGS): New.
11285 (AMD64_RIP_REGNUM): New.
11286 (supply_static_tracepoint_registers): New.
11287 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11288 (ST_REGENTRY): New.
11289 (i386_st_collect_regmap): New.
11290 (i386_NUM_ST_COLLECT_GREGS): New.
11291 (supply_static_tracepoint_registers): New.
11292 * server.c (handle_query): Handle qXfer:statictrace:read.
11293 <qSupported>: Report support for StaticTracepoints, and
11294 qXfer:statictrace:read features.
11295 * server.h (traceframe_read_sdata)
11296 (supply_static_tracepoint_registers): Declare.
11297 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11298 (unpack_varlen_hex): Include in IPA build.
11299 * Makefile.in (ustlibs, ustinc): New.
11300 (IPA_OBJS): Add remote-utils-ipa.o.
11301 ($(IPA_LIB)): Link -ldl and -lpthread.
11302 (UST_CFLAGS): New.
11303 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11304 * config.in, configure: Regenerate.
11305
11306 2010-06-20 Ian Lance Taylor <iant@google.com>
11307 Pedro Alves <pedro@codesourcery.com>
11308
11309 * linux-x86-low.c (always_true): Delete.
11310 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11311 trying to fool the compiler with always_true.
11312
11313 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11314
11315 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11316 conditions in gdbserver.
11317
11318 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11319
11320 * spu-low.c (spu_read_memory): Wrap around local store limit.
11321 (spu_write_memory): Likewise.
11322
11323 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11324
11325 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11326 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11327 LONGEST uses.
11328 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11329 uses.
11330 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11331 uses with LONGEST uses.
11332
11333 2010-06-14 Stan Shebs <stan@codesourcery.com>
11334 Pedro Alves <pedro@codesourcery.com>
11335
11336 Bytecode compiler.
11337
11338 * linux-x86-low.c: Include limits.h.
11339 (add_insns): New.
11340 (always_true): New.
11341 (EMIT_ASM): New.
11342 (EMIT_ASM32): New.
11343 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11344 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11345 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11346 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11347 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11348 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11349 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11350 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11351 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11352 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11353 (amd64_emit_void_call_2): New.
11354 (amd64_emit_ops): New.
11355 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11356 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11357 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11358 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11359 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11360 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11361 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11362 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11363 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11364 (i386_emit_stack_adjust, i386_emit_int_call_1)
11365 (i386_emit_void_call_2): New.
11366 (i386_emit_ops): New.
11367 (x86_emit_ops): New.
11368 (the_low_target): Install x86_emit_ops.
11369 * server.h (struct emit_ops): New.
11370 (get_raw_reg_func_addr): Declare.
11371 (current_insn_ptr, emit_error): Declare.
11372 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11373 (set_trace_state_variable_value): New defines.
11374 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11375 addr_get_trace_state_variable_value and
11376 addr_set_trace_state_variable_value.
11377 (symbol_list): New fields for get_raw_reg,
11378 get_trace_state_variable_value and set_trace_state_variable_value.
11379 (condfn): New typedef.
11380 (struct tracepoint): New field `compiled_cond'.
11381 (do_action_at_tracepoint): Clear compiled_cond.
11382 (get_trace_state_variable_value, set_trace_state_variable_value):
11383 Export in the IPA.
11384 (condition_true_at_tracepoint): If there's a compiled condition,
11385 run that.
11386 (current_insn_ptr, emit_error): New globals.
11387 (struct bytecode_address): New.
11388 (get_raw_reg_func_addr): New.
11389 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11390 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11391 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11392 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11393 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11394 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11395 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11396 (compile_tracepoint_condition, compile_bytecodes): New.
11397 * target.h (emit_ops): Forward declare.
11398 (struct target_ops): New field emit_ops.
11399 (target_emit_ops): New.
11400 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11401 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11402 * linux-low.c (linux_emit_ops): New.
11403 (linux_target_ops): Install it.
11404 * linux-low.h (struct linux_target_ops): New field emit_ops.
11405
11406 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11407
11408 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11409 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11410
11411 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11412 Stan Shebs <stan@codesourcery.com>
11413
11414 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11415 (all): Depend on $(extra_libraries).
11416 (install-only): Install the IPA.
11417 (IPA_OBJS, IPA_LIB): New.
11418 (clean): Remove the IPA lib.
11419 (IPAGENT_CFLAGS): New.
11420 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11421 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11422 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11423 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11424 * configure.ac: Check for atomic builtins support in the compiler.
11425 (IPA_DEPFILES, extra_libraries): Define.
11426 * configure.srv (ipa_obj): Add description.
11427 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11428 (i[34567]86-*-linux*): Set ipa_obj.
11429 (x86_64-*-linux*): Set ipa_obj.
11430 * linux-low.c (stabilizing_threads): New.
11431 (supports_fast_tracepoints): New.
11432 (linux_detach): Stabilize threads before detaching.
11433 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11434 the lwp is either not stabilizing, or is moving out of a jump pad.
11435 (linux_fast_tracepoint_collecting): New.
11436 (maybe_move_out_of_jump_pad): New.
11437 (enqueue_one_deferred_signal): New.
11438 (dequeue_one_deferred_signal): New.
11439 (linux_wait_for_event_1): If moving out of a jump pad, defer
11440 pending signals to later.
11441 (linux_stabilize_threads): New.
11442 (linux_wait_1): Check if threads need moving out of jump pads, and
11443 do it if so.
11444 (stuck_in_jump_pad_callback): New.
11445 (move_out_of_jump_pad_callback): New.
11446 (lwp_running): New.
11447 (linux_resume_one_lwp): Handle moving out of jump pads.
11448 (linux_set_resume_request): Dequeue deferred signals.
11449 (need_step_over_p): Also step over fast tracepoint jumps.
11450 (start_step_over): Also uninsert fast tracepoint jumps.
11451 (finish_step_over): Also reinsert fast tracepoint jumps.
11452 (linux_install_fast_tracepoint_jump): New.
11453 (linux_target_ops): Install linux_stabilize_threads and
11454 linux_install_fast_tracepoint_jump_pad.
11455 * linux-low.h (linux_target_ops) <get_thread_area,
11456 install_fast_tracepoint_jump_pad>: New fields.
11457 (struct lwp_info) <collecting_fast_tracepoint,
11458 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11459 (linux_get_thread_area): Declare.
11460 * linux-x86-low.c (jump_insn): New.
11461 (x86_get_thread_area): New.
11462 (append_insns): New.
11463 (push_opcode): New.
11464 (amd64_install_fast_tracepoint_jump_pad): New.
11465 (i386_install_fast_tracepoint_jump_pad): New.
11466 (x86_install_fast_tracepoint_jump_pad): New.
11467 (the_low_target): Install x86_get_thread_area and
11468 x86_install_fast_tracepoint_jump_pad.
11469 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11470 (struct fast_tracepoint_jump): New.
11471 (fast_tracepoint_jump_insn): New.
11472 (fast_tracepoint_jump_shadow): New.
11473 (find_fast_tracepoint_jump_at): New.
11474 (fast_tracepoint_jump_here): New.
11475 (delete_fast_tracepoint_jump): New.
11476 (set_fast_tracepoint_jump): New.
11477 (uninsert_fast_tracepoint_jumps_at): New.
11478 (reinsert_fast_tracepoint_jumps_at): New.
11479 (set_breakpoint_at): Use write_inferior_memory.
11480 (uninsert_raw_breakpoint): Use write_inferior_memory.
11481 (check_mem_read): Mask out fast tracepoint jumps.
11482 (check_mem_write): Mask out fast tracepoint jumps.
11483 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11484 (set_fast_tracepoint_jump): Declare.
11485 (delete_fast_tracepoint_jump)
11486 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11487 (reinsert_fast_tracepoint_jumps_at): Declare.
11488 * regcache.c: Don't compile many functions when building the
11489 in-process agent library.
11490 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11491 the register buffer in the heap.
11492 (free_register_cache): If the register buffer isn't owned by the
11493 regcache, don't free it.
11494 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11495 pre-existing register caches.
11496 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11497 type.
11498 (convert_ascii_to_int): : Constify `from' parameter type.
11499 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11500 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11501 the needed buffer in-place.
11502 (relocate_instruction): New.
11503 * server.c (handle_query) <qSymbols>: If the target supports
11504 tracepoints, give it a chance of looking up symbols. Report
11505 support for fast tracepoints.
11506 (handle_status): Stabilize threads.
11507 (process_serial_event): Adjust.
11508 * server.h (struct fast_tracepoint_jump): Forward declare.
11509 (struct process_info) <fast_tracepoint_jumps>: New field.
11510 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11511 (decode_X_packet, decode_M_packet): Adjust.
11512 (relocate_instruction): Declare.
11513 (in_process_agent_loaded): Declare.
11514 (tracepoint_look_up_symbols): Declare.
11515 (struct fast_tpoint_collect_status): Declare.
11516 (fast_tracepoint_collecting): Declare.
11517 (force_unlock_trace_buffer): Declare.
11518 (handle_tracepoint_bkpts): Declare.
11519 (initialize_low_tracepoint)
11520 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11521 * target.h (struct target_ops) <stabilize_threads,
11522 install_fast_tracepoint_jump_pad>: New fields.
11523 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11524 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11525 [HAVE_STDINT_H]: Include stdint.h.
11526 (trace_debug_1): Rename to ...
11527 (trace_vdebug): ... this.
11528 (trace_debug): Rename to ...
11529 (trace_debug_1): ... this. Add `level' parameter.
11530 (trace_debug): New.
11531 (ATTR_USED, ATTR_NOINLINE): New.
11532 (IP_AGENT_EXPORT): New.
11533 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11534 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11535 (about_to_request_buffer_space, trace_buffer_is_full)
11536 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11537 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11538 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11539 (traceframe_write_count, traceframes_created)
11540 (trace_state_variables)
11541 New renaming defines.
11542 (struct ipa_sym_addresses): New.
11543 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11544 (symbol_list): New.
11545 (ipa_sym_addrs): New.
11546 (all_tracepoint_symbols_looked_up): New.
11547 (in_process_agent_loaded): New.
11548 (write_e_ipa_not_loaded): New.
11549 (maybe_write_ipa_not_loaded): New.
11550 (tracepoint_look_up_symbols): New.
11551 (debug_threads) [IN_PROCESS_AGENT]: New.
11552 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11553 (UNKNOWN_SIDE_EFFECTS): New.
11554 (stop_tracing): New.
11555 (flush_trace_buffer): New.
11556 (stop_tracing_bkpt): New.
11557 (flush_trace_buffer_bkpt): New.
11558 (read_inferior_integer): New.
11559 (read_inferior_uinteger): New.
11560 (read_inferior_data_pointer): New.
11561 (write_inferior_data_pointer): New.
11562 (write_inferior_integer): New.
11563 (write_inferior_uinteger): New.
11564 (struct collect_static_trace_data_action): Delete.
11565 (enum tracepoint_type): New.
11566 (struct tracepoint) <type>: New field `type'.
11567 <actions_str, step_actions, step_actions_str>: Only include in
11568 GDBserver.
11569 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11570 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11571 (tracepoints): Use IP_AGENT_EXPORT.
11572 (last_tracepoint): Don't include in the IPA.
11573 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11574 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11575 (alloced_trace_state_variables): New.
11576 (trace_state_variables): Use IP_AGENT_EXPORT.
11577 (traceframe_t): Delete unused variable.
11578 (circular_trace_buffer): Don't include in the IPA.
11579 (trace_buffer_start): Delete.
11580 (struct trace_buffer_control): New.
11581 (trace_buffer_free): Delete.
11582 (struct ipa_trace_buffer_control): New.
11583 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11584 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11585 New.
11586 (trace_buffer_ctrl): New.
11587 (TRACE_BUFFER_CTRL_CURR): New.
11588 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11589 Reimplement as macros.
11590 (trace_buffer_wrap): Delete.
11591 (traceframe_write_count, traceframe_read_count)
11592 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11593 (struct tracepoint_hit_ctx) <type>: New field.
11594 (struct fast_tracepoint_ctx): New.
11595 (memory_barrier): New.
11596 (cmpxchg): New.
11597 (record_tracepoint_error): Update atomically in the IPA.
11598 (clear_inferior_trace_buffer): New.
11599 (about_to_request_buffer_space): New.
11600 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11601 updating the same buffer.
11602 (add_tracepoint): Default the tracepoint's type to trap
11603 tracepoint, and orig_size to -1.
11604 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11605 internal variables.
11606 (create_trace_state_variable): New parameter `gdb'. Handle it.
11607 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11608 (cmd_qtdp): Handle fast tracepoints.
11609 (cmd_qtdv): Adjust.
11610 (max_jump_pad_size): New.
11611 (gdb_jump_pad_head): New.
11612 (get_jump_space_head): New.
11613 (claim_jump_space): New.
11614 (sort_tracepoints): New.
11615 (MAX_JUMP_SIZE): New.
11616 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11617 IPA.
11618 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11619 support. Upload fast traceframes, and delete internal IPA
11620 breakpoints.
11621 (stop_tracing_handler): New.
11622 (flush_trace_buffer_handler): New.
11623 (cmd_qtstop): Upload fast tracepoints.
11624 (response_tracepoint): Handle fast tracepoints.
11625 (tracepoint_finished_step): Upload fast traceframes. Set the
11626 tracepoint hit context's tracepoint type.
11627 (handle_tracepoint_bkpts): New.
11628 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11629 type. Add comment about fast tracepoints.
11630 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11631 non-existing action_str field.
11632 (get_context_regcache): Handle fast tracepoints.
11633 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11634 to the regcache.
11635 (fast_tracepoint_from_jump_pad_address): New.
11636 (fast_tracepoint_from_ipa_tpoint_address): New.
11637 (collecting_t): New.
11638 (force_unlock_trace_buffer): New.
11639 (fast_tracepoint_collecting): New.
11640 (collecting): New.
11641 (gdb_collect): New.
11642 (write_inferior_data_ptr): New.
11643 (target_tp_heap): New.
11644 (target_malloc): New.
11645 (download_agent_expr): New.
11646 (UALIGN): New.
11647 (download_tracepoints): New.
11648 (download_trace_state_variables): New.
11649 (upload_fast_traceframes): New.
11650 (IPA_FIRST_TRACEFRAME): New.
11651 (IPA_NEXT_TRACEFRAME_1): New.
11652 (IPA_NEXT_TRACEFRAME): New.
11653 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11654 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11655 (gdb_jump_pad_buffer_end): New.
11656 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11657 (initialize_tracepoint): Adjust.
11658 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11659 buffer. Initialize the low module.
11660 * utils.c (PREFIX, TOOLNAME): New.
11661 (malloc_failure): Use PREFIX.
11662 (error): In the IPA, an error causes an exit.
11663 (fatal, warning): Use PREFIX.
11664 (internal_error): Use TOOLNAME.
11665 (NUMCELLS): Increase to 10.
11666 * configure, config.in: Regenerate.
11667
11668 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11669
11670 * server.c (handle_query) <qSupported>: Do two passes over the
11671 qSupported string to avoid nesting strtok.
11672
11673 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11674
11675 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11676 (CDEPS): New.
11677 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11678 -Wl,--dynamic-list.
11679 * configure: Regenerate.
11680 * proc-service.list: New.
11681
11682 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11683
11684 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11685 New comment.
11686
11687 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11688
11689 * gdbreplay.c (remote_open): Check error return from socket() call by
11690 its equality to -1 not by it being negative.
11691 * remote-utils.c (remote_open): Likewise.
11692
11693 2010-05-23 Pedro Alves <pedro@codesourcery.com>
11694
11695 * config.h: Regenerate.
11696
11697 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11698
11699 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11700 doesn't provide PTRACE_GET_THREAD_AREA.
11701
11702 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11703
11704 * linux-m68k-low.c: Include <asm/ptrace.h>
11705 (ps_get_thread_area): Implement.
11706
11707 2010-05-03 Doug Evans <dje@google.com>
11708
11709 * event-loop.c (struct callback_event): New struct.
11710 (callback_list): New global.
11711 (append_callback_event, delete_callback_event): New functions.
11712 (process_callback): New function.
11713 (start_event_loop): Call it.
11714 * remote-utils.c (NOT_SCHEDULED): Define.
11715 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11716 moved out of readchar.
11717 (readchar): Rewrite. Call reschedule before returning.
11718 (reset_readchar): New function.
11719 (remote_close): Call it.
11720 (process_remaining, reschedule): New functions.
11721 * server.h (callback_handler_func): New typedef.
11722 (append_callback_event, delete_callback_event): Declare.
11723
11724 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11725
11726 * proc-service.c (ps_pglobal_lookup): Use
11727 thread_db_look_up_one_symbol.
11728 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11729 parameter. Use it instead of all_symbols_looked_up.
11730 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11731 field.
11732 (all_symbols_looked_up): Don't declare.
11733 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11734 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11735 field.
11736 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11737 Set all_symbols_looked_up here.
11738 (thread_db_look_up_one_symbol): New.
11739 (thread_db_get_tls_address): Adjust.
11740 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11741 thread_db object on the heap, and tentatively set it in the
11742 process structure.
11743 (thread_db_init): Don't set all_symbols_looked_up here.
11744 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11745
11746 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11747
11748 * linux-low.c (linux_kill, linux_detach): Adjust.
11749 (status_pending_p_callback): Remove redundant statement. Check
11750 for !TARGET_WAITIKIND_IGNORE, instead of
11751 TARGET_WAITKIND_STOPPED.
11752 (handle_tracepoints): Make sure LWP is locked. Adjust.
11753 (linux_wait_for_event_1): Adjust.
11754 (linux_cancel_breakpoints): New.
11755 (unsuspend_one_lwp): New.
11756 (unsuspend_all_lwps): New.
11757 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11758 (send_sigstop_callback): Change return type to int, add new
11759 `except' parameter and handle it.
11760 (suspend_and_send_sigstop_callback): New.
11761 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11762 pass them down. If SUSPEND, also increment the lwp's suspend
11763 count.
11764 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11765 (need_step_over_p): Don't consider suspended LWPs.
11766 (start_step_over): Adjust.
11767 (proceed_one_lwp): Change return type to int, add new `except'
11768 parameter and handle it.
11769 (unsuspend_and_proceed_one_lwp): New.
11770 (proceed_all_lwps): Use find_inferior instead of
11771 for_each_inferior.
11772 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11773 also decrement the suspend count of LWPs. Pass `except' down,
11774 instead of hacking its suspend count.
11775 (linux_pause_all): Add `freeze' parameter. Adjust.
11776 (linux_unpause_all): New.
11777 (linux_target_ops): Install linux_unpause_all.
11778 * server.c (handle_status): Adjust.
11779 * target.h (struct target_ops): New fields `unpause_all' and
11780 `cancel_breakpoints'. Add new parameter to `pause_all'.
11781 (pause_all): Add new `freeze' parameter.
11782 (unpause_all): New.
11783 (cancel_breakpoints): New.
11784 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11785 cancel breakpoints.
11786 (cmd_qtstart): Pause threads.
11787 (stop_tracing): Pause threads, and cancel breakpoints.
11788 * win32-low.c (win32_target_ops): Adjust.
11789
11790 2010-05-03 Pedro Alves <pedro@codesourcery.com>
11791
11792 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11793 the inferior right away from here...
11794 (linux_wait_1): ... to here, and adjust to check the thread's
11795 last_resume_kind instead of the lwp's step or stop_expected flags.
11796
11797 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11798
11799 * README: Use consistent `GDB' and `GDBserver' spellings.
11800
11801 2010-05-02 Pedro Alves <pedro@codesourcery.com>
11802
11803 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11804 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11805 (linux_detach_one_lwp): Assume the lwp is stopped.
11806 (any_thread_of): Delete.
11807 (linux_detach): Stop all lwps here. Don't blindly delete all
11808 breakpoints.
11809 (delete_lwp_callback): New.
11810 (linux_mourn): Delete all lwps of the process that is gone.
11811 (linux_wait_1): Don't delete the last lwp of the process here.
11812 * mem-break.h (mark_breakpoints_out): Declare.
11813 * mem-break.c (mark_breakpoints_out): New.
11814 (free_all_breakpoints): Use it.
11815 * server.c (handle_target_event): If the process is gone, mark
11816 breakpoints out.
11817 * thread-db.c (struct thread_db) <create_bp>: New field.
11818 (thread_db_enable_reporting): Fix prototype. Store a thread event
11819 breakpoint reference in the thread_db struct.
11820 (thread_db_load_search): Clear the thread_db object.
11821 (try_thread_db_load_1): Ditto.
11822 (switch_to_process): New.
11823 (disable_thread_event_reporting): Use it.
11824 (remove_thread_event_breakpoints): New.
11825 (thread_db_detach, thread_db_mourn): Use it.
11826
11827 2010-05-01 Pedro Alves <pedro@codesourcery.com>
11828
11829 * linux-low.c (linux_enable_event_reporting): New.
11830 (linux_wait_for_event_1, handle_extended_wait): Use it.
11831
11832 2010-04-30 Pedro Alves <pedro@codesourcery.com>
11833
11834 * linux-low.c (linux_kill_one_lwp, linux_kill)
11835 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11836 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11837 SIGSTOP even if the LWP is stopped.
11838 (send_sigstop_callback): New.
11839 (stop_all_lwps): Use send_sigstop_callback instead.
11840 (linux_resume_one_thread): Adjust.
11841 (proceed_one_lwp): Still proceed an LWP that the client has
11842 requested to stop, if we haven't reported it as stopped yet. Make
11843 sure that LWPs the client want stopped, have a pending SIGSTOP.
11844
11845 2010-04-26 Doug Evans <dje@google.com>
11846
11847 * server.c (handle_general_set): Make static.
11848
11849 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11850 Print received char after testing for error/eof instead of before.
11851 (input_interrupt): Tweak comment.
11852
11853 2010-04-23 Doug Evans <dje@google.com>
11854
11855 * server.c (start_inferior): Print inferior argv if --debug.
11856
11857 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11858
11859 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11860 * nto-x86-low.c: Include server.h
11861
11862 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11863
11864 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11865 be consistent with other sources of this directory.
11866 (init_registers_amd64): Correct name of source file of this function
11867 in the comment.
11868
11869 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11870
11871 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11872 64-bit executables.
11873
11874 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11875
11876 * win32-i386-low.c: Add 64-bit support.
11877 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11878 (init_registers_amd64): Declare.
11879 (mappings): Add 64-bit version of array.
11880 (init_windows_x86): New function.
11881 (the_low_target): Change init_arch field to init_windows_x86.
11882
11883 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11884
11885 * win32-low.c: Adapt to support also 64-bit architecture.
11886 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11887 (get_image_name): Use SIZE_T type for local variable `done'.
11888 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11889 (toolhelp_get_dll_name): Idem.
11890 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11891 Use uintptr_t typecast to avoid warning.
11892 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11893 (handle_exception): Use phex_nz to avoid warning.
11894 (win32_wait): Remove unused local variable `process'.
11895
11896 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11897
11898 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11899 `amd64-avx.o'.
11900
11901 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11902
11903 * configure.ac: Use `ws2_32' library for srv_mingw.
11904 * configure: Regenerate.
11905 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11906 * remote-utils.c: Likewise.
11907
11908 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11909
11910 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11911 if __x86_64__ is defined.
11912
11913 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11914
11915 * configure: Regenerate.
11916
11917 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11918
11919 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11920 * target.h (target_ops): New get_tib_address field.
11921 * win32-low.h (win32_thread_info): Add thread_local_base field.
11922 * win32-low.c (child_add_thread): Add tlb argument.
11923 Set thread_local_base field to TLB.
11924 (get_child_debug_event): Adapt to child_add_thread change.
11925 (win32_get_tib_address): New function.
11926 (win32_target_ops): Set get_tib_address field to
11927 win32_get_tib_address.
11928 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11929
11930 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11931
11932 * linux-low.c (linux_mourn): Also remove the process.
11933 * server.c (handle_target_event): Don't remove the process here.
11934 * nto-low.c (nto_mourn): New.
11935 (nto_target_ops): Install it.
11936 * spu-low.c (spu_mourn): New.
11937 (spu_target_ops): Install it.
11938 * win32-low.c (win32_mourn): New.
11939 (win32_target_ops): Install it.
11940
11941 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11942
11943 * server.h (buffer_xml_printf): Remove redundant `;'.
11944
11945 2010-04-12 Pedro Alves <pedro@codesourcery.com>
11946
11947 * regcache.c (set_register_cache): Invalidate regcaches before
11948 changing the register cache layout.
11949 (regcache_invalidate_one): Allow a NULL regcache.
11950 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11951 regcaches before changing the register cache layout or the target
11952 regsets.
11953
11954 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11955
11956 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11957 variable warning on Linux/x86-64.
11958
11959 2010-04-11 Pedro Alves <pedro@codesourcery.com>
11960
11961 GDBserver disconnected tracing support.
11962
11963 * linux-low.c (linux_remove_process): Delete.
11964 (add_lwp): Don't set last_resume_kind here.
11965 (linux_kill): Use `mourn'.
11966 (linux_detach): Use `thread_db_detach', and `mourn'.
11967 (linux_mourn): New.
11968 (linux_attach_lwp_1): Adjust comment.
11969 (linux_attach): last_resume_kind moved the thread_info; adjust.
11970 (status_pending_p_callback): Adjust.
11971 (linux_wait_for_event_1): Adjust.
11972 (count_events_callback, select_singlestep_lwp_callback)
11973 (select_event_lwp_callback, cancel_breakpoints_callback)
11974 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11975 (proceed_one_lwp): Adjust.
11976 (linux_async): Add debug output.
11977 (linux_thread_stopped): New.
11978 (linux_pause_all): New.
11979 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11980 linux_pause_all.
11981 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11982 (thread_db_free): Delete declaration.
11983 (thread_db_detach, thread_db_mourn): Declare.
11984 * thread-db.c (thread_db_init): Use thread_db_mourn.
11985 (thread_db_free): Delete, split in two.
11986 (disable_thread_event_reporting): New.
11987 (thread_db_detach): New.
11988 (thread_db_mourn): New.
11989
11990 * server.h (struct thread_info) <last_resume_kind>: New field.
11991 <attached>: Add comment.
11992 <gdb_detached>: New field.
11993 (handler_func): Change return type to int.
11994 (handle_serial_event, handle_target_event): Ditto.
11995 (gdb_connected): Declare.
11996 (tracing): Delete.
11997 (disconnected_tracing): Declare.
11998 (stop_tracing): Declare.
11999
12000 * server.c (handle_query) <qSupported>: Report support for
12001 disconnected tracing.
12002 (queue_stop_reply_callback): Account for running threads.
12003 (gdb_wants_thread_stopped): New.
12004 (gdb_wants_all_threads_stopped): New.
12005 (gdb_reattached_process): New.
12006 (handle_status): Clear the `gdb_detached' flag of all processes.
12007 In all-stop, stop all threads.
12008 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12009 (process_serial_event): If the remote connection breaks, or if an
12010 exit was forced with "monitor exit", force an event loop exit.
12011 Handle disconnected tracing on detach.
12012 (handle_serial_event): Adjust.
12013 (handle_target_event): If GDB isn't connected, forward events back
12014 to the inferior, unless the last process exited, in which case,
12015 exit gdbserver. Adjust interface.
12016
12017 * remote-utils.c (remote_open): Don't block in accept. Instead
12018 register an event loop source on the listen socket file
12019 descriptor. Refactor bits into ...
12020 (listen_desc): ... this new global.
12021 (gdb_connected): ... this new function.
12022 (enable_async_notification): ... this new function.
12023 (handle_accept_event): ... this new function.
12024 (remote_close): Clear remote_desc.
12025
12026 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12027
12028 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12029 New fields.
12030 (mourn_inferior): Define.
12031 (target_process_qsupported): Avoid the dangling else problem.
12032 (thread_stopped): Define.
12033 (pause_all): Define.
12034 (target_waitstatus_to_string): Declare.
12035 * target.c (target_waitstatus_to_string): New.
12036
12037 * tracepoint.c (tracing): Make extern.
12038 (disconnected_tracing): New.
12039 (stop_tracing): Make extern. Handle tracing stops due to GDB
12040 disconnecting.
12041 (cmd_qtdisconnected): New.
12042 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12043 (handle_tracepoint_general_set): Handle QTDisconnected.
12044
12045 * event-loop.c (event_handler_func): Change return type to int.
12046 (process_event): Bail out if the event handler wants the event
12047 loop to stop.
12048 (handle_file_event): Ditto.
12049 (start_event_loop): Bail out if the event handler wants the event
12050 loop to stop.
12051
12052 * nto-low.c (nto_target_ops): Adjust.
12053 * spu-low.c (spu_wait): Don't remove the process here.
12054 (spu_target_ops): Adjust.
12055 * win32-low.c (win32_wait): Don't remove the process here.
12056 (win32_target_ops): Adjust.
12057
12058 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12059
12060 * regcache.c (realloc_register_cache): Invalidate inferior's
12061 regcache before recreating it.
12062
12063 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12064
12065 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12066
12067 2010-04-09 Stan Shebs <stan@codesourcery.com>
12068 Pedro Alves <pedro@codesourcery.com>
12069
12070 * server.h (LONGEST): New.
12071 (struct thread_info) <while_stepping>: New field.
12072 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12073 Declare.
12074 (initialize_tracepoint, handle_tracepoint_general_set)
12075 (handle_tracepoint_query, tracepoint_finished_step)
12076 (tracepoint_was_hit, release_while_stepping_state_list):
12077 (current_traceframe): Declare.
12078 * server.c (handle_general_set): Handle tracepoint packets.
12079 (read_memory): New.
12080 (write_memory): New.
12081 (handle_search_memory_1): Use read_memory.
12082 (handle_query): Report support for conditional tracepoints, trace
12083 state variables, and tracepoint sources. Handle tracepoint
12084 queries.
12085 (main): Initialize the tracepoints module.
12086 (process_serial_event): Handle traceframe reads/writes.
12087
12088 * linux-low.c (handle_tracepoints): New.
12089 (linux_wait_1): Call it.
12090 (linux_resume_one_lwp): Handle while-stepping.
12091 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12092 (linux_target_ops): Install them.
12093 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12094 New field.
12095 * linux-x86-low.c (x86_supports_tracepoints): New.
12096 (the_low_target). Install it.
12097
12098 * mem-break.h (delete_breakpoint): Declare.
12099 * mem-break.c (delete_breakpoint): Make external.
12100
12101 * target.h (struct target_ops): Add `supports_tracepoints',
12102 `read_pc', and `write_pc' fields.
12103 (target_supports_tracepoints): Define.
12104 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12105 (phex_nz): New.
12106
12107 * regcache.h (struct regcache) <registers_owned>: New field.
12108 (init_register_cache, regcache_cpy): Declare.
12109 (regcache_read_pc, regcache_write_pc): Declare.
12110 (register_cache_size): Declare.
12111 (supply_regblock): Declare.
12112 * regcache.c (init_register_cache): New.
12113 (new_register_cache): Use it.
12114 (regcache_cpy): New.
12115 (register_cache_size): New.
12116 (supply_regblock): New.
12117 (regcache_read_pc, regcache_write_pc): New.
12118
12119 * tracepoint.c: New.
12120
12121 * Makefile.in (OBS): Add tracepoint.o.
12122 (tracepoint.o): New rule.
12123
12124 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12125
12126 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12127 (i386-mmx.o): New.
12128 (i386-mmx.c): Likewise.
12129 (i386-mmx-linux.o): Likewise.
12130 (i386-mmx-linux.c): Likewise.
12131
12132 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12133 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12134 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12135 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12136
12137 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12138 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12139 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12140
12141 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12142
12143 * Makefile.in (clean): Updated.
12144 (i386-avx.o): New.
12145 (i386-avx.c): Likewise.
12146 (i386-avx-linux.o): Likewise.
12147 (i386-avx-linux.c): Likewise.
12148 (amd64-avx.o): Likewise.
12149 (amd64-avx.c): Likewise.
12150 (amd64-avx-linux.o): Likewise.
12151 (amd64-avx-linux.c): Likewise.
12152
12153 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12154 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12155 (srv_amd64_regobj): Add amd64-avx.o.
12156 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12157 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12158 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12159 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12160 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12161 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12162 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12163
12164 * i387-fp.c: Include "i386-xstate.h".
12165 (i387_xsave): New.
12166 (i387_cache_to_xsave): Likewise.
12167 (i387_xsave_to_cache): Likewise.
12168 (x86_xcr0): Likewise.
12169
12170 * i387-fp.h (i387_cache_to_xsave): Likewise.
12171 (i387_xsave_to_cache): Likewise.
12172 (x86_xcr0): Likewise.
12173
12174 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12175 * linux-crisv32-low.c (target_regsets): Likewise.
12176 * linux-m68k-low.c (target_regsets): Likewise.
12177 * linux-mips-low.c (target_regsets): Likewise.
12178 * linux-ppc-low.c (target_regsets): Likewise.
12179 * linux-s390-low.c (target_regsets): Likewise.
12180 * linux-sh-low.c (target_regsets): Likewise.
12181 * linux-sparc-low.c (target_regsets): Likewise.
12182 * linux-xtensa-low.c (target_regsets): Likewise.
12183
12184 * linux-low.c: Include <sys/uio.h>.
12185 (regsets_fetch_inferior_registers): Support nt_type.
12186 (regsets_store_inferior_registers): Likewise.
12187 (linux_process_qsupported): New.
12188 (linux_target_ops): Add linux_process_qsupported.
12189
12190 * linux-low.h (regset_info): Add nt_type.
12191 (linux_target_ops): Add process_qsupported.
12192
12193 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12194 and <sys/uio.h>.
12195 (init_registers_i386_avx_linux): New.
12196 (init_registers_amd64_avx_linux): Likewise.
12197 (xmltarget_i386_linux_no_xml): Likewise.
12198 (xmltarget_amd64_linux_no_xml): Likewise.
12199 (PTRACE_GETREGSET): Likewise.
12200 (PTRACE_SETREGSET): Likewise.
12201 (x86_fill_xstateregset): Likewise.
12202 (x86_store_xstateregset): Likewise.
12203 (use_xml): Likewise.
12204 (x86_linux_update_xmltarget): Likewise.
12205 (x86_linux_process_qsupported): Likewise.
12206 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12207 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12208 init_registers_i386_linux here. Call
12209 x86_linux_update_xmltarget.
12210 (the_low_target): Add x86_linux_process_qsupported.
12211
12212 * server.c (handle_query): Call target_process_qsupported.
12213
12214 * target.h (target_ops): Add process_qsupported.
12215 (target_process_qsupported): New.
12216
12217 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12218
12219 * inferiors.c (add_thread): Set last_status kind to
12220 TARGET_WAITKIND_IGNORE.
12221 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12222 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12223 (linux_wait_1): Move `thread' local definition to block that uses
12224 it. Don't NULL initialize `event_child'.
12225 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12226 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12227 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12228
12229 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12230
12231 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12232 an extended waitstatus, or by a watchpoint.
12233 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12234 thread was stepping or has been stopped by a watchpoint.
12235
12236 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12237
12238 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12239 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12240 of another, then delete the previous, and validate all
12241 breakpoints.
12242 (validate_inserted_breakpoint): New.
12243 (delete_disabled_breakpoints): New.
12244 (validate_breakpoints): New.
12245 (check_mem_read): Validate breakpoints before trusting their
12246 shadow. Delete disabled breakpoints.
12247 (check_mem_write): Validate breakpoints before trusting they
12248 should be inserted. Delete disabled breakpoints.
12249 * mem-break.h (validate_breakpoints):
12250 * server.c (handle_query): Validate breakpoints when we see a
12251 qSymbol query.
12252
12253 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12254
12255 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12256 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12257 if we could tell there's a GDB breakpoint at stop_pc.
12258 (need_step_over_p): Don't do a step over if we find a GDB
12259 breakpoint at the resume PC.
12260
12261 * mem-break.c (struct raw_breakpoint): New.
12262 (enum bkpt_type): New type `gdb_breakpoint'.
12263 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12264 fields. New field `raw'.
12265 (find_raw_breakpoint_at): New.
12266 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12267 breakpoint instead.
12268 (set_breakpoint_at): Adjust.
12269 (delete_raw_breakpoint): New.
12270 (release_breakpoint): New.
12271 (delete_breakpoint): Rename to...
12272 (delete_breakpoint_1): ... this. Add proc parameter. Use
12273 release_breakpoint. Return ENOENT.
12274 (delete_breakpoint): Reimplement.
12275 (find_breakpoint_at): Delete.
12276 (find_gdb_breakpoint_at): New.
12277 (delete_breakpoint_at): Delete.
12278 (set_gdb_breakpoint_at): New.
12279 (delete_gdb_breakpoint_at): New.
12280 (gdb_breakpoint_here): New.
12281 (set_reinsert_breakpoint): Use release_breakpoint.
12282 (uninsert_breakpoint): Rename to ...
12283 (uninsert_raw_breakpoint): ... this.
12284 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12285 (reinsert_raw_breakpoint): Change parameter type to
12286 raw_breakpoint.
12287 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12288 instead.
12289 (check_breakpoints): Adjust. Use release_breakpoint.
12290 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12291 (breakpoint_inserted_here): Ditto.
12292 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12293 Don't trust the breakpoint's shadow if it is not inserted.
12294 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12295 (delete_all_breakpoints): Adjust.
12296 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12297 use delete_breakpoint_1.
12298
12299 * mem-break.h (breakpoints_supported): Delete declaration.
12300 (set_gdb_breakpoint_at): Declare.
12301 (gdb_breakpoint_here): Declare.
12302 (delete_breakpoint_at): Delete.
12303 (delete_gdb_breakpoint_at): Declare.
12304
12305 * server.h (struct raw_breakpoint): Forward declare.
12306 (struct process_info): New field `raw_breakpoints'.
12307
12308 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12309 breakpoints.
12310
12311 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12312
12313 * linux-low.c (status_pending_p_callback): Fix comment.
12314 (linux_wait_for_event_1): Move most of the internal breakpoint
12315 handling from here...
12316 (linux_wait_1): ... to here.
12317 (count_events_callback): New.
12318 (select_singlestep_lwp_callback): New.
12319 (select_event_lwp_callback): New.
12320 (cancel_breakpoints_callback): New.
12321 (select_event_lwp): New.
12322 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12323 priority to all LWPs that have had events that should be reported
12324 to the client. Cancel breakpoints when about to reporting the
12325 event to the client, not while stopping lwps. No longer cancel
12326 finished single-steps here.
12327 (cancel_finished_single_step): Delete.
12328 (cancel_finished_single_steps): Delete.
12329
12330 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12331
12332 * mem-break.c (enum bkpt_type): New.
12333 (struct breakpoint): New field `type'.
12334 (set_breakpoint_at): Change return type to struct breakpoint
12335 pointer. Set type to `other_breakpoint' by default.
12336 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12337 in the breakpoint list.
12338 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12339 (reinsert_breakpoint): Rename to ...
12340 (reinsert_raw_breakpoint): ... this.
12341 (reinsert_breakpoints_at): Adjust.
12342 * mem-break.h (struct breakpoint): Declare.
12343 (set_breakpoint_at): Change return type to struct breakpoint
12344 pointer.
12345
12346 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12347
12348 * server.c (handle_query): Assign, not compare.
12349
12350 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12351
12352 Teach linux gdbserver to step-over-breakpoints.
12353
12354 * linux-low.c (can_hardware_single_step): New.
12355 (supports_breakpoints): New.
12356 (handle_extended_wait): If stopping threads, read the stop pc of
12357 the new cloned LWP.
12358 (get_pc): New.
12359 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12360 low target doesn't support retrieving the PC.
12361 (add_lwp): Set last_resume_kind to resume_continue.
12362 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12363 (linux_attach): Don't clear stop_expected. Set the lwp's
12364 last_resume_kind to resume_stop.
12365 (linux_detach_one_lwp): Don't check for removed breakpoints.
12366 (check_removed_breakpoint): Delete.
12367 (status_pending_p): Rename to ...
12368 (status_pending_p_callback): ... this. Don't check for removed
12369 breakpoints. Don't consider threads that are stopped from GDB's
12370 perspective.
12371 (linux_wait_for_lwp): Always read the stop_pc here.
12372 (cancel_breakpoint): New.
12373 (step_over_bkpt): New global.
12374 (linux_wait_for_event_1): Implement stepping over breakpoints.
12375 (gdb_wants_lwp_stopped): New.
12376 (gdb_wants_all_stopped): New.
12377 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12378 single-step traps here. Store the thread's last reported target
12379 wait status.
12380 (send_sigstop): Don't clear stop_expected. Always set it,
12381 instead.
12382 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12383 (cancel_finished_single_step): New.
12384 (cancel_finished_single_steps): New.
12385 (wait_for_sigstop): Don't cancel finished single-step traps here.
12386 (linux_resume_one_lwp): Don't check for removed breakpoints.
12387 Don't set `step' on non-hardware step archs.
12388 (linux_set_resume_request): Ignore resume_stop requests if already
12389 stopping or stopped. Set the lwp's last_resume_kind.
12390 (resume_status_pending_p): Don't check for removed breakpoints.
12391 (need_step_over_p): New.
12392 (start_step_over): New.
12393 (finish_step_over): New.
12394 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12395 requests. Clear the thread's last reported target waitstatus.
12396 Don't use the `suspended' flag. Don't consider pending breakpoints.
12397 (linux_resume): Start a step-over if necessary.
12398 (proceed_one_lwp): New.
12399 (proceed_all_lwps): New.
12400 (unstop_all_lwps): New.
12401 * linux-low.h (struct lwp_info): Rewrite comment for the
12402 `suspended' flag. Add the `stop_pc' field. Delete the
12403 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12404 Add `'last_resume_kind' and `need_step_over' fields.
12405 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12406 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12407 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12408 (set_raw_breakpoint_at): New.
12409 (set_breakpoint_at): Rewrite to use it.
12410 (reinsert_breakpoint_handler): Delete.
12411 (set_reinsert_breakpoint): New.
12412 (reinsert_breakpoint_by_bp): Delete.
12413 (delete_reinsert_breakpoints): New.
12414 (uninsert_breakpoint): Rewrite.
12415 (uninsert_breakpoints_at): New.
12416 (reinsert_breakpoint): Rewrite.
12417 (reinsert_breakpoints_at): New.
12418 (check_breakpoints): Rewrite.
12419 (breakpoint_here): New.
12420 (breakpoint_inserted_here): New.
12421 (check_mem_read): Adjust.
12422 * mem-break.h (breakpoints_supported, breakpoint_here)
12423 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12424 (reinsert_breakpoint_by_bp): Delete declaration.
12425 (delete_reinsert_breakpoints): Declare.
12426 (reinsert_breakpoint): Delete declaration.
12427 (reinsert_breakpoints_at): Declare.
12428 (uninsert_breakpoint): Delete declaration.
12429 (uninsert_breakpoints_at): Declare.
12430 (check_breakpoints): Adjust prototype.
12431 * server.h: Adjust include order.
12432 (struct thread_info): Declare here. Add a `last_status' field.
12433
12434 2010-03-23 Michael Snyder <msnyder@vmware.com>
12435
12436 * server.c (crc32): New function.
12437 (handle_query): Add handling for 'qCRC:' request.
12438
12439 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12440
12441 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12442 lwp had been stopped by a watchpoint.
12443
12444 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12445
12446 * server.h (internal_error): Declare.
12447 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12448 * utils.c (internal_error): New function.
12449
12450 2010-03-15 Andreas Schwab <schwab@redhat.com>
12451
12452 * configure.srv: Fix typo setting srv_regobj.
12453
12454 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12455
12456 * linux-low.c (fetch_register): Avoid passing a non string literal
12457 format to `error'.
12458 (usr_store_inferior_registers): Ditto.
12459
12460 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12461
12462 * linux-low.c (linux_write_memory): Bail out early if peeking
12463 memory failed.
12464
12465 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12466
12467 * linux-low.h (struct lwp_info): New fields
12468 `stopped_by_watchpoint' and `stopped_data_address'.
12469 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12470 here, and cache them in the lwp object.
12471 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12472 directly.
12473 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12474 field.
12475 (linux_stopped_by_watchpoint): Rewrite.
12476 (linux_stopped_data_address): Rewrite.
12477
12478 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12479
12480 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12481 switching the current inferior, not before.
12482
12483 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12484
12485 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12486 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12487 i386-linux.c and amd64-linux.c.
12488 (reg-i386.o): Removed.
12489 (reg-i386.c): Likewise.
12490 (reg-i386-linux.o): Likewise.
12491 (reg-i386-linux.c): Likewise.
12492 (reg-x86-64.o): Likewise.
12493 (reg-x86-64.c): Likewise.
12494 (reg-x86-64-linux.o): Likewise.
12495 (reg-x86-64-linux.c): Likewise.
12496 (i386.o): New.
12497 (i386.c): Likewise.
12498 (i386-linux.o): Likewise.
12499 (i386-linux.c): Likewise.
12500 (amd64.o): Likewise.
12501 (amd64.c): Likewise.
12502 (amd64-linux.o): Likewise.
12503 (amd64-linux.c): Likewise.
12504
12505 * configure.srv (srv_i386_regobj): New.
12506 (srv_i386_linux_regobj): Likewise.
12507 (srv_amd64_regobj): Likewise.
12508 (srv_amd64_linux_regobj): Likewise.
12509 (srv_i386_32bit_xmlfiles): Likewise.
12510 (srv_i386_64bit_xmlfiles): Likewise.
12511 (srv_i386_xmlfiles): Likewise.
12512 (srv_amd64_xmlfiles): Likewise.
12513 (srv_i386_linux_xmlfiles): Likewise.
12514 (srv_amd64_linux_xmlfiles): Likewise.
12515 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12516 srv_xmlfiles to $srv_i386_xmlfiles.
12517 (i[34567]86-*-mingw32ce*): Likewise.
12518 (i[34567]86-*-mingw*): Likewise.
12519 (i[34567]86-*-nto*): Likewise.
12520 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12521 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12522 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12523 (x86_64-*-linux*): Likewise.
12524
12525 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12526 (init_registers_amd64_linux): New.
12527 (x86_arch_setup): Replace init_registers_x86_64_linux with
12528 init_registers_amd64_linux.
12529
12530 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12531
12532 * configure.ac: Check for libdl. If it is not available link against
12533 static libthread_db.
12534 * configure: Regenerate.
12535
12536 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12537
12538 PR9605
12539
12540 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12541 handing a read watchpoint.
12542 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12543
12544 2010-02-12 Doug Evans <dje@google.com>
12545
12546 * linux-low.c (linux_supports_tracefork_flag): Document.
12547 (linux_look_up_symbols): Add comment.
12548
12549 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12550
12551 * regcache.c (supply_register): Clear regcache if buf is NULL.
12552
12553 2010-02-02 Nicolas Roche <roche@sourceware.org>
12554 Joel Brobecker <brobecker@adacore.com>
12555
12556 * inferiors.c (find_inferior): Add function documentation.
12557 (unloaded_dll): Handle the case where the unloaded dll has not
12558 been previously registered in the dll list.
12559
12560 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12561
12562 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12563 (thumb2_breakpoint): New.
12564 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12565
12566 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12567
12568 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12569 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12570 breakpoints.
12571
12572 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12573
12574 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12575
12576 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12577
12578 * linux-s390-low.c (s390_collect_ptrace_register)
12579 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12580
12581 2010-01-21 Doug Evans <dje@google.com>
12582
12583 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12584 (PTRACE_ARG4_TYPE): New macro.
12585 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12586 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12587 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12588 (usr_store_inferior_registers): Ditto.
12589 (linux_read_memory, linux_write_memory): Ditto.
12590 (linux_test_for_tracefork): Ditto.
12591
12592 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12593 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12594
12595 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12596
12597 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12598 target.
12599
12600 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12601
12602 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12603 prototype to take a regcache. Adjust.
12604
12605 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12606
12607 * regcache.h (struct thread_info): Forward declare.
12608 (struct regcache): New.
12609 (new_register_cache): Adjust prototype.
12610 (get_thread_regcache): Declare.
12611 (free_register_cache): Adjust prototype.
12612 (registers_to_string, registers_from_string): Ditto.
12613 (supply_register, supply_register_by_name, collect_register)
12614 (collect_register_as_string, collect_register_by_name): Ditto.
12615 * regcache.c (struct inferior_regcache_data): Delete.
12616 (get_regcache): Rename to ...
12617 (get_thread_regcache): ... this. Adjust. Switch inferior before
12618 fetching registers.
12619 (regcache_invalidate_one): Adjust.
12620 (regcache_invalidate): Fix prototype.
12621 (new_register_cache): Return the new register cache.
12622 (free_register_cache): Change prototype.
12623 (realloc_register_cache): Adjust.
12624 (registers_to_string): Change prototype to take a regcache. Adjust.
12625 (registers_from_string): Ditto.
12626 (register_data): Ditto.
12627 (supply_register): Ditto.
12628 (supply_register_by_name): Ditto.
12629 (collect_register): Ditto.
12630 (collect_register_as_string): Ditto.
12631 (collect_register_by_name): Ditto.
12632 * server.c (process_serial_event): Adjust.
12633 * linux-low.h (regset_fill_func, regset_store_func): Change
12634 prototype.
12635 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12636 Change prototype.
12637 * linux-low.c (get_stop_pc): Adjust.
12638 (check_removed_breakpoint): Adjust.
12639 (linux_wait_for_event): Adjust.
12640 (linux_resume_one_lwp): Adjust.
12641 (fetch_register): Add regcache parameter. Adjust.
12642 (usr_store_inferior_registers): Ditto.
12643 (regsets_fetch_inferior_registers): Ditto.
12644 (regsets_store_inferior_registers): Ditto.
12645 (linux_fetch_registers, linux_store_registers): Ditto.
12646 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12647 regcache. Adjust.
12648 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12649 Ditto.
12650 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12651 prototype to take a regcache.
12652 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12653 * remote-utils.c (convert_ascii_to_int, outreg)
12654 (prepare_resume_reply): Change prototype to take a regcache.
12655 Adjust.
12656 * target.h (struct target_ops) <fetch_registers, store_registers>:
12657 Change prototype to take a regcache.
12658 (fetch_inferior_registers, store_inferior_registers): Change
12659 prototype to take a regcache. Adjust.
12660 * proc-service.c (ps_lgetregs): Adjust.
12661 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12662 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12663 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12664 take a regcache. Adjust.
12665 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12666 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12667 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12668 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12669 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12670 (cris_cannot_fetch_register):
12671 (cris_breakpoint_at): Change prototype to take a regcache.
12672 Adjust.
12673 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12674 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12675 to take a regcache. Adjust.
12676 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12677 Adjust.
12678 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12679 take a regcache. Adjust.
12680 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12681 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12682 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12683 * linux-mips-low.c (mips_get_pc):
12684 (mips_set_pc): Change prototype to take a regcache. Adjust.
12685 (mips_reinsert_addr): Adjust.
12686 (mips_collect_register): Change prototype to take a regcache.
12687 Adjust.
12688 (mips_supply_register):
12689 (mips_collect_register_32bit, mips_supply_register_32bit)
12690 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12691 (mips_store_fpregset): Ditto.
12692 * linux-ppc-low.c (ppc_supply_ptrace_register)
12693 (ppc_supply_ptrace_register): Ditto.
12694 (parse_spufs_run): Adjust.
12695 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12696 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12697 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12698 take a regcache. Adjust.
12699 * linux-s390-low.c (s390_collect_ptrace_register)
12700 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12701 (s390_set_pc): Change prototype to take a regcache. Adjust.
12702 (s390_arch_setup): Adjust.
12703 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12704 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12705 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12706 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12707 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12708 regcache. Adjust.
12709 (sparc_breakpoint_at): Adjust.
12710 * linux-xtensa-low.c (xtensa_fill_gregset):
12711 (xtensa_store_gregset):
12712 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12713 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12714 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12715 prototype to take a regcache. Adjust.
12716 * win32-arm-low.c (arm_fetch_inferior_register)
12717 (arm_store_inferior_register): Change prototype to take a
12718 regcache. Adjust.
12719 * win32-i386-low.c (i386_fetch_inferior_register)
12720 (i386_store_inferior_register): Change prototype to take a
12721 regcache. Adjust.
12722 * win32-low.c (child_fetch_inferior_registers)
12723 (child_store_inferior_registers): Change prototype to take a
12724 regcache. Adjust.
12725 (win32_wait): Adjust.
12726 (win32_fetch_inferior_registers): Change prototype to take a
12727 regcache. Adjust.
12728 (win32_store_inferior_registers): Adjust.
12729 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12730 store_inferior_register>: Change prototype to take a regcache.
12731
12732 2010-01-20 Doug Evans <dje@google.com>
12733
12734 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12735 #ifdef.
12736 (linux_wait_for_event1, linux_init_signals): Ditto.
12737 (W_STOPCODE): Provide definition if missing.
12738
12739 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12740
12741 * linux-low.c (linux_core_of_thread): New.
12742 (compare_ints, show_process, list_threads): New.
12743 (linux_qxfer_osdata): Report threads and cores.
12744 (linux_target_op): Register linux_core_of_thread.
12745 * remote-utils.c (prepare_resume_reply): Report the core.
12746 (buffer_xml_printf): Support %d specifier.
12747 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12748 New.
12749 (handle_query): Handle qXfer:threads. Announce availability
12750 thereof.
12751 * target.h (struct target_ops): New field core_of_thread.
12752
12753 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12754
12755 * Makefile.in (clean): Remove new generated files.
12756 (reg-s390.o, reg-s390.c): Remove rules.
12757 (reg-s390x.o, reg-s390x.c): Likewise.
12758 (s390-linux32.o, s390-linux32.c): Add rules.
12759 (s390-linux64.o, s390-linux64.c): Likewise.
12760 (s390x-linux64.o, s390x-linux64.c): Likewise.
12761 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12762 * linux-s390-low.c: Include <elf.h>.
12763 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12764 (init_registers_s390): Remove prototype.
12765 (init_registers_s390x): Likewise.
12766 (init_registers_s390_linux32): Add prototype.
12767 (init_registers_s390_linux64): Likewise.
12768 (init_registers_s390x_linux64): Likewise.
12769 (s390_num_regs_3264): New define.
12770 (s390_regmap_3264): New global variable.
12771 (s390_cannot_fetch_register): Remove obsolete check.
12772 (s390_cannot_store_register): Likewise.
12773 (s390_collect_ptrace_register): Handle upper/lower register halves.
12774 (s390_supply_ptrace_register): Likewise.
12775 (s390_fill_gregset): Update to register number changes.
12776 (s390_get_hwcap): New routine.
12777 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12778 Install appropriate regmap and register set.
12779
12780 2010-01-01 Joel Brobecker <brobecker@adacore.com>
12781
12782 * server.c (gdbserver_version): Update copyright year to 2010.
12783 * gdbreplay.c (gdbreplay_version): Likewise.
12784
12785 2009-12-28 Doug Evans <dje@google.com>
12786
12787 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12788 elf/external.h. Include <elf.h> instead but only if necessary.
12789
12790 2009-12-28 Pedro Alves <pedro@codesourcery.com>
12791
12792 * linux-low.c (linux_remove_process): Remove `detaching'
12793 parameter. Don't release/detach from thread_db here.
12794 (linux_kill): Release/detach from thread_db here, ...
12795 (linux_detach): ... and here, before actually detaching.
12796 (linux_wait_1): ... and here, when a process exits.
12797 * thread-db.c (any_thread_of): New.
12798 (thread_db_free): Switch the current inferior to a thread of the
12799 passed in process.
12800
12801 2009-12-21 Doug Evans <dje@google.com>
12802
12803 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12804
12805 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12806 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12807 warning ifndef __NR_tkill. Move setting of errno there too.
12808 Delete unnecessary resetting of errno after syscall.
12809 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12810
12811 * configure.ac: Check for dladdr.
12812 * config.in: Regenerate.
12813 * configure: Regenerate.
12814 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12815 (try_thread_db_load): Update.
12816
12817 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12818
12819 2009-12-18 Doug Evans <dje@google.com>
12820
12821 * event-loop.c: Include unistd.h if it exists.
12822
12823 * linux-low.c (my_waitpid): Move definition away from being in
12824 between linux_tracefork_child/linux_test_for_tracefork.
12825
12826 * gdb_proc_service.h (psaddr_t): Fix type.
12827 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12828 signature to match glibc.
12829
12830 2009-12-16 Doug Evans <dje@google.com>
12831
12832 * linux-low.c (linux_read_memory): Fix argument to read.
12833
12834 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12835
12836 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12837 events, don't leave current_inferior pointing at null.
12838
12839 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12840
12841 * win32-low.c (LOG): Delete.
12842 (OUTMSG): Output to stderr.
12843 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12844 on compile time LOG macro.
12845 (win32_wait): Fix debug output.
12846
12847 2009-11-26 Pedro Alves <pedro@codesourcery.com>
12848
12849 * win32-low.c (win32_add_one_solib): If the dll name is
12850 "ntdll.dll", prepend the system directory to the dll path.
12851
12852 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12853
12854 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12855
12856 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
12857 Vladimir Prus <vladimir@codesourcery.com>
12858
12859 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12860 * configure.ac: Check for __mcoldfire__ and set
12861 gdb_cv_m68k_is_coldfire.
12862 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12863 reg-cf.o and reg-m68k.o.
12864 * configure: Regenerated.
12865
12866 2009-11-16 Pedro Alves <pedro@codesourcery.com>
12867
12868 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12869 Pass it to thread_db_free.
12870 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12871 proper `detaching' argument to linux_remove_process.
12872 * linux-low.h (thread_db_free): Add `detaching' parameter.
12873 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12874 to thread_db_free.
12875 (thread_db_free): Add `detaching' parameter. Only
12876 call td_ta_clear_event if detaching from process.
12877
12878 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12879
12880 * thread-db.c (thread_db_free): Fix typo.
12881
12882 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12883
12884 PR gdb/10838
12885 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12886
12887 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12888
12889 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12890 with an i686 compiler.
12891 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12892 needed.
12893 * configure: Rebuilt.
12894
12895 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12896
12897 PR gdb/10783
12898
12899 * server.c (handle_search_memory_1): Correct read_addr initialization
12900 in loop for searching subsequent chunks.
12901
12902 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12903
12904 * configure.ac: New --with-libthread-db option.
12905 * thread-db.c: Allow direct dependence on libthread_db.
12906 (thread_db_free): Adjust.
12907 * config.in: Regenerate.
12908 * configure: Likewise.
12909
12910 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12911
12912 PR gdb/10757
12913 * thread-db.c (attach_thread): New function.
12914 (maybe_attach_thread): Return success/failure.
12915 (find_new_threads_callback): Adjust.
12916 (thread_db_find_new_threads): Loop until no new threads.
12917
12918 2009-10-13 Pedro Alves <pedro@codesourcery.com>
12919
12920 * proc-service.c (ps_lgetregs): Formatting.
12921
12922 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12923
12924 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12925 * configure.ac: Adjust.
12926 * linux-low.h (struct process_info_private): Move members to struct
12927 thread_db.
12928 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12929 * linux-low.c (linux_remove_process): Adjust.
12930 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12931 * server.c (handle_query): Move code ...
12932 (handle_monitor_command): ... here. New function.
12933 * target.h (struct target_ops): New member.
12934 * thread-db.c (struct thread_db): New.
12935 (libthread_db_search_path): New variable.
12936 (thread_db_create_event, thread_db_enable_reporting)
12937 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12938 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12939 (try_thread_db_load_1, dladdr_to_soname): New functions.
12940 (try_thread_db_load, thread_db_load_search): New functions.
12941 (thread_db_init): Search for libthread_db.
12942 (thread_db_free): New function.
12943 (thread_db_handle_monitor_command): Likewise.
12944 * config.in: Regenerate.
12945 * configure: Regenerate.
12946
12947 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12948
12949 * spu-low.c (spu_kill): Wait for inferior to terminate.
12950 Call clear_inferiors.
12951 (spu_detach): Call clear_inferiors.
12952
12953 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12954
12955 * aclocal.m4: Regenerate.
12956 * config.in: Likewise.
12957 * configure: Likewise.
12958
12959 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12960
12961 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12962 (parse_spufs_run): New function.
12963 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12964 (ppc_breakpoint_at): Handle SPU breakpoints.
12965
12966 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12967
12968 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12969 (SPUFS_MAGIC): Define.
12970 (spu_enumerate_spu_ids): New function.
12971 (linux_qxfer_spu): New function.
12972 (linux_target_ops): Install linux_qxfer_spu.
12973
12974 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12975
12976 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12977 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12978 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12979 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12980 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12981 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12982 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12983 (init_registers_powerpc_cell32l): Add prototype.
12984 (init_registers_powerpc_cell64l): Likewise.
12985 (ppc_arch_setup): Detect Cell/B.E. architecture.
12986
12987 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12988
12989 * Makefile.in (datarootdir): New variable.
12990
12991 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12992
12993 * linux-low.c (linux_write_memory): Update debugging output.
12994 * Makefile.in (clean): Add new descriptions.
12995 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12996 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12997 * configure.srv: Add new files for arm*-*-linux*.
12998 * linux-arm-low.c: Add new declarations.
12999 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13000 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13001 (HWCAP_VFPv3D16): New.
13002 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13003 instead of __IWMMXT__.
13004 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13005 (arm_arch_setup): New.
13006 (target_regsets): Remove #ifdef. Add VFP regset.
13007 (the_low_target): Use arm_arch_setup.
13008
13009 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13010
13011 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13012 the main thread again.
13013
13014 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13015
13016 Adding Neutrino gdbserver.
13017 * configure: Regenerated.
13018 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13019 * configure.srv (i[34567]86-*-nto*): New target.
13020 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13021 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13022 (nto_comctrl) [__QNX__]: New function.
13023 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13024
13025 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13026
13027 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13028 srv_tgtobj.
13029
13030 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13031 Pedro Alves <pedro@codesourcery.com>
13032
13033 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13034 don't support CONTEXT_EXTENDED_REGISTERS.
13035 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13036 (the_low_target): Install them.
13037 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13038 failing with ERROR_PIPE_NOT_CONNECTED.
13039
13040 2009-06-30 Doug Evans <dje@google.com>
13041 Pierre Muller <muller@ics.u-strasbg.fr>
13042
13043 Add h/w watchpoint support to x86-linux, win32-i386.
13044 * Makefile.in (SFILES): Add i386-low.c
13045 (i386_low_h): Define.
13046 (i386-low.o): Add dependencies.
13047 (linux-x86-low.o): Add i386-low.h dependency.
13048 (win32-i386-low.o): Ditto.
13049 * i386-low.c: New file.
13050 * i386-low.h: New file.
13051 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13052 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13053 * linux-low.c (linux_add_process): Initialize arch_private.
13054 (linux_remove_process): Free arch_private.
13055 (add_lwp): Initialize arch_private.
13056 (delete_lwp): Free arch_private.
13057 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13058 provided.
13059 * linux-low.h (process_info_private): New member arch_private.
13060 (lwp_info): New member arch_private.
13061 (linux_target_ops): New members new_process, new_thread,
13062 prepare_to_resume.
13063 (ptid_of): New macro.
13064 * linux-x86-low.c: Include stddef.h, i386-low.h.
13065 (arch_process_info): New struct.
13066 (arch_lwp_info): New struct.
13067 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13068 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13069 (i386_dr_low_get_status): New function.
13070 (x86_insert_point, x86_remove_point): New functions.
13071 (x86_stopped_by_watchpoint): New function.
13072 (x86_stopped_data_address): New function.
13073 (x86_linux_new_process, x86_linux_new_thread): New functions.
13074 (x86_linux_prepare_to_resume): New function.
13075 (the_low_target): Add entries for insert_point, remove_point,
13076 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13077 prepare_to_resume.
13078 * server.c (debug_hw_points): New global.
13079 (monitor_show_help): Document set debug-hw-points.
13080 (handle_query): Process "set debug-hw-points".
13081 * server.h (debug_hw_points): Declare.
13082 (paddress): Declare.
13083 * utils.c (NUMCELLS, CELLSIZE): New macros.
13084 (get_sell, xsnprintf, paddress): New functions.
13085 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13086 remove_point, stopped_by_watchpoint, stopped_data_address.
13087 * win32-i386-low.c: Include i386-low.h.
13088 (debug_reg_state): Replaces dr.
13089 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13090 (i386_dr_low_get_status): New function.
13091 (i386_insert_point, i386_remove_point): New functions.
13092 (i386_stopped_by_watchpoint): New function.
13093 (i386_stopped_data_address): New function.
13094 (i386_initial_stuff): Update.
13095 (get_thread_context,set_thread_context,i386_thread_added): Update.
13096 (the_low_target): Add entries for insert_point,
13097 remove_point, stopped_by_watchpoint, stopped_data_address.
13098 * win32-low.c (win32_insert_watchpoint): New function.
13099 (win32_remove_watchpoint): New function.
13100 (win32_stopped_by_watchpoint): New function.
13101 (win32_stopped_data_address): New function.
13102 (win32_target_ops): Add entries for insert_watchpoint,
13103 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13104 * win32-low.h (win32_target_ops): New members insert_point,
13105 remove_point, stopped_by_watchpoint, stopped_data_address.
13106
13107 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13108
13109 * server.c (process_serial_event): Re-return unsupported, not
13110 error, if the type isn't recognized. Re-allow supporting only
13111 insert or remove packets. Also call require_running for
13112 breakpoints. Add missing break statement to default case. Tidy.
13113 * target.h (struct target_ops): Rename insert_watchpoint to
13114 insert_point, and remove_watchpoint to remove_point.
13115
13116 * linux-low.h (struct linux_target_ops): Likewise.
13117 * linux-low.c (linux_insert_watchpoint): Rename to ...
13118 (linux_insert_point): ... this. Adjust.
13119 (linux_remove_watchpoint): Rename to ...
13120 (linux_remove_point): ... this. Adjust.
13121 (linux_target_ops): Adjust.
13122 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13123 (cris_insert_point): ... this.
13124 (cris_remove_watchpoint): Rename to ...
13125 (cris_remove_point): ... this.
13126 (the_low_target): Adjust.
13127
13128 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13129
13130 * server.c (handle_v_kill): Pass signal_pid to
13131 kill_inferior if multi_process is zero.
13132
13133 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13134
13135 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13136 * target.h (target_ops): Comment for *_watchpoint to make it clear
13137 the functions can get types '0' and '1'.
13138
13139 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13140
13141 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13142 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13143 * regcache.c (get_regcache): Likewise.
13144 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13145 * win32-low.c (child_fetch_inferior_registers): Remove check for
13146 regno 0.
13147
13148 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13149 Pedro Alves <pedro@codesourcery.com>
13150
13151 * target.h (struct target_ops) <supports_multi_process>: New
13152 callback.
13153 (target_supports_multi_process): New.
13154 * server.c (handle_query): Even if GDB reports support, only
13155 enable multi-process if the target also supports it. Report
13156 multi-process support only if the target backend supports it.
13157 * linux-low.c (linux_supports_multi_process): New function.
13158 (linux_target_ops): Install it as target_supports_multi_process
13159 callback.
13160
13161 2009-05-24 Doug Evans <dje@google.com>
13162
13163 Global renaming of find_thread_pid to find_thread_ptid.
13164 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13165 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13166 All callers updated.
13167
13168 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13169 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13170 directly.
13171
13172 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13173 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13174 (linux_resume_one_lwp): Ditto.
13175
13176 2009-05-23 Doug Evans <dje@google.com>
13177
13178 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13179 from struct inferior_list_entry * to struct lwp_info *.
13180 All callers updated.
13181
13182 2009-05-13 Doug Evans <dje@google.com>
13183
13184 * linux-x86-low.c: Don't include assert.h.
13185 (x86_siginfo_fixup): Use fatal, not assert.
13186 (x86_arch_setup): Fix comment.
13187
13188 2009-05-12 Doug Evans <dje@google.com>
13189
13190 Biarch support for i386/amd64 gdbserver.
13191 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13192 Add linux-x86-low.c.
13193 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13194 (linux-x86-low.o): Add.
13195 * linux-x86-64-low.c: Delete.
13196 * linux-i386-low.c: Delete.
13197 * linux-x86-low.c: New file.
13198 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13199 linux-x86-low.o.
13200 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13201 linux-x86-low.o.
13202 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13203 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13204 (linux_child_pid_to_exec_file): New function.
13205 (elf_64_header_p, elf_64_file_p): New functions.
13206 (siginfo_fixup): New function.
13207 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13208 give target a chance to convert layout.
13209 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13210 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13211
13212 2009-05-07 Doug Evans <dje@google.com>
13213
13214 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13215 (regsets_store_inferior_registers): Ditto.
13216
13217 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13218
13219 PR server/10048
13220
13221 * linux-low.c (must_set_ptrace_flags): Delete.
13222 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13223 of the global.
13224 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13225 `lwp->must_set_ptrace_flags' instead.
13226 (linux_wait_for_event_1): Set ptrace options here.
13227 (linux_wait_1): ... not here.
13228
13229 2009-04-30 Doug Evans <dje@google.com>
13230
13231 * inferiors.c (started_inferior_callback): New function.
13232 (attached_inferior_callback): New function.
13233 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13234 * server.c (print_started_pid, print_attached_pid): New functions.
13235 (detach_or_kill_for_exit): New function.
13236 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13237 * server.h (have_started_inferiors_p): Declare.
13238 (have_attached_inferiors_p): Declare.
13239
13240 * inferiors.c (remove_process): Fix memory leak, free process.
13241 * linux-low.c (linux_remove_process): New function.
13242 (linux_kill): Call it instead of remove_process.
13243 (linux_detach, linux_wait_1): Ditto.
13244
13245 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13246
13247 * configure.srv: Add x86 Windows CE target.
13248
13249 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13250
13251 * inferiors.c (get_thread_process): Make global.
13252 * server.h (get_thread_process): Add prototype.
13253 * thread-db.c (find_one_thread): Use get_thread_process
13254 instead of current_process.
13255 (thread_db_get_tls_address): Do not crash if called when
13256 thread layer is not yet initialized.
13257
13258 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13259
13260 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13261 * spu-low.c (current_tid): Rename to ...
13262 (current_ptid): ... this.
13263 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13264 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13265 ptid_get_lwp (current_ptid) instead of current_tid.
13266 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13267 instead of current_tid. Use find_process_pid to verify pid
13268 argument is valid. Pass proper argument to remove_process.
13269 (spu_thread_alive): Compare current_ptid instead of current_tid.
13270 (spu_resume): Likewise.
13271
13272 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13273
13274 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13275 variable.
13276
13277 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13278
13279 Implement the multiprocess extensions, and add linux multiprocess
13280 support.
13281
13282 * server.h (ULONGEST): Declare.
13283 (struct ptid, ptid_t): New.
13284 (minus_one_ptid, null_ptid): Declare.
13285 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13286 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13287 (struct inferior_list_entry): Change `id' type from unsigned from
13288 to ptid_t.
13289 (struct sym_cache, struct breakpoint, struct
13290 process_info_private): Forward declare.
13291 (struct process_info): Declare.
13292 (current_process): Declare.
13293 (all_processes): Declare.
13294 (initialize_inferiors): Declare.
13295 (add_thread): Adjust to use ptid_t.
13296 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13297 (add_process, remove_process, find_thread_pid): Declare.
13298 (find_inferior_id): Adjust to use ptid_t.
13299 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13300 (multi_process): Declare.
13301 (push_event): Adjust to use ptid_t.
13302 (read_ptid, write_ptid): Declare.
13303 (prepare_resume_reply): Adjust to use ptid_t.
13304 (clear_symbol_cache): Declare.
13305 * inferiors.c (all_processes): New.
13306 (null_ptid, minus_one_ptid): New.
13307 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13308 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13309 (add_thread): Change unsigned long to ptid. Remove gdb_id
13310 parameter. Adjust.
13311 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13312 (gdb_id_to_thread): Rename to ...
13313 (find_thread_pid): ... this. Change unsigned long to ptid.
13314 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13315 (loaded_dll, pull_pid_from_list): Adjust.
13316 (add_process, remove_process, find_process_pid)
13317 (get_thread_process, current_process, initialize_inferiors): New.
13318 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13319 (struct target_waitstatus) <related_pid>: Ditto.
13320 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13321 return type to int.
13322 (struct target_ops) <join>: Add `pid' argument.
13323 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13324 (struct target_ops) <wait>: Add `ptid' field. Change return type
13325 to ptid.
13326 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13327 (mywait): Add `ptid' argument. Change return type to ptid_t.
13328 (target_pid_to_str): Declare.
13329 * target.c (set_desired_inferior): Adjust to use ptids.
13330 (mywait): Add new `ptid' argument. Adjust.
13331 (target_pid_to_str): New.
13332 * mem-break.h (free_all_breakpoints): Declare.
13333 * mem-break.c (breakpoints): Delelete.
13334 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13335 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13336 to use per-process breakpoint list.
13337 (free_all_breakpoints): New.
13338 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13339 (symbol_cache, all_symbols_looked_up): Delete.
13340 (hexchars): New.
13341 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13342 read_ptid): New.
13343 (prepare_resume_reply): Change ptid argument's type from unsigned
13344 long to ptid_t. Adjust. Implement W;process and X;process.
13345 (free_sym_cache, clear_symbol_cache): New.
13346 (look_up_one_symbol): Adjust to per-process symbol cache. *
13347 * server.c (cont_thread, general_thread, step_thread): Change type
13348 to ptid_t.
13349 (attached): Delete.
13350 (multi_process): New.
13351 (last_ptid): Change type to ptid_t.
13352 (struct vstop_notif) <ptid>: Change type to ptid_t.
13353 (queue_stop_reply, push_event): Change `ptid' argument's type to
13354 ptid_t.
13355 (discard_queued_stop_replies): Add `pid' argument.
13356 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13357 changes. Don't reference the `attached' global.
13358 (attach_inferior): Adjust to mywait interface changes.
13359 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13360 features. Handle and report "multiprocess+". Handle
13361 "qAttached:PID".
13362 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13363 changes.
13364 (handle_v_kill): New.
13365 (handle_v_stopped): Adjust to use target_pid_to_str.
13366 (handle_v_requests): Allow multiple attaches and runs when
13367 multiprocess extensions are in effect. Handle "vKill".
13368 (myresume): Adjust to use ptids.
13369 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13370 (handle_status): Adjust to discard_queued_stop_replies interface
13371 change.
13372 (first_thread_of, kill_inferior_callback)
13373 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13374 (main): Call initialize_inferiors. Adjust to use ptids, killing
13375 and detaching from all inferiors. Handle multiprocess packet
13376 variants.
13377 * linux-low.h: Include gdb_proc_service.h.
13378 (struct process_info_private): New.
13379 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13380 <lwpid_of>: Use ptid_get_lwp.
13381 (get_lwp_thread): Adjust.
13382 (struct lwp_info): Add `dead' member.
13383 (find_lwp_pid): Declare.
13384 * linux-low.c (thread_db_active): Delete.
13385 (new_inferior): Adjust comment.
13386 (inferior_pid): Delete.
13387 (linux_add_process): New.
13388 (handle_extended_wait): Adjust.
13389 (add_lwp): Change unsigned long to ptid.
13390 (linux_create_inferior): Add process to processes table. Adjust
13391 to use ptids. Don't set new_inferior here.
13392 (linux_attach_lwp): Rename to ...
13393 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13394 it. Adjust to use ptids.
13395 (linux_attach_lwp): New.
13396 (linux_attach): Add process to processes table. Don't set
13397 new_inferior here.
13398 (struct counter): New.
13399 (second_thread_of_pid_p, last_thread_of_process_p): New.
13400 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13401 multiple processes.
13402 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13403 processes. Remove process from process table.
13404 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13405 to multiple processes.
13406 (any_thread_of): New.
13407 (linux_detach): Add `pid' argument, and handle it. Remove process
13408 from processes table.
13409 (linux_join): Add `pid' argument. Handle it.
13410 (linux_thread_alive): Change unsighed long argument to ptid_t.
13411 Consider dead lwps as not being alive.
13412 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13413 threads we're not interested in.
13414 (same_lwp, find_lwp_pid): New.
13415 (linux_wait_for_lwp): Change `pid' argument's type from int to
13416 ptid_t. Adjust.
13417 (linux_wait_for_event): Rename to ...
13418 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13419 from int to ptid_t. Adjust.
13420 (linux_wait_for_event): New.
13421 (linux_wait_1): Add `ptid' argument. Change return type to
13422 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13423 that exit from the process table.
13424 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13425 Adjust.
13426 (mark_lwp_dead): New.
13427 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13428 stopping all threads, mark its main lwp as dead.
13429 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13430 ptids.
13431 (fetch_register, usr_store_inferior_registers)
13432 (regsets_fetch_inferior_registers)
13433 (regsets_store_inferior_registers, linux_read_memory)
13434 (linux_write_memory): Inline `inferior_pid'.
13435 (linux_look_up_symbols): Adjust to use per-process
13436 `thread_db_active'.
13437 (linux_request_interrupt): Adjust to use ptids.
13438 (linux_read_auxv): Inline `inferior_pid'.
13439 (initialize_low): Don't reference thread_db_active.
13440 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13441 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13442 (ps_getpid): Return the pid of the current inferior.
13443 * thread-db.c (proc_handle, thread_agent): Delete.
13444 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13445 per-process data.
13446 (find_one_thread): Change argument type to ptid_t. Adjust to
13447 per-process data.
13448 (maybe_attach_thread): Adjust to per-process data and ptids.
13449 (thread_db_find_new_threads): Ditto.
13450 (thread_db_init): Ditto.
13451 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13452 processes table. Adjust to use ptids.
13453 (spu_kill, spu_detach): Adjust interface. Remove process from
13454 processes table.
13455 (spu_join, spu_thread_alive): Adjust interface.
13456 (spu_wait): Adjust interface. Remove process from processes
13457 table. Adjust to use ptids.
13458 * win32-low.c (current_inferior_tid): Delete.
13459 (current_inferior_ptid): New.
13460 (debug_event_ptid): New.
13461 (thread_rec): Take a ptid. Adjust.
13462 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13463 (child_delete_thread): Ditto.
13464 (do_initial_child_stuff): Add `attached' argument. Add process to
13465 processes table.
13466 (child_fetch_inferior_registers, child_store_inferior_registers):
13467 Adjust.
13468 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13469 (win32_attach): Pass 1 to do_initial_child_stuff.
13470 (win32_kill): Adjust interface. Remove process from processes
13471 table.
13472 (win32_detach): Ditto.
13473 (win32_join): Adjust interface.
13474 (win32_thread_alive): Take a ptid.
13475 (win32_resume): Adjust to use ptids.
13476 (get_child_debug_event): Ditto.
13477 (win32_wait): Adjust interface. Remove exiting process from
13478 processes table.
13479
13480 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13481
13482 Non-stop mode support.
13483
13484 * server.h (non_stop): Declare.
13485 (gdb_client_data, handler_func): Declare.
13486 (delete_file_handler, add_file_handler, start_event_loop):
13487 Declare.
13488 (handle_serial_event, handle_target_event, push_event)
13489 (putpkt_notif): Declare.
13490 * target.h (enum resume_kind): New.
13491 (struct thread_resume): Replace `step' field by `kind' field.
13492 (TARGET_WNOHANG): Define.
13493 (struct target_ops) <wait>: Add `options' argument.
13494 <supports_non_stop, async, start_non_stop>: New fields.
13495 (target_supports_non_stop, target_async): New.
13496 (start_non_stop): Declare.
13497 (mywait): Add `options' argument.
13498 * target.c (mywait): Add `options' argument. Print child exit
13499 notifications here.
13500 (start_non_stop): New.
13501 * server.c (non_stop, own_buf, mem_buf): New globals.
13502 (struct vstop_notif): New.
13503 (notif_queue): New global.
13504 (queue_stop_reply, push_event, discard_queued_stop_replies)
13505 (send_next_stop_reply): New.
13506 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13507 interface changes.
13508 (attach_inferior): In non-stop mode, don't wait for the target
13509 here.
13510 (handle_general_set): Handle QNonStop.
13511 (handle_query): When handling qC, return the current general
13512 thread, instead of the first thread of the list.
13513 (handle_query): If the backend supports non-stop mode, include
13514 QNonStop+ in the qSupported query response.
13515 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13516 and non-stop mode.
13517 (handle_v_attach, handle_v_run): Handle non-stop mode.
13518 (handle_v_stopped): New.
13519 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13520 (myresume): Adjust to use resume_kind. Handle non-stop.
13521 (queue_stop_reply_callback): New.
13522 (handle_status): Handle non-stop mode.
13523 (main): Clear non_stop flag on reconnection. Use the event-loop.
13524 Refactor serial protocol handling from here ...
13525 (process_serial_event): ... to this new function. When GDB
13526 selects any thread, select one here. In non-stop mode, wait until
13527 GDB acks all pending events before exiting.
13528 (handle_serial_event, handle_target_event): New.
13529 * remote-utils.c (remote_open): Install remote_desc in the event
13530 loop.
13531 (remote_close): Remove remote_desc from the event loop.
13532 (putpkt_binary): Rename to...
13533 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13534 (putpkt_binary): New as wrapper around putpkt_binary_1.
13535 (putpkt_notif): New.
13536 (prepare_resume_reply): In non-stop mode, don't change the
13537 general_thread.
13538 * event-loop.c: New.
13539 * Makefile.in (OBJ): Add event-loop.o.
13540 (event-loop.o): New rule.
13541
13542 * linux-low.h (pid_of): Moved here.
13543 (lwpid_of): New.
13544 (get_lwp_thread): Use lwpid_of.
13545 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13546 * linux-low.c (pid_of): Delete.
13547 (inferior_pid): Use lwpid_of.
13548 (linux_event_pipe): New.
13549 (target_is_async_p): New.
13550 (delete_lwp): New.
13551 (handle_extended_wait): Use lwpid_of.
13552 (add_lwp): Don't set lwpid field.
13553 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13554 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13555 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13556 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13557 first. Adjust to linux_wait_for_event interface changes. Use
13558 lwpid_of.
13559 (linux_detach): Don't delete the main lwp here.
13560 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13561 (status_pending_p): Don't consider explicitly suspended lwps.
13562 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13563 pointer. Add OPTIONS argument. Change return type to int. Use
13564 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13565 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13566 pointer. Add status pointer argument. Return a pid instead of a
13567 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13568 changes. In non-stop mode, don't switch to a random thread.
13569 (linux_wait): Rename to...
13570 (linux_wait_1): ... this. Add target_options argument, and handle
13571 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13572 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13573 clean exit and signal exit code. Don't stop all threads in
13574 non-stop mode. In all-stop mode, only stop all threads when
13575 reporting a stop to GDB. Handle explicit thread stop requests.
13576 (async_file_flush, async_file_mark): New.
13577 (linux_wait): New.
13578 (send_sigstop): Use lwpid_of.
13579 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13580 interface changes. In non-stop mode, don't switch to a random
13581 thread.
13582 (linux_resume_one_lwp): Use lwpid_of.
13583 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13584 (linux_resume_one_thread): ... this. Handle resume_stop. In
13585 non-stop mode, don't look for pending flag in all threads.
13586 (resume_status_pending_p): Don't consider explicitly suspended
13587 threads.
13588 (my_waitpid): Reimplement. Emulate __WALL.
13589 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13590 Use lwpid_of.
13591 (sigchld_handler, linux_supports_non_stop, linux_async)
13592 (linux_start_non_stop): New.
13593 (linux_target_ops): Register linux_supports_non_stop, linux_async
13594 and linux_start_non_stop.
13595 (initialize_low): Install SIGCHLD handler.
13596 * thread-db.c (thread_db_create_event, find_one_thread)
13597 (thread_db_get_tls_address): Use lwpid_of.
13598 * win32-low.c (win32_detach): Adjust to use resume_kind.
13599 (win32_wait): Add `options' argument.
13600 * spu-low.c (spu_resume): Adjust to use resume_kind.
13601 (spu_wait): Add `options' argument.
13602
13603 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13604
13605 Decouple target code from remote protocol.
13606
13607 * target.h (enum target_waitkind): New.
13608 (struct target_waitstatus): New.
13609 (struct target_ops) <wait>: Return an unsigned long. Take a
13610 target_waitstatus pointer instead of a char pointer.
13611 (mywait): Likewise.
13612 * target.c (mywait): Change prototype to return an unsigned long.
13613 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13614 * server.h (thread_from_wait, old_thread_from_wait): Delete
13615 declarations.
13616 (prepare_resume_reply): Change prototype to take a
13617 target_waitstatus.
13618 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13619 (last_status, last_ptid): New.
13620 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13621 pid instead of a signal.
13622 (attach_inferior): Remove "status" and "signal" parameters.
13623 Adjust.
13624 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13625 not as an address.
13626 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13627 (handle_v_requests, myresume): Remove "status" and "signal"
13628 parameters. Adjust.
13629 (handle_status): New.
13630 (main): Delete local `status'. Adjust.
13631 * remote-utils.c: Include target.h.
13632 (prepare_resume_reply): Change prototype to take a
13633 target_waitstatus. Adjust.
13634
13635 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13636 interface.
13637 * spu-low.c (spu_wait): Adjust.
13638 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13639 Delete.
13640 (win32_wait): Adjust.
13641
13642 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13643
13644 * target.h (struct thread_resume): Delete leave_stopped member.
13645 (struct target_ops): Add a `n' argument to the `resume' callback.
13646 * server.c (start_inferior): Adjust.
13647 (handle_v_cont, myresume): Adjust.
13648 * linux-low.c (check_removed_breakpoint): Adjust to resume
13649 interface change, and to removed leave_stopped field.
13650 (resume_ptr): Delete.
13651 (struct thread_resume_array): New.
13652 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13653 resume interface change.
13654 (linux_continue_one_thread, linux_queue_one_thread)
13655 (resume_status_pending_p): Check if the resume field is NULL
13656 instead of checking the leave_stopped member.
13657 (linux_resume): Adjust to the target resume interface change.
13658 * spu-low.c (spu_resume): Adjust to the target resume interface
13659 change.
13660 * win32-low.c (win32_detach, win32_resume): Ditto.
13661
13662 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13663
13664 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13665 flag.
13666 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13667 pending.
13668 (linux_continue_one_thread): Only preserve the stepping flag if
13669 there's a pending breakpoint.
13670
13671 2009-03-31 Pedro Alves <pedro@codesourcery.com>
13672
13673 * server.c (main): After the inferior having exited, call
13674 remote_close before exiting gdbserver.
13675
13676 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13677
13678 Fix size of FPSCR in Power 7 processors.
13679 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13680 (PPC_FEATURE_HAS_DFP): New #define.
13681 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13682 size of the FPSCR.
13683
13684 2009-03-23 Pedro Alves <pedro@codesourcery.com>
13685
13686 * server.c (handle_query) Whitespace and formatting.
13687
13688 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13689
13690 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13691 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13692 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13693 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13694 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13695 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13696 Makefile.in, configure.ac: Fix whitespace throughout.
13697 * configure: Regenerate.
13698
13699 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13700
13701 * inferiors.c (find_inferior): Make it safe for the callback
13702 function to delete the currently iterated inferior.
13703
13704 2009-03-22 Pedro Alves <pedro@codesourcery.com>
13705
13706 * Makefile.in (linuw_low_h): Move higher.
13707 (thread-db.o): Depend on $(linux_low_h).
13708
13709 2009-03-17 Pedro Alves <pedro@codesourcery.com>
13710
13711 Rename "process" to "lwp" throughout.
13712
13713 * linux-low.c (all_processes): Rename to...
13714 (all_lwps): ... this.
13715 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13716 (add_process): Rename to ...
13717 (add_lwp): ... this. Adjust.
13718 (linux_create_inferior): Adjust.
13719 (linux_attach_lwp): Adjust.
13720 (linux_attach): Adjust.
13721 (linux_kill_one_process): Rename to ...
13722 (linux_kill_one_lwp): ... this. Adjust.
13723 (linux_kill): Adjust.
13724 (linux_detach_one_process): Rename to ...
13725 (linux_detach_one_lwp): ... this. Adjust.
13726 (linux_detach): Adjust.
13727 (check_removed_breakpoint): Adjust.
13728 (status_pending_p): Adjust.
13729 (linux_wait_for_process): Rename to ...
13730 (linux_wait_for_lwp): ... this. Adjust.
13731 (linux_wait_for_event): Adjust.
13732 (send_sigstop): Adjust.
13733 (wait_for_sigstop): Adjust.
13734 (stop_all_processes): Rename to ...
13735 (stop_all_lwps): ... this.
13736 (linux_resume_one_process): Rename to ...
13737 (linux_resume_one_lwp): ... this. Adjust.
13738 (linux_set_resume_request, linux_continue_one_thread)
13739 (linux_queue_one_thread, resume_status_pending_p)
13740 (usr_store_inferior_registers, regsets_store_inferior_registers)
13741 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13742 Adjust.
13743 * linux-low.h (get_process): Rename to ...
13744 (get_lwp): ... this. Adjust.
13745 (get_thread_process): Rename to ...
13746 (get_thread_lwp): ... this. Adjust.
13747 (get_process_thread): Rename to ...
13748 (get_lwp_thread): ... this. Adjust.
13749 (struct process_info): Rename to ...
13750 (struct lwp_info): ... this.
13751 (all_processes): Rename to ...
13752 (all_lwps): ... this.
13753 * proc-service.c (ps_lgetregs): Adjust.
13754 * thread-db.c (thread_db_create_event, find_one_thread)
13755 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13756
13757 2009-03-14 Pedro Alves <pedro@codesourcery.com>
13758
13759 * server.c (handle_query): Handle "qAttached".
13760
13761 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13762
13763 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13764 GPLv3, update license URL.
13765
13766 2009-03-01 Doug Evans <dje@google.com>
13767
13768 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
13769 (server_h): Add gdb_signals.h.
13770 (signals.o): Update.
13771 * server.h (target_signal_from_host,target_signal_to_host_p)
13772 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13773
13774 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13775
13776 * remote-utils.c (getpkt): Also generate remote-debug
13777 information if noack_mode is set.
13778
13779 2009-02-06 Pedro Alves <pedro@codesourcery.com>
13780
13781 * server.c (handle_query): Report qXfer:siginfo:read and
13782 qXfer:siginfo:write as supported and handle them.
13783 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13784 * linux-low.c (linux_xfer_siginfo): New.
13785 (linux_target_ops): Set it.
13786
13787 2009-01-26 Pedro Alves <pedro@codesourcery.com>
13788
13789 * server.c (gdbserver_usage): Mention --remote-debug.
13790 (main): Accept '--remote-debug' switch.
13791
13792 2009-01-18 Doug Evans <dje@google.com>
13793
13794 * regcache.c (new_register_cache): No need to check result of xcalloc.
13795 * server.c (handle_search_memory): Back out calls to xmalloc,
13796 result is checked and error is returned to user upon failure.
13797 (handle_query): Ditto. Add more checks for result of malloc.
13798 (handle_v_cont): Check result of malloc, report error back to
13799 user upon failure.
13800 (handle_v_run): Ditto. Call freeargv.
13801 * server.h (freeargv): Declare.
13802 * utils.c (freeargv): New fn.
13803
13804 2009-01-15 Doug Evans <dje@google.com>
13805
13806 * gdbreplay.c (perror_with_name): Make arg const char *.
13807 * server.h (target_signal_to_name): Make return type const char *.
13808 * thread-db.c (thread_db_err_str): Make return type const char *.
13809 * utils.c (perror_with_name): Make arg const char *.
13810
13811 2009-01-14 Pedro Alves <pedro@codesourcery.com>
13812
13813 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13814 when handling a EXIT_PROCESS_DEBUG_EVENT.
13815
13816 2009-01-06 Joel Brobecker <brobecker@adacore.com>
13817
13818 * gdbreplay.c (gdbreplay_version): Update copyright year.
13819 * server.c (gdbserver_version): Likewise.
13820
13821 2009-01-05 Doug Evans <dje@google.com>
13822
13823 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
13824 (handle_extended_wait): Improve comment.
13825
13826 2008-12-13 Doug Evans <dje@google.com>
13827
13828 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13829 * server.h (ATTR_MALLOC): New macro.
13830 (xmalloc,xcalloc,xstrdup): Declare.
13831 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13832 * inferiors.c: Ditto.
13833 * linux-low.c: Ditto.
13834 * mem-break.c: Ditto.
13835 * regcache.c: Ditto.
13836 * remote-utils.c: Ditto.
13837 * server.c: Ditto.
13838 * target.c: Ditto.
13839 * win32-low.c: Ditto.
13840
13841 2008-12-12 Doug Evans <dje@google.com>
13842
13843 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13844 in debugging printf.
13845
13846 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13847
13848 2008-12-09 Doug Evans <dje@google.com>
13849
13850 * linux-low.h (struct process_info): Delete member tid, unused.
13851 * thread-db.c (find_one_thread): Update.
13852 (maybe_attach_thread): Update.
13853
13854 2008-12-02 Pedro Alves <pedro@codesourcery.com>
13855
13856 * target.h (struct target_ops): Add qxfer_osdata member.
13857 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13858 and dirent.h.
13859 (linux_qxfer_osdata): New functions.
13860 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13861 callback.
13862 * server.c (handle_query): Handle "qXfer:osdata:read:".
13863 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13864 (buffer_xml_printf): New functions.
13865 * server.h (struct buffer): New.
13866 (buffer_grow_str, buffer_grow_str0): New macros.
13867 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13868 (buffer_xml_printf): Declare.
13869
13870 2008-11-24 Doug Evans <dje@google.com>
13871
13872 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13873
13874 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13875
13876 * server.c (handle_v_run): Always use the supplied argument list.
13877
13878 2008-11-19 Bob Wilson <bob.wilson@acm.org>
13879
13880 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13881 (xtensa_regmap_table): Add entry for scompare1.
13882
13883 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13884
13885 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13886 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13887 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13888 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13889 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13890 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13891 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13892 XML target descriptions.
13893 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13894 when inferior is running on an ISA 2.05 or later processor. Add
13895 special case to return offset for full 64-bit slot of FPSCR when
13896 in 32-bits.
13897
13898 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13899
13900 * Makefile.in (SFILES, clean): Added sparc64 files.
13901 (reg-sparc64.o, reg-sparc64.c): New.
13902 * configure.srv (sparc*-*-linux*): New configuration.
13903 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13904 syscall arguments for SPARC.
13905 (regsets_store_inferior_registers): Likewise.
13906 * linux-sparc-low.c: New file.
13907
13908 2008-10-21 Doug Evans <dje@google.com>
13909
13910 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13911 (READLINE_DIR,READLINE_DEP): Delete.
13912 (INTERNAL_CFLAGS): Update.
13913 (LINTFLAGS): Update.
13914
13915 2008-10-10 Pedro Alves <pedro@codesourcery.com>
13916
13917 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13918 whole argv from the last run, not just argv[0].
13919
13920 2008-09-08 Pedro Alves <pedro@codesourcery.com>
13921
13922 * regcache.c (new_register_cache): Return NULL if the register
13923 cache size isn't known yet.
13924 (free_register_cache): Avoid dereferencing a NULL regcache.
13925
13926 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13927
13928 * configure.srv: Merge MIPS and MIPS64.
13929
13930 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13931
13932 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13933
13934 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
13935
13936 * Makefile.in: Add required vsx dependencies.
13937
13938 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13939 Declare init_registers_powerpc_vsx32l.
13940 Declare init_registers_powerpc_vsx64l.
13941 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13942 (ppc_arch_setup): Check for VSX in hwcap.
13943 (ppc_fill_vsxregset): New function.
13944 (ppc_store_vsxregset): New function.
13945 Add new VSX entry in regset_info target_regsets.
13946
13947 * configure.srv: Add new VSX dependencies.
13948
13949 2008-08-12 Pedro Alves <pedro@codesourcery.com>
13950
13951 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13952 (remote_open): Set or clear transport_is_reliable.
13953 (putpkt_binary): Don't expect acks in noack mode.
13954 (getpkt): Don't send ack/nac in noack mode.
13955 * server.c (handle_general_set): Handle QStartNoAckMode.
13956 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13957 qSupported.
13958 (main): Reset noack_mode on every connection.
13959 * server.h (noack_mode): Declare.
13960
13961 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13962
13963 * Makefile.in (GDBREPLAY_OBS): New variable.
13964 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13965
13966 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13967 Daniel Jacobowitz <dan@codesourcery.com>
13968
13969 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13970 (usr_store_inferior_registers): Likewise.
13971 (regsets_store_inferior_registers): Likewise.
13972
13973 2008-07-31 Rolf Jansen <rj@surtec.com>
13974 Pedro Alves <pedro@codesourcery.com>
13975
13976 * configure.ac: Check for memmem declaration.
13977 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13978 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13979 (disable_packet_qfThreadInfo): Unconditionally compile.
13980 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13981 * configure, config.in: Regenerate.
13982
13983 2008-07-28 Doug Kwan <dougkwan@google.com>
13984
13985 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13986 (linux_write_memory): Remove declaration of errno.
13987
13988 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13989
13990 * linux-low.c (handle_extended_wait): Do not use "status"
13991 variable uninitialized.
13992
13993 2008-07-07 Pedro Alves <pedro@codesourcery.com>
13994
13995 * server.c (handle_v_attach): Inhibit reporting dll changes.
13996
13997 2008-06-27 Pedro Alves <pedro@codesourcery.com>
13998
13999 * remote-utils.c (prepare_resume_reply): If requested, don't
14000 output "thread:TID" in the T stop reply.
14001
14002 * server.c (disable_packet_vCont, disable_packet_Tthread)
14003 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14004 (handle_query): If requested, disable support for qC, qfThreadInfo
14005 and qsThreadInfo.
14006 (handle_v_requests): If requested, disable support for vCont.
14007 (gdbserver_show_disableable): New.
14008 (main): Handle --disable-packet and --disable-packet=LIST.
14009
14010 * server.h (disable_packet_vCont, disable_packet_Tthread)
14011 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14012
14013 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14014
14015 * server.c (gdbserver_usage): Mention --version.
14016
14017 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14018
14019 * Makefile.in (gdbreplay.o): New rule.
14020
14021 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14022
14023 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14024 message, not gdbserver.
14025
14026 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14027 Nathan Sidwell <nathan@codesourcery.com>
14028 Joseph Myers <joseph@codesourcery.com>
14029
14030 * acinclude.m4: Include ../../config/acx.m4.
14031 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14032 * configure, config.in: Regenerate.
14033 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14034 * server.c (gdbserver_version): Print PKGVERSION.
14035 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14036 (main): Adjust gdbserver_usage calls.
14037 * gdbreplay.c (version, host_name): Add declarations.
14038 (gdbreplay_version, gdbreplay_usage): New.
14039 (main): Accept --version and --help options.
14040
14041 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14042
14043 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14044 (arm_breakpoint_at): Handle Thumb.
14045 (the_low_target): Add comment.
14046
14047 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14048
14049 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14050
14051 2008-05-09 Doug Evans <dje@google.com>
14052
14053 * server.h (decode_search_memory_packet): Declare.
14054 * remote-utils.c (decode_search_memory_packet): New fn.
14055 * server.c (handle_search_memory_1): New fn.
14056 (handle_search_memory): New fn.
14057 (handle_query): Process qSearch:memory packets.
14058
14059 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14060
14061 * regcache.c (registers_length): Remove.
14062 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14063 full register packet.
14064 * regcache.h (registers_length): Remove prototype.
14065 * server.h (PBUFSIZ): Define to 16384.
14066
14067 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14068
14069 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14070 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14071 powerpc-64l.o, and powerpc-altivec64l.o.
14072 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14073 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14074 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14075 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14076 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14077 to srv_xmlfiles.
14078
14079 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14080 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14081 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14082 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14083 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14084 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14085 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14086 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14087 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14088 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14089 (clean): Update.
14090
14091 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14092 (init_registers_powerpc_32l): ... this new prototype.
14093 (init_registers_powerpc_32): Remove, replace by ...
14094 (init_registers_powerpc_altivec32l): ... this new prototype.
14095 (init_registers_powerpc_e500): Remove, replace by ...
14096 (init_registers_powerpc_e500l): ... this new prototype.
14097 (init_registers_ppc64): Remove, replace by ...
14098 (init_registers_powerpc_64l): ... this new prototype.
14099 (init_registers_powerpc_64): Remove, replace by ...
14100 (init_registers_powerpc_altivec64l): ... this new prototype.
14101 (ppc_num_regs): Set to 73.
14102 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14103 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14104 (ppc_cannot_store_register): Handle orig_r3 and trap.
14105 (ppc_arch_setup): Update init_registers_... calls.
14106 (ppc_fill_gregset): Handle orig_r3 and trap.
14107
14108 * inferiors.c (clear_inferiors): Reset current_inferior.
14109
14110 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14111
14112 * acinclude.m4: Add override.m4.
14113 * configure: Regenerate.
14114
14115 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14116
14117 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14118 initial call to init_register_ppc64.
14119
14120 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14121
14122 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14123 single powerpc*-*-linux* case.
14124 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14125
14126 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14127
14128 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14129 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14130 from reg_xmlfiles.
14131 * linux-ppc-low.c: Include <elf.h>.
14132 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14133 (ppc_hwcap): New global variable.
14134 (ppc_regmap): Remove __SPE__ #ifdef sections.
14135 (ppc_regmap_e500): New global variable.
14136 (ppc_cannot_store_register): Update __SPE__ special case.
14137 (ppc_get_hwcap): New function.
14138 (ppc_arch_setup): Use it to determine whether inferior supports
14139 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14140 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14141 Do not access registers if target does not support AltiVec.
14142 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14143 Do not access registers if target does not support SPE.
14144 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14145
14146 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14147
14148 * linux-low.c (disabled_regsets, num_regsets): New.
14149 (use_regsets_p): Delete.
14150 (linux_wait_for_process): Clear disabled_regsets.
14151 (regsets_fetch_inferior_registers): Check and set it.
14152 (regsets_store_inferior_registers): Likewise.
14153 (linux_fetch_registers, linux_store_registers): Do not use
14154 use_regsets_p.
14155 (initialize_low): Allocate disabled_regsets.
14156
14157 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * Makefile.in (LIBOBJS): New.
14160 (OBS): Use LIBOBJS.
14161 (memmem.o): New rule.
14162 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14163 * configure: Regenerated.
14164
14165 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14166
14167 * server.c (handle_query): Never return "unsupported" for
14168 qXfer:features:read queries.
14169
14170 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14171
14172 * server.c (get_features_xml): Fix inverted condition.
14173 (handle_query): Always support qXfer:feature:read.
14174
14175 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14176
14177 * server.c (wrapper_argv): New.
14178 (start_inferior): Handle wrapper_argv. If set, expect an extra
14179 trap.
14180 (gdbserver_usage): Document --wrapper.
14181 (main): Parse --wrapper.
14182
14183 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14184
14185 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14186 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14187 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14188 (ppc_set_pc): Likewise.
14189 (ppc_arch_setup): New function.
14190 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14191 of collect_register.
14192 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14193
14194 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14195
14196 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14197 instead of linux-ppc64-low.o.
14198 * linux-ppc64-low.c: Remove file.
14199 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14200 (linux-ppc64-low.o): Remove rule.
14201
14202 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14203 (init_registers_powerpc_64): Likewise.
14204 (ppc_regmap): Conditionally define depending on __powerpc64__.
14205 (ppc_cannot_store_register): Do not special-case "fpscr" when
14206 compiled on __powerpc64__.
14207 (ppc_collect_ptrace_register): New function.
14208 (ppc_supply_ptrace_register): New function.
14209 (ppc_breakpoint): Change type to "unsigned int".
14210 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14211 (the_low_target): Conditionally provide initializers for the
14212 arch_setup member depending on __powerpc64__. Install
14213 collect_ptrace_register and supply_ptrace_register members.
14214
14215 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14216
14217 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14218 * server.c (gdbserver_xmltarget): Define.
14219 (get_features_xml): Use it to replace "target.xml" and arch_string.
14220
14221 * configure.srv: Remove srv_xmltarget. Add XML files that were
14222 mentioned there to srv_xmlfiles instead. Remove conditional tests
14223 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14224 srv_xmlfiles and srv_regobj to include all possible choices.
14225 * configure.ac (srv_xmltarget): Remove.
14226 (srv_xmlfiles): Do not add "target.xml".
14227 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14228 checks for supplementary target information.
14229 * configure: Regenerate.
14230 * Makefile.in (XML_TARGET): Remove.
14231 (target.xml): Remove rule.
14232 (clean): Do not clean up target.xml.
14233 (.PRECIOUS): Do not mention target.xml.
14234
14235 * target.h (struct target_ops): Remove arch_string member.
14236 * linux-low.c (linux_arch_string): Remove.
14237 (linux_target_ops): Remove arch_string initializer.
14238 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14239 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14240 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14241 * spu-low.c (spu_arch_string): Remove.
14242 (spu_target_ops): Remove arch_string initializer.
14243 * win32-low.c (win32_arch_string): Remove.
14244 (win32_target_ops): Remove arch_string initializer.
14245 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14246 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14247 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14248
14249 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14250
14251 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14252 by collect_ptrace_register and supply_ptrace_register hooks.
14253 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14254 instead of checking for the_low_target.left_pad_xfer.
14255 (usr_store_inferior_registers): Use collect_ptrace_register callback
14256 instead of checking for the_low_target.left_pad_xfer.
14257
14258 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14259 (s390_supply_ptrace_register): Likewise.
14260 (s390_fill_gregset): Call s390_collect_ptrace_register.
14261 (the_low_target): Update.
14262
14263 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14264 (ppc_supply_ptrace_register): Likewise.
14265 (the_low_target): Update.
14266
14267 * linux-i386-low.c (the_low_target): Update.
14268 * linux-x86-64-low.c (the_low_target): Update.
14269
14270 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14271
14272 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14273 reg-s390.o and reg-s390x.o.
14274
14275 * linux-low.c (new_inferior): New global variable.
14276 (linux_create_inferior, linux_attach): Set it.
14277 (linux_wait_for_process): Call the_low_target.arch_setup after the
14278 target has stopped for the first time.
14279 (initialize_low): Do not call the_low_target.arch_setup.
14280
14281 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14282 (s390_set_pc): Likewise.
14283 (s390_arch_setup): New function.
14284 (the_low_target): Use s390_arch_setup as arch_setup routine.
14285
14286 * regcache.c (realloc_register_cache): New function.
14287 (set_register_cache): Call it for each existing regcache.
14288
14289 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14290
14291 * server.h (init_registers): Remove prototype.
14292
14293 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14294 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14295 instead of init_registers ().
14296 * linux-arm-low.c (init_registers_arm): Add prototype.
14297 (init_registers_arm_with_iwmmxt): Likewise.
14298 (the_low_target): Add initializer for arch_setup field.
14299 * linux-cris-low.c (init_registers_cris): Add prototype.
14300 (the_low_target): Add initializer for arch_setup field.
14301 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14302 (the_low_target): Add initializer for arch_setup field.
14303 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14304 (the_low_target): Add initializer for arch_setup field.
14305 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14306 (the_low_target): Add initializer for arch_setup field.
14307 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14308 (the_low_target): Add initializer for arch_setup field.
14309 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14310 (the_low_target): Add initializer for arch_setup field.
14311 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14312 (init_registers_mips64_linux): Likewise.
14313 (the_low_target): Add initializer for arch_setup field.
14314 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14315 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14316 (the_low_target): Add initializer for arch_setup field.
14317 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14318 (init_registers_powerpc_64): Likewise.
14319 (the_low_target): Add initializer for arch_setup field.
14320 * linux-s390-low.c (init_registers_s390): Add prototype.
14321 (init_registers_s390x): Likewise.
14322 (the_low_target): Add initializer for arch_setup field.
14323 * linux-sh-low.c (init_registers_sh): Add prototype.
14324 (the_low_target): Add initializer for arch_setup field.
14325 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14326 (the_low_target): Add initializer for arch_setup field.
14327 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14328 (the_low_target): Add initializer for arch_setup field.
14329
14330 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14331 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14332 instead of init_registers ().
14333 * win32-arm-low.c (init_registers_arm): Add prototype.
14334 (the_low_target): Add initializer for arch_setup field.
14335 * win32-i386-low.c (init_registers_i386): Add prototype.
14336 (the_low_target): Add initializer for arch_setup field.
14337
14338 * spu-low.c (init_registers_spu): Add prototype.
14339 (initialize_low): Call initialie_registers_spu () instead of
14340 initialize_registers ().
14341
14342 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14343
14344 * server.c (handle_v_requests): When handling the vRun and vAttach
14345 packets, if already debugging a process, don't kill it. Return an
14346 error instead.
14347
14348 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14349
14350 * server.c (handle_query): Correct length check.
14351
14352 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14353
14354 * win32-low.c (do_initial_child_stuff): Add process handle
14355 parameter. Set current_process_handle and current_process_id from the
14356 parameters. Clear globals.
14357 (win32_create_inferior): Don't set current_process_handle and
14358 current_process_id here. Instead pass them on the call to
14359 do_initial_child_stuff.
14360 (win32_attach): Likewise.
14361 (win32_clear_inferiors): New.
14362 (win32_kill): Don't close the current process handle or the
14363 current thread handle here. Instead call win32_clear_inferiors.
14364 (win32_detach): Don't open a new handle to the process. Call
14365 win32_clear_inferiors.
14366 (win32_join): Don't rely on current_process_handle; open a new
14367 handle using the process id.
14368 (win32_wait): Call win32_clear_inferiors when the inferior process
14369 has exited.
14370
14371 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * server.c (monitor_show_help): Add "exit".
14374
14375 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14376
14377 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14378 (clean): Add reg-xtensa.c.
14379 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14380 * configure.srv (xtensa*-*-linux*) New target.
14381 * linux-xtensa-low.c: New.
14382 * xtensa-xtregs.c: New.
14383
14384 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14385
14386 * hostio.c: Don't include errno.h.
14387 (errno_to_fileio_errno): Move to hostio-errno.
14388 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14389 error number outputting to the target->hostio_last_error callback.
14390 (hostio_packet_error): Use FILEIO_EINVAL directly.
14391 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14392 calls to hostio_error.
14393 * hostio-errno.c: New.
14394 * server.h (hostio_last_error_from_errno): Declare.
14395 * target.h (target_ops): Add hostio_last_error member.
14396 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14397 as hostio_last_error handler.
14398 * spu-low.c (spu_target_ops): Likewise.
14399 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14400 (wince_hostio_last_error): New functions.
14401 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14402 as hostio_last_error handler.
14403 (win32_target_ops) [!_WIN32_WCE]: Register
14404 hostio_last_error_from_errno as hostio_last_error handler.
14405 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14406 (hostio-errno.o): New rule.
14407 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14408 * configure.srv (srv_hostio_err_objs): New variable. Default to
14409 hostio-errno.o.
14410 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14411 * configure: Regenerate.
14412
14413 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14414
14415 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14416 (linux_kill, linux_detach): Clean up the process list.
14417 * remote-utils.c (remote_open): Improve port number parsing.
14418 (putpkt_binary, input_interrupt): Only send interrupts if the target
14419 is running.
14420 * server.c (extended_protocol): Make static.
14421 (attached): Define earlier.
14422 (exit_requested, response_needed, program_argv): New variables.
14423 (target_running): New.
14424 (start_inferior): Clear attached here.
14425 (attach_inferior): Set attached here.
14426 (require_running): Define.
14427 (handle_query): Use require_running and target_running. Implement
14428 "monitor exit".
14429 (handle_v_attach, handle_v_run): New.
14430 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14431 (gdbserver_usage): Update.
14432 (main): Redo argument parsing. Handle --debug and --multi. Handle
14433 --attach along with other options or after the port. Save
14434 program_argv. Support no initial program. Resynchronize
14435 communication with GDB after an error. Handle "monitor exit".
14436 Use require_running and target_running. Always allow the extended
14437 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14438 restart in extended mode.
14439 * README: Refer to the GDB manual. Update --attach usage.
14440
14441 2007-12-20 Andreas Schwab <schwab@suse.de>
14442
14443 * linux-low.c (STACK_SIZE): Define.
14444 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14445 (linux_test_for_tracefork): Likewise.
14446
14447 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14448
14449 * linux-low.c (linux_wait_for_event): Update messages. Do not
14450 reinsert auto-delete breakpoints.
14451 * mem-break.c (struct breakpoint): Change return type of handler to
14452 int.
14453 (set_breakpoint_at): Update handler type.
14454 (reinsert_breakpoint_handler): Return 1 instead of calling
14455 delete_breakpoint.
14456 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14457 setting a new one.
14458 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14459 * mem-break.h (set_breakpoint_at): Update handler type.
14460 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14461 * win32-low.c (auto_delete_breakpoint): New.
14462 (get_child_debug_event): Use it.
14463
14464 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14465
14466 * configure.ac: Check for pread and pwrite.
14467 * hostio.c (handle_pread): Fall back to lseek and read.
14468 (handle_pwrite): Fall back to lseek and write.
14469 * config.in, configure: Regenerated.
14470
14471 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14472
14473 * server.c (myresume): Add own_buf argument.
14474 (main): Update calls.
14475
14476 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14477
14478 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14479 * remote-utils.c (remote_open): Do not call disable_async_io.
14480 (block_async_io): Delete.
14481 (unblock_async_io): Make static.
14482 (initialize_async_io): New.
14483 * server.c (handle_v_cont): Handle async I/O here.
14484 (myresume): Likewise. Move other common resume tasks here...
14485 (main): ... from here. Call initialize_async_io. Disable async
14486 I/O before the main loop.
14487 * server.h (initialize_async_io): Declare.
14488 (block_async_io, unblock_async_io): Delete prototypes.
14489 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14490
14491 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14492
14493 * remote-utils.c (readchar): Allow binary data in received messages.
14494
14495 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14496
14497 * win32-low.c (attaching): New global.
14498 (win32_create_inferior): Clear the `attaching' global.
14499 (win32_attach): Set the `attaching' global.
14500 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14501 attaching. Only set a breakpoint at the entry point if not
14502 attaching.
14503
14504 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14505
14506 * server.c (main): Don't report dll events on the initial
14507 connection on attaches.
14508
14509 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14510
14511 * server.c (main): Relax numerical bases supported for the pid of
14512 the --attach command line argument.
14513
14514 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14515
14516 * win32-low.c (win32_attach): Call OpenProcess before
14517 DebugActiveProcess, not after. Add last error output to error
14518 call.
14519
14520 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14521
14522 * win32-low.c (win32_get_thread_context)
14523 (win32_set_thread_context): New functions.
14524 (thread_rec): Use win32_get_thread_context.
14525 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14526 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14527 field.
14528
14529 2007-12-03 Leo Zayas
14530 Pedro Alves <pedro_alves@portugalmail.pt>
14531
14532 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14533 global variables.
14534 (child_add_thread): Minor cleanup.
14535 (child_continue): Resume artificially suspended threads before
14536 calling ContinueDebugEvent.
14537 (suspend_one_thread): New.
14538 (fake_breakpoint_event): New.
14539 (get_child_debug_event): Change return type to int. Check here if
14540 gdb sent an interrupt request. If a soft interrupt was requested,
14541 fake a breakpoint event. Return 0 if there is no event to handle,
14542 and 1 otherwise.
14543 (win32_wait): Don't check here if gdb sent an interrupt request.
14544 Ensure there is a valid event to handle.
14545 (win32_request_interrupt): Add soft interruption method as last
14546 resort.
14547
14548 2007-12-03 Leo Zayas
14549 Pedro Alves <pedro_alves@portugalmail.pt>
14550
14551 * win32-low.h (win32_thread_info): Add descriptions to the
14552 structure members. Replace `suspend_count' counter by a
14553 `suspended' flag.
14554 * win32-low.c (thread_rec): Update condition of when to get the
14555 context from the inferior. Rely on ContextFlags being set if it
14556 has already been retrieved. Only suspend the inferior thread if
14557 we haven't already. Warn if that fails.
14558 (continue_one_thread): s/suspend_count/suspended/. Only call
14559 ResumeThread once. Warn if that fails.
14560
14561 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14562
14563 * win32-low.c (win32_wait): Don't read from the inferior when it
14564 has already exited.
14565
14566 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14567
14568 * Makefile.in (win32_low_h): New variable.
14569 (win32-low.o): Add dependency on $(win32_low_h).
14570 (win32-arm-low.o, win32-i386-low.o): New rules.
14571
14572 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14573
14574 * hostio.c: Correct copyright year.
14575
14576 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14577
14578 * Makefile.in (OBS): Add hostio.o.
14579 (hostio.o): New rule.
14580 * server.h (handle_vFile): Declare.
14581 * hostio.c: New file.
14582 * server.c (handle_v_requests): Take packet_len and new_packet_len
14583 for binary packets. Call handle_vFile.
14584 (main): Update call to handle_v_requests.
14585
14586 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14587
14588 * linux-low.c: Include <sched.h>.
14589
14590 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14591
14592 * linux-low.c (linux_tracefork_grandchild): New.
14593 (linux_tracefork_child): Use clone.
14594 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14595
14596 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14597
14598 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14599
14600 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14601
14602 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14603
14604 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14605
14606 * inferiors.c (change_inferior_id): Delete.
14607 (add_pid_to_list, pull_pid_from_list): New.
14608 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14609 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14610 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14611 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14612 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14613 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14614 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14615 (using_threads): Always set to 1.
14616 (handle_extended_wait): New.
14617 (add_process): Do not set TID.
14618 (linux_create_inferior): Set must_set_ptrace_flags.
14619 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14620 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14621 (linux_thread_alive): Rename TID argument to LWPID.
14622 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14623 (linux_wait_for_event): Do not use TID or check using_threads. Update
14624 call to dead_thread_notify. Call handle_extended_wait.
14625 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14626 (send_sigstop): Delete sigstop_sent.
14627 (wait_for_sigstop): Avoid TID.
14628 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14629 (linux_test_for_tracefork): New.
14630 (linux_lookup_signals): Use thread_db_active and
14631 linux_supports_tracefork_flag.
14632 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14633 * linux-low.h (get_process_thread): Avoid TID.
14634 (struct process_ifo): Move thread_known and tid to the end. Remove
14635 sigstop_sent.
14636 (linux_attach_lwp, thread_db_init): Update prototypes.
14637 * server.h (change_inferior_id): Delete prototype.
14638 (add_pid_to_list, pull_pid_from_list): New prototypes.
14639 * thread-db.c (thread_db_use_events): New.
14640 (find_first_thread): Rename to...
14641 (find_one_thread): ...this. Update callers and messages. Do not
14642 call fatal. Check thread_db_use_events. Do not call
14643 change_inferior_id or new_thread_notify.
14644 (maybe_attach_thread): Update. Do not call new_thread_notify.
14645 (thread_db_init): Set thread_db_use_events. Check use_events.
14646 * utils.c (fatal, warning): Correct message prefix.
14647
14648 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * Makefile.in (clean): Remove new files.
14651 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14652 (powerpc-64.o, powerpc-64.c): New rules.
14653 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14654 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14655 with SPE.
14656 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14657 SPE targets.
14658 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14659 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14660 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14661 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14662 (target_regsets): Add AltiVec and SPE register sets.
14663 * configure.ac: Check for AltiVec and SPE.
14664 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14665 (ppc_fill_vrregset, ppc_store_vrregset): New.
14666 (target_regsets): Add AltiVec register set.
14667 * configure: Regenerated.
14668
14669 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14670
14671 * linux-low.c (O_LARGEFILE): Define.
14672 (linux_read_memory): Use /proc/PID/mem.
14673 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14674 * configure, config.in: Regenerated.
14675
14676 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14677
14678 * linux-low.c (linux_wait_for_event): Do not pass signals while
14679 single-stepping.
14680
14681 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14682
14683 * win32-low.c (create_process): New.
14684 (win32_create_inferior): Use create_process instead of
14685 CreateProcess. If create_process failed retry appending an ".exe"
14686 suffix. Store the GetLastError result immediatelly after
14687 create_process calls and use it on the call to error.
14688
14689 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14690
14691 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14692
14693 2007-08-23 Joel Brobecker <brobecker@adacore.com>
14694
14695 * configure.ac: Switch license to GPLv3.
14696
14697 2007-08-01 Michael Snyder <msnyder@access-company.com>
14698
14699 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14700
14701 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14702
14703 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14704 typedef.
14705 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14706 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14707 CloseToolhelp32Snapshot.
14708 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14709 CloseToolhelp32Snapshot.
14710
14711 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
14712
14713 * server.c (main): Check for inferior exit before main loop.
14714
14715 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14716
14717 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14718 instead of on tmp_desc.
14719
14720 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14721 Daniel Jacobowitz <dan@codesourcery.com>
14722
14723 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14724 (add_thread): Minor cleanups.
14725 (clear_inferiors): Move lower in the file. Clear the DLL
14726 list.
14727 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14728 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14729 (xml_escape_text): New.
14730 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14731 for qSupported.
14732 (handle_v_cont): Report errors.
14733 (gdbserver_version): Update.
14734 (main): Correct size of own_buf. Do not report initial DLL events.
14735 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14736 (unloaded_dll, xml_escape_text): New.
14737 * win32-low.c (enum target_waitkind): Update comments.
14738 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14739 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14740 (win32_EnumProcessModules, win32_GetModuleInformation)
14741 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14742 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14743 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14744 (win32_Module32First, win32_Module32Next, load_toolhelp)
14745 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14746 (get_child_debug_event): Handle DLL events.
14747 (win32_wait): Likewise.
14748
14749 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14750
14751 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14752 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14753
14754 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14755
14756 * win32-low.c (handle_output_debug_string): Ignore event if not
14757 waiting.
14758
14759 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14760
14761 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14762
14763 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14764
14765 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14766
14767 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14768
14769 * inferiors.c (change_inferior_id): Add comment.
14770 * linux-low.c (check_removed_breakpoint): Add an early
14771 prototype. Improve debug output.
14772 (linux_attach): Doc update.
14773 (linux_detach_one_process, linux_detach): Clean up before releasing
14774 each process.
14775 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14776 * linux-low.h (struct process_info): Doc improvement.
14777 * mem-break.c (delete_all_breakpoints): New.
14778 * mem-break.h (delete_all_breakpoints): New prototype.
14779 * thread-db.c (find_first_thread): New.
14780 (thread_db_create_event): Call it instead of
14781 thread_db_find_new_threads. Clean up unused variables.
14782 (maybe_attach_thread): Remove first thread handling.
14783 (thread_db_find_new_threads): Use find_first_thread.
14784 (thread_db_get_tls_address): Likewise.
14785
14786 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14787
14788 * thread-db.c (thread_db_find_new_threads): Add prototype.
14789 (thread_db_create_event): Check for the main thread before adding
14790 a new thread.
14791 (maybe_attach_thread): Only enable event reporting if TID == 0.
14792 (thread_db_get_tls_address): Check for new threads.
14793
14794 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * linux-low.c (linux_create_inferior): Try execv before execvp.
14797 * spu-low.c (spu_create_inferior): Likewise.
14798
14799 2007-06-13 Mike Frysinger <vapier@gentoo.org>
14800
14801 * linux-low.c (linux_create_inferior): Change execv to execvp.
14802 * spu-low.c (spu_create_inferior): Likewies.
14803
14804 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14805
14806 * Makefile.in (clean): Clean new files instead of deleted ones.
14807 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14808 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14809 rules.
14810 * configure.srv: Specify XML files and new regformats for MIPS and
14811 MIPS64 GNU/Linux.
14812 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14813 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14814 an entry for the restart register.
14815 (mips_cannot_fetch_register, mips_cannot_store_register)
14816 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14817 register names to match the XML descriptions.
14818 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14819 restart register instead of $0.
14820
14821 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14822 Markus Deuling <deuling@de.ibm.com>
14823
14824 * remote-utils.c (decode_xfer_write): New function.
14825 * server.h (decode_xfer_write): Add prototype.
14826 * server.c (handle_query): Add PACKET_LEN argument. Support
14827 qXfer:spu:read and qXfer:spu:write packets.
14828 (main): Pass packet_len to handle_query.
14829 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14830 * target.h (target_ops): Add qxfer_spu.
14831
14832 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14833
14834 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14835 accessing non-seekable spufs files.
14836
14837 2007-05-16 Markus Deuling <deuling@de.ibm.com>
14838
14839 * server.c (handle_query): Add reply for qC packet.
14840
14841 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14842 Leo Zayas <lerele@champenstudios@com>
14843
14844 * server.h (check_remote_input_interrupt_request): New function.
14845 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14846 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14847 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14848 (check_remote_input_interrupt_request): New function.
14849 * server.h (check_remote_input_interrupt_request): Declare.
14850 * win32-low.c (winapi_DebugBreakProcess,
14851 winapi_GenerateConsoleCtrlEvent): New typedefs.
14852 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14853 to 250 ms.
14854 (win32_wait): Check for remote interrupt request
14855 with check_remote_input_interrupt_request.
14856 (win32_request_interrupt): New function.
14857 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14858
14859 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14860
14861 * win32-low.c (debug_registers_changed,
14862 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14863 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14864 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14865 (thread_rec): Get context using the low target.
14866 (child_add_thread): Call thread_added on the low target,
14867 which does the same thing.
14868 (regptr): Delete.
14869 (do_initial_child_stuff): Remove debug registers references.
14870 Set context using the low target. Resume threads after
14871 setting the contexts.
14872 (child_continue): Remove dead variable. Remove debug
14873 registers references.
14874 (child_fetch_inferior_registers): Go through the low target.
14875 (do_child_store_inferior_registers): Remove.
14876 (child_store_inferior_registers): Go through the low target.
14877 (win32_resume): Remove debug registers references.
14878 Set context using the low target.
14879 (handle_exception): Change return type to void. Don't record
14880 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14881 first chance exception.
14882 (get_child_debug_event): Change return type to void. Remove
14883 goto loop. Always return after waiting for debug event.
14884 (win32_wait): Convert to switch statement. Handle spurious
14885 events.
14886
14887 * win32-i386-low.c (debug_registers_changed,
14888 debug_registers_used): New.
14889 (initial_stuff): Rename to ...
14890 (i386_initial_stuff): ... this. Clear debug registers
14891 state variables.
14892 (store_debug_registers): Delete.
14893 (i386_get_thread_context): New.
14894 (load_debug_registers): Delete.
14895 (i386_set_thread_context): New.
14896 (i386_thread_added): New.
14897 (single_step): Rename to ...
14898 (i386_single_step): ... this.
14899 (do_fetch_inferior_registers): Rename to ...
14900 (i386_fetch_inferior_register): ... this.
14901 (i386_store_inferior_register): New.
14902 (the_low_target): Adapt to new interface.
14903
14904 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14905 (arm_get_thread_context): New.
14906 (arm_set_thread_context): New.
14907 (regptr): New.
14908 (do_fetch_inferior_registers): Rename to ...
14909 (arm_fetch_inferior_register): ... this.
14910 (arm_store_inferior_register): New.
14911 (arm_wince_breakpoint): Reimplement as unsigned long.
14912 (arm_wince_breakpoint_len): Define.
14913 (the_low_target): Adapt to new interface.
14914
14915 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14916 load_debug_registers. Add get_thread_context, set_thread_context,
14917 thread_added and store_inferior_register. Rename
14918 fetch_inferior_registers to fetch_inferior_register.
14919 (regptr): Remove declaration.
14920
14921 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14922
14923 * linux-low.c (linux_detach): Change return type to int. Return 0.
14924 * spu-low.c (spu_detach): Likewise.
14925
14926 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14927
14928 * target.h (target_ops): Change return type of detach to int.
14929 Add join.
14930 (join_inferior): New.
14931 * server.c (main): Don't skip detach support on mingw32.
14932 If the inferior doesn't support detaching return error.
14933 Call join_inferior instead of using waitpid.
14934 * linux-low.c (linux_join): New.
14935 (linux_target_op): Add linux_join.
14936 * spu-low.c (spu_join): New.
14937 (spu_target_ops): Add spu_join.
14938 * win32-low.c (win32_detach): Adapt to new interface.
14939 Reopen current_process_handle before detaching. Issue a child
14940 resume before detaching.
14941 (win32_join): New.
14942 (win32_target_op): Add win32_join.
14943
14944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14945
14946 * win32-low.c (win32-attach): Fix return value.
14947 * target.h (target_ops): Describe ATTACH return values.
14948
14949 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14950
14951 * win32-low.c (GETPROCADDRESS): Define.
14952 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14953 (winapi_DebugSetProcessKillOnExit): Likewise.
14954 (win32_create_inferior): Force usage of ansi CreateProcessA.
14955 (win32_attach): Use GETPROCADDRESS.
14956 (win32_detach): Likewise.
14957
14958 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14959
14960 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14961
14962 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14963
14964 * win32-low.c: Commit leftover changes from 2007-03-29.
14965
14966 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14967
14968 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14969 fields short instead of int. Add explicit padding.
14970 (i387_cache_to_fsave): Remove unnecessary casts.
14971 (i387_fsave_to_cache): Doc fix.
14972 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14973
14974 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14975
14976 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14977 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14978
14979 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14980
14981 * configure.srv (arm*-*-mingw32ce*): Move near the other
14982 arm targets.
14983
14984 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14985
14986 * configure.ac: Add errno checking.
14987 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14988 sys/file.h and malloc.h.
14989 (AC_CHECK_DECLS): Add perror.
14990 (srv_mingwce): Handle.
14991 * configure.srv (i[34567]86-*-cygwin*): Add
14992 win32-i386-low.o to srv_tgtobj.
14993 (i[34567]86-*-mingw*): Likewise.
14994 (arm*-*-mingw32ce*): Add case.
14995 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14996 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14997 [__MINGW32CE__] (strerror): New function.
14998 [__MINGW32CE__] (errno): Define to GetLastError.
14999 [__MINGW32CE__] (COUNTOF): New macro.
15000 (remote_open): Remove extra close call.
15001 * mem-break.c (delete_breakpoint_at): New function.
15002 * mem-break.h (delete_breakpoint_at): Declare.
15003 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15004 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15005 [USE_WIN32API] (read, write): Add char* casts.
15006 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15007 * server.h: Include wincecompat.h on Windows CE.
15008 [HAVE_ERRNO_H]: Check.
15009 (perror): Declare if not declared.
15010 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15011 (perror_with_name): Remove errno declaration.
15012 * wincecompat.h: New.
15013 * wincecompat.c: New.
15014 * win32-low.h: New.
15015 * win32-arm-low.c: New.
15016 * win32-i386-low.c: New.
15017 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15018 (OUTMSG2): Make it safe.
15019 (_T): New macro.
15020 (COUNTOF): New macro.
15021 (NUM_REGS): Get it from the low target.
15022 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15023 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15024 (thread_rec): Let low target handle debug registers.
15025 (child_add_thread): Likewise.
15026 (child_init_thread_list): Likewise.
15027 (continue_one_thread): Likewise.
15028 (regptr): New.
15029 (do_child_fetch_inferior_registers): Move to ...
15030 * win32-i386-low.c: ... here, and rename to ...
15031 (do_fetch_inferior_registers): ... this.
15032 * win32-low.c (child_fetch_inferior_registers):
15033 Go through the low target.
15034 (do_child_store_inferior_registers): Use regptr.
15035 (strwinerror): New function.
15036 (win32_create_inferior): Handle Windows CE.
15037 Use strwinerror instead of strerror on Windows error
15038 codes. Add program to the error output.
15039 Don't close the main thread handle on Windows CE.
15040 (win32_attach): Use coredll.dll on Windows CE.
15041 (win32_kill): Close current process and current
15042 thread handles.
15043 (win32_detach): Use coredll.dll on Windows CE.
15044 (win32_resume): Let low target handle debug registers, and
15045 step request.
15046 (handle_exception): Add/Remove initial breakpoint. Avoid
15047 non-existant WSTOPSIG on Windows CE.
15048 (win32_read_inferior_memory): Cast to remove warning.
15049 (win32_arch_string): Go through the low target.
15050 (initialize_low): Call set_breakpoint_data with the low
15051 target's breakpoint.
15052 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15053 FOP_REGNUM, mappings): Move to ...
15054 * win32-i386-low.c: ... here.
15055 * win32-low.c (win32_thread_info): Move to ...
15056 * win32-low.h: ... here.
15057 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15058 win32-arm-low.c and wincecompat.c.
15059 (all:): Add $EXEEXT.
15060 (install-only:): Likewise.
15061 (gdbserver:): Likewise.
15062 (gdbreplay:): Likewise.
15063 * config.in: Regenerate.
15064 * configure: Regenerate.
15065
15066 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15067
15068 * win32-low.c: Rename typedef thread_info to
15069 win32_thread_info throughout.
15070
15071 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15072
15073 * win32-i386-low.c: Rename to ...
15074 * win32-low.c: ... this.
15075 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15076 * Makefile.in: Likewise.
15077
15078 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15079
15080 * remote-utils.c (monitor_output): Constify msg parameter.
15081 * server.h (monitor_output): Likewise.
15082 * win32-i386-low.c (handle_output_debug_string): New.
15083 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15084 handle_output_debug_string.
15085 (get_child_debug_event): Likewise.
15086
15087 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15088
15089 * server.c (main): Correct strtoul check.
15090
15091 2007-03-27 Jon Ringle <jon@ringle.org>
15092
15093 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15094
15095 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15096
15097 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15098
15099 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15100
15101 * terminal.h: Check HAVE_SGTTY_H.
15102
15103 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15104
15105 * remote-utils.c (remote_open): Print out the assigned port number.
15106
15107 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15108
15109 * remote-utils.c (monitor_output): New function.
15110 * server.c (debug_threads): Define here.
15111 (monitor_show_help): New function.
15112 (handle_query): Handle qRcmd.
15113 (main): Do not handle 'd' packet.
15114 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15115 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15116 of debug_threads.
15117
15118 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15119
15120 * Makefile.in (EXEEXT): New.
15121 (clean): Use $(EXEEXT).
15122
15123 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15124
15125 * target.h (target_ops): Rename send_signal to request_interrupt,
15126 and remove enum target_signal parameter.
15127 * linux-low.c (linux_request_interrupt): Rename from
15128 linux_send_signal, and always send SIGINT.
15129 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15130 and always send SIGINT.
15131 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15132 of send_signal.
15133 (input_interrupt): Likewise.
15134
15135 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15136
15137 * server.c (get_features_xml): Check if target implemented
15138 arch_string.
15139 * win32-i386-low.c (win32_arch_string): New.
15140 (win32_target_ops): Add win32_arch_string as arch_string member.
15141
15142 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15143
15144 * spu-low.c (spu_arch_string): New.
15145 (spu_target_ops): Add spu_arch_string.
15146
15147 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15148
15149 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15150 * configure.ac: Do not check for terminal.h.
15151 * configure, config.in: Regenerated.
15152
15153 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15154
15155 * Makefile.in (OBS): Add $(XML_BUILTIN).
15156 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15157 (clean): Update.
15158 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15159 (arm-with-iwmmxt.c): New.
15160 * config.in, configure: Regenerate.
15161 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15162 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15163 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15164 (arm*-*-linux*): Add iWMMXt and regset support.
15165 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15166 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15167 (arm_store_wmmxregset, target_regsets): New.
15168 * server.c (get_features_xml): Take annex argument. Check builtin
15169 XML documents.
15170 (handle_query): Handle multiple annexes.
15171
15172 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15173
15174 * remote-utils.c [USE_WIN32API] (read, write): Define.
15175 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15176 write.
15177
15178 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15179
15180 * linux-i386-low.c (the_low_target): Set arch_string.
15181 * linux-x86-64-low.c (the_low_target): Likewise.
15182 * linux-low.c (linux_arch_string): New.
15183 (linux_target_ops): Add it.
15184 * linux-low.h (struct linux_target_ops): Add arch_string.
15185 * server.c (write_qxfer_response): Use const void * for DATA.
15186 (get_features_xml): New.
15187 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15188 * target.h (struct target_ops): Add arch_string method.
15189
15190 2007-01-03 Denis Pilat <denis.pilat@st.com>
15191 Daniel Jacobowitz <dan@codesourcery.com>
15192
15193 * linux-low.c (linux_kill): Handle being called with no threads.
15194 * win32-i386-low.c (win32_kill): Likewise.
15195 (get_child_debug_event): Clear current_process_handle.
15196
15197 2006-12-30 Denis PILAT <denis.pilat@st.com>
15198 Daniel Jacobowitz <dan@codesourcery.com>
15199
15200 * remote-utils.c (remote_open): Check the type of specified
15201 serial port devices before opening them.
15202 * server.c (main): Kill the inferior if an error occurs during
15203 the first remote_open.
15204
15205 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15206
15207 * README: Update supported targets.
15208
15209 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15210
15211 * Makefile.in (clean): Remove reg-mips64.c.
15212 (reg-mips64.c, reg-mips64.o): New rules.
15213 * configure.srv: Handle mips64. Include regset support for mips.
15214 * linux-mips-low.c (union mips_register): New.
15215 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15216 (mips_breakpoint, mips_breakpoint_at): Use int.
15217 (mips_collect_register, mips_supply_register)
15218 (mips_collect_register_32bit, mips_supply_register_32bit)
15219 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15220 (mips_store_fpregset, target_regsets): New.
15221 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15222
15223 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15224
15225 * configure.srv: Add target "spu*-*-*".
15226 * Makefile.in (clean): Remove reg-spu.c.
15227 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15228 * spu-low.c: New file.
15229
15230 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15231
15232 * configure.ac: Correct td_thr_tls_get_addr test.
15233 * configure: Regenerated.
15234
15235 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15236
15237 * linux-low.c (linux_wait_for_event): Reformat. Use the
15238 pass_signals array.
15239 * remote-utils.c (decode_address_to_semicolon): New.
15240 * server.c (pass_signals, handle_general_set): New.
15241 (handle_query): Mention QPassSignals for qSupported.
15242 (main): Call handle_general_set.
15243 * server.h (pass_signals, decode_address_to_semicolon): New.
15244
15245 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15246
15247 * server.c (handle_query): Correct error handling for read_auxv.
15248
15249 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15250
15251 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15252 and srv_linux_thread_db to yes.
15253 * linux-s390-low.c (s390_fill_gregset): New function.
15254 (target_regsets): Define data structure.
15255
15256 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15257
15258 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15259 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15260 * config.in, configure: Regenerated.
15261 * inferiors.c (gdb_id_to_thread): New function.
15262 (gdb_id_to_thread_id): Use it.
15263 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15264 * linux-low.h (struct process_info): Add th member.
15265 (thread_db_get_tls_address): New prototype.
15266 * remote-utils.c (decode_address): Make non-static.
15267 * server.c (handle_query): Handle qGetTLSAddr.
15268 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15269 * target.h (struct target_ops): Add get_tls_address.
15270 * thread-db.c (maybe_attach_thread): Save the thread handle.
15271 (thread_db_get_tls_address): New.
15272
15273 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15274
15275 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15276 (linux_resume_one_process): Take a siginfo_t *. Update all
15277 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15278 (struct pending_signals): Add a siginfo_t.
15279 (linux_wait_for_process): Always set last_status.
15280 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15281 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15282 * linux-low.h (struct process_info): Add last_status.
15283
15284 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15285
15286 * remote-utils.c (try_rle): New function.
15287 (putpkt_binary): Use it.
15288
15289 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15290
15291 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15292 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15293 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15294 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15295 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15296 point registers.
15297
15298 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15299
15300 * server.c (terminal_fd): New variable.
15301 (old_foreground_pgrp): Likewise.
15302 (restore_old_foreground_pgrp): New function.
15303 (start_inferior): Record the terminal file descriptor in terminal_fd
15304 and its original foreground group in old_foreground_pgrp. Register
15305 restore_old_foreground_pgrp with atexit().
15306
15307 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15308
15309 * server.c (handle_query): Correct qPart to qXfer.
15310
15311 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15312
15313 * configure.ac: Check for more headers which are missing on
15314 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15315 * configure.srv: Add Cygwin and mingw32.
15316 * remote-utils.c: Don't include headers unconditionally which
15317 are missing on mingw32. Include <winsock.h> for mingw32.
15318 (remote_open): Adjust for mingw32 support. Flush
15319 standard error after writing to it.
15320 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15321 (unblock_async_io, enable_async_io, disable_async_io)
15322 (readchar, getpkt): Update for Winsock support.
15323 (prepare_resume_reply): Expect a protocol signal number.
15324 * server.c: Disable <sys/wait.h> on mingw32.
15325 (start_inferior): Adjust for mingw32 support. Flush
15326 standard error after writing to it.
15327 (attach_inferior): Likewise. Use protocol signal
15328 numbers.
15329 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15330 and names.
15331 * win32-i386-low.c: New file.
15332 * Makefile.in (XM_CLIBS): Set.
15333 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15334 (win32-i386-low.o): New dependency rule.
15335 * linux-low.c (linux_wait): Use target signal numbers.
15336 * target.h (struct target_ops): Doc fix.
15337 * server.h (target_signal_to_name): New prototype.
15338 * gdbreplay.c: Don't include headers unconditionally which
15339 are missing on mingw32. Include <winsock.h> for mingw32.
15340 (remote_close, remote_open): Adjust for Winsock support.
15341 * configure, config.in: Regenerated.
15342
15343 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15344
15345 * server.c (decode_xfer_read, write_qxfer_response): New.
15346 (handle_query): Take a packet length argument. Handle
15347 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15348 the qSupported response.
15349 (main): Update call to handle_query.
15350
15351 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15352
15353 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15354 (putpkt_binary): Renamed from putpkt and adjusted for binary
15355 data.
15356 (putpkt): New wrapper for putpkt_binary.
15357 (readchar): Don't mask off the high bit.
15358 (decode_X_packet): New function.
15359 * server.c (main): Call putpkt_binary if a handler sets the packet
15360 length. Save the length of the incoming packet. Handle 'X'.
15361 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15362
15363 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15364
15365 * server.c (handle_query): Handle qSupported.
15366
15367 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15368
15369 * remote-utils.c (all_symbols_looked_up): New variable.
15370 (look_up_one_symbol): Check it.
15371 * server.h (look_up_one_symbol): New declaration.
15372 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15373
15374 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15375
15376 * Makefile.in (linux-arm-low.o): Update dependencies.
15377 * linux-arm-low.c: Include "gdb_proc_service.h".
15378 (PTRACE_GET_THREAD_AREA): Define.
15379 (ps_get_thread_area): New function.
15380
15381 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15382
15383 * configure.srv (m68k*-*-uclinux*): New target.
15384 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15385 (linux_resume_one_process): Remove extraneous cast.
15386 (linux_read_offsets): New.
15387 (linux_target_op): Add linux_read_offsets on mmuless systems.
15388 * server.c (handle_query): Add qOffsets logic.
15389 * target.h (struct target_ops): Add read_offsets.
15390
15391 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15392
15393 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15394 (PTRACE_GET_THREAD_AREA): Define.
15395 (ps_get_thread_area): New function.
15396 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15397 (linux-x86-64-low.o): Update.
15398
15399 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15400
15401 * configure.ac: Remove checks for prfpregset_t.
15402 * gdb_proc_service.h: New file.
15403 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15404 new "gdb_proc_service.h".
15405 * proc-service.c: Likewise.
15406 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15407 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15408 * Makefile.in (gdb_proc_service_h): Updated.
15409 * configure, config.in: Regenerated.
15410
15411 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15412
15413 * remote-utils.c (prepare_resume_reply): Move declaration
15414 of gdb_id_from_wait to the top of the block.
15415
15416 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15417
15418 * linux-low.c (regsets_store_inferior_registers): Read the regset
15419 from the target before filling it.
15420
15421 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15422
15423 * server.c (attach_inferior): Return SIGTRAP for a successful
15424 attach.
15425
15426 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15427
15428 * Makefile.in (OBS): Add version.o.
15429 (STAGESTUFF): Delete.
15430 (version.o): Add dependencies.
15431 (version.c): Replace rule.
15432 (clean): Remove version.c.
15433 * server.c (gdbserver_version): New.
15434 (gdbserver_usage): Use printf.
15435 (main): Handle --version and --help.
15436 * server.h (version, host_name): Add declarations.
15437
15438 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15439
15440 * linux-arm-low.c:
15441 * linux-arm-low.c:
15442 * inferiors.c:
15443 * i387-fp.h:
15444 * i387-fp.c:
15445 * gdbreplay.c:
15446 * regcache.c:
15447 * proc-service.c:
15448 * mem-break.h:
15449 * mem-break.c:
15450 * linux-x86-64-low.c:
15451 * linux-sh-low.c:
15452 * linux-s390-low.c:
15453 * linux-ppc64-low.c:
15454 * linux-ppc-low.c:
15455 * linux-mips-low.c:
15456 * linux-m68k-low.c:
15457 * linux-m32r-low.c:
15458 * linux-low.h:
15459 * linux-low.c:
15460 * linux-ia64-low.c:
15461 * linux-i386-low.c:
15462 * linux-crisv32-low.c:
15463 * thread-db.c:
15464 * terminal.h:
15465 * target.h:
15466 * target.c:
15467 * server.h:
15468 * server.c:
15469 * remote-utils.c:
15470 * regcache.h:
15471 * utils.c:
15472 * Makefile.in:
15473 * configure.ac:
15474 * gdbserver.1: Add (C) after Copyright. Update the FSF
15475 address.
15476
15477 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15478
15479 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15480 (arm_breakpoint_at): Recognize both breakpoints.
15481 (the_low_target): Use the correct breakpoint instruction.
15482
15483 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15484
15485 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15486 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15487 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15488 (the_low_target): Update.
15489
15490 2005-10-25 Andreas Schwab <schwab@suse.de>
15491
15492 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15493
15494 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15495 (ia64_num_regs): Reduce to 462.
15496
15497 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15498
15499 * acinclude.m4: Correct quoting.
15500 * aclocal.m4: Regenerated.
15501
15502 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15503 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15504 (thread_db_init): Call thread_db_err_str.
15505 * configure.ac: Check for TD_VERSION.
15506 * config.in, configure: Regenerated.
15507
15508 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15509
15510 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15511
15512 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15513
15514 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15515 is not available. Define HAVE_PTRACE_GETREGS if it is.
15516 * config.in, configure: Regenerated.
15517 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15518 * linux-i386-low.c, linux-m68k-low.c: Update to use
15519 HAVE_PTRACE_GETREGS.
15520 * linux-low.c (regsets_fetch_inferior_registers)
15521 (regsets_store_inferior_registers): Only return 0 if we processed
15522 GENERAL_REGS.
15523 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15524 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15525
15526 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15527
15528 * inferiors.c (struct thread_info): Add gdb_id.
15529 (add_thread): Add gdb_id argument.
15530 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15531 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15532 calls to add_thread.
15533 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15534 * server.c (handle_query): Use thread_to_gdb_id.
15535 (handle_v_cont, main): Use gdb_id_to_thread_id.
15536 * server.h (add_thread): Update prototype.
15537 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15538 prototypes.
15539
15540 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15541
15542 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15543 left-padded registers.
15544 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15545 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15546
15547 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15548
15549 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15550 * configure: Regenerate.
15551 * config.in: Regenerate.
15552 * server.h (NEED_DECLARATION_STRERROR):
15553 Replace with !HAVE_DECL_STRERROR.
15554
15555 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15556
15557 * linux-low.c (linux_wait, linux_send_signal): Don't test
15558 an unsigned long variable for > 0 if it could be MAX_ULONG.
15559 * server.c (myresume): Likewise.
15560 * target.c (set_desired_inferior): Likewise.
15561
15562 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15563
15564 * configure.ac: Simplify and improve check for socklen_t.
15565 * configure, config.in: Regenerate.
15566
15567 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15568
15569 * acconfig.h: Remove.
15570 * configure.ac: Add a test for socklen_t. Use three-argument
15571 AC_DEFINE throughout.
15572 * config.in: Regenerated using autoheader 2.59.
15573 * configure: Regenerated.
15574
15575 * gdbreplay.c (socklen_t): Provide a default.
15576 (remote_open): Use socklen_t.
15577 * remote-utils.c (socklen_t): Provide a default.
15578 (remote_open): Use socklen_t.
15579 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15580 unsigned char.
15581
15582 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15583 char for buffers.
15584 * linux-low.c (linux_read_memory, linux_write_memory)
15585 (linux_read_auxv): Likewise.
15586 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15587 (check_mem_write): Likewise.
15588 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15589 Likewise.
15590 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15591 (registers_from_string, register_data): Likewise.
15592 * server.c (handle_query, main): Likewise.
15593 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15594 (decode_M_packet): Likewise.
15595 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15596 * target.h (struct target_ops): Update read_memory, write_memory,
15597 and read_auxv.
15598 (read_inferior_memory, write_inferior_memory): Update.
15599 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15600 to unsigned char *.
15601 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15602 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15603 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15604 linux-s390-low.c, linux-sh-low.c: Update for changes in
15605 read_inferior_memory and the_low_target->breakpoint.
15606
15607 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15608
15609 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15610 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15611 * configure.srv: Add powerpc64-*-linux*.
15612 * linux-ppc64-low.c: New file.
15613
15614 2005-05-23 Orjan Friberg <orjanf@axis.com>
15615
15616 * linux-cris-low.c: New file with support for CRIS.
15617 * linux-crisv32-low.c: Ditto for CRISv32.
15618 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15619 (clean): Add reg-cris.c and reg-crisv32.c.
15620 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15621 reg-crisv32.o, and reg-crisv32.c to make rules.
15622 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15623 recognized targets.
15624
15625 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15626
15627 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15628 of sizeof (PTRACE_XFER_TYPE).
15629 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15630
15631 2005-05-12 Orjan Friberg <orjanf@axis.com>
15632
15633 * target.h (struct target_ops): Add insert_watchpoint,
15634 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15635 pointers for hardware watchpoint support.
15636 * linux-low.h (struct linux_target_ops): Ditto.
15637 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15638 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15639 to linux_target_ops.
15640 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15641 reply packet.
15642 * server.c (main): Recognize 'Z' and 'z' packets.
15643
15644 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15645
15646 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15647 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15648 (the_low_target): Add new members.
15649
15650 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15651
15652 * proc-service.c (ps_lgetregs): Search all_processes instead of
15653 all_threads.
15654
15655 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15656
15657 * server.c (start_inferior): Change return type to int.
15658 (attach_inferior): Change sigptr to int *.
15659 (handle_v_cont, handle_v_requests): Change signal to int *.
15660 (main): Change signal to int.
15661
15662 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
15663
15664 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15665 * configure.srv: Add m32r*-*-linux*.
15666 * linux-m32r-low.c: New file.
15667
15668 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15671
15672 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15673
15674 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15675 Take unsigned long arguments for PIDs.
15676 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15677 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15678 (wait_for_sigstop, linux_resume_one_process)
15679 (regsets_fetch_inferior_registers, linux_send_signal)
15680 (linux_read_auxv): Likewise. Update the types of variables holding
15681 PIDs. Update format string specifiers.
15682 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15683 * remote-utils.c (prepare_resume_reply): Likewise.
15684 * server.c (cont_thread, general_thread, step_thread)
15685 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15686 unsigned long.
15687 (handle_query): Update format specifiers.
15688 (handle_v_cont, main): Use strtoul for thread IDs.
15689 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15690 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15691 (general_thread, step_thread, thread_from_wait)
15692 (old_thread_from_wait): Update.
15693 * target.h (struct thread_resume): Use unsigned long for THREAD.
15694 (struct target_ops): Use unsigned long for arguments to attach and
15695 thread_alive.
15696
15697 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15698
15699 * acinclude.m4: Include bfd/bfd.m4 directly.
15700 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15701 <agriffis@toolchain.org>.
15702 * aclocal.m4, configure: Regenerated.
15703
15704 2005-01-07 Andrew Cagney <cagney@gnu.org>
15705
15706 * configure.ac: Rename configure.in, require autoconf 2.59.
15707 * configure: Re-generate.
15708
15709 2004-12-08 Daniel Jacobowitz <dan@debian.org>
15710
15711 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15712 LIBS when finished.
15713 * aclocal.m4: Regenerated.
15714 * configure: Regenerated.
15715
15716 2004-11-21 Andreas Schwab <schwab@suse.de>
15717
15718 * linux-m68k-low.c (m68k_num_gregs): Define.
15719 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15720 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15721 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15722 (m68k_breakpoint_at): New. Add to the_low_target.
15723
15724 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15725 srv_linux_thread_db to yes.
15726
15727 2004-10-20 Joel Brobecker <brobecker@gnat.com>
15728
15729 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15730 (ARCH_SET_FS): Likewise.
15731 (ARCH_GET_FS): Likewise.
15732 (ARCH_GET_GS): Likewise.
15733
15734 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15735
15736 * linux-i386-low.c (ps_get_thread_area): New.
15737 * linux-x86-64-low.c (ps_get_thread_area): New.
15738 * linux-low.c: Include <sys/syscall.h>.
15739 (linux_kill_one_process): Don't kill the first thread here.
15740 (linux_kill): Kill the first thread here.
15741 (kill_lwp): New function.
15742 (send_sigstop, linux_send_signal): Use it.
15743 * proc-service.c: Clean up #ifdefs.
15744 (fpregset_info): Delete.
15745 (ps_lgetregs): Update and enable implementation.
15746 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15747 implementations.
15748 * remote-utils.c (struct sym_cache, symbol_cache): New.
15749 (input_interrupt): Print a clearer message.
15750 (async_io_enabled): New variable.
15751 (enable_async_io, disable_async_io): Use it. Update comments.
15752 (look_up_one_symbol): Use the symbol cache.
15753 * thread-db.c (thread_db_look_up_symbols): New function.
15754 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15755
15756 2004-10-16 Daniel Jacobowitz <dan@debian.org>
15757
15758 * configure.in: Test for -rdynamic.
15759 * configure: Regenerated.
15760 * Makefile (INTERNAL_LDFLAGS): New.
15761 (gdbserver, gdbreplay): Use it.
15762
15763 2004-09-02 Andrew Cagney <cagney@gnu.org>
15764
15765 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15766
15767 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
15768
15769 * linux-low.c (linux_wait): Clear all_processes list also.
15770
15771 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15772
15773 * linux-low.c: Include <errno.h>. Remove extern declaration of
15774 errno.
15775
15776 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
15777
15778 * gdbreplay.c, server.h, utils.c: Update copyright years.
15779
15780 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15781
15782 * server.c (main): Print child status or termination signal from
15783 variable 'signal', not 'sig'.
15784
15785 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15786
15787 * linux-low.c (linux_read_memory): Change return type to
15788 int. Check for and return error from ptrace().
15789 * target.c (read_inferior_memory): Change return type to int. Pass
15790 back return status from the_target->read_memory().
15791 * target.h (struct target_ops): Adapt *read_memory() prototype.
15792 Update comment.
15793 (read_inferior_memory): Adapt prototype.
15794 * server.c (main): Return an error packet if
15795 read_inferior_memory() returns an error.
15796
15797 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
15798
15799 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15800 Unify with other clean targets.
15801
15802 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15803
15804 * server.c (handle_v_cont): Call set_desired_inferior.
15805
15806 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15807
15808 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15809
15810 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15811
15812 * linux-low.c (linux_wait): Unblock async I/O.
15813 (linux_resume): Block and enable async I/O.
15814 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15815 * server.h (block_async_io, unblock_async_io): Add prototypes.
15816
15817 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15818
15819 * remote-utils.c (remote_open): Print a status notice after
15820 opening a TCP port.
15821 * server.c (attach_inferior): Print a status notice after
15822 attaching.
15823
15824 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
15825
15826 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15827
15828 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
15829
15830 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15831 error packet.
15832 * server.c, target.h: Update copyright years.
15833
15834 2004-02-25 Roland McGrath <roland@redhat.com>
15835
15836 * target.h (struct target_ops): New member `read_auxv'.
15837 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15838 * linux-low.c (linux_read_auxv): New function.
15839 (linux_target_ops): Initialize `read_auxv' member to that.
15840
15841 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15842
15843 Committed by Jim Blandy <jimb@redhat.com>.
15844
15845 * linux-s390-low.c (s390_num_regs): Update.
15846 (s390_regmap): Remove control registers. Use __s390x__ predefine
15847 instead of GPR_SIZE to distiguish s390 and s390x targets.
15848
15849 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
15850
15851 * linux-low.c: Update copyright year.
15852 (check_removed_breakpoint): Clear pending_is_breakpoint.
15853 (linux_set_resume_request, linux_queue_one_thread)
15854 (resume_status_pending_p): New functions.
15855 (linux_continue_one_thread): Use process->resume.
15856 (linux_resume): Only resume threads if there are no pending events.
15857 * linux-low.h (struct process_info): Add resume request
15858 pointer.
15859
15860 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
15861
15862 * regcache.c (new_register_cache): Clear the allocated register
15863 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15864
15865 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
15866
15867 * linux-low.c (linux_resume): Take a struct thread_resume *
15868 argument.
15869 (linux_wait): Update call.
15870 (resume_ptr): New static variable.
15871 (linux_continue_one_thread): Renamed from
15872 linux_continue_one_process. Use resume_ptr.
15873 (linux_resume): Use linux_continue_one_thread.
15874 * server.c (handle_v_cont, handle_v_requests): New functions.
15875 (myresume): New function.
15876 (main): Handle 'v' case.
15877 * target.h (struct thread_resume): New type.
15878 (struct target_ops): Change argument of "resume" to struct
15879 thread_resume *.
15880 (myresume): Delete macro.
15881
15882 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15883
15884 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15885 (uninstall): Support DESTDIR.
15886
15887 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15888
15889 * configure.srv: Add xscale*linux copy of arm*linux entry.
15890
15891 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
15892
15893 * linux-arm-low.c (arm_reinsert_addr): New function.
15894 (the_low_target): Add arm_reinsert_addr.
15895
15896 2003-07-08 Mark Kettenis <kettenis@gnu.org>
15897
15898 * mem-break.c: Remove whitespace at end of file.
15899
15900 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15901
15902 * configure.in: Check whether we need to prototype strerror.
15903 * server.h: Optionally prototype strerror.
15904 * gdbreplay.c (perror_with_name): Use strerror.
15905 * linux-low.c (linux_attach_lwp): Use strerror.
15906 * utils.c (perror_with_name): Use strerror.
15907 * config.in, configure: Regenerated.
15908
15909 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
15910
15911 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15912 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15913
15914 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
15915
15916 * Makefile.in (SFILES): Update.
15917 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15918 low-sun3.c: Remove files.
15919
15920 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
15921
15922 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15923 (linux_detach_one_process, linux_detach): New functions.
15924 (linux_target_ops): Add linux_detach.
15925 * server.c (main): Handle 'D' packet.
15926 * target.h (struct target_ops): Add "detach" member.
15927 (detach_inferior): Define.
15928
15929 2003-06-13 Mark Kettenis <kettenis@gnu.org>
15930
15931 From Kelley Cook <kelleycook@wideopenwest.com>:
15932 * configure.srv: Accept i[34567]86 variants.
15933
15934 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
15935
15936 * linux-low.c (linux_wait_for_event): Correct comment typos.
15937 (linux_resume_one_process): Call check_removed_breakpoint.
15938 (linux_send_signal): New function.
15939 (linux_target_ops): Add linux_send_signal.
15940 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15941 of kill.
15942 * target.h (struct target_ops): Add send_signal.
15943
15944 2003-05-29 Jim Blandy <jimb@redhat.com>
15945
15946 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15947 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15948 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15949 away part of the register's value.
15950
15951 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
15952
15953 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15954 (linux_wait_for_event, linux_init_signals): Likewise.
15955
15956 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
15957
15958 * configure.in: Check for stdlib.h.
15959 * configure: Regenerated.
15960 * config.in: Regenerated.
15961
15962 2003-01-04 Andreas Schwab <schwab@suse.de>
15963
15964 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15965
15966 2003-01-02 Andrew Cagney <ac131313@redhat.com>
15967
15968 * Makefile.in: Remove obsolete code.
15969
15970 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
15971
15972 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15973 defined(PT_FPR0_HI).
15974
15975 2002-11-17 Stuart Hughes <seh@zee2.com>
15976
15977 * linux-arm-low.c (arm_num_regs): Increase.
15978 (arm_regmap): Include status register.
15979
15980 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
15981
15982 * linux-low.c (register_addr): Remove incorrect -1 check.
15983
15984 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
15985
15986 * linux-low.c (linux_create_inferior): Call setpgid. Return
15987 the new PID.
15988 (unstopped_p, linux_signal_pid): Remove.
15989 (linux_target_ops): Remove linux_signal_pid.
15990 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15991 global instead of target method.
15992 * target.h (struct target_ops): Remove signal_pid. Update comment
15993 for create_inferior.
15994 * server.c (signal_pid): New variable.
15995 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
15996 gdbserver. Set the child to be the foreground process group.
15997 (attach_inferior): Set signal_pid.
15998
15999 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16000
16001 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16002
16003 2002-08-20 Jim Blandy <jimb@redhat.com>
16004
16005 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16006 default for this.
16007
16008 2002-08-01 Andrew Cagney <cagney@redhat.com>
16009
16010 * Makefile.in: Make chill references obsolete.
16011
16012 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16013
16014 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16015 * configure: Regenerate.
16016 * config.in: Regenerate.
16017
16018 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16019
16020 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16021 (perror_with_name, remote_close, remote_open, expect, play): Static.
16022
16023 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16024
16025 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16026 byte offsets instead of an array of indexes.
16027 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16028
16029 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16030
16031 * regcache.c: Add comment.
16032
16033 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16034
16035 * thread-db.c: New file.
16036 * proc-service.c: New file.
16037 * acinclude.m4: New file.
16038 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16039 proc-service.o, and thread-db.o.
16040 (linux-low.o): Add USE_THREAD_DB.
16041 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16042 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16043 * aclocal.m4: Regenerated.
16044 * config.in: Regenerated.
16045 * configure: Regenerated.
16046 * configure.in: Check for proc_service.h, sys/procfs.h,
16047 thread_db.h, and linux/elf.h headrs.
16048 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16049 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16050 Check for -lthread_db and thread support.
16051 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16052 PowerPC, and SuperH.
16053 * i387-fp.c: Constify arguments.
16054 * i387-fp.h: Likewise.
16055 * inferiors.c: (struct thread_info): Renamed from
16056 `struct inferior_info'. Remove PID member. Use generic inferior
16057 list header. All uses updated.
16058 (inferiors, signal_pid): Removed.
16059 (all_threads): New variable.
16060 (get_thread): Define.
16061 (add_inferior_to_list): New function.
16062 (for_each_inferior): New function.
16063 (change_inferior_id): New function.
16064 (add_inferior): Removed.
16065 (remove_inferior): New function.
16066 (add_thread): New function.
16067 (free_one_thread): New function.
16068 (remove_thread): New function.
16069 (clear_inferiors): Use for_each_inferior and free_one_thread.
16070 (find_inferior): New function.
16071 (find_inferior_id): New function.
16072 (inferior_target_data): Update argument type.
16073 (set_inferior_target_data): Likewise.
16074 (inferior_regcache_data): Likewise.
16075 (set_inferior_regcache_data): Likewise.
16076 * linux-low.c (linux_bp_reinsert): Remove.
16077 (all_processes, stopping_threads, using_thrads)
16078 (struct pending_signals, debug_threads, pid_of): New.
16079 (inferior_pid): Replace with macro.
16080 (struct inferior_linux_data): Remove.
16081 (get_stop_pc, add_process): New functions.
16082 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16083 Use add_process and add_thread.
16084 (linux_attach_lwp): New function, based on old linux_attach. Use
16085 add_process and add_thread. Set stop_expected for new threads.
16086 (linux_attach): New function.
16087 (linux_kill_one_process): New function.
16088 (linux_kill): Kill all LWPs.
16089 (linux_thread_alive): Use find_inferior_id.
16090 (check_removed_breakpoints, status_pending_p): New functions.
16091 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16092 Update. Use WNOHANG. Wait for cloned processes also. Update process
16093 struct for the found process.
16094 (linux_wait_for_event): New function.
16095 (linux_wait): Use it. Support LWPs.
16096 (send_sigstop, wait_for_sigstop, stop_all_processes)
16097 (linux_resume_one_process, linux_continue_one_process): New functions.
16098 (linux_resume): Support LWPs.
16099 (REGISTER_RAW_SIZE): Remove.
16100 (fetch_register): Use register_size instead. Call supply_register.
16101 (usr_store_inferior_registers): Likewise. Call collect_register.
16102 Fix recursive case.
16103 (regsets_fetch_inferior_registers): Improve error message.
16104 (regsets_store_inferior_registers): Add debugging.
16105 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16106 (unstopped_p, linux_signal_pid): New functions.
16107 (linux_target_ops): Add linux_signal_pid.
16108 (linux_init_signals): New function.
16109 (initialize_low): Call it. Initialize using_threads.
16110 * regcache.c (inferior_regcache_data): Add valid
16111 flag.
16112 (get_regcache): Fetch registers lazily. Add fetch argument
16113 and update all callers.
16114 (regcache_invalidate_one, regcache_invalidate): New
16115 functions.
16116 (new_register_cache): Renamed from create_register_cache.
16117 Return the new regcache.
16118 (free_register_cache): Change argument to a void *.
16119 (registers_to_string, registers_from_string): Call get_regcache
16120 with fetch flag set.
16121 (register_data): Make static. Pass fetch flag to get_regcache.
16122 (supply_register): Call get_regcache with fetch flag clear.
16123 (collect_register): Call get_regcache with fetch flag set.
16124 (collect_register_as_string): New function.
16125 * regcache.h: Update.
16126 * remote-utils.c (putpkt): Flush after debug output and use
16127 stderr.
16128 Handle input interrupts while waiting for an ACK.
16129 (input_interrupt): Use signal_pid method.
16130 (getpkt): Flush after debug output and use stderr.
16131 (outreg): Use collect_register_as_string.
16132 (new_thread_notify, dead_thread_notify): New functions.
16133 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16134 and general_thread.
16135 (look_up_one_symbol): Flush after debug output.
16136 * server.c (step_thread, server_waiting): New variables.
16137 (start_inferior): Don't use signal_pid. Update call to mywait.
16138 (attach_inferior): Update call to mywait.
16139 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16140 (main): Don't fetch/store registers explicitly. Use
16141 set_desired_inferior. Support proposed ``Hs'' packet. Update
16142 calls to mywait.
16143 * server.h: Update.
16144 (struct inferior_list, struct_inferior_list_entry): New.
16145 * target.c (set_desired_inferior): New.
16146 (write_inferior_memory): Constify.
16147 (mywait): New function.
16148 * target.h: Update.
16149 (struct target_ops): New signal_pid method.
16150 (mywait): Removed macro, added prototype.
16151
16152 * linux-low.h (regset_func): Removed.
16153 (regset_fill_func, regset_store_func): New.
16154 (enum regset_type): New.
16155 (struct regset_info): Add type field. Use new operation types.
16156 (struct linux_target_ops): stop_pc renamed to get_pc.
16157 Add decr_pc_after_break and breakpoint_at.
16158 (get_process, get_thread_proess, get_process_thread)
16159 (strut process_info, all_processes, linux_attach_lwp)
16160 (thread_db_init): New.
16161
16162 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16163 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16164 (the_low_target): Add new members.
16165 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16166 (i386_store_fpxregset): Constify.
16167 (target_regsets): Add new kind identifier.
16168 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16169 (i386_set_pc): Add debugging.
16170 (i386_breakpoint_at): New function.
16171 (the_low_target): Add new members.
16172 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16173 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16174 (mips_breakpoint_at): New.
16175 (the_low_target): Add new members.
16176 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16177 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16178 (the_low_target): Add new members.
16179 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16180 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16181 (the_low_target): Add new members.
16182 * linux-x86-64-low.c (target_regsets): Add new kind
16183 identifier.
16184
16185 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16186
16187 From Martin Pool <mbp@samba.org>:
16188 * server.c (gdbserver_usage): New function.
16189 (main): Call it.
16190
16191 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16192
16193 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16194 stop_at -> stop_pc.
16195
16196 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16197
16198 * Makefile.in: Remove obsolete code.
16199
16200 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16201
16202 * linux-low.c (regsets_fetch_inferior_registers),
16203 (regsets_store_inferior_registers): Removed cast to int from
16204 ptrace() calls.
16205 * regcache.h: Added declaration of struct inferior_info.
16206
16207 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16208
16209 * inferiors.c (struct inferior_info): Add regcache_data.
16210 (add_inferior): Call create_register_cache.
16211 (clear_inferiors): Call free_register_cache.
16212 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16213 * regcache.c (struct inferior_regcache_data): New.
16214 (registers): Remove.
16215 (get_regcache): New function.
16216 (create_register_cache, free_register_cache): New functions.
16217 (set_register_cache): Don't initialize the register cache here.
16218 (registers_to_string, registers_from_string, register_data): Call
16219 get_regcache.
16220 * regcache.h: Add prototypes.
16221 * server.h: Likewise.
16222
16223 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16224
16225 * mem-break.c: New file.
16226 * mem-break.h: New file.
16227 * Makefile.in: Add mem-break.o rule; update server.h
16228 dependencies.
16229 * inferiors.c (struct inferior_info): Add target_data
16230 member.
16231 (clear_inferiors): Free target_data member if set.
16232 (inferior_target_data, set_inferior_target_data): New functions.
16233 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16234 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16235 * linux-low.c (linux_bp_reinsert): New variable.
16236 (struct inferior_linux_data): New.
16237 (linux_create_inferior): Use set_inferior_target_data.
16238 (linux_attach): Likewise. Call add_inferior.
16239 (linux_wait_for_one_inferior): New function.
16240 (linux_wait): Call it.
16241 (linux_write_memory): Add const.
16242 (initialize_low): Call set_breakpoint_data.
16243 * linux-low.h (struct linux_target_ops): Add breakpoint
16244 handling members.
16245 * server.c (attach_inferior): Remove extra add_inferior
16246 call.
16247 * server.h: Include mem-break.h. Update inferior.c
16248 prototypes.
16249 * target.c (read_inferior_memory)
16250 (write_inferior_memory): New functions.
16251 * target.h (read_inferior_memory)
16252 (write_inferior_memory): Change macros to prototypes.
16253 (struct target_ops): Update comments. Add const to write_memory
16254 definition.
16255
16256 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16257
16258 * linux-low.c (usr_store_inferior_registers): Support
16259 registers which are allowed to fail to store.
16260 * linux-low.h (linux_target_ops): Likewise.
16261 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16262 (ppc_cannot_store_register): FPSCR may not be storable.
16263
16264 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16265
16266 * server.h: Include <string.h> if HAVE_STRING_H.
16267 * ChangeLog: Correct paths in last ChangeLog entry.
16268
16269 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16270
16271 * linux-low.h: Remove obsolete prototypes.
16272 (struct linux_target_ops): New.
16273 (extern the_low_target): New.
16274 * linux-low.c (num_regs, regmap): Remove declarations.
16275 (register_addr): Use the_low_target explicitly.
16276 (fetch_register): Likewise.
16277 (usr_fetch_inferior_registers): Likewise.
16278 (usr_store_inferior_registers): Likewise.
16279 * linux-arm-low.c (num_regs): Remove.
16280 (arm_num_regs): Define.
16281 (arm_regmap): Renamed from regmap, made static.
16282 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16283 made static.
16284 (arm_cannot_store_register): Renamed from cannot_store_register,
16285 made static.
16286 (the_low_target): New.
16287 * linux-i386-low.c (num_regs): Remove.
16288 (i386_num_regs): Define.
16289 (i386_regmap): Renamed from regmap, made static.
16290 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16291 made static.
16292 (i386_cannot_store_register): Renamed from cannot_store_register,
16293 made static.
16294 (the_low_target): New.
16295 * linux-ia64-low.c (num_regs): Remove.
16296 (ia64_num_regs): Define.
16297 (ia64_regmap): Renamed from regmap, made static.
16298 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16299 made static.
16300 (ia64_cannot_store_register): Renamed from cannot_store_register,
16301 made static.
16302 (the_low_target): New.
16303 * linux-m68k-low.c (num_regs): Remove.
16304 (m68k_num_regs): Define.
16305 (m68k_regmap): Renamed from regmap, made static.
16306 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16307 made static.
16308 (m68k_cannot_store_register): Renamed from cannot_store_register,
16309 made static.
16310 (the_low_target): New.
16311 * linux-mips-low.c (num_regs): Remove.
16312 (mips_num_regs): Define.
16313 (mips_regmap): Renamed from regmap, made static.
16314 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16315 made static.
16316 (mips_cannot_store_register): Renamed from cannot_store_register,
16317 made static.
16318 (the_low_target): New.
16319 * linux-ppc-low.c (num_regs): Remove.
16320 (ppc_num_regs): Define.
16321 (ppc_regmap): Renamed from regmap, made static.
16322 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16323 made static.
16324 (ppc_cannot_store_register): Renamed from cannot_store_register,
16325 made static.
16326 (the_low_target): New.
16327 * linux-s390-low.c (num_regs): Remove.
16328 (s390_num_regs): Define.
16329 (s390_regmap): Renamed from regmap, made static.
16330 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16331 made static.
16332 (s390_cannot_store_register): Renamed from cannot_store_register,
16333 made static.
16334 (the_low_target): New.
16335 * linux-sh-low.c (num_regs): Remove.
16336 (sh_num_regs): Define.
16337 (sh_regmap): Renamed from regmap, made static.
16338 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16339 made static.
16340 (sh_cannot_store_register): Renamed from cannot_store_register,
16341 made static.
16342 (the_low_target): New.
16343 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16344 (the_low_target): New.
16345
16346 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16347
16348 * Makefile.in: Add stamp-h target.
16349 * configure.in: Create stamp-h.
16350 * configure: Regenerated.
16351
16352 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16353
16354 * inferiors.c: New file.
16355 * target.c: New file.
16356 * target.h: New file.
16357 * Makefile.in: Add target.o and inferiors.o. Update
16358 dependencies.
16359 * linux-low.c (inferior_pid): New static variable,
16360 moved from server.c.
16361 (linux_create_inferior): Renamed from create_inferior.
16362 Call add_inferior. Return 0 on success instead of a PID.
16363 (linux_attach): Renamed from myattach.
16364 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16365 (linux_thread_alive): Renamed from mythread_alive.
16366 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16367 child dies.
16368 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16369 (regsets_store_inferior_registers): Correct error message.
16370 Add missing ``return 0''.
16371 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16372 (linux_store_registers): Renamed from store_inferior_registers.
16373 (linux_read_memory): Renamed from read_inferior_memory.
16374 (linux_write_memory): Renamed from write_inferior_memory.
16375 (linux_target_ops): New structure.
16376 (initialize_low): Call set_target_ops ().
16377 * remote-utils.c (unhexify): New function.
16378 (hexify): New function.
16379 (input_interrupt): Send signals to ``signal_pid''.
16380 * server.c (inferior_pid): Remove.
16381 (start_inferior): Update create_inferior call.
16382 (attach_inferior): Call add_inferior.
16383 (handle_query): New function.
16384 (main): Call handle_query for `q' packets.
16385 * server.h: Include "target.h". Remove obsolete prototypes.
16386 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16387
16388 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16389
16390 * Makefile.in: Add WARN_CFLAGS. Update configury
16391 dependencies.
16392 * configure.in: Check for <string.h>
16393 * configure: Regenerate.
16394 * config.in: Regenerate.
16395 * gdbreplay.c: Include needed system headers.
16396 (remote_open): Remove strchr prototype.
16397 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16398 * regcache.c (supply_register): Change buf argument to const void *.
16399 (supply_register_by_name): Likewise.
16400 (collect_register): Change buf argument to void *.
16401 (collect_register_by_name): Likewise.
16402 * regcache.h: Add missing prototypes.
16403 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16404 * server.c (handle_query): New function.
16405 (attached): New static variable, moved out of main.
16406 (main): Quiet longjmp clobber warnings.
16407 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16408 * utils.c (error): Remove NORETURN.
16409 (fatal): Likewise.
This page took 0.348878 seconds and 5 git commands to generate.