Commonise tdesc_feature and makes use of it in gdbserver tdesc
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
82ec9bc7
AH
12018-04-18 Alan Hayward <alan.hayward@arm.com>
2
3 * tdesc.c (~target_desc): Remove implictly deleted items.
4 (init_target_desc): Iterate all features.
5 (tdesc_get_features_xml): Use vector.
6 (tdesc_create_feature): Create feature.
7 * tdesc.h (tdesc_feature) Remove
8 (target_desc): Add features.
9
ea3e7d71
AH
102018-04-18 Alan Hayward <alan.hayward@arm.com>
11
12 * Makefile.in: Add common/tdesc.c
13 * tdesc.c (init_target_desc): init all reg_defs from register
14 vector.
15 (tdesc_create_reg): Create tdesc_reg.
16 * tdesc.h (tdesc_feature): Add register vector.
17
17d08cd4
SM
182018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * tdesc.h (struct target_desc) <features>: Change type to
21 std::vector<std::string>.
22 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
23 changes.
24 (tdesc_get_features_xml): Likewise.
25 (tdesc_create_feature): Likewise.
26
5cd3e386
AH
272018-03-26 Alan Hayward <alan.hayward@arm.com>
28
29 * regcache.c (find_register_by_number): Return a ref.
30 (find_regno): Use references.
31 (register_size): Likewise.
32 (register_data): Likewise.
33 * tdesc.c (target_desc::~target_desc): Remove free calls.
34 (target_desc::operator==): Use std::vector compare.
35 (init_target_desc): Use reference.
36 (tdesc_create_reg): Use reg constructors.
37 * tdesc.h (struct target_desc): Replace pointer with object.
38
dff7492c
AH
392018-03-23 Alan Hayward <alan.hayward@arm.com>
40
41 * regcache.c (find_register_by_number): Make static.
42 (find_regno): Use find_register_by_number
43 * regcache.h (struct reg): Remove declaration.
44
d80e5242
AH
452018-03-23 Alan Hayward <alan.hayward@arm.com>
46
47 * tdesc.c (target_desc::~target_desc): Move to here.
48 (target_desc::operator==): Likewise.
49 * tdesc.h (target_desc::~target_desc): Move from here.
50 (target_desc::operator==): Likewise.
51
f69c5afb
AA
522018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
53
54 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
55
ce29f843
AA
562018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
57
58 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
59 S390_TDESC_GS.
60 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
61 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
62 and init_registers_s390_gs_linux64.
63
c49bd90b
AA
642018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
65
66 * linux-s390-low.c (s390_fill_gs): Remove function.
67 (s390_fill_gsbc): Remove function.
68 (s390_regsets): Set fill functions for the guarded storage regsets
69 to NULL.
70
7edb9bd3
AA
712018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
72
73 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
74 the word size. Add comment.
75 (s390_get_wordsize): New function.
76 (s390_arch_setup): No longer select a temporary tdesc to fetch the
77 pswm with it. Instead, use s390_get_wordsize to determine the
78 word size first and derive the correct tdesc from that directly.
79
39be3c7e
SM
802018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
81
82 * Makefile.in: Include silent-rules.mk.
83 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
84 (COMPILE): Add ECHO_CXX.
85 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
86 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
87 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
88 (version-generated.c): Add ECHO_GEN.
89 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
90 (IPAGENT_COMPILE): Add ECHO_CXX.
91 (%-generated.c): Add ECHO_REGDAT.
92
3ae9ce5d
TT
932018-03-14 Tom Tromey <tom@tromey.com>
94
95 PR cli/14977:
96 * ax.c (ax_printf): Special case for NULL.
97
e6a58aa8
SM
982018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
99
100 * linux-low.c (linux_qxfer_libraries_svr4): Use
101 xml_escape_text_append.
102
f6e8a41e
SM
1032018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
104
105 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
106
b9671caf
SM
1072018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
108
109 * server.c (handle_general_set): Remove unnecessary xstrdup.
110
e80aaf61
SM
1112018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
112
113 * server.c (parse_debug_format_options): Adjust to
114 delim_string_to_char_ptr_vec changes.
115 * thread-db.c (thread_db_load_search): Adjust to
116 dirnames_to_char_ptr_vec changes.
117
b1223e78
MM
1182018-03-01 Markus Metzger <markus.t.metzger@intel.com>
119
120 * target.h (target_enable_btrace, target_disable_btrace)
121 (target_read_btrace, target_read_btrace_conf): Turn macro into
122 inline function. Throw error if target method is not defined.
123 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
124 check for btrace target method. Be prepared to handle exceptions
125 from btrace target methods.
126
81561546
SDJ
1272018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
128
129 * server.c (captured_main): Change order of error message printed
130 when the current working directory cannot be found.
131
25e3c82c
SDJ
1322018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
133
134 * server.c: Include "filenames.h" and "pathstuff.h".
135 (program_name): Delete variable.
136 (program_path): New anonymous class.
137 (get_exec_wrapper): Use "program_path" instead of
138 "program_name".
139 (handle_v_run): Likewise.
140 (captured_main): Likewise.
141 (process_serial_event): Likewise.
142
b4987c95
SDJ
1432018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
144
145 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
146 (OBJS): Add "pathstuff.o".
147 * server.c (current_directory): New global variable.
148 (captured_main): Initialize "current_directory".
149
f46cd62a
AH
1502018-02-26 Alan Hayward <alan.hayward@arm.com>
151
152 * tdesc.c: Use common/tdesc.h.
153 * tdesc.h: Likewise.
154
a543c5ca
AH
1552018-02-20 Alan Hayward <alan.hayward@arm.com>
156 Simon Marchi <simon.marchi@ericsson.com>
157
158 * Makefile.in: Switch order of make rules.
159
b5884fa7
AH
1602018-02-19 Alan Hayward <alan.hayward@arm.com>
161
162 * Makefile.in: Add common directory in build.
163 * configure.ac: Add common reference.
164 * configure: Regenerate.
165
de6242d3
MM
1662018-02-09 Markus Metzger <markus.t.metzger@intel.com>
167
168 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
169 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
170 * spu-low.c (spu_target_ops): Likewise.
171 * win32-low.c (win32_target_ops): Likewise.
172 * server.c (supported_btrace_packets): Report packets unconditionally.
173 * target.h (target_ops) <supports_btrace>: Remove.
174 (target_supports_btrace): Remove.
175
9ee23a85
MM
1762018-02-09 Markus Metzger <markus.t.metzger@intel.com>
177
178 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
179 (handle_btrace_disable): Change return type to void. Use exceptions
180 to report errors.
181 (handle_btrace_general_set): Catch exception and copy message to
182 return message.
183
8ce47547
TT
1842018-02-08 Tom Tromey <tom@tromey.com>
185
186 * linux-low.c (install_software_single_step_breakpoints): Use
187 make_scoped_restore.
188 * inferiors.c (make_cleanup_restore_current_thread): Remove.
189 (do_restore_current_thread_cleanup): Remove.
190 * gdbthread.h (make_cleanup_restore_current_thread): Don't
191 declare.
192
45dd3607
TT
1932018-02-08 Tom Tromey <tom@tromey.com>
194
195 * mem-break.c (set_raw_breakpoint_at): Use
196 gdb::unique_xmalloc_ptr.
197
e671cd59
PA
1982018-01-30 Pedro Alves <palves@redhat.com>
199
200 PR gdb/13211
201 * target.c (target_terminal::terminal_state): Rename to ...
202 (target_terminal::m_terminal_state): ... this.
203
a0aad537
JC
2042018-01-19 James Clarke <jrtc27@jrtc27.com>
205
206 * linux-low.c (handle_extended_wait): Surround call to
207 thread_db_notice_clone with #ifdef USE_THREAD_DB.
208
4d9b86e1
SM
2092018-01-17 Simon Marchi <simon.marchi@ericsson.com>
210
211 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
212 linux_ptrace_attach_fail_reason_string now returning an
213 std::string.
214 (linux_attach): Likewise.
215 * thread-db.c (attach_thread): Likewise.
216
f517c180
EA
2172018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
218
219 PR gdb/21559
220 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
221 checking for fs_base/gs_base fields in struct user_regs_struct.
222 * configure: Regenerate.
223
9a70f35c
YQ
2242018-01-16 Yao Qi <yao.qi@linaro.org>
225
226 PR gdb/18749
227 * linux-low.c (fetch_register): Call supply_register instead of
228 error.
229
605fd3c6
YQ
2302018-01-08 Yao Qi <yao.qi@linaro.org>
231 Simon Marchi <simon.marchi@ericsson.com>
232
233 * Makefile.in (OBS): Remove selftest.o.
234 * configure.ac: Set srv_selftest_objs if $development is true.
235 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
236 * configure: Re-generated.
237 * server.c (captured_main): Wrap variable selftest_filter with
238 GDB_SELF_TEST.
239
2cc05030
SM
2402018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
241
242 * server.c (parse_debug_format_options): Return std::string.
243 (handle_monitor_command, captured_main): Adjust.
244
e379cee6
PA
2452018-01-05 Pedro Alves <palves@redhat.com>
246
247 PR gdb/18653
248 * server.c (captured_main): Pass quiet=false to
249 save_original_signals_state.
250
82e1e79a
JB
2512018-01-01 Joel Brobecker <brobecker@adacore.com>
252
253 * gdbreplay.c (gdbreplay_version): Update copyright year in
254 version message.
255 * server.c (gdbserver_version): Likewise.
256
8e481c3b
TT
2572017-12-08 Tom Tromey <tom@tromey.com>
258
259 * ax.c (ax_printf): Update.
260
a8806230
YQ
2612017-12-07 Yao Qi <yao.qi@linaro.org>
262
263 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
264 aarch64_linux_read_description.
265 * linux-amd64-ipa.c (idx2mask): New array.
266 (get_ipa_tdesc): Move idx2mask out.
267 (initialize_low_tracepoint): Initialize target descriptions.
268 * linux-i386-ipa.c (idx2mask): New array.
269 (get_ipa_tdesc): Move idx2mask out.
270 (initialize_low_tracepoint): Initialize target descriptions.
271
d4a0e8b5
SM
2722017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * tdesc.c (struct tdesc_type): Change return type.
275 (tdesc_add_flag): Change parameter type.
276 (tdesc_add_bitfield): Likewise.
277 (tdesc_add_field): Likewise.
278 (tdesc_set_struct_size): Likewise.
279
798a7429
SM
2802017-12-05 Simon Marchi <simon.marchi@ericsson.com>
281
282 * regcache.c (registers_to_string): Remove unused variable.
283
c0e15c9b
SM
2842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
285
286 * inferiors.c (for_each_inferior_with_data): Remove.
287 * inferiors.h (for_each_inferior_with_data): Remove.
288 * server.c (handle_qxfer_threads_worker): Change parameter type.
289 (handle_qxfer_threads_proper): Use for_each_thread.
290
f0045347
SM
2912017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
292
293 * inferiors.c (for_each_inferior): Remove.
294 (clear_inferiors): Use for_each_thread.
295 * inferiors.h (for_each_inferior): Remove.
296 * linux-low.c (linux_wait_for_event_filtered): Use
297 for_each_thread.
298 (linux_stabilize_threads): Likewise.
299 * regcache.c (regcache_release): Likewise.
300 * server.c (gdb_wants_all_threads_stopped): Likewise.
301 (clear_pending_status_callback): Remove.
302 (handle_status): Use for_each_thread.
303 (captured_main): Likewise.
304 * win32-low.c (child_init_thread_list): Likewise.
305 (win32_clear_inferiors): Likewise.
306 (fake_breakpoint_event): Likewise.
307
9521758b
SM
3082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
309
310 * inferiors.h (find_inferior): Remove.
311 * inferiors.c (find_inferior): Remove.
312
8f86d7aa
SM
3132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
314
315 * linux-low.c (resume_status_pending_p): Update comment.
316 (need_step_over_p): Update comment.
317
e2b44075
SM
3182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
319
320 * linux-low.c (proceed_one_lwp): Return void, change parameter
321 type.
322 (unsuspend_and_proceed_one_lwp): Likewise.
323 (proceed_all_lwps): Use for_each_thread.
324 (unstop_all_lwps): Likewise.
325
c80825ff
SM
3262017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
327
328 * linux-low.c (linux_resume_one_thread): Return void, take
329 parameter directly.
330 (linux_resume): Use for_each_thread.
331
df3e4dbe
SM
3322017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
333
334 * linux-low.c (send_sigstop_callback): Return void, change
335 parameter type. Rename to...
336 (send_sigstop): ... this.
337 (suspend_and_send_sigstop_callback): Return void, change parameter
338 type. Rename to...
339 (suspend_and_send_sigstop): ... this.
340 (stop_all_lwps): Use for_each_thread.
341
5a6b0a41
SM
3422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
343
344 * linux-low.c (lwp_running): Return bool, remove unused
345 argument.
346 (linux_stabilize_threads): Use find_thread.
347
39a64da5
SM
3482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
349
350 * linux-low.c (select_singlestep_lwp_callback): Remove.
351 (count_events_callback): Remove.
352 (select_event_lwp_callback): Remove.
353 (select_event_lwp): Use find_thread/for_each_thread.
354
a1385b7b
SM
3552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
356
357 * linux-low.c (not_stopped_callback): Return bool, take filter
358 argument directly.
359 (linux_wait_for_event_filtered): Use find_thread.
360 (linux_wait_1): Likewise.
361
454296a2
SM
3622017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
363
364 * linux-low.c (same_lwp): Remove.
365 (find_lwp_pid): Use find_thread.
366
6b2a85da
SM
3672017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
368
369 * linux-low.c (delete_lwp_callback): Remove.
370 (linux_mourn): Use for_each_thread.
371
798a38e8
SM
3722017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
373
374 * linux-low.c (linux_detach_lwp_callback): Return void, remove
375 args parameter, don't check for pid.
376 (linux_detach): Use for_each_thread.
377
e4eb0dec
SM
3782017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
379
380 * linux-low.c (struct counter): Remove.
381 (second_thread_of_pid_p): Remove.
382 (last_thread_of_process_p): Use find_thread.
383
83e1b6c1
SM
3842017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
385
386 * inferiors.c (find_inferior_in_random): Remove.
387 * inferiors.h (find_inferior_in_random): Remove.
388 * linux-low.c (status_pending_p_callback): Return bool, accept
389 parameter ptid directly.
390 (linux_wait_for_event_filtered): Use find_thread_in_random.
391 (linux_wait_1): Likewise.
392
8dc7b443
SM
3932017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * inferiors.c (find_inferior_id): Remove.
396 (find_thread_ptid): Move implemention from find_inferior_id to
397 here.
398 * inferiors.h (find_inferior_id): Remove.
399 * server.c (handle_status): Use find_thread_ptid.
400 (process_serial_event): Likewise.
401 * thread-db.c (find_one_thread): Likewise.
402 (thread_db_thread_handle): Likewise.
403 * win32-low.c (thread_rec): Likewise.
404 (child_delete_thread): Likewise.
405 (win32_thread_alive): Likewise.
406 (get_child_debug_event): Likewise.
407
da25033c
SM
4082017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
409
410 * linux-mips-low.c (update_watch_registers_callback): Return
411 void, remove pid_p parameter, don't check for pid.
412 (mips_insert_point, mips_remove_point): Use for_each_thread.
413
c91bb56b
SM
4142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
415
416 * lynx.low (lynx_delete_thread_callback): Remove.
417 (lynx_mourn): Use for_each_thread.
418
634a3254
SM
4192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
420
421 * regcache.c (regcache_invalidate_one): Remove.
422 (regcache_invalidate_pid): use for_each_thread.
423
41272101
TT
4242017-11-26 Tom Tromey <tom@tromey.com>
425
426 * linux-low.c (linux_create_inferior): Update.
427
f5291a6f
UW
4282017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
429
430 * spu-low.c (spu_create_inferior): Fix typo in argument name.
431
6654d750
AH
4322017-11-24 Alan Hayward <alan.hayward@arm.com>
433
434 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
435 * linux-aarch64-low.c (initialize_low_arch): Call init func.
436 * linux-aarch64-tdesc-selftest.c: New file.
437 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
438
4392017-11-24 Alan Hayward <alan.hayward@arm.com>
440
441 * configure.srv: Add new file.
442 * linux-aarch64-low.c (initialize_low_arch): Call init func.
443 * linux-aarch64-tdesc-selftest.c: New file.
444 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
445
49bdb7ee
AH
4462017-11-24 Alan Hayward <alan.hayward@arm.com>
447
448 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
449 * linux-aarch64-low.c (initialize_low_arch): Remove init.
450 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
451
d6d7ce56
AH
4522017-11-24 Alan Hayward <alan.hayward@arm.com>
453
454 * configure.srv: Add new files.
455 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
456 aarch64_linux_read_description.
457 * linux-aarch64-low.c (aarch64_linux_read_description):
458 Merge with aarch64_arch_setup.
459 (aarch64_arch_setup): Call aarch64_linux_read_description.
460 * linux-aarch64-tdesc.c: New file.
461 * linux-aarch64-tdesc.h: New file.
462
506fe5f4
YQ
4632017-11-24 Yao Qi <yao.qi@linaro.org>
464
465 * configure.srv: Set $srv_regobj for tic6x-linux.
466 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
467 (tic6x_read_description): Move some code to tic6x_arch_setup.
468 (tic6x_tdesc_test): New function.
469 (initialize_low_arch): Call selftests::register_test.
470
29f9a567
YQ
4712017-11-22 Yao Qi <yao.qi@linaro.org>
472
473 * remote-utils.c (prepare_resume_reply): Use memcpy.
474
578290ec
SM
4752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
476
477 * linux-low.c (kill_one_lwp_callback): Return void, take
478 argument directly, don't filter on pid.
479 (linux_kill): Use for_each_thread.
480
eca55aec
SM
4812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
482
483 * linux-low.c (need_step_over_p): Return bool, remove dummy
484 argument.
485 (linux_resume, proceed_all_lwps): Use find_thread.
486
25c28b4d
SM
4872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
488
489 * linux-low.c (resume_status_pending_p): Return bool, remove
490 flag_p argument.
491 (linux_resume): Use find_thread.
492
5fdda392
SM
4932017-11-19 Simon Marchi <simon.marchi@ericsson.com>
494
495 * linux-low.c (struct thread_resume_array): Remove.
496 (linux_set_resume_request): Return void, take arguments
497 directly.
498 (linux_resume): Use for_each_thread.
499
fcb056a5
SM
5002017-11-19 Simon Marchi <simon.marchi@ericsson.com>
501
502 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
503 return bool, remove data argument.
504 (linux_stabilize_threads): Use find_thread.
505
139720c5
SM
5062017-11-19 Simon Marchi <simon.marchi@ericsson.com>
507
508 * linux-low.c (unsuspend_one_lwp): Remove.
509 (unsuspend_all_lwps): Use for_each_thread, inline code from
510 unsuspend_one_lwp.
511
6d1e5673
SM
5122017-11-19 Simon Marchi <simon.marchi@ericsson.com>
513
514 * gdbthread.h (find_thread): Add overload with ptid_t filter.
515 * linux-low.c (struct iterate_over_lwps_args): Remove.
516 (iterate_over_lwps_filter): Remove.
517 (iterate_over_lwps): Use find_thread.
518
bbf550d5
SM
5192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
520
521 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
522 (linux_handle_new_gdb_connection): Use for_each_thread, inline
523 code from reset_lwp_ptrace_options_callback.
524
00192f77
SM
5252017-11-19 Simon Marchi <simon.marchi@ericsson.com>
526
527 * linux-arm-low.c (struct update_registers_data): Remove.
528 (update_registers_callback): Return void, take arguments
529 directly, don't check thread's pid.
530 (arm_insert_point, arm_remove_point): Use for_each_thread.
531
2bee2b6c
SM
5322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
533
534 * win32-low.c (continue_one_thread): Return void, take argument
535 directly.
536 (child_continue): Use for_each_thread.
537
0b360f19
SM
5382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
539
540 * win32-i386-low.c (update_debug_registers_callback): Rename
541 to ...
542 (update_debug_registers): ... this, return void, remove pid_p arg.
543 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
544
f27866ba
SM
5452017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
546
547 * inferiors.h (struct process_info): Add constructor, initialize
548 fields..
549 <syscalls_to_catch>: Change type to std::vector<int>.
550 * inferiors.c (add_process): Allocate process_info with new.
551 (remove_process): Free process_info with delete.
552 * linux-low.c (handle_extended_wait): Adjust.
553 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
554 * server.c (handle_general_set): Adjust.
555
e849ea89
PA
5562017-11-16 Pedro Alves <palves@redhat.com>
557
558 * remote-utils.c (remote_close): Block SIGIO signals instead of
559 uninstalling the SIGIO handler.
560
1d0aa65c
AH
5612017-11-16 Alan Hayward <alan.hayward@arm.com>
562
563 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
564
3491a34c
YQ
5652017-11-16 Yao Qi <yao.qi@linaro.org>
566
567 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
568 (tic6x_store_gregset): Likewise.
569 (tic6x_usrregs_info): Move it up.
570
a602f924
AH
5712017-11-15 Alan Hayward <alan.hayward@arm.com>
572
573 * Makefile.in: Update arch rules.
574 * configure.srv: Explicitly mark arch/ files.
575
5616b6c3
AS
5762017-11-13 Andreas Schwab <schwab@suse.de>
577
578 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
579 function.
580 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
581
d1928160
PA
5822017-11-06 Pedro Alves <palves@redhat.com>
583
584 * config.in, configure: Regenerate.
585
bac608e7
SM
5862017-10-27 Simon Marchi <simon.marchi@ericsson.com>
587
588 * target.c (struct thread_search): Remove.
589 (thread_search_callback): Remove.
590 (prepare_to_access_memory): Use for_each_thread instead of
591 find_inferior. Inline code from thread_search_callback.
592
eaddb425
SM
5932017-10-27 Simon Marchi <simon.marchi@ericsson.com>
594
595 * server.c (struct visit_actioned_threads_data): Remove.
596 (visit_actioned_threads): Change prototype to take arguments
597 directly.
598 (resume): Use find_thread instead of find_inferior.
599
99078d34
SM
6002017-10-27 Simon Marchi <simon.marchi@ericsson.com>
601
602 * server.c (queue_stop_reply_callback): Change prototype, return
603 void.
604 (find_status_pending_thread_callback): Remove.
605 (handle_status): Replace find_inferior with find_thread and
606 for_each_thread.
607
cc628f3d
AH
6082017-10-25 Alan Hayward <alan.hayward@arm.com>
609
610 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
611 with REGNO.
612 (aarch64_store_gregset): Likewise.
613 (aarch64_fill_fpregset): Likewise.
614 (aarch64_store_fpregset): Likewise.
615
4d3bb80e
SM
6162017-10-21 Simon Marchi <simon.marchi@ericsson.com>
617
618 * gdbthread.h (find_thread, for_each_thread): New functions.
619 * inferiors.c (thread_of_pid): Remove.
620 (find_any_thread_of_pid): Use find_thread.
621 * linux-low.c (num_lwps): Use for_each_thread.
622
7a7cdfa0
YQ
6232017-10-17 Yao Qi <yao.qi@linaro.org>
624
625 * Makefile.in: Remove one rule.
626 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
627
e675d170
YQ
6282017-10-17 Yao Qi <yao.qi@linaro.org>
629
630 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
631 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
632
7eb4e0f9
YQ
6332017-10-17 Yao Qi <yao.qi@linaro.org>
634
635 * configure.srv: Rename arm.o with arch/arm.o.
636
60d6cfc9
YQ
6372017-10-17 Yao Qi <yao.qi@linaro.org>
638
639 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
640 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
641 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
642 (arch-i386.o, arch-amd64.o): Remove rules.
643 (arch/%.o): New rule.
644 Update POSTCOMPILE and COMPILE.pre.
645 * configure.ac: Invoke AC_CONFIG_COMMANDS.
646 * configure: Re-generated.
647 * configure.srv: Replace arch-i386.o with arch/i386.o.
648 Replace arch-amd64.o with arch/amd64.o.
649
5bfda255
YQ
6502017-10-16 Yao Qi <yao.qi@linaro.org>
651
652 * configure: Regenerated.
653
9c80ecd6
SM
6542017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
655
656 * inferiors.h: (struct inferior_list): Remove.
657 (struct inferior_list_entry); Remove.
658 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
659 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
660 get_first_inferior): Remove.
661 (for_each_inferior, for_each_inferior_with_data, find_inferior,
662 find_inferior_id, find_inferior_in_random): Change signature.
663 * inferiors.c (all_threads): Change type to
664 std::list<thread_info *>.
665 (get_thread): Remove macro.
666 (find_inferior, find_inferior_id): Change signature, implement
667 using find_thread.
668 (find_inferior_in_random): Change signature, implement using
669 find_thread_in_random.
670 (for_each_inferior, for_each_inferior_with_data): Change
671 signature, implement using for_each_thread.
672 (add_inferior_to_list, remove_inferior): Remove.
673 (add_thread, get_first_thread, thread_of_pid,
674 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
675 (get_first_inferior, one_inferior_p, clear_inferior_list):
676 Remove.
677 (clear_inferiors, get_thread_process): Update.
678 * gdbthread.h: Include <list>.
679 (struct thread_info) <entry>: Remove field.
680 <id>: New field.
681 (all_threads): Change type to std::list<thread_info *>.
682 (get_first_inferior): Add doc.
683 (find_thread, for_each_thread, find_thread_in_random): New
684 functions.
685 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
686 * linux-arm-low.c (update_registers_callback): Update.
687 * linux-low.c (second_thread_of_pid_p): Update.
688 (kill_one_lwp_callback, linux_detach_lwp_callback,
689 delete_lwp_callback, status_pending_p_callback, same_lwp,
690 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
691 iterate_over_lwps, not_stopped_callback,
692 resume_stopped_resumed_lwps, count_events_callback,
693 select_singlestep_lwp_callback, select_event_lwp_callback,
694 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
695 suspend_and_send_sigstop_callback, wait_for_sigstop,
696 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
697 lwp_running, linux_set_resume_request, resume_status_pending_p,
698 need_step_over_p, start_step_over, linux_resume_one_thread,
699 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
700 reset_lwp_ptrace_options_callback): Update.
701 * linux-mips-low.c (update_watch_registers_callback): Update.
702 * regcache.c (regcache_invalidate_one, regcache_invalidate):
703 Update.
704 (free_register_cache_thread_one): Remove.
705 (regcache_release): Update.
706 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
707 handle_qxfer_threads_worker): Update.
708 (handle_query): Update, use list iterator.
709 (visit_actioned_threads, handle_pending_status,
710 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
711 clear_pending_status_callback, set_pending_status_callback,
712 find_status_pending_thread_callback, handle_status,
713 process_serial_event): Update.
714 * target.c (thread_search_callback): Update.
715 * thread-db.c (thread_db_get_tls_address): Update.
716 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
717 Update.
718 * win32-i386-low.c (update_debug_registers_callback): Update.
719 * win32-low.c (delete_thread_info, child_delete_thread,
720 continue_one_thread, suspend_one_thread,
721 get_child_debug_event): Adjust.
722
9179355e
SM
7232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
724
725 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
726 * inferiors.h: Include <list>.
727 (struct process_info) <entry>: Remove field.
728 <pid>: New field.
729 (pid_of): Change macro to function.
730 (ptid_of, lwpid_of): Remove macro.
731 (all_processes): Change type to std::list<process_info *>.
732 (ALL_PROCESSES): Remove macro.
733 (for_each_process, find_process): New function.
734 * inferiors.c (all_processes): Change type to
735 std::list<process_info *>.
736 (find_thread_process): Adjust.
737 (add_process): Likewise.
738 (remove_process): Likewise.
739 (find_process_pid): Likewise.
740 (get_first_process): Likewise.
741 (started_inferior_callback): Remove.
742 (have_started_inferiors_p): Adjust.
743 (attached_inferior_callback): Remove.
744 (have_attached_inferiors_p): Adjust.
745 * linux-low.c (check_zombie_leaders): Likewise.
746 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
747 (x86_linux_update_xmltarget): Adjust.
748 * server.c (handle_query): Likewise.
749 (gdb_reattached_process): Remove.
750 (handle_status): Adjust.
751 (kill_inferior_callback): Likewise.
752 (detach_or_kill_inferior): Remove.
753 (print_started_pid): Likewise.
754 (print_attached_pid): Likewise.
755 (detach_or_kill_for_exit): Update.
756 (process_serial_event): Likewise.
757 * linux-arm-low.c (arm_new_fork): Likewise.
758
c9cb8905
SM
7592017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
760
761 * dll.h: Include <list>.
762 (struct dll_info): Add constructor.
763 <entry>: Remove field.
764 (all_dlls): Change type to std::list<dll_info>.
765 * dll.c: Include <algorithm>.
766 (get_dll): Remove macro.
767 (all_dlls): Change type to std::list<dll_info *>.
768 (free_one_dll): Remove.
769 (match_dll): Likewise.
770 (loaded_dll): Adjust.
771 (unloaded_dll): Adjust to all_dlls type change, use
772 std::find_if. Inline code from match_dll.
773 (clear_dlls): Adjust to all_dlls type change.
774 * server.c (emit_dll_description): Remove.
775 (handle_qxfer_libraries): Adjust to all_dlls type change,
776 integrate emit_dll_description's functionality.
777
04ec7890
SM
7782017-10-12 Simon Marchi <simon.marchi@ericsson.com>
779
780 * linux-low.h (struct linux_target_ops) <delete_process>: New
781 field.
782 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
783 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
784 (struct linux_target_ops): Add delete_process callback.
785 * linux-arm-low.c (arm_delete_process): New.
786 (struct linux_target_ops): Add delete_process callback.
787 * linux-bfin-low.c (struct linux_target_ops): Likewise.
788 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
789 * linux-m32r-low.c (struct linux_target_ops): Likewise.
790 * linux-mips-low.c (mips_linux_delete_process): New.
791 (struct linux_target_ops): Add delete_process callback.
792 * linux-ppc-low.c (struct linux_target_ops): Likewise.
793 * linux-s390-low.c (struct linux_target_ops): Likewise.
794 * linux-sh-low.c (struct linux_target_ops): Likewise.
795 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
796 * linux-tile-low.c (struct linux_target_ops): Likewise.
797 * linux-x86-low.c (x86_linux_delete_process): New.
798 (struct linux_target_ops): Add delete_process callback.
799 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
800
466eecee
SM
8012017-10-12 Simon Marchi <simon.marchi@ericsson.com>
802
803 * linux-aarch64-low.c (the_low_target): Add thread delete
804 callback.
805 * linux-arm-low.c (arm_delete_thread): New function.
806 (the_low_target): Add thread delete callback.
807 * linux-bfin-low.c (the_low_target): Likewise.
808 * linux-crisv32-low.c (the_low_target): Likewise.
809 * linux-low.c (delete_lwp): Invoke delete_thread callback if
810 set.
811 * linux-low.h (struct linux_target_ops) <delete_thread>: New
812 field.
813 * linux-m32r-low.c (the_low_target): Add thread delete callback.
814 * linux-mips-low.c (mips_linux_delete_thread): New function.
815 (the_low_target): Add thread delete callback.
816 * linux-ppc-low.c (the_low_target): Likewise.
817 * linux-s390-low.c (the_low_target): Likewise.
818 * linux-sh-low.c (the_low_target): Likewise.
819 * linux-tic6x-low.c (the_low_target): Likewise.
820 * linux-tile-low.c (the_low_target): Likewise.
821 * linux-x86-low.c (the_low_target): Likewise.
822 * linux-xtensa-low.c (the_low_target): Likewise.
823
b79f7801
YZ
8242017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
825
826 * win32-low.c: Include "common-inferior.h".
827
bc3b087d
SDJ
8282017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
829
830 * inferiors.c (set_inferior_cwd): New function.
831 * server.c (handle_general_set): Handle QSetWorkingDir packet.
832 (handle_query): Inform that QSetWorkingDir is supported.
833 * win32-low.c (create_process): Pass the inferior's cwd to
834 CreateProcess.
835
d092c5a2
SDJ
8362017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
837
838 * inferiors.c (current_inferior_cwd): New global variable.
839 (get_inferior_cwd): New function.
840 * inferiors.h (struct process_info) <cwd>: New field.
841
7da0a886
SDJ
8422017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
843
844 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
845 (OBS): Add gdb_tilde_expand.o.
846
289a6840
SM
8472017-10-02 Simon Marchi <simon.marchi@ericsson.com>
848
849 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
850 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
851
256642e8
PA
8522017-09-29 Pedro Alves <palves@redhat.com>
853
854 * ax.c (gdb_parse_agent_expr): Constify.
855 * ax.h (gdb_parse_agent_expr): Constify.
856 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
857 Constify.
858 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
859 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
860 * remote-utils.h (read_ptid): Constify.
861 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
862 (process_point_options, process_serial_event): Constify.
863 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
864 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
865 (cmd_qtbuffer): Constify.
866
5b9ca4d4
PA
8672017-09-29 Pedro Alves <palves@redhat.com>
868
869 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
870 fails.
871
94c207e0
PA
8722017-09-29 Pedro Alves <palves@redhat.com>
873
874 * linux-low.c (handle_extended_wait): Pass parent thread instead
875 of process to thread_db_notice_clone.
876 * linux-low.h (thread_db_notice_clone): Replace parent process
877 parameter with parent thread parameter.
878 * thread-db.c (find_one_thread): Add comment.
879 (thread_db_notice_clone): Replace parent process parameter with
880 parent thread parameter. Temporarily switch to the parent thread.
881
75352e28
SDJ
8822017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
883
884 * gdbthread.h: Include "common-gdbthread.h".
885 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
886 "if" when validating the ptid.
887 * remote-utils.c: Include "gdbthread.h".
888 (prepare_resume_reply): Use "switch_to_thread".
889 * target.c (done_accessing_memory): Likewise.
890
ad339634
AA
8912017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
892
893 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
894 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
895 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
896 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
897 s390x-gs-linux64-ipa.o to ipa_obj.
898 * linux-s390-low.c (HWCAP_S390_GS): New define.
899 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
900 New functions.
901 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
902 (s390_arch_setup): Check for guarded-storage support and choose
903 appropriate tdesc.
904 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
905 init_registers_s390x_gs_linux64.
906 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
907 enum value.
908 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
909 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
910
cc4d742f
SM
9112017-09-22 Simon Marchi <simon.marchi@ericsson.com>
912
913 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
914
f6327dcb
KB
9152017-09-21 Kevin Buettner <kevinb@redhat.com>
916
917 * linux-low.h (struct lwp_info): Add new field, thread_handle.
918 (thread_db_thread_handle): Declare.
919 * linux-low.c (linux_target_ops): Initialize thread_handle.
920 * server.c (handle_qxfer_threads_worker): Add support for
921 "handle" attribute.
922 * target.h (struct target_ops): Add new function pointer,
923 thread_handle.
924 (target_thread_handle): Define.
925 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
926 field in lwp.
927 (thread_db_thread_handle): New function.
928
86299109
KB
9292017-09-21 Kevin Buettner <kevinb@redhat.com>
930
931 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
932 * linux-low.h (thread_db_notice_clone): Declare.
933 * thread-db.c (thread_db_notice_clone): New function.
934
f557a88a
PA
9352017-09-21 Pedro Alves <palves@redhat.com>
936
937 * server.c (gdb_read_memory, handle_status, process_serial_event)
938 (handle_serial_event, handle_target_event): Adjust to
939 set_desired_thread prototype change.
940 * target.c (set_desired_thread): Remove 'use_general' parameter
941 and adjust.
942 * target.h (set_desired_thread): Remove 'use_general' parameter.
943
223ffa71
TT
9442017-09-20 Tom Tromey <tom@tromey.com>
945
946 * target.c (target_terminal::terminal_state): Define.
947 (target_terminal::init): Rename from target_terminal_init.
948 (target_terminal::inferior): Rename from
949 target_terminal_inferior.
950 (target_terminal::ours): Rename from target_terminal_ours.
951 (target_terminal::ours_for_output, target_terminal::info): New.
952
04fd3ba9
SM
9532017-09-16 Simon Marchi <simon.marchi@ericsson.com>
954
955 * server.c (accumulate_file_name_length): Remove.
956 (emit_dll_description): Adjust to std::string change.
957 (handle_qxfer_libraries): Use std::string to hold document.
958
5e187554
SM
9592017-09-16 Simon Marchi <simon.marchi@ericsson.com>
960
961 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
962 return type of xml_escape_text.
963 * server.c (emit_dll_description): Likewise.
964
1526853e
SM
9652017-09-16 Simon Marchi <simon.marchi@ericsson.com>
966
967 * server.c (captured_main): Accept argument for --selftest.
968 Update run_tests call.
969 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
970 when registering selftests.
971
c4dfafab
SDJ
9722017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
973
974 * regcache.c (get_thread_regcache): Update code to use "std::vector"
975 instead of "VEC" for "target_desc.reg_defs".
976 (regcache_cpy): Likewise.
977 (registers_to_string): Likewise.
978 (registers_from_string): Likewise.
979 (find_regno): Likewise.
980 (supply_regblock): Likewise.
981 (regcache_raw_read_unsigned): Likewise.
982 * tdesc.c (init_target_desc): Likewise.
983 (tdesc_create_reg): Likewise.
984 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
985 (struct target_desc) <reg_defs>: Convert to "std::vector".
986 (target_desc): Do not initialize "reg_defs".
987 (~target_desc): Update code to use "std::vector" instead of "VEC"
988 for "target_desc.reg_defs".
989 (operator==): Likewise.
990
124aceb4
SM
9912017-09-15 Simon Marchi <simon.marchi@ericsson.com>
992
993 * inferiors.h (thread_to_gdb_id): Remove.
994 * inferiors.c (thread_to_gdb_id): Remove.
995 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
996 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
997 lynx_store_registers, lynx_read_memory, lynx_write_memory):
998 Likewise.
999 * nto-low.c (nto_fetch_registers, nto_store_registers,
1000 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1001
96cde54f
SM
10022017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1003
1004 * inferiors.h (gdb_id_to_thread_id): Remove.
1005 * inferiors.c (gdb_id_to_thread_id): Remove.
1006 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1007 removal. Move pid declaration closer to where it's used.
1008
e8ca139e
SM
10092017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1010
1011 * server.c (handle_detach): New function.
1012 (process_serial_event): Move code out, call handle_detach.
1013
f8a4e119
SM
10142017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1015
1016 * server.c (require_running): Rename to ...
1017 (require_running_or_return): ... this ...
1018 (require_running_or_break): ... and this.
1019 (handle_query, process_serial_event): Adjust.
1020
0eb0a407
SM
10212017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1022
1023 * linux-low.c (linux_set_resume_request): Remove unused
1024 variables.
1025
785922a5
SM
10262017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1027
1028 * server.c (first_thread_of): Remove.
1029 (process_serial_event): Replace usage of first_thread_of with
1030 find_any_thread_of_pid.
1031 * tracepoint.c (same_process_p): Remove.
1032 (gdb_agent_about_to_close): Replace usage of same_process_p with
1033 find_any_thread_of_pid.
1034 * linux-x86-low.c (same_process_callback): Remove.
1035 (x86_arch_setup_process_callback): Replace usage of
1036 same_process_callback with find_any_thread_of_pid.
1037 * thread-db.c (any_thread_of): Remove.
1038 (switch_to_process): Replace usage of any_thread_of with
1039 find_any_thread_of_pid.
1040 * inferiors.c (thread_pid_matches_callback): Remove.
1041 (find_thread_process): Adjust to use find_any_thread_of_pid.
1042
a059f00c
SDJ
10432017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1044
1045 * regcache.c (get_thread_regcache): Guard calls to "memset"
1046 with "!VEC_empty".
1047
cc397f3a
SDJ
10482017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1049
1050 * linux-low.c (handle_extended_wait): Use
1051 "allocate_target_description" instead of "XNEW".
1052 * linux-x86-low.c (initialize_low_arch): Likewise.
1053
22916b07
YQ
10542017-09-05 Yao Qi <yao.qi@linaro.org>
1055
1056 * configure.srv (srv_i386_regobj): Remove.
1057 (srv_amd64_regobj): Remove.
1058 (srv_regobj): Set it to "" for x86 non-linux targets.
1059 * linux-x86-tdesc.c (i386_linux_read_description):
1060 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1061 (init_registers_i386): Remove the declaration.
1062 (tdesc_i386): Remove the declaration.
1063 (lynx_i386_arch_setup): Call i386_create_target_description.
1064 * nto-x86-low.c: Likewise.
1065 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1066 [!__x86_64__]: include arch/i386.h.
1067 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1068
38602d55
YQ
10692017-09-05 Yao Qi <yao.qi@linaro.org>
1070
1071 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1072 i386/amd64-XXX-linux from it.
1073
44b886ff
YQ
10742017-09-05 Yao Qi <yao.qi@linaro.org>
1075
1076 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1077 false.
1078 (ipa_amd64_linux_regobj): Remove.
1079 (ipa_x32_linux_regobj): Remove.
1080
b4570e4b
YQ
10812017-09-05 Yao Qi <yao.qi@linaro.org>
1082
1083 * Makefile.in (arch-amd64.o): New rule.
1084 * configure.srv: Append arch-amd64.o.
1085 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1086 (get_ipa_tdesc): Call amd64_linux_read_description.
1087 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1088 and init_registers_amd64_XXX.
1089 * linux-x86-low.c (x86_linux_read_description): Call
1090 amd64_linux_read_description.
1091 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1092 (initialize_low_arch): Don't call init_registers_x32_XXX and
1093 init_registers_amd64_XXX.
1094 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1095 and tdesc_amd64_XXX.
1096 [__x86_64__] (amd64_tdesc_test): New function.
1097 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1098 and init_registers_amd64_XXX.
1099 * linux-x86-tdesc.c: Include arch/amd64.h.
1100 (xcr0_to_tdesc_idx): New function.
1101 (i386_linux_read_description): New function.
1102 (amd64_get_ipa_tdesc_idx): New function.
1103 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1104 (amd64_get_ipa_tdesc): Declare.
1105
d1f28ea2
YQ
11062017-09-05 Yao Qi <yao.qi@linaro.org>
1107
1108 * configure.srv (srv_i386_linux_xmlfiles): Remove
1109 i386/i386-XXX-linux.xml from it.
1110
25a93583
YQ
11112017-09-05 Yao Qi <yao.qi@linaro.org>
1112
1113 * configure.srv: Set srv_i386_linux_regobj empty if $development
1114 is false.
1115 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1116 initialize_low_tdesc.
1117 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1118 with #if initialize_low_tdesc.
1119 * linux-x86-tdesc-selftest.c: New file.
1120 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1121
5f035c07
YQ
11222017-09-05 Yao Qi <yao.qi@linaro.org>
1123
1124 * Makefile.in (arch-i386.o): New rule.
1125 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1126 (x86_64-*-linux*): Likewise.
1127 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1128 include arch/i386.h.
1129 (i386_linux_read_description): Remove code and call
1130 i386_create_target_description.
1131 * tdesc.c (allocate_target_description): New function.
1132 * tdesc.h (set_tdesc_architecture): Remove declaration.
1133 (set_tdesc_osabi): Likewise.
1134
0abe8a89
YQ
11352017-09-05 Yao Qi <yao.qi@linaro.org>
1136
1137 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1138 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1139 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1140 .xmltarget.
1141 * server.c (get_features_xml): Call tdesc_get_features_xml.
1142 * tdesc.c (set_tdesc_architecture): New function.
1143 (set_tdesc_osabi): New function.
1144 (tdesc_get_features_xml): New function.
1145 (tdesc_create_feature): Add an argument.
1146 * tdesc.h (struct target_desc) <features>: New field.
1147 <arch, osabi>: New field.
1148 (~target_desc): xfree features, arch, and osabi.
1149 (target_desc::oerator==): Don't compare .xmltarget.
1150 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1151 (set_tdesc_osabi): Likewise.
1152 (tdesc_get_features_xml): Likewise.
1153
0a188386
YQ
11542017-09-05 Yao Qi <yao.qi@linaro.org>
1155
1156 * linux-x86-tdesc.c: Include selftest.h.
1157 (i386_tdesc_test): New function.
1158 (initialize_low_tdesc): Call selftests::register_test.
1159 * tdesc.h: Include regdef.h.
1160 (target_desc): Override operator == and !=.
1161
f49ff000
YQ
11622017-09-05 Yao Qi <yao.qi@linaro.org>
1163
1164 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1165 (ipa_obj): Likewise.
1166 * linux-i386-ipa.c: Include common/x86-xstate.h
1167 (get_ipa_tdesc): Call i386_linux_read_description.
1168 (initialize_low_tracepoint): Don't call init_registers_XXX
1169 functions, call initialize_low_tdesc instead.
1170 * linux-x86-low.c (x86_linux_read_description): Call
1171 i386_linux_read_description.
1172 (initialize_low_arch): Don't call init_registers_i386_XXX
1173 functions, call initialize_low_tdesc.
1174 * linux-x86-tdesc.c: New file.
1175 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1176 (i386_get_ipa_tdesc_idx): Declare.
1177 (i386_get_ipa_tdesc): Declare.
1178 (initialize_low_tdesc): Declare.
1179
2b68ef2f
YQ
11802017-09-05 Yao Qi <yao.qi@linaro.org>
1181
1182 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1183 instead of 0.
1184
f7000548
YQ
11852017-09-05 Yao Qi <yao.qi@linaro.org>
1186
1187 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1188 * regcache.c (get_thread_regcache): Use VEC_length.
1189 (init_register_cache): Likewise.
1190 (regcache_cpy): Likewise.
1191 (registers_to_string): Iterate reg_defs via VEC_iterate.
1192 (find_regno): Likewise.
1193 (find_register_by_number): Use VEC_index.
1194 (register_size): Call find_register_by_number.
1195 (register_data): Call find_register_by_number.
1196 (supply_regblock): Use VEC_length.
1197 (regcache_raw_read_unsigned): Likewise.
1198 * tdesc.c (init_target_desc): Iterate reg_defs via
1199 VEC_iterate.
1200 (default_description): Update initializer.
1201 (copy_target_description): Don't update field num_registers.
1202 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1203 <num_registers>: Remove.
1204
50a421ac
SM
12052017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1206
1207 * Makefile.in (.SECONDARY): Define target.
1208
23fdd69e
SM
12092017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1210
1211 * linux-low.c (linux_wait_1): Adjust.
1212 * server.c (queue_stop_reply_callback): Adjust.
1213
0a2dde4a
SDJ
12142017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1215
1216 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1217 QEnvironmentUnset and QEnvironmentReset packets.
1218 (handle_query): Inform remote that QEnvironmentHexEncoded,
1219 QEnvironmentUnset and QEnvironmentReset are supported.
1220
6afd337d
SM
12212017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1222
1223 * inferiors.h (inferior_target_data): Rename to ...
1224 (thread_target_data): ... this.
1225 (inferior_regcache_data): Rename to ...
1226 (thread_regcache_data): ... this.
1227 (set_inferior_regcache_data): Rename to ...
1228 (set_thread_regcache_data): ... this.
1229 * inferiors.c (inferior_target_data): Rename to ...
1230 (thread_target_data): ... this.
1231 (inferior_regcache_data): Rename to ...
1232 (thread_regcache_data): ... this.
1233 (set_inferior_regcache_data): Rename to ...
1234 (set_thread_regcache_data): ... this.
1235 (free_one_thread): Update.
1236 * linux-low.h (get_thread_lwp): Update.
1237 * regcache.c (get_thread_regcache): Update.
1238 (regcache_invalidate_thread): Update.
1239 (free_register_cache_thread): Update.
1240 * win32-i386-low.c (update_debug_registers_callback): Update.
1241 (win32_get_current_dr): Update.
1242 * win32-low.c (thread_rec): Update.
1243 (delete_thread_info): Update.
1244 (continue_one_thread): Update.
1245 (suspend_one_thread): Update.
1246
a160cc46
SM
12472017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1248
1249 * inferiors.c (set_inferior_target_data): Remove.
1250 * inferiors.h (set_inferior_target_data): Remove.
1251
6d580b63
YQ
12522017-08-18 Yao Qi <yao.qi@linaro.org>
1253
1254 * Makefile.in (OBS): Add selftest.o.
1255 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1256 * configure, config.in: Re-generated.
1257 * server.c: Include common/sefltest.h.
1258 (captured_main): Handle option --selftest.
1259
f5a29eb0
YQ
12602017-08-09 Yao Qi <yao.qi@linaro.org>
1261
1262 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1263 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1264 i386-avx-mpx.o and i386-mmx.o.
1265 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1266 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1267 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1268 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1269 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1270 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1271 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1272 i386/amd64-avx-mpx.xml.
1273
57757c2f
YQ
12742017-08-09 Yao Qi <yao.qi@linaro.org>
1275
1276 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1277 and x32-avx-avx512.o.
1278 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1279 i386/x32-avx-avx512.xml.
1280
229d26fc
SM
12812017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1282
1283 * tracepoint.h (enum class fast_tpoint_collect_result): New
1284 enumeration.
1285 (fast_tracepoint_collecting): Change return type to
1286 fast_tpoint_collect_result.
1287 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1288 * linux-low.h: Include tracepoint.h.
1289 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1290 fast_tpoint_collect_result.
1291 * linux-low.c (handle_tracepoints): Adjust.
1292 (linux_fast_tracepoint_collecting): Change return type to
1293 fast_tpoint_collect_result.
1294 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1295 linux_wait_1, stuck_in_jump_pad_callback,
1296 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1297 proceed_one_lwp): Adjust to type change.
1298
2e1e43e1
YQ
12992017-07-10 Yao Qi <yao.qi@linaro.org>
1300
1301 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1302
adc764e7
YQ
13032017-06-29 Yao Qi <yao.qi@linaro.org>
1304
1305 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1306 Remove.
1307 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1308
a206891a
SM
13092017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1310
1311 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1312
9a6c7d9c
SDJ
13132017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1314
1315 * linux-low.c (linux_create_inferior): Adjust code to access the
1316 environment information via 'gdb_environ' class.
1317 * lynx-low.c (lynx_create_inferior): Likewise.
1318 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1319 (get_environ): Return a pointer to 'our_environ'.
1320 (captured_main): Initialize 'our_environ'.
1321 * server.h (get_environ): Adjust prototype.
1322 * spu-low.c (spu_create_inferior): Adjust code to access the
1323 environment information via 'gdb_environ' class.
1324
ae3e2ccf
SM
13252017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1326
1327 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1328 usage of "register" keyword.
1329
3e019bdc
SM
13302017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1331
1332 * configure: Re-generate.
1333
8465943a
SM
13342017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1335
1336 * configure: Re-generate.
1337
cf0dd6f0
SM
13382017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1339
1340 * Makefile.in (COMPILE.pre): Add "-x c++".
1341
9845682b
SDJ
13422017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1343
1344 * fork-child.c: Conditionally include <signal.h>.
1345
aefd8b33
SDJ
13462017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1347
1348 * server.c (handle_general_set): Handle new packet
1349 "QStartupWithShell".
1350 (handle_query): Add "QStartupWithShell" to the list of supported
1351 packets.
1352 (gdbserver_usage): Add help text explaining the
1353 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1354 options.
1355 (captured_main): Recognize and act upon the presence of the new
1356 CLI options.
1357
2090129c
SDJ
13582017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1359 Pedro Alves <palves@redhat.com>
1360
1361 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1362 * configure: Regenerate.
1363 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1364 "fork-inferior.o".
1365 (i[34567]86-*-lynxos*): Likewise.
1366 (spu*-*-*): Likewise.
1367 * fork-child.c: New file.
1368 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1369 and "environ.h".
1370 (linux_ptrace_fun): New function.
1371 (linux_create_inferior): Adjust function prototype to reflect
1372 change on "target.h". Adjust function code to use
1373 "fork_inferior".
1374 (linux_request_interrupt): Delete "signal_pid".
1375 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1376 (lynx_ptrace_fun): New function.
1377 (lynx_create_inferior): Adjust function prototype to reflect
1378 change on "target.h". Adjust function code to use
1379 "fork_inferior".
1380 * nto-low.c (nto_create_inferior): Adjust function prototype and
1381 code to reflect change on "target.h". Update comments.
1382 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1383 "common-terminal.h" and "environ.h".
1384 (terminal_fd): Moved to fork-child.c.
1385 (old_foreground_pgrp): Likewise.
1386 (restore_old_foreground_pgrp): Likewise.
1387 (last_status): Make it global.
1388 (last_ptid): Likewise.
1389 (our_environ): New variable.
1390 (startup_with_shell): Likewise.
1391 (program_name): Likewise.
1392 (program_argv): Rename to...
1393 (program_args): ...this.
1394 (wrapper_argv): New variable.
1395 (start_inferior): Delete function.
1396 (get_exec_wrapper): New function.
1397 (get_exec_file): Likewise.
1398 (get_environ): Likewise.
1399 (prefork_hook): Likewise.
1400 (post_fork_inferior): Likewise.
1401 (postfork_hook): Likewise.
1402 (postfork_child_hook): Likewise.
1403 (handle_v_run): Update code to deal with arguments coming from the
1404 remote host. Update calls from "start_inferior" to
1405 "create_inferior".
1406 (captured_main): Likewise. Initialize environment variable. Call
1407 "have_job_control".
1408 * server.h (post_fork_inferior): New prototype.
1409 (get_environ): Likewise.
1410 (last_status): Declare.
1411 (last_ptid): Likewise.
1412 (signal_pid): Likewise.
1413 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1414 (spu_ptrace_fun): New function.
1415 (spu_create_inferior): Adjust function prototype to reflect change
1416 on "target.h". Adjust function code to use "fork_inferior".
1417 * target.c (target_terminal_init): New function.
1418 (target_terminal_inferior): Likewise.
1419 (target_terminal_ours): Likewise.
1420 * target.h: Include <vector>.
1421 (struct target_ops) <create_inferior>: Update prototype.
1422 (create_inferior): Update macro.
1423 * utils.c (gdb_flush_out_err): New function.
1424 * win32-low.c (win32_create_inferior): Adjust function prototype
1425 and code to reflect change on "target.h".
1426
043a4934
SDJ
14272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1428
1429 * inferiors.c (switch_to_thread): New function.
1430
15652511
SDJ
14312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1432
1433 * Makefile.in (SFILE): Add "common/job-control.c".
1434 (OBS): Add "job-control.o".
1435
21ea5acd
SDJ
14362017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1437
1438 * Makefile: Remove "@host_makefile_frag@".
1439
e13cb306
PA
14402017-05-05 Pedro Alves <palves@redhat.com>
1441
1442 * configure: Regenerate.
1443
c94fee56
SDJ
14442017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1445
1446 * configure: Regenerate.
1447
a0ff9e1a
SM
14482017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1449
1450 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1451 software_single_step change of return type to
1452 std::vector<CORE_ADDR>.
1453 * linux-low.c (install_software_single_step_breakpoints):
1454 Likewise.
1455 * linux-low.h (install_software_single_step_breakpoints):
1456 Likewise.
1457
be628ab8
SDJ
14582017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1459
1460 * remote-utils.c: Include "gdb_termios.h" instead of
1461 "terminal.h".
1462 * terminal.h: Delete file.
1463
7c5ded6a
SDJ
14642017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1465
1466 * server.c: Include <vector>.
1467 <program_argv, wrapper_argv>: Convert to std::vector.
1468 (start_inferior): Rewrite function to use C++.
1469 (handle_v_run): Likewise. Update code that calculates the argv
1470 based on the vRun packet; use C++.
1471 (captured_main): Likewise.
1472
436252de
SM
14732017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1474
1475 * server.c (handle_v_cont): Initialize thread_resume::thread
1476 with null_ptid.
1477
9bf2a700
PA
14782017-04-05 Pedro Alves <palves@redhat.com>
1479
1480 * configure: Regenerate.
1481
a121b7c1
PA
14822017-04-05 Pedro Alves <palves@redhat.com>
1483
1484 * gdbreplay.c (sync_error): Constify.
1485 * linux-x86-low.c (push_opcode): Constify.
1486
21c8a587
PA
14872017-04-05 Pedro Alves <palves@redhat.com>
1488
1489 * win32-low.c (get_child_debug_event)
1490 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1491 Report TARGET_WAITKIND_SPURIOUS instead.
1492
fb32b4f7
PA
14932017-04-05 Pedro Alves <palves@redhat.com>
1494
1495 * remote-utils.c (remote_prepare, remote_open): Constify.
1496 * remote-utils.h (remote_prepare, remote_open): Constify.
1497 * server.c (captured_main): Constify 'port' handling.
1498
65dd1e59
SM
14992017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1500
1501 * Makefile.in (clean): Clear .deps.
1502
8fa5b777
SM
15032017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1504
1505 * .gitignore: Remove generated files, replace with wildcard.
1506 * (clean): Replace removal of generated files with wildcard.
1507 (version.c): Replace with...
1508 (version-generated.c): ...this.
1509 (xml-builtin.c): Replace with...
1510 (xml-builtin-generated.c): ...this.
1511 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1512 (%.c: *regformats*): Replace with...
1513 (%-generated.c: *regformats*): ...this.
1514
a12e714b
MF
15152017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1516
1517 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1518 (xtensa_fill_gregset): Call collect_register_by_name for
1519 threadptr register.
1520 (xtensa_store_gregset): Call supply_register_by_name for
1521 threadptr register.
1522
1a09b50a
MF
15232017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1524
1525 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1526 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1527 (xtensa_store_gregset): Call supply_register for all registers in
1528 a0_regnum..a0_regnum + C0_NREGS range.
1529
1a01e7c6
SM
15302017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1531
1532 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1533 (ax-ipa.o: ax.c): Remove.
1534 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1535 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1536 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1537 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1538 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1539
36bc18a8
SM
15402017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1541
1542 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1543 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1544 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1545 (errors-ipa.o: ../common/errors.c): Remove.
1546 (format-ipa.o: ../common/format.c): Remove.
1547 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1548
a8ebe3d5
SM
15492017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1550
1551 * Makefile.in (%-ipa.o: %.c): New rule.
1552 (tracepoint-ipa.o: tracepoint.c): Remove.
1553 (utils-ipa.o: utils.c): Remove.
1554 (remote-utils-ipa.o: remote-utils.c): Remove.
1555 (regcache-ipa.o: regcache.c): Remove.
1556 (i386-linux-ipa.o: i386-linux.c): Remove.
1557 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1558 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1559 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1560 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1561 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1562 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1563 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1564 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1565 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1566 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1567 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1568 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1569 (aarch64-ipa.o: aarch64.c): Remove.
1570 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1571 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1572 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1573 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1574 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1575 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1576 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1577 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1578 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1579 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1580 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1581 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1582 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1583 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1584 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1585 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1586 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1587 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1588 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1589 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1590 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1591 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1592 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1593 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1594 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1595 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1596 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1597 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1598 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1599 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1600 (tdesc-ipa.o: tdesc.c): Remove.
1601 (x32-linux-ipa.o: x32-linux.c): Remove.
1602 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1603 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1604
50cfacb7
SM
16052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1606
1607 * Makefile.in (%.o: ../arch/%.c): New rule.
1608 (arm.o: ../arch/arm.c): Remove.
1609 (arm-linux.o: ../arch/arm-linux.c): Remove.
1610 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1611 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1612
c5a22423
SM
16132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1614
1615 * Makefile.in (%.o: ../nat/%.c): New rule.
1616 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1617 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1618 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1619 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1620 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1621 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1622 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1623 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1624 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1625 (linux-personality.o: ../nat/linux-personality.c): Remove.
1626 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1627 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1628 (x86-linux.o: ../nat/x86-linux.c): Remove.
1629 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1630 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1631
6bda016b
SM
16322017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1633
1634 * Makefile.in (%.o: ../common/%.c): New rule.
1635 (signals.o: ../common/signals.c): Remove.
1636 (print-utils.o: ../common/print-utils.c): Remove.
1637 (rsp-low.o: ../common/rsp-low.c): Remove.
1638 (common-utils.o: ../common/common-utils.c): Remove.
1639 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1640 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1641 (vec.o: ../common/vec.c): Remove.
1642 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1643 (xml-utils.o: ../common/xml-utils.c): Remove.
1644 (ptid.o: ../common/ptid.c): Remove.
1645 (buffer.o: ../common/buffer.c): Remove.
1646 (format.o: ../common/format.c): Remove.
1647 (filestuff.o: ../common/filestuff.c): Remove.
1648 (agent.o: ../common/agent.c): Remove.
1649 (errors.o: ../common/errors.c): Remove.
1650 (environ.o: ../common/environ.c): Remove.
1651 (common-debug.o: ../common/common-debug.c): Remove.
1652 (cleanups.o: ../common/cleanups.c): Remove.
1653 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1654 (fileio.o: ../common/fileio.c): Remove.
1655 (common-regcache.o: ../common/common-regcache.c): Remove.
1656 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1657 (new-op.o: ../common/new-op.c): Remove.
1658 (btrace-common.o: ../common/btrace-common.c): Remove.
1659
21122961
SM
16602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1661
1662 * Makefile.in (%.o: ../target/%.c): New rule.
1663 (waitstatus.o: ../target/waitstatus.c): Remove.
1664
c362e621
SM
16652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1666
1667 * Makefile.in
1668 (%.c: ../regformats/%.dat,
1669 (%.c: ../regformats/arm/%.dat,
1670 (%.c: ../regformats/i386/%.dat,
1671 (%.c: ../regformats/rs6000/%.dat): New rules.
1672 (aarch64.c): Remove.
1673 (reg-arm.c): Remove.
1674 (arm-with-iwmmxt.c): Remove.
1675 (arm-with-vfpv2.c): Remove.
1676 (arm-with-vfpv3.c): Remove.
1677 (arm-with-neon.c): Remove.
1678 (reg-bfin.c): Remove.
1679 (reg-cris.c): Remove.
1680 (reg-crisv32.c): Remove.
1681 (i386.c): Remove.
1682 (i386-linux.c): Remove.
1683 (i386-avx.c): Remove.
1684 (i386-avx-linux.c): Remove.
1685 (i386-avx-avx512.c): Remove.
1686 (i386-avx-avx512-linux.c): Remove.
1687 (i386-mpx.c): Remove.
1688 (i386-mpx-linux.c): Remove.
1689 (i386-avx-mpx-avx512-pku.c): Remove.
1690 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1691 (i386-avx-mpx.c): Remove.
1692 (i386-avx-mpx-linux.c): Remove.
1693 (i386-mmx.c): Remove.
1694 (i386-mmx-linux.c): Remove.
1695 (reg-ia64.c): Remove.
1696 (reg-m32r.c): Remove.
1697 (reg-m68k.c): Remove.
1698 (reg-cf.c): Remove.
1699 (mips-linux.c): Remove.
1700 (mips-dsp-linux.c): Remove.
1701 (mips64-linux.c): Remove.
1702 (mips64-dsp-linux.c): Remove.
1703 (nios2-linux.c): Remove.
1704 (powerpc-32.c): Remove.
1705 (powerpc-32l.c): Remove.
1706 (powerpc-altivec32l.c): Remove.
1707 (powerpc-cell32l.c): Remove.
1708 (powerpc-vsx32l.c): Remove.
1709 (powerpc-isa205-32l.c): Remove.
1710 (powerpc-isa205-altivec32l.c): Remove.
1711 (powerpc-isa205-vsx32l.c): Remove.
1712 (powerpc-e500l.c): Remove.
1713 (powerpc-64l.c): Remove.
1714 (powerpc-altivec64l.c): Remove.
1715 (powerpc-cell64l.c): Remove.
1716 (powerpc-vsx64l.c): Remove.
1717 (powerpc-isa205-64l.c): Remove.
1718 (powerpc-isa205-altivec64l.c): Remove.
1719 (powerpc-isa205-vsx64l.c): Remove.
1720 (s390-linux32.c): Remove.
1721 (s390-linux32v1.c): Remove.
1722 (s390-linux32v2.c): Remove.
1723 (s390-linux64.c): Remove.
1724 (s390-linux64v1.c): Remove.
1725 (s390-linux64v2.c): Remove.
1726 (s390-te-linux64.c): Remove.
1727 (s390-vx-linux64.c): Remove.
1728 (s390-tevx-linux64.c): Remove.
1729 (s390x-linux64.c): Remove.
1730 (s390x-linux64v1.c): Remove.
1731 (s390x-linux64v2.c): Remove.
1732 (s390x-te-linux64.c): Remove.
1733 (s390x-vx-linux64.c): Remove.
1734 (s390x-tevx-linux64.c): Remove.
1735 (tic6x-c64xp-linux.c): Remove.
1736 (tic6x-c64x-linux.c): Remove.
1737 (tic6x-c62x-linux.c): Remove.
1738 (reg-sh.c): Remove.
1739 (reg-sparc64.c): Remove.
1740 (reg-spu.c): Remove.
1741 (amd64.c): Remove.
1742 (amd64-linux.c): Remove.
1743 (amd64-avx.c): Remove.
1744 (amd64-avx-linux.c): Remove.
1745 (amd64-avx-avx512.c): Remove.
1746 (amd64-avx-avx512-linux.c): Remove.
1747 (amd64-mpx.c): Remove.
1748 (amd64-mpx-linux.c): Remove.
1749 (amd64-avx-mpx-avx512-pku.c): Remove.
1750 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1751 (amd64-avx-mpx.c): Remove.
1752 (amd64-avx-mpx-linux.c): Remove.
1753 (x32.c): Remove.
1754 (x32-linux.c): Remove.
1755 (x32-avx.c): Remove.
1756 (x32-avx-linux.c): Remove.
1757 (x32-avx-avx512.c): Remove.
1758 (x32-avx-avx512-linux.c): Remove.
1759 (reg-xtensa.c): Remove.
1760 (reg-tilegx.c): Remove.
1761 (reg-tilegx32.c): Remove.
1762
1672e0d9
SDJ
17632017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1764
1765 * Makefile.in (SFILES): Add "common/environ.c".
1766 (OBJS): Add "common/environ.h".
1767
239b6d10
WT
17682017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1769
1770 * configure.ac: Check if the fs_base and gs_base members of
1771 `struct user_regs_struct' exist.
1772 * config.in: Regenerated.
1773 * configure: Likewise.
1774
694b382c
AT
17752017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1776
1777 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1778 target_read_memory.
1779 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1780 (get_next_pcs_syscall_next_pc): Likewise.
1781
7dc53023
LM
17822016-12-23 Luis Machado <lgustavo@codesourcery.com>
1783
1784 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1785 * nto-x86-low.c: Likewise.
1786
ad02e4fe
SM
17872016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1788
1789 * Makefile.in: Include disable-implicit-rules.mk.
1790
dcb07cfa
PA
17912016-11-23 Pedro Alves <palves@redhat.com>
1792
1793 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1794 (debug_vprintf): Use std::chrono::steady_clock instead of
1795 gettimeofday. Use '.' instead of ':'.
1796 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1797 (get_timestamp): Use std::chrono::steady_clock instead of
1798 gettimeofday.
1799
8629c02c
SM
18002016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1801
1802 * Makefile.in: Fix whitespace formatting.
1803
b593ecca
SM
18042016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1805
1806 * Makefile.in (SFILES, OBS): Flatten list and order
1807 alphabetically.
1808
9986ba08
PA
18092016-11-23 Pedro Alves <palves@redhat.com>
1810
1811 * event-loop.c (handle_file_event): Use warning.
1812 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1813 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1814 Use warning.
1815
4eefa7bc
PA
18162016-11-23 Pedro Alves <palves@redhat.com>
1817
1818 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1819 output.
1820 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1821 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1822 debug_printf and debug_flush for debug output.
1823 * server.c (handle_general_set): Likewise.
1824 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1825 output.
1826
5443506e
SM
18272016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1828
1829 * Makefile.in (.c.o): Replace rule with ...
1830 (%.o: %.c): ... this one.
1831
3b165252
SM
18322016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1833
1834 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1835 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1836 make.
1837 * configure.ac: Remove checks for the make program.
1838 * configure: Re-generate.
1839
0bcda685
PA
18402016-10-28 Pedro Alves <palves@redhat.com>
1841
1842 * Makefile.in (CXX_DIALECT): Get from configure.
1843 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1844 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1845 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1846 * config.in: Regenerate.
1847 * configure: Regenerate.
1848
c3805894
YQ
18492016-10-27 Yao Qi <yao.qi@linaro.org>
1850
1851 * linux-low.c (linux_supports_range_stepping): Return true if
1852 can_software_single_step return true.
1853
89342618
YQ
18542016-10-27 Yao Qi <yao.qi@linaro.org>
1855
1856 * inferiors.c (find_inferior_in_random): New function.
1857 * inferiors.h (find_inferior_in_random): Declare.
1858 * linux-low.c (linux_wait_for_event_filtered): Call
1859 find_inferior_in_random instead of find_inferior.
1860
e3652c84
YQ
18612016-10-27 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-low.c (linux_wait_1): If single-step breakpoints are
1864 inserted, remove them.
1865
5a04c4cf
PA
18662016-10-26 Pedro Alves <palves@redhat.com>
1867
1868 * linux-low.c (handle_extended_wait): Link parent/child fork
1869 threads.
1870 (linux_wait_1): Unlink them.
1871 (linux_set_resume_request): Ignore resume requests for
1872 already-resumed and unhandled fork child threads.
1873 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1874 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1875 New functions.
1876 (handle_v_requests) <vCont>: Don't call require_running.
1877 * server.h (in_queued_stop_replies): New declaration.
1878
cb93dc7f
YQ
18792016-10-24 Yao Qi <yao.qi@linaro.org>
1880
1881 PR server/20733
1882 * linux-aarch64-low.c (append_insns): Cast the return value to
1883 'uint32_t *'.
1884
a1078bea
YQ
18852016-10-10 Yao Qi <yao.qi@linaro.org>
1886
1887 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1888
1fb77080
SDJ
18892016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1890
1891 * target.c (target_supports_multi_process): New function, moved
1892 from...
1893 * target.h (target_supports_multi_process): ... here. Remove
1894 macro.
1895
39b5a3b9
TT
18962016-10-05 Tom Tromey <tom@tromey.com>
1897
1898 PR remote/20655:
1899 * tracepoint.c (handle_tracepoint_bkpts): Check
1900 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1901
c1d0b70a
YQ
19022016-10-05 Yao Qi <yao.qi@linaro.org>
1903
1904 * configure.srv: Update the path of arm-*.xml files.
1905
0a69eedb
YQ
19062016-10-05 Terry Guo <terry.guo@arm.com>
1907 Yao Qi <yao.qi@linaro.org>
1908
1909 * Makefile.in: Adjust the path of rules.
1910 * configure.srv: Update the path of xml files.
1911 * regformats/arm-with-iwmmxt.dat: Regenerated.
1912 * regformats/arm-with-neon.dat: Likewise.
1913 * regformats/arm-with-vfpv2.dat: Likewise.
1914 * regformats/arm-with-vfpv3.dat Likewise.
1915
17e16485
YQ
19162016-09-30 Yao Qi <yao.qi@linaro.org>
1917
1918 PR gdbserver/20627
1919 * target.c (target_stop_and_wait): Don't call
1920 target_continue_no_signal, use resume_stop instead.
1921
edeeb602
YQ
19222016-09-26 Yao Qi <yao.qi@linaro.org>
1923
1924 * linux-low.c (linux_wait_1): Call debug_exit.
1925
503b1c39
PA
19262016-09-23 Pedro Alves <palves@redhat.com>
1927
1928 * Makefile.in (SFILES): Add common/new-op.c.
1929 (OBS): Add common/new-op.o.
1930 (new-op.o): New rule.
1931
74172ecf
SM
19322016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1933
1934 * .gitinore: Ignore more files.
1935
fc6cda2e
YQ
19362016-09-21 Yao Qi <yao.qi@linaro.org>
1937
1938 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1939 23.
1940
bc1e6c81
SDJ
19412016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1942
1943 * server.c (start_inferior): Call target_mourn_inferior instead of
1944 mourn_inferior; pass ptid_t argument to it.
1945 (resume): Likewise.
1946 (handle_target_event): Likewise.
1947 * target.c (target_mourn_inferior): New function.
1948 * target.h (mourn_inferior): Delete macro.
1949
0e00e962
AA
19502016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1951
1952 * linux-low.c (lwp_is_stepping): New function.
1953
1d8cb77d
CL
19542016-09-06 Carl Love <cel@us.ibm.com>
1955
1956 * server.c (start_inferior): Fixed comment, requested comment change
1957 didn't get updated correctly. Removed reference to ptrace () call as
1958 it is only true on Linux systems.
1959
7313bced
CL
19602016-09-06 Carl Love <cel@us.ibm.com>
1961
1962 * server.c (start_inferior): Do not call
1963 function target_post_create_inferior () if the
1964 inferior process has already exited.
1965
cf6de44d
PA
19662016-09-05 Pedro Alves <palves@redhat.com>
1967
1968 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1969 (COMPILE.pre, CC_LD): Use CXX directly.
1970 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1971 * acinclude.m4: Don't include build-with-cxx.m4.
1972 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1973 * configure: Regenerate.
1974
c1da6748
AT
19752016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1976
1977 PR gdb/19495
1978 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1979 call writing data to own_buf.
1980
f2b9e3df
SDJ
19812016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1982
1983 * target.c (mywait): Call target_wait instead of
1984 the_target->wait.
1985 (target_wait): New function.
1986
049a8570
SDJ
19872016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1988
1989 * server.c (start_inferior): New variable 'ptid'. Replace calls
1990 to the_target->resume by target_continue{,_no_signal}, depending
1991 on the case.
1992 * target.c (target_stop_and_wait): Call target_continue_no_signal
1993 instead of the_target->resume.
1994 (target_continue): New function.
1995
3aa5cfa0
AT
19962016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1997
1998 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1999
754653a7
AZ
20002016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2001
2002 PR server/20491
2003 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2004 ps_prochandle.
2005 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2006 * linux-arm-low.c (ps_get_thread_area): Likewise.
2007 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2008 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2009 * linux-mips-low.c (ps_get_thread_area): Likewise.
2010 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2011 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2012 * linux-x86-low.c (ps_get_thread_area): Likewise.
2013 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2014
ed036b40
PA
20152016-08-19 Pedro Alves <palves@redhat.com>
2016
2017 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2018
c8ef42ee
PA
20192016-08-19 Pedro Alves <palves@redhat.com>
2020
2021 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2022 comment. Use memcpy instead of casting through unsigned long.
2023
9c235a72
PA
20242016-08-19 Pedro Alves <palves@redhat.com>
2025
2026 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2027 allocating around 0x80000000.
2028
201506da
PA
20292016-08-19 Pedro Alves <palves@redhat.com>
2030
2031 PR gdb/20415
2032 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2033 (x32-avx512-linux-ipa.o): New rules.
2034 * configure.ac (x86_64-*-linux*): New x32 check.
2035 * configure.srv (ipa_x32_linux_regobj): New.
2036 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2037 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2038 descriptions.
2039 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2040 descriptions.
2041 * configure: Regenerate.
2042
f348d89a
PA
20432016-08-09 Pedro Alves <palves@redhat.com>
2044
2045 PR gdb/18653
2046 * Makefile.in (OBS): Add signals-state-save-restore.o.
2047 (signals-state-save-restore.o): New rule.
2048 * config.in: Regenerate.
2049 * configure: Regenerate.
2050 * linux-low.c: Include "signals-state-save-restore.h".
2051 (linux_create_inferior): Call
2052 restore_original_signals_state.
2053 * server.c: Include "dispositions-save-restore.h".
2054 (captured_main): Call save_original_signals_state.
2055
1baf5149
PA
20562016-08-05 Pedro Alves <palves@redhat.com>
2057
2058 * configure: Regenerate.
2059
fcd4a73d
YQ
20602016-08-04 Yao Qi <yao.qi@linaro.org>
2061
2062 * linux-low.c (regsets_fetch_inferior_registers): Check
2063 errno is ESRCH or not.
2064
979659d0
YQ
20652016-08-02 Yao Qi <yao.qi@linaro.org>
2066
2067 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2068 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2069 (thread_db_load_search): Update.
2070 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2071 td_ta_set_event and td_ta_event_getmsg.
2072
6598661d
PA
20732016-07-26 Pedro Alves <palves@redhat.com>
2074
2075 PR server/20414
2076 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2077 of unsigned long for 64-bit registers and use uint32_t instead of
2078 unsigned int for 32-bit registers.
2079
9cf12d57
PA
20802016-07-26 Pedro Alves <palves@redhat.com>
2081
2082 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2083 to 'ptrace'.
2084
305450ed
TT
20852016-07-21 Tom Tromey <tom@tromey.com>
2086
2087 * configure: Rebuild.
2088
2583da7c
YQ
20892016-07-21 Yao Qi <yao.qi@linaro.org>
2090
2091 * mem-break.c (find_gdb_breakpoint): Cast bp to
2092 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2093
21536b36
YQ
20942016-07-21 Yao Qi <yao.qi@linaro.org>
2095
2096 * server.c (handle_v_requests): Support s and S actions
2097 if target_supports_software_single_step return true.
2098
8901d193
YQ
20992016-07-21 Yao Qi <yao.qi@linaro.org>
2100
2101 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2102 is resume_step, call maybe_hw_step.
2103 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2104 and unstop them.
2105 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2106 breakpoints or not.
2107 (proceed_one_lwp): If resume request is resume_step, install
2108 reinsert breakpoints and call maybe_hw_step.
2109
0e9a339e
YQ
21102016-07-21 Yao Qi <yao.qi@linaro.org>
2111
2112 * linux-low.c (proceed_one_lwp): Declare.
2113 (linux_resume_one_thread): Remove local variable 'step'.
2114 Lift code enqueue signal. Call proceed_one_lwp instead of
2115 linux_resume_one_lwp.
2116
4281b351
YQ
21172016-07-21 Yao Qi <yao.qi@linaro.org>
2118
2119 * linux-low.c (linux_resume_one_thread): Call
2120 enqueue_pending_signal.
2121
984a2c04
YQ
21222016-07-21 Yao Qi <yao.qi@linaro.org>
2123
2124 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2125 * inferiors.c (do_restore_current_thread_cleanup): New function.
2126 (make_cleanup_restore_current_thread): Likewise.
2127 * linux-low.c (install_software_single_step_breakpoints): Call
2128 make_cleanup_restore_current_thread. Switch current_thread to
2129 thread.
2130
bec903c9
YQ
21312016-07-21 Yao Qi <yao.qi@linaro.org>
2132
2133 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2134 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2135 (clone_one_breakpoint): Likewise.
2136 (delete_reinsert_breakpoints): Change parameter to thread.
2137 Callers updated.
2138 (has_reinsert_breakpoints): Likewise.
2139 (uninsert_reinsert_breakpoints): Likewise.
2140 (reinsert_reinsert_breakpoints): Likewise.
2141 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2142 (delete_reinsert_breakpoints): Likewise.
2143 (reinsert_reinsert_breakpoints): Likewise.
2144 (uninsert_reinsert_breakpoints): Likewise.
2145 (has_reinsert_breakpoints): Likewise.
2146
63c40ec7
YQ
21472016-07-21 Yao Qi <yao.qi@linaro.org>
2148
2149 * inferiors.c (get_thread_process): Make parameter const.
2150 * inferiors.h (get_thread_process): Update declaration.
2151 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2152 Add new parameters child_thread and parent_thread. Callers
2153 updated.
2154 * mem-break.h (clone_all_breakpoints): Update declaration.
2155
9aa76cd0
YQ
21562016-07-21 Yao Qi <yao.qi@linaro.org>
2157
2158 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2159 <command_list, handler>: Remove.
2160 (struct gdb_breakpoint): New.
2161 (struct other_breakpoint): New.
2162 (struct reinsert_breakpoint): New.
2163 (is_gdb_breakpoint): New function.
2164 (any_persistent_commands): Update command_list if
2165 is_gdb_breakpoint returns true.
2166 (set_breakpoint): Create breakpoints according to their types.
2167 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2168 (set_gdb_breakpoint_1): Likewise.
2169 (set_gdb_breakpoint): Likewise.
2170 (clear_breakpoint_conditions): Change parameter type to
2171 'struct gdb_breakpoint *'.
2172 (clear_breakpoint_commands): Likewise.
2173 (clear_breakpoint_conditions_and_commands): Likewise.
2174 (add_condition_to_breakpoint): Likewise.
2175 (add_breakpoint_condition): Likewise.
2176 (add_commands_to_breakpoint): Likewise.
2177 (check_breakpoints): Check other_breakpoint.
2178 (clone_one_breakpoint): Clone breakpopint according to its type.
2179 * mem-break.h (struct gdb_breakpoint): Declare.
2180 (set_gdb_breakpoint): Update declaration.
2181 (clear_breakpoint_conditions_and_commands): Likewise.
2182 (add_breakpoint_condition): Likewise.
2183 (add_breakpoint_commands): Likewise.
2184 * server.c (process_point_options): Change parameter type to
2185 'struct gdb_breakpoint *'.
2186
811f8301
YQ
21872016-07-21 Yao Qi <yao.qi@linaro.org>
2188
2189 * mem-break.c (set_breakpoint_at): Rename it to ...
2190 (set_breakpoint_type_at): ... it.
2191 (set_breakpoint_at): Call set_breakpoint_type_at.
2192 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2193 * mem-break.h (set_breakpoint_at): Update comments.
2194
b1c51e36
CLT
21952016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2196
2197 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2198 to buf parameter.
2199 (nios2_store_gregset): Likewise.
2200
ced2dffb
PA
22012016-07-01 Pedro Alves <palves@redhat.com>
2202 Antoine Tremblay <antoine.tremblay@ericsson.com>
2203
2204 * linux-low.c: Change interface to take the target lwp_info
2205 pointer directly and return void. Handle detaching from a zombie
2206 thread.
2207 (linux_detach_lwp_callback): New function.
2208 (linux_detach): Detach from the leader thread after detaching from
2209 the clone threads.
2210
2ac09a5b
YQ
22112016-06-28 Yao Qi <yao.qi@linaro.org>
2212
2213 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2214 for variable new_offset.
2215 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2216 (aarch64_ftrace_insn_reloc_cb): Likewise.
2217 (aarch64_ftrace_insn_reloc_tb): Likewise.
2218 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2219 PRIx64 instead of PRIx32.
2220
79e7fd4f
YQ
22212016-06-28 Yao Qi <yao.qi@linaro.org>
2222
2223 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2224 (the_low_target): Install arm_get_syscall_trapinfo.
2225
061fc021
YQ
22262016-06-28 Yao Qi <yao.qi@linaro.org>
2227
2228 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2229 function.
2230 (the_low_target): Install aarch64_get_syscall_trapinfo.
2231
4cc32bec
YQ
22322016-06-28 Yao Qi <yao.qi@linaro.org>
2233
2234 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2235 Callers updated.
2236 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2237 Remove parameter sysno.
2238 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2239 sysret.
2240
782c1122
AA
22412016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2242
2243 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2244 (s390_emit_ne_goto): Likewise.
2245 (s390_emit_lt_goto): Likewise.
2246 (s390_emit_le_goto): Likewise.
2247 (s390_emit_gt_goto): Likewise.
2248 (s390_emit_ge_goto): Likewise.
2249 (s390x_emit_eq_goto): Likewise.
2250 (s390x_emit_ne_goto): Likewise.
2251 (s390x_emit_lt_goto): Likewise.
2252 (s390x_emit_le_goto): Likewise.
2253 (s390x_emit_gt_goto): Likewise.
2254 (s390x_emit_ge_goto): Likewise.
2255 (s390_emit_ops_impl): Mark variable static.
2256 (s390x_emit_ops): Likewise.
2257
2e7b624b
YQ
22582016-06-17 Yao Qi <yao.qi@linaro.org>
2259
2260 * linux-low.c (handle_extended_wait): Call
2261 uninsert_reinsert_breakpoints for the parent process. Remove
2262 reinsert breakpoints from the child process. Reinsert them to
2263 the parent process when vfork is done.
2264 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2265 (reinsert_reinsert_breakpoints): New function.
2266 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2267 (reinsert_reinsert_breakpoints): Declare.
2268
8a81c5d7
YQ
22692016-06-17 Yao Qi <yao.qi@linaro.org>
2270
2271 * linux-low.c (handle_extended_wait): If the parent is doing
2272 step-over, remove the reinsert breakpoints from the forked child.
2273
f50bf8e5
YQ
22742016-06-17 Yao Qi <yao.qi@linaro.org>
2275
2276 * linux-low.c (unsuspend_all_lwps): Declare.
2277 (linux_low_filter_event): If thread exited, call finish_step_over.
2278 If step-over is finished, unsuspend other threads.
2279
8376a3cb
YQ
22802016-06-17 Yao Qi <yao.qi@linaro.org>
2281
2282 * linux-low.c (linux_resume_one_lwp_throw): Assert
2283 has_reinsert_breakpoints returns false.
2284 * mem-break.c (delete_disabled_breakpoints): Assert
2285 bp type isn't reinsert_breakpoint.
2286
f79b145d
YQ
22872016-06-17 Yao Qi <yao.qi@linaro.org>
2288
2289 * linux-low.c (maybe_hw_step): New function.
2290 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2291 (finish_step_over): Switch current_thread to lwp temporarily,
2292 and assert has_reinsert_breakpoints returns true.
2293 (proceed_one_lwp): Call maybe_hw_step.
2294 * mem-break.c (has_reinsert_breakpoints): New function.
2295 * mem-break.h (has_reinsert_breakpoints): Declare.
2296
0ae534d2
JT
22972016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2298
2299 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2300
fcdad592
YQ
23012016-05-17 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2304 instead of find_inferior.
2305
9e784964
YQ
23062016-05-05 Yao Qi <yao.qi@linaro.org>
2307
2308 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2309 Initialize res to zero.
2310
cf2ebb6e
YQ
23112016-05-05 Yao Qi <yao.qi@linaro.org>
2312
2313 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2314 to uint32_t.
2315
c1aebf87
UW
23162016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2317
2318 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2319 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2320 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2321
35fd2deb 23222016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 2323 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
2324
2325 * tracepoint.c (write_inferior_int8): New function.
2326 (cmd_qtenable_disable): Write enable flag using
2327 write_inferior_int8.
2328
484b3c32
YQ
23292016-04-25 Yao Qi <yao.qi@linaro.org>
2330
2331 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2332 (need_step_over_p): Return zero if the LWP has pending signals
2333 can be delivered on software single step target.
2334
85ba7d86
YQ
23352016-04-25 Yao Qi <yao.qi@linaro.org>
2336
2337 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2338 return instead of error.
2339
3539aa13
YQ
23402016-04-22 Yao Qi <yao.qi@linaro.org>
2341
2342 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2343 to 23.
2344
5b061e98
YQ
23452016-04-22 Yao Qi <yao.qi@linaro.org>
2346
2347 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2348 signal when stepping over breakpoint with software single
2349 step.
2350
3451269c
PA
23512016-04-21 Pedro Alves <palves@redhat.com>
2352
2353 * linux-s390-low.c (s390_collect_ptrace_register)
2354 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2355 add casts.
2356 (s390_check_regset): Use void * instead of gdb_byte *.
2357
a2358508
PA
23582016-04-20 Pedro Alves <palves@redhat.com>
2359
2360 * configure: Renegerate.
2361
6885166d
YQ
23622016-04-20 Yao Qi <yao.qi@linaro.org>
2363
2364 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2365 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2366 number 16.
2367 (arm_store_gregset): Likewise.
2368
2b863f51
WT
23692016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2370
2371 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2372 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2373 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2374 (amd64-avx-mpx-linux.c): New rules.
2375 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2376 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2377 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2378 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2379 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2380 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2381 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2382 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2383 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2384 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2385 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2386 * linux-x86-low.c (x86_linux_read_description): Add case for
2387 X86_XSTATE_AVX_MPX_MASK.
2388 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2389 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2390 init_registers_i386_avx_mpx_linux.
2391 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2392 (initialize_low_tracepoint): Call
2393 init_registers_i386_avx_mpx_linux.
2394 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2395 (initialize_low_tracepoint): Call
2396 init_registers_amd64_avx_mpx_linux.
2397 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2398 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2399 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2400 declarations.
2401
9b30624b
PA
24022016-04-18 Pedro Alves <palves@redhat.com>
2403
2404 * configure: Regenerate.
2405
45e3745e
AT
24062016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2407
2408 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2409 (aarch64_emit_sub): Likewise.
2410
2afc13ff
PA
24112016-04-12 Pedro Alves <palves@redhat.com>
2412
2413 * utils.c (prepare_to_throw_exception): Delete.
2414
6e774b13
SM
24152016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2416
2417 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2418
4dca19f8
MK
24192016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2420
2421 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2422
d0a9981f
MK
24232016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2424
2425 * linux-aarch64-ipa.c: Add <elf.h> include.
2426 * linux-ppc-ipa.c: Add <elf.h> include.
2427 * linux-s390-ipa.c: Add <elf.h> include.
2428
252db07e
MK
24292016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2430
2431 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2432 (get_raw_reg_ptr): Likewise.
2433 (get_trace_state_variable_value_ptr): Likewise.
2434 (set_trace_state_variable_value_ptr): Likewise.
2435 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2436 char *.
2437
14e2b6d9
MK
24382016-03-31 Wei-cheng Wang <cole945@gmail.com>
2439 Marcin Kościelnicki <koriakin@0x04.net>
2440
2441 PR/17221
2442 * linux-ppc-low.c (emit_insns): New function.
2443 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2444 (ppc_emit_prologue): New function.
2445 (ppc_emit_epilogue): New function.
2446 (ppc_emit_add): New function.
2447 (ppc_emit_sub): New function.
2448 (ppc_emit_mul): New function.
2449 (ppc_emit_lsh): New function.
2450 (ppc_emit_rsh_signed): New function.
2451 (ppc_emit_rsh_unsigned): New function.
2452 (ppc_emit_ext): New function.
2453 (ppc_emit_zero_ext): New function.
2454 (ppc_emit_log_not): New function.
2455 (ppc_emit_bit_and): New function.
2456 (ppc_emit_bit_or): New function.
2457 (ppc_emit_bit_xor): New function.
2458 (ppc_emit_bit_not): New function.
2459 (ppc_emit_equal): New function.
2460 (ppc_emit_less_signed): New function.
2461 (ppc_emit_less_unsigned): New function.
2462 (ppc_emit_ref): New function.
2463 (ppc_emit_const): New function.
2464 (ppc_emit_reg): New function.
2465 (ppc_emit_pop): New function.
2466 (ppc_emit_stack_flush): New function.
2467 (ppc_emit_swap): New function.
2468 (ppc_emit_stack_adjust): New function.
2469 (ppc_emit_call): New function.
2470 (ppc_emit_int_call_1): New function.
2471 (ppc_emit_void_call_2): New function.
2472 (ppc_emit_if_goto): New function.
2473 (ppc_emit_goto): New function.
2474 (ppc_emit_eq_goto): New function.
2475 (ppc_emit_ne_goto): New function.
2476 (ppc_emit_lt_goto): New function.
2477 (ppc_emit_le_goto): New function.
2478 (ppc_emit_gt_goto): New function.
2479 (ppc_emit_ge_goto): New function.
2480 (ppc_write_goto_address): New function.
2481 (ppc_emit_ops_impl): New static variable.
2482 (ppc64v1_emit_prologue): New function.
2483 (ppc64v2_emit_prologue): New function.
2484 (ppc64_emit_epilogue): New function.
2485 (ppc64_emit_add): New function.
2486 (ppc64_emit_sub): New function.
2487 (ppc64_emit_mul): New function.
2488 (ppc64_emit_lsh): New function.
2489 (ppc64_emit_rsh_signed): New function.
2490 (ppc64_emit_rsh_unsigned): New function.
2491 (ppc64_emit_ext): New function.
2492 (ppc64_emit_zero_ext): New function.
2493 (ppc64_emit_log_not): New function.
2494 (ppc64_emit_bit_and): New function.
2495 (ppc64_emit_bit_or): New function.
2496 (ppc64_emit_bit_xor): New function.
2497 (ppc64_emit_bit_not): New function.
2498 (ppc64_emit_equal): New function.
2499 (ppc64_emit_less_signed): New function.
2500 (ppc64_emit_less_unsigned): New function.
2501 (ppc64_emit_ref): New function.
2502 (ppc64_emit_const): New function.
2503 (ppc64v1_emit_reg): New function.
2504 (ppc64v2_emit_reg): New function.
2505 (ppc64_emit_pop): New function.
2506 (ppc64_emit_stack_flush): New function.
2507 (ppc64_emit_swap): New function.
2508 (ppc64v1_emit_call): New function.
2509 (ppc64v2_emit_call): New function.
2510 (ppc64v1_emit_int_call_1): New function.
2511 (ppc64v2_emit_int_call_1): New function.
2512 (ppc64v1_emit_void_call_2): New function.
2513 (ppc64v2_emit_void_call_2): New function.
2514 (ppc64_emit_if_goto): New function.
2515 (ppc64_emit_eq_goto): New function.
2516 (ppc64_emit_ne_goto): New function.
2517 (ppc64_emit_lt_goto): New function.
2518 (ppc64_emit_le_goto): New function.
2519 (ppc64_emit_gt_goto): New function.
2520 (ppc64_emit_ge_goto): New function.
2521 (ppc64v1_emit_ops_impl): New static variable.
2522 (ppc64v2_emit_ops_impl): New static variable.
2523 (ppc_emit_ops): New function.
2524 (linux_low_target): Wire in ppc_emit_ops.
2525
a2174ba4
MK
25262016-03-31 Wei-cheng Wang <cole945@gmail.com>
2527 Marcin Kościelnicki <koriakin@0x04.net>
2528
2529 PR/17221
2530 * Makefile.in: Add powerpc-*-ipa.o
2531 * configure.srv: Add ipa_obj for powerpc*-linux.
2532 * linux-ppc-ipa.c: New file.
2533 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2534 includes.
2535 (PPC_FIELD): New macro.
2536 (PPC_SEXT): New macro.
2537 (PPC_OP6): New macro.
2538 (PPC_BO): New macro.
2539 (PPC_LI): New macro.
2540 (PPC_BD): New macro.
2541 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2542 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2543 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2544 (ppc_get_thread_area): New function.
2545 (is_elfv2_inferior): New function.
2546 (gen_ds_form): New function.
2547 (GEN_STD): New macro.
2548 (GEN_STDU): New macro.
2549 (GEN_LD): New macro.
2550 (GEN_LDU): New macro.
2551 (gen_d_form): New function.
2552 (GEN_ADDI): New macro.
2553 (GEN_ADDIS): New macro.
2554 (GEN_LI): New macro.
2555 (GEN_LIS): New macro.
2556 (GEN_ORI): New macro.
2557 (GEN_ORIS): New macro.
2558 (GEN_LWZ): New macro.
2559 (GEN_STW): New macro.
2560 (GEN_STWU): New macro.
2561 (gen_xfx_form): New function.
2562 (GEN_MFSPR): New macro.
2563 (GEN_MTSPR): New macro.
2564 (GEN_MFCR): New macro.
2565 (GEN_MTCR): New macro.
2566 (GEN_SYNC): New macro.
2567 (GEN_LWSYNC): New macro.
2568 (gen_x_form): New function.
2569 (GEN_OR): New macro.
2570 (GEN_MR): New macro.
2571 (GEN_LWARX): New macro.
2572 (GEN_STWCX): New macro.
2573 (GEN_CMPW): New macro.
2574 (gen_md_form): New function.
2575 (GEN_RLDICL): New macro.
2576 (GEN_RLDICR): New macro.
2577 (gen_i_form): New function.
2578 (GEN_B): New macro.
2579 (GEN_BL): New macro.
2580 (gen_b_form): New function.
2581 (GEN_BNE): New macro.
2582 (GEN_LOAD): New macro.
2583 (GEN_STORE): New macro.
2584 (gen_limm): New function.
2585 (gen_atomic_xchg): New function.
2586 (gen_call): New function.
2587 (ppc_relocate_instruction): New function.
2588 (ppc_install_fast_tracepoint_jump_pad): New function.
2589 (ppc_get_min_fast_tracepoint_insn_len): New function.
2590 (ppc_get_ipa_tdesc_idx): New function.
2591 (the_low_target): Wire in the new functions.
2592 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2593 tdescs.
2594 * linux-ppc-tdesc.h: New file.
2595
a13c4696
MK
25962016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2597
2598 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2599 (alloc_jump_pad_buffer): New function.
2600 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2601 (alloc_jump_pad_buffer): New function.
2602 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2603 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2604 (alloc_jump_pad_buffer): New function.
2605 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2606 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2607 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2608 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2609
1cda1512
MK
26102016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2611
2612 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2613 * linux-amd64-ipa.c: Likewise.
2614 * linux-i386-ipa.c: Likewise.
2615 * linux-s390-ipa.c: Likewise.
2616 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2617 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2618 set_trace_state_variable_value_ptr.
2619 (struct ipa_sym_addresses): Likewise.
2620 (symbol_list): Likewise.
2621 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2622 accessing gdb_collect directly.
2623 (gdb_collect_ptr_type): New typedef.
2624 (get_raw_reg_ptr_type): New typedef.
2625 (get_trace_state_variable_value_ptr_type): New typedef.
2626 (set_trace_state_variable_value_ptr_type): New typedef.
2627 (gdb_collect_ptr): New global.
2628 (get_raw_reg_ptr): New global.
2629 (get_trace_state_variable_value_ptr): New global.
2630 (set_trace_state_variable_value_ptr): New global.
2631 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2632 accessing get_raw_reg directly.
2633 (get_get_tsv_func_addr): Likewise for
2634 get_trace_state_variable_value_ptr.
2635 (get_set_tsv_func_addr): Likewise for
2636 set_trace_state_variable_value_ptr.
2637 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2638
72fb5488
SM
26392016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2640
2641 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2642
28170b88
MK
26432016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2644
2645 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2646 packets.
2647 (relocate_instruction): Remove own_buf.
2648 * server.c (own_buf): Make global.
2649 (handle_v_requests): Make global.
2650 * server.h (own_buf): New declaration.
2651 (handle_v_requests): New prototype.
2652
f39e8743
MK
26532016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2654
2655 PR 18377
2656 * linux-s390-low.c (add_insns): New function.
2657 (s390_emit_prologue): New function.
2658 (s390_emit_epilogue): New function.
2659 (s390_emit_add): New function.
2660 (s390_emit_sub): New function.
2661 (s390_emit_mul): New function.
2662 (s390_emit_lsh): New function.
2663 (s390_emit_rsh_signed): New function.
2664 (s390_emit_rsh_unsigned): New function.
2665 (s390_emit_ext): New function.
2666 (s390_emit_log_not): New function.
2667 (s390_emit_bit_and): New function.
2668 (s390_emit_bit_or): New function.
2669 (s390_emit_bit_xor): New function.
2670 (s390_emit_bit_not): New function.
2671 (s390_emit_equal): New function.
2672 (s390_emit_less_signed): New function.
2673 (s390_emit_less_unsigned): New function.
2674 (s390_emit_ref): New function.
2675 (s390_emit_if_goto): New function.
2676 (s390_emit_goto): New function.
2677 (s390_write_goto_address): New function.
2678 (s390_emit_litpool): New function.
2679 (s390_emit_const): New function.
2680 (s390_emit_call): New function.
2681 (s390_emit_reg): New function.
2682 (s390_emit_pop): New function.
2683 (s390_emit_stack_flush): New function.
2684 (s390_emit_zero_ext): New function.
2685 (s390_emit_swap): New function.
2686 (s390_emit_stack_adjust): New function.
2687 (s390_emit_set_r2): New function.
2688 (s390_emit_int_call_1): New function.
2689 (s390_emit_void_call_2): New function.
2690 (s390_emit_eq_goto): New function.
2691 (s390_emit_ne_goto): New function.
2692 (s390_emit_lt_goto): New function.
2693 (s390_emit_le_goto): New function.
2694 (s390_emit_gt_goto): New function.
2695 (s390_emit_ge_goto): New function.
2696 (s390x_emit_prologue): New function.
2697 (s390x_emit_epilogue): New function.
2698 (s390x_emit_add): New function.
2699 (s390x_emit_sub): New function.
2700 (s390x_emit_mul): New function.
2701 (s390x_emit_lsh): New function.
2702 (s390x_emit_rsh_signed): New function.
2703 (s390x_emit_rsh_unsigned): New function.
2704 (s390x_emit_ext): New function.
2705 (s390x_emit_log_not): New function.
2706 (s390x_emit_bit_and): New function.
2707 (s390x_emit_bit_or): New function.
2708 (s390x_emit_bit_xor): New function.
2709 (s390x_emit_bit_not): New function.
2710 (s390x_emit_equal): New function.
2711 (s390x_emit_less_signed): New function.
2712 (s390x_emit_less_unsigned): New function.
2713 (s390x_emit_ref): New function.
2714 (s390x_emit_if_goto): New function.
2715 (s390x_emit_const): New function.
2716 (s390x_emit_call): New function.
2717 (s390x_emit_reg): New function.
2718 (s390x_emit_pop): New function.
2719 (s390x_emit_stack_flush): New function.
2720 (s390x_emit_zero_ext): New function.
2721 (s390x_emit_swap): New function.
2722 (s390x_emit_stack_adjust): New function.
2723 (s390x_emit_int_call_1): New function.
2724 (s390x_emit_void_call_2): New function.
2725 (s390x_emit_eq_goto): New function.
2726 (s390x_emit_ne_goto): New function.
2727 (s390x_emit_lt_goto): New function.
2728 (s390x_emit_le_goto): New function.
2729 (s390x_emit_gt_goto): New function.
2730 (s390x_emit_ge_goto): New function.
2731 (s390_emit_ops): New function.
2732 (struct linux_target_ops): Fill in emit_ops hook.
2733
abd9baf9
MK
27342016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2735
2736 PR 18377
2737 * Makefile.in: Add s390 IPA files.
2738 * configure.srv: Build IPA for s390.
2739 * linux-s390-ipa.c: New file.
2740 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2741 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2742 (tdesc_s390_linux32): Likewise.
2743 (init_registers_s390_linux32v1): Likewise.
2744 (tdesc_s390_linux32v1): Likewise.
2745 (init_registers_s390_linux32v2): Likewise.
2746 (tdesc_s390_linux32v2): Likewise.
2747 (init_registers_s390_linux64): Likewise.
2748 (tdesc_s390_linux64): Likewise.
2749 (init_registers_s390_linux64v1): Likewise.
2750 (tdesc_s390_linux64v1): Likewise.
2751 (init_registers_s390_linux64v2): Likewise.
2752 (tdesc_s390_linux64v2): Likewise.
2753 (init_registers_s390_te_linux64): Likewise.
2754 (tdesc_s390_te_linux64): Likewise.
2755 (init_registers_s390_vx_linux64): Likewise.
2756 (tdesc_s390_vx_linux64): Likewise.
2757 (init_registers_s390_tevx_linux64): Likewise.
2758 (tdesc_s390_tevx_linux64): Likewise.
2759 (init_registers_s390x_linux64): Likewise.
2760 (tdesc_s390x_linux64): Likewise.
2761 (init_registers_s390x_linux64v1): Likewise.
2762 (tdesc_s390x_linux64v1): Likewise.
2763 (init_registers_s390x_linux64v2): Likewise.
2764 (tdesc_s390x_linux64v2): Likewise.
2765 (init_registers_s390x_te_linux64): Likewise.
2766 (tdesc_s390x_te_linux64): Likewise.
2767 (init_registers_s390x_vx_linux64): Likewise.
2768 (tdesc_s390x_vx_linux64): Likewise.
2769 (init_registers_s390x_tevx_linux64): Likewise.
2770 (tdesc_s390x_tevx_linux64): Likewise.
2771 (have_hwcap_s390_vx): New static variable.
2772 (s390_arch_setup): Fill have_hwcap_s390_vx.
2773 (s390_get_thread_area): New function.
2774 (s390_ft_entry_gpr_esa): New const.
2775 (s390_ft_entry_gpr_zarch): New const.
2776 (s390_ft_entry_misc): New const.
2777 (s390_ft_entry_fr): New const.
2778 (s390_ft_entry_vr): New const.
2779 (s390_ft_main_31): New const.
2780 (s390_ft_main_64): New const.
2781 (s390_ft_exit_fr): New const.
2782 (s390_ft_exit_vr): New const.
2783 (s390_ft_exit_misc): New const.
2784 (s390_ft_exit_gpr_esa): New const.
2785 (s390_ft_exit_gpr_zarch): New const.
2786 (append_insns): New function.
2787 (s390_relocate_instruction): New function.
2788 (s390_install_fast_tracepoint_jump_pad): New function.
2789 (s390_get_min_fast_tracepoint_insn_len): New function.
2790 (s390_get_ipa_tdesc_idx): New function.
2791 (struct linux_target_ops): Wire in the above functions.
2792 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2793 * linux-s390-tdesc.h: New file.
2794
a4105d04
MK
27952016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2796
2797 * linux-s390-low.c (s390_supports_tracepoints): New function.
2798 (struct linux_target_ops): Fill supports_tracepoints hook.
2799
35ac8b3e
YQ
28002016-03-18 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-low.c (lwp_signal_can_be_delivered): New function.
2803 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2804
94610ec4
YQ
28052016-03-18 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2808 0 if signal is enqueued. Remove 'signal' from one debugging
2809 message. Move one debugging message to some lines below.
2810 Remove code setting 'signal' to 0.
2811
80aea927
YQ
28122016-03-18 Yao Qi <yao.qi@linaro.org>
2813
2814 * linux-low.c (linux_low_filter_event): Remove redundant
2815 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2816
b04fd3be
MK
28172016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2818
2819 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2820 (struct linux_target_ops): Wire in the above.
2821
c40c8d4b
YQ
28222016-03-03 Yao Qi <yao.qi@linaro.org>
2823
2824 * linux-low.c: Update comments to start_step_over.
2825
0f8288ae
YQ
28262016-03-03 Yao Qi <yao.qi@linaro.org>
2827
2828 PR server/19736
2829 * linux-low.c (handle_extended_wait): Set child suspended
2830 if event_lwp->bp_reinsert isn't zero.
2831
fdbd04a8
YQ
28322016-03-02 Yao Qi <yao.qi@linaro.org>
2833
2834 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2835 enqueue_pending_signal.
2836
6896a8fa
MK
28372016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2838
2839 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2840 is actually loaded.
2841
ab503087
MK
28422016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2843
2844 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2845 (s390_regmap_3264) [!__s390x__]: New global.
2846 (s390_collect_ptrace_register): Skip map entries containing -1.
2847 (s390_supply_ptrace_register): Ditto.
2848 (s390_fill_gprs_high): New function.
2849 (s390_store_gprs_high): New function.
2850 (s390_regsets): Add NT_S390_HIGH_GPRS.
2851 (s390_get_hwcap): Enable on 31-bit.
2852 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2853 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2854 Detect NT_S390_HIGH_GPRS.
2855 (s390_usrregs_info_3264): Enable on 31-bit.
2856 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2857 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2858
ae91f625
MK
28592016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2860
2861 PR gdb/13808
2862 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2863 * configure.srv: Ditto.
2864 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2865 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2866 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2867 (init_registers_amd64_linux): Remove prototype.
2868 (tdesc_amd64_linux): Remove declaration.
2869 (get_ipa_tdesc): New function.
2870 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2871 initialize remaining tdescs.
2872 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2873 (init_registers_i386_linux): Remove prototype.
2874 (tdesc_i386_linux): Remove declaration.
2875 (get_ipa_tdesc): New function.
2876 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2877 initialize remaining tdescs.
2878 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2879 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2880 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2881 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2882 (x86_get_ipa_tdesc_idx): New function.
2883 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2884 * linux-x86-tdesc.h: New file.
2885 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2886 (target_get_ipa_tdesc_idx): New macro.
2887 * tracepoint.c (ipa_tdesc_idx): New macro.
2888 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2889 (symbol_list): Add ipa_tdesc_idx.
2890 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2891 (ipa_tdesc): Remove.
2892 (ipa_tdesc_idx): New variable.
2893 (get_context_regcache): Use get_ipa_tdesc.
2894 (gdb_collect): Ditto.
2895 (gdb_probe): Ditto.
2896 * tracepoint.h (get_ipa_tdesc): New prototype.
2897 (ipa_tdesc): Remove.
2898
e7ad2f14
PA
28992016-02-24 Pedro Alves <palves@redhat.com>
2900
2901 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2902 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2903 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2904 Factor out common code between the USE_SIGTRAP_SIGINFO and
2905 !USE_SIGTRAP_SIGINFO blocks.
2906 (linux_low_filter_event): Call save_stop_reason instead of
2907 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2908 Update comments.
2909 (linux_wait_1): Update comments.
2910
657f9cde
WW
29112016-02-24 Wei-cheng Wang <cole945@gmail.com>
2912
2913 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2914 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2915 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2916 ppc_insert_point, ppc_remove_point.
2917
b00b61e1
MK
29182016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2919
2920 * linux-s390-low.c (s390_supports_z_point_type): New function.
2921 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2922
553cb527
YQ
29232016-02-16 Yao Qi <yao.qi@linaro.org>
2924
2925 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2926 PC. Get pc from regcache_read_pc.
2927
a5652c21
YQ
29282016-02-12 Yao Qi <yao.qi@linaro.org>
2929
2930 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2931 or linux_get_pc_32bit.
2932 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2933
ed443b61
YQ
29342016-02-12 Yao Qi <yao.qi@linaro.org>
2935
2936 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2937 arm_linux_get_next_pcs_fixup.
2938
020ecd38
MK
29392016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2940
2941 * tracepoint.c (x_tracepoint_action_download): Change
2942 write_inferior_data_ptr to write_inferior_data_pointer.
2943 (cmd_qtstart): Likewise.
2944 (write_inferior_data_ptr): Remove.
2945 (download_agent_expr): Change write_inferior_data_ptr to
2946 write_inferior_data_pointer.
2947 (download_tracepoint_1): Likewise.
2948 (download_tracepoint): Likewise.
2949 (download_trace_state_variables): Likewise.
2950
7cae9051
WW
29512016-02-11 Wei-cheng Wang <cole945@gmail.com>
2952 Marcin Kościelnicki <koriakin@0x04.net>
2953
2954 * tracepoint.c (struct tracepoint_action_ops): Remove.
2955 (struct tracepoint_action): Remove ops.
2956 (m_tracepoint_action_download, r_tracepoint_action_download)
2957 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2958 size and offset accordingly.
2959 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2960 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2961 (tracepoint_action_send, tracepoint_action_download): New functions.
2962 Helpers for trace action handlers.
2963 (add_tracepoint_action): Remove setup actions ops.
2964 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2965
9f6a71b4
YQ
29662016-02-10 Yao Qi <yao.qi@linaro.org>
2967
2968 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2969
1e94266c
SM
29702016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2971
2972 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2973 to AC_OUTPUT.
2974 * configure: Regenerate.
2975
8adce034
SM
29762016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2977
2978 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2979 void * to gdb_byte *.
2980 * linux-low.c (siginfo_fixup): Likewise.
2981 (linux_xfer_siginfo): Likewise.
2982 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2983 Likewise.
2984 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2985
93813b37
WT
29862016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2987
2988 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2989 to srv_tgtobj.
2990 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2991 to srv_tgtobj.
2992 * linux-x86-low.c [__x86_64__]: Include
2993 "nat/amd64-linux-siginfo.h".
2994 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2995 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2996 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2997 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2998 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2999 (cpt_si_fd, si_timerid, si_overrun): Move from
3000 nat/amd64-linux-siginfo.c.
3001 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3002
8424cc97
SM
30032016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3004
3005 * server.c (skip_to_semicolon): Remove.
3006 (process_point_options): Use strchrnul instead of
3007 skip_to_semicolon.
3008
4d18591b
YQ
30092016-01-26 Yao Qi <yao.qi@linaro.org>
3010
3011 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3012 * linux-low.c (install_software_single_step_breakpoints): Don't
3013 call regcache_read_pc.
3014 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3015 argument pc.
3016
d8020970
YQ
30172016-01-26 Yao Qi <yao.qi@linaro.org>
3018
3019 * linux-low.c (install_software_single_step_breakpoints): Call
3020 regcache_read_pc instead of get_pc.
3021
8b207339
YQ
30222016-01-26 Yao Qi <yao.qi@linaro.org>
3023
3024 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3025 (unblock_async_io): Rename to ...
3026 (block_unblock_async_io): ... it. New function.
3027 (enable_async_io): Don't install SIGIO handler. Unblock it
3028 instead.
3029 (disable_async_io): Don't ignore SIGIO. Block it instead.
3030 (initialize_async_io): Install SIGIO handler. Don't call
3031 unblock_async_io.
3032
18879fef
YQ
30332016-01-26 Yao Qi <yao.qi@linaro.org>
3034
3035 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3036 first character is '\003', call *the_target->request_interrupt.
3037
a0f8e08a
YQ
30382016-01-25 Yao Qi <yao.qi@linaro.org>
3039
3040 * remote-utils.c (new_thread_notify): Remove.
3041 (dead_thread_notify): Likewise.
3042 * remote-utils.h (new_thread_notify): Remove declaration.
3043 (dead_thread_notify): Likewise.
3044
cc5fd9ab
MK
30452016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3046
3047 * gdb.trace/pending.exp: Fix expected message on continue.
3048
99e8eb11
MK
30492016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3050
3051 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3052 it works properly on big-endian machines where sizeof (CORE_ADDR)
3053 != sizeof (void *).
3054
a994041d
PA
30552016-01-21 Pedro Alves <palves@redhat.com>
3056
3057 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3058 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3059 * configure: Regenerate.
3060
f7a6a40d
YQ
30612016-01-21 Yao Qi <yao.qi@linaro.org>
3062
3063 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3064 is_thumb and set it according to CPSR saved on the stack.
3065 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3066 arm_sigreturn_next_pc.
3067
6f69e520
YQ
30682016-01-18 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-low.c (linux_set_pc_64bit): New function.
3071 (linux_get_pc_64bit): New function.
3072 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3073 Declare.
3074 * linux-sparc-low.c (debug_threads): Remove declaration.
3075 (sparc_get_pc): Remove.
3076 (the_low_target): Use linux_get_pc_64bit instead of
3077 sparc_get_pc.
3078 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3079 (the_low_target): Use linux_get_pc_64bit and
3080 linux_set_pc_64bit.
3081
276d4552
YQ
30822016-01-18 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-arm-low.c (debug_threads): Remove declaration.
3085 (arm_get_pc, arm_set_pc): Remove.
3086 (the_low_target): Use linux_get_pc_32bit and
3087 linux_set_pc_32bit.
3088 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3089 (the_low_target): Use linux_get_pc_32bit and
3090 linux_set_pc_32bit.
3091 * linux-cris-low.c (debug_threads): Remove declaration.
3092 (cris_get_pc, cris_set_pc,): Remove.
3093 (the_low_target): Use linux_get_pc_32bit and
3094 linux_set_pc_32bit.
3095 * linux-crisv32-low.c (debug_threads): Remove declaration.
3096 (cris_get_pc, cris_set_pc): Remove.
3097 (the_low_target): Use linux_get_pc_32bit and
3098 linux_set_pc_32bit.
3099 * linux-low.c: Include inttypes.h.
3100 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3101 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3102 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3103 (the_low_target): Use linux_get_pc_32bit and
3104 linux_set_pc_32bit.
3105 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3106 (the_low_target): Use linux_get_pc_32bit and
3107 linux_set_pc_32bit.
3108 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3109 (the_low_target): Use linux_get_pc_32bit and
3110 linux_set_pc_32bit.
3111 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3112 (the_low_target): Use linux_get_pc_32bit and
3113 linux_set_pc_32bit.
3114 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3115 (the_low_target): Use linux_get_pc_32bit and
3116 linux_set_pc_32bit.
3117
eb0edac8
GB
31182016-01-18 Gary Benson <gbenson@redhat.com>
3119
3120 * configure.ac (AC_FUNC_FORK): New check.
3121 * config.in: Regenerate.
3122 * configure: Likewise.
3123
1b451dda
YQ
31242016-01-14 Yao Qi <yao.qi@linaro.org>
3125
3126 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3127 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3128 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3129 arm_get_next_pcs_ctor.
3130
82075af2
JS
31312016-01-12 Josh Stone <jistone@redhat.com>
3132 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3133
3134 * inferiors.h: Include "gdb_vecs.h".
3135 (struct process_info): Add syscalls_to_catch.
3136 * inferiors.c (remove_process): Free syscalls_to_catch.
3137 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3138 syscall_return stops.
3139 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3140 * server.c (handle_general_set): Handle QCatchSyscalls.
3141 (handle_query): Report support for QCatchSyscalls.
3142 * target.h (struct target_ops): Add supports_catch_syscall.
3143 (target_supports_catch_syscall): New macro.
3144 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3145 (struct lwp_info): Add syscall_state.
3146 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3147 Maintain syscall_state and syscalls_to_catch across exec.
3148 (get_syscall_trapinfo): New function, proxy to the_low_target.
3149 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3150 (linux_low_filter_event): Toggle syscall_state entry/return for
3151 syscall traps, and set it ignored for all others.
3152 (gdb_catching_syscalls_p): New function.
3153 (gdb_catch_this_syscall_p): New function.
3154 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3155 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3156 (linux_supports_catch_syscall): New function.
3157 (linux_target_ops): Install it.
3158 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3159 (the_low_target): Install it.
3160
8f13a3ce
MF
31612016-01-12 Mike Frysinger <vapier@gentoo.org>
3162
3163 * acinclude.m4: Include new ../warning.m4 file.
3164 * configure: Regenerated.
3165 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3166
5b3da067
MF
31672016-01-12 Mike Frysinger <vapier@gentoo.org>
3168
3169 * ax.c (is_goto_target): Mark static.
3170 * linux-low.c (register_addr): Likewise.
3171 (linux_fetch_registers, linux_store_registers): Likewise.
3172 * mem-break.c (any_persistent_commands): Fix old prototype.
3173 (add_commands_to_breakpoint): Mark static.
3174 * regcache.c (find_register_by_name): Delete unused func.
3175 * remote-utils.c (hex_or_minus_one): Mark static.
3176 * server.c (monitor_show_help): Mark static.
3177 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3178 handle_v_requests): Likewise.
3179
bc504a31
PA
31802016-01-12 Pedro Alves <palves@redhat.com>
3181
3182 Remove use of the registered trademark symbol throughout.
3183
5a0dd67a
YQ
31842016-01-08 Yao Qi <yao.qi@linaro.org>
3185
3186 * remote-utils.c (getpkt): If c is '\003', call target hook
3187 request_interrupt.
3188
b2ca446f
YQ
31892016-01-06 Yao Qi <yao.qi@linaro.org>
3190
3191 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3192 linux-aarch32-low.c.
3193 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3194 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3195 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3196 (thumb2_breakpoint): Declare.
3197 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3198 linux-aarch32-low.h.
3199 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3200 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3201 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3202
edd88788
JB
32032016-01-01 Joel Brobecker <brobecker@adacore.com>
3204
3205 * gdbreplay.c (gdbreplay_version): Change copyright year in
3206 version message.
3207 * server.c (gdbserver_version): Likewise.
3208
65da7f14
PP
32092015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3210
3211 * server.c (crc32_table): Delete.
3212 (crc32): Use libiberty's xcrc32 function.
3213
4abd5ed2
JB
32142015-12-22 Joel Brobecker <brobecker@adacore.com>
3215
3216 * lynx-low.c (lynx_delete_thread_callback): New function.
3217 (lynx_mourn): Properly delete our process and all of its
3218 threads. Remove call to clear_inferiors.
3219
0e50fe5c
JB
32202015-12-22 Joel Brobecker <brobecker@adacore.com>
3221
3222 * target.c (thread_search_callback): Add check that
3223 the thread_stopped target callback is not NULL before
3224 calling it.
3225
35adc03f
YQ
32262015-12-21 Yao Qi <yao.qi@linaro.org>
3227
3228 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3229 arm breakpoint.
3230
bd2b2909
AT
32312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3232
3233 * server.c (handle_query): Call target_supports_software_single_step.
3234
7fe5e27e
AT
32352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3236
3237 * linux-low.c (single_step): New function.
3238 (linux_resume_one_lwp_throw): Call single_step.
3239 (start_step_over): Likewise.
3240
d9311bfa
AT
32412015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3242
3243 * Makefile.in (SFILES): Append arch/arm-linux.c,
3244 arch/arm-get-next-pcs.c.
3245 (arm-linux.o): New rule.
3246 (arm-get-next-pcs.o): New rule.
3247 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3248 arm-linux.o.
3249 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3250 to linux-aarch32-low.c.
3251 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3252 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3253 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3254 (thumb2_breakpoint_len): Likewise.
3255 (arm_is_thumb_mode): Make non-static.
3256 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3257 from linux-aarch32-low.c.
3258 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3259 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3260 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3261 (thumb2_breakpoint_len): Likewise.
3262 (arm_is_thumb_mode): New declaration.
3263 * linux-arm-low.c: Include arch/arm-linux.h
3264 aarch/arm-get-next-pcs.h, sys/syscall.h.
3265 (get_next_pcs_ops): New struct.
3266 (get_next_pcs_addr_bits_remove): New function.
3267 (get_next_pcs_is_thumb): New function.
3268 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3269 (arm_sigreturn_next_pc): Likewise.
3270 (get_next_pcs_syscall_next_pc): Likewise.
3271 (arm_gdbserver_get_next_pcs): Likewise.
3272 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3273 Initialize.
3274 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3275 * server.h: Include gdb_vecs.h.
3276
68ce2059
AT
32772015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3278
3279 * Makefile.in (SFILES): Append common/common-regcache.c.
3280 (OBS): Append common-regcache.o.
3281 (common-regcache.o): New rule.
3282 * regcache.c (init_register_cache): Initialize cache to
3283 REG_UNAVAILABLE.
3284 (regcache_raw_read_unsigned): New function.
3285 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3286 register_status enum.
3287
fa5308bd
AT
32882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3289
3290 * linux-aarch64-low.c (the_low_targets): Rename
3291 breakpoint_reinsert_addr to get_next_pcs.
3292 * linux-arm-low.c (the_low_targets): Likewise.
3293 * linux-bfin-low.c (the_low_targets): Likewise.
3294 * linux-cris-low.c (the_low_targets): Likewise.
3295 * linux-crisv32-low.c (the_low_targets): Likewise.
3296 * linux-low.c (can_software_single_step): Likewise.
3297 (install_software_single_step_breakpoints): New function.
3298 (start_step_over): Use install_software_single_step_breakpoints.
3299 * linux-low.h: New CORE_ADDR vector.
3300 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3301 get_next_pcs.
3302 * linux-mips-low.c (the_low_targets): Likewise.
3303 * linux-nios2-low.c (the_low_targets): Likewise.
3304 * linux-sparc-low.c (the_low_targets): Likewise.
3305
4a6ed09b
PA
33062015-12-17 Pedro Alves <palves@redhat.com>
3307
3308 * linux-low.c (linux_kill_one_lwp): Remove references to
3309 LinuxThreads.
3310 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3311 to 'kill'.
3312 (linux_init_signals): Delete.
3313 (initialize_low): Adjust.
3314 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3315
7544db95
PA
33162015-12-16 Pedro Alves <palves@redhat.com>
3317
3318 * configure.ac (compiler warning flags): When testing a
3319 -Wno-foo option, check whether -Wfoo works instead.
3320 * configure: Regenerate.
3321
8020350c
DB
33222015-12-11 Don Breazeal <donb@codesourcery.com>
3323
3324 * server.c (process_serial_event): Don't exit from gdbserver
3325 in remote mode if there are still active inferiors.
3326
db91f502
YQ
33272015-12-11 Yao Qi <yao.qi@linaro.org>
3328
3329 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3330 arm_breakpoint_at if the process is 32-bit.
3331
b37a6290
YQ
33322015-12-11 Yao Qi <yao.qi@linaro.org>
3333
3334 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3335 arm breakpoint.
3336
17b1509a
YQ
33372015-12-07 Yao Qi <yao.qi@linaro.org>
3338
3339 * configure.srv: Append arm.o to srv_tgtobj for
3340 aarch64*-*-linux* target.
3341 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3342 from linux-arm-low.c.
3343 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3344 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3345 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3346 (thumb2_breakpoint_len): Likewise.
3347 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3348 (arm_breakpoint_kinds): Likewise.
3349 (arm_breakpoint_kind_from_pc): Likewise.
3350 (arm_sw_breakpoint_from_kind): Likewise.
3351 (arm_breakpoint_kind_from_current_state): Likewise.
3352 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3353 (arm_sw_breakpoint_from_kind): Declare.
3354 (arm_breakpoint_kind_from_current_state): Declare.
3355 (arm_breakpoint_at): Declare.
3356 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3357 arm_sw_breakpoint_from_kind if process is 32-bit.
3358 (aarch64_breakpoint_kind_from_pc): New function.
3359 (aarch64_breakpoint_kind_from_current_state): New function.
3360 (the_low_target): Initialize fields breakpoint_kind_from_pc
3361 and breakpoint_kind_from_current_state.
3362 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3363 linux-aarch32-low.c.
3364 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3365 (arm_breakpoint, arm_breakpoint_len): Likewise.
3366 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3367 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3368 (arm_is_thumb_mode): Likewise.
3369 (arm_breakpoint_at): Likewise.
3370 (arm_breakpoint_kind_from_pc): Likewise.
3371 (arm_sw_breakpoint_from_kind): Likewise.
3372 (arm_breakpoint_kind_from_current_state): Likewise.
3373
3374 Revert:
3375 2015-08-04 Yao Qi <yao.qi@linaro.org>
3376
3377 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3378 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3379 * server.c (extended_protocol): Remove "static".
3380 * server.h (extended_protocol): Declare it.
3381
ece66d65
JS
33822015-12-04 Josh Stone <jistone@redhat.com>
3383
3384 * target.h (struct target_ops) <arch_setup>: Rename to ...
3385 (struct target_ops) <post_create_inferior>: ... this.
3386 (target_arch_setup): Rename to ...
3387 (target_post_create_inferior): ... this, calling post_create_inferior.
3388 * server.c (start_inferior): Update target_arch_setup calls to
3389 target_post_create_inferior.
3390 * linux-low.c (linux_low_ptrace_options): Forward declare.
3391 (linux_arch_setup): Update its comment for general use.
3392 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3393 (struct linux_target_ops): Use linux_post_create_inferior.
3394 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3395 to post_create_inferior.
3396 * nto-low.c (struct nto_target_ops): Likewise.
3397 * spu-low.c (struct spu_target_ops): Likewise.
3398 * win32-low.c (struct win32_target_ops): Likewise.
3399
e58c48b4
AT
34002015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3401
3402 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3403
fbec8956
AT
34042015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3405
3406 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3407 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3408 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3410 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3411 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3412 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3413 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3414 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3415 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3416 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3417 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3418
9b4c5f87
AT
34192015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3420
3421 * linux-low.c (linux_look_up_symbols): Don't call
3422 linux_supports_traceclone.
3423 * linux-low.h (thread_db_init): Remove use_events argument.
3424 * thread-db.c (thread_db_use_event): Remove global variable.
3425 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3426 (struct thread_db) <td_create_bp>: Remove field.
3427 (thread_db_create_event): Remove function.
3428 (thread_db_enable_reporting): Likewise.
3429 (find_one_thread): Don't check for thread_db_use_events.
3430 (attach_thread): Likewise.
3431 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3432 (try_thread_db_load_1): Don't check for thread_db_use_events.
3433 (thread_db_init): Remove use_events argument and thread events
3434 handling.
3435 (remove_thread_event_breakpoints): Remove function.
3436 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3437
7d00775e
AT
34382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3439
3440 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3441 New function.
3442 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3443 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3445 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3446 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3447 Initialize.
3448 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3449 New function.
3450 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3451 * linux-low.c (can_hardware_single_step): Use
3452 supports_hardware_single_step.
3453 (can_software_single_step): New function.
3454 (start_step_over): Call can_software_single_step.
3455 (linux_supports_hardware_single_step): New function.
3456 (struct target_ops) <supports_software_single_step>: Initialize.
3457 * linux-low.h (struct linux_target_ops)
3458 <supports_hardware_single_step>: Initialize.
3459 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3461 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3462 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3463 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3464 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3465 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3466 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3467 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3468 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3469 Initialize.
3470 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3471 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3472 Initialize.
3473 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3474 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3475 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3476 New function.
3477 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3478 * target.h (struct target_ops): <supports_software_single_step>:
3479 New field.
3480 (target_supports_software_single_step): New macro.
3481
2d97cd35
AT
34822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3483
3484 * linux-low.c (linux_wait_1): Fix pc advance condition.
3485 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3486 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3487
769ef81f
AT
34882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3489
3490 * linux-arm-low.c (arm_is_thumb_mode): New function.
3491 (arm_breakpoint_at): Use arm_is_thumb_mode.
3492 (arm_breakpoint_kind_from_current_state): New function.
3493 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3494 Initialize.
3495 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3496 (linux_breakpoint_kind_from_current_state): New function.
3497 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3498 * linux-low.h (struct linux_target_ops)
3499 <breakpoint_kind_from_current_state>: New field.
3500 * target.h (struct target_ops): Likewise.
3501 (target_breakpoint_kind_from_current_state): New macro.
3502
1bebeeca
PA
35032015-11-30 Pedro Alves <palves@redhat.com>
3504
3505 * linux-low.c (linux_resume): Wake up the event loop before
3506 returning.
3507
a67a9fae
PA
35082015-11-30 Pedro Alves <palves@redhat.com>
3509
3510 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3511 check.
3512 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3513 to -1.
3514 * target.c (struct thread_search): New structure.
3515 (thread_search_callback): New function.
3516 (prev_general_thread): New global.
3517 (prepare_to_access_memory, done_accessing_memory): New functions.
3518 * target.h (prepare_to_access_memory, done_accessing_memory):
3519 Replace macros with function declarations.
3520
f2faf941
PA
35212015-11-30 Pedro Alves <palves@redhat.com>
3522
3523 PR 14618
3524 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3525 report TARGET_WAITKIND_NO_RESUMED.
3526 * remote-utils.c (prepare_resume_reply): Handle
3527 TARGET_WAITKIND_NO_RESUMED.
3528 * server.c (report_no_resumed): New global.
3529 (handle_query) <qSupported>: Handle "no-resumed+". Report
3530 "no-resumed+" support.
3531 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3532 return error if the client doesn't support no-resumed events.
3533 (push_stop_notification): New function.
3534 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3535 events if the client supports them.
3536
a681f9c9
PA
35372015-11-30 Pedro Alves <palves@redhat.com>
3538
3539 * linux-low.c (thread_still_has_status_pending_p): Don't check
3540 vCont;t here.
3541 (lwp_resumed): New function.
3542 (status_pending_p_callback): Return early if the LWP is not
3543 supposed to be resumed.
3544
65706a29
PA
35452015-11-30 Pedro Alves <palves@redhat.com>
3546
3547 * linux-low.c (handle_extended_wait): Assert that the LWP's
3548 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3549 thread create events, leave the new child's status pending.
3550 (linux_low_filter_event): If GDB wants to hear about thread exit
3551 events, leave the LWP marked dead and don't delete it.
3552 (linux_wait_for_event_filtered): Don't check for thread exit.
3553 (filter_exit_event): New function.
3554 (linux_wait_1): Use it, when returning an exit event.
3555 (linux_resume_one_lwp_throw): Assert that the LWP's
3556 waitstatus is TARGET_WAITKIND_IGNORE.
3557 * remote-utils.c (prepare_resume_reply): Handle
3558 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3559 * server.c (report_thread_events): New global.
3560 (handle_general_set): Handle QThreadEvents.
3561 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3562 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3563 TARGET_WAITKIND_THREAD_EXITED.
3564 * server.h (report_thread_events): Declare.
3565
56cf4bed
PA
35662015-11-30 Pedro Alves <palves@redhat.com>
3567
3568 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3569 the thread's last_resume_kind was resume_stop.
3570
500c1d85
PA
35712015-11-30 Pedro Alves <palves@redhat.com>
3572
3573 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3574 before returning.
3575
de979965
PA
35762015-11-30 Pedro Alves <palves@redhat.com>
3577
3578 * server.c (handle_v_requests): Handle vCtrlC.
3579
34c65914
PA
35802015-11-30 Pedro Alves <palves@redhat.com>
3581
3582 * gdbthread.h (find_any_thread_of_pid): Declare.
3583 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3584 functions.
3585 * server.c (handle_query): If current_thread is NULL, look for
3586 another thread of the selected process.
3587
79efa585 35882015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3589 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3590
3591 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3592 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3593 name in reply.
3594 * target.h (struct target_ops) <thread_name>: New field.
3595 (target_thread_name): New macro.
3596
80d82c19
JB
35972015-11-23 Joel Brobecker <brobecker@adacore.com>
3598
3599 * regcache.h (regcache_invalidate_pid): Add declaration.
3600 * regcache.c (regcache_invalidate_pid): New function, extracted
3601 from regcache_invalidate.
3602 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3603 Add trivial documentation comment.
3604 * lynx-low.c: Use regcache_invalidate_pid instead of
3605 regcache_invalidate.
3606
64da5dd5
JB
36072015-11-23 Joel Brobecker <brobecker@adacore.com>
3608
3609 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3610 and Elf64_auxv_t if the target is Android.
3611
37ce4055
DE
36122015-11-22 Doug Evans <xdje42@gmail.com>
3613
3614 * target.h: #include <sys/types.h>.
3615
06e03fff
PA
36162015-11-19 Pedro Alves <palves@redhat.com>
3617
3618 * linux-low.c (linux_process_qsupported): Change prototype.
3619 Adjust.
3620 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3621 Change prototype.
3622 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3623 and adjust to loop over all features.
3624 * server.c (handle_query) <qSupported>: Adjust to call
3625 target_process_qsupported once, passing it a vector of unprocessed
3626 features.
3627 * target.h (struct target_ops) <process_qsupported>: Change
3628 prototype.
3629 (target_process_qsupported): Adjust.
3630
9a084706
PA
36312015-11-19 Pedro Alves <palves@redhat.com>
3632
3633 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3634 mode.
3635 * configure: Regenerate.
3636
dad44a1f
PA
36372015-11-19 Pedro Alves <palves@redhat.com>
3638
3639 * configure: Regenerate.
3640
231c0592
YQ
36412015-11-19 Yao Qi <yao.qi@linaro.org>
3642
3643 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3644 type to uint32_t.
3645
6c1c9a8b
YQ
36462015-11-19 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3649 (struct aarch64_operand): Move enum out.
3650
9caa3311
YQ
36512015-11-19 Yao Qi <yao.qi@linaro.org>
3652
3653 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3654 struct user_fpsimd_state *.
3655 (aarch64_store_fpregset): Likewise.
3656
6a69a054
YQ
36572015-11-19 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3660 struct user_pt_regs *.
3661 (aarch64_store_gregset): Likewise.
3662
1798301e
PA
36632015-11-18 Pedro Alves <palves@redhat.com>
3664
3665 * Makefile.in (all_object_files): Add $IPA_OBJS.
3666
ce7715e2
PA
36672015-11-17 Pedro Alves <palves@redhat.com>
3668
3669 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3670 GDB_SIGNAL_0 and gdb_signal_to_string.
3671
c0879059
PA
36722015-11-17 Pedro Alves <palves@redhat.com>
3673
3674 * win32-low.c (handle_output_debug_string): Remove parameter.
3675 (win32_kill): Remove our_status local and adjust call to
3676 handle_output_debug_string.
3677 (get_child_debug_event): Adjust call to
3678 handle_output_debug_string.
3679
1996e237
SM
36802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3681
3682 * linux-mips-low.c (mips_fill_gregset): Add cast.
3683 (mips_store_gregset): Likewise.
3684 (mips_fill_fpregset): Likewise.
3685 (mips_store_fpregset): Likewise.
3686
cbec665b
SM
36872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3688
3689 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3690 priv.
3691
eb3e3c67
SM
36922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3693
3694 * linux-mips-low.c (mips_linux_new_thread): Change type of
3695 watch_type to enum target_hw_bp_type.
3696
171de4b8
SM
36972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3698
3699 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3700 Change return type to arm_hwbp_type.
3701
04248ead
SM
37022015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3703
3704 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3705 (arm_store_gregset): Likewise.
3706 * linux-arm-low.c (arm_get_hwcap): Likewise.
3707 (arm_read_description): Likewise.
3708
04b3479c
SM
37092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3710
3711 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3712
2bc84e8a
SM
37132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3714
3715 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3716 (ppc_fill_vsxregset): Likewise.
3717 (ppc_store_vsxregset): Likewise.
3718 (ppc_fill_vrregset): Likewise.
3719 (ppc_store_vrregset): Likewise.
3720 (ppc_fill_evrregset): Likewise.
3721 (ppc_store_evrregset): Likewise.
3722
e6c5bb05
SM
37232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3724
3725 * linux-ppc-low.c (ppc_usrregs_info): Remove
3726 forward-declaration.
3727 (ppc_arch_setup): Move lower in file.
3728
7ea45d72
SM
37292015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3730
3731 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3732 (ps_pdwrite): Likewise.
3733
69291610
HW
37342015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3735
3736 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3737 to after assert checks.
3738
b42945fd
SM
37392015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3740
3741 * proc-service.c (ps_pdread): Add/adjust casts.
3742 (ps_pdwrite): Add/adjust casts.
3743
d6f85c84
SM
37442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3745
3746 * server.c (handle_search_memory_1): Cast return value of
3747 memmem.
3748
f98cd059
SM
37492015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3750
3751 * server.c (write_qxfer_response): Change type of data to
3752 gdb_byte *.
3753
d2412fa5
PA
37542015-10-29 Pedro Alves <palves@redhat.com>
3755
3756 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3757
c17414a2
PA
37582015-10-29 Pedro Alves <palves@redhat.com>
3759
3760 * tracepoint.c (clear_installed_tracepoints): Add casts.
3761
e053fbc4
PA
37622015-10-29 Pedro Alves <palves@redhat.com>
3763
3764 * server.c (handle_v_cont, process_serial_event): Add enum
3765 gdb_signal casts to signal parsing code.
3766
add67df8
PA
37672015-10-29 Pedro Alves <palves@redhat.com>
3768
3769 * linux-low.h (NULL_REGSET): Define.
3770 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3771 * linux-arm-low.c (arm_regsets): Likewise.
3772 * linux-crisv32-low.c (cris_regsets): Likewise.
3773 * linux-m68k-low.c (m68k_regsets): Likewise.
3774 * linux-mips-low.c (mips_regsets): Likewise.
3775 * linux-nios2-low.c (nios2_regsets): Likewise.
3776 * linux-ppc-low.c (ppc_regsets): Likewise.
3777 * linux-s390-low.c (s390_regsets): Likewise.
3778 * linux-sh-low.c (sh_regsets): Likewise.
3779 * linux-sparc-low.c (sparc_regsets): Likewise.
3780 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3781 * linux-tile-low.c (tile_regsets): Likewise.
3782 * linux-x86-low.c (x86_regsets): Likewise.
3783 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3784
50bc912a
PA
37852015-10-29 Pedro Alves <palves@redhat.com>
3786
3787 * linux-low.h (NULL_REGSET): Define.
3788 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3789 * linux-arm-low.c (arm_regsets): Likewise.
3790 * linux-crisv32-low.c (cris_regsets): Likewise.
3791 * linux-m68k-low.c (m68k_regsets): Likewise.
3792 * linux-mips-low.c (mips_regsets): Likewise.
3793 * linux-nios2-low.c (nios2_regsets): Likewise.
3794 * linux-ppc-low.c (ppc_regsets): Likewise.
3795 * linux-s390-low.c (s390_regsets): Likewise.
3796 * linux-sh-low.c (sh_regsets): Likewise.
3797 * linux-sparc-low.c (sparc_regsets): Likewise.
3798 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3799 * linux-tile-low.c (tile_regsets): Likewise.
3800 * linux-x86-low.c (x86_regsets): Likewise.
3801 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3802
682b2546
DE
38032015-10-26 Doug Evans <dje@google.com>
3804
3805 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3806
963843d4
DE
38072015-10-26 Doug Evans <dje@google.com>
3808
3809 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3810
d41401ac
DE
38112015-10-26 Doug Evans <dje@google.com>
3812
3813 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3814 for debug_printf.
3815 (attach_thread, find_new_threads_callback): Ditto.
3816
3db28855
AT
38172015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3818
3819 * mem-break.h (set_breakpoint_data): Remove.
3820
fb78e89c
AT
38212015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3822
3823 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3824 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3825 (initialize_low): Remove set_breakpoint_data call.
3826 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3827 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3828 (initialize_low): Remove set_breakpoint_data call.
3829 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3830 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3831 (initialize_low): Remove set_breakpoint_data call.
3832
2e6ee069
AT
38332015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3834
3835 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3836 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3837 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3838 * target.h (target_breakpoint_kind_from_pc): New macro.
3839
1652a986
AT
38402015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3841
3842 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3843 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3844 the default breakpoint kind.
3845
abeead09
AT
38462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3847
3848 * linux-arm-low.c (arm_supports_z_point_type): Add software
3849 breakpoint support.
3850
b0b4b501
AT
38512015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3852
3853 * linux-arm-low.c: Refactor breakpoint definitions.
3854 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3855 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3856
8689682c
AT
38572015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3858
3859 * Makefile.in: Add arm.c/o.
3860 * configure.srv: Likewise.
3861 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3862 (arm_breakpoint_kind_from_pc): New function.
3863 (arm_sw_breakpoint_from_kind): Return proper kind.
3864 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3865
27165294
AT
38662015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3867
3868 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3869 removal.
3870 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3871 (struct raw_breakpoint) <size>: Remove.
3872 (struct raw_breakpoint) <kind>: Add.
3873 (bp_size): New function.
3874 (bp_opcode): Likewise.
3875 (find_raw_breakpoint_at): Adjust for kind.
3876 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3877 (remove_memory_breakpoint): Adjust for kind call bp_size.
3878 (set_raw_breakpoint_at): Adjust for kind.
3879 (set_breakpoint): Likewise.
3880 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3881 (delete_raw_breakpoint): Adjust for kind.
3882 (delete_breakpoint): Likewise.
3883 (find_gdb_breakpoint): Likewise.
3884 (set_gdb_breakpoint_1): Likewise.
3885 (set_gdb_breakpoint): Likewise.
3886 (delete_gdb_breakpoint_1): Likewise.
3887 (delete_gdb_breakpoint): Likewise.
3888 (uninsert_raw_breakpoint): Likewise.
3889 (reinsert_raw_breakpoint): Likewise.
3890 (set_breakpoint_data): Remove.
3891 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3892 (check_mem_read): Adjust for kind call bp_size.
3893 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3894 (clone_one_breakpoint): Adjust for kind.
3895 * mem-break.h (set_gdb_breakpoint): Likewise.
3896 (delete_gdb_breakpoint): Likewise.
3897 * server.c (process_serial_event): Likewise.
3898
dd373349
AT
38992015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3900
3901 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3902 (struct linux_target_ops) <breakpoint>: Remove.
3903 (struct linux_target_ops) <breakpoint_len>: Remove.
3904 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3905 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3906 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3907 (arm_sw_breakpoint_from_kind): New function.
3908 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3909 (struct linux_target_ops) <breakpoint>: Remove.
3910 (struct linux_target_ops) <breakpoint_len>: Remove.
3911 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3912 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3913 * linux-cris-low.c (cris_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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3919 (struct linux_target_ops) <breakpoint>: Remove.
3920 (struct linux_target_ops) <breakpoint_len>: Remove.
3921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3923 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3924 and sw_breakpoint_from_kind to increment the pc.
3925 (linux_breakpoint_kind_from_pc): New function.
3926 (linux_sw_breakpoint_from_kind): New function.
3927 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3928 (initialize_low): Call breakpoint_kind_from_pc and
3929 sw_breakpoint_from_kind to replace breakpoint_data/len.
3930 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3931 New field.
3932 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3933 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3934 (struct linux_target_ops) <breakpoint>: Remove.
3935 (struct linux_target_ops) <breakpoint_len>: Remove.
3936 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3937 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3938 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3939 (struct linux_target_ops) <breakpoint>: Remove.
3940 (struct linux_target_ops) <breakpoint_len>: Remove.
3941 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3942 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3943 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3944 (struct linux_target_ops) <breakpoint>: Remove.
3945 (struct linux_target_ops) <breakpoint_len>: Remove.
3946 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3947 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3948 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3949 (struct linux_target_ops) <breakpoint>: Remove.
3950 (struct linux_target_ops) <breakpoint_len>: Remove.
3951 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3952 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3953 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3954 (struct linux_target_ops) <breakpoint>: Remove.
3955 (struct linux_target_ops) <breakpoint_len>: Remove.
3956 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3957 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3958 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3959 (struct linux_target_ops) <breakpoint>: Remove.
3960 (struct linux_target_ops) <breakpoint_len>: Remove.
3961 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3962 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3963 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3964 (struct linux_target_ops) <breakpoint>: Remove.
3965 (struct linux_target_ops) <breakpoint_len>: Remove.
3966 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3967 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3968 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3969 (struct linux_target_ops) <breakpoint>: Remove.
3970 (struct linux_target_ops) <breakpoint_len>: Remove.
3971 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3972 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3973 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3974 (struct linux_target_ops) <breakpoint>: Remove.
3975 (struct linux_target_ops) <breakpoint_len>: Remove.
3976 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3978 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3979 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3980 (struct linux_target_ops) <breakpoint>: Remove.
3981 (struct linux_target_ops) <breakpoint_len>: Remove.
3982 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3983 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3984 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3985 (struct linux_target_ops) <breakpoint>: Remove.
3986 (struct linux_target_ops) <breakpoint_len>: Remove.
3987 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3988 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3989
4cd98a19
AT
39902015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3991
3992 * linux-cris-low.c (cris_get_pc): Remove void arg.
3993
774ee6d2
AR
39942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3995
3996 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3997 variable name.
3998
833dcd29
AR
39992015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4000
4001 * inferiors.c (thread_pid_matches_callback): New function.
4002 (find_thread_process): New function.
4003 (remove_thread): Reset current_thread.
4004 (remove_process): Assert threads have been removed first.
4005
8d689ee5
YQ
40062015-10-15 Yao Qi <yao.qi@linaro.org>
4007
4008 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4009 if it is 3.
4010 (aarch64_remove_point): Likewise.
4011 * regcache.c (regcache_register_size): New function.
4012
1c2e1515
YQ
40132015-10-12 Yao Qi <yao.qi@linaro.org>
4014
4015 * linux-aarch64-low.c: Update all callers as emit_load_store
4016 is renamed to aarch64_emit_load_store.
4017
e1c587c3
YQ
40182015-10-12 Yao Qi <yao.qi@linaro.org>
4019
4020 * linux-aarch64-low.c: Update all callers of function renaming
4021 from emit_insn to aarch64_emit_insn.
4022
b6542f81
YQ
40232015-10-12 Yao Qi <yao.qi@linaro.org>
4024
4025 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4026 arch/aarch64-insn.h.
4027 (struct aarch64_memory_operand): Likewise.
4028 (ENCODE): Likewise.
4029 (emit_insn): Move to arch/aarch64-insn.c.
4030 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4031 (emit_load_store): Move to arch/aarch64-insn.c.
4032 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4033 (can_encode_int32): Remove.
4034
246994ce
YQ
40352015-10-12 Yao Qi <yao.qi@linaro.org>
4036
4037 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4038 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4039 (aarch64_relocate_instruction): Likewise.
4040 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4041 (struct aarch64_insn_visitor): Likewise.
4042
0badd99f
YQ
40432015-10-12 Yao Qi <yao.qi@linaro.org>
4044
4045 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4046 (struct aarch64_insn_visitor): New.
4047 (struct aarch64_insn_relocation_data): New.
4048 (aarch64_ftrace_insn_reloc_b): New function.
4049 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4050 (aarch64_ftrace_insn_reloc_cb): Likewise.
4051 (aarch64_ftrace_insn_reloc_tb): Likewise.
4052 (aarch64_ftrace_insn_reloc_adr): Likewise.
4053 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4054 (aarch64_ftrace_insn_reloc_others): Likewise.
4055 (visitor): New.
4056 (aarch64_relocate_instruction): Use visitor.
4057
dfaffe9d
YQ
40582015-10-12 Yao Qi <yao.qi@linaro.org>
4059
4060 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4061 int. Add argument buf.
4062 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4063 aarch64_relocate_instruction.
4064
70b439f0
YQ
40652015-10-12 Yao Qi <yao.qi@linaro.org>
4066
4067 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4068 argument insn. Remove local variable insn. Don't call
4069 target_read_uint32.
4070 (aarch64_install_fast_tracepoint_jump_pad): Call
4071 target_read_uint32.
4072
7781c06f
YQ
40732015-09-30 Yao Qi <yao.qi@linaro.org>
4074
4075 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4076 (emit_load_store_pair): Likewise.
4077
9a3c8263
SM
40782015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4079
4080 * dll.c (match_dll): Add cast(s).
4081 (unloaded_dll): Likewise.
4082 * linux-low.c (second_thread_of_pid_p): Likewise.
4083 (delete_lwp_callback): Likewise.
4084 (count_events_callback): Likewise.
4085 (select_event_lwp_callback): Likewise.
4086 (linux_set_resume_request): Likewise.
4087 * server.c (accumulate_file_name_length): Likewise.
4088 (emit_dll_description): Likewise.
4089 (handle_qxfer_threads_worker): Likewise.
4090 (visit_actioned_threads): Likewise.
4091 * thread-db.c (any_thread_of): Likewise.
4092 * tracepoint.c (same_process_p): Likewise.
4093 (match_blocktype): Likewise.
4094 (build_traceframe_info_xml): Likewise.
4095
224c3ddb
SM
40962015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4097
4098 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4099 assignment.
4100 (gdb_unparse_agent_expr): Likewise.
4101 * hostio.c (require_data): Likewise.
4102 (handle_pread): Likewise.
4103 * linux-low.c (disable_regset): Likewise.
4104 (fetch_register): Likewise.
4105 (store_register): Likewise.
4106 (get_dynamic): Likewise.
4107 (linux_qxfer_libraries_svr4): Likewise.
4108 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4109 (set_fast_tracepoint_jump): Likewise.
4110 (uninsert_fast_tracepoint_jumps_at): Likewise.
4111 (reinsert_fast_tracepoint_jumps_at): Likewise.
4112 (validate_inserted_breakpoint): Likewise.
4113 (clone_agent_expr): Likewise.
4114 * regcache.c (init_register_cache): Likewise.
4115 * remote-utils.c (putpkt_binary_1): Likewise.
4116 (decode_M_packet): Likewise.
4117 (decode_X_packet): Likewise.
4118 (look_up_one_symbol): Likewise.
4119 (relocate_instruction): Likewise.
4120 (monitor_output): Likewise.
4121 * server.c (handle_search_memory): Likewise.
4122 (handle_qxfer_exec_file): Likewise.
4123 (handle_qxfer_libraries): Likewise.
4124 (handle_qxfer): Likewise.
4125 (handle_query): Likewise.
4126 (handle_v_cont): Likewise.
4127 (handle_v_run): Likewise.
4128 (captured_main): Likewise.
4129 * target.c (write_inferior_memory): Likewise.
4130 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4131 * tracepoint.c (init_trace_buffer): Likewise.
4132 (add_tracepoint_action): Likewise.
4133 (add_traceframe): Likewise.
4134 (add_traceframe_block): Likewise.
4135 (cmd_qtdpsrc): Likewise.
4136 (cmd_qtdv): Likewise.
4137 (cmd_qtstatus): Likewise.
4138 (response_source): Likewise.
4139 (response_tsv): Likewise.
4140 (cmd_qtnotes): Likewise.
4141 (gdb_collect): Likewise.
4142 (initialize_tracepoint): Likewise.
4143
afbe19f8
PL
41442015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4145
4146 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4147 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4148 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4149 <NOP>: New.
4150 (enum aarch64_condition_codes): New enum.
4151 (w0): New static global.
4152 (fp): Likewise.
4153 (lr): Likewise.
4154 (struct aarch64_memory_operand) <type>: New
4155 MEMORY_OPERAND_POSTINDEX type.
4156 (postindex_memory_operand): New helper function.
4157 (emit_ret): New function.
4158 (emit_load_store_pair): New function, factored out of emit_stp
4159 with support for MEMORY_OPERAND_POSTINDEX.
4160 (emit_stp): Rewrite using emit_load_store_pair.
4161 (emit_ldp): New function.
4162 (emit_load_store): Likewise.
4163 (emit_ldr): Mention post-index instruction in comment.
4164 (emit_ldrh): New function.
4165 (emit_ldrb): New function.
4166 (emit_ldrsw): Mention post-index instruction in comment.
4167 (emit_str): Likewise.
4168 (emit_subs): New function.
4169 (emit_cmp): Likewise.
4170 (emit_and): Likewise.
4171 (emit_orr): Likewise.
4172 (emit_orn): Likewise.
4173 (emit_eor): Likewise.
4174 (emit_mvn): Likewise.
4175 (emit_lslv): Likewise.
4176 (emit_lsrv): Likewise.
4177 (emit_asrv): Likewise.
4178 (emit_mul): Likewise.
4179 (emit_sbfm): Likewise.
4180 (emit_sbfx): Likewise.
4181 (emit_ubfm): Likewise.
4182 (emit_ubfx): Likewise.
4183 (emit_csinc): Likewise.
4184 (emit_cset): Likewise.
4185 (emit_nop): Likewise.
4186 (emit_ops_insns): New helper function.
4187 (emit_pop): Likewise.
4188 (emit_push): Likewise.
4189 (aarch64_emit_prologue): New function.
4190 (aarch64_emit_epilogue): Likewise.
4191 (aarch64_emit_add): Likewise.
4192 (aarch64_emit_sub): Likewise.
4193 (aarch64_emit_mul): Likewise.
4194 (aarch64_emit_lsh): Likewise.
4195 (aarch64_emit_rsh_signed): Likewise.
4196 (aarch64_emit_rsh_unsigned): Likewise.
4197 (aarch64_emit_ext): Likewise.
4198 (aarch64_emit_log_not): Likewise.
4199 (aarch64_emit_bit_and): Likewise.
4200 (aarch64_emit_bit_or): Likewise.
4201 (aarch64_emit_bit_xor): Likewise.
4202 (aarch64_emit_bit_not): Likewise.
4203 (aarch64_emit_equal): Likewise.
4204 (aarch64_emit_less_signed): Likewise.
4205 (aarch64_emit_less_unsigned): Likewise.
4206 (aarch64_emit_ref): Likewise.
4207 (aarch64_emit_if_goto): Likewise.
4208 (aarch64_emit_goto): Likewise.
4209 (aarch64_write_goto_address): Likewise.
4210 (aarch64_emit_const): Likewise.
4211 (aarch64_emit_call): Likewise.
4212 (aarch64_emit_reg): Likewise.
4213 (aarch64_emit_pop): Likewise.
4214 (aarch64_emit_stack_flush): Likewise.
4215 (aarch64_emit_zero_ext): Likewise.
4216 (aarch64_emit_swap): Likewise.
4217 (aarch64_emit_stack_adjust): Likewise.
4218 (aarch64_emit_int_call_1): Likewise.
4219 (aarch64_emit_void_call_2): Likewise.
4220 (aarch64_emit_eq_goto): Likewise.
4221 (aarch64_emit_ne_goto): Likewise.
4222 (aarch64_emit_lt_goto): Likewise.
4223 (aarch64_emit_le_goto): Likewise.
4224 (aarch64_emit_gt_goto): Likewise.
4225 (aarch64_emit_ge_got): Likewise.
4226 (aarch64_emit_ops_impl): New static global variable.
4227 (aarch64_emit_ops): New target function, return
4228 &aarch64_emit_ops_impl.
4229 (struct linux_target_ops): Install it.
4230
bb903df0
PL
42312015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4232
4233 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4234 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4235 aarch64-ipa.o.
4236 * linux-aarch64-ipa.c: New file.
4237 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4238 and endian.h.
4239 (aarch64_get_thread_area): New target method.
4240 (extract_signed_bitfield): New helper function.
4241 (aarch64_decode_ldr_literal): New function.
4242 (enum aarch64_opcodes): New enum.
4243 (struct aarch64_register): New struct.
4244 (struct aarch64_operand): New struct.
4245 (x0): New static global.
4246 (x1): Likewise.
4247 (x2): Likewise.
4248 (x3): Likewise.
4249 (x4): Likewise.
4250 (w2): Likewise.
4251 (ip0): Likewise.
4252 (sp): Likewise.
4253 (xzr): Likewise.
4254 (aarch64_register): New helper function.
4255 (register_operand): Likewise.
4256 (immediate_operand): Likewise.
4257 (struct aarch64_memory_operand): New struct.
4258 (offset_memory_operand): New helper function.
4259 (preindex_memory_operand): Likewise.
4260 (enum aarch64_system_control_registers): New enum.
4261 (ENCODE): New macro.
4262 (emit_insn): New helper function.
4263 (emit_b): New function.
4264 (emit_bcond): Likewise.
4265 (emit_cb): Likewise.
4266 (emit_tb): Likewise.
4267 (emit_blr): Likewise.
4268 (emit_stp): Likewise.
4269 (emit_ldp_q_offset): Likewise.
4270 (emit_stp_q_offset): Likewise.
4271 (emit_load_store): Likewise.
4272 (emit_ldr): Likewise.
4273 (emit_ldrsw): Likewise.
4274 (emit_str): Likewise.
4275 (emit_ldaxr): Likewise.
4276 (emit_stxr): Likewise.
4277 (emit_stlr): Likewise.
4278 (emit_data_processing_reg): Likewise.
4279 (emit_data_processing): Likewise.
4280 (emit_add): Likewise.
4281 (emit_sub): Likewise.
4282 (emit_mov): Likewise.
4283 (emit_movk): Likewise.
4284 (emit_mov_addr): Likewise.
4285 (emit_mrs): Likewise.
4286 (emit_msr): Likewise.
4287 (emit_sevl): Likewise.
4288 (emit_wfe): Likewise.
4289 (append_insns): Likewise.
4290 (can_encode_int32_in): New helper function.
4291 (aarch64_relocate_instruction): New function.
4292 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4293 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4294 (struct linux_target_ops): Install aarch64_get_thread_area,
4295 aarch64_install_fast_tracepoint_jump_pad and
4296 aarch64_get_min_fast_tracepoint_insn_len.
4297
787749ea
PL
42982015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4299
4300 * Makefile.in (aarch64-insn.o): New rule.
4301 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4302
9812b2e6
YQ
43032015-09-21 Yao Qi <yao.qi@linaro.org>
4304
4305 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4306
18fe412b
YQ
43072015-09-21 Yao Qi <yao.qi@linaro.org>
4308
4309 * tracepoint.c (max_jump_pad_size): Remove.
4310
a0cc84cd
YQ
43112015-09-18 Yao Qi <yao.qi@linaro.org>
4312
4313 * linux-aarch64-low.c: Don't include sys/uio.h.
4314 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4315
d78908cf
WW
43162015-09-16 Wei-cheng Wang <cole945@gmail.com>
4317
4318 * tracepoint.c (eval_result_type): Change prototype.
4319 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4320
d57e0d50
PA
43212015-09-15 Pedro Alves <palves@redhat.com>
4322
4323 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4324 Check whether to report exec events instead of checking whether
4325 multiprocess is enabled.
4326
5a676acc
PA
43272015-09-15 Pedro Alves <palves@redhat.com>
4328
4329 PR remote/18965
4330 * remote-utils.c (prepare_resume_reply): Merge
4331 TARGET_WAITKIND_VFORK_DONE switch case with the
4332 TARGET_WAITKIND_FORKED case.
4333
7c5d0fad
YQ
43342015-09-15 Yao Qi <yao.qi@linaro.org>
4335
4336 * server.c (handle_query): Check string comparison using
4337 "else if" instead of "if".
4338
750ce8d1
YQ
43392015-09-15 Yao Qi <yao.qi@linaro.org>
4340
4341 * server.c (vCont_supported): New global variable.
4342 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4343 matches. Append ";vContSupported+" to own_buf.
4344 (handle_v_requests): Append ";s;S" to own_buf if target supports
4345 hardware single step or vCont_supported is false.
4346 (capture_main): Set vCont_supported to zero.
4347
70b90b91
YQ
43482015-09-15 Yao Qi <yao.qi@linaro.org>
4349
4350 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4351 it to ...
4352 (linux_supports_hardware_single_step): ... New function.
4353 (linux_target_ops): Update.
4354 * lynx-low.c (lynx_target_ops): Set field
4355 supports_hardware_single_step to target_can_do_hardware_single_step.
4356 * nto-low.c (nto_target_ops): Likewise.
4357 * spu-low.c (spu_target_ops): Likewise.
4358 * win32-low.c (win32_target_ops): Likewise.
4359 * target.c (target_can_do_hardware_single_step): New function.
4360 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4361 Remove. <supports_hardware_single_step>: New field.
4362 (target_supports_conditional_breakpoints): Remove.
4363 (target_supports_hardware_single_step): New macro.
4364 (target_can_do_hardware_single_step): Declare.
4365 * server.c (handle_query): Use target_supports_hardware_single_step
4366 instead of target_supports_conditional_breakpoints.
4367
ade90bde
YQ
43682015-09-15 Yao Qi <yao.qi@linaro.org>
4369
4370 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4371 function.
4372 (struct linux_target_ops the_low_target): Install
4373 aarch64_linux_siginfo_fixup.
4374
94585166
DB
43752015-09-11 Don Breazeal <donb@codesourcery.com>
4376 Luis Machado <lgustavo@codesourcery.com>
4377
4378 * linux-low.c (linux_mourn): Static declaration.
4379 (linux_arch_setup): Move in front of
4380 handle_extended_wait.
4381 (linux_arch_setup_thread): New function.
4382 (handle_extended_wait): Handle exec events. Call
4383 linux_arch_setup_thread. Make event_lwp argument a
4384 pointer-to-a-pointer.
4385 (check_zombie_leaders): Do not check stopped threads.
4386 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4387 (linux_low_filter_event): Add lwp and thread for exec'ing
4388 non-leader thread if leader thread has been deleted.
4389 Refactor code into linux_arch_setup_thread and call it.
4390 Pass child lwp pointer by reference to handle_extended_wait.
4391 (linux_wait_for_event_filtered): Update comment.
4392 (linux_wait_1): Prevent clobbering exec event status.
4393 (linux_supports_exec_events): New function.
4394 (linux_target_ops) <supports_exec_events>: Initialize new member.
4395 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4396 new member.
4397 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4398 * server.c (report_exec_events): New global variable.
4399 (handle_query): Handle qSupported query for exec-events feature.
4400 (captured_main): Initialize report_exec_events.
4401 * server.h (report_exec_events): Declare new global variable.
4402 * target.h (struct target_ops) <supports_exec_events>: New
4403 member.
4404 (target_supports_exec_events): New macro.
4405 * win32-low.c (win32_target_ops) <supports_exec_events>:
4406 Initialize new member.
4407
0568462b
MM
44082015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4409
4410 * linux-low.c (linux_low_enable_btrace): Remove.
4411 (linux_target_ops): Replace linux_low_enable_btrace with
4412 linux_enable_btrace.
4413
39edd165
YQ
44142015-09-03 Yao Qi <yao.qi@linaro.org>
4415
4416 * linux-aarch64-low.c (aarch64_insert_point): Call
4417 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4418 returns true.
4419
1db33b5a
UW
44202015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4421
4422 * linux-low.c (check_stopped_by_breakpoint): Use
4423 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4424
ab290430
PA
44252015-08-27 Pedro Alves <palves@redhat.com>
4426
4427 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4428
8d749320
SM
44292015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4430
6711b7f8
SM
4431 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4432 the XNEW-family equivalent.
8d749320
SM
4433 (compile_bytecodes): Likewise.
4434 * dll.c (loaded_dll): Likewise.
4435 * event-loop.c (append_callback_event): Likewise.
4436 (create_file_handler): Likewise.
4437 (create_file_event): Likewise.
4438 * hostio.c (handle_open): Likewise.
4439 * inferiors.c (add_thread): Likewise.
4440 (add_process): Likewise.
4441 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4442 * linux-arm-low.c (arm_new_process): Likewise.
4443 (arm_new_thread): Likewise.
4444 * linux-low.c (add_to_pid_list): Likewise.
4445 (linux_add_process): Likewise.
4446 (handle_extended_wait): Likewise.
4447 (add_lwp): Likewise.
4448 (enqueue_one_deferred_signal): Likewise.
4449 (enqueue_pending_signal): Likewise.
4450 (linux_resume_one_lwp_throw): Likewise.
4451 (linux_resume_one_thread): Likewise.
4452 (linux_read_memory): Likewise.
4453 (linux_write_memory): Likewise.
4454 * linux-mips-low.c (mips_linux_new_process): Likewise.
4455 (mips_linux_new_thread): Likewise.
4456 (mips_add_watchpoint): Likewise.
4457 * linux-x86-low.c (initialize_low_arch): Likewise.
4458 * lynx-low.c (lynx_add_process): Likewise.
4459 * mem-break.c (set_raw_breakpoint_at): Likewise.
4460 (set_breakpoint): Likewise.
4461 (add_condition_to_breakpoint): Likewise.
4462 (add_commands_to_breakpoint): Likewise.
4463 (clone_agent_expr): Likewise.
4464 (clone_one_breakpoint): Likewise.
4465 * regcache.c (new_register_cache): Likewise.
4466 * remote-utils.c (look_up_one_symbol): Likewise.
4467 * server.c (queue_stop_reply): Likewise.
4468 (start_inferior): Likewise.
4469 (queue_stop_reply_callback): Likewise.
4470 (handle_target_event): Likewise.
4471 * spu-low.c (fetch_ppc_memory): Likewise.
4472 (store_ppc_memory): Likewise.
4473 * target.c (set_target_ops): Likewise.
4474 * thread-db.c (thread_db_load_search): Likewise.
4475 (try_thread_db_load_1): Likewise.
4476 * tracepoint.c (add_tracepoint): Likewise.
4477 (add_tracepoint_action): Likewise.
4478 (create_trace_state_variable): Likewise.
4479 (cmd_qtdpsrc): Likewise.
4480 (cmd_qtro): Likewise.
4481 (add_while_stepping_state): Likewise.
4482 * win32-low.c (child_add_thread): Likewise.
4483 (get_image_name): Likewise.
4484
ed8b7b42
YQ
44852015-08-25 Yao Qi <yao.qi@linaro.org>
4486
4487 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4488
db3cb7cb
YQ
44892015-08-25 Yao Qi <yao.qi@linaro.org>
4490
4491 * Makefile.in (aarch64-linux.o): New rule.
4492 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4493 srv_tgtobj.
4494 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4495 (aarch64_init_debug_reg_state): Make it extern.
4496 (aarch64_linux_prepare_to_resume): Remove.
4497
f6011a1c
YQ
44982015-08-25 Yao Qi <yao.qi@linaro.org>
4499
4500 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4501 lwp_arch_private_info and ptid_of_lwp.
4502
88e2cf7e
YQ
45032015-08-25 Yao Qi <yao.qi@linaro.org>
4504
4505 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4506 Find proc_info by find_process_pid. All callers updated.
4507
5e35436e
YQ
45082015-08-25 Yao Qi <yao.qi@linaro.org>
4509
4510 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4511 Remove.
4512 (debug_reg_change_callback): Remove.
4513 (aarch64_notify_debug_reg_change): Remove.
4514
4a8a7965
YQ
45152015-08-25 Yao Qi <yao.qi@linaro.org>
4516
4517 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4518 Call current_lwp_ptid.
4519
32a271ee
YQ
45202015-08-25 Yao Qi <yao.qi@linaro.org>
4521
4522 * linux-aarch64-low.c (debug_reg_change_callback): Use
4523 debug_printf.
4524
0d51c8d7
YQ
45252015-08-25 Yao Qi <yao.qi@linaro.org>
4526
4527 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4528
31a43dd5
YQ
45292015-08-25 Yao Qi <yao.qi@linaro.org>
4530
4531 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4532
8ee52567
YQ
45332015-08-25 Yao Qi <yao.qi@linaro.org>
4534
4535 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4536 the code.
4537
ff3f0f45
YQ
45382015-08-25 Yao Qi <yao.qi@linaro.org>
4539
4540 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4541 Remove.
4542 (debug_reg_change_callback): Remove argument entry and add argument
4543 lwp. Remove local variable thread. Don't print thread id in the
4544 debugging output. Don't check whether pid of thread equals to pid.
4545 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4546 iterate_over_lwps instead find_inferior.
4547
3d40fbb5
PA
45482015-08-24 Pedro Alves <palves@redhat.com>
4549
4550 * inferiors.c (get_first_process): New function.
4551 * inferiors.h (get_first_process): New declaration.
4552 * remote-utils.c (read_ptid): Default to the first process in the
4553 list, instead of to the current thread's process.
4554
438e1e42
PA
45552015-08-24 Pedro Alves <palves@redhat.com>
4556
4557 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4558 * event-loop.c: Likewise.
4559 * remote-utils.c: Likewise.
4560 * tracepoint.c: Likewise.
4561
a8c6d4fc
PA
45622015-08-24 Pedro Alves <palves@redhat.com>
4563
4564 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4565 ptid_get_lwp.
4566
99b0bb12
PA
45672015-08-21 Pedro Alves <palves@redhat.com>
4568
4569 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4570 instead of literal 1.
4571
f8904751
PA
45722015-08-21 Pedro Alves <palves@redhat.com>
4573
4574 * tdesc.c (default_description): Explicitly zero-initialize.
4575
465a859e
PA
45762015-08-21 Pedro Alves <palves@redhat.com>
4577
4578 PR gdb/18749
4579 * inferiors.c (remove_thread): Discard any pending stop reply for
4580 this thread.
4581 * server.c (remove_all_on_match_pid): Rename to ...
4582 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4583 instead of a pid.
4584 (discard_queued_stop_replies): Change parameter to a ptid. Now
4585 extern.
4586 (handle_v_kill, kill_inferior_callback, captured_main)
4587 (process_serial_event): Adjust.
4588 * server.h (discard_queued_stop_replies): Declare.
4589
f0db101d
PA
45902015-08-21 Pedro Alves <palves@redhat.com>
4591
4592 * linux-low.c (wait_for_sigstop): Always switch to no thread
4593 selected if the previously current thread dies.
4594 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4595 process instead of the current thread's.
4596 * remote-utils.c (input_interrupt): Don't check if there's no
4597 current thread.
4598 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4599 current thread to the general thread fails, error out.
4600 (handle_qxfer_auxv, handle_qxfer_libraries)
4601 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4602 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4603 (handle_query): Check if there's a thread selected instead of
4604 checking whether there's any thread in the thread list.
4605 (handle_qxfer_threads, handle_qxfer_btrace)
4606 (handle_qxfer_btrace_conf): Don't error out early if there's no
4607 thread in the thread list.
4608 (handle_v_cont, myresume): Don't set the current thread to the
4609 continue thread.
4610 (process_serial_event) <Hg handling>: Also set thread_id if the
4611 previous general thread is still alive.
4612 (process_serial_event) <g/G handling>: If setting the current
4613 thread to the general thread fails, error out.
4614 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4615 thread's lwp instead of the current thread's.
4616 * target.c (set_desired_thread): If the desired thread was not
4617 found, leave the current thread pointing to NULL. Return an int
4618 (boolean) indicating success.
4619 * target.h (set_desired_thread): Change return type to int.
4620
40045d91
MF
46212015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4622
4623 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4624 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4625 #includes.
4626 (ps_get_thread_area): New function.
4627
45face3b
GB
46282015-08-19 Gary Benson <gbenson@redhat.com>
4629
4630 * hostio.c (handle_pread): Do not attempt to read more data
4631 than hostio_reply_with_data can fit in a packet.
4632
16d5f642
JB
46332015-08-18 Joel Brobecker <brobecker@adacore.com>
4634
4635 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4636
a738da3a
MF
46372015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4638
4639 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4640
33ebda9d
PA
46412015-08-06 Pedro Alves <palves@redhat.com>
4642
4643 * tracepoint.c (expr_eval_result): Now an int.
4644
a44892be
PA
46452015-08-06 Pedro Alves <palves@redhat.com>
4646
4647 * gdbthread.h (struct regcache): Forward declare.
4648 (struct thread_info) <regcache_data>: Now a struct regcache
4649 pointer.
4650 * inferiors.c (inferior_regcache_data)
4651 (set_inferior_regcache_data): Now work with struct regcache
4652 pointers.
4653 * inferiors.h (struct regcache): Forward declare.
4654 (inferior_regcache_data, set_inferior_regcache_data): Now work
4655 with struct regcache pointers.
4656 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4657 (free_register_cache_thread): Remove struct regcache pointer
4658 casts.
4659
608a1e46
PA
46602015-08-06 Pedro Alves <palves@redhat.com>
4661
4662 * server.c (captured_main): On error, print the exception message
4663 to stderr, and if run_once is set, throw a quit.
4664
f0ce0d3a
PA
46652015-08-06 Pedro Alves <palves@redhat.com>
4666
4667 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4668 the current thread.
4669
bf47e248
PA
46702015-08-06 Pedro Alves <palves@redhat.com>
4671
4672 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4673 reading beyond the passed in buffer length.
4674
b6b9ffcc
PL
46752015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4676
4677 * tracepoint.c (symbol_list) <required>: Remove.
4678
863d01bd
PA
46792015-08-06 Pedro Alves <palves@redhat.com>
4680
4681 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4682 count if stopping and suspending threads.
4683 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4684 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4685 (linux_detach): Complete an ongoing step-over.
4686 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4687 throughout.
4688 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4689 (linux_wait_1): If passing a signal to the inferior after
4690 finishing a step-over, unsuspend and re-resume all lwps. If we
4691 see a single-step event but the thread should be continuing, don't
4692 pass the trap to gdb.
4693 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4694 internal_error instead of gdb_assert.
4695 (enqueue_pending_signal): New function.
4696 (check_ptrace_stopped_lwp_gone): Add debug output.
4697 (start_step_over): Use internal_error instead of gdb_assert.
4698 (complete_ongoing_step_over): New function.
4699 (linux_resume_one_thread): Don't resume a suspended thread.
4700 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4701 it stepping.
4702
00db26fa
PA
47032015-08-06 Pedro Alves <palves@redhat.com>
4704
4705 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4706 (linux_thread_alive): Use lwp_is_marked_dead.
4707 (extended_event_reported): Delete.
4708 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4709 instead of extended_event_reported.
4710 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4711 as well.
4712 (lwp_is_marked_dead): New function.
4713 (lwp_running): Use lwp_is_marked_dead.
4714 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4715 comment.
4716
ad071a30
PA
47172015-08-06 Pedro Alves <palves@redhat.com>
4718
4719 * linux-low.c (linux_wait_1): Move fork event output out of the
4720 !report_to_gdb check. Pass event_child->waitstatus to
4721 target_waitstatus_to_string instead of ourstatus.
4722
524b57e6
YQ
47232015-08-04 Yao Qi <yao.qi@linaro.org>
4724
4725 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4726 if current_thread is 32 bit.
4727
6085d6f6
YQ
47282015-08-04 Yao Qi <yao.qi@linaro.org>
4729
4730 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4731 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4732 * server.c (extended_protocol): Remove "static".
4733 * server.h (extended_protocol): Declare it.
4734
8a7e4587
YQ
47352015-08-04 Yao Qi <yao.qi@linaro.org>
4736
4737 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4738 both aarch64 and aarch32.
4739 (aarch64_set_pc): Likewise.
4740
3b53ae99
YQ
47412015-08-04 Yao Qi <yao.qi@linaro.org>
4742
4743 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4744 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4745 arm-with-neon.xml to srv_xmlfiles.
4746 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4747 (is_64bit_tdesc): New function.
4748 (aarch64_linux_read_description): New function.
4749 (aarch64_arch_setup): Call aarch64_linux_read_description.
4750 (regs_info): Rename to regs_info_aarch64.
4751 (aarch64_regs_info): Return right regs_info.
4752 (initialize_low_arch): Call initialize_low_arch_aarch32.
4753
bd9e6534
YQ
47542015-08-04 Yao Qi <yao.qi@linaro.org>
4755
4756 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4757 * linux-aarch32-low.c: New file.
4758 * linux-aarch32-low.h: New file.
4759 * linux-arm-low.c (arm_fill_gregset): Move it to
4760 linux-aarch32-low.c.
4761 (arm_store_gregset): Likewise.
4762 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4763 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4764 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4765 (regs_info): Rename to regs_info_arm.
4766 (arm_regs_info): Return regs_info_aarch32 if
4767 have_ptrace_getregset is 1 and target description is
4768 arm_with_neon or arm_with_vfpv3.
4769 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4770 Call initialize_low_arch_aarch32 instead.
4771
ded48a5e
YQ
47722015-08-04 Yao Qi <yao.qi@linaro.org>
4773
4774 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4775 * linux-low.c: ... here.
4776 * linux-low.h (have_ptrace_getregset): Declare it.
4777
96e9210f
PA
47782015-08-04 Pedro Alves <palves@redhat.com>
4779
4780 * thread-db.c (struct thread_db): Use new typedefs.
4781 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4782 CHK calls.
4783 (disable_thread_event_reporting): Cast result of dlsym to
4784 destination function pointer type.
4785 (thread_db_mourn): Use td_ta_delete_ftype.
4786
af60a1ef
SL
47872015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4788
4789 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4790 arch variant.
4791 (CDX_BREAKPOINT): Define for R2.
4792 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4793 (the_low_target): Add comments.
4794
e8b41681
YQ
47952015-07-30 Yao Qi <yao.qi@linaro.org>
4796
4797 * linux-arm-low.c (arm_hwcap): Remove it.
4798 (arm_read_description): New local variable arm_hwcap. Don't
4799 set arm_hwcap to zero.
4800
89abb039
YQ
48012015-07-30 Yao Qi <yao.qi@linaro.org>
4802
4803 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4804 Use regcache->tdesc instead.
4805 (arm_store_wmmxregset): Likewise.
4806 (arm_fill_vfpregset): Likewise.
4807 (arm_store_vfpregset): Likewise.
4808
deca266c
YQ
48092015-07-30 Yao Qi <yao.qi@linaro.org>
4810
4811 * linux-arm-low.c: Include arch/arm.h.
4812 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4813 (arm_store_gregset): Likewise.
4814
aa58a496
SM
48152015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4816
4817 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4818 ptrace's 4th parameter.
4819
50904b25
YQ
48202015-07-27 Yao Qi <yao.qi@linaro.org>
4821
4822 * configure.srv (case aarch64*-*-linux*): Don't set
4823 srv_linux_usrregs.
4824
5826e159
PA
48252015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4826
4827 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4828 sys/ptrace.h.
4829 * linux-arm-low.c: Likewise.
4830 * linux-cris-low.c: Likewise.
4831 * linux-crisv32-low.c: Likewise.
4832 * linux-low.c: Likewise.
4833 * linux-m68k-low.c: Likewise.
4834 * linux-mips-low.c: Likewise.
4835 * linux-nios2-low.c: Likewise.
4836 * linux-s390-low.c: Likewise.
4837 * linux-sparc-low.c: Likewise.
4838 * linux-tic6x-low.c: Likewise.
4839 * linux-tile-low.c: Likewise.
4840 * linux-x86-low.c: Likewise.
4841
54019719
PA
48422015-07-24 Pedro Alves <palves@redhat.com>
4843
4844 * config.in: Regenerate.
4845 * configure: Regenerate.
4846
eb7aa561
PA
48472015-07-24 Pedro Alves <palves@redhat.com>
4848
4849 * acinclude.m4: Include ../ptrace.m4.
4850 * configure.ac: Call GDB_AC_PTRACE.
4851 * config.in, configure: Regenerate.
4852
55d7b841
YQ
48532015-07-24 Yao Qi <yao.qi@linaro.org>
4854
4855 * linux-low.c (linux_create_inferior): Remove setting to
4856 proc->priv->new_inferior.
4857 (linux_attach): Likewise.
4858 (linux_low_filter_event): Likewise.
4859 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4860
c06cbd92
YQ
48612015-07-24 Yao Qi <yao.qi@linaro.org>
4862
4863 * linux-low.c (linux_arch_setup): New function.
4864 (linux_low_filter_event): If proc->tdesc is NULL and
4865 proc->attached is true, call the_low_target.arch_setup.
4866 Otherwise, keep status pending, and return.
4867 (linux_resume_one_lwp_throw): Don't call get_pc if
4868 thread->while_stepping isn't NULL. Don't call
4869 get_thread_regcache if proc->tdesc is NULL.
4870 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4871 (linux_target_ops): Install arch_setup.
4872 * server.c (start_inferior): Call the_target->arch_setup.
4873 * target.h (struct target_ops) <arch_setup>: New field.
4874 (target_arch_setup): New marco.
4875 * lynx-low.c (lynx_target_ops): Update.
4876 * nto-low.c (nto_target_ops): Update.
4877 * spu-low.c (spu_target_ops): Update.
4878 * win32-low.c (win32_target_ops): Update.
4879
5ae3ebba
YQ
48802015-07-24 Yao Qi <yao.qi@linaro.org>
4881
4882 * linux-low.c (linux_add_process): Don't set
4883 proc->priv->new_inferior.
4884 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4885 (linux_attach): Likewise.
4886
eb97750b
YQ
48872015-07-24 Yao Qi <yao.qi@linaro.org>
4888
4889 * server.c (start_inferior): Code refactor.
4890
51aee833
YQ
48912015-07-24 Yao Qi <yao.qi@linaro.org>
4892
4893 * server.c (process_serial_event): Set general_thread.
4894
af1b22f3
YQ
48952015-07-21 Yao Qi <yao.qi@linaro.org>
4896
4897 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4898 aarch64_linux_get_debug_reg_capacity.
4899
554717a3
YQ
49002015-07-17 Yao Qi <yao.qi@linaro.org>
4901
4902 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4903 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4904 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4905 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4906 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4907 (AARCH64_HWP_ALIGNMENT): Likewise.
4908 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4909 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4910 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4911 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4912 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4913 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4914 (struct aarch64_debug_reg_state): Likewise.
4915 (struct arch_lwp_info): Likewise.
4916 (aarch64_align_watchpoint): Likewise.
4917 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4918 (aarch64_watchpoint_length): Likewise.
4919 (aarch64_point_encode_ctrl_reg): Likewise
4920 (aarch64_point_is_aligned): Likewise.
4921 (aarch64_align_watchpoint): Likewise.
4922 (aarch64_linux_set_debug_regs):
4923 (aarch64_dr_state_insert_one_point): Likewise.
4924 (aarch64_dr_state_remove_one_point): Likewise.
4925 (aarch64_handle_breakpoint): Likewise.
4926 (aarch64_handle_aligned_watchpoint): Likewise.
4927 (aarch64_handle_unaligned_watchpoint): Likewise.
4928 (aarch64_handle_watchpoint): Likewise.
4929
c67ca4de
YQ
49302015-07-17 Yao Qi <yao.qi@linaro.org>
4931
4932 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4933 and don't aarch64_get_debug_reg_state. All callers update.
4934 (aarch64_handle_aligned_watchpoint): Likewise.
4935 (aarch64_handle_unaligned_watchpoint): Likewise.
4936 (aarch64_handle_watchpoint): Likewise.
4937 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4938 (aarch64_remove_point): Likewise.
4939
25abf979
YQ
49402015-07-17 Yao Qi <yao.qi@linaro.org>
4941
4942 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4943 debug_printf.
4944 (aarch64_handle_unaligned_watchpoint): Likewise.
4945
db1ff28b
JK
49462015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4947
4948 Revert the previous 3 commits:
4949 Move gdb_regex* to common/
4950 Move linux_find_memory_regions_full & co.
4951 gdbserver build-id attribute generator
4952
700ca40f
JK
49532015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4954 Jan Kratochvil <jan.kratochvil@redhat.com>
4955
4956 gdbserver build-id attribute generator.
4957 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4958 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4959 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4960 (find_phdr): New.
4961 (get_dynamic): Use find_pdhr to traverse program headers.
4962 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4963 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4964 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4965 (get_hex_build_id): New.
4966 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4967 to reply XML document.
4968
9904185c
JK
49692015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4970 Jan Kratochvil <jan.kratochvil@redhat.com>
4971
4972 * target.c: Include target/target-utils.h and fcntl.h.
4973 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4974 (target_fileio_read_stralloc): New functions.
4975
6e5b4429
JK
49762015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4977
4978 * Makefile.in (OBS): Add gdb_regex.o.
4979 (gdb_regex.o): New.
4980 * config.in: Rebuilt.
4981 * configure: Rebuilt.
4982
ddc98fbf
JK
49832015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4984 Jan Kratochvil <jan.kratochvil@redhat.com>
4985
4986 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4987 * Makefile.in (OBS): Add target-utils.o.
4988 (linux-maps.o, target-utils.o): New.
4989 * configure.srv (srv_linux_obj): Add linux-maps.o.
4990
e57bb7a0
PL
49912015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4992
4993 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4994 function, return 1.
4995 (the_low_target): Install it.
4996
586b02a9
PA
49972015-07-14 Pedro Alves <palves@redhat.com>
4998
4999 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5000 Instead, ignore ECHILD, and throw an error for other errnos.
5001
58c1b36c
PA
50022015-07-10 Pedro Alves <palves@redhat.com>
5003
5004 * event-loop.c (struct callback_event) <data>: Change type to
5005 gdb_client_data instance instead of gdb_client_data pointer.
5006 (append_callback_event): Adjust.
5007
421530db
PL
50082015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5009
5010 * linux-aarch64-low.c: Add comments for each linux_target_ops
5011 method. Remove comments already covered in target_ops and
5012 linux_target_ops definitions.
5013 (the_low_target): Add comments for each unimplemented method.
5014
c2d65f38
YQ
50152015-07-09 Yao Qi <yao.qi@linaro.org>
5016
5017 * linux-aarch64-low.c (aarch64_regmap): Remove.
5018 (aarch64_usrregs_info): Remove.
5019 (regs_info): Set field usrregs to NULL.
5020
b20a6524
MM
50212015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5022
5023 * linux-low.c: Include "rsp-low.h"
5024 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5025 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5026 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5027 (handle_btrace_enable_pt): New.
5028 (handle_btrace_general_set): Support "pt".
5029 (handle_btrace_conf_general_set): Support "pt:size".
5030
96c97461
PL
50312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5032
5033 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5034 Z_PACKET_SW_BP.
5035
37d66942
PL
50362015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5037
5038 * linux-aarch64-low.c: Remove comment about endianness.
5039 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5040 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5041 memcmp.
5042
dc06243f
GB
50432015-06-24 Gary Benson <gbenson@redhat.com>
5044
5045 * linux-i386-ipa.c (stdint.h): Do not include.
5046 * lynx-i386-low.c (stdint.h): Likewise.
5047 * lynx-ppc-low.c (stdint.h): Likewise.
5048 * mem-break.c (stdint.h): Likewise.
5049 * thread-db.c (stdint.h): Likewise.
5050 * tracepoint.c (stdint.h): Likewise.
5051 * win32-low.c (stdint.h): Likewise.
5052
124e13d9
SM
50532015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5054
5055 * server.c (write_qxfer_response): Update call to
5056 remote_escape_output.
5057
909c2cda
JK
50582015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5059 Jan Kratochvil <jan.kratochvil@redhat.com>
5060
5061 Merge multiple hex conversions.
5062 * gdbreplay.c (tohex): Rename to 'fromhex'.
5063 (logchar): Use fromhex.
5064
24c05f46
JK
50652015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5066
5067 * server.c (handle_qxfer_libraries): Set `version' attribute for
5068 <library-list>.
5069
14d2069a
GB
50702015-06-10 Gary Benson <gbenson@redhat.com>
5071
5072 * target.h (struct target_ops) <multifs_open>: New field.
5073 <multifs_unlink>: Likewise.
5074 <multifs_readlink>: Likewise.
5075 * linux-low.c (nat/linux-namespaces.h): New include.
5076 (linux_target_ops): Initialize the_target->multifs_open,
5077 the_target->multifs_unlink and the_target->multifs_readlink.
5078 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5079 * hostio.c (hostio_fs_pid): New static variable.
5080 (hostio_handle_new_gdb_connection): New function.
5081 (handle_setfs): Likewise.
5082 (handle_open): Use the_target->multifs_open as appropriate.
5083 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5084 (handle_readlink): Use the_target->multifs_readlink as
5085 appropriate.
5086 (handle_vFile): Handle vFile:setfs packets.
5087 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5088 after target_handle_new_gdb_connection.
5089
4b8b5e72
GB
50902015-06-10 Gary Benson <gbenson@redhat.com>
5091
5092 * configure.ac (AC_CHECK_FUNCS): Add setns.
5093 * config.in: Regenerate.
5094 * configure: Likewise.
5095 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5096 (linux-namespaces.o): New rule.
5097 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5098
3ac2e371
GB
50992015-06-09 Gary Benson <gbenson@redhat.com>
5100
5101 * hostio.c (handle_open): Process mode argument with
5102 fileio_to_host_mode.
5103
ca9b78ce
YQ
51042015-06-01 Yao Qi <yao.qi@linaro.org>
5105
5106 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5107 * linux-x86-low.c: Likewise.
5108
bfacd19d
DB
51092015-05-28 Don Breazeal <donb@codesourcery.com>
5110
5111 * linux-low.c (handle_extended_wait): Initialize
5112 thread_info.last_resume_kind for new fork children.
5113
452003ef
PA
51142015-05-15 Pedro Alves <palves@redhat.com>
5115
5116 * target.h (target_handle_new_gdb_connection): Rewrite using if
5117 wrapped in do/while.
5118
1041a03c
JB
51192015-05-14 Joel Brobecker <brobecker@adacore.com>
5120
5121 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5122 * configure, config.in: Regenerate.
5123 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5124 Declare typedef.
5125
c269dbdb
DB
51262015-05-12 Don Breazeal <donb@codesourcery.com>
5127
5128 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5129 PTRACE_EVENT_VFORK_DONE.
5130 (linux_low_ptrace_options, extended_event_reported): Add vfork
5131 events.
5132 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5133 and "vforkdone" for RSP 'T' Stop Reply Packet.
5134 * server.h (report_vfork_events): Declare
5135 global variable.
5136
3a8a0396
DB
51372015-05-12 Don Breazeal <donb@codesourcery.com>
5138
5139 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5140 (the_low_target) <new_fork>: Initialize new member.
5141 * linux-arm-low.c (arm_new_fork): New function.
5142 (the_low_target) <new_fork>: Initialize new member.
5143 * linux-low.c (handle_extended_wait): Call new target function
5144 new_fork.
5145 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5146 * linux-mips-low.c (mips_add_watchpoint): New function
5147 extracted from mips_insert_point.
5148 (the_low_target) <new_fork>: Initialize new member.
5149 (mips_linux_new_fork): New function.
5150 (mips_insert_point): Call mips_add_watchpoint.
5151 * linux-x86-low.c (x86_linux_new_fork): New function.
5152 (the_low_target) <new_fork>: Initialize new member.
5153
de0d863e
DB
51542015-05-12 Don Breazeal <donb@codesourcery.com>
5155
5156 * linux-low.c (handle_extended_wait): Implement return value,
5157 rename argument 'event_child' to 'event_lwp', handle
5158 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5159 (linux_low_ptrace_options): New function.
5160 (linux_low_filter_event): Call linux_low_ptrace_options,
5161 use different argument fo linux_enable_event_reporting,
5162 use return value from handle_extended_wait.
5163 (extended_event_reported): New function.
5164 (linux_wait_1): Call extended_event_reported and set
5165 status to report fork events.
5166 (linux_write_memory): Add pid to debug message.
5167 (reset_lwp_ptrace_options_callback): New function.
5168 (linux_handle_new_gdb_connection): New function.
5169 (linux_target_ops): Initialize new structure member.
5170 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5171 * lynx-low.c: Initialize new structure member.
5172 * remote-utils.c (prepare_resume_reply): Implement stop reason
5173 "fork" for "T" stop message.
5174 * server.c (handle_query): Call handle_new_gdb_connection.
5175 * server.h (report_fork_events): Declare global flag.
5176 * target.h (struct target_ops) <handle_new_gdb_connection>:
5177 New member.
5178 (target_handle_new_gdb_connection): New macro.
5179 * win32-low.c: Initialize new structure member.
5180
ddcbc397
DB
51812015-05-12 Don Breazeal <donb@codesourcery.com>
5182
5183 * mem-break.c (APPEND_TO_LIST): Define macro.
5184 (clone_agent_expr): New function.
5185 (clone_one_breakpoint): New function.
5186 (clone_all_breakpoints): New function.
5187 * mem-break.h: Declare new functions.
5188
89245bc0
DB
51892015-05-12 Don Breazeal <donb@codesourcery.com>
5190
5191 * linux-low.c (linux_supports_fork_events): New function.
5192 (linux_supports_vfork_events): New function.
5193 (linux_target_ops): Initialize new structure members.
5194 (initialize_low): Call linux_check_ptrace_features.
5195 * lynx-low.c (lynx_target_ops): Initialize new structure
5196 members.
5197 * server.c (report_fork_events, report_vfork_events):
5198 New global flags.
5199 (handle_query): Add new features to qSupported packet and
5200 response.
5201 (captured_main): Initialize new global variables.
5202 * target.h (struct target_ops) <supports_fork_events>:
5203 New member.
5204 <supports_vfork_events>: New member.
5205 (target_supports_fork_events): New macro.
5206 (target_supports_vfork_events): New macro.
5207 * win32-low.c (win32_target_ops): Initialize new structure
5208 members.
5209
835205d0
GB
52102015-05-12 Gary Benson <gbenson@redhat.com>
5211
5212 * server.c (handle_qxfer_exec_file): Use current process
5213 if annex is empty.
5214
21e94bd9
SL
52152015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5216
5217 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5218 Remove HAVE_PTRACE_GETREGS conditionals.
5219 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5220 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5221
45614f15
YQ
52222015-05-08 Yao Qi <yao.qi@linaro.org>
5223
5224 * linux-low.c (linux_supports_conditional_breakpoints): New
5225 function.
5226 (linux_target_ops): Install new target method.
5227 * lynx-low.c (lynx_target_ops): Install NULL hook for
5228 supports_conditional_breakpoints.
5229 * nto-low.c (nto_target_ops): Likewise.
5230 * spu-low.c (spu_target_ops): Likewise.
5231 * win32-low.c (win32_target_ops): Likewise.
5232 * server.c (handle_query): Check
5233 target_supports_conditional_breakpoints.
5234 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5235 New field.
5236 (target_supports_conditional_breakpoints): New macro.
5237
80ad801e
PA
52382015-05-06 Pedro Alves <palves@redhat.com>
5239
5240 PR server/18081
5241 * server.c (start_inferior): If the process exits, mourn it.
5242
819843c7
GB
52432015-04-21 Gary Benson <gbenson@redhat.com>
5244
5245 * hostio.c (fileio_open_flags_to_host): Factored out to
5246 fileio_to_host_openflags in common/fileio.c. Single use
5247 updated.
5248
a2d5a9d7
MF
52492015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5250
5251 * linux-xtensa-low.c (xtensa_fill_gregset)
5252 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5253 XCHAL_HAVE_LOOP.
5254
deb44829
MF
52552015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5256
5257 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5258 (regs_info): Replace usrregs pointer with NULL.
5259
e57f1de3
GB
52602015-04-17 Gary Benson <gbenson@redhat.com>
5261
5262 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5263 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5264 * server.c (handle_qxfer_exec_file): New function.
5265 (qxfer_packets): Add exec-file entry.
5266 (handle_query): Report qXfer:exec-file:read as supported packet.
5267
62828379
RN
52682015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5269
5270 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5271
b88bb450
GB
52722015-04-09 Gary Benson <gbenson@redhat.com>
5273
5274 * hostio-errno.c (errno_to_fileio_error): Remove function.
5275 Update caller to use remote_fileio_to_fio_error.
5276
c8f4bfdd
YQ
52772015-04-09 Yao Qi <yao.qi@linaro.org>
5278
5279 * linux-low.c (linux_insert_point): Call
5280 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5281 (linux_remove_point): Call remove_memory_breakpoint if type is
5282 raw_bkpt_type_sw.
5283 * linux-x86-low.c (x86_insert_point): Don't call
5284 insert_memory_breakpoint.
5285 (x86_remove_point): Don't call remove_memory_breakpoint.
5286
41f98f02
PA
52872015-04-01 Pedro Alves <palves@redhat.com>
5288 Cleber Rosa <crosa@redhat.com>
5289
5290 * server.c (gdbserver_usage): Reorganize and extend the usage
5291 message.
5292
2bf6fb9d
PA
52932015-03-24 Pedro Alves <palves@redhat.com>
5294
5295 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5296 output. Also dump TRAP_TRACE.
5297 (linux_low_filter_event): In debug output, distinguish a
5298 resume_stop SIGSTOP from a delayed SIGSTOP.
5299
369f6daa
GB
53002015-03-24 Gary Benson <gbenson@redhat.com>
5301
5302 * linux-x86-low.c (x86_linux_new_thread): Moved to
5303 nat/x86-linux.c.
5304 (x86_linux_prepare_to_resume): Likewise.
5305
8e5d4070
GB
53062015-03-24 Gary Benson <gbenson@redhat.com>
5307
5308 * Makefile.in (x86-linux-dregs.o): New rule.
5309 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5310 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5311 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5312 (x86_linux_dr_get): Likewise.
5313 (x86_linux_dr_set): Likewise.
5314 (update_debug_registers_callback): Likewise.
5315 (x86_linux_dr_set_addr): Likewise.
5316 (x86_linux_dr_get_addr): Likewise.
5317 (x86_linux_dr_set_control): Likewise.
5318 (x86_linux_dr_get_control): Likewise.
5319 (x86_linux_dr_get_status): Likewise.
5320 (x86_linux_update_debug_registers): Likewise.
5321
2b95d440
GB
53222015-03-24 Gary Benson <gbenson@redhat.com>
5323
5324 * linux-x86-low.c (x86_linux_update_debug_registers):
5325 New function, factored out from...
5326 (x86_linux_prepare_to_resume): ...this.
5327
14b0bc68
GB
53282015-03-24 Gary Benson <gbenson@redhat.com>
5329
5330 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5331 (x86_linux_dr_set): Likewise.
5332 (update_debug_registers_callback): Likewise.
5333 (x86_linux_dr_set_addr): Likewise.
5334 (x86_linux_dr_get_addr): Likewise.
5335 (x86_linux_dr_set_control): Likewise.
5336 (x86_linux_dr_get_control): Likewise.
5337 (x86_linux_dr_get_status): Likewise.
5338 (x86_linux_prepare_to_resume): Likewise.
5339
5dfe6ca8
GB
53402015-03-24 Gary Benson <gbenson@redhat.com>
5341
5342 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5343 Use perror_with_name. Pass string through gettext.
5344 (x86_linux_dr_set): Likewise.
5345
d33472ad
GB
53462015-03-24 Gary Benson <gbenson@redhat.com>
5347
5348 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5349 (x86_linux_dr_set_addr): ...this.
5350 (x86_dr_low_get_addr): Rename to...
5351 (x86_linux_dr_get_addr): ...this.
5352 (x86_dr_low_set_control): Rename to...
5353 (x86_linux_dr_set_control): ...this.
5354 (x86_dr_low_get_control): Rename to...
5355 (x86_linux_dr_get_control): ...this.
5356 (x86_dr_low_get_status): Rename to...
5357 (x86_linux_dr_get_status): ...this.
5358 (x86_dr_low): Update with new function names.
5359
4b134ca1
GB
53602015-03-24 Gary Benson <gbenson@redhat.com>
5361
5362 * Makefile.in (x86-linux.o): New rule.
5363 * configure.srv: Add x86-linux.o to relevant targets.
5364 * linux-low.c (lwp_set_arch_private_info): New function.
5365 (lwp_arch_private_info): Likewise.
5366 * linux-x86-low.c: Include nat/x86-linux.h.
5367 (arch_lwp_info): Removed structure.
5368 (update_debug_registers_callback):
5369 Use lwp_set_debug_registers_changed.
5370 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5371 and lwp_set_debug_registers_changed.
5372 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5373
34c703da
GB
53742015-03-24 Gary Benson <gbenson@redhat.com>
5375
5376 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5377 * linux-arm-low.c (arm_new_thread): Likewise.
5378 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5379 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5380 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5381 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5382
cff068da
GB
53832015-03-24 Gary Benson <gbenson@redhat.com>
5384
5385 * linux-low.c (ptid_of_lwp): New function.
5386 (lwp_is_stopped): Likewise.
5387 (lwp_stop_reason): Likewise.
5388 * linux-x86-low.c (update_debug_registers_callback):
5389 Use lwp_is_stopped.
5390 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5391 lwp_stop_reason.
5392
b2f7c7e8
GB
53932015-03-24 Gary Benson <gbenson@redhat.com>
5394
5395 * linux-low.h (linux_stop_lwp): Remove declaration.
5396
6d4ee8c6
GB
53972015-03-24 Gary Benson <gbenson@redhat.com>
5398
5399 * linux-low.h: Include nat/linux-nat.h.
5400 * linux-low.c (iterate_over_lwps_args): New structure.
5401 (iterate_over_lwps_filter): New function.
5402 (iterate_over_lwps): Likewise.
5403 * linux-x86-low.c (update_debug_registers_callback):
5404 Update signature to what iterate_over_lwps expects.
5405 Remove PID check that iterate_over_lwps now performs.
5406 (x86_dr_low_set_addr): Use iterate_over_lwps.
5407 (x86_dr_low_set_control): Likewise.
5408
70a0bb6b
GB
54092015-03-24 Gary Benson <gbenson@redhat.com>
5410
5411 * linux-x86-low.c (x86_debug_reg_state): New function.
5412 (x86_linux_prepare_to_resume): Use the above.
5413
7b669087
GB
54142015-03-24 Gary Benson <gbenson@redhat.com>
5415
5416 * linux-low.c (current_lwp_ptid): New function.
5417 * linux-x86-low.c: Include nat/linux-nat.h.
5418 (x86_dr_low_get_addr): Use current_lwp_ptid.
5419 (x86_dr_low_get_control): Likewise.
5420 (x86_dr_low_get_status): Likewise.
5421
eef49a3d
PA
54222015-03-20 Pedro Alves <palves@redhat.com>
5423
5424 * tracepoint.c (cmd_qtstatus): Make "str" const.
5425
b2333d22
PA
54262015-03-20 Pedro Alves <palves@redhat.com>
5427
5428 * server.c (handle_general_set): Make "req_str" const.
5429
23f238d3
PA
54302015-03-19 Pedro Alves <palves@redhat.com>
5431
5432 * linux-low.c (linux_resume_one_lwp): Rename to ...
5433 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5434 instead call perror_with_name.
5435 (check_ptrace_stopped_lwp_gone): New function.
5436 (linux_resume_one_lwp): Reimplement as wrapper around
5437 linux_resume_one_lwp_throw that swallows errors if the LWP is
5438 gone.
5439
91baf43f
PA
54402015-03-19 Pedro Alves <palves@redhat.com>
5441
5442 * linux-low.c (count_events_callback, select_event_lwp_callback):
5443 No longer check whether the thread has resume_stop as last resume
5444 kind.
5445
8bf3b159
PA
54462015-03-19 Pedro Alves <palves@redhat.com>
5447
5448 * linux-low.c (count_events_callback, select_event_lwp_callback):
5449 Use the lwp's status_pending_p field, not the thread's.
5450
b90fc188
PA
54512015-03-19 Pedro Alves <palves@redhat.com>
5452
5453 * linux-low.c (select_event_lwp_callback): Update comments to
5454 no longer mention SIGTRAP.
5455
464b0089
GB
54562015-03-18 Gary Benson <gbenson@redhat.com>
5457
5458 * server.c (handle_query): Do not report vFile:fstat as supported.
5459
aa9e327f
GB
54602015-03-11 Gary Benson <gbenson@redhat.com>
5461
5462 * hostio.c (sys/types.h): New include.
5463 (sys/stat.h): Likewise.
5464 (common-remote-fileio.h): Likewise.
5465 (handle_fstat): New function.
5466 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5467
791c0056
GB
54682015-03-11 Gary Benson <gbenson@redhat.com>
5469
5470 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5471 struct stat.st_blocks and struct stat.st_blksize.
5472 * configure: Regenerate.
5473 * config.in: Likewise.
5474 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5475 (OBS): Add common-remote-fileio.o.
5476 (common-remote-fileio.o): New rule.
5477
9a9df970
PA
54782015-03-09 Pedro Alves <palves@redhat.com>
5479
5480 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5481 'struct sockaddr' pointer in 'accept' call.
5482
9eb1356e
PA
54832015-03-09 Pedro Alves <palves@redhat.com>
5484
5485 Revert:
5486 2015-03-07 Pedro Alves <palves@redhat.com>
5487 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5488 or <winsock2.h> here. Instead include "gdb_socket.h".
5489 (remote_open): Use union gdb_sockaddr_u.
5490 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5491 or <winsock2.h> here. Instead include "gdb_socket.h".
5492 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5493 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5494 or <sys/un.h>.
5495 (init_named_socket, gdb_agent_helper_thread): Use union
5496 gdb_sockaddr_u.
5497
aac331e4
PA
54982015-03-07 Pedro Alves <palves@redhat.com>
5499
5500 * configure.ac (build_warnings): Move
5501 -Wdeclaration-after-statement to the C-specific set.
5502 * configure: Regenerate.
5503
366c75fc
PA
55042015-03-07 Pedro Alves <palves@redhat.com>
5505
5506 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5507 or <winsock2.h> here. Instead include "gdb_socket.h".
5508 (remote_open): Use union gdb_sockaddr_u.
5509 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5510 or <winsock2.h> here. Instead include "gdb_socket.h".
5511 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5512 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5513 or <sys/un.h>.
5514 (init_named_socket, gdb_agent_helper_thread): Use union
5515 gdb_sockaddr_u.
5516
492d29ea
PA
55172015-03-07 Pedro Alves <palves@redhat.com>
5518
5519 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5520 instead.
5521
60a191ed
YQ
55222015-03-06 Yao Qi <yao.qi@linaro.org>
5523
5524 * linux-aarch64-low.c (aarch64_insert_point): Use
5525 show_debug_regs as a boolean.
5526 (aarch64_remove_point): Likewise.
5527
f5771b1d
PA
55282015-03-05 Pedro Alves <palves@redhat.com>
5529
5530 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5531 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5532 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5533 * nto-low.c (nto_target_ops): Likewise.
5534 * spu-low.c (spu_target_ops): Likewise.
5535 * win32-low.c (win32_target_ops): Likewise.
5536
3e572f71
PA
55372015-03-04 Pedro Alves <palves@redhat.com>
5538
72f4393d 5539 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5540 Decide whether a breakpoint triggered based on the SIGTRAP's
5541 siginfo.si_code.
72f4393d
L
5542 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5543 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5544 (linux_low_filter_event): Check for breakpoints before checking
5545 watchpoints.
5546 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5547 siginfo.si_code.
72f4393d
L
5548 (linux_stopped_by_sw_breakpoint)
5549 (linux_supports_stopped_by_sw_breakpoint)
5550 (linux_stopped_by_hw_breakpoint)
5551 (linux_supports_stopped_by_hw_breakpoint): New functions.
5552 (linux_target_ops): Install new target methods.
3e572f71 5553
1ec68e26
PA
55542015-03-04 Pedro Alves <palves@redhat.com>
5555
5556 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5557 * server.c (swbreak_feature, hwbreak_feature): New globals.
5558 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5559 (captured_main): Clear swbreak_feature and hwbreak_feature.
5560 * server.h (swbreak_feature, hwbreak_feature): Declare.
5561 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5562 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5563 supports_stopped_by_hw_breakpoint>: New fields.
5564 (target_supports_stopped_by_sw_breakpoint)
5565 (target_stopped_by_sw_breakpoint)
5566 (target_supports_stopped_by_hw_breakpoint)
5567 (target_stopped_by_hw_breakpoint): Declare.
5568
15c66dd6
PA
55692015-03-04 Pedro Alves <palves@redhat.com>
5570
5571 enum lwp_stop_reason -> enum target_stop_reason
5572 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5573 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5574 (linux_wait_1, stuck_in_jump_pad_callback)
5575 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5576 (linux_stopped_by_watchpoint):
5577 * linux-low.h (enum lwp_stop_reason): Delete.
5578 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5579 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5580
98fc70d6
YQ
55812015-03-04 Yao Qi <yao.qi@linaro.org>
5582
5583 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5584
dd2ac174
GB
55852015-03-03 Gary Benson <gbenson@redhat.com>
5586
5587 * hostio.c (handle_vFile): Fix prefix lengths.
5588
d68e53f4
MM
55892015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5590
5591 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5592 ptr_bits.
5593
bf2d68ab
AA
55942015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5595
5596 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5597 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5598 (clean): Add "rm -f" for above C files.
5599 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5600 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5601 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5602 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5603 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5604 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5605 (init_registers_s390x_vx_linux64)
5606 (init_registers_s390x_tevx_linux64)
5607 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5608 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5609 declarations.
5610 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5611 (s390_store_vxrs_high): New functions.
5612 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5613 NT_S390_VXRS_HIGH.
5614 (s390_arch_setup): Add logic for selecting one of the new target
5615 descriptions. Activate the new vector regsets if applicable.
5616 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5617 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5618 and init_registers_s390x_tevx_linux64.
5619
c966a859
PA
56202015-03-01 Pedro Alves <palves@redhat.com>
5621
5622 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5623 parameter.
5624
4180215b
PA
56252015-02-27 Pedro Alves <palves@redhat.com>
5626
5627 * linux-x86-low.c (u_debugreg_offset): New function.
5628 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5629
749bab01
PA
56302015-02-27 Pedro Alves <palves@redhat.com>
5631
5632 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5633 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5634 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5635 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5636 (ps_lsetfpregs, ps_getpid)
5637 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5638 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5639 (ps_lsetxregs, ps_plog): Declare.
5640
3c14e5a3
PA
56412015-02-27 Pedro Alves <palves@redhat.com>
5642
5643 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5644 IP_AGENT_EXPORT_FUNC.
5645 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5646 IP_AGENT_EXPORT_FUNC.
5647 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5648 (IP_AGENT_EXPORT): Delete.
5649 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5650 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5651 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5652 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5653 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5654 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5655 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5656 (traceframe_read_count, traceframe_write_count)
5657 (traceframes_created, trace_state_variables, get_raw_reg)
5658 (get_trace_state_variable_value, set_trace_state_variable_value)
5659 (ust_loaded, helper_thread_id, cmd_buf): Use
5660 IPA_SYM_EXPORTED_NAME.
5661 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5662 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5663 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5664 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5665 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5666 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5667 EXTERN_C_PUSH/EXTERN_C_POP.
5668 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5669 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5670 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5671 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5672 (traceframe_write_count, traceframe_read_count)
5673 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5674 (about_to_request_buffer_space, get_trace_state_variable_value)
5675 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5676 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5677 EXTERN_C_PUSH/EXTERN_C_POP.
5678 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5679 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5680 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5681 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5682 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5683 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5684 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5685 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5686 Define.
5687 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5688 (IP_AGENT_EXPORT_VAR_DECL): Define.
5689 (tracing): Declare.
5690 (gdb_agent_get_raw_reg): Declare.
5691
fe978cb0
PA
56922015-02-27 Tom Tromey <tromey@redhat.com>
5693 Pedro Alves <palves@redhat.com>
5694
5695 Rename symbols whose names are reserved C++ keywords throughout.
5696
3bc3d82a
PA
56972015-02-27 Pedro Alves <palves@redhat.com>
5698
5699 * Makefile.in (COMPILER): New, get it from autoconf.
5700 (CXX): Get from autoconf instead.
5701 (COMPILE.pre): Use COMPILER.
5702 (CC-LD): Rename to ...
5703 (CC_LD): ... this. Use COMPILER.
5704 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5705 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5706 * acinclude.m4: Include build-with-cxx.m4.
5707 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5708 Disable -Werror by default if building in C++ mode.
5709 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5710 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5711 the C++ compiler. Save/restore CXXFLAGS too.
5712 * configure: Regenerate.
5713
07697489
PA
57142015-02-27 Pedro Alves <palves@redhat.com>
5715
5716 * acinclude.m4: Include libiberty.m4.
5717 * configure.ac: Call libiberty_INIT.
5718 * config.in, configure: Regenerate.
5719
9beb7c4e
PA
57202015-02-26 Pedro Alves <palves@redhat.com>
5721
5722 * linux-low.c (linux_wait_1): When incrementing the PC past a
5723 program breakpoint always use the_low_target.breakpoint_len as
5724 increment, rather than the maximum between that and
5725 the_low_target.decr_pc_after_break.
5726
8090aef2
PA
57272015-02-23 Pedro Alves <palves@redhat.com>
5728
5729 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5730 thread was doing a step-over; always adjust the PC if
5731 we stepped over a permanent breakpoint.
5732 (linux_wait_1): If we stepped over breakpoint that was on top of a
5733 permanent breakpoint, manually advance the PC past it.
5734
bc9540e8
PA
57352015-02-23 Pedro Alves <palves@redhat.com>
5736
5737 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5738 modes.
5739 (x86_fill_gregset, x86_store_gregset): Use it when handling
5740 $orig_eax.
5741
2db9a427
PA
57422015-02-20 Pedro Alves <palves@redhat.com>
5743
5744 * thread-db.c: Include "nat/linux-procfs.h".
5745 (thread_db_init): Skip listing new threads if the kernel supports
5746 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5747
afa8d396
PA
57482015-02-20 Pedro Alves <palves@redhat.com>
5749
5750 * linux-low.c (status_pending_p_callback): Use ptid_match.
5751
c9587f88
AT
57522015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5753
5754 PR breakpoints/16812
5755 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5756 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5757 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5758
b05ec7a5
AT
57592015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5760
5761 PR breakpoints/15956
5762 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5763
d33501a5
MM
57642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5765
5766 * linux-low.c (linux_low_btrace_conf): Print size.
5767 * server.c (handle_btrace_conf_general_set): New.
5768 (hanle_general_set): Call handle_btrace_conf_general_set.
5769 (handle_query): Report Qbtrace-conf:bts:size as supported.
5770
f4abbc16
MM
57712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5772
5773 * linux-low.c (linux_low_enable_btrace): Update parameters.
5774 (linux_low_btrace_conf): New.
5775 (linux_target_ops)<to_btrace_conf>: Initialize.
5776 * server.c (current_btrace_conf): New.
5777 (handle_btrace_enable): Rename to ...
5778 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5779 to target_enable_btrace. Update comment. Update users.
5780 (handle_qxfer_btrace_conf): New.
5781 (qxfer_packets): Add btrace-conf entry.
5782 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5783 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5784 (target_ops)<read_btrace_conf>: New.
5785 (target_enable_btrace): Update parameters.
5786 (target_read_btrace_conf): New.
5787
043c3577
MM
57882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5789
5790 * server.c (handle_btrace_general_set): Remove call to
5791 target_supports_btrace.
5792 (supported_btrace_packets): New.
5793 (handle_query): Call supported_btrace_packets.
5794 * target.h: include btrace-common.h.
5795 (btrace_target_info): Removed.
5796 (supports_btrace, target_supports_btrace): Update parameters.
5797
734b0e4b
MM
57982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5799
5800 * Makefile.in (SFILES): Add common/btrace-common.c.
5801 (OBS): Add common/btrace-common.o.
5802 (btrace-common.o): Add build rules.
5803 * linux-low: Include btrace-common.h.
5804 (linux_low_read_btrace): Use struct btrace_data. Call
5805 btrace_data_init and btrace_data_fini.
5806
d6c146e9
PA
58072015-02-06 Pedro Alves <palves@redhat.com>
5808
5809 * thread-db.c (find_new_threads_callback): Add debug output.
5810
20ba1ce6
PA
58112015-02-04 Pedro Alves <palves@redhat.com>
5812
5813 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5814 (resume_stopped_resumed_lwps): New function.
5815 (linux_wait_for_event_filtered): Use it.
5816
8cc73a39
SDJ
58172015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5818
5819 * Makefile.in (SFILES): Add linux-personality.c.
5820 (linux-personality.o): New rule.
5821 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5822 list of objects to be built.
5823 * linux-low.c: Include nat/linux-personality.h.
5824 (linux_create_inferior): Remove code to disable address space
5825 randomization (moved to ../nat/linux-personality.c). Create
5826 cleanup to disable address space randomization.
5827
fb23d554
SDJ
58282015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5829
5830 * Makefile.in (posix-strerror.o): New rule.
5831 (mingw-strerror.o): Likewise.
5832 * configure: Regenerated.
5833 * configure.ac: Source file ../common/common.host. Initialize new
5834 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5835
cdf43629
YQ
58362015-01-14 Yao Qi <yao@codesourcery.com>
5837
5838 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5839 (ppc-linux.o): New rule.
5840 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5841 * configure.ac: AC_CHECK_FUNCS(getauxval).
5842 * config.in: Re-generated.
5843 * configure: Re-generated.
5844 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5845 ppc64_64bit_inferior_p
5846
514c5338
YQ
58472015-01-14 Yao Qi <yao@codesourcery.com>
5848
5849 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5850 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5851 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5852 (PT_ORIG_R3, PT_TRAP): Likewise.
5853 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5854 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5855 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5856
3368c1e5
JB
58572015-01-10 Joel Brobecker <brobecker@adacore.com>
5858
5859 * i387-fp.c (i387_cache_to_xsave): In look over
5860 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5861 zmmh_low_space field by use of zmmh_high_space.
5862
582511be
PA
58632015-01-09 Pedro Alves <palves@redhat.com>
5864
5865 * linux-low.c (step_over_bkpt): Move higher up in the file.
5866 (handle_extended_wait): Don't store the stop_pc here.
5867 (get_stop_pc): Adjust comments and rename to ...
5868 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5869 stopped for a software breakpoint or hardware breakpoint.
5870 (thread_still_has_status_pending_p): New function.
5871 (status_pending_p_callback): Use
5872 thread_still_has_status_pending_p. If the event is no longer
5873 interesting, resume the LWP.
5874 (handle_tracepoints): Add assert.
5875 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5876 (wstatus_maybe_breakpoint): New function.
5877 (cancel_breakpoint): Delete function.
5878 (check_stopped_by_watchpoint): New function, factored out from
5879 linux_low_filter_event.
5880 (lp_status_maybe_breakpoint): Delete function.
5881 (linux_low_filter_event): Remove filter_ptid argument.
5882 Leave thread group exits pending here. Store the LWP's stop PC.
5883 Always leave events pending.
5884 (linux_wait_for_event_filtered): Pull all events out of the
5885 kernel, and leave them all pending.
5886 (count_events_callback, select_event_lwp_callback): Consider all
5887 events.
5888 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5889 (select_event_lwp): Only give preference to the stepping LWP in
5890 all-stop mode. Adjust comments.
5891 (ignore_event): New function.
5892 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5893 references to cancel_breakpoints. Adjust to renames. Also give
5894 equal priority to all LWPs that have had events in non-stop mode.
5895 If reporting a software breakpoint event, unadjust the LWP's PC.
5896 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5897 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5898 Adjust.
5899 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5900 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5901 (linux_stopped_by_watchpoint): Adjust.
5902 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5903 * linux-low.h (enum lwp_stop_reason): New.
5904 (struct lwp_info) <stop_pc>: Adjust comment.
5905 <stopped_by_watchpoint>: Delete field.
5906 <stop_reason>: New field.
5907 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5908 * mem-break.c (software_breakpoint_inserted_here)
5909 (hardware_breakpoint_inserted_here): New function.
5910 * mem-break.h (software_breakpoint_inserted_here)
5911 (hardware_breakpoint_inserted_here): Declare.
5912 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5913 (cancel_breakpoints): Delete.
5914 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5915 (upload_fast_traceframes): Remove references to
5916 cancel_breakpoints.
5917
a33e3959
PA
59182015-01-09 Pedro Alves <palves@redhat.com>
5919
5920 * thread-db.c (find_new_threads_callback): Ignore thread if the
5921 kernel thread ID is -1.
5922
8784d563
PA
59232015-01-09 Pedro Alves <palves@redhat.com>
5924
5925 * linux-low.c (linux_attach_fail_reason_string): Move to
5926 nat/linux-ptrace.c, and rename.
5927 (linux_attach_lwp): Update comment.
5928 (attach_proc_task_lwp_callback): New function.
5929 (linux_attach): Adjust to rename and use
5930 linux_proc_attach_tgid_threads.
5931 (linux_attach_fail_reason_string): Delete declaration.
5932
76f2b779
JB
59332015-01-01 Joel Brobecker <brobecker@adacore.com>
5934
5935 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5936 * server.c (gdbserver_version): Likewise.
5937
fafcc06a
SDJ
59382014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5939
5940 * remote-utils.c: Include ctype.h.
5941 (input_interrupt): Explicitly handle the case when the char
5942 received is the NUL byte. Improve the printing of non-ASCII
5943 characters.
5944
beed38b8
JB
59452014-12-16 Joel Brobecker <brobecker@adacore.com>
5946
5947 * linux-low.c (linux_low_filter_event): Update call to
5948 linux_enable_event_reporting following the addition of
5949 a new parameter to that function.
5950
bf330350
CU
59512014-12-16 Catalin Udma <catalin.udma@freescale.com>
5952
5953 PR server/17457
5954 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5955 (AARCH64_FPCR_REGNO): Likewise.
5956 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5957 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5958 (aarch64_store_fpregset): Likewise.
5959
5227d625
JB
59602014-12-15 Joel Brobecker <brobecker@adacore.com>
5961
5962 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5963 Remove FIXME comment about assumption about N.
5964
f93b65a0
JB
59652014-12-13 Joel Brobecker <brobecker@adacore.com>
5966
5967 * configure.ac: If large-file support is disabled in GDBserver,
5968 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5969 * configure: Regenerate.
5970
e5a9158d
AA
59712014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5972
5973 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5974 warning upon ENODATA from ptrace.
5975 * linux-s390-low.c (s390_store_tdb): New.
5976 (s390_regsets): Add regset for NT_S390_TDB.
5977
feea5f36
AA
59782014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5979
5980 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5981 without a fill_function.
5982 * linux-s390-low.c (s390_fill_last_break): Remove.
5983 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5984 (s390_arch_setup): Use regset's size instead of fill_function for
5985 loop end condition.
5986
098dbe61
AA
59872014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5988
5989 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5990 the regset's store function when ptrace returned an error.
5991 * regcache.c (get_thread_regcache): Invalidate register cache
5992 before fetching inferior's registers.
5993
28eef672
AA
59942014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5995
5996 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5997 while-loop as for-loop.
5998 (regsets_store_inferior_registers): Likewise.
5999
bdca27a2
YQ
60002014-11-28 Yao Qi <yao@codesourcery.com>
6001
6002 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6003 * config.in, configure: Re-generate.
6004 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6005 is defined.
6006
9c232dda
YQ
60072014-11-21 Yao Qi <yao@codesourcery.com>
6008
6009 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6010 (AC_CHECK_HEADERS): Remove malloc.h.
6011 * configure: Re-generated.
6012 * config.in: Re-generated.
6013 * server.h: Don't include alloca.h and malloc.h.
6014 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6015 Don't include malloc.h.
6016
43968415
JB
60172014-11-17 Joel Brobecker <brobecker@adacore.com>
6018
6019 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6020 corresponding ERRNO check in same block.
6021
40e91bc7
PA
60222014-11-12 Pedro Alves <palves@redhat.com>
6023
6024 * server.c (cont_thread): Update comment.
6025 (start_inferior, attach_inferior): No longer clear cont_thread.
6026 (handle_v_cont): No longer set cont_thread.
6027 (captured_main): Clear cont_thread each time a GDB connects.
6028
c2c118cf
PA
60292014-11-12 Pedro Alves <palves@redhat.com>
6030
6031 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6032 thread, and don't resume all threads if the Hc thread has exited.
6033
78708b7c
PA
60342014-11-12 Pedro Alves <palves@redhat.com>
6035
6036 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6037 the process group instead of to a specific LWP.
6038
a2abc7de
PA
60392014-10-15 Pedro Alves <palves@redhat.com>
6040
6041 PR server/17487
6042 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6043 parameter.
6044 (arm_set_thread_context): Delete.
6045 (the_low_target): Adjust.
6046 * win32-i386-low.c (debug_registers_changed)
6047 (debug_registers_used): Delete.
6048 (update_debug_registers_callback): New function.
6049 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6050 needing to update their debug registers.
6051 (win32_get_current_dr): New function.
6052 (x86_dr_low_get_addr, x86_dr_low_get_control)
6053 (x86_dr_low_get_status): Fetch the debug register from the thread
6054 record's context.
6055 (i386_initial_stuff): Adjust.
6056 (i386_get_thread_context): Remove current_event parameter. Don't
6057 clear debug_registers_changed nor copy DR values to
6058 debug_reg_state.
6059 (i386_set_thread_context): Delete.
6060 (i386_prepare_to_resume): New function.
6061 (i386_thread_added): Mark the thread as needing to update irs
6062 debug registers.
6063 (the_low_target): Remove i386_set_thread_context and install
6064 i386_prepare_to_resume.
6065 * win32-low.c (win32_get_thread_context): Adjust.
6066 (win32_set_thread_context): Use SetThreadContext
6067 directly.
6068 (win32_prepare_to_resume): New function.
6069 (win32_require_context): New function, factored out from ...
6070 (thread_rec): ... this.
6071 (continue_one_thread): Call win32_prepare_to_resume on each thread
6072 we're about to continue.
6073 (win32_resume): Call win32_prepare_to_resume on the event thread.
6074 * win32-low.h (struct win32_thread_info)
6075 <debug_registers_changed>: New field.
6076 (struct win32_target_ops): Change prototype of set_thread_context,
6077 delete set_thread_context and add prepare_to_resume.
6078 (win32_require_context): New declaration.
6079
a442d071
GB
60802014-10-08 Gary Benson <gbenson@redhat.com>
6081
6082 * server.h: Do not include common-exceptions.h.
6083
6f1947e8
GB
60842014-10-08 Gary Benson <gbenson@redhat.com>
6085
6086 * server.h: Do not include cleanups.h.
6087
63b434a4
JH
60882014-09-30 James Hogan <james.hogan@imgtec.com>
6089
6090 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6091 mips64-dsp-linux.c.
6092
c4d9ceb6
YQ
60932014-09-23 Yao Qi <yao@codesourcery.com>
6094
6095 * linux-low.c (lp_status_maybe_breakpoint): New function.
6096 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6097 (count_events_callback): Likewise.
6098 (select_event_lwp_callback): Likewise.
6099 (cancel_breakpoints_callback): Likewise.
6100
89a5711c
DB
61012014-09-19 Don Breazeal <donb@codesourcery.com>
6102
6103 * linux-low.c (handle_extended_wait): Call
6104 linux_ptrace_get_extended_event.
6105 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6106 linux_is_extended_waitstatus.
6107
bffc0964
JB
61082014-09-16 Joel Brobecker <brobecker@adacore.com>
6109
6110 * Makefile.in (CPPFLAGS): Define.
6111 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6112 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6113
0bfdf32f
GB
61142014-09-16 Gary Benson <gbenson@redhat.com>
6115
6116 * inferiors.h (current_inferior): Renamed as...
6117 (current_thread): New variable. All uses updated.
6118 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6119 (maybe_move_out_of_jump_pad): Likewise.
6120 (cancel_breakpoint): Likewise.
6121 (linux_low_filter_event): Likewise.
6122 (wait_for_sigstop): Likewise.
6123 (linux_resume_one_lwp): Likewise.
6124 (need_step_over_p): Likewise.
6125 (start_step_over): Likewise.
6126 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6127 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6128 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6129 and save_inferior as saved_thread.
6130 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6131 saved_thread.
6132 (regcache_invalidate_thread): Likewise.
6133 * remote-utils.c (prepare_resume_reply): Likewise.
6134 * thread-db.c (thread_db_get_tls_address): Likewise.
6135 (disable_thread_event_reporting): Likewise.
6136 (remove_thread_event_breakpoints): Likewise.
6137 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6138 as saved_thread.
6139 * target.h (set_desired_inferior): Renamed as...
6140 (set_desired_thread): New declaration. All uses updated.
6141 * server.c (myresume): Updated comment to reference thread instead
6142 of inferior.
6143 (handle_serial_event): Likewise.
6144 (handle_target_event): Likewise.
6145
361c8ade
GB
61462014-09-12 Tom Tromey <tromey@redhat.com>
6147 Gary Benson <gbenson@redhat.com>
6148
6149 * regcache.h: Include common-regcache.h.
6150 (regcache_read_pc): Don't declare.
6151 * regcache.c (get_thread_regcache_for_ptid): New function.
6152
bd9269f7
GB
61532014-09-11 Tom Tromey <tromey@redhat.com>
6154 Gary Benson <gbenson@redhat.com>
6155
6156 * symbol.c: New file.
6157 * Makefile.in (SFILES): Add symbol.c.
6158 (OBS): Add symbol.o.
6159
f8c1d06b
GB
61602014-09-11 Gary Benson <gbenson@redhat.com>
6161
6162 * target.c (target_stop_ptid, target_continue_ptid): New
6163 functions.
6164
721ec300
GB
61652014-09-11 Tom Tromey <tromey@redhat.com>
6166 Gary Benson <gbenson@redhat.com>
6167
6168 * target.h: Include target/target.h.
6169 * target.c (target_read_memory, target_read_uint32)
6170 (target_write_memory): New functions.
6171
c5e92cca
GB
61722014-09-11 Gary Benson <gbenson@redhat.com>
6173
6174 * server.h (debug_hw_points): Don't declare.
6175 * server.c (debug_hw_points): Don't define. Replace all uses
6176 with show_debug_regs.
6177 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6178 all uses with show_debug_regs.
6179
2e4bb98a
EBM
61802014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6181
6182 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6183 endianness into account.
6184 (ppc_supply_ptrace_register): Likewise.
6185
ac740bc7
JH
61862014-09-03 James Hogan <james.hogan@imgtec.com>
6187
6188 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6189 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6190
97ea6506
GB
61912014-09-03 Gary Benson <gbenson@redhat.com>
6192
6193 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6194 ALL_DEBUG_ADDRESS_REGISTERS.
6195
df7e5265
GB
61962014-09-02 Gary Benson <gbenson@redhat.com>
6197
6198 * i386-low.h: Renamed as...
6199 * x86-low.h: New file. All type, function and variable name
6200 prefixes changed from "i386_" to "x86_". All references updated.
6201 * i386-low.c: Renamed as...
6202 * x86-low.c: New file. All type, function and variable name
6203 prefixes changed from "i386_" to "x86_". All references updated.
6204
ed859da7
GB
62052014-09-02 Gary Benson <gbenson@redhat.com>
6206
6207 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6208 (x86_linux_new_thread): Likewise.
6209
860789c7
GB
62102014-08-29 Gary Benson <gbenson@redhat.com>
6211
6212 * server.h (setjmp.h): Do not include.
6213 (toplevel): Do not declare.
6214 (common-exceptions.h): Include.
6215 (cleanups.h): Likewise.
6216 * server.c (toplevel): Do not define.
6217 (exit_code): New static global.
6218 (detach_or_kill_for_exit_cleanup): New function.
6219 (main): New function. Original main renamed to...
6220 (captured_main): New function.
6221 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6222
ff55e1b5
GB
62232014-08-29 Gary Benson <gbenson@redhat.com>
6224
6225 * Makefile.in (SFILES): Add common/common-exceptions.c.
6226 (OBS): Add common-exceptions.o.
6227 (common-exceptions.o): New rule.
6228 * utils.c (prepare_to_throw_exception): New function.
6229
e9bcb658
GB
62302014-08-29 Gary Benson <gbenson@redhat.com>
6231
6232 * config.in: Regenerate.
6233 * configure: Likewise.
6234
e3180625
GB
62352014-08-29 Gary Benson <gbenson@redhat.com>
6236
6237 * Makefile.in (SFILES): Add common/cleanups.c.
6238 (OBS): cleanups.o.
6239 (cleanups.o): New rule.
6240
e3d6ba5d
GB
62412014-08-29 Gary Benson <gbenson@redhat.com>
6242
6243 * utils.c (internal_vwarning): New function.
6244
7096e886
GB
62452014-08-28 Gary Benson <gbenson@redhat.com>
6246
6247 * utils.h (fatal): Remove declaration.
6248 * utils.c (fatal): Remove function.
6249
14ce3192
GB
62502014-08-28 Gary Benson <gbenson@redhat.com>
6251
6252 * tracepoint.c (gdb_agent_init): Replace fatal with
6253 perror_with_name.
6254 (initialize_tracepoint): Likewise.
6255
50278d59
GB
62562014-08-28 Gary Benson <gbenson@redhat.com>
6257
6258 * remote-utils.c (remote_prepare): Replace fatal with error.
6259
aa96c426
GB
62602014-08-28 Gary Benson <gbenson@redhat.com>
6261
6262 * linux-low.c (linux_async): Replace fatal with warning.
6263 Tidy up and return.
6264 (linux_start_non_stop): Return -1 if linux_async failed.
6265
f7160e97
GB
62662014-08-28 Gary Benson <gbenson@redhat.com>
6267
6268 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6269 gdb_assert.
6270 (i386_dr_low_get_addr): Remove vague comment.
6271 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6272 gdb_assert.
6273
38e08fca
GB
62742014-08-28 Gary Benson <gbenson@redhat.com>
6275
6276 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6277 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6278 internal_error.
6279 (linux_resume_one_lwp): Likewise.
6280 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6281 gdb_assert.
6282 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6283 with internal_error.
6284 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6285 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6286 (find_register_by_name): Replace fatal with internal_error.
6287 (find_regno): Likewise.
6288 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6289 * thread-db.c (thread_db_create_event): Likewise.
6290 (thread_db_load_search): Likewise.
6291 (try_thread_db_load_1): Likewise.
6292 * tracepoint.c (get_jump_space_head): Replace fatal with
6293 internal_error.
6294 (claim_trampoline_space): Likewise.
6295 (have_fast_tracepoint_trampoline_buffer): Likewise.
6296 (cmd_qtstart): Likewise.
6297 (stop_tracing): Likewise.
6298 (fast_tracepoint_collecting): Likewise.
6299 (target_malloc): Likewise.
6300 (download_tracepoint): Likewise.
6301 (download_trace_state_variables): Replace check with gdb_assert.
6302 (upload_fast_traceframes): Replace fatal with internal_error.
6303
34abf635
GB
63042014-08-19 Tom Tromey <tromey@redhat.com>
6305 Gary Benson <gbenson@redhat.com>
6306
6307 * Makefile.in (SFILES): Add common/common-debug.c.
6308 (OBS): Add common-debug.o.
6309 (common-debug.o): New rule.
6310 * debug.h (debug_printf): Don't declare.
6311 * debug.c (debug_printf): Renamed and rewritten as...
6312 (debug_vprintf): New function.
6313
f6e94d78
GB
63142014-08-19 Gary Benson <gbenson@redhat.com>
6315
6316 * utils.h: Do not include print-utils.h.
6317
9239eeab
GB
63182014-08-19 Tom Tromey <tromey@redhat.com>
6319 Gary Benson <gbenson@redhat.com>
6320
6321 * server.h: Add static assertion.
6322 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6323
ef87c8bb
GB
63242014-08-19 Tom Tromey <tromey@redhat.com>
6325 Gary Benson <gbenson@redhat.com>
6326
6327 * Makefile.in (SFILES): Add common/errors.c.
6328 (OBS): Add errors.o.
6329 (IPA_OBS): Add errors-ipa.o.
6330 (errors.o): New rule.
6331 (errors-ipa.o): Likewise.
6332 * utils.h (perror_with_name, error, warning): Don't declare.
6333 * utils.c (warning): Renamed and rewritten as...
6334 (vwarning): New function.
6335 (error): Renamed and rewritten as...
6336 (verror): New function.
6337 (internal_error): Renamed and rewritten as...
6338 (internal_verror): New function.
6339
bb974a24
GB
63402014-08-07 Gary Benson <gbenson@redhat.com>
6341
6342 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6343 * configure: Regenerate.
6344 * config.in: Likewise.
6345 * server.h: Do not include errno.h.
6346 * event-loop.c: Likewise.
6347 * hostio-errno.c: Likewise.
6348 * linux-low.c: Likewise.
6349 * remote-utils.c: Likewise.
6350 * spu-low.c: Likewise.
6351 * utils.c: Likewise.
6352 * gdbreplay.c: Unconditionally include errno.h.
6353
6d3d12eb
GB
63542014-08-07 Gary Benson <gbenson@redhat.com>
6355
6356 * server.h: Do not include string.h.
6357 * event-loop.c: Likewise.
6358 * linux-low.c: Likewise.
6359 * regcache.c: Likewise.
6360 * remote-utils.c: Likewise.
6361 * spu-low.c: Likewise.
6362 * utils.c: Likewise.
6363
dccbb609
GB
63642014-08-07 Gary Benson <gbenson@redhat.com>
6365
6366 * server.h: Do not include gdb_assert.h.
6367
e76df0d0
GB
63682014-08-07 Gary Benson <gbenson@redhat.com>
6369
6370 * server.h: Do not include common-utils.h.
6371
4cb9c816
GB
63722014-08-07 Gary Benson <gbenson@redhat.com>
6373
6374 * server.h: Do not include ptid.h.
6375 * notif.h: Likewise.
6376
3995eeee
GB
63772014-08-07 Gary Benson <gbenson@redhat.com>
6378
6379 * server.h: Do not include gdb_locale.h.
6380
cb9f1a9b
GB
63812014-08-07 Gary Benson <gbenson@redhat.com>
6382
6383 * server.h: Do not include gdb/signals.h.
6384 * win32-low.c: Likewise.
6385
a5fceff8
GB
63862014-08-07 Gary Benson <gbenson@redhat.com>
6387
6388 * server.h: Do not include pathmax.h.
6389
b9391142
GB
63902014-08-07 Gary Benson <gbenson@redhat.com>
6391
6392 * server.h: Do not include libiberty.h.
6393 * linux-bfin-low.c: Likewise.
6394
0e443c87
GB
63952014-08-07 Gary Benson <gbenson@redhat.com>
6396
6397 * server.h: Do not include ansidecl.h.
6398
8ebb3f56
GB
63992014-08-07 Gary Benson <gbenson@redhat.com>
6400
6401 * linux-x86-low.c: Do not include stddef.h.
6402 * lynx-ppc-low.c: Likewise.
6403 * tracepoint.c: Likewise.
6404
8980bdf6
GB
64052014-08-07 Gary Benson <gbenson@redhat.com>
6406
6407 * server.h: Do not include stdarg.h.
6408 * nto-low.c: Likewise.
6409
d7096f71
GB
64102014-08-07 Gary Benson <gbenson@redhat.com>
6411
6412 * server.h: Do not include stdlib.h.
6413 * inferiors.c: Likewise.
6414 * linux-low.c: Likewise.
6415 * regcache.c: Likewise.
6416 * spu-low.c: Likewise.
6417 * tracepoint.c: Likewise.
6418 * utils.c: Likewise.
6419
d02f550d
GB
64202014-08-07 Gary Benson <gbenson@redhat.com>
6421
6422 * server.h: Do not include stdio.h.
6423 * linux-low.c: Likewise.
6424 * remote-utils.c: Likewise.
6425 * spu-low.c: Likewise.
6426 * utils.c: Likewise.
6427 * wincecompat.c: Likewise.
6428
87f6c4e3
GB
64292014-08-06 Gary Benson <gbenson@redhat.com>
6430
6431 * regcache.c (init_register_cache): Move conditionals inside if.
6432
7089dca4
GB
64332014-08-06 Gary Benson <gbenson@redhat.com>
6434
6435 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6436
462f517e
GB
64372014-07-31 Gary Benson <gbenson@redhat.com>
6438
6439 * ax.h: Do not include server.h.
6440 * gdbthread.h: Likewise.
6441 * lynx-low.h: Likewise.
6442 * notif.h: Likewise.
6443
976411d6
GB
64442014-07-30 Gary Benson <gbenson@redhat.com>
6445
6446 * server.h: Include common-defs.h.
6447 Do not include config.h or build-gnulib-gdbserver/config.h.
6448
d41f6d8e
GB
64492014-07-30 Gary Benson <gbenson@redhat.com>
6450
6451 * hostio-errno.c: Move server.h to top of includes list.
6452 * inferiors.c: Likewise.
6453 * linux-x86-low.c: Likewise.
6454 * notif.c: Include server.h.
6455
314c6a35
TT
64562014-07-24 Tom Tromey <tromey@redhat.com>
6457 Gary Benson <gbenson@redhat.com>
6458
6459 * server.h (CORE_ADDR): Now unsigned.
6460
69ff6be5
PA
64612014-07-16 Pedro Alves <palves@redhat.com>
6462
6463 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6464
ce9e3fe7
PA
64652014-07-15 Pedro Alves <palves@redhat.com>
6466
6467 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6468 copy.
6469
e76126e8
PA
64702014-07-11 Pedro Alves <palves@redhat.com>
6471
6472 * linux-low.c (kill_wait_lwp): New function, based on
6473 kill_one_lwp_callback, but use my_waitpid directly.
6474 (kill_one_lwp_callback, linux_kill): Use it.
6475
8e9db26e
PA
64762014-06-23 Pedro Alves <palves@redhat.com>
6477
6478 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6479 before setting DR0..DR3.
6480
698b3e08
GB
64812014-06-20 Gary Benson <gbenson@redhat.com>
6482
6483 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6484 * configure: Regenerated.
6485 * config.in: Likewise.
6486
125f8a3d
GB
64872014-06-20 Gary Benson <gbenson@redhat.com>
6488
6489 * Makefile.in (SFILES): Update locations for files moved
6490 from common to nat.
6491 (object file files): Reordered.
6492
42995dbd
GB
64932014-06-20 Gary Benson <gbenson@redhat.com>
6494
6495 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6496 (i386_dr_low_set_addr): Likewise.
6497 (i386_dr_low_get_addr): Likewise.
6498 (i386_dr_low_can_set_control): Likewise.
6499 (i386_dr_low_set_control): Likewise.
6500 (i386_dr_low_get_control): Likewise.
6501 (i386_dr_low_get_status): Likewise.
6502 (i386_get_debug_register_length): Likewise.
6503 * linux-x86-low.c (i386_dr_low_set_addr):
6504 Changed signature. Made static.
6505 (i386_dr_low_get_addr): Likewise.
6506 (i386_dr_low_set_control): Likewise.
6507 (i386_dr_low_get_control): Likewise.
6508 (i386_dr_low_get_status): Likewise.
6509 (i386_dr_low): New global variable.
6510 * win32-i386-low.c (i386_dr_low_set_addr):
6511 Changed signature. Made static.
6512 (i386_dr_low_get_addr): Likewise.
6513 (i386_dr_low_set_control): Likewise.
6514 (i386_dr_low_get_control): Likewise.
6515 (i386_dr_low_get_status): Likewise.
6516 (i386_dr_low): New global variable.
6517
e1d2394b
MS
65182014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6519
6520 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6521 * Makefile.in (AR, AR_FLAGS): Define.
6522 * configure: Regenerate.
6523
3a8ee006
GB
65242014-06-19 Gary Benson <gbenson@redhat.com>
6525
6526 * Makefile.in (i386-dregs.o): New rule.
6527 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6528 * i386-low.c (target.h): Remove include.
6529 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6530 (DR_CONTROL_SHIFT): Likewise.
6531 (DR_CONTROL_SIZE): Likewise.
6532 (DR_RW_EXECUTE): Likewise.
6533 (DR_RW_WRITE): Likewise.
6534 (DR_RW_READ): Likewise.
6535 (DR_RW_IORW): Likewise.
6536 (DR_LEN_1): Likewise.
6537 (DR_LEN_2): Likewise.
6538 (DR_LEN_4): Likewise.
6539 (DR_LEN_8): Likewise.
6540 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6541 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6542 (DR_ENABLE_SIZE): Likewise.
6543 (DR_LOCAL_SLOWDOWN): Likewise.
6544 (DR_GLOBAL_SLOWDOWN): Likewise.
6545 (DR_CONTROL_RESERVED): Likewise.
6546 (I386_DR_CONTROL_MASK): Likewise.
6547 (I386_DR_VACANT): Likewise.
6548 (I386_DR_LOCAL_ENABLE): Likewise.
6549 (I386_DR_GLOBAL_ENABLE): Likewise.
6550 (I386_DR_DISABLE): Likewise.
6551 (I386_DR_SET_RW_LEN): Likewise.
6552 (I386_DR_GET_RW_LEN): Likewise.
6553 (I386_DR_WATCH_HIT): Likewise.
6554 (i386_wp_op_t): Likewise.
6555 (i386_show_dr): Likewise.
6556 (i386_length_and_rw_bits): Likewise.
6557 (i386_insert_aligned_watchpoint): Likewise.
6558 (i386_remove_aligned_watchpoint): Likewise.
6559 (i386_handle_nonaligned_watchpoint): Likewise.
6560 i386_update_inferior_debug_regs(): Likewise.
6561 (i386_dr_insert_watchpoint): Likewise.
6562 (i386_dr_remove_watchpoint): Likewise.
6563 (i386_dr_region_ok_for_watchpoint): Likewise.
6564 (i386_dr_stopped_data_address): Likewise.
6565 (i386_dr_stopped_by_watchpoint): Likewise.
6566
8f26655c
GB
65672014-06-19 Gary Benson <gbenson@redhat.com>
6568
6569 * i386-low.c (i386_dr_show): Renamed to
6570 i386_show_dr and made static. All uses updated.
6571 (i386_dr_length_and_rw_bits): Renamed to
6572 i386_length_and_rw_bits and made static.
6573 All uses updated.
6574 (i386_dr_insert_aligned_watchpoint): Renamed to
6575 i386_insert_aligned_watchpoint and made static.
6576 All uses updated.
6577 (i386_dr_remove_aligned_watchpoint): Renamed to
6578 i386_remove_aligned_watchpoint and made static.
6579 All uses updated.
6580 (i386_dr_update_inferior_debug_regs): Renamed to
6581 i386_update_inferior_debug_regs and made static.
6582 All uses updated.
6583
b9228891
GB
65842014-06-18 Gary Benson <gbenson@redhat.com>
6585
5171def3
GB
6586 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6587 (i386_dr_low_can_set_control): Likewise.
6588 (i386_get_debug_register_length): Likewise.
6589 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6590 (i386_dr_low_can_set_control): Likewise.
6591 (i386_get_debug_register_length): Likewise.
6592
65932014-06-17 Gary Benson <gbenson@redhat.com>
6594
b9228891
GB
6595 * i386-low.h (i386-dregs.h): New include.
6596 (DR_FIRSTADDR): Now in i386-dregs.h.
6597 (DR_LASTADDR): Likewise.
6598 (DR_NADDR): Likewise.
6599 (DR_STATUS): Likewise.
6600 (DR_CONTROL): Likewise.
6601 (i386_debug_reg_state): Likewise.
6602 (i386_dr_insert_watchpoint): Likewise.
6603 (i386_dr_remove_watchpoint): Likewise.
6604 (i386_dr_region_ok_for_watchpoint): Likewise.
6605 (i386_dr_stopped_data_address): Likewise.
6606 (i386_dr_stopped_by_watchpoint): Likewise.
6607 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6608
4be83cc2
GB
66092014-06-18 Gary Benson <gbenson@redhat.com>
6610
6611 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6612 i386_dr_insert_watchpoint.
6613 (i386_low_remove_watchpoint): Renamed to
6614 i386_dr_remove_watchpoint.
6615 (i386_low_region_ok_for_watchpoint): Renamed to
6616 i386_dr_region_ok_for_watchpoint.
6617 (i386_low_stopped_data_address): Renamed to
6618 i386_dr_stopped_data_address.
6619 (i386_low_stopped_by_watchpoint): Renamed to
6620 i386_dr_stopped_by_watchpoint.
6621 * i386-low.c (i386_show_dr): Renamed to
6622 i386_dr_show and made nonstatic. All uses updated.
6623 (i386_length_and_rw_bits): Renamed to
6624 i386_dr_length_and_rw_bits and made nonstatic.
6625 All uses updated.
6626 (i386_insert_aligned_watchpoint): Renamed to
6627 i386_dr_insert_aligned_watchpoint and made nonstatic.
6628 All uses updated.
6629 (i386_remove_aligned_watchpoint): Renamed to
6630 i386_dr_remove_aligned_watchpoint and made nonstatic.
6631 All uses updated.
6632 (i386_update_inferior_debug_regs): Renamed to
6633 i386_dr_update_inferior_debug_regs and made nonstatic.
6634 All uses updated.
6635 (i386_low_insert_watchpoint): Renamed to
6636 i386_dr_insert_watchpoint. All uses updated.
6637 (i386_low_remove_watchpoint): Renamed to
6638 i386_dr_remove_watchpoint. All uses updated.
6639 (i386_low_region_ok_for_watchpoint): Renamed to
6640 i386_dr_region_ok_for_watchpoint. All uses updated.
6641 (i386_low_stopped_data_address): Renamed to
6642 i386_dr_stopped_data_address. All uses updated.
6643 (i386_low_stopped_by_watchpoint): Renamed to
6644 i386_dr_stopped_by_watchpoint. All uses updated.
6645
131aa0d4
GB
66462014-06-18 Gary Benson <gbenson@redhat.com>
6647
6648 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6649 (i386_dr_low_can_set_control): Likewise.
6650 (i386_insert_aligned_watchpoint): New check.
6651
d9305f7f
GB
66522014-06-18 Gary Benson <gbenson@redhat.com>
6653
6654 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6655 Renamed to state.
6656
e927c9fc
GB
66572014-06-18 Gary Benson <gbenson@redhat.com>
6658
6659 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6660 instead of fatal and error.
6661 (i386_handle_nonaligned_watchpoint): Likewise.
6662
1b6d4134
GB
66632014-06-18 Gary Benson <gbenson@redhat.com>
6664
6665 * i386-low.c (i386_get_debug_register_length): New macro.
6666 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6667 (i386_show_dr): Use debug_printf instead of fprintf. Use
6668 phex to format values.
6669
6e62758f
GB
66702014-06-18 Gary Benson <gbenson@redhat.com>
6671
6672 * i386-low.h: Comment changes.
6673 * i386-low.c: Likewise.
6674
fc6e2f03
GB
66752014-06-18 Gary Benson <gbenson@redhat.com>
6676
6677 * i386-low.c: Whitespace changes.
6678
f9d1eeed
TT
66792014-06-12 Tom Tromey <tromey@redhat.com>
6680
6681 * utils.c (freeargv): Remove.
6682
0b04e523
TT
66832014-06-12 Tom Tromey <tromey@redhat.com>
6684
6685 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6686 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6687 (parse_debug_format_options): Likewise.
6688 (gdbserver_usage): Likewise.
6689 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6690 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6691 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6692 against libiberty.
6693 ($(LIBGNU)): Depend on libiberty.
6694 (all-lib): Recurse into all subdirs.
6695 (install-only): Invoke "install" target in subdirs.
6696 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6697 targets.
6698 * configure: Rebuild.
6699 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6700 for vasprintf, vsnprintf, or gettimeofday.
6701 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6702 srv_tgtobj.
6703
270c9937
JB
67042014-06-05 Joel Brobecker <brobecker@adacore.com>
6705
6706 * development.sh: Delete.
6707 * Makefile.in (config.status): Adjust dependency on development.sh.
6708 * configure.ac: Adjust development.sh source call.
6709 * configure: Regenerate.
6710
0a261ed8
PA
67112014-06-02 Pedro Alves <palves@redhat.com>
6712
6713 * ax.c (gdb_free_agent_expr): New function.
6714 * ax.h (gdb_free_agent_expr): New declaration.
6715 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6716 list.
6717 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6718 static.
6719 (clear_breakpoint_conditions_and_commands): New function.
6720 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6721 (clear_breakpoint_conditions_and_commands): New declaration.
6722
e9dae05e
RR
67232014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6724
6725 * linux-aarch64-low.c (asm/ptrace.h): Include.
6726
5876f503
JK
67272014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6728
6729 Fix TLS access for -static -pthread.
6730 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6731 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6732 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6733
802e8e6d
PA
67342014-05-20 Pedro Alves <palves@redhat.com>
6735
6736 * linux-aarch64-low.c (aarch64_insert_point)
6737 (aarch64_remove_point): No longer check whether the type is
6738 supported here. Adjust to new interface.
6739 (the_low_target): Install aarch64_supports_z_point_type as
6740 supports_z_point_type method.
6741 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6742 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6743 instead of a Z packet char. Adjust.
6744 (arm_supports_z_point_type): New function.
6745 (arm_insert_point, arm_remove_point): Adjust to new interface.
6746 (the_low_target): Install arm_supports_z_point_type.
6747 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6748 (cris_insert_point, cris_remove_point): Adjust to new interface.
6749 Don't check whether the type is supported here.
6750 (the_low_target): Install cris_supports_z_point_type.
6751 * linux-low.c (linux_supports_z_point_type): New function.
6752 (linux_insert_point, linux_remove_point): Adjust to new interface.
6753 * linux-low.h (struct linux_target_ops) <insert_point,
6754 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6755 raw_breakpoint pointer parameter.
6756 <supports_z_point_type>: New method.
6757 * linux-mips-low.c (mips_supports_z_point_type): New function.
6758 (mips_insert_point, mips_remove_point): Adjust to new interface.
6759 Use mips_supports_z_point_type.
6760 (the_low_target): Install mips_supports_z_point_type.
6761 * linux-ppc-low.c (the_low_target): Install NULL as
6762 supports_z_point_type method.
6763 * linux-s390-low.c (the_low_target): Install NULL as
6764 supports_z_point_type method.
6765 * linux-sparc-low.c (the_low_target): Install NULL as
6766 supports_z_point_type method.
6767 * linux-x86-low.c (x86_supports_z_point_type): New function.
6768 (x86_insert_point): Adjust to new insert_point interface. Use
6769 insert_memory_breakpoint. Adjust to new
6770 i386_low_insert_watchpoint interface.
6771 (x86_remove_point): Adjust to remove_point interface. Use
6772 remove_memory_breakpoint. Adjust to new
6773 i386_low_remove_watchpoint interface.
6774 (the_low_target): Install x86_supports_z_point_type.
6775 * lynx-low.c (lynx_target_ops): Install NULL as
6776 supports_z_point_type callback.
6777 * nto-low.c (nto_supports_z_point_type): New.
6778 (nto_insert_point, nto_remove_point): Adjust to new interface.
6779 (nto_target_ops): Install nto_supports_z_point_type.
6780 * mem-break.c: Adjust intro comment.
6781 (struct raw_breakpoint) <raw_type, size>: New fields.
6782 <inserted>: Update comment.
6783 <shlib_disabled>: Delete field.
6784 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6785 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6786 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6787 (raw_bkpt_type_to_target_hw_bp_type): New function.
6788 (find_enabled_raw_code_breakpoint_at): New function.
6789 (find_raw_breakpoint_at): New type and size parameters. Use them.
6790 (insert_memory_breakpoint): New function, based off
6791 set_raw_breakpoint_at.
6792 (remove_memory_breakpoint): New function.
6793 (set_raw_breakpoint_at): Reimplement.
6794 (set_breakpoint): New, based on set_breakpoint_at.
6795 (set_breakpoint_at): Reimplement.
6796 (delete_raw_breakpoint): Go through the_target->remove_point
6797 instead of assuming memory breakpoints.
6798 (find_gdb_breakpoint_at): Delete.
6799 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6800 (find_gdb_breakpoint): New function.
6801 (set_gdb_breakpoint_at): Delete.
6802 (z_type_supported): New function.
6803 (set_gdb_breakpoint_1): New function, loosely based off
6804 set_gdb_breakpoint_at.
6805 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6806 (delete_gdb_breakpoint_at): Delete.
6807 (delete_gdb_breakpoint_1): New function, loosely based off
6808 delete_gdb_breakpoint_at.
6809 (delete_gdb_breakpoint): New function.
6810 (clear_gdb_breakpoint_conditions): Rename to ...
6811 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6812 breakpoint.
6813 (add_condition_to_breakpoint): Make static.
6814 (add_breakpoint_condition): Take a struct breakpoint pointer
6815 instead of an address. Adjust.
6816 (gdb_condition_true_at_breakpoint): Rename to ...
6817 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6818 z_type parameter.
6819 (gdb_condition_true_at_breakpoint): Reimplement.
6820 (add_breakpoint_commands): Take a struct breakpoint pointer
6821 instead of an address. Adjust.
6822 (gdb_no_commands_at_breakpoint): Rename to ...
6823 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6824 parameter. Return true if no breakpoint was found. Change debug
6825 output.
6826 (gdb_no_commands_at_breakpoint): Reimplement.
6827 (run_breakpoint_commands): Rename to ...
6828 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6829 and change return type to boolean.
6830 (run_breakpoint_commands): New function.
6831 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6832 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6833 breakpoint. Go through the_target->remove_point instead of
6834 assuming memory breakpoint.
6835 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6836 software and hardware breakpoints.
6837 (reinsert_raw_breakpoint): Go through the_target->insert_point
6838 instead of assuming memory breakpoint.
6839 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6840 software and hardware breakpoints.
6841 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6842 Check both software and hardware breakpoints.
6843 (validate_inserted_breakpoint): Assert the breakpoint is a
6844 software breakpoint. Set the inserted flag to -1 instead of
6845 setting shlib_disabled.
6846 (delete_disabled_breakpoints): Adjust.
6847 (validate_breakpoints): Only validate software breakpoints.
6848 Adjust to inserted flag change.
6849 (check_mem_read, check_mem_write): Skip breakpoint types other
6850 than software breakpoints. Adjust to inserted flag change.
6851 * mem-break.h (enum raw_bkpt_type): New enum.
6852 (raw_breakpoint, struct process_info): Forward declare.
6853 (Z_packet_to_target_hw_bp_type): Delete declaration.
6854 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6855 (set_gdb_breakpoint, delete_gdb_breakpoint)
6856 (clear_breakpoint_conditions): New declarations.
6857 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6858 (breakpoint_inserted_here): Update comment.
6859 (add_breakpoint_condition, add_breakpoint_commands): Replace
6860 address parameter with a breakpoint pointer parameter.
6861 (gdb_breakpoint_here): Update comment.
6862 (delete_gdb_breakpoint_at): Delete.
6863 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6864 * server.c (process_point_options): Take a struct breakpoint
6865 pointer instead of an address. Adjust.
6866 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6867 delete_gdb_breakpoint.
6868 * spu-low.c (spu_target_ops): Install NULL as
6869 supports_z_point_type method.
6870 * target.h: Include mem-break.h.
6871 (struct target_ops) <prepare_to_access_memory>: Update comment.
6872 <supports_z_point_type>: New field.
6873 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6874 instead of a char. Also take a raw breakpoint pointer.
6875 * win32-arm-low.c (the_low_target): Install NULL as
6876 supports_z_point_type.
6877 * win32-i386-low.c (i386_supports_z_point_type): New function.
6878 (i386_insert_point, i386_remove_point): Adjust to new interface.
6879 (the_low_target): Install i386_supports_z_point_type.
6880 * win32-low.c (win32_supports_z_point_type): New function.
6881 (win32_insert_point, win32_remove_point): Adjust to new interface.
6882 (win32_target_ops): Install win32_supports_z_point_type.
6883 * win32-low.h (struct win32_target_ops):
6884 <supports_z_point_type>: New method.
6885 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6886 instead of a char. Also take a raw breakpoint pointer.
6887
932539e3
PA
68882014-05-20 Pedro Alves <palves@redhat.com>
6889
6890 * mem-break.h: Include break-common.h.
6891 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6892 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6893 (Z_packet_to_target_hw_bp_type): New declaration.
6894 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6895 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6896 (Z_PACKET_ACCESS_WP): Delete macros.
6897 (Z_packet_to_hw_type): Delete function.
6898 * i386-low.h: Don't include break-common.h here.
6899 (Z_packet_to_hw_type): Delete declaration.
6900 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6901 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6902 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6903 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6904 * linux-aarch64-low.c: Don't include break-common.h here.
6905 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6906 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6907 (Z_packet_to_target_hw_bp_type): Delete function.
6908 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6909 function.
6910 (mips_insert_point, mips_remove_point): Use
6911 Z_packet_to_target_hw_bp_type.
6912
4ff0d3d8
PA
69132014-05-20 Pedro Alves <palves@redhat.com>
6914
6915 * linux-aarch64-low.c: Include break-common.h.
6916 (enum target_point_type): Delete.
6917 (Z_packet_to_point_type): Rename to ...
6918 (Z_packet_to_target_hw_bp_type): ... this, and return a
6919 target_hw_bp_type instead.
6920 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6921 instead of an enum target_point_type.
6922 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6923 breakpoint type.
6924 (aarch64_dr_state_insert_one_point)
6925 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6926 (aarch64_handle_aligned_watchpoint)
6927 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6928 Take an enum target_hw_bp_type instead of an enum
6929 target_point_type.
6930 (aarch64_supports_z_point_type): New function.
6931 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6932 use Z_packet_to_target_hw_bp_type.
6933
786dc519
JB
69342014-05-20 Joel Brobecker <brobecker@adacore.com>
6935
6936 * configure.ac: Only use -Werror by default when DEVELOPMENT
6937 is true.
6938 * configure: Regenerate.
6939
9e0aa64f
JK
69402014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6941
6942 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6943 * linux-x86-low.c (X86_64_USER_REGS): New.
6944 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6945
2b577b92
YQ
69462014-04-28 Yao Qi <yao@codesourcery.com>
6947
6948 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6949 name.
6950
94611da2
PA
69512014-04-25 Pedro Alves <palves@redhat.com>
6952
6953 PR server/16255
6954 * linux-low.c (linux_attach_fail_reason_string): New function.
6955 (linux_attach_lwp): Delete.
6956 (linux_attach_lwp_1): Rename to ...
6957 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6958 argument. Remove "initial" parameter. Return int instead of
6959 void. Don't error or warn here.
6960 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6961 failure to attach to the tgid. Call warning when failing to
6962 attach to an lwp.
6963 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6964 argument. Remove "initial" parameter. Return int instead of
6965 void. Don't error or warn here.
6966 (linux_attach_fail_reason_string): New declaration.
6967 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6968 interface change. Use linux_attach_fail_reason_string.
6969
01f9f808
MS
69702014-04-24 Michael Sturm <michael.sturm@mintel.com>
6971 Walfred Tedeschi <walfred.tedeschi@intel.com>
6972
6973 * Makefile.in: Added rules to handle new files
6974 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6975 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6976 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6977 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6978 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6979 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6980 x32-avx512-linux.o.
6981 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6982 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6983 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6984 i386/x32-avx512.xml.
6985 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6986 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6987 i386/x32-avx512-linux.xml.
6988 * i387-fp.c (num_avx512_k_registers): New constant for number
6989 of K registers.
6990 (num_avx512_zmmh_low_registers): New constant for number of
6991 lower ZMM registers (0-15).
6992 (num_avx512_zmmh_high_registers): New constant for number of
6993 higher ZMM registers (16-31).
6994 (num_avx512_ymmh_registers): New contant for number of higher
6995 YMM registers (ymm16-31 added by avx521 on x86_64).
6996 (num_avx512_xmm_registers): New constant for number of higher
6997 XMM registers (xmm16-31 added by AVX512 on x86_64).
6998 (struct i387_xsave): Add space for AVX512 registers.
6999 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7000 Add code to handle AVX512 registers.
7001 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7002 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7003 prototypei from generated file.
7004 (tdesc_amd64_avx512_linux): Likewise.
7005 (init_registers_x32_avx512_linux): Likewise.
7006 (tdesc_x32_avx512_linux): Likewise.
7007 (init_registers_i386_avx512_linux): Likewise.
7008 (tdesc_i386_avx512_linux): Likewise.
7009 (x86_64_regmap): Add AVX512 registers.
7010 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7011 mask.
7012 (initialize_low_arch): Add code to initialize AVX512 registers.
7013
51aa91f9
PA
70142014-04-23 Pedro Alves <palves@redhat.com>
7015
7016 * mem-break.c (find_gdb_breakpoint_at): Make static.
7017 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7018
a4165e94
PA
70192014-04-23 Pedro Alves <palves@redhat.com>
7020
7021 * i386-low.c: Don't include break-common.h here.
7022 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7023 prototype to take target_hw_bp_type as argument instead of a Z
7024 packet char.
7025 * i386-low.h: Include break-common.h here.
7026 (Z_packet_to_hw_type): Declare.
7027 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7028 prototypes.
7029 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7030 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7031 (x86_remove_point): Convert the packet number to a
7032 target_hw_bp_type before calling i386_low_remove_watchpoint.
7033 * win32-i386-low.c (i386_insert_point): Convert the packet number
7034 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7035 (i386_remove_point): Convert the packet number to a
7036 target_hw_bp_type before calling i386_low_remove_watchpoint.
7037
b8acf843
PA
70382014-04-23 Pedro Alves <palves@redhat.com>
7039
7040 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7041
d708bcd1
PA
70422014-04-10 Pedro Alves <palves@redhat.com>
7043
7044 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7045 Check if the condition or command is NULL before checking if the
7046 breakpoint is known. On success, return true.
7047 * mem-break.h (add_breakpoint_condition): Document return.
7048 (add_breakpoint_commands): Add describing comment.
7049 * server.c (skip_to_semicolon): New function.
7050 (process_point_options): Use it.
7051
2eec7d5b
PA
70522014-04-09 Pedro Alves <palves@redhat.com>
7053
7054 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7055 to lwpid_of.
7056
fa96cb38
PA
70572014-02-27 Pedro Alves <palves@redhat.com>
7058
7059 PR 12702
7060 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7061 macros.
7062 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7063 output.
7064 (last_thread_of_process_p): Take a PID argument instead of a
7065 thread pointer.
7066 (linux_wait_for_lwp): Delete.
7067 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7068 functions.
7069 (linux_low_filter_event): New function, party factored out from
7070 linux_wait_for_event.
7071 (linux_wait_for_event): Rename to ...
7072 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7073 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7074 sigsuspend. Check for zombie leaders.
7075 (linux_wait_for_event): Reimplement as wrapper around
7076 linux_wait_for_event_filtered.
7077 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7078 a normal or signal exit is seen, it's the whole process exiting.
7079 (wait_for_sigstop): No longer a for_each_inferior callback.
7080 Rewrite on top of linux_wait_for_event_filtered.
7081 (stop_all_lwps): Call wait_for_sigstop directly.
7082 * server.c (resume, handle_target_event): Handle
7083 TARGET_WAITKIND_NO_RESUMED.
7084
d763de10
JB
70852014-02-26 Joel Brobecker <brobecker@adacore.com>
7086
7087 * win32-low.c (psapi_get_dll_name,
7088 * win32_CreateToolhelp32Snapshot): Delete.
7089 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7090 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7091 Delete.
7092 (handle_load_dll): Add function description.
7093 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7094
850a0f76
JB
70952014-02-26 Joel Brobecker <brobecker@adacore.com>
7096
7097 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7098 Add comment.
7099 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7100 base address when calling win32_add_one_solib.
7101 (handle_load_dll): Delete local variable load_addr.
7102 Remove 0x1000 offset applied to DLL base address when calling
7103 win32_add_one_solib.
7104 (handle_unload_dll): Add comment.
7105
f25b3fc3
JB
71062014-02-26 Joel Brobecker <brobecker@adacore.com>
7107
7108 * win32-low.c (win32_add_all_dlls): Renames
7109 win32_ensure_ntdll_loaded. Rewrite function documentation.
7110 Adjust implementation to always load all DLLs.
7111 Add 0x1000 offset to DLL base address when calling
7112 win32_add_one_solib.
7113 (child_initialization_done): New static global.
7114 (do_initial_child_stuff): Set child_initialization_done to
7115 zero during child initialization, and 1 after. Replace call
7116 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7117 Add comment.
7118 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7119 (handle_unload_dll): Add function documentation.
7120 (get_child_debug_event): Ignore load and unload DLL events
7121 during child initialization.
7122
d86d4aaf
DE
71232014-02-20 Doug Evans <dje@google.com>
7124
3bc32da3 7125 Remove global all_lwps.
d86d4aaf
DE
7126 * inferiors.h (ptid_of): Move here from linux-low.h.
7127 (pid_of, lwpid_of): Ditto.
7128 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7129 parameter is a struct thread_info * now.
7130 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7131 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7132 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7133 directly.
7134 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7135 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7136 * linux-arm-low.c (update_registers_callback): Update, "entry"
7137 parameter is a struct thread_info * now.
7138 Fetch lwpid from current_inferior directly.
7139 (arm_insert_point): Pass &all_threads to find_inferior instead of
7140 &all_lwps.
7141 (arm_remove_point): Ditto.
7142 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7143 (arm_prepare_to_resume): Fetch pid from thread.
7144 (arm_read_description): Fetch lwpid from current_inferior directly.
7145 * linux-low.c (all_lwps): Delete.
7146 (delete_lwp): Delete call to remove_inferior.
7147 (handle_extended_wait): Fetch lwpid from thread.
7148 (add_lwp): Don't set lwp->entry.id. Remove call to
7149 add_inferior_to_list.
7150 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7151 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7152 (kill_one_lwp_callback): Ditto.
7153 (linux_kill): Don't dereference NULL pointer.
7154 Fetch ptid,lwpid from thread.
7155 (get_detach_signal): Fetch ptid from thread.
7156 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7157 Simplify call to regcache_invalidate_thread.
7158 (delete_lwp_callback): Update, "entry" parameter is a
7159 struct thread_info * now. Fetch pid from thread.
7160 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7161 (status_pending_p_callback): Update, "entry" parameter is a
7162 struct thread_info * now. Fetch ptid from thread.
7163 (find_lwp_pid): Update, "entry" parameter is a
7164 struct thread_info * now.
7165 (linux_wait_for_lwp): Fetch pid from thread.
7166 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7167 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7168 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7169 (dequeue_one_deferred_signal): Ditto.
7170 (cancel_breakpoint): Fetch ptid from current_inferior.
7171 (linux_wait_for_event): Pass &all_threads to find_inferior,
7172 not &all_lwps. Fetch ptid, lwpid from thread.
7173 (count_events_callback): Update, "entry" parameter is a
7174 struct thread_info * now.
7175 (select_singlestep_lwp_callback): Ditto.
7176 (select_event_lwp_callback): Ditto.
7177 (cancel_breakpoints_callback): Ditto.
7178 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7179 not &all_lwps.
7180 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7181 (unsuspend_one_lwp): Update, "entry" parameter is a
7182 struct thread_info * now.
7183 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7184 not &all_lwps.
7185 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7186 Fetch lwpid from thread, not lwp.
7187 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7188 Pass &all_threads to find_inferior, not &all_lwps.
7189 (send_sigstop): Fetch lwpid from thread, not lwp.
7190 (send_sigstop_callback): Update, "entry" parameter is a
7191 struct thread_info * now.
7192 (suspend_and_send_sigstop_callback): Ditto.
7193 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7194 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7195 struct thread_info * now.
7196 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7197 from thread, lwp.
7198 (lwp_running): Update, "entry" parameter is a
7199 struct thread_info * now.
7200 (stop_all_lwps): Fetch ptid from thread.
7201 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7202 (linux_resume_one_lwp): Fetch lwpid from thread.
7203 (linux_set_resume_request): Update, "entry" parameter is a
7204 struct thread_info * now. Fetch pid, lwpid from thread.
7205 (resume_status_pending_p): Update, "entry" parameter is a
7206 struct thread_info * now.
7207 (need_step_over_p): Ditto. Fetch lwpid from thread.
7208 (start_step_over): Fetch lwpid from thread.
7209 (linux_resume_one_thread): Update, "entry" parameter is a
7210 struct thread_info * now. Fetch lwpid from thread.
7211 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7212 (proceed_one_lwp): Update, "entry" parameter is a
7213 struct thread_info * now. Fetch lwpid from thread.
7214 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7215 struct thread_info * now.
7216 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7217 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7218 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7219 directly.
7220 (regsets_store_inferior_registers): Ditto.
7221 (fetch_register, store_register): Ditto.
7222 (linux_read_memory, linux_write_memory): Ditto.
7223 (linux_request_interrupt): Ditto.
7224 (linux_read_auxv): Ditto.
7225 (linux_xfer_siginfo): Ditto.
7226 (linux_qxfer_spu): Ditto.
7227 (linux_qxfer_libraries_svr4): Ditto.
7228 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7229 moved to inferiors.h.
7230 (get_lwp): Delete.
7231 (get_thread_lwp): Update.
7232 (struct lwp_info): Delete member "entry". Simplify comment for
7233 member "thread".
7234 (all_lwps): Delete.
7235 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7236 current_inferior directly.
7237 (update_watch_registers_callback): Update, "entry" parameter is a
7238 struct thread_info * now. Fetch pid from thread.
7239 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7240 (mips_insert_point): Fetch lwpid from current_inferior.
7241 Pass &all_threads to find_inferior, not &all_lwps.
7242 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7243 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7244 directly.
7245 (mips_stopped_data_address): Ditto.
7246 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7247 directly.
7248 * linux-tile-low.c (tile_arch_setup): Ditto.
7249 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7250 (update_debug_registers_callback): Update, "entry" parameter is a
7251 struct thread_info * now. Fetch pid from thread.
7252 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7253 Pass &all_threads to find_inferior, not &all_lwps.
7254 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7255 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7256 Pass &all_threads to find_inferior, not &all_lwps.
7257 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7258 (i386_dr_low_get_status): Ditto.
7259 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7260 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7261 (x86_linux_read_description): Ditto.
7262 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7263
3b8361aa
DE
72642014-02-20 Doug Evans <dje@google.com>
7265
7266 * inferiors.c (get_first_inferior): Fix buglet.
7267
f7667f0d
DE
72682014-02-19 Doug Evans <dje@google.com>
7269
7270 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7271 * inferiors.c (add_thread): Change result type to struct thread_info *.
7272 All callers updated.
7273 (add_lwp): Call add_thread here instead of in callers.
7274 All callers updated.
7275 * linux-low.h (get_lwp_thread): Rewrite.
7276 (struct lwp_info): New member "thread".
7277
b3312d80
DE
72782014-02-19 Doug Evans <dje@google.com>
7279
7280 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7281 All callers updated.
7282
ecc6f45c
DE
72832014-02-19 Doug Evans <dje@google.com>
7284
7285 * inferiors.c (add_thread): Fix whitespace.
7286
649ebbca
DE
72872014-02-19 Doug Evans <dje@google.com>
7288
7289 * dll.c (clear_dlls): Replace accessing list implemention details
7290 with API function.
7291 * gdbthread.h (get_first_thread): Declare.
7292 * inferiors.c (for_each_inferior_with_data): New function.
7293 (get_first_thread): New function.
7294 (find_thread_ptid): Simplify.
7295 (get_first_inferior): New function.
7296 (clear_list): Delete.
7297 (one_inferior_p): New function.
7298 (clear_inferior_list): New function.
7299 (clear_inferiors): Update.
7300 * inferiors.h (for_each_inferior_with_data): Declare.
7301 (clear_inferior_list): Declare.
7302 (one_inferior_p): Declare.
7303 (get_first_inferior): Declare.
7304 * linux-low.c (linux_wait_for_event): Replace accessing list
7305 implemention details with API function.
7306 * server.c (target_running): Ditto.
7307 (accumulate_file_name_length): New function.
7308 (emit_dll_description): New function.
7309 (handle_qxfer_libraries): Replace accessing list implemention
7310 details with API function.
7311 (handle_qxfer_threads_worker): New function.
7312 (handle_qxfer_threads_proper): Replace accessing list implemention
7313 details with API function.
7314 (handle_query): Ditto.
7315 (visit_actioned_threads_callback_ftype): New typedef.
7316 (visit_actioned_threads_data): New struct.
7317 (visit_actioned_threads): Rewrite to be find_inferior callback.
7318 (resume): Call find_inferior.
7319 (handle_status): Replace accessing list implemention
7320 details with API function.
7321 (process_serial_event): Replace accessing list implemention details
7322 with API function.
7323 * target.c (set_desired_inferior): Replace accessing list implemention
7324 details with API function.
7325 * tracepoint.c (same_process_p): New function.
7326 (gdb_agent_about_to_close): Replace accessing list implemention
7327 details with API function.
7328 * win32-low.c (child_delete_thread): Replace accessing list
7329 implemention details with API function.
7330 (match_dll_by_basename): New function.
7331 (dll_is_loaded_by_basename): New function.
7332 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7333 details call to dll_is_loaded_by_basename.
7334
80894984
DE
73352014-02-19 Doug Evans <dje@google.com>
7336
7337 * dll.h (struct dll_info): Add comment.
7338 * gdbthread.h (struct thread_info): Add comment.
7339 (current_ptid): Simplify.
7340 * inferiors.c (add_process): Update.
7341 (remove_process): Update.
7342 * inferiors.h (struct process_info): Rename member "head" to "entry".
7343 * linux-low.c (delete_lwp): Update.
7344 (add_lwp): Update.
7345 (last_thread_of_process_p): Update.
7346 (kill_one_lwp_callback, linux_kill): Update.
7347 (status_pending_p_callback): Update.
7348 (wait_for_sigstop): Update. Simplify read of ptid.
7349 (start_step_over): Update.
7350 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7351 (get_lwp_thread): Update.
7352 (struct lwp_info): Rename member "head" to "entry".
7353 * regcache.h (inferior_list_entry): Delete.
7354 * server.c (kill_inferior_callback): Update.
7355 (detach_or_kill_inferior_callback): Update.
7356 (print_started_pid): Update.
7357 (print_attached_pid): Update.
7358 (process_serial_event): Simplify read of ptid.
7359 * thread-db.c (thread_db_create_event): Update.
7360 (thread_db_get_tls_address): Update.
7361 * win32-low.c (current_inferior_ptid): Simplify.
7362
46917d26
TT
73632014-02-19 Tom Tromey <tromey@redhat.com>
7364
7365 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7366 argument.
7367 (target_supports_btrace): Update.
7368
0759a81e
YQ
73692014-02-14 Yao Qi <yao@codesourcery.com>
7370
7371 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7372 (rsp-low-ipa.o): New target.
7373
a7191e8b
TT
73742014-02-12 Tom Tromey <tromey@redhat.com>
7375
7376 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7377 convert_ascii_to_int.
7378 * regcache.c (registers_to_string): Likewise.
7379 * remote-utils.c (decode_M_packet): Likewise.
7380 * server.c (process_serial_event): Likewise.
7381
ff0e980e
TT
73822014-02-12 Tom Tromey <tromey@redhat.com>
7383
7384 * server.c (handle_query, handle_v_run): Use hex2bin, not
7385 unhexify.
7386 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7387
e9371aff
TT
73882014-02-12 Tom Tromey <tromey@redhat.com>
7389
7390 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7391 convert_int_to_ascii.
7392 * regcache.c (registers_to_string, collect_register_as_string):
7393 Likewise.
7394 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7395 Likewise.
7396 * server.c (process_serial_event): Likewise.
7397 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7398 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7399
971dc0b8
TT
74002014-02-12 Tom Tromey <tromey@redhat.com>
7401
7402 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7403 bin2hex, not hexify.
7404 * tracepoint.c (cmd_qtstatus): Likewise.
7405
0a822afb
TT
74062014-02-12 Tom Tromey <tromey@redhat.com>
7407
7408 * remote-utils.c (monitor_output): Pass explicit length to
7409 hexify.
7410
9c3d6531
TT
74112014-02-12 Tom Tromey <tromey@redhat.com>
7412
7413 * tracepoint.c: Include rsp-low.h.
7414 * server.c: Include rsp-low.h.
7415 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7416 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7417 declare.
7418 * remote-utils.c: Include rsp-low.h.
7419 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7420 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7421 (convert_int_to_ascii, convert_ascii_to_int): Move to
7422 common/rsp-low.c.
7423 * regcache.c: Include rsp-low.h.
7424 * ax.c: Include rsp-low.h.
7425 * Makefile.in (SFILES): Add common/rsp-low.c.
7426 (OBS): Add rsp-low.o.
7427 (rsp-low.o): New target.
7428
01fd3ea5
TT
74292014-02-12 Tom Tromey <tromey@redhat.com>
7430
7431 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7432 Include print-utils.h.
7433 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7434 (plongest, thirty_two, phex_nz): Remove.
7435 * Makefile.in (SFILES): Add common/print-utils.c.
7436 (OBS): Add print-utils.o.
7437 (print-utils-ipa.o): New target.
7438 (print-utils.o): New target.
7439 (IPA_OBJS): Add print-utils-ipa.o.
7440
e99dc820
TT
74412014-02-06 Tom Tromey <tromey@redhat.com>
7442
7443 * Makefile.in (SFILES): Fix indentation.
7444
ee1e2d4f
DE
74452014-02-05 Doug Evans <dje@google.com>
7446
7447 * linux-low.c (linux_wait_for_event): Improve comment.
7448 (linux_wait_1): Keep current_inferior in sync with event_child.
7449
f5a02773
DE
74502014-01-22 Doug Evans <dje@google.com>
7451
7452 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7453
87ce2a04
DE
74542014-01-22 Doug Evans <dje@google.com>
7455
7456 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7457 * configure: Regenerate.
7458 * config.in: Regenerate.
7459 * Makefile.in (SFILES): Add debug.c.
7460 (OBS): Add debug.o.
7461 * debug.c: New file.
7462 * debug.h: New file.
7463 * linux-aarch64-low.c (*): Update all debugging printfs to use
7464 debug_printf instead of fprintf.
7465 * linux-arm-low.c (*): Ditto.
7466 * linux-cris-low.c (*): Ditto.
7467 * linux-crisv32-low.c (*): Ditto.
7468 * linux-m32r-low.c (*): Ditto.
7469 * linux-sparc-low.c (*): Ditto.
7470 * linux-x86.c (*): Ditto.
7471 * linux-low.c (*): Ditto.
7472 (linux_wait_1): Add calls to debug_enter, debug_exit.
7473 (linux_wait): Remove redundant debugging printf.
7474 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7475 (linux_resume, unstop_all_lwps): Ditto.
7476 * mem-break.c (*): Update all debugging printfs to use
7477 debug_printf instead of fprintf.
7478 * remote-utils.c (*): Ditto.
7479 * thread-db.c (*): Ditto.
7480 * server.c #include <ctype.h>, "gdb_vecs.h".
7481 (debug_threads): Moved to debug.c.
7482 (*): Update all debugging printfs to use debug_printf instead of
7483 fprintf.
7484 (start_inferior): Replace call to fflush with call to debug_flush.
7485 (monitor_show_help): Mention set debug-format.
7486 (parse_debug_format_options): New function.
7487 (handle_monitor_command): Handle "monitor set debug-format".
7488 (gdbserver_usage): Mention --debug-format.
7489 (main): Parse --debug-format.
7490 * server.h (debug_threads): Declaration moved to debug.h.
7491 #include "debug.h".
7492 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7493 trace_debug_1 that uses debug_printf.
7494 (tracepoint_look_up_symbols): Update all debugging printfs to use
7495 debug_printf instead of fprintf.
7496
e671835b
BS
74972014-01-20 Baruch Siach <baruch@tkos.co.il>
7498
7499 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7500 sys/ptrace.h.
7501
b5737fa9
PA
75022014-01-17 Pedro Alves <palves@redhat.com>
7503
ea38d2a9 7504 PR build/16445
c7faa97a
PA
7505 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7506 defined after including gdb_proc_service.h.
b5737fa9 7507
40ed484e
DE
75082014-01-16 Doug Evans <dje@google.com>
7509
7510 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7511 (match_dll): Use it.
7512
969c39fb
MM
75132014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7514
7515 * target.h (target_ops) <read_btrace>: Change parameters and
7516 return type to allow error reporting.
7517 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7518 trace reading errors on.
7519 * linux-low.c (linux_low_read_btrace): Pass trace reading
7520 errors on.
7521 (linux_low_disable_btrace): New.
7522
ab7f45ba
DE
75232014-01-15 Doug Evans <dje@google.com>
7524
7525 * inferiors.c (thread_id_to_gdb_id): Delete.
7526 * inferiors.h (thread_id_to_gdb_id): Delete.
7527
66af0f44
EZ
75282014-01-13 Eli Zaretskii <eliz@gnu.org>
7529
7530 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7531 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7532 versions.
7533
9939e131
PA
75342014-01-08 Pedro Alves <palves@redhat.com>
7535
7536 * server.c (handle_status): Don't discard previous queued stop
7537 replies or thread's pending status here.
7538 (main) <disconnection>: Do it here instead.
7539
b7ea362b
PA
75402014-01-08 Pedro Alves <palves@redhat.com>
7541
7542 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7543 * server.c (visit_actioned_threads, handle_pending_status): New
7544 function.
7545 (handle_v_cont): Factor out parts to ...
7546 (resume): ... this new function. If in all-stop, and a thread
7547 being resumed has a pending status, report it without actually
7548 resuming.
7549 (myresume): Adjust to use the new 'resume' function.
7550 (clear_pending_status_callback, set_pending_status_callback)
7551 (find_status_pending_thread_callback): New functions.
7552 (handle_status): Handle the case of multiple threads having
7553 interesting statuses to report. Report threads' real last signal
7554 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7555 with an interesting thread to report the status for, instead of
7556 always reporting the status of the first thread.
7557
28498c42
JB
75582014-01-01 Joel Brobecker <brobecker@adacore.com>
7559
7560 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7561 * gdbreplay.c (gdbreplay_version): Likewise.
7562
f45c82da
YZ
75632013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7564
7565 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7566 iov.iov_len with the real length in use.
7567
379a5e2d
JB
75682013-12-13 Joel Brobecker <brobecker@adacore.com>
7569
7570 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7571 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7572 for all targets that use win32-low.c.
7573 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7574 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7575
4210d83e
PA
75762013-12-13 Pedro Alves <palves@redhat.com>
7577
7578 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7579 if equal to TARGET_WAITKIND_LOADED.
7580 * win32-low.c (cached_status): New static global.
7581 (win32_wait): Add declaration.
7582 (do_initial_child_stuff): Flush all initial pending debug events
7583 up to the initial breakpoint.
7584 (win32_wait): If CACHED_STATUS was set, return that instead
7585 of doing a real wait. Remove the code resuming the execution
7586 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7587 during the initial phase. Also remove the code changing
7588 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7589 TARGET_WAITKIND_STOPPED.
7590
e7f0d979
YQ
75912013-12-11 Yao Qi <yao@codesourcery.com>
7592
7593 * notif.c (handle_notif_ack): Return 0 if no notification
7594 matches.
7595
ebcf782c
DE
75962013-11-20 Doug Evans <dje@google.com>
7597
7598 * linux-low.c (linux_set_resume_request): Fix comment.
7599
20ad9378
DE
76002013-11-20 Doug Evans <dje@google.com>
7601
7602 * linux-low.c (resume_status_pending_p): Tweak comment.
7603
a196ebeb
WT
76042013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7605
7606 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7607 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7608 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7609 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7610 (srv_amd64_regobj): Add amd64-mpx.o.
7611 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7612 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7613 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7614 * i387-fp.c (num_pl_bnd_register) Added constant.
7615 (num_pl_bnd_cfg_registers) Added constant.
7616 (struct i387_xsave) Added reserved area and MPX fields.
7617 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7618 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7619 function.
7620 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7621 (init_registers_amd64_mpx_linux): Declare new function.
7622 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7623 (x86_64_regmap): Add MPX registers.
7624 (x86_linux_read_description): Add MPX case.
7625 (initialize_low_arch): Initialize MPX targets.
7626
0080a2f6
TT
76272013-11-18 Tom Tromey <tromey@redhat.com>
7628
7629 * configure: Rebuild.
7630 * configure.ac: Don't check for stdlib.h.
7631 * gdbreplay.c: Unconditionally include stdlib.h.
7632
2978b111
TT
76332013-11-18 Tom Tromey <tromey@redhat.com>
7634
7635 * config.in: Rebuild.
7636 * configure: Rebuild.
7637 * configure.ac: Don't use AC_HEADER_DIRENT.
7638
a3d08894
TT
76392013-11-18 Tom Tromey <tromey@redhat.com>
7640
7641 * server.h: Don't check HAVE_STRING_H.
7642 * gdbreplay.c: Don't check HAVE_STRING_H.
7643 * configure: Rebuild.
7644
0a5dd17d
TT
76452013-11-18 Tom Tromey <tromey@redhat.com>
7646
7647 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7648 LIBGNU.
7649
1bd2f0ba
TT
76502013-11-08 Tom Tromey <tromey@redhat.com>
7651
7652 * configure, config.in: Rebuild.
7653 * configure.ac: Remove unused configury.
7654
3266f10b
TT
76552013-11-08 Tom Tromey <tromey@redhat.com>
7656
7657 * acinclude.m4: Include common.m4, codeset.m4.
7658 * configure, config.in: Rebuild.
7659 * configure.ac: Use GDB_AC_COMMON.
7660
6682d959
AA
76612013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7662
7663 * linux-s390-low.c (HWCAP_S390_TE): New define.
7664 (s390_arch_setup): Consider the TE field in the HWCAP for
7665 determining 'have_regset_tdb'.
7666
fd0a4d76
SDJ
76672013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7668
7669 PR gdb/16014
7670 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7671 call to sizeof.
7672
1a3d890b
PA
76732013-10-02 Pedro Alves <palves@redhat.com>
7674
7675 * server.c (process_serial_event): Don't output "GDBserver
7676 exiting" if GDB is connected through stdio.
7677 * target.c (mywait): Likewise, be silent if GDB is connected
7678 through stdio.
7679
97ad4581
JB
76802013-10-01 Joel Brobecker <brobecker@adacore.com>
7681
7682 * lynx-low.c (lynx_add_threads_after_attach): New function.
7683 (lynx_attach): Remove call to add_thread. Add call to
7684 lynx_add_threads_after_attach instead.
7685
5b4e221c
MF
76862013-09-28 Mike Frysinger <vapier@gentoo.org>
7687
7688 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7689 * config.in, configure: Regenerated.
7690
ee47b2f8
YQ
76912013-09-18 Yao Qi <yao@codesourcery.com>
7692
7693 PR server/15959
7694 * server.c (start_inferior): Clear 'resume_info'.
7695
d6707650 76962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7697
d6707650
JW
7698 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7699 for each register.
7700
9243dd0e 77012013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7702
9243dd0e
JW
7703 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7704 linux-tile-low.o to srv_tgtobj.
7705
c623a6ef
WN
77062013-09-16 Will Newton <will.newton@linaro.org>
7707
7708 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7709 out regs.
7710
fb71d39e
PA
77112013-09-06 Pedro Alves <palves@redhat.com>
7712
7713 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7714 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7715 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7716 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7717 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7718 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7719
8e7e9910
PA
77202013-09-06 Pedro Alves <palves@redhat.com>
7721
7722 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7723 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7724
7c3a12ca
PA
77252013-09-06 Pedro Alves <palves@redhat.com>
7726
7727 * linux-amd64-ipa.c: Include tracepoint.h.
7728 * linux-i386-ipa.c: Include tracepoint.h.
7729
8eb3d7b6
RW
77302013-09-06 Ricard Wanderlof <ricardw@axis.com>
7731
7732 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7733 (ps_get_thread_area): New function.
7734
eddddb9d
RW
77352013-09-06 Ricard Wanderlof <ricardw@axis.com>
7736
7737 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7738 (initialize_low_arch): Call init_registers_crisv32 rather than
7739 init_register_crisv32.
7740
533b0600
PA
77412013-09-05 Pedro Alves <palves@redhat.com>
7742
7743 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7744 to ...
7745 * hostio.h: ... this new file.
7746 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7747 win32-low.c: Include hostio.h.
7748
0ce3d3b5
PA
77492013-09-05 Pedro Alves <palves@redhat.com>
7750
7751 * server.h (gdb_client_data, handler_func, callback_handler_func)
7752 (delete_file_handler, add_file_handler, append_callback_event)
7753 (delete_callback_event, start_event_loop, initialize_event_loop):
7754 Move to event-loop.h and include it.
7755 * event-loop.h: New file.
7756
799cdc37
PA
77572013-09-05 Pedro Alves <palves@redhat.com>
7758
7759 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7760 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7761 (loaded_dll, unloaded_dll): Move to ...
7762 * dll.h: ... this new file.
7763 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7764
6a6bbd9d
PA
77652013-09-05 Pedro Alves <palves@redhat.com>
7766
7767 * server.h (current_process, get_thread_process, all_processes)
7768 (add_inferior_to_list, for_each_inferior, current_inferior)
7769 (remove_inferior, add_process, remove_process, find_process_pid)
7770 (have_started_inferiors_p, have_attached_inferiors_p)
7771 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7772 (clear_inferiors, find_inferior, find_inferior_id)
7773 (inferior_target_data, set_inferior_target_data)
7774 (inferior_regcache_data, set_inferior_regcache_data): Move to
7775 inferiors.h, and include it.
7776 * inferiors.h: New file.
7777
f699aaba
PA
77782013-09-05 Pedro Alves <palves@redhat.com>
7779
7780 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7781 Move ...
72f4393d 7782 * ax.h: ... here.
f699aaba 7783
c144c7a0
PA
77842013-09-05 Pedro Alves <palves@redhat.com>
7785
7786 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7787 tracepoint.h.
7788 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7789 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7790 (handle_tracepoint_general_set, handle_tracepoint_query)
7791 (tracepoint_finished_step, tracepoint_was_hit)
7792 (release_while_stepping_state_list, current_traceframe)
7793 (in_readonly_region, traceframe_read_mem)
7794 (fetch_traceframe_registers, traceframe_read_sdata)
7795 (traceframe_read_info, struct fast_tpoint_collect_status)
7796 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7797 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7798 (supply_fast_tracepoint_registers)
7799 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7800 (ipa_tdesc, claim_trampoline_space)
7801 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7802 (agent_mem_read, agent_get_trace_state_variable_value)
7803 (agent_set_trace_state_variable_value, agent_tsv_read)
7804 (agent_mem_read_string, get_raw_reg_func_addr)
7805 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7806 * tracepoint.h: ... this new file.
7807
ff42e6ab
PA
78082013-09-05 Pedro Alves <palves@redhat.com>
7809
7810 * server.h (perror_with_name, error, fatal, warning, paddress)
7811 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7812 include it.
7813 * utils.h: New file.
7814
541af0f4
PA
78152013-09-05 Pedro Alves <palves@redhat.com>
7816
7817 * server.h (remote_debug, noack_mode, transport_is_reliable)
7818 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7819 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7820 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7821 (write_enn, initialize_async_io, enable_async_io)
7822 (disable_async_io, check_remote_input_interrupt_request)
7823 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7824 (dead_thread_notify, prepare_resume_reply)
7825 (decode_address_to_semicolon, decode_address, decode_m_packet)
7826 (decode_M_packet, decode_X_packet, decode_xfer_write)
7827 (decode_search_memory_packet, unhexify, hexify)
7828 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7829 (look_up_one_symbol, relocate_instruction)
7830 (monitor_output): Move to remote-utils.h, and include it.
7831 * remote-utils.h: New file.
7832
eebdf26b
PA
78332013-09-05 Pedro Alves <palves@redhat.com>
7834
7835 * server.h (_): Delete.
7836
3aafd2ff
PA
78372013-09-02 Pedro Alves <palves@redhat.com>
7838
7839 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7840 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7841 allocated.
7842 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7843
cee83bcb
PM
78442013-09-02 Pierre Muller <muller@sourceware.org>
7845
7846 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7847 or WriteProcessMemory complete successfully and handle
7848 ERROR_PARTIAL_COPY error.
7849
9a13b2fa
PA
78502013-09-02 Pedro Alves <palves@redhat.com>
7851
7852 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7853 error instead of EIO.
7854
602e3198
JK
78552013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7856
7857 PR server/15604
7858 * linux-low.c: Include filestuff.h.
7859 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7860 * lynx-low.c: Include filestuff.h.
7861 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7862 * server.c: Include filestuff.h.
7863 (main): Call notice_open_fds.
7864 * spu-low.c: Include filestuff.h.
7865 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7866
96d7229d
LM
78672013-08-22 Luis Machado <lgustavo@codesourcery.com>
7868
7869 * Makefile.in: Explain why ../target and ../nat are not
7870 listed as include file search paths.
7871 (linux-waitpid.o): New object file rule.
7872 * configure.srv (srv_native_linux_obj): New variable.
7873 Replace all occurrences of linux native object files with
7874 $srv_native_linux_obj.
7875 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7876 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7877 (linux_enable_event_reporting): Remove declaration.
7878 (my_waitpid): Moved to common/linux-waitpid.c.
7879 (linux_wait_for_event): Pass ptid when calling
7880 linux_enable_event_reporting.
7881 (linux_supports_tracefork_flag): Remove.
7882 (linux_enable_event_reporting): Likewise.
7883 (linux_tracefork_grandchild): Remove.
7884 (STACK_SIZE): Moved to common/linux-ptrace.c.
7885 (linux_tracefork_child): Remove.
7886 (linux_test_for_tracefork): Remove.
7887 (linux_look_up_symbols): Call linux_supports_traceclone.
7888 (initialize_low): Remove call to linux_test_for_tracefork.
7889 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7890 common/linux-ptrace.h.
7891 (PTRACE_TYPE_ARG4): Likewise.
7892 Include linux-ptrace.h.
7893
32940073
PA
78942013-08-21 Pedro Alves <palves@redhat.com>
7895
7896 * config.in: Renegerate.
7897
33b60d58 78982013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7899
33b60d58
LM
7900 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7901 (SFILES): Remove $(srcdir)/common/target-common.c and
7902 add $(srcdir)/target/waitstatus.c.
7903 (OBS): Remove target-common.o and add waitstatus.o.
7904 (server_h): Remove $(srcdir)/../common/target-common.h and
7905 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7906 and $(srcdir)/../target/waitstatus.h.
7907 (target-common.o): Remove.
7908 (waitstatus.o): New target object file.
7909 * target.h: Do not include target-common.h and
7910 include target/resume.h, target/wait.h and
7911 target/waitstatus.h.
7912
b8e1b30e
LM
79132013-08-13 Luis Machado <lgustavo@codesourcery.com>
7914
7915 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7916 to PTRACE_TYPE_ARG3.
7917 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7918 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7919 PTRACE_TYPE_ARG4.
7920 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7921 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7922
7a60ad40
YQ
79232013-07-27 Jie Zhang <jie@codesourcery.com>
7924 Daniel Jacobowitz <dan@codesourcery.com>
7925 Yao Qi <yao@codesourcery.com>
7926
7927 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7928 (mips-linux-watch.o): New rule.
7929 (mips_linux_watch_h): New variable.
7930 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7931 srv_tgtobj.
7932 * linux-mips-low.c: Include mips-linux-watch.h.
7933 (struct arch_process_info, struct arch_lwp_info): New.
7934 (update_watch_registers_callback): New function.
7935 (mips_linux_new_process, mips_linux_new_thread) New functions.
7936 (mips_linux_prepare_to_resume, mips_insert_point): New
7937 functions.
7938 (mips_remove_point, mips_stopped_by_watchpoint): New
7939 functions.
7940 (rsp_bp_type_to_target_hw_bp_type): New function.
7941 (mips_stopped_data_address): New function.
7942 (the_low_target): Add watchpoint support functions.
7943
de6f69ad
YQ
79442013-07-27 Yao Qi <yao@codesourcery.com>
7945
7946 * i386-low.c: Include break-common.h.
7947 (enum target_hw_bp_type): Remove.
7948
3360c0bf
LM
79492013-07-24 Luis Machado <lgustavo@codesourcery.com>
7950
7951 * Makefile.in (SFILES): /common/target-common.c.
7952 (OBS): Add target-common.o.
7953 (server_h): Add $(srcdir)/../common/target-common.h.
7954 (target-common.o): New target.
7955 * server.c (queue_stop_reply_callback): Free
7956 status string after use.
7957 * target.c (target_waitstatus_to_string): Remove.
7958 * target.h: Include target-common.h.
7959 (resume_kind): Likewise.
7960 (target_waitkind): Likewise.
7961 (target_waitstatus): Likewise.
7962 (TARGET_WNOHANG): Likewise.
7963
bd885420
YQ
79642013-07-04 Yao Qi <yao@codesourcery.com>
7965
7966 * Makefile.in (host_alias): Use @host_noncanonical@.
7967 (target_alias): Use @target_noncanonical@.
7968 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7969 ACX_NONCANONICAL_HOST.
7970 * configure: Regenerated.
7971
7972 Revert:
7973 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7974
7975 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7976 * configure: Rebuild.
7977 * Makefile.in (version_host, version_target): Get from configure.
7978 (version.c): Use $(version_host) and $(version_target).
7979
17ef446e
PA
79802013-07-03 Pedro Alves <palves@redhat.com>
7981
7982 * Makefile.in (config.status): Depend on development.sh.
7983 * acinclude.m4: Include libmcheck.m4.
7984 * configure: Regenerate.
7985
7a9a7487
MG
79862013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7987
7988 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7989 attribute inside the parentheses.
7990 (winapi_DebugSetProcessKillOnExit): Ditto.
7991 (winapi_DebugBreakProcess): Ditto.
7992 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7993
49b64de6
MG
79942013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7995
7996 * notif.h (notif_event): Add a dummy member to avoid compiler
7997 errors.
7998
d5749ee7
PA
79992013-07-01 Pedro Alves <palves@redhat.com>
8000
8001 * hostio.c (HOSTIO_PATH_MAX): Define.
8002 (require_filename, handle_open, handle_unlink, handle_readlink):
8003 Use it.
8004
d8d2a3ee
PA
80052013-07-01 Pedro Alves <palves@redhat.com>
8006
8007 * server.h: Include "pathmax.h".
8008 * linux-low.c: Don't include sys/param.h.
8009 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8010 MAXPATHLEN.
8011 * win32-low.c: Don't include sys/param.h.
8012 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8013
bc7dea8d
PA
80142013-07-01 Pedro Alves <palves@redhat.com>
8015
8016 * event-loop.c: Don't check HAVE_UNISTD_H before including
8017 <unistd.h>.
8018 * gdbreplay.c: Likewise.
8019 * remote-utils.c: Likewise.
8020 * server.c: Likewise.
8021 * configure.ac: Don't check for unistd.h.
8022 * configure: Regenerate.
8023
d6c2da54
TT
80242013-06-28 Tom Tromey <tromey@redhat.com>
8025
8026 * Makefile.in (version.c): Use version.in, not
8027 common/version.in.
8028
257b6bec
MG
80292013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8030
8031 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8032 * configure: Rebuild.
8033 * Makefile.in (version_host, version_target): Get from configure.
8034 (version.c): Use $(version_host) and $(version_target).
8035
86ebe149
DK
80362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8037
8038 Fix trace-status to output user name without trailing colon.
8039 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8040
f30aa5af
DK
80412013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8042
8043 Fix trace-status to output proper start-time and stop-time.
8044 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8045 output start time and stop time in hex as gdb expects.
8046
28a93511
YQ
80472013-06-26 Pedro Alves <pedro@codesourcery.com>
8048
8049 * tracepoint.c (build_traceframe_info_xml): Output trace state
8050 variables present in the trace buffer.
8051
01208463
TT
80522013-06-24 Tom Tromey <tromey@redhat.com>
8053
8054 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8055 create-version.sh.
8056 (version.o): Remove.
8057 * gdbreplay.c: Include version.h.
8058 (version, host_name): Don't declare.
8059 * server.h: Include version.h.
8060 (version, host_name): Don't declare.
8061
760256f9
PA
80622013-06-12 Pedro Alves <palves@redhat.com>
8063
8064 * linux-x86-low.c (linux_is_elf64): Delete global.
8065 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8066 with local linux_pid_exe_is_elf_64_file use.
8067
030031ee
PA
80682013-06-11 Pedro Alves <palves@redhat.com>
8069
8070 * linux-low.c (regset_disabled, disable_regset): New functions.
8071 (regsets_fetch_inferior_registers)
8072 (regsets_store_inferior_registers): Use them.
8073 (initialize_regsets_info); Don't allocate the disabled_regsets
8074 array here.
8075 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8076 comment.
8077
5da6eb0a
PA
80782013-06-11 Pedro Alves <palves@redhat.com>
8079
8080 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8081 xmalloc.
8082
7e5aaa09
PA
80832013-06-11 Pedro Alves <palves@redhat.com>
8084
8085 * linux-x86-low.c (initialize_low_arch): Call
8086 init_registers_x32_avx_linux.
8087
d878444c
JK
80882013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8089
8090 Fix compatibility with Android Bionic.
8091 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8092 it is not empty.
8093
3aee8918
PA
80942013-06-07 Pedro Alves <palves@redhat.com>
8095
5f2b57b5 8096 PR server/14823
3aee8918
PA
8097 * Makefile.in (OBS): Add tdesc.o.
8098 (IPA_OBJS): Add tdesc-ipa.o.
8099 (tdesc-ipa.o): New rule.
8100 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8101 interface.
8102 * linux-low.c (new_inferior): Delete.
8103 (disabled_regsets, num_regsets): Delete.
8104 (linux_add_process): Adjust to set the new per-process
8105 new_inferior flag.
8106 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8107 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8108 was a stop. When calling arch_setup, switch the current inferior
8109 to the thread that got an event.
8110 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8111 (regsets_fetch_inferior_registers)
8112 (regsets_store_inferior_registers): New regsets_info parameter.
8113 Adjust to use it.
8114 (linux_register_in_regsets): New regs_info parameter. Adjust to
8115 use it.
8116 (register_addr, fetch_register, store_register): New usrregs_info
8117 parameter. Adjust to use it.
8118 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8119 parameter regs_info. Adjust to use it.
8120 (linux_fetch_registers): Get the current inferior's regs_info, and
8121 adjust to use it.
8122 (linux_store_registers): Ditto.
8123 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8124 (initialize_low): Don't initialize the target_regsets here. Call
8125 initialize_low_arch.
8126 * linux-low.h (target_regsets): Delete declaration.
8127 (struct regsets_info): New.
8128 (struct usrregs_info): New.
8129 (struct regs_info): New.
8130 (struct process_info_private) <new_inferior>: New field.
8131 (struct linux_target_ops): Delete the num_regs, regmap, and
8132 regset_bitmap fields. New field regs_info.
8133 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8134 * i387-fp.c (num_xmm_registers): Delete.
8135 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8136 calls to new interface.
8137 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8138 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8139 Infer the number of xmm registers from the regcache's target
8140 description.
8141 * i387-fp.h (num_xmm_registers): Delete.
8142 * inferiors.c (add_thread): Don't install the thread's regcache
8143 here.
8144 * proc-service.c (gregset_info): Fetch the current inferior's
8145 regs_info. Adjust to use it.
8146 * regcache.c: Include tdesc.h.
8147 (register_bytes, reg_defs, num_registers)
8148 (gdbserver_expedite_regs): Delete.
8149 (get_thread_regcache): If the thread doesn't have a regcache yet,
8150 create one, instead of aborting gdbserver.
8151 (regcache_invalidate_one): Rename to ...
8152 (regcache_invalidate_thread): ... this.
8153 (regcache_invalidate_one): New.
8154 (regcache_invalidate): Only invalidate registers of the current
8155 process.
8156 (init_register_cache): Add target_desc parameter, and use it.
8157 (new_register_cache): Ditto. Assert the target description has a
8158 non zero registers_size.
8159 (regcache_cpy): Add assertions. Adjust.
8160 (realloc_register_cache, set_register_cache): Delete.
8161 (registers_to_string, registers_from_string): Adjust.
8162 (find_register_by_name, find_regno, find_register_by_number)
8163 (register_cache_size): Add target_desc parameter, and use it.
8164 (free_register_cache_thread, free_register_cache_thread_one)
8165 (regcache_release, register_cache_size): New.
8166 (register_size): Add target_desc parameter, and use it.
8167 (register_data, supply_register, supply_register_zeroed)
8168 (supply_regblock, supply_register_by_name, collect_register)
8169 (collect_register_as_string, collect_register_by_name): Adjust.
8170 * regcache.h (struct target_desc): Forward declare.
8171 (struct regcache) <tdesc>: New field.
8172 (init_register_cache, new_register_cache): Add target_desc
8173 parameter.
8174 (regcache_invalidate_thread): Declare.
8175 (regcache_invalidate_one): Delete declaration.
8176 (regcache_release): Declare.
8177 (find_register_by_number, register_cache_size, register_size)
8178 (find_regno): Add target_desc parameter.
8179 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8180 declarations.
8181 * remote-utils.c: Include tdesc.h.
8182 (outreg, prepare_resume_reply): Adjust.
8183 * server.c: Include tdesc.h.
8184 (gdbserver_xmltarget): Delete declaration.
8185 (get_features_xml, process_serial_event): Adjust.
8186 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8187 declare.
8188 (struct process_info) <tdesc>: New field.
8189 (ipa_tdesc): Declare.
8190 * tdesc.c: New file.
8191 * tdesc.h: New file.
8192 * tracepoint.c: Include tdesc.h.
8193 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8194 (get_context_regcache): Adjust to pass ipa_tdesc down.
8195 (do_action_at_tracepoint): Adjust to get the register cache size
8196 from the context regcache's description.
8197 (traceframe_walk_blocks): Adjust to get the register cache size
8198 from the current trace frame's description.
8199 (traceframe_get_pc): Adjust to get current trace frame's
8200 description and pass it down.
8201 (gdb_collect): Adjust to get the register cache size from the
8202 IPA's description.
8203 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8204 (gdbserver_xmltarget): Delete.
8205 (initialize_low_tracepoint): Set the ipa's target description.
8206 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8207 (initialize_low_tracepoint): Set the ipa's target description.
8208 * linux-x86-low.c: Include tdesc.h.
8209 [__x86_64__] (is_64bit_tdesc): New.
8210 (ps_get_thread_area, x86_get_thread_area): Use it.
8211 (i386_cannot_store_register): Rename to ...
8212 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8213 (i386_cannot_fetch_register): Rename to ...
8214 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8215 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8216 to new interface.
8217 (target_regsets): Rename to ...
8218 (x86_regsets): ... this.
8219 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8220 interface.
8221 (x86_siginfo_fixup): Use is_64bit_tdesc.
8222 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8223 (tdesc_x32_avx_linux, tdesc_x32_linux)
8224 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8225 Declare.
8226 (x86_linux_update_xmltarget): Delete.
8227 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8228 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8229 (AMD64_LINUX_USER64_CS): New.
8230 (x86_linux_read_description): New, based on
8231 x86_linux_update_xmltarget.
8232 (same_process_callback): New.
8233 (x86_arch_setup_process_callback): New.
8234 (x86_linux_update_xmltarget): New.
8235 (x86_regsets_info): New.
8236 (amd64_linux_regs_info): New.
8237 (i386_linux_usrregs_info): New.
8238 (i386_linux_regs_info): New.
8239 (x86_linux_regs_info): New.
8240 (x86_arch_setup): Reimplement.
8241 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8242 (x86_emit_ops): Ditto.
8243 (the_low_target): Adjust. Install x86_linux_regs_info,
8244 x86_cannot_fetch_register, and x86_cannot_store_register.
8245 (initialize_low_arch): New.
8246 * linux-ia64-low.c (tdesc_ia64): Declare.
8247 (ia64_fetch_register): Adjust.
8248 (ia64_usrregs_info, regs_info): New globals.
8249 (ia64_regs_info): New function.
8250 (the_low_target): Adjust.
8251 (initialize_low_arch): New function.
8252 * linux-sparc-low.c (tdesc_sparc64): Declare.
8253 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8254 Adjust.
8255 (sparc_arch_setup): New function.
8256 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8257 (the_low_target): Adjust.
8258 (initialize_low_arch): New function.
8259 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8260 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8261 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8262 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8263 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8264 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8265 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8266 (tdesc_powerpc_isa205_vsx64l): Declare.
8267 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8268 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8269 (ppc_set_pc, ppc_get_hwcap): Adjust.
8270 (ppc_usrregs_info): Forward declare.
8271 (!__powerpc64__) ppc_regmap_adjusted: New global.
8272 (ppc_arch_setup): Adjust to the current process'es target
8273 description.
8274 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8275 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8276 (ppc_store_evrregset): Adjust.
8277 (target_regsets): Rename to ...
8278 (ppc_regsets): ... this, and make static.
8279 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8280 (ppc_regs_info): New function.
8281 (the_low_target): Adjust.
8282 (initialize_low_arch): New function.
8283 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8284 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8285 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8286 (tdesc_s390x_linux64v2): Declare.
8287 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8288 (s390_fill_gregset, s390_store_last_break): Adjust.
8289 (target_regsets): Rename to ...
8290 (s390_regsets): ... this, and make static.
8291 (s390_get_pc, s390_set_pc): Adjust.
8292 (s390_get_hwcap): New target_desc parameter, and use it.
8293 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8294 (s390_arch_setup): Adjust to set the current process'es target
8295 description. Don't adjust the regmap.
8296 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8297 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8298 (regs_info_3264): New globals.
8299 (s390_regs_info): New function.
8300 (the_low_target): Adjust.
8301 (initialize_low_arch): New function.
8302 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8303 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8304 [__mips64] (init_registers_mips_linux)
8305 (init_registers_mips_dsp_linux): Delete defines.
8306 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8307 (have_dsp): New global.
8308 (mips_read_description): New, based on mips_arch_setup.
8309 (mips_arch_setup): Reimplement.
8310 (get_usrregs_info): New function.
8311 (mips_cannot_fetch_register, mips_cannot_store_register)
8312 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8313 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8314 (target_regsets): Rename to ...
8315 (mips_regsets): ... this, and make static.
8316 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8317 (dsp_regs_info, regs_info): New globals.
8318 (mips_regs_info): New function.
8319 (the_low_target): Adjust.
8320 (initialize_low_arch): New function.
8321 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8322 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8323 Declare.
8324 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8325 (arm_read_description): New, with bits factored from
8326 arm_arch_setup.
8327 (arm_arch_setup): Reimplement.
8328 (target_regsets): Rename to ...
8329 (arm_regsets): ... this, and make static.
8330 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8331 (arm_regs_info): New function.
8332 (the_low_target): Adjust.
8333 (initialize_low_arch): New function.
8334 * linux-m68k-low.c (tdesc_m68k): Declare.
8335 (target_regsets): Rename to ...
8336 (m68k_regsets): ... this, and make static.
8337 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8338 (m68k_regs_info): New function.
8339 (m68k_arch_setup): New function.
8340 (the_low_target): Adjust.
8341 (initialize_low_arch): New function.
8342 * linux-sh-low.c (tdesc_sharch): Declare.
8343 (target_regsets): Rename to ...
8344 (sh_regsets): ... this, and make static.
8345 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8346 (sh_regs_info, sh_arch_setup): New functions.
8347 (the_low_target): Adjust.
8348 (initialize_low_arch): New function.
8349 * linux-bfin-low.c (tdesc_bfin): Declare.
8350 (bfin_arch_setup): New function.
8351 (bfin_usrregs_info, regs_info): New globals.
8352 (bfin_regs_info): New function.
8353 (the_low_target): Adjust.
8354 (initialize_low_arch): New function.
8355 * linux-cris-low.c (tdesc_cris): Declare.
8356 (cris_arch_setup): New function.
8357 (cris_usrregs_info, regs_info): New globals.
8358 (cris_regs_info): New function.
8359 (the_low_target): Adjust.
8360 (initialize_low_arch): New function.
8361 * linux-cris-low.c (tdesc_crisv32): Declare.
8362 (cris_arch_setup): New function.
8363 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8364 (cris_regs_info): New function.
8365 (the_low_target): Adjust.
8366 (initialize_low_arch): New function.
8367 * linux-m32r-low.c (tdesc_m32r): Declare.
8368 (m32r_arch_setup): New function.
8369 (m32r_usrregs_info, regs_info): New globals.
8370 (m32r_regs_info): Adjust.
8371 (initialize_low_arch): New function.
8372 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8373 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8374 (tic6x_usrregs_info): Forward declare.
8375 (tic6x_read_description): New function, based on ...
8376 (tic6x_arch_setup): ... this. Reimplement.
8377 (target_regsets): Rename to ...
8378 (tic6x_regsets): ... this, and make static.
8379 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8380 (tic6x_regs_info): New function.
8381 (the_low_target): Adjust.
8382 (initialize_low_arch): New function.
8383 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8384 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8385 (target_regsets): Rename to ...
8386 (xtensa_regsets): ... this, and make static.
8387 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8388 globals.
8389 (xtensa_arch_setup, xtensa_regs_info): New functions.
8390 (the_low_target): Adjust.
8391 (initialize_low_arch): New function.
8392 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8393 (nios2_arch_setup): Set the current process'es tdesc.
8394 (target_regsets): Rename to ...
8395 (nios2_regsets): ... this.
8396 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8397 (nios2_regs_info): New function.
8398 (the_low_target): Adjust.
8399 (initialize_low_arch): New function.
a261b8f5
PA
8400 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8401 (aarch64_arch_setup): Set the current process'es tdesc.
8402 (target_regsets): Rename to ...
8403 (aarch64_regsets): ... this.
8404 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8405 (aarch64_regs_info): New function.
8406 (the_low_target): Adjust.
8407 (initialize_low_arch): New function.
3aee8918
PA
8408 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8409 globals.
8410 (target_regsets): Rename to ...
8411 (tile_regsets): ... this.
8412 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8413 (tile_regs_info): New function.
8414 (tile_arch_setup): Set the current process'es tdesc.
8415 (the_low_target): Adjust.
8416 (initialize_low_arch): New function.
8417 * spu-low.c (tdesc_spu): Declare.
8418 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8419 * win32-arm-low.c (tdesc_arm): Declare.
8420 (arm_arch_setup): New function.
8421 (the_low_target): Install arm_arch_setup instead of
8422 init_registers_arm.
8423 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8424 (init_windows_x86): Rename to ...
8425 (i386_arch_setup): ... this. Set `win32_tdesc'.
8426 (the_low_target): Adjust.
8427 * win32-low.c (win32_tdesc): New global.
8428 (child_add_thread): Don't create the thread cache here.
8429 (do_initial_child_stuff): Set the new process'es tdesc.
8430 * win32-low.h (struct target_desc): Forward declare.
8431 (win32_tdesc): Declare.
8432 * lynx-i386-low.c (tdesc_i386): Declare global.
8433 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8434 * lynx-low.c (lynx_tdesc): New global.
8435 (lynx_add_process): Set the new process'es tdesc.
8436 * lynx-low.h (struct target_desc): Forward declare.
8437 (lynx_tdesc): Declare global.
8438 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8439 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8440 * nto-low.c (nto_tdesc): New global.
8441 (do_attach): Set the new process'es tdesc.
8442 * nto-low.h (struct target_desc): Forward declare.
8443 (nto_tdesc): Declare.
8444 * nto-x86-low.c (tdesc_i386): Declare.
8445 (nto_x86_arch_setup): Set `nto_tdesc'.
8446
b1fbec62
GB
84472013-06-04 Gary Benson <gbenson@redhat.com>
8448
8449 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8450 to qSupported response when appropriate.
8451 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8452 with nonzero-length annex.
8453 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8454 arguments supplied in annex.
8455
d1ec4ce7
DE
84562013-05-31 Doug Evans <dje@google.com>
8457
ac44adcb 8458 PR server/15594
d1ec4ce7
DE
8459 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8460 64 bits in 64-cross-32 environment.
8461
9b25f2d3
PA
84622013-05-28 Pedro Alves <palves@redhat.com>
8463
8464 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8465 (aarch64-without-fpu.c): Delete rule.
8466 * configure.srv (aarch64*-*-linux*): Remove references to
8467 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8468 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8469 declaration.
8470
6740dc9c
PA
84712013-05-24 Pedro Alves <palves@redhat.com>
8472
8473 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8474 instead of strchr/decode_address. Error if the range isn't split
8475 with a ','. Don't assume there's be a ':' in the action.
8476
c2d6af84
PA
84772013-05-23 Yao Qi <yao@codesourcery.com>
8478 Pedro Alves <palves@redhat.com>
8479
8480 * linux-low.c (lwp_in_step_range): New function.
8481 (linux_wait_1): If the thread was range stepping and stopped
8482 outside the stepping range, report the stop to GDB. Otherwise,
8483 continue stepping. Add range stepping debug output.
8484 (linux_set_resume_request): Copy the step range from the resume
8485 request to the lwp.
8486 (linux_supports_range_stepping): New.
8487 (linux_target_ops) <supports_range_stepping>: Set to
8488 linux_supports_range_stepping.
8489 * linux-low.h (struct linux_target_ops)
8490 <supports_range_stepping>: New field.
8491 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8492 * linux-x86-low.c (x86_supports_range_stepping): New.
8493 (the_low_target) <supports_range_stepping>: Set to
8494 x86_supports_range_stepping.
8495 * server.c (handle_v_cont): Handle 'r' action.
8496 (handle_v_requests): Append ";r" if the target supports range
8497 stepping.
8498 * target.h (struct thread_resume) <step_range_start,
8499 step_range_end>: New fields.
8500 (struct target_ops) <supports_range_stepping>:
8501 New field.
8502 (target_supports_range_stepping): New macro.
8503
58794e1a
JB
85042013-05-17 Joel Brobecker <brobecker@adacore.com>
8505
8506 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8507 confusion in comment.
8508
d631c5a7
JB
85092013-05-17 Joel Brobecker <brobecker@adacore.com>
8510
8511 * lynx-low.c (struct process_info_private): New type.
8512 (lynx_add_process): New function.
8513 (lynx_create_inferior, lynx_attach): Replace calls to
8514 add_process by calls to lynx_add_process.
8515 (lynx_resume): If PTID is null, then try using
8516 current_process()->private->last_wait_event_ptid.
8517 Add comments.
8518 (lynx_clear_inferiors): Delete. The contents of that function
8519 has been inlined in lynx_mourn;
8520 (lynx_wait_1): Save the ptid in the process's private data.
8521 (lynx_mourn): Free the process' private data. Replace call
8522 to lynx_clear_inferiors by call to clear_inferiors.
8523
96f7a20f
YQ
85242013-05-17 Yao Qi <yao@codesourcery.com>
8525
8526 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8527 the right place.
8528
db0dfaa0
LM
85292013-05-16 Luis Machado <lgustavo@codesourcery.com>
8530
8531 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8532 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8533 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8534 PT_TEXT_END_ADDR guards. Update comments.
8535 (linux_target_op) <read_offsets>: Conditionally define to
8536 linux_read_offsets if the target is UCLIBC and if it defines
8537 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8538
68f5f838
SL
85392013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8540 Andrew Jenner <andrew@codesourcery.com>
8541
8542 * Makefile.in (SFILES): Add linux-nios2-low.c.
8543 (clean): Add action to delete nios2-linux.c.
8544 (nios2-linux.c): New rule.
8545 * configure.srv: Add nios2*-*-linux*.
8546 * linux-nios2-low.c: New.
8547
1ebff1fd
HAQ
85482013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8549
8550 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8551
f6150862
HZ
85522013-04-25 Hui Zhu <hui@codesourcery.com>
8553
8554 PR gdb/15186
f6150862
HZ
8555 * ax.c (ax_printf): Add fflush.
8556
614c279d
TT
85572013-04-22 Tom Tromey <tromey@redhat.com>
8558
8559 * Makefile.in (SFILES): Add filestuff.c.
8560 (OBS): Add filestuff.o.
8561 (filestuff.o): New target.
8562 * config.in, configure: Rebuild.
8563 * configure.ac: Check for fdwalk, pipe2.
8564
7d4e5717
PA
85652013-04-17 Pedro Alves <palves@redhat.com>
8566
8567 * configure.ac (USE_THREAD_DB): Delete variable.
8568 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8569 Don't AC_SUBST USE_THREAD_DB.
8570 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8571 * config.in, configure: Regenerate.
8572
d5c93e41
PA
85732013-04-16 Pedro Alves <palves@redhat.com>
8574
8575 * linux-low.h (struct lwp_info) <thread_known>: Move under
8576 the USE_THREAD_DB #ifdef.
8577
04f5fe89
PA
85782013-04-16 Pedro Alves <palves@redhat.com>
8579
8580 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8581 (linux-low.o): Delete rule.
8582 * linux-low.h: Always include "gdb_thread_db.h" instead of
8583 conditionally including thread_db.h.
8584 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8585 HAVE_THREAD_DB_H.
8586
480b27bf
JK
85872013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8588
8589 * Makefile.in (install-only): Fix make install regression.
8590
43662968
JK
85912013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8592
8593 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8594 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8595 installation.
8596 * gdbserver.1: Remove.
8597
3e74e146
PA
85982013-03-22 Pedro Alves <palves@redhat.com>
8599
8600 * linux-low.c (handle_extended_wait): Don't call
8601 linux_enable_event_reporting.
8602
a8347a2a
TT
86032013-03-15 Tony Theodore <tonyt@logyst.com>
8604
8605 PR build/9098:
8606 * Makefile.in (SHELL): Use @SHELL@.
8607
eeb56fa7
SDJ
86082013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8609
8610 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8611 compiler warning.
8612
4fa7e2ff
JB
86132013-03-13 Joel Brobecker <brobecker@adacore.com>
8614
8615 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8616 Remove extraneous NULL element.
8617
8ddb1965
YQ
86182013-03-13 Yao Qi <yao@codesourcery.com>
8619
8620 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8621 'V' block in trace frame.
8622
9accd112
MM
86232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8624
8625 * target.h (struct target_ops): Add btrace ops.
8626 (target_supports_btrace): New macro.
8627 (target_enable_btrace): New macro.
8628 (target_disable_btrace): New macro.
8629 (target_read_btrace): New macro.
8630 * gdbthread.h (struct thread_info): Add btrace field.
8631 * server.c: Include btrace-common.h.
8632 (handle_btrace_general_set): New function.
8633 (handle_btrace_enable): New function.
8634 (handle_btrace_disable): New function.
8635 (handle_general_set): Call handle_btrace_general_set.
8636 (handle_qxfer_btrace): New function.
8637 (struct qxfer qxfer_packets[]): Add btrace entry.
8638 * inferiors.c (remove_thread): Disable btrace.
8639 * linux-low: Include linux-btrace.h.
8640 (linux_low_enable_btrace): New function.
8641 (linux_low_read_btrace): New function.
8642 (linux_target_ops): Add btrace ops.
8643 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8644 Add srv_linux_btrace=yes.
8645 (x86_64-*-linux*): Add linux-btrace.o.
8646 Add srv_linux_btrace=yes.
8647 * configure.ac: Define HAVE_LINUX_BTRACE.
8648 * config.in: Regenerated.
8649 * configure: Regenerated.
8650
5cc22e4c
MM
86512013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8652
8653 * server.c (handle_qxfer): Preserve error message if -3 is
8654 returned.
8655 (qxfer): Document the -3 return value.
8656
7c97f91e
MM
86572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8658
8659 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8660 (linux_btrace_h): New variable.
8661 (linux-btrace.o): New rule.
8662
be9a119c 86632013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8664 Hafiz Abid Qadeer <abidh@codesourcery.com>
8665
8666 * tracepoint.c (trace_buffer_size): New global.
8667 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8668 (init_trace_buffer): Change to one-argument function. Allocate
8669 trace buffer memory.
8670 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8671 handle QTBuffer:size packet.
8672 (cmd_bigqtbuffer_size): New function.
8673 (initialize_tracepoint): Call init_trace_buffer with
8674 DEFAULT_TRACE_BUFFER_SIZE.
8675 * server.c (handle_query): Add QTBuffer:size in the
8676 supported packets.
8677
e64f7499
YQ
86782013-03-07 Yao Qi <yao@codesourcery.com>
8679
8680 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8681 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8682 of -1.
8683 (cmd_qtsp): Adjust condition. Do post increment.
8684 Set cur_action and cur_step_action back to 0.
8685
f0ae6fc3
PA
86862013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8687
8688 PR server/15236
8689 * linux-low.c (linux_write_memory): Return early success if LEN is
8690 zero.
8691
b5b0b0af
CV
86922013-03-05 Corinna Vinschen <vinschen@redhat.de>
8693
334ad4a8 8694 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8695
589bc927
TT
86962013-02-28 Tom Tromey <tromey@redhat.com>
8697
8698 * configure.ac: Invoke AC_SYS_LARGEFILE.
8699 * configure, config.in: Rebuild.
8700
dfe07582
CV
87012013-02-28 Corinna Vinschen <vinschen@redhat.com>
8702
8703 * win32-low.c: Throughout, fix format strings and casts of
8704 printf-like functions to avoid type related warnings on all
8705 platforms.
8706 (get_child_debug_event): Print dwDebugEventCode as hex since
8707 that's how it's usually documented.
8708
736cd585
YQ
87092013-02-28 Yao Qi <yao@codesourcery.com>
8710
8711 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8712 pulongest.
8713
e1f58301
JW
87142013-02-27 Jiong Wang <jiwang@tilera.com>
8715
8716 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8717 (reg-tilegx32.c): New rule.
8718 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8719 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8720 different register info initializer according to elf class.
8721 (init_registers_tilgx32): New function. The tilegx32 register info
8722 initializer.
8723 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8724 (tile_store_gregset): Likewise.
8725
d171ca78
YQ
87262013-02-27 Yao Qi <yao@codesourcery.com>
8727
8728 * server.c (process_point_options): Print debug message when
8729 debug_threads is true.
8730
282bbdf3
YQ
87312013-02-26 Yao Qi <yao@codesourcery.com>
8732
8733 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8734
aca22551
PA
87352013-02-19 Pedro Alves <palves@redhat.com>
8736 Kai Tietz <ktietz@redhat.com>
8737
8738 PR gdb/15161
8739
8740 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8741 instead of strtoul to extract address from packet.
8742 (process_serial_event) <'z'>: Likewise.
8743
4f3cee1c
YQ
87442013-02-18 Yao Qi <yao@codesourcery.com>
8745
8746 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8747
8e1d55a3
PA
87482013-02-14 Pedro Alves <palves@redhat.com>
8749
8750 Plug memory leak.
8751
8752 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8753 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8754
458820da
PA
87552013-02-14 Pedro Alves <palves@redhat.com>
8756
8757 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8758
baea0dae
PA
87592013-02-14 Pedro Alves <palves@redhat.com>
8760
8761 * tracepoint.c (save_string): Delete.
8762 (add_tracepoint_action): Use savestring instead of save_string.
8763
0b1afbb3
PA
87642013-02-12 Pedro Alves <palves@redhat.com>
8765
8766 * linux-xtensa-low.c: Ditto.
8767 * xtensa-xtregs.c: Ditto.
8768
8a4ac37e
PA
87692013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8770
8771 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8772 thread_db.
8773
148de6bb
MS
87742013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8775
8776 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8777 aarch64_num_wp_regs and aarch64_num_bp_regs to
8778 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8779
55fac6e0
MS
87802013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8781
8782 * linux-aarch64-low.c (ps_get_thread_area): Replace
8783 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8784
176eb98c
MS
87852013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8786 Marcus Shawcroft <marcus.shawcroft@arm.com>
8787 Nigel Stephens <nigel.stephens@arm.com>
8788 Yufeng Zhang <yufeng.zhang@arm.com>
8789
8790 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8791 (aarch64.c, aarch64-without-fpu.c): New targets.
8792 * configure.srv (aarch64*-*-linux*): New.
8793 * linux-aarch64-low.c: New file.
8794
56f7af9c
MS
87952013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8796
43aaf8b6 8797 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8798 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8799 (dequeue_one_deferred_signal, linux_resume_one_thread)
8800 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8801 (linux_tracefork_grandchild, linux_test_for_tracefork)
8802 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8803 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8804 where the argument is 0.
8805
60f662b0
YQ
88062013-01-25 Yao Qi <yao@codesourcery.com>
8807
8808 * event-loop.c: Include "queue.h".
8809 (gdb_event_p): New typedef.
8810 (struct gdb_event) <next_event>: Remove.
8811 (event_queue): Change to QUEUE(gdb_event_p).
8812 (async_queue_event): Remove.
8813 (gdb_event_xfree): New.
8814 (initialize_event_loop): New.
8815 (process_event): Use API from QUEUE.
8816 (wait_for_event): Likewise.
8817 * server.c (main): Call initialize_event_loop.
8818 * server.h (initialize_event_loop): Declare.
8819
5ae4861a
YQ
88202013-01-18 Yao Qi <yao@codesourcery.com>
8821
8822 * ax.h (struct eval_agent_expr_context): New.
8823 (gdb_eval_agent_expr): Update declaration.
8824 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8825 TFRAME. Add new argument CTX.
8826 * server.h (struct eval_agent_expr_context): Declare.
8827 (agent_mem_read, agent_tsv_read): Update declaration.
8828 (agent_mem_read_string): Likewise.
8829 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8830 (add_traceframe_block): Add new argument TPOINT.
8831 Increase TPOINT->traceframe_usage.
8832 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8833 eval_tracepoint_agent_expr.
8834 (condition_true_at_tracepoint): Likewise.
8835 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8836 (agent_mem_read_string, agent_tsv_read): Likewise.
8837
85e00e85
YQ
88382013-01-16 Yao Qi <yao@codesourcery.com>
8839
8840 * linux-low.c (linux_resume_one_lwp): Don't check
8841 'lwp->bp_reinsert != 0'.
8842
4039cf45
JB
88432013-01-07 Joel Brobecker <brobecker@adacore.com>
8844 Pedro Alves <palves@redhat.com>
8845
8846 * lynx-low.c (ptrace_request_to_str): Define a temporary
8847 macro and use it to simplify this function's implementation.
8848
9044dee2
JB
88492013-01-07 Joel Brobecker <brobecker@adacore.com>
8850
8851 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8852 sets errno.
8853
e6352c8f
JB
88542013-01-07 Joel Brobecker <brobecker@adacore.com>
8855
8856 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8857
50681a27
JB
88582013-01-07 Joel Brobecker <brobecker@adacore.com>
8859
8860 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8861
3f6e77ef
JB
88622013-01-07 Joel Brobecker <brobecker@adacore.com>
8863
8864 * lynx-low.c (lynx_resume): Use the resume_info parameter
8865 to determine the ptid for the lynx_ptrace call, unless
8866 it is equal to minus_one_ptid, in which case we use the
8867 ptid of the current_inferior.
8868 (lynx_wait_1): After having received a thread create/exit
8869 event, resume the inferior's execution using the signaling
8870 thread's ptid, rather than the old ptid.
8871
7fda33ae
JB
88722013-01-07 Joel Brobecker <brobecker@adacore.com>
8873
8874 * lynx-low.c (lynx_resume): Delete variable ret.
8875
b9786c74
JB
88762013-01-01 Joel Brobecker <brobecker@adacore.com>
8877
8878 * gdbreplay.c (gdbreplay_version): Update copyright year.
8879 * server.c (gdbserver_version): Likewise.
8880
8b93d60f
JB
88812012-12-17 Joel Brobecker <brobecker@adacore.com>
8882
8883 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8884 new thread.
8885
037335a7
JB
88862012-12-17 Joel Brobecker <brobecker@adacore.com>
8887
8888 * lynx-low.c (ptrace_request_to_str): Add handling for
8889 PTRACE_GETTRACESIG.
8890
52d4cbd8
JB
88912012-12-17 Joel Brobecker <brobecker@adacore.com>
8892
8893 * lynx-low.c (lynx_attach): Delete variable new_process.
8894
ab8f6ca9
JB
88952012-12-17 Joel Brobecker <brobecker@adacore.com>
8896
8897 * lynx-low.c (lynx_create_inferior): Delete variable
8898 new_process.
8899
78cbc024
JB
89002012-12-17 Joel Brobecker <brobecker@adacore.com>
8901
8902 * lynx-low.c (ptrace_request_to_str): Do not handle
8903 PTRACE_GETTHREADLIST if this macro does not exist.
8904
14a00470
YQ
89052012-12-15 Yao Qi <yao@codesourcery.com>
8906
8907 * Makefile.in (OBS): Add notif.o.
8908 * notif.c, notif.h: New.
8909 * server.c: Include "notif.h".
8910 (struct vstop_notif) <next>: Remove.
8911 <base>: New field.
8912 (queue_stop_reply): Update.
8913 (push_event, send_next_stop_reply): Remove.
8914 (discard_queued_stop_replies): Update.
8915 (notif_stop): New variable.
8916 (handle_v_stopped): Remove.
8917 (handle_v_requests): Don't call handle_v_stopped. Call
8918 handle_ack_notif instead.
8919 (queue_stop_reply_callback): Call notif_event_enque instead
8920 of queue_stop_reply.
8921 (handle_status): Don't call send_next_stop_reply, call
8922 notif_write_event instead.
8923 (kill_inferior_callback): Likewise.
8924 (detach_or_kill_inferior_callback): Likewise.
8925 (main): Call initialize_notif.
8926 (process_serial_event): Call QUEUE_is_empty.
8927 (handle_target_event): Call notif_push instead of push event.
8928 * server.h (push_event): Remove declaration.
8929
61c125b9
TT
89302012-12-10 Tom Tromey <tromey@redhat.com>
8931
8932 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8933 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8934 macros.
8935 (.c.o): Rewrite.
8936 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8937 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8938 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8939 (amd64-linux-ipa.o, ax.o): Rewrite.
8940 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8941 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8942 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8943 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8944 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8945 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8946 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8947 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8948 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8949 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8950 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8951 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8952 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8953 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8954 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8955 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8956 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8957 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8958 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8959 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8960 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8961 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8962 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8963 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8964 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8965 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8966 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8967 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8968 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8969 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8970 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8971 (reg-tilegx.o): Remove.
8972 (all_object_files): New macro.
8973 Include .deps files.
8974 * aclocal.m4, configure: Rebuild.
8975 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8976 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8977 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8978
e90e9ad9
TT
89792012-12-05 Tom Tromey <tromey@redhat.com>
8980
8981 PR gdb/14917:
8982 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8983
02d403bf 89842012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8985
8986 * configure.ac: Check for linux/perf_event.h.
8987 * config.in: Regenerated.
8988 * configure: Regenerated.
8989
0270a750
PA
89902012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8991
8992 * hostio.c (handle_readlink): Decrease buffer size
8993 parameter passed to readlink by one byte.
8994
8c29b58e
YQ
89952012-11-26 Yao Qi <yao@codesourcery.com>
8996
8997 * configure.ac (build_warnings): Append '-Wempty-body'.
8998 * configure: Regenerated.
8999 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9000 body.
9001
8bdce1ff
PM
90022012-11-15 Pierre Muller <muller@sourceware.org>
9003
9004 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9005 * config.in: Regenerate.
9006 * configure: Regenerate.
9007 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9008 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9009 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9010 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9011 header.
9012 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9013 instead of <sys/wait.h> header.
9014 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9015
02d403bf 90162012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
9017
9018 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9019 (various make rules): Remove -DGDBSERVER
9020
fbd5db48
YQ
90212012-11-09 Yao Qi <yao@codesourcery.com>
9022
9023 * spu-low.c (current_ptid): Move it to ..
9024 * gdbthread.h: ... here. New.
9025 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9026 * server.c (myresume, process_serial_event): Likewise.
9027 * thread-db.c (thread_db_find_new_threads): Likewise.
9028 * tracepoint.c (run_inferior_command): Likewise.
9029
b3dc46ff
AB
90302012-10-01 Andrew Burgess <aburgess@broadcom.com>
9031
9032 * server.c (handle_search_memory_1): Include access length in
9033 warning message.
9034
07c04788
HPN
90352012-09-05 Michael Brandt <michael.brandt@axis.com>
9036
9037 * linux-crisv32-low.c: Fix compile errors.
9038
918d227b
YQ
90392012-09-04 Yao Qi <yao@codesourcery.com>
9040
9041 * tracepoint.c (cmd_qtsv): Adjust debug message.
9042 Don't check CUR_TPOINT.
9043
18c1b81a
YQ
90442012-08-28 Yao Qi <yao@codesourcery.com>
9045
9046 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9047 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9048 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9049 Remove declarations of xmalloc, xreallloc, xstrdup and
9050 freeargv.
9051 * Makefile.in (libiberty_h): New.
9052 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9053 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9054
dc82f37b
YQ
90552012-08-23 Yao Qi <yao@codesourcery.com>
9056
9057 * server.h: Remove declaration of 'xsnprintf'.
9058
406b1477
KS
90592012-08-22 Keith Seitz <keiths@redhat.com>
9060
9061 * server.h: Include build-gnulib-gbserver/config.h.
9062 * gdbreplay.c: Likewise.
9063
e6712ff1
DE
90642012-08-08 Doug Evans <dje@google.com>
9065
9066 * Makefile.in (SFILES): Add gdb_vecs.c.
9067 (OBS): Add gdb_vecs.o.
9068 (gdb_vecs_h, host_defs_h): New variables.
9069 (thread-db.o): Add $(gdb_vecs_h) dependency.
9070 (gdb_vecs.o): New rule.
9071 * thread-db.c: #include "gdb_vecs.h".
9072 (thread_db_load_search): Use a vector to iterate over path elements.
9073 Handle text appearing after "$pdir".
9074
9075 * configure.ac: Add check for strstr.
9076 * config.in: Regenerate.
9077 * configure: Regenerate.
9078
7c3270ae
UW
90792012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9080
9081 * hostio.c (handle_pread): If pread fails, fall back to attempting
9082 lseek/read.
9083 (handle_pwrite): Likewise for pwrite.
9084
b62e2b27
UW
90852012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9086
9087 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9088 between unsupported TYPE and unimplementable ADDR/LEN combination.
9089 (arm_insert_point): Act on new return value.
9090
78a99e91
PA
90912012-07-31 Pedro Alves <palves@redhat.com>
9092
9093 * server.c (process_point_options): Only skip tokens if we find
9094 one that is unrecognized. Don't treat 'X' specially while
9095 skipping unrecognized tokens.
9096
fcf303ab
UW
90972012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9098
9099 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9100 to 4-byte-align HW breakpoint addresses for Thumb.
9101
7255706c
YQ
91022012-07-27 Yao Qi <yao@codesourcery.com>
9103
9104 PR remote/14161.
9105
9106 * server.h: Declare gdb_agent_about_to_close.
9107 * target.c (kill_inferior): Include "agent.h".
9108 New. Send command 'kill'.
9109 * target.h (kill_inferior): Removed macro.
9110 * tracepoint.c (gdb_agent_about_to_close): New.
9111 (gdb_agent_helper_thread): Handle command 'close'.
9112 Wait endlessly until the inferior stops.
9113 Install gdb_agent_remove_socket to atexit hook.
9114 (agent_socket_name): New static variable.
9115 (gdb_agent_socket_init): Replace local variable 'name' with
9116 'agent_socket_name'.
9117 (gdb_agent_remove_socket): New.
9118
5a3f286f
YQ
91192012-07-27 Yao Qi <yao@codesourcery.com>
9120
9121 * server.c (process_point_options): Stop at 'X' when parsing.
9122
961bd387
ME
91232012-07-19 Michael Eager <eager@eagercon.com>
9124
a261b8f5 9125 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
9126 to hw_execute.
9127 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9128 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9129 hardware breakpoint.
9130
aa7c7447
JK
91312012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9132
9133 * gdbserver/linux-low.c (initialize_low): Call
9134 linux_ptrace_init_warnings.
9135
7f216e7c
DE
91362012-07-02 Doug Evans <dje@google.com>
9137
9138 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9139 pointer to int.
9140
d3ce09f5
SS
91412012-07-02 Stan Shebs <stan@codesourcery.com>
9142
9143 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9144 (ax.o): Add it to build rule.
9145 (ax-ipa.o): Ditto.
9146 (OBS): Add format.o.
9147 (IPA_OBS): Add format.o.
9148 * server.c (handle_query): Claim support for breakpoint commands.
9149 (process_point_options): Add command case.
9150 (process_serial_event): Leave running if there are printfs in
9151 effect.
9152 * mem-break.h (any_persistent_commands): Declare.
9153 (add_breakpoint_commands): Declare.
9154 (gdb_no_commands_at_breakpoint): Declare.
9155 (run_breakpoint_commands): Declare.
9156 * mem-break.c (struct point_command_list): New struct.
9157 (struct breakpoint): New field command_list.
9158 (any_persistent_commands): New function.
9159 (add_commands_to_breakpoint): New function.
9160 (add_breakpoint_commands): New function.
9161 (gdb_no_commands_at_breakpoint): New function.
9162 (run_breakpoint_commands): New function.
9163 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9164 locally.
9165 * ax.c: Include format.h.
9166 (ax_printf): New function.
9167 (gdb_eval_agent_expr): Add printf opcode.
9168
2f8f6aed
YQ
91692012-06-13 Yao Qi <yao@codesourcery.com>
9170
9171 * server.c (start_inferior): Remove duplicated writes to fields
9172 'last_resume_kind' and 'last_status' of 'current_inferior'.
9173
0c9070b3
YQ
91742012-06-12 Yao Qi <yao@codesourcery.com>
9175 Pedro Alves <palves@redhat.com>
9176
9177 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9178 comment.
9179 * server.c (handle_v_cont): Extend comment.
9180
c52daf70
YQ
91812012-06-11 Yao Qi <yao@codesourcery.com>
9182
9183 * linux-low.c (linux_attach): Add 'static'.
9184
d38bbb0a
YQ
91852012-06-06 Yao Qi <yao@codesourcery.com>
9186
9187 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9188
89dc0afd
JK
91892012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9190
9191 Fix gcc -flto compilation warning.
9192 * server.c (main): Make variable multi_mode and attach volatile.
9193
75f62ce7
TJB
91942012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9195
9196 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9197 if the platform doesn't know about it.
9198
65f479b6
PA
91992012-05-30 Jeff Kenton <jkenton@tilera.com>
9200
9201 * Makefile.in (SFILES): Add linux-tile-low.c.
9202 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9203 * configure.srv: Handle tilegx-*-linux*.
9204 * linux-tile-low.c: New file.
9205
0c5bf5a9
JK
92062012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9207
9208 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9209
a493e3e2
PA
92102012-05-24 Pedro Alves <palves@redhat.com>
9211
9212 PR gdb/7205
9213
43aaf8b6 9214 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 9215
2ea28649
PA
92162012-05-24 Pedro Alves <palves@redhat.com>
9217
9218 PR gdb/7205
9219
9220 Replace target_signal with gdb_signal throughout.
9221
8d409d16
MR
92222012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9223
9224 * linux-low.c (linux_store_registers): Avoid the copying sequence
9225 when no data has been retrieved by ptrace.
9226
23512c01
MGD
92272012-05-22 Will Deacon <will.deacon@arm.com>
9228
9229 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9230 Include asm/ptrace.h.
9231 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9232 already defined.
9233
4934b29e
MR
92342012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9235
9236 * linux-low.c (linux_store_registers): Don't re-retrieve data
9237 with ptrace that has already been obtained from /proc. Always
9238 copy any data retrieved with ptrace to the buffer supplied.
9239
bde24c0a
PA
92402012-05-11 Yao Qi <yao@codesourcery.com>
9241 Pedro Alves <palves@redhat.com>
9242
9243 * linux-low.c (enum stopping_threads_kind): New.
9244 (stopping_threads): Change type to `enum stopping_threads_kind'.
9245 (handle_extended_wait): If stopping and suspending threads, leave
9246 the new_lwp suspended too.
9247 (linux_wait_for_event): Adjust.
9248 (stop_all_lwps): Set `stopping_threads' to
9249 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9250 whether we're suspending threads or just stopping them. Assert no
9251 recursion happens.
9252
623b6bdf
YQ
92532012-04-29 Yao Qi <yao@codesourcery.com>
9254
9255 * server.h: Move some code to ...
9256 * gdbthread.h: ... here. New.
9257 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9258 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9259 (nto-low.o, win32-low.o): Likewise.
9260 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9261 * regcache.c, remote-utils.c, server.c: Likewise.
9262 * target.c, tracepoint.c, win32-low.c: Likewise.
9263
f15f9948
TJB
92642012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9265
9266 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9267 (PTRACE_ARG4_TYPE): Likewise.
9268 (PTRACE_XFER_TYPE): Likewise.
9269 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9270 ptrace to PTRACE_ARG3_TYPE.
9271 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9272 (PTRACE_ARG4_TYPE): Likewise.
9273 (PTRACE_XFER_TYPE): Likewise.
9274 (linux_detach_one_lwp): Cast fourth argument of
9275 ptrace to long then PTRACE_ARG4_TYPE.
9276 (regsets_fetch_inferior_registers): Cast third argument of
9277 ptrace to long then PTRACE_ARG3_TYPE.
9278 (regsets_store_inferior_registers): Likewise.
9279
38ea300a
PA
92802012-04-20 Pedro Alves <palves@redhat.com>
9281
9282 * configure: Regenerate.
9283
c971b7fa
PA
92842012-04-19 Pedro Alves <palves@redhat.com>
9285
43aaf8b6 9286 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 9287 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
9288 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9289 (all, install-only, uninstall, clean-info, all-lib, clean): No
9290 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9291 (maintainer-clean realclean distclean): Use subdir_do.
9292 (subdir_do): New.
9293 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 9294 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
9295 * acinclude.m4: Include acx_configure_dir.m4.
9296 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9297 calls. Call AC_PROG_RANLIB. Configure gnulib using
9298 ACX_CONFIGURE_DIR.
9299 (GNULIB): New.
9300 (GNULIB_STDINT_H): Adjust.
9301 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9302 * gdbreplay.c: Include build-gnulib/config.h.
9303 * server.h: Likewise.
9304 * aclocal.m4: Regenerate.
9305 * config.in: Regenerate.
9306 * configure: Regenerate.
c971b7fa 9307
809277f8
PA
93082012-04-19 Pedro Alves <palves@redhat.com>
9309
9310 * Makefile.in (LIBGNU, INCGNU): Adjust.
9311 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9312 (all, install-only, uninstall, clean-info, all-lib, clean)
9313 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9314 * configure.ac: Adjust AC_OUTPUT output.
9315 * aclocal.m4: Regenerate.
9316 * configure: Regenerate.
9317
fd9bb8b8
PA
93182012-04-19 Pedro Alves <palves@redhat.com>
9319
9320 * Makefile.in (generated_files): New.
9321 (server_h): Remove the explicit dependency on config.h, and depend
9322 on $generated_files.
9323
1c298c66
PA
93242012-04-19 Pedro Alves <palves@redhat.com>
9325
9326 * Makefile.in (INCGNU): Add -Ignulib.
9327
57c4b50b
PA
93282012-04-19 Pedro Alves <palves@redhat.com>
9329
9330 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9331 (INCGNU): ... this, and spell out -I here.
9332 (GNULIB_LIB): Rename to ...
9333 (LIBGNU): ... this.
9334 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9335
1030e047
PA
93362012-04-19 Pedro Alves <palves@redhat.com>
9337
9338 * config.in: Regenerate.
9339
447d4319
PA
93402012-04-19 Pedro Alves <palves@redhat.com>
9341
9342 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9343 * server.h (memmem): Remove declaration.
9344 * config.in: Regenerate.
9345 * configure: Regenerate.
9346
aad9eab9
YQ
93472012-04-19 Yao Qi <yao@codesourcery.com>
9348
9349 * Makefile.in (SFILES): Add common/vec.c.
9350 (OBS): Add vec.o.
9351 (vec.o): New rule.
9352
3e10640f
YQ
93532012-04-19 Yao Qi <yao@codesourcery.com>
9354
9355 * remote-utils.c (prepare_resume_reply): Replace with macro
9356 target_core_of_thread.
9357 * server.c (handle_qxfer_threads_proper): Likewise.
9358 * target.h (traget_core_of_thread): New macro.
9359
71622373
PA
93602012-04-18 Pedro Alves <palves@redhat.com>
9361
9362 * aclocal.m4: Regenerate.
9363 * configure: Regenerate.
9364
80d26939
YQ
93652012-04-16 Yao Qi <yao@codesourcery.com>
9366
9367 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9368 duplicated on address.
9369
42476b70
YQ
93702012-04-16 Yao Qi <yao@codesourcery.com>
9371
9372 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9373 (struct tracepoint_action_ops) <send>: New field.
9374 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9375 (agent_expr_send, x_tracepoint_action_send): New.
9376 (l_tracepoint_action_send): New.
9377 (cmd_qtdp): Download and install tracepoint
9378 according to `use_agent'.
9379 (run_inferior_command): Add one more parameter `len'.
9380 Update callers.
9381 (tracepoint_send_agent): New.
9382 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9383
7bc83639
YQ
93842012-04-16 Yao Qi <yao@codesourcery.com>
9385
9386 * tracepoint.c (download_tracepoints): Moved to ...
9387 (cmd_qtstart): ... here.
9388
5f18041e
YQ
93892012-04-14 Yao Qi <yao@codesourcery.com>
9390
9391 * tracepoint.c: Include inttypes.h.
9392 (struct collect_memory_action): Use sized types.
9393 (struct tracepoint): Likewise.
9394 (cmd_qtdp, stop_tracing): Update print specifiers.
9395 (cmd_qtp, response_tracepoint): Likewise.
9396 (collect_data_at_tracepoint): Likewise.
9397 (collect_data_at_step): Likewise.
9398
55a8c076
YQ
93992012-04-14 Yao Qi <yao@codesourcery.com>
9400
9401 Import gnulib module inttypes.
9402 * aclocal.m4, config.in, configure: Regenerated.
9403
dc750257
YQ
94042012-04-14 Yao Qi <yao@codesourcery.com>
9405
9406 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9407 Makefile and config.status at last.
9408
0ab5faf9
YQ
94092012-04-13 Yao Qi <yao@codesourcery.com>
9410
9411 * tracepoint.c: Include stdint.h unconditionally.
9412
18f5fd81
TJB
94132012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9414
9415 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9416 on BFD_HAVE_SYS_PROCFS_TYPE.
9417 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9418 * configure: Regenerate.
9419 * config.in: Likewise.
9420
4d47af5c
L
94212012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9422
9423 * Makefile.in (clean): Also remove x32.c x32-linux.c
9424 x32-avx.c x32-avx-linux.c.
9425 (x32.o): New target.
9426 (x32.c): Likewise.
9427 (x32-linux.o): Likewise.
9428 (x32-linux.c): Likewise.
9429 (x32-avx.o): Likewise.
9430 (x32-avx.c): Likewise.
9431 (x32-avx-linux.o): Likewise.
9432 (x32-avx-linux.c): Likewise.
9433
9434 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9435 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9436 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9437 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9438 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9439 i386/x32-avx-linux.xml.
9440
9441 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9442 (init_registers_x32_avx_linux): Likwise.
9443 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9444 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9445
ecedbe58
PA
94462012-04-13 Pedro Alves <palves@redhat.com>
9447
9448 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9449 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9450 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9451 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9452 the sub-make.
9453
c92b5177
L
94542012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9455
9456 * linux-x86-low.c (compat_x32_clock_t): New.
9457 (compat_x32_siginfo_t): Likewise.
9458 (compat_x32_siginfo_from_siginfo): Likewise.
9459 (siginfo_from_compat_x32_siginfo): Likewise.
9460 (linux_is_elf64): Likewise.
9461 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9462 and siginfo_from_compat_x32_siginfo for x32.
9463 (x86_arch_setup): Set linux_is_elf64.
9464
214d508e
L
94652012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9466
9467 PR gdb/13969
9468 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9469 e_machine field.
9470 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9471 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9472 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9473 compatible with process.
9474
c9a1864a
YQ
94752012-04-12 Yao Qi <yao@codesourcery.com>
9476
9477 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9478 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9479 (install-only, install-info, clean): Handle sub dir gnulib.
9480 (all-lib, am--refresh): New targets.
9481 (memmem.o): Remove target.
9482 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9483 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9484 (AC_REPLACE_FUNCS): Remove memmem.
9485 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9486 (AC_OUTPUT): Generate Makefile in gnulib/.
9487 * aclocal.m4, config.in, configure: Regenerated.
9488
367ba2c2
MR
94892012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9490
9491 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9492
9d236627
PA
94932012-04-05 Pedro Alves <palves@redhat.com>
9494
9495 -Werror=strict-aliasing
9496
9497 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9498 pointer.
9499
111217b3
PA
95002012-04-04 Pedro Alves <palves@redhat.com>
9501
9502 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9503 (sparc_store_gregset_from_stack, sparc_store_gregset)
9504 (sparc_breakpoint_at): Fix formatting.
9505
8365dcf5
TJB
95062012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9507
9508 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9509 are available.
9510 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9511 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9512 * config.in: Regenerate.
9513 * configure: Likewise.
9514
689cc2ae
PA
95152012-03-29 Pedro Alves <palves@redhat.com>
9516
9517 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9518 Correct ptrace arguments.
9519
c14dfd32
PA
95202012-03-28 Pedro Alves <palves@redhat.com>
9521
9522 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9523 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9524 (IA64_FR1_REGNUM): New defines.
9525 (ia64_fetch_register): New.
9526 (the_low_target): Install it.
9527 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9528 field.
9529 * linux-low.c (linux_fetch_registers): Try the
9530 the_low_target.fetch_register hook first.
9531
9532 * linux-arm-low.c (the_low_target): Adjust.
9533 * linux-bfin-low.c (the_low_target): Adjust.
9534 * linux-cris-low.c (the_low_target): Adjust.
9535 * linux-crisv32-low.c (the_low_target): Adjust.
9536 * linux-m32r-low.c (the_low_target): Adjust.
9537 * linux-m68k-low.c (the_low_target): Adjust.
9538 * linux-mips-low.c (the_low_target): Adjust.
9539 * linux-ppc-low.c (the_low_target): Adjust.
9540 * linux-s390-low.c (the_low_target): Adjust.
9541 * linux-sh-low.c (the_low_target): Adjust.
9542 * linux-sparc-low.c (the_low_target): Adjust.
9543 * linux-tic6x-low.c (the_low_target): Adjust.
9544 * linux-x86-low.c (the_low_target): Adjust.
9545 * linux-xtensa-low.c (the_low_target): Adjust.
9546
63c88e13
PA
95472012-03-26 Pedro Alves <palves@redhat.com>
9548
9549 * server.c (handle_qxfer_libraries): Don't bail early if
9550 the_target->qxfer_libraries_svr4 is not NULL.
9551
fb723180
PA
95522012-03-26 Pedro Alves <palves@redhat.com>
9553
9554 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9555
0afae3cf
PA
95562012-03-23 Pedro Alves <palves@redhat.com>
9557
9558 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9559 "library-list-svr4" element's start tag when the the DSO list is
9560 empty.
9561
485f1ee4
PA
95622012-03-23 Pedro Alves <palves@redhat.com>
9563
9564 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9565 a variable whose type size is the same as the inferior's pointer
9566 size.
9567
a5362b9a
TS
95682012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9569
9570 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9571 struct siginfo.
9572 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9573 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9574 * linux-low.h: Include <signal.h>.
9575 (struct siginfo): Remove forward declaration.
9576 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9577 struct siginfo.
9578
d226c142
MF
95792012-03-21 Mike Frysinger <vapier@gentoo.org>
9580
9581 * .gitignore: Ignore more files.
9582
122f36ef
PA
95832012-03-19 Pedro Alves <palves@redhat.com>
9584 Jan Kratochvil <jan.kratochvil@redhat.com>
9585
9586 * server.c (cont_thread, general_thread): Add describing comments.
9587 (start_inferior): Clear `cont_thread'.
9588 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9589 of a process.
9590
fc3e5175
YQ
95912012-03-15 Yao Qi <yao@codesourcery.com>
9592
9593 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9594 handling to ...
9595 (cmd_qtdp): ... here.
9596
8d0d92cd
YQ
95972012-03-15 Yao Qi <yao@codesourcery.com>
9598
9599 * tracepoint.c (struct tracepoint_action_ops): New.
9600 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9601 (m_tracepoint_action_download): New.
9602 (r_tracepoint_action_download): New.
9603 (x_tracepoint_action_download): New.
9604 (l_tracepoint_action_download): New.
9605 (add_tracepoint_action): Install `action->ops' according type.
9606 (download_tracepoint_1): Move code `download' function pointer
9607 of various tracepoint_action_ops.
9608
87b0bb13
JK
96092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9610
9611 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9612 linux_ptrace_attach_warnings.
9613
5f572dec
JK
96142012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9615
9616 * Makefile.in (linux-ptrace.o): New.
9617 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9618 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9619 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9620 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9621 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9622 of these targets.
9623 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9624
f4647387
YQ
96252012-03-08 Yao Qi <yao@codesourcery.com>
9626 Pedro Alves <palves@redhat.com>
9627
9628 Fix PR server/13392.
9629 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9630 offset of JMP insn.
9631 * tracepoint.c (remove_tracepoint): New.
9632 (cmd_qtdp): Call remove_tracepoint when failed to install.
9633
9b224c5e
PA
96342012-03-07 Pedro Alves <palves@redhat.com>
9635
9636 * linux-low.c (get_detach_signal): New.
9637 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9638 Pass on pending signals to PTRACE_DETACH. Check the result of the
9639 ptrace call.
9640 * server.c (program_signals, program_signals_p): New.
9641 (handle_general_set): Handle QProgramSignals.
9642 * server.h (program_signals, program_signals_p): Declare.
9643
e237a7e2
JK
96442012-03-05 Pedro Alves <palves@redhat.com>
9645 Jan Kratochvil <jan.kratochvil@redhat.com>
9646
9647 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9648 New comment why.
9649
5808517f
YQ
96502012-03-03 Yao Qi <yao@codesourcery.com>
9651
9652 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9653 agent_look_up_symbols.
9654
58b4daa5
YQ
96552012-03-03 Yao Qi <yao@codesourcery.com>
9656
9657 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9658 (linux-x86-low.o): Likewise.
9659 * server.h: Remove in_process_agent_loaded.
9660 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9661 common/agent.c.
9662 Update callers.
9663
8ffcbaaf
YQ
96642012-03-03 Yao Qi <yao@codesourcery.com>
9665
9666 * tracepoint.c (gdb_agent_capability): New global.
9667 (in_process_agent_loaded_ust): Renamed to
9668 `in_process_agent_supports_ust'.
9669 Update callers.
9670 (in_process_agent_supports_ust): Call agent_capability_check.
9671 (clear_installed_tracepoints): Assert that agent supports
9672 agent.
9673
d1feda86
YQ
96742012-03-03 Yao Qi <yao@codesourcery.com>
9675
9676 * linux-low.c (linux_supports_agent): New.
9677 (linux_target_ops): Initialize field `supports_agent' with
9678 linux_supports_agent.
9679 * target.h (struct target_ops) <supports_agent>: New.
9680 (target_supports_agent): New macro.
9681 * server.c (handle_general_set): Handle packet 'QAgent'.
9682 (handle_query): Send `QAgent+'.
9683 * Makefile.in (server.o): Depends on agent.h.
9684
2fa291ac
YQ
96852012-03-03 Yao Qi <yao@codesourcery.com>
9686
9687 * Makefile.in (OBS): Add agent.o.
9688 Add new rule for agent.o.
9689 Track dependence of tracepoint.c on agent.h.
9690 * tracepoint.c (run_inferior_command_1):
9691 (run_inferior_command): Call agent_run_command.
9692 (gdb_ust_connect_sync_socket): Deleted. Move it to
9693 common/agent.c.
9694 (resume_thread, stop_thread): Likewise.
9695 (gdb_ust_socket_init): Renamed to ...
9696 (gdb_agent_socket_init): ... New.
9697 (gdb_ust_thread): Renamed to ...
9698 (gdb_agent_helper_thread): ... New.
9699 (gdb_ust_init): Move some code to ...
9700 (gdb_agent_init): ... here. New.
9701 [HAVE_UST]: Call gdb_ust_init.
9702 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9703 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9704 * config.in, configure: Regenerated.
9705
05044653
PA
97062012-03-02 Pedro Alves <palves@redhat.com>
9707
9708 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9709 * linux-low.c (struct simple_pid_list): New.
9710 (stopped_pids): New a struct simple_pid_list pointer.
9711 (add_to_pid_list, pull_pid_from_list): New.
9712 (handle_extended_wait): Don't assume the first signal new children
9713 report is SIGSTOP. Adjust call to pull_pid_from_list.
9714 (linux_wait_for_lwp): Adjust.
9715
8d00225b
YQ
97162012-03-02 Yao Qi <yao@codesourcery.com>
9717
9718 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9719 debug log.
9720
19560ba5
YQ
97212012-03-02 Yao Qi <yao@codesourcery.com>
9722
9723 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9724 `stop_pc' and `tpoint'. Update caller.
9725
1faeff08
MR
97262012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9727
9728 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9729 * linux-low.c (use_linux_regsets): New macro.
9730 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9731 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9732 (linux_register_in_regsets): New function.
9733 (usr_fetch_inferior_registers): Skip registers covered by
9734 regsets.
9735 (usr_store_inferior_registers): Likewise.
9736 (usr_fetch_inferior_registers): New macro.
9737 (usr_store_inferior_registers): Likewise.
9738 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9739 (linux_store_registers): Likewise.
9740 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9741 prototype.
9742 (init_registers_mips64_dsp_linux): Likewise.
9743 (init_registers_mips_linux): New macro.
9744 (init_registers_mips_dsp_linux): Likewise.
9745 (mips_dsp_num_regs): Likewise.
9746 (DSP_BASE, DSP_CONTROL): New fallback macros.
9747 (mips_base_regs): New macro.
9748 (mips_regmap): Use it. Fix the size.
9749 (mips_dsp_regmap): New variable.
9750 (mips_dsp_regset_bitmap): Likewise.
9751 (mips_arch_setup): New function.
9752 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9753 than mips_regmap.
9754 (mips_cannot_store_register): Likewise.
9755 (the_low_target): Update .arch_setup, .num_regs and .regmap
9756 initializers. Add .regset_bitmap initializer.
9757 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9758 initializer.
9759 * linux-bfin-low.c (the_low_target): Likewise.
9760 * linux-cris-low.c (the_low_target): Likewise.
9761 * linux-crisv32-low.c (the_low_target): Likewise.
9762 * linux-ia64-low.c (the_low_target): Likewise.
9763 * linux-m32r-low.c (the_low_target): Likewise.
9764 * linux-m68k-low.c (the_low_target): Likewise.
9765 * linux-ppc-low.c (the_low_target): Likewise.
9766 * linux-s390-low.c (the_low_target): Likewise.
9767 * linux-sh-low.c (the_low_target): Likewise.
9768 * linux-sparc-low.c (the_low_target): Likewise.
9769 * linux-tic6x-low.c (the_low_target): Likewise.
9770 * linux-x86-low.c (the_low_target): Likewise.
9771 * linux-xtensa-low.c (the_low_target): Likewise.
9772 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9773 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9774 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9775 srv_xmlfiles.
9776 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9777 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9778
c03e6ccc
YQ
97792012-02-29 Yao Qi <yao@codesourcery.com>
9780 Pedro Alves <palves@redhat.com>
9781
9782 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9783 `step_over_finished' is true.
9784
644cebc9
PA
97852012-02-27 Pedro Alves <palves@redhat.com>
9786
9787 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9788 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9789
c14d7ab2
PA
97902012-02-27 Pedro Alves <palves@redhat.com>
9791
9792 PR server/9684
9793 * linux-low.c (pid_is_stopped): New.
9794 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9795
412c89dd
LM
97962012-02-25 Luis Machado <lgustavo@codesourcery.com>
9797
9798 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9799 of conditions.
9800
b745defe
MR
98012012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9802
9803 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9804
9f3a5c85
LM
98052012-02-24 Luis Machado <lgustavo@codesourcery>
9806
9807 * server.c (handle_query): Advertise support for target-side
9808 breakpoint condition evaluation.
9809 (process_point_options): New function.
9810 (process_serial_event): When inserting a breakpoint, check for
9811 a target-side condition that should be evaluated.
9812
9813 * mem-break.c: Include regcache.h and ax.h.
9814 (point_cond_list_t): New data structure.
9815 (breakpoint) <cond_list>: New field.
9816 (find_gdb_breakpoint_at): Make non-static.
9817 (delete_gdb_breakpoint_at): Clear any target-side
9818 conditions.
9819 (clear_gdb_breakpoint_conditions): New function.
9820 (add_condition_to_breakpoint): Likewise.
9821 (add_breakpoint_condition): Likewise.
9822 (gdb_condition_true_at_breakpoint): Likewise.
9823 (gdb_breakpoint_here): Return result directly instead
9824 of going through a local variable.
9825
9826 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9827 (clear_gdb_breakpoint_conditions): Likewise.
9828 (add_breakpoint_condition): Likewise.
9829 (gdb_condition_true_at_breakpoint): Likewise.
9830
9831 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9832 (need_step_over_p): Take target-side breakpoint condition into
9833 consideration.
9834
5e1dc496
LM
98352012-02-24 Luis Machado <lgustavo@codesourcery>
9836
9837 * server.h: Include tracepoint.h.
9838 (agent_mem_read, agent_get_trace_state_variable_value,
9839 agent_set_trace_state_variable_value,
9840 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9841 get_set_tsv_func_addr): New prototypes.
9842
9843 * ax.h: New include file.
9844 * ax.c: New source file.
9845
9846 * tracepoint.c: Include ax.h.
9847 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9848 agent_expr, eval_result_type): Move to ax.h.
9849 (parse_agent_expr): Rename to ...
9850 (gdb_parse_agent_expr): ... this, make it non-static and move
9851 to ax.h.
9852 (unparse_agent_expr) Rename to ...
9853 (gdb_unparse_agent_expr): ... this, make it non-static and move
9854 to ax.h.
9855 (eval_agent_expr): Rename to ...
9856 (eval_tracepoint_agent_expr): ... this.
9857 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9858 forward declarations.
9859 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9860 (agent_get_trace_state_variable_value): New function.
9861 (agent_set_trace_state_variable_value): New function.
9862 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9863 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9864 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9865 (condition_true_at_tracepoint): Likewise.
9866 (parse_agent_expr): Rename to ...
9867 (gdb_parse_agent_expr): ... this and move to ax.c.
9868 (unparse_agent_expr): Rename to ...
9869 (gdb_unparse_agent_expr): ... this and move to ax.c.
9870 (gdb_agent_op_name): Move to ax.c.
9871 (eval_agent_expr): Rename to ...
9872 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9873 and move to ax.c.
9874 (eval_tracepoint_agent_expr): New function.
9875 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9876 non-static.
5e1dc496
LM
9877 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9878 ax.c.
9879 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9880 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9881 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9882 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9883 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9884 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9885 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9886 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9887 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9888 (compile_bytecodes): Remove forward declaration.
9889 (is_goto_target): Move to ax.c.
9890 (compile_bytecodes): Move to ax.c and call
9891 agent_get_trace_state_variable_value (...) and
9892 agent_set_trace_state_variable_value (...).
9893
9894 * Makefile.in: Update ax.c and IPA dependencies.
9895
277e4e52
PA
98962012-02-24 Pedro Alves <palves@redhat.com>
9897
9898 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9899 (cmd_bigqtbuffer_circular): ... this. Only handle
9900 'QTBuffer:circular:'.
9901 (handle_tracepoint_general_set): Adjust.
9902
bf4c19f7
YQ
99032012-02-16 Yao Qi <yao@codesourcery.com>
9904
9905 * inferiors.c: Move code to ...
9906 * dll.c: .... here. New.
9907 * server.h: Declare clear_dlls.
9908 * Makefile.in (SFILES): Add dll.c.
9909 (OBS): Add dll.o
9910 (dll.o): New rule.
9911
d73f2619
YQ
99122012-02-11 Yao Qi <yao@codesourcery.com>
9913
9914 * server.c: (handle_monitor_command): Add a new parameter
9915 `own_buf'.
9916 (handle_query): Update caller.
9917
f8255c2a
JB
99182012-02-09 Joel Brobecker <brobecker@adacore.com>
9919
9920 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9921 * configure, config.in: Regenerate.
9922 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9923 is not defined.
9924
da84f473
PA
99252012-02-02 Pedro Alves <palves@redhat.com>
9926
9927 Try SIGKILL first, then PTRACE_KILL.
9928 * linux-low.c (linux_kill_one_lwp): New.
9929 (linux_kill_one_lwp): Rename to ...
9930 (kill_one_lwp_callback): ... this. Use the new
9931 linux_kill_one_lwp.
9932
e886a173
PA
99332012-02-02 Pedro Alves <palves@redhat.com>
9934
9935 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9936 inferior.
9937
be07f1a2
PA
99382012-01-27 Pedro Alves <palves@redhat.com>
9939
9940 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9941 (elf_64_file_p): Make static.
9942 (linux_pid_exe_is_elf_64_file): New.
9943 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9944 Delete declarations.
9945 (linux_pid_exe_is_elf_64_file): Declare.
9946 * linux-x86-low.c (x86_arch_setup): Use
9947 linux_pid_exe_is_elf_64_file.
9948
d8301ad1
JK
99492012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9950
9951 * linux-low.c (linux_wait_for_event_1): Rename to ...
9952 (linux_wait_for_event): ... here and merge it with former
9953 linux_wait_for_event - new variable wait_ptid, use it.
9954 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9955
01b17894
PA
99562012-01-23 Pedro Alves <palves@redhat.com>
9957
9958 * server.c (main): Avoid yet another case of infinite loop while
9959 detaching/killing after a longjmp.
9960
e825046f
JK
99612012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9962
9963 Code cleanup.
9964 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9965
b9e7b9c3
UW
99662012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9967
9968 * hostio.c (handle_readlink): New function.
9969 (handle_vFile): Call it to handle "vFile:readlink" packets.
9970
901f9912
UW
99712012-01-20 Pedro Alves <palves@redhat.com>
9972 Ulrich Weigand <ulrich.weigand@linaro.org>
9973
9974 * server.c (handle_v_requests): Only support vAttach and vRun to
9975 start multiple processes when in extended protocol mode.
9976
fc1ab1a0
PA
99772012-01-17 Pedro Alves <palves@redhat.com>
9978
9979 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9980 memalign plus mprotect to allocate the scratch buffer.
9981
7d5d4e98
PA
99822012-01-13 Pedro Alves <palves@redhat.com>
9983
9984 * server.c (attach_inferior): Clear `cont_thread'.
9985
f128d5e9
PA
99862012-01-13 Pedro Alves <palves@redhat.com>
9987
9988 * server.c (main): Avoid infinite loop while detaching/killing
9989 after a longjmp.
9990
06db92f0
DE
99912012-01-09 Doug Evans <dje@google.com>
9992
9993 * server.c (start_inferior): Set last_ptid in --wrapper case.
9994
32d92999
YQ
99952012-01-06 Yao Qi <yao@codesourcery.com>
9996
9997 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9998 defined.
9999 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10000
5e0a92a9
YQ
100012012-01-04 Yao Qi <yao@codesourcery.com>
10002
10003 * tracepoint.c (cmd_qtdp): Print debug message
10004 for static tracepoint.
10005
ae639e8c
YQ
100062012-01-04 Yao Qi <yao@codesourcery.com>
10007
10008 * tracepoint.c (trace_vdebug): Differentiate debug message
10009 between gdbserver and IPA.
10010
f72429c5
YQ
100112012-01-03 Yao Qi <yao@codesourcery.com>
10012
10013 * tracepoint.c (tracepoint_was_hit): Don't collect for
10014 static tracepoint.
10015
12c3e59c
JB
100162012-01-02 Joel Brobecker <brobecker@adacore.com>
10017
10018 * terminal.h: Reformat copyright header.
10019
67827812
JB
100202012-01-02 Joel Brobecker <brobecker@adacore.com>
10021
10022 * server.c (gdbserver_version): Update copyright year.
10023 * gdbreplay.c (gdbreplay_version): Likewise.
10024
3e52c33d
JK
100252011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10026
10027 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10028
10029 Revert:
10030 2011-12-18 Hui Zhu <teawater@gmail.com>
10031 * linux-low.c (linux_create_inferior): Save return value to ret.
10032
66f1260e
HZ
100332011-12-18 Hui Zhu <teawater@gmail.com>
10034
10035 * linux-low.c (linux_create_inferior): Save return value to ret.
10036
e77616d7
DE
100372011-12-16 Doug Evans <dje@google.com>
10038
e7b06c57
DE
10039 * linux-low.c (linux_create_inferior): If stdio connection,
10040 redirect stdin from /dev/null, stdout to stderr.
10041 * remote-utils.c (remote_is_stdio): New static global.
10042 (remote_connection_is_stdio): New function.
10043 (remote_prepare): Handle stdio connection.
10044 (remote_open): Ditto.
10045 (remote_close): Don't close stdin for stdio connections.
10046 (read_prim,write_prim): New functions. Replace all calls to
10047 read/write to these.
10048 * server.c (main): Watch for "-" argument. Move call to
10049 remote_prepare before start_inferior.
10050 * server.h (STDIO_CONNECTION_NAME): New macro.
10051 (remote_connection_is_stdio): Declare.
10052
e77616d7
DE
10053 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10054 in debugging output.
10055
82067193
YQ
100562011-12-15 Yao Qi <yao@codesourcery.com>
10057
10058 * tracepoint.c: Include sys/syscall.h.
10059 (gdb_ust_thread): Remove preprocessor conditional.
10060
82bfbe7e
PA
100612011-12-14 Pedro Alves <pedro@codesourcery.com>
10062
10063 * linux-low.c (linux_detach_one_lwp): Call
10064 the_low_target.prepare_to_resume before detaching.
10065
712c6575
YQ
100662011-12-14 Yao Qi <yao@codesourcery.com>
10067
10068 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10069 of write.
10070
d54d1edf
YQ
100712011-12-14 Yao Qi <yao@codesourcery.com>
10072
10073 * i386-low.c (i386_low_stopped_data_address): Initialize local
10074 variable `control'.
10075
6210a125
PA
100762011-12-13 Pedro Alves <pedro@codesourcery.com>
10077
10078 PR remote/13492
10079
10080 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10081 DR_CONTROL unless necessary. Extend comments.
10082 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10083 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10084
2ece8244
YQ
100852011-12-13 Yao Qi <yao@codesourcery.com>
10086
10087 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10088 macros.
10089 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10090
784867a5
JK
100912011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10092
10093 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10094 Print new debug message for such case.
10095
6bf36717
JK
100962011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10097
10098 Fix overlapping memcpy.
10099 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10100 the read_inferior_memory transfer.
10101 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10102 write_inferior_memory transfer.
10103 (set_fast_tracepoint_jump): New variable buf. Use it for the
10104 read_inferior_memory and write_inferior_memory transfers.
10105 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10106 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10107 Use it for the write_inferior_memory transfer.
10108 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10109 buffers.
10110
50275556
MR
101112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10112
10113 * linux-low.c (fetch_register, store_register): Make code
10114 consistent, fix formatting.
10115
7325beb4
MR
101162011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10117
10118 * linux-low.c (usr_store_inferior_registers): Factor out code
10119 to handle individual registers into...
10120 (store_register): ... this new function.
10121
c642a434
UW
101222011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10123
10124 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10125 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10126 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10127 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10128 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10129 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10130 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10131 (srv_xmlfiles): Add new XML files.
10132
10133 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10134 and <sys/uio.h>.
10135 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10136 (init_registers_s390_linux32v1): Add prototype.
10137 (init_registers_s390_linux32v2): Likewise.
10138 (init_registers_s390_linux64v1): Likewise.
10139 (init_registers_s390_linux64v2): Likewise.
10140 (init_registers_s390x_linux64v1): Likewise.
10141 (init_registers_s390x_linux64v2): Likewise.
10142 (s390_num_regs): Increment to 52.
10143 (s390_regmap): Add orig_r2 register.
10144 (s390_num_regs_3264): Increment to 68.
10145 (s390_regmap_3264): Add orig_r2 register.
10146 (s390_collect_ptrace_register): Handle orig_r2 register.
10147 (s390_supply_ptrace_register): Likewise.
10148 (s390_fill_last_break): New function.
10149 (s390_store_last_break): Likewise.
10150 (s390_fill_system_call): New function.
10151 (s390_store_system_call): Likewise.
10152 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10153 register sets.
10154 (s390_check_regset): New function.
10155 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10156 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10157 Update target_regsets for available register sets.
10158
2268b414
JK
101592011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10160 Jan Kratochvil <jan.kratochvil@redhat.com>
10161
10162 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10163 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10164 New.
10165 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10166 * linux-low.h (struct process_info_private): New member r_debug.
10167 * server.c (handle_qxfer_libraries): Call
10168 the_target->qxfer_libraries_svr4.
10169 (handle_qxfer_libraries_svr4): New function.
10170 (qxfer_packets): New entry "libraries-svr4".
10171 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10172 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10173 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10174 PACKET_qXfer_libraries_svr4.
10175
d6db1fab
UW
101762011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10177
10178 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10179 PSW address/mask between 8-byte and 16-byte formats.
10180 (s390_supply_ptrace_register): Likewise.
10181 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10182 basic addressing mode bit.
10183
242f5f1c
SS
101842011-11-24 Stan Shebs <stan@codesourcery.com>
10185
10186 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10187
f196051f
SS
101882011-11-17 Stan Shebs <stan@codesourcery.com>
10189
10190 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10191 (tracing_start_time): New global.
10192 (tracing_stop_time): New global.
10193 (tracing_user_name): New global.
10194 (tracing_notes): New global.
10195 (tracing_stop_note): New global.
10196 (cmd_qtstart): Set traceframe_usage, start_time.
10197 (stop_tracing): Set stop_time.
10198 (cmd_qtstatus): Report additional status.
10199 (cmd_qtp): New function.
10200 (handle_tracepoint_query): Call it.
10201 (cmd_qtnotes): New function.
10202 (handle_tracepoint_general_set): Call it.
10203 (get_timestamp): Rename from tsv_get_timestamp.
10204
405f8e94
SS
102052011-11-14 Stan Shebs <stan@codesourcery.com>
10206 Kwok Cheung Yeung <kcy@codesourcery.com>
10207
10208 * linux-x86-low.c (small_jump_insn): New.
10209 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10210 trampoline and error message, build a trampoline and issue a small
10211 jump instruction to it.
10212 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10213 trampoline and error message.
10214 (x86_get_min_fast_tracepoint_insn_len): New.
10215 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10216 * linux-low.h (struct linux_target_ops): Add arguments to
10217 install_fast_tracepoint_jump_pad operation, add new operation.
10218 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10219 arguments.
10220 (linux_get_min_fast_tracepoint_insn_len): New function.
10221 (linux_target_op): Add new operation.
10222 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10223 (gdb_trampoline_buffer_end): Ditto.
10224 (gdb_trampoline_buffer_error): Ditto.
10225 (struct ipa_sym_addresses): Add fields for new IPA variables.
10226 (symbol_list): Add entries for new IPA variables.
10227 (struct tracepoint): Add fields to hold the address range of the
10228 trampoline used by the tracepoint.
10229 (trampoline_buffer_head): New static variable.
10230 (trampoline_buffer_tail): Ditto.
10231 (claim_trampoline_space): New function.
10232 (have_fast_tracepoint_trampoline_buffer): New function.
10233 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10234 structure.
10235 (install_fast_tracepoint): Ditto, also add error buffer argument.
10236 (cmd_qtminftpilen): New function.
10237 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10238 (fast_tracepoint_from_trampoline_address): New function.
10239 (fast_tracepoint_collecting): Handle trampoline as part of jump
10240 pad space.
10241 (set_trampoline_buffer_space): New function.
10242 (initialize_tracepoint): Initialize new IPA variables.
10243 * target.h (struct target_ops): Add arguments to
10244 install_fast_tracepoint_jump_pad operation, add new
10245 get_min_fast_tracepoint_insn_len operation.
10246 (target_get_min_fast_tracepoint_insn_len): New.
10247 (install_fast_tracepoint_jump_pad): Add arguments.
10248 * server.h (IPA_BUFSIZ): Define.
10249 * linux-i386-ipa.c: Include extra header files.
10250 (initialize_fast_tracepoint_trampoline_buffer): New function.
10251 (initialize_low_tracepoint): Call it.
10252 * server.h (set_trampoline_buffer_space): Declare.
10253 (claim_trampoline_space): Ditto.
10254 (have_fast_tracepoint_trampoline_buffer): Ditto.
10255
1e4d1764
YQ
102562011-11-14 Yao Qi <yao@codesourcery.com>
10257
10258 * server.c (handle_query): Handle InstallInTrace for qSupported.
10259 * tracepoint.c (add_tracepoint): Sort list.
10260 (install_tracepoint, download_tracepoint): New.
10261 (cmd_qtdp): Call them to install and download tracepoints.
10262 (sort_tracepoints): Removed.
10263 (cmd_qtstart): Update.
10264
5c73ff4e
YQ
102652011-11-14 Yao Qi <yao@codesourcery.com>
10266
10267 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10268 * mem-break.h: Declare.
10269 * tracepoint.c (cmd_qtstart): Move some code to ...
10270 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10271 New.
10272 (download_tracepoints): Move some code to ...
10273 (download_tracepoint_1): ... here. New.
10274
86a30030
YQ
102752011-11-08 Yao Qi <yao@codesourcery.com>
10276
10277 * remote-utils.c (relocate_instruction): A comment fix.
10278
8d26e50c
JB
102792011-11-07 Joel Brobecker <brobecker@adacore.com>
10280
10281 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10282 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10283 dr_status_mirror and dr_control_mirror from debug_reg_state.
10284 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10285 (i386_initial_stuff): Remove use of deleted globals.
10286 (i386_get_thread_context, i386_set_thread_context,
10287 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10288 from debug_reg_state.
10289
a59306a3
YQ
102902011-11-05 Yao Qi <yao@codesourcery.com>
10291
10292 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10293 address as TPOINT's.
10294
3065dfb6
SS
102952011-11-02 Stan Shebs <stan@codesourcery.com>
10296
10297 * tracepoint.c (agent_mem_read_string): New function.
10298 (eval_agent_expr): Call it for tracenz.
10299 * server.c (handle_query): Report support for tracenz.
10300
fd0d8c7c
YQ
103012011-11-02 Yao Qi <yao@codesourcery.com>
10302
10303 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10304
609086b1
YQ
103052011-11-02 Yao Qi <yao@codesourcery.com>
10306
10307 * target.h: Fix a typo in comment.
10308
b9fd1791
PA
103092011-10-31 Pedro Alves <pedro@codesourcery.com>
10310
10311 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10312 clobber the breakpoints' shadows with fast tracepoint jumps.
10313 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10314 * target.c (write_inferior_memory): Also pass MYADDR down to
10315 check_mem_write.
10316
03583c20
UW
103172011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10318
10319 * configure.ac: Check support for personality routine.
10320 * configure: Regenerate.
10321 * config.in: Likewise.
10322 * linux-low.c: Include <sys/personality.h>.
10323 Define ADDR_NO_RANDOMIZE if necessary.
10324 (linux_create_inferior): Disable address space randomization when
10325 forking inferior, if requested.
10326 (linux_supports_disable_randomization): New function.
10327 (linux_target_ops): Install it.
10328 * server.h (disable_randomization): Declare.
10329 * server.c (disable_randomization): New global variable.
10330 (handle_general_set): Handle QDisableRandomization.
10331 (handle_query): Likewise for qSupported.
10332 (main): Support --disable-randomization and --no-disable-randomization
10333 command line arguments.
10334 * target.h (struct target_ops): Add supports_disable_randomization.
10335 (target_supports_disable_randomization): New macro.
10336
723b724b
MF
103372011-09-29 Mike Frysinger <vapier@gentoo.org>
10338
10339 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10340 ifdef check.
10341 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10342 [!PT_GETDSBT] (target_loadmap): New definition.
10343 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10344 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10345 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10346 and PT_GETDSBT to LINUX_LOADMAP.
10347 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10348 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10349
55329a5c 103502011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
10351
10352 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10353 (arm_linux_hwbp_cap): New static variable.
10354 (arm_linux_get_hwbp_cap): Replace by ...
10355 (arm_linux_init_hwbp_cap): ... this new function.
10356 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10357 (arm_linux_get_hw_watchpoint_count): Likewise.
10358 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10359 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10360 (arm_prepare_to_resume): Use perror_with_name instead of error.
10361
55329a5c 103622011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
10363
10364 * linux-arm-low.c: Include <signal.h>.
10365 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10366 (struct arm_linux_hwbp_cap): New data type.
10367 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10368 (struct arm_linux_hw_breakpoint): New data type.
10369 (MAX_BPTS, MAX_WPTS): Define.
10370 (struct arch_process_info, struct arch_lwp_info): New data types.
10371 (arm_linux_get_hwbp_cap): New function.
10372 (arm_linux_get_hw_breakpoint_count): Likewise.
10373 (arm_linux_get_hw_watchpoint_count): Likewise.
10374 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10375 (arm_hwbp_control_initialize): Likewise.
10376 (arm_hwbp_control_is_enabled): Likewise.
10377 (arm_hwbp_control_is_initialized): Likewise.
10378 (arm_hwbp_control_disable): Likewise.
10379 (arm_linux_hw_breakpoint_equal): Likewise.
10380 (arm_linux_hw_point_initialize): Likewise.
10381 (struct update_registers_data): New data structure.
10382 (update_registers_callback: New function.
10383 (arm_insert_point): Likewise.
10384 (arm_remove_point): Likewise.
10385 (arm_stopped_by_watchpoint): Likewise.
10386 (arm_stopped_data_address): Likewise.
10387 (arm_new_process): Likewise.
10388 (arm_new_thread): Likewise.
10389 (arm_prepare_to_resume): Likewise.
10390 (the_low_target): Register arm_insert_point, arm_remove_point,
10391 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10392 arm_new_thread, and arm_prepare_to_resume.
10393
6b9801d4
SS
103942011-09-15 Stan Shebs <stan@codesourcery.com>
10395
10396 * server.h (struct emit_ops): Add compare-goto fields.
10397 * tracepoint.c (gdb_agent_op_sizes): New table.
10398 (emit_eq_goto): New function.
10399 (emit_ne_goto): New function.
10400 (emit_lt_goto): New function.
10401 (emit_le_goto): New function.
10402 (emit_gt_goto): New function.
10403 (emit_ge_goto): New function.
10404 (is_goto_target): New function.
10405 (compile_bytecodes): Recognize special cases of compare-goto
10406 combinations and call specialized emitters for them.
10407 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10408 (amd64_emit_ne_goto): New function.
10409 (amd64_emit_lt_goto): New function.
10410 (amd64_emit_le_goto): New function.
10411 (amd64_emit_gt_goto): New function.
10412 (amd64_emit_ge_goto): New function.
10413 (amd64_emit_ops): Add the new functions.
10414 (i386_emit_eq_goto): New function.
10415 (i386_emit_ne_goto): New function.
10416 (i386_emit_lt_goto): New function.
10417 (i386_emit_le_goto): New function.
10418 (i386_emit_gt_goto): New function.
10419 (i386_emit_ge_goto): New function.
10420 (i386_emit_ops): Add the new functions.
10421
bf15cbda
SS
104222011-09-08 Stan Shebs <stan@codesourcery.com>
10423
10424 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10425 (i386_emit_epilogue): Restore %ebx.
10426
943ca1dd
JZ
104272011-08-31 Jie Zhang <jzhang918@gmail.com>
10428
10429 * server.c (step_thread): Remove definition.
10430 (process_serial_event): Don't handle Hs.
10431 * server.h (step_thread): Remove declaration.
10432 * target.c (set_desired_inferior): Remove use of step_thread.
10433
e3deef73
LM
104342011-08-24 Luis Machado <lgustavo@codesourcery.com>
10435
10436 * linux-low.c: Include linux-procfs.h.
10437 (linux_attach_lwp_1): Update comments.
10438 (linux_attach): Scan for existing threads when attaching to a
10439 process that is the tgid.
10440 * Makefile.in: Update dependencies.
10441
13da1c97
LM
104422011-08-24 Luis Machado <lgustavo@codesourcery.com>
10443
10444 * configure.srv: Add linux-procfs.o dependencies.
10445
881127c9
YQ
104462011-08-14 Yao Qi <yao@codesourcery.com>
10447
10448 * target.h (struct target_ops): Fix indent.
10449 * win32-low.c (win32_target_ops): Fix comment.
10450
58dbd541
YQ
104512011-08-14 Andrew Jenner <andrew@codesourcery.com>
10452 Yao Qi <yao@codesourcery.com>
10453
10454 * Makefile.in (clean): Remove tic6x-*.c files.
10455 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10456 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10457 (tic6x-c64xp-linux.c): Likewise.
10458 * configure.srv: Add support for tic6x-*-uclinux.
10459 * linux-tic6x-low.c: New.
10460 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10461
78d85199
YQ
104622011-08-14 Andrew Stubbs <ams@codesourcery.com>
10463 Yao Qi <yao@codesourcery.com>
10464
10465 * target.h (struct target_ops): Add read_loadmap.
10466 * linux-low.c (struct target_loadseg): New type.
10467 (struct target_loadmap): New type.
10468 (linux_read_loadmap): New function.
10469 (linux_target_ops): Add linux_read_loadmap.
10470 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10471 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10472 to NULL.
78d85199 10473
a959a88d
EZ
104742011-08-05 Eli Zaretskii <eliz@gnu.org>
10475
10476 * win32-low.c: Include <stdint.h>.
10477
1ced966e
PA
104782011-07-22 Pedro Alves <pedro@codesourcery.com>
10479
10480 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10481 to the inferior here.
10482 (i386_remove_aligned_watchpoint): Ditto.
10483 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10484 fit part of the watchpoint in the debug registers.
10485 (i386_update_inferior_debug_regs): New.
10486 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10487 registers, and only update the inferior on success.
10488 (i386_low_remove_watchpoint): Ditto.
10489
d26e3629
KY
104902011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10491
10492 * linux-low.c (compare_ints, unique, list_threads, show_process,
10493 linux_core_of_thread): Delete.
10494 (linux_target_ops): Change linux_core_of_thread to
10495 linux_common_core_of_thread.
10496 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10497 * utils.c (malloc_failure): Change type of argument.
10498 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10499 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10500 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10501 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10502 (IPA_OBJS): Add common-utils-ipa.o.
10503 (ptid_h, linux_osdata_h): New macros.
10504 (server_h): Add common/common-utils.h, common/xml-utils.h,
10505 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10506 common/ptid.h.
10507 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10508 ptid.o, buffer.o): New rules.
10509 (linux-low.o): Add common/linux-osdata.h as a dependency.
10510 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10511 * configure.ac: Add AC_HEADER_DIRENT check.
10512 * config.in: Regenerate.
10513 * configure: Regenerate.
10514 * remote-utils.c (xml_escape_text): Delete.
10515 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10516 buffer_xml_printf): Move to common/buffer.c.
10517 * server.c (main): Remove call to initialize_inferiors.
10518 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10519 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10520 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10521 internal_error, gdb_assert, gdb_assert_fail): Delete.
10522 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10523 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10524 common/buffer.h.
10525 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10526 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10527 initialize_inferiors): Delete.
10528
2275a1a7
PA
105292011-07-20 Pedro Alves <pedro@codesourcery.com>
10530
10531 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10532 symbol error.
10533
0a5b1e09
PA
105342011-05-31 Pedro Alves <pedro@codesourcery.com>
10535
10536 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10537 assertion.
10538 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10539
6938fd34
YQ
105402011-05-26 Yao Qi <yao@codesourcery.com>
10541
10542 * Makefile.in (thread-db.o): Track dependence to
10543 common/gdb_thread_db.h.
10544 * thread-db.c: include gdb_thread_db.h from right place.
10545
b481f9e0
TT
105462011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10547
10548 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10549 __FILE__ and __LINE__ to internal_error.
10550
98a5dd13
DE
105512011-05-13 Doug Evans <dje@google.com>
10552
10553 * thread-db.c (try_thread_db_load_from_sdir): New function.
10554 (try_thread_db_load_from_dir): New function.
10555 (thread_db_load_search): Handle $sdir, ignore $pdir.
10556 Remove trying of system directories if search of
10557 libthread-db-search-path fails, that is now done via $sdir.
10558
d248b706
KY
105592011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10560
10561 * server.c (handle_query): Add EnableDisableTracepoints to the list
10562 of supported features.
43aaf8b6 10563 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10564 tracepoints.
43aaf8b6
PA
10565 (cmd_qtenable_disable): New.
10566 (cmd_qtstart): Install tracepoints even if disabled.
10567 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10568 receiving a QTEnable or QTDisable packet.
10569 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10570 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10571 tracepoints.
10572 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10573
84e578fb
DE
105742011-05-10 Doug Evans <dje@google.com>
10575
10576 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10577
71f55dd8
DE
105782011-05-04 Doug Evans <dje@google.com>
10579
10580 * linux-low.c (linux_join): Skip process lookup.
10581 * spu-low.c (spu_join): Ditto.
10582 * server.c (join_inferiors_callback): Delete.
10583 (process_serial_event): For 'D' packet (detach) call join_inferior
10584 directly.
10585
4d393d60
JM
105862011-05-04 Joseph Myers <joseph@codesourcery.com>
10587
10588 * README: Don't mention xscale*-*-linux*.
10589 * configure.srv (xscale*-*-linux*): Don't handle target.
10590
b00ad6ff
NF
105912011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10592
10593 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10594 casting pointers.
10595 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10596 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10597 (i386_emit_void_call_2): Likewise.
10598
af96c192
YQ
105992011-04-26 Yao Qi <yao@codesourcery.com>
10600
43aaf8b6
PA
10601 * linux-low.c: Move common macros to linux-ptrace.h.
10602 Include linux-ptrace.h.
af96c192
YQ
10603 * Makefile.in (linux_ptrace_h): New.
10604 (linux-low.o): Depends on linux-ptrace.h.
10605
03f2bd59
JK
106062011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10607
10608 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10609 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10610 (remote_prepare): New function with most of the TCP code from ...
10611 (remote_open): ... here. Detect PORT here unconditionally. Move also
10612 setting transport_is_reliable.
10613 * server.c (run_once): New variable.
10614 (gdbserver_usage): Document it.
10615 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10616 the first run if RUN_ONCE.
10617 * server.h (run_once, remote_prepare): New declarations.
10618
7a9dd1b2
TT
106192011-04-19 Tom Tromey <tromey@redhat.com>
10620
10621 * win32-low.c (handle_load_dll): Remove duplicate "the".
10622
81239425
PM
106232011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10624
10625 Remove support for old Cygwin 1.5 versions.
10626 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10627 function to avoid warning.
10628 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10629 warning.
10630
9e0627f1
PM
106312011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10632
10633 * gdbserver/server.h (Macro _): Define it if not available.
10634
588eebee
MS
106352011-03-14 Michael Snyder <msnyder@vmware.com>
10636
348af9f7 10637 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10638
43f70d4c
JB
106392011-03-10 Joel Brobecker <brobecker@adacore.com>
10640
10641 * Makefile.in (maintainer-clean realclean distclean): Remove
10642 "make ... subdir_do" command.
10643
348af9f7
MS
106442011-03-10 Michael Snyder <msnyder@vmware.com>
10645
10646 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10647
10648 * server.c (handle_v_run): Free alloced buffer on early return.
10649
e637a4f5
YQ
106502011-03-09 Yao Qi <yao@codesourcery.com>
10651
10652 Revert:
10653 2011-03-04 Yao Qi <yao@codesourcery.com>
10654
10655 * Makefile.in: Remove GNU make feature --directory.
10656
10657 2011-03-05 Yao Qi <yao@codesourcery.com>
10658
10659 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10660 (subdir_do): New make target. Copied from gdb/Makefile.
10661 (maintainer-clean, realclean, distclean, clean): Call corresponding
10662 make targets in common/Makefile.
10663
10664 2011-02-11 Yao Qi <yao@codesourcery.com>
10665
10666 * configure.ac: Call AC_PROG_RANLIB.
10667 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10668 * configure: Regenerate.
10669
e6edda56
JK
106702011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10671
10672 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10673
e5141119
JB
106742011-03-06 Yao Qi <yao@codesourcery.com>
10675
10676 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10677
64794aa4
JB
106782011-03-05 Yao Qi <yao@codesourcery.com>
10679
10680 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10681 (subdir_do): New make target. Copied from gdb/Makefile.
10682 (maintainer-clean, realclean, distclean, clean): Call corresponding
10683 make targets in common/Makefile.
10684
7a762829
YQ
106852011-03-04 Yao Qi <yao@codesourcery.com>
10686
10687 * Makefile.in: Remove GNU make feature --directory.
10688
348af9f7
MS
106892011-03-04 Michael Snyder <msnyder@vmware.com>
10690
10691 * server.c (queue_stop_reply): Call xmalloc not malloc.
10692
106932011-03-02 Michael Snyder <msnyder@vmware.com>
10694
10695 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10696
9f72fee2
MS
106972011-02-28 Michael Snyder <msnyder@vmware.com>
10698
588eebee
MS
10699 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10700 (cmd_qtframe): Ditto.
10701 (cmd_qtbuffer): Ditto.
10702 (cmd_bigqtbuffer): Ditto.
10703
9f72fee2
MS
10704 * utils.c (decimal2str): Initialize 'width' to nine, then
10705 don't mess with it.
10706
8040bd49
UW
107072011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10708
10709 * hostio.c (require_data): Free *data, not data.
10710
7e52cbd0
JK
107112011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10712
10713 * hostio.c (require_data): Use free, not xfree.
10714
9130f83e
MS
107152011-02-27 Michael Snyder <msnyder@vmware.com>
10716
4b812f4e
MS
10717 * server.c (handle_query): Discard unused value.
10718
9130f83e
MS
10719 * hostio.c (require_data): Free malloc memory before returning
10720 error.
10721
69d37113
MS
107222011-02-26 Michael Snyder <msnyder@vmware.com>
10723
10724 * linux-low.c (list_threads): Call closedir for dirent.
10725
35f5825a
MS
107262011-02-27 Michael Snyder <msnyder@vmware.com>
10727
2a589cef
MS
10728 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10729 a case statement falls through.
10730
0adea5f7
MS
10731 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10732
35f5825a
MS
10733 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10734 in comparison.
10735
238f1c74
MS
107362011-02-26 Michael Snyder <msnyder@vmware.com>
10737
10738 * utils.c (decimal2str): Eliminate dead code and dead param.
10739 (pulongest): Drop dead param from call to decimal2str.
10740 (plongest): Ditto.
10741
633ff500
JB
107422011-02-24 Joel Brobecker <brobecker@adacore.com>
10743
10744 Revert the following patch (not approved yet):
10745 2011-02-21 Hui Zhu <teawater@gmail.com>
10746 * tracepoint.c (tp_printf): New function.
10747 (eval_agent_expr): Handle gdb_agent_op_printf.
10748
f9c6ff72
HZ
107492011-02-21 Hui Zhu <teawater@gmail.com>
10750
10751 * tracepoint.c (tp_printf): New function.
10752 (eval_agent_expr): Handle gdb_agent_op_printf.
10753
94d5e490
TT
107542011-02-18 Tom Tromey <tromey@redhat.com>
10755
10756 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10757 (tracepoint.o): Likewise.
10758 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10759 (gdb_agent_op_names): Likewise.
10760
c7f96d2b
TT
107612011-02-18 Tom Tromey <tromey@redhat.com>
10762
10763 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10764 gdb_agent_op_rot>: New constants.
10765 (gdb_agent_op_names): Add pick and roll.
10766 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10767 cases.
10768
0feedb2c
JK
107692011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10770
10771 * aclocal.m4: Regenerated with aclocal-1.11.1.
10772
b3b9301e
PA
107732011-02-14 Pedro Alves <pedro@codesourcery.com>
10774
10775 * server.c (handle_qxfer_traceframe_info): New.
10776 (qxfer_packets): Register "traceframe-info".
10777 (handle_query): Report support for qXfer:traceframe-info:read+.
10778 * tracepoint.c (match_blocktype): New.
10779 (traceframe_find_block_type): Rename to ...
10780 (traceframe_walk_blocks): ... this. Add callback filter argument,
10781 and use it.
10782 (traceframe_find_block_type): New, reimplemented on top of
10783 traceframe_walk_blocks.
10784 (build_traceframe_info_xml): New.
10785 (traceframe_read_info): New.
10786 * server.h (traceframe_read_info): Declare.
10787
4f3e6fb7
YQ
107882011-02-11 Yao Qi <yao@codesourcery.com>
10789
10790 * configure.ac: Call AC_PROG_RANLIB.
10791 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10792 * configure: Regenerate.
10793
764880b7
PA
107942011-02-07 Pedro Alves <pedro@codesourcery.com>
10795
10796 * server.c (gdb_read_memory): Change return semantics to allow
10797 partial transfers.
10798 (handle_search_memory_1): Adjust.
10799 (process_serial_event) <'m' packet>: Handle partial transfers.
10800 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10801
1c79eb8a
PA
108022011-01-28 Pedro Alves <pedro@codesourcery.com>
10803
10804 * regcache.c (init_register_cache): Initialize
10805 regcache->register_status.
10806 (free_register_cache): Release regcache->register_status.
10807 (regcache_cpy): Copy register_status.
10808 (registers_to_string): Print 'x's for unavailable registers.
10809 (supply_register): Mark the register's status valid or
10810 unavailable, depending on whether a buffer was passed in or not.
10811 (supply_register_zeroed): New.
10812 (supply_regblock): Mark the registers' status valid or
10813 unavailable, depending on whether a buffer was passed in or not.
10814 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10815 (struct regcache): New `register_status' field.
10816 (supply_register_zeroed): Declare.
10817 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10818 supply_register_zeroed, rather than passing a NULL buffer to
10819 supply_register.
10820 * tracepoint.c (fetch_traceframe_registers): Update comment.
10821
85724a0e
PA
108222011-01-28 Pedro Alves <pedro@codesourcery.com>
10823
10824 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10825 buffer explicit.
10826
d08aafef
PA
108272011-01-25 Pedro Alves <pedro@codesourcery.com>
10828
10829 * server.h (decode_xfer_write): Change prototype.
10830 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10831 and don't extract the annex here.
10832 * server.c (decode_xfer_read): Remove `annex' parameter,
10833 and don't extract the annex here.
10834 (decode_xfer): New.
10835 (struct qxfer): New.
10836 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10837 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10838 (handle_qxfer_statictrace): New functions, abstracted out from
10839 handle_query, and made to use the struct qxfer interface.
10840 (handle_threads_qxfer_proper): Rename to ...
10841 (handle_qxfer_threads_proper): ... this.
10842 (handle_threads_qxfer): Rename to ...
10843 (handle_qxfer_threads): ... this. Adjust.
10844 (qxfer_packets): New array.
10845 (handle_qxfer): New function.
10846 (handle_query): Use handle_qxfer.
10847
493e2a69
MS
108482011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10849
10850 * gdbreplay.c: Shorten lines of >= 80 columns.
10851 * linux-low.c: Ditto.
10852 * linux-ppc-low.c: Ditto.
10853 * linux-s390-low.c: Ditto.
10854 * linux-sparc-low.c: Ditto.
10855 * linux-x86-low.c: Ditto.
10856 * linux-xtensa-low.c: Ditto.
10857 * mem-break.c: Ditto.
10858 * nto-low.c: Ditto.
10859 * regcache.h: Ditto.
10860 * remote-utils.c: Ditto.
10861 * server.c: Ditto.
10862 * server.h: Ditto.
10863 * thread-db.c: Ditto.
10864 * tracepoint.c: Ditto.
10865 * utils.c: Ditto.
10866 * win32-low.h: Ditto.
10867
44944448
JB
108682011-01-05 Joel Brobecker <brobecker@adacore.com>
10869
10870 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10871 update.
10872
71ce852c
JB
108732011-01-01 Joel Brobecker <brobecker@adacore.com>
10874
10875 * server.c (gdbserver_version): Update copyright year in version
10876 output.
10877 * gdbreplay.c (gdbreplay_version): Ditto.
10878
eb826dc6
MF
108792010-12-29 Jie Zhang <jie.zhang@analog.com>
10880
10881 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10882 * linux-bfin-low.c: New file.
10883 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10884 PT_DATA_ADDR for BFIN targets.
10885 * Makefile.in (SFILES): Add linux-bfin-low.c.
10886 (clean): Remove reg-bfin.c.
10887 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10888 * README: Mention supported Blackfin targets.
10889
39ab222a
MF
108902010-12-23 Mike Frysinger <vapier@gentoo.org>
10891
10892 * .gitignore: New file.
10893
a1f2ce7d
MF
108942010-11-16 Mike Frysinger <vapier@gentoo.org>
10895
10896 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10897
f474844c
JZ
108982010-10-22 Jie Zhang <jie@codesourcery.com>
10899
10900 * Makefile.in: Add FLAGS_TO_PASS variable.
10901 (install): Remove dependency of install-only and recursively
10902 invoke make for install-only.
10903
f1048712
DE
109042010-10-04 Doug Evans <dje@google.com>
10905
10906 * Makefile.in (uninstall): Use $(DESTDIR).
10907
b53a1623
PA
109082010-09-24 Pedro Alves <pedro@codesourcery.com>
10909
e6ee044d
PA
10910 PR gdb/11842
10911
b53a1623
PA
10912 * linux-x86-low.c (compat_siginfo_from_siginfo)
10913 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10914 si_code is < 0. Check for si_code == SI_TIMER before checking for
10915 si_code < 0.
10916
fa1bd1e4
JB
109172010-09-13 Joel Brobecker <brobecker@adacore.com>
10918
10919 * lynx-i386-low.c: New file.
10920 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10921
47fac8f8
JB
109222010-09-13 Joel Brobecker <brobecker@adacore.com>
10923
10924 * lynx-low.c (ptrace_request_to_str): Remove handling for
10925 request values that have been removed in LynxOS 5.x.
10926
1adfc54d
JB
109272010-09-13 Joel Brobecker <brobecker@adacore.com>
10928
10929 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10930 <ptrace.h>
10931
c2a66c29
NS
109322010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10933
10934 * configure.ac: Add --enable-inprocess-agent option.
10935 * configure: Rebuilt.
10936
32fcada3
YQ
109372010-09-06 Yao Qi <yao@codesourcery.com>
10938
10939 * linux-low.c (linux_kill): Remove unused variable.
10940 (linux_stabilize_threads): Likewise.
10941 * server.c (start_inferior): Likewise.
10942 (queue_stop_reply_callback): Likewise.
10943 * tracepoint.c (do_action_at_tracepoint): Likewise.
10944
0cccb683
YQ
109452010-09-06 Yao Qi <yao@codesourcery.com>
10946
10947 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10948 on return.
10949
423ec54c
JK
109502010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10951
10952 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10953
12ac6819
PA
109542010-09-06 Pedro Alves <pedro@codesourcery.com>
10955
10956 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10957 "$(IPA_DEPFILES)".
10958
8ed54b31
JB
109592010-09-01 Joel Brobecker <brobecker@adacore.com>
10960
10961 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10962 gdbserver/lynx-ppc-low.c: New files.
10963 * Makefile.in (lynx_low_h): New variable.
10964 (lynx-low.o, lynx-ppc-low.o): New rules.
10965 * configure.ac: On LynxOS, link with -lnetinet.
10966 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10967 * configure: regenerate.
10968
bb0116a4
JB
109692010-09-01 Joel Brobecker <brobecker@adacore.com>
10970
10971 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10972 * configure.ac: Add check for vasprintf and vsnprintf.
10973 * configure, config.in: Regenerate.
10974 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10975
a778ab81 109762010-09-01 Joel Brobecker <brobecker@adacore.com>
10977
10978 * gdbreplay.c: Move include of alloca.h up, next to include of
10979 malloc.h.
10980 * server.h: Add include of malloc.h.
10981 * mem-break.c: Remove include of malloc.h.
10982 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10983
8b034a19 109842010-09-01 Joel Brobecker <brobecker@adacore.com>
10985
10986 * Makefile.in (memmem.o): Build with -Wno-error.
10987
109882010-09-01 Joel Brobecker <brobecker@adacore.com>
10989
10990 * utils.c (xsnprintf): Make non-static.
10991 * server.h: Add xsnprintf declaration.
10992 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10993 replace calls to snprintf by calls to xsnprintf throughout.
10994
109952010-09-01 Joel Brobecker <brobecker@adacore.com>
10996
10997 * configure.ac: Add configure check for alloca.
10998 * configure, config.in: Regenerate.
10999 * server.h: Include alloca.h if it exists.
11000 * gdbreplay.c: Include alloca.h if it exists.
11001
1a981360
PA
110022010-08-28 Pedro Alves <pedro@codesourcery.com>
11003
11004 * linux-low.c (__SIGRTMIN): Define if not already defined.
11005 (linux_create_inferior): Check for __ANDROID__ rather than
11006 __SIGRTMIN.
11007 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11008 are already deferred.
11009 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11010 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11011 stopped and already has a pending signal to report.
11012 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11013 a pending signal to report or is moving out of a jump pad.
11014 (linux_init_signals): Check for __ANDROID__ rather than
11015 __SIGRTMIN.
11016
b4d51a55
PA
110172010-08-28 Pedro Alves <pedro@codesourcery.com>
11018
11019 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11020 debug_threads check. Avoid a linear search when not doing debug
11021 output.
11022
ec48365d
PA
110232010-08-27 Pedro Alves <pedro@codesourcery.com>
11024
11025 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11026 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11027 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11028 (process_event): Change local fd's type to gdb_fildes_t.
11029 (create_file_handler): Adjust prototype.
11030 (delete_file_handler): Adjust prototype.
11031 (handle_file_event): Adjust prototype. Use pfildes.
11032 (create_file_event): Adjsut prototype.
11033 * remote-utils.c (remote_desc, listen_desc): Change type to
11034 gdb_fildes_t.
11035 * server.h: New gdb_fildes_t typedef.
11036 [USE_WIN32API]: Include winsock2.h.
11037 (delete_file_handler, add_file_handler): Adjust prototypes.
11038 (pfildes): Declare.
11039 * utils.c (pfildes): New.
11040
854d88f0
PA
110412010-08-27 Pedro Alves <pedro@codesourcery.com>
11042
11043 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11044 * configure: Regenerate.
11045
0146f85b
PA
110462010-08-27 Pedro Alves <pedro@codesourcery.com>
11047
11048 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11049 (linux_done_accessing_memory): ... this.
11050 (linux_target_ops): Adjust.
11051 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11052 * nto-low.c (nto_target_ops): Adjust comment.
11053 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11054 * spu-low.c (spu_target_ops): Adjust comment.
11055 * target.h (target_ops): Rename unprepare_to_access_memory field
11056 to done_accessing_memory.
11057 (unprepare_to_access_memory): Rename to ...
11058 (done_accessing_memory): ... this.
11059
90d74c30
PA
110602010-08-26 Pedro Alves <pedro@codesourcery.com>
11061
11062 * linux-low.c (linux_prepare_to_access_memory): New.
11063 (linux_unprepare_to_access_memory): New.
11064 (linux_target_ops): Install them.
11065 * server.c (read_memory): Rename to ...
11066 (gdb_read_memory): ... this. Use
11067 prepare_to_access_memory/prepare_to_access_memory.
11068 (write_memory): Rename to ...
11069 (gdb_write_memory): ... this. Use
11070 prepare_to_access_memory/prepare_to_access_memory.
11071 (handle_search_memory_1): Adjust.
11072 (process_serial_event): Adjust.
11073 * target.h (struct target_ops): New fields
11074 prepare_to_access_memory and unprepare_to_access_memory.
11075 (prepare_to_access_memory, unprepare_to_access_memory): New.
11076 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11077 prepare_to_access_memory/prepare_to_access_memory.
11078 * nto-low.c (nto_target_ops): Adjust.
11079 * spu-low.c (spu_target_ops): Adjust.
11080 * win32-low.c (win32_target_ops): Adjust.
11081
fd467969
PA
110822010-08-26 Pedro Alves <pedro@codesourcery.com>
11083
11084 * Makefile.in (WARN_CFLAGS): Get it from configure.
11085 (WERROR_CFLAGS): New.
11086 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11087 * configure.ac: Introduce --enable-werror, which adds -Werror to
11088 the compiler command line. Enabled by default. Disable with
11089 --disable-werror. Add -Wdeclaration-after-statement
11090 Wpointer-arith and -Wformat-nonliteral to warning flags.
11091 * configure: Regenerate.
11092
331e2f5f
PA
110932010-08-26 Pedro Alves <pedro@codesourcery.com>
11094
11095 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11096
e581f2b4
PA
110972010-08-26 Pedro Alves <pedro@codesourcery.com>
11098
11099 * gdbreplay.c (remote_error): New.
11100 (gdbchar): New.
11101 (expect): Use gdbchar. Check for error reading from GDB.
11102 Clarify sync error output.
11103 (play): Check for errors writing to GDB.
11104 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11105 * remote-utils.c (getpkt): Check for errors writing to the remote
11106 descriptor.
11107
3c11dd79
PA
111082010-08-25 Pedro Alves <pedro@codesourcery.com>
11109
11110 * linux-low.c (linux_wait_1): Move non-debugging code out of
11111 `debug_threads' control.
11112
d20a8ad9
PA
111132010-08-25 Pedro Alves <pedro@codesourcery.com>
11114
11115 * linux-low.c (linux_wait_1): Don't set last_status here.
11116 * server.c (push_event, queue_stop_reply_callback): Assert we're
11117 not pushing a TARGET_WAITKIND_IGNORE event.
11118 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11119 (myresume, handle_target_event): Set the thread's last_resume_kind
11120 and last_status from the target returned status.
11121
964e4306
PA
111222010-08-25 Pedro Alves <pedro@codesourcery.com>
11123
11124 PR threads/10729
11125
11126 * linux-x86-low.c (update_debug_registers_callback): New.
11127 (i386_dr_low_set_addr): Use it.
11128 (i386_dr_low_get_addr): New.
11129 (i386_dr_low_set_control): Use update_debug_registers_callback.
11130 (i386_dr_low_get_control): New.
11131 (i386_dr_low_get_status): Adjust.
11132 * linux-low.c (linux_stop_lwp): New.
11133 * linux-low.h (linux_stop_lwp): Declare.
11134
11135 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11136 argument instead of a i386_debug_reg_state.
11137 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11138 a i386_debug_reg_state.
11139 (i386_insert_aligned_watchpoint): Adjust.
11140 (i386_remove_aligned_watchpoint): Adjust.
11141 (i386_low_stopped_data_address): Read the debug registers from the
11142 inferior instead of from the mirrors.
11143 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11144 (i386_dr_low_get_addr): Declare.
11145 (i386_dr_low_get_control): Declare.
11146 (i386_dr_low_get_status): Change prototype.
11147
11148 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11149 (i386_dr_low_get_addr): New.
11150 (i386_dr_low_get_control): New.
11151 (i386_dr_low_get_status): Adjust prototype. Return
11152 dr_status_mirror.
11153 (i386_initial_stuff): Clear dr_status_mirror and
11154 dr_control_mirror.
11155 (i386_get_thread_context): Adjust.
11156 (i386_set_thread_context): Adjust.
11157 (i386_thread_added): Adjust.
11158
5f21a75b
PA
111592010-08-24 Pedro Alves <pedro@codesourcery.com>
11160
11161 * linux-low.h (linux_thread_area): Delete declaration.
11162
3e4c1235
TS
111632010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11164
11165 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11166 after its termination.
11167
1971b033
PA
111682010-08-09 Pedro Alves <pedro@codesourcery.com>
11169
11170 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11171 (gdb_wants_all_stopped): Delete.
11172 (linux_wait_1): Don't call them.
11173 * server.c (handle_v_cont): Tag all threads as want-stopped.
11174 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11175 stopped as "client-wants-stopped".
11176
310444ac
PA
111772010-07-31 Pedro Alves <pedro@codesourcery.com>
11178
11179 * Makefile.in (signals_h): New.
11180 (server_h): Depend on it.
11181 (server.o): Don't depend on $(signals_def).
11182 (signals.o): Depend on $(signals_def).
11183
a19cae16
JK
111842010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11185
11186 * Makefile.in (signals_def): New.
11187 (server_h): Append include/gdb/signals.h and signals_def.
11188 (server.o): Append signals_def.
11189
30d50328
JK
111902010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11191
11192 * server.c (handle_target_event): Use target_signal_to_host for
11193 resume_info.sig initialization.
11194 * target.h (struct thread_resume) <sig>: New comment.
11195
5c3216e2
OS
111962010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11197
c6f46ca0
OS
11198 * server.c (handle_query): strcpy() the returned string from paddress()
11199 instead of sprintf().
5c3216e2
OS
11200 * utils.c (paddress): Return phex_nz().
11201
6bd31874
JB
112022010-07-07 Joel Brobecker <brobecker@adacore.com>
11203
11204 * server.c (handle_v_cont): Call mourn_inferior if process
11205 just exited.
11206 (myresume): Likewise.
11207
0fb4aa4b
PA
112082010-07-01 Pedro Alves <pedro@codesourcery.com>
11209
11210 Static tracepoints, and integration with UST.
11211
11212 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11213 * mem-break.c (uninsert_all_breakpoints)
11214 (reinsert_all_breakpoints): New.
11215 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11216 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11217 (gdb_agent_ust_loaded, helper_thread_id)
11218 (gdb_agent_helper_thread_id): New macros.
11219 (struct ipa_sym_addresses): Add addr_ust_loaded,
11220 addr_helper_thread_id, addr_cmd_buf.
11221 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11222 (in_process_agent_loaded_ust): New.
11223 (write_e_ust_not_loaded): New.
11224 (maybe_write_ipa_ust_not_loaded): New.
11225 (struct collect_static_trace_data_action): New.
11226 (enum tracepoint_type) <static_tracepoint>: New.
11227 (struct tracepoint) <handle>: Mention static tracepoints.
11228 (struct static_tracepoint_ctx): New.
11229 (CMD_BUF_SIZE): New.
11230 (add_tracepoint_action): Handle static tracepoint actions.
11231 (unprobe_marker_at): New.
11232 (clear_installed_tracepoints): Handle static tracepoints.
11233 (cmd_qtdp): Handle static tracepoints.
11234 (probe_marker_at): New.
11235 (cmd_qtstart): Handle static tracepoints.
11236 (response_tracepoint): Handle static tracepoints.
11237 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11238 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11239 (get_context_regcache): Handle static tracepoints.
11240 (do_action_at_tracepoint): Handle static tracepoint actions.
11241 (traceframe_find_block_type): Handle static trace data blocks.
11242 (traceframe_read_sdata): New.
11243 (download_tracepoints): Download static tracepoint actions.
11244 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11245 (GDB_PROBE_NAME): New.
11246 (ust_ops): New.
11247 (GET_UST_SYM): New.
11248 (USTF): New.
11249 (dlsym_ust): New.
11250 (ust_marker_to_static_tracepoint): New.
11251 (gdb_probe): New.
11252 (collect_ust_data_at_tracepoint): New.
11253 (gdb_ust_probe): New.
11254 (UNIX_PATH_MAX, SOCK_DIR): New.
11255 (gdb_ust_connect_sync_socket): New.
11256 (resume_thread, stop_thread): New.
11257 (run_inferior_command): New.
11258 (init_named_socket): New.
11259 (gdb_ust_socket_init): New.
11260 (cstr_to_hexstr): New.
11261 (next_st): New.
11262 (first_marker, next_marker): New.
11263 (response_ust_marker): New.
11264 (cmd_qtfstm, cmd_qtsstm): New.
11265 (unprobe_marker_at, probe_marker_at): New.
11266 (cmd_qtstmat, gdb_ust_thread): New.
11267 (gdb_ust_init): New.
11268 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11269 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11270 (ST_REGENTRY): New.
11271 (x86_64_st_collect_regmap): New.
11272 (X86_64_NUM_ST_COLLECT_GREGS): New.
11273 (AMD64_RIP_REGNUM): New.
11274 (supply_static_tracepoint_registers): New.
11275 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11276 (ST_REGENTRY): New.
11277 (i386_st_collect_regmap): New.
11278 (i386_NUM_ST_COLLECT_GREGS): New.
11279 (supply_static_tracepoint_registers): New.
11280 * server.c (handle_query): Handle qXfer:statictrace:read.
11281 <qSupported>: Report support for StaticTracepoints, and
11282 qXfer:statictrace:read features.
11283 * server.h (traceframe_read_sdata)
11284 (supply_static_tracepoint_registers): Declare.
11285 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11286 (unpack_varlen_hex): Include in IPA build.
11287 * Makefile.in (ustlibs, ustinc): New.
11288 (IPA_OBJS): Add remote-utils-ipa.o.
11289 ($(IPA_LIB)): Link -ldl and -lpthread.
11290 (UST_CFLAGS): New.
11291 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11292 * config.in, configure: Regenerate.
11293
9e4344e5
PA
112942010-06-20 Ian Lance Taylor <iant@google.com>
11295 Pedro Alves <pedro@codesourcery.com>
11296
11297 * linux-x86-low.c (always_true): Delete.
11298 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11299 trying to fool the compiler with always_true.
11300
c6beb2cb
PA
113012010-06-20 Pedro Alves <pedro@codesourcery.com>
11302
11303 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11304 conditions in gdbserver.
11305
d2ed6730
UW
113062010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11307
11308 * spu-low.c (spu_read_memory): Wrap around local store limit.
11309 (spu_write_memory): Likewise.
11310
4e29fb54
PA
113112010-06-15 Pedro Alves <pedro@codesourcery.com>
11312
11313 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11314 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11315 LONGEST uses.
11316 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11317 uses.
11318 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11319 uses with LONGEST uses.
11320
6a271cae
PA
113212010-06-14 Stan Shebs <stan@codesourcery.com>
11322 Pedro Alves <pedro@codesourcery.com>
11323
11324 Bytecode compiler.
11325
11326 * linux-x86-low.c: Include limits.h.
11327 (add_insns): New.
11328 (always_true): New.
11329 (EMIT_ASM): New.
11330 (EMIT_ASM32): New.
11331 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11332 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11333 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11334 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11335 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11336 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11337 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11338 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11339 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11340 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11341 (amd64_emit_void_call_2): New.
11342 (amd64_emit_ops): New.
11343 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11344 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11345 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11346 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11347 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11348 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11349 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11350 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11351 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11352 (i386_emit_stack_adjust, i386_emit_int_call_1)
11353 (i386_emit_void_call_2): New.
11354 (i386_emit_ops): New.
11355 (x86_emit_ops): New.
11356 (the_low_target): Install x86_emit_ops.
11357 * server.h (struct emit_ops): New.
11358 (get_raw_reg_func_addr): Declare.
11359 (current_insn_ptr, emit_error): Declare.
11360 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11361 (set_trace_state_variable_value): New defines.
11362 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11363 addr_get_trace_state_variable_value and
11364 addr_set_trace_state_variable_value.
11365 (symbol_list): New fields for get_raw_reg,
11366 get_trace_state_variable_value and set_trace_state_variable_value.
11367 (condfn): New typedef.
11368 (struct tracepoint): New field `compiled_cond'.
11369 (do_action_at_tracepoint): Clear compiled_cond.
11370 (get_trace_state_variable_value, set_trace_state_variable_value):
11371 Export in the IPA.
11372 (condition_true_at_tracepoint): If there's a compiled condition,
11373 run that.
11374 (current_insn_ptr, emit_error): New globals.
11375 (struct bytecode_address): New.
11376 (get_raw_reg_func_addr): New.
11377 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11378 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11379 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11380 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11381 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11382 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11383 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11384 (compile_tracepoint_condition, compile_bytecodes): New.
11385 * target.h (emit_ops): Forward declare.
11386 (struct target_ops): New field emit_ops.
11387 (target_emit_ops): New.
11388 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11389 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11390 * linux-low.c (linux_emit_ops): New.
11391 (linux_target_ops): Install it.
11392 * linux-low.h (struct linux_target_ops): New field emit_ops.
11393
92b72907
UW
113942010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11395
11396 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11397 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11398
fa593d66
PA
113992010-06-01 Pedro Alves <pedro@codesourcery.com>
11400 Stan Shebs <stan@codesourcery.com>
11401
11402 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11403 (all): Depend on $(extra_libraries).
11404 (install-only): Install the IPA.
11405 (IPA_OBJS, IPA_LIB): New.
11406 (clean): Remove the IPA lib.
11407 (IPAGENT_CFLAGS): New.
11408 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11409 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11410 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11411 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11412 * configure.ac: Check for atomic builtins support in the compiler.
11413 (IPA_DEPFILES, extra_libraries): Define.
11414 * configure.srv (ipa_obj): Add description.
11415 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11416 (i[34567]86-*-linux*): Set ipa_obj.
11417 (x86_64-*-linux*): Set ipa_obj.
11418 * linux-low.c (stabilizing_threads): New.
11419 (supports_fast_tracepoints): New.
11420 (linux_detach): Stabilize threads before detaching.
11421 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11422 the lwp is either not stabilizing, or is moving out of a jump pad.
11423 (linux_fast_tracepoint_collecting): New.
11424 (maybe_move_out_of_jump_pad): New.
11425 (enqueue_one_deferred_signal): New.
11426 (dequeue_one_deferred_signal): New.
11427 (linux_wait_for_event_1): If moving out of a jump pad, defer
11428 pending signals to later.
11429 (linux_stabilize_threads): New.
11430 (linux_wait_1): Check if threads need moving out of jump pads, and
11431 do it if so.
11432 (stuck_in_jump_pad_callback): New.
11433 (move_out_of_jump_pad_callback): New.
11434 (lwp_running): New.
11435 (linux_resume_one_lwp): Handle moving out of jump pads.
11436 (linux_set_resume_request): Dequeue deferred signals.
11437 (need_step_over_p): Also step over fast tracepoint jumps.
11438 (start_step_over): Also uninsert fast tracepoint jumps.
11439 (finish_step_over): Also reinsert fast tracepoint jumps.
11440 (linux_install_fast_tracepoint_jump): New.
11441 (linux_target_ops): Install linux_stabilize_threads and
11442 linux_install_fast_tracepoint_jump_pad.
11443 * linux-low.h (linux_target_ops) <get_thread_area,
11444 install_fast_tracepoint_jump_pad>: New fields.
11445 (struct lwp_info) <collecting_fast_tracepoint,
11446 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11447 (linux_get_thread_area): Declare.
11448 * linux-x86-low.c (jump_insn): New.
11449 (x86_get_thread_area): New.
11450 (append_insns): New.
11451 (push_opcode): New.
11452 (amd64_install_fast_tracepoint_jump_pad): New.
11453 (i386_install_fast_tracepoint_jump_pad): New.
11454 (x86_install_fast_tracepoint_jump_pad): New.
11455 (the_low_target): Install x86_get_thread_area and
11456 x86_install_fast_tracepoint_jump_pad.
11457 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11458 (struct fast_tracepoint_jump): New.
11459 (fast_tracepoint_jump_insn): New.
11460 (fast_tracepoint_jump_shadow): New.
11461 (find_fast_tracepoint_jump_at): New.
11462 (fast_tracepoint_jump_here): New.
11463 (delete_fast_tracepoint_jump): New.
11464 (set_fast_tracepoint_jump): New.
11465 (uninsert_fast_tracepoint_jumps_at): New.
11466 (reinsert_fast_tracepoint_jumps_at): New.
11467 (set_breakpoint_at): Use write_inferior_memory.
11468 (uninsert_raw_breakpoint): Use write_inferior_memory.
11469 (check_mem_read): Mask out fast tracepoint jumps.
11470 (check_mem_write): Mask out fast tracepoint jumps.
11471 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11472 (set_fast_tracepoint_jump): Declare.
11473 (delete_fast_tracepoint_jump)
11474 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11475 (reinsert_fast_tracepoint_jumps_at): Declare.
11476 * regcache.c: Don't compile many functions when building the
11477 in-process agent library.
11478 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11479 the register buffer in the heap.
11480 (free_register_cache): If the register buffer isn't owned by the
11481 regcache, don't free it.
11482 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11483 pre-existing register caches.
11484 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11485 type.
11486 (convert_ascii_to_int): : Constify `from' parameter type.
11487 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11488 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11489 the needed buffer in-place.
11490 (relocate_instruction): New.
11491 * server.c (handle_query) <qSymbols>: If the target supports
11492 tracepoints, give it a chance of looking up symbols. Report
11493 support for fast tracepoints.
11494 (handle_status): Stabilize threads.
11495 (process_serial_event): Adjust.
11496 * server.h (struct fast_tracepoint_jump): Forward declare.
11497 (struct process_info) <fast_tracepoint_jumps>: New field.
11498 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11499 (decode_X_packet, decode_M_packet): Adjust.
11500 (relocate_instruction): Declare.
11501 (in_process_agent_loaded): Declare.
11502 (tracepoint_look_up_symbols): Declare.
11503 (struct fast_tpoint_collect_status): Declare.
11504 (fast_tracepoint_collecting): Declare.
11505 (force_unlock_trace_buffer): Declare.
11506 (handle_tracepoint_bkpts): Declare.
11507 (initialize_low_tracepoint)
11508 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11509 * target.h (struct target_ops) <stabilize_threads,
11510 install_fast_tracepoint_jump_pad>: New fields.
11511 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11512 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11513 [HAVE_STDINT_H]: Include stdint.h.
11514 (trace_debug_1): Rename to ...
11515 (trace_vdebug): ... this.
11516 (trace_debug): Rename to ...
11517 (trace_debug_1): ... this. Add `level' parameter.
11518 (trace_debug): New.
11519 (ATTR_USED, ATTR_NOINLINE): New.
11520 (IP_AGENT_EXPORT): New.
11521 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11522 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11523 (about_to_request_buffer_space, trace_buffer_is_full)
11524 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11525 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11526 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11527 (traceframe_write_count, traceframes_created)
11528 (trace_state_variables)
11529 New renaming defines.
11530 (struct ipa_sym_addresses): New.
11531 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11532 (symbol_list): New.
11533 (ipa_sym_addrs): New.
11534 (all_tracepoint_symbols_looked_up): New.
11535 (in_process_agent_loaded): New.
11536 (write_e_ipa_not_loaded): New.
11537 (maybe_write_ipa_not_loaded): New.
11538 (tracepoint_look_up_symbols): New.
11539 (debug_threads) [IN_PROCESS_AGENT]: New.
11540 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11541 (UNKNOWN_SIDE_EFFECTS): New.
11542 (stop_tracing): New.
11543 (flush_trace_buffer): New.
11544 (stop_tracing_bkpt): New.
11545 (flush_trace_buffer_bkpt): New.
11546 (read_inferior_integer): New.
11547 (read_inferior_uinteger): New.
11548 (read_inferior_data_pointer): New.
11549 (write_inferior_data_pointer): New.
11550 (write_inferior_integer): New.
11551 (write_inferior_uinteger): New.
11552 (struct collect_static_trace_data_action): Delete.
11553 (enum tracepoint_type): New.
11554 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11555 <actions_str, step_actions, step_actions_str>: Only include in
11556 GDBserver.
fa593d66
PA
11557 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11558 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11559 (tracepoints): Use IP_AGENT_EXPORT.
11560 (last_tracepoint): Don't include in the IPA.
11561 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11562 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11563 (alloced_trace_state_variables): New.
11564 (trace_state_variables): Use IP_AGENT_EXPORT.
11565 (traceframe_t): Delete unused variable.
11566 (circular_trace_buffer): Don't include in the IPA.
11567 (trace_buffer_start): Delete.
11568 (struct trace_buffer_control): New.
11569 (trace_buffer_free): Delete.
11570 (struct ipa_trace_buffer_control): New.
11571 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11572 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11573 New.
11574 (trace_buffer_ctrl): New.
11575 (TRACE_BUFFER_CTRL_CURR): New.
11576 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11577 Reimplement as macros.
11578 (trace_buffer_wrap): Delete.
11579 (traceframe_write_count, traceframe_read_count)
11580 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11581 (struct tracepoint_hit_ctx) <type>: New field.
11582 (struct fast_tracepoint_ctx): New.
11583 (memory_barrier): New.
11584 (cmpxchg): New.
11585 (record_tracepoint_error): Update atomically in the IPA.
11586 (clear_inferior_trace_buffer): New.
11587 (about_to_request_buffer_space): New.
11588 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11589 updating the same buffer.
11590 (add_tracepoint): Default the tracepoint's type to trap
11591 tracepoint, and orig_size to -1.
11592 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11593 internal variables.
11594 (create_trace_state_variable): New parameter `gdb'. Handle it.
11595 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11596 (cmd_qtdp): Handle fast tracepoints.
11597 (cmd_qtdv): Adjust.
11598 (max_jump_pad_size): New.
11599 (gdb_jump_pad_head): New.
11600 (get_jump_space_head): New.
11601 (claim_jump_space): New.
11602 (sort_tracepoints): New.
11603 (MAX_JUMP_SIZE): New.
11604 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11605 IPA.
11606 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11607 support. Upload fast traceframes, and delete internal IPA
11608 breakpoints.
11609 (stop_tracing_handler): New.
11610 (flush_trace_buffer_handler): New.
11611 (cmd_qtstop): Upload fast tracepoints.
11612 (response_tracepoint): Handle fast tracepoints.
11613 (tracepoint_finished_step): Upload fast traceframes. Set the
11614 tracepoint hit context's tracepoint type.
11615 (handle_tracepoint_bkpts): New.
11616 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11617 type. Add comment about fast tracepoints.
11618 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11619 non-existing action_str field.
11620 (get_context_regcache): Handle fast tracepoints.
11621 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11622 to the regcache.
11623 (fast_tracepoint_from_jump_pad_address): New.
11624 (fast_tracepoint_from_ipa_tpoint_address): New.
11625 (collecting_t): New.
11626 (force_unlock_trace_buffer): New.
11627 (fast_tracepoint_collecting): New.
11628 (collecting): New.
11629 (gdb_collect): New.
11630 (write_inferior_data_ptr): New.
11631 (target_tp_heap): New.
11632 (target_malloc): New.
11633 (download_agent_expr): New.
11634 (UALIGN): New.
11635 (download_tracepoints): New.
11636 (download_trace_state_variables): New.
11637 (upload_fast_traceframes): New.
11638 (IPA_FIRST_TRACEFRAME): New.
11639 (IPA_NEXT_TRACEFRAME_1): New.
11640 (IPA_NEXT_TRACEFRAME): New.
11641 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11642 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11643 (gdb_jump_pad_buffer_end): New.
11644 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11645 (initialize_tracepoint): Adjust.
11646 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11647 buffer. Initialize the low module.
11648 * utils.c (PREFIX, TOOLNAME): New.
11649 (malloc_failure): Use PREFIX.
11650 (error): In the IPA, an error causes an exit.
11651 (fatal, warning): Use PREFIX.
11652 (internal_error): Use TOOLNAME.
11653 (NUMCELLS): Increase to 10.
11654 * configure, config.in: Regenerate.
11655
d149dd1d
PA
116562010-06-01 Pedro Alves <pedro@codesourcery.com>
11657
11658 * server.c (handle_query) <qSupported>: Do two passes over the
11659 qSupported string to avoid nesting strtok.
11660
f6528abd
JK
116612010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11662
11663 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11664 (CDEPS): New.
11665 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11666 -Wl,--dynamic-list.
11667 * configure: Regenerate.
11668 * proc-service.list: New.
11669
ca2a87a0
JK
116702010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11671
11672 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11673 New comment.
11674
363a6e9f
OS
116752010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11676
11677 * gdbreplay.c (remote_open): Check error return from socket() call by
11678 its equality to -1 not by it being negative.
11679 * remote-utils.c (remote_open): Likewise.
11680
d23b6cb1
PA
116812010-05-23 Pedro Alves <pedro@codesourcery.com>
11682
11683 * config.h: Regenerate.
11684
28d3cf85
MK
116852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11686
11687 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11688 doesn't provide PTRACE_GET_THREAD_AREA.
11689
fea36a59
MK
116902010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11691
11692 * linux-m68k-low.c: Include <asm/ptrace.h>
11693 (ps_get_thread_area): Implement.
11694
24b066ba
DE
116952010-05-03 Doug Evans <dje@google.com>
11696
11697 * event-loop.c (struct callback_event): New struct.
11698 (callback_list): New global.
11699 (append_callback_event, delete_callback_event): New functions.
11700 (process_callback): New function.
11701 (start_event_loop): Call it.
11702 * remote-utils.c (NOT_SCHEDULED): Define.
11703 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11704 moved out of readchar.
11705 (readchar): Rewrite. Call reschedule before returning.
11706 (reset_readchar): New function.
11707 (remote_close): Call it.
11708 (process_remaining, reschedule): New functions.
11709 * server.h (callback_handler_func): New typedef.
11710 (append_callback_event, delete_callback_event): Declare.
11711
9836d6ea
PA
117122010-05-03 Pedro Alves <pedro@codesourcery.com>
11713
11714 * proc-service.c (ps_pglobal_lookup): Use
11715 thread_db_look_up_one_symbol.
11716 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11717 parameter. Use it instead of all_symbols_looked_up.
11718 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11719 field.
11720 (all_symbols_looked_up): Don't declare.
11721 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11722 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11723 field.
11724 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11725 Set all_symbols_looked_up here.
11726 (thread_db_look_up_one_symbol): New.
11727 (thread_db_get_tls_address): Adjust.
11728 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11729 thread_db object on the heap, and tentatively set it in the
11730 process structure.
11731 (thread_db_init): Don't set all_symbols_looked_up here.
11732 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11733
7984d532
PA
117342010-05-03 Pedro Alves <pedro@codesourcery.com>
11735
11736 * linux-low.c (linux_kill, linux_detach): Adjust.
11737 (status_pending_p_callback): Remove redundant statement. Check
11738 for !TARGET_WAITIKIND_IGNORE, instead of
11739 TARGET_WAITKIND_STOPPED.
11740 (handle_tracepoints): Make sure LWP is locked. Adjust.
11741 (linux_wait_for_event_1): Adjust.
11742 (linux_cancel_breakpoints): New.
11743 (unsuspend_one_lwp): New.
11744 (unsuspend_all_lwps): New.
11745 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11746 (send_sigstop_callback): Change return type to int, add new
11747 `except' parameter and handle it.
11748 (suspend_and_send_sigstop_callback): New.
11749 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11750 pass them down. If SUSPEND, also increment the lwp's suspend
11751 count.
11752 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11753 (need_step_over_p): Don't consider suspended LWPs.
11754 (start_step_over): Adjust.
11755 (proceed_one_lwp): Change return type to int, add new `except'
11756 parameter and handle it.
11757 (unsuspend_and_proceed_one_lwp): New.
11758 (proceed_all_lwps): Use find_inferior instead of
11759 for_each_inferior.
11760 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11761 also decrement the suspend count of LWPs. Pass `except' down,
11762 instead of hacking its suspend count.
11763 (linux_pause_all): Add `freeze' parameter. Adjust.
11764 (linux_unpause_all): New.
11765 (linux_target_ops): Install linux_unpause_all.
11766 * server.c (handle_status): Adjust.
11767 * target.h (struct target_ops): New fields `unpause_all' and
11768 `cancel_breakpoints'. Add new parameter to `pause_all'.
11769 (pause_all): Add new `freeze' parameter.
11770 (unpause_all): New.
11771 (cancel_breakpoints): New.
11772 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11773 cancel breakpoints.
11774 (cmd_qtstart): Pause threads.
11775 (stop_tracing): Pause threads, and cancel breakpoints.
11776 * win32-low.c (win32_target_ops): Adjust.
11777
e471f25b
PA
117782010-05-03 Pedro Alves <pedro@codesourcery.com>
11779
11780 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11781 the inferior right away from here...
11782 (linux_wait_1): ... to here, and adjust to check the thread's
11783 last_resume_kind instead of the lwp's step or stop_expected flags.
11784
1915ef4f
PA
117852010-05-02 Pedro Alves <pedro@codesourcery.com>
11786
11787 * README: Use consistent `GDB' and `GDBserver' spellings.
11788
f9e39928
PA
117892010-05-02 Pedro Alves <pedro@codesourcery.com>
11790
11791 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11792 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11793 (linux_detach_one_lwp): Assume the lwp is stopped.
11794 (any_thread_of): Delete.
11795 (linux_detach): Stop all lwps here. Don't blindly delete all
11796 breakpoints.
11797 (delete_lwp_callback): New.
11798 (linux_mourn): Delete all lwps of the process that is gone.
11799 (linux_wait_1): Don't delete the last lwp of the process here.
11800 * mem-break.h (mark_breakpoints_out): Declare.
11801 * mem-break.c (mark_breakpoints_out): New.
11802 (free_all_breakpoints): Use it.
11803 * server.c (handle_target_event): If the process is gone, mark
11804 breakpoints out.
11805 * thread-db.c (struct thread_db) <create_bp>: New field.
11806 (thread_db_enable_reporting): Fix prototype. Store a thread event
11807 breakpoint reference in the thread_db struct.
11808 (thread_db_load_search): Clear the thread_db object.
11809 (try_thread_db_load_1): Ditto.
11810 (switch_to_process): New.
11811 (disable_thread_event_reporting): Use it.
11812 (remove_thread_event_breakpoints): New.
11813 (thread_db_detach, thread_db_mourn): Use it.
11814
1e7fc18c
PA
118152010-05-01 Pedro Alves <pedro@codesourcery.com>
11816
11817 * linux-low.c (linux_enable_event_reporting): New.
11818 (linux_wait_for_event_1, handle_extended_wait): Use it.
11819
02fc4de7
PA
118202010-04-30 Pedro Alves <pedro@codesourcery.com>
11821
11822 * linux-low.c (linux_kill_one_lwp, linux_kill)
11823 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11824 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11825 SIGSTOP even if the LWP is stopped.
11826 (send_sigstop_callback): New.
11827 (stop_all_lwps): Use send_sigstop_callback instead.
11828 (linux_resume_one_thread): Adjust.
11829 (proceed_one_lwp): Still proceed an LWP that the client has
11830 requested to stop, if we haven't reported it as stopped yet. Make
11831 sure that LWPs the client want stopped, have a pending SIGSTOP.
11832
bc3b5632
DE
118332010-04-26 Doug Evans <dje@google.com>
11834
ae1ada35
DE
11835 * server.c (handle_general_set): Make static.
11836
bc3b5632
DE
11837 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11838 Print received char after testing for error/eof instead of before.
11839 (input_interrupt): Tweak comment.
11840
65730243
DE
118412010-04-23 Doug Evans <dje@google.com>
11842
11843 * server.c (start_inferior): Print inferior argv if --debug.
11844
a8ae7dc0
AR
118452010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11846
11847 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11848 * nto-x86-low.c: Include server.h
11849
1c07cc19
PM
118502010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11851
11852 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11853 be consistent with other sources of this directory.
11854 (init_registers_amd64): Correct name of source file of this function
11855 in the comment.
11856
e0a61e09
PM
118572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11858
11859 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11860 64-bit executables.
11861
54709339
PM
118622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11863
11864 * win32-i386-low.c: Add 64-bit support.
11865 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11866 (init_registers_amd64): Declare.
11867 (mappings): Add 64-bit version of array.
11868 (init_windows_x86): New function.
11869 (the_low_target): Change init_arch field to init_windows_x86.
11870
e8f0053d
PM
118712010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11872
11873 * win32-low.c: Adapt to support also 64-bit architecture.
11874 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11875 (get_image_name): Use SIZE_T type for local variable `done'.
11876 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11877 (toolhelp_get_dll_name): Idem.
11878 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11879 Use uintptr_t typecast to avoid warning.
11880 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11881 (handle_exception): Use phex_nz to avoid warning.
11882 (win32_wait): Remove unused local variable `process'.
11883
c481e77e
PM
118842010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11885
11886 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11887 `amd64-avx.o'.
11888
12ea4b69
PM
118892010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11890
11891 * configure.ac: Use `ws2_32' library for srv_mingw.
11892 * configure: Regenerate.
11893 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11894 * remote-utils.c: Likewise.
11895
f6d1620c
L
118962010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11897
11898 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11899 if __x86_64__ is defined.
11900
8e642873
PM
119012010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11902
11903 * configure: Regenerate.
11904
711e434b
PM
119052010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11906
11907 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11908 * target.h (target_ops): New get_tib_address field.
11909 * win32-low.h (win32_thread_info): Add thread_local_base field.
11910 * win32-low.c (child_add_thread): Add tlb argument.
11911 Set thread_local_base field to TLB.
11912 (get_child_debug_event): Adapt to child_add_thread change.
11913 (win32_get_tib_address): New function.
11914 (win32_target_ops): Set get_tib_address field to
11915 win32_get_tib_address.
11916 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11917
505106cd
PA
119182010-04-12 Pedro Alves <pedro@codesourcery.com>
11919
505106cd
PA
11920 * linux-low.c (linux_mourn): Also remove the process.
11921 * server.c (handle_target_event): Don't remove the process here.
11922 * nto-low.c (nto_mourn): New.
11923 (nto_target_ops): Install it.
11924 * spu-low.c (spu_mourn): New.
11925 (spu_target_ops): Install it.
11926 * win32-low.c (win32_mourn): New.
11927 (win32_target_ops): Install it.
11928
e8470a06
PA
119292010-04-12 Pedro Alves <pedro@codesourcery.com>
11930
11931 * server.h (buffer_xml_printf): Remove redundant `;'.
11932
45ba0d02
PA
119332010-04-12 Pedro Alves <pedro@codesourcery.com>
11934
11935 * regcache.c (set_register_cache): Invalidate regcaches before
11936 changing the register cache layout.
11937 (regcache_invalidate_one): Allow a NULL regcache.
11938 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11939 regcaches before changing the register cache layout or the target
11940 regsets.
11941
59e04013
L
119422010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11943
11944 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11945 variable warning on Linux/x86-64.
11946
8336d594
PA
119472010-04-11 Pedro Alves <pedro@codesourcery.com>
11948
11949 GDBserver disconnected tracing support.
11950
11951 * linux-low.c (linux_remove_process): Delete.
11952 (add_lwp): Don't set last_resume_kind here.
11953 (linux_kill): Use `mourn'.
11954 (linux_detach): Use `thread_db_detach', and `mourn'.
11955 (linux_mourn): New.
11956 (linux_attach_lwp_1): Adjust comment.
11957 (linux_attach): last_resume_kind moved the thread_info; adjust.
11958 (status_pending_p_callback): Adjust.
11959 (linux_wait_for_event_1): Adjust.
11960 (count_events_callback, select_singlestep_lwp_callback)
11961 (select_event_lwp_callback, cancel_breakpoints_callback)
11962 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11963 (proceed_one_lwp): Adjust.
11964 (linux_async): Add debug output.
11965 (linux_thread_stopped): New.
11966 (linux_pause_all): New.
11967 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11968 linux_pause_all.
11969 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11970 (thread_db_free): Delete declaration.
11971 (thread_db_detach, thread_db_mourn): Declare.
11972 * thread-db.c (thread_db_init): Use thread_db_mourn.
11973 (thread_db_free): Delete, split in two.
11974 (disable_thread_event_reporting): New.
11975 (thread_db_detach): New.
11976 (thread_db_mourn): New.
11977
11978 * server.h (struct thread_info) <last_resume_kind>: New field.
11979 <attached>: Add comment.
11980 <gdb_detached>: New field.
11981 (handler_func): Change return type to int.
11982 (handle_serial_event, handle_target_event): Ditto.
11983 (gdb_connected): Declare.
11984 (tracing): Delete.
11985 (disconnected_tracing): Declare.
11986 (stop_tracing): Declare.
11987
11988 * server.c (handle_query) <qSupported>: Report support for
11989 disconnected tracing.
11990 (queue_stop_reply_callback): Account for running threads.
11991 (gdb_wants_thread_stopped): New.
11992 (gdb_wants_all_threads_stopped): New.
11993 (gdb_reattached_process): New.
11994 (handle_status): Clear the `gdb_detached' flag of all processes.
11995 In all-stop, stop all threads.
11996 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11997 (process_serial_event): If the remote connection breaks, or if an
11998 exit was forced with "monitor exit", force an event loop exit.
11999 Handle disconnected tracing on detach.
12000 (handle_serial_event): Adjust.
12001 (handle_target_event): If GDB isn't connected, forward events back
12002 to the inferior, unless the last process exited, in which case,
12003 exit gdbserver. Adjust interface.
12004
12005 * remote-utils.c (remote_open): Don't block in accept. Instead
12006 register an event loop source on the listen socket file
12007 descriptor. Refactor bits into ...
12008 (listen_desc): ... this new global.
12009 (gdb_connected): ... this new function.
12010 (enable_async_notification): ... this new function.
12011 (handle_accept_event): ... this new function.
12012 (remote_close): Clear remote_desc.
12013
12014 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12015
12016 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12017 New fields.
12018 (mourn_inferior): Define.
12019 (target_process_qsupported): Avoid the dangling else problem.
12020 (thread_stopped): Define.
12021 (pause_all): Define.
12022 (target_waitstatus_to_string): Declare.
12023 * target.c (target_waitstatus_to_string): New.
12024
12025 * tracepoint.c (tracing): Make extern.
12026 (disconnected_tracing): New.
12027 (stop_tracing): Make extern. Handle tracing stops due to GDB
12028 disconnecting.
12029 (cmd_qtdisconnected): New.
12030 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12031 (handle_tracepoint_general_set): Handle QTDisconnected.
12032
12033 * event-loop.c (event_handler_func): Change return type to int.
12034 (process_event): Bail out if the event handler wants the event
12035 loop to stop.
12036 (handle_file_event): Ditto.
12037 (start_event_loop): Bail out if the event handler wants the event
12038 loop to stop.
12039
12040 * nto-low.c (nto_target_ops): Adjust.
12041 * spu-low.c (spu_wait): Don't remove the process here.
12042 (spu_target_ops): Adjust.
12043 * win32-low.c (win32_wait): Don't remove the process here.
12044 (win32_target_ops): Adjust.
12045
5d267c4c
PA
120462010-04-11 Pedro Alves <pedro@codesourcery.com>
12047
12048 * regcache.c (realloc_register_cache): Invalidate inferior's
12049 regcache before recreating it.
12050
623ccd72
PA
120512010-04-09 Pedro Alves <pedro@codesourcery.com>
12052
12053 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12054
219f2f23
PA
120552010-04-09 Stan Shebs <stan@codesourcery.com>
12056 Pedro Alves <pedro@codesourcery.com>
12057
12058 * server.h (LONGEST): New.
12059 (struct thread_info) <while_stepping>: New field.
12060 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12061 Declare.
12062 (initialize_tracepoint, handle_tracepoint_general_set)
12063 (handle_tracepoint_query, tracepoint_finished_step)
12064 (tracepoint_was_hit, release_while_stepping_state_list):
12065 (current_traceframe): Declare.
12066 * server.c (handle_general_set): Handle tracepoint packets.
12067 (read_memory): New.
12068 (write_memory): New.
12069 (handle_search_memory_1): Use read_memory.
12070 (handle_query): Report support for conditional tracepoints, trace
12071 state variables, and tracepoint sources. Handle tracepoint
12072 queries.
12073 (main): Initialize the tracepoints module.
12074 (process_serial_event): Handle traceframe reads/writes.
12075
12076 * linux-low.c (handle_tracepoints): New.
12077 (linux_wait_1): Call it.
12078 (linux_resume_one_lwp): Handle while-stepping.
12079 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12080 (linux_target_ops): Install them.
12081 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12082 New field.
12083 * linux-x86-low.c (x86_supports_tracepoints): New.
12084 (the_low_target). Install it.
12085
12086 * mem-break.h (delete_breakpoint): Declare.
12087 * mem-break.c (delete_breakpoint): Make external.
12088
12089 * target.h (struct target_ops): Add `supports_tracepoints',
12090 `read_pc', and `write_pc' fields.
12091 (target_supports_tracepoints): Define.
12092 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12093 (phex_nz): New.
12094
12095 * regcache.h (struct regcache) <registers_owned>: New field.
12096 (init_register_cache, regcache_cpy): Declare.
12097 (regcache_read_pc, regcache_write_pc): Declare.
12098 (register_cache_size): Declare.
12099 (supply_regblock): Declare.
12100 * regcache.c (init_register_cache): New.
12101 (new_register_cache): Use it.
12102 (regcache_cpy): New.
12103 (register_cache_size): New.
12104 (supply_regblock): New.
12105 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 12106
219f2f23
PA
12107 * tracepoint.c: New.
12108
12109 * Makefile.in (OBS): Add tracepoint.o.
12110 (tracepoint.o): New rule.
12111
3a13a53b
L
121122010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12113
12114 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12115 (i386-mmx.o): New.
12116 (i386-mmx.c): Likewise.
12117 (i386-mmx-linux.o): Likewise.
12118 (i386-mmx-linux.c): Likewise.
12119
12120 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12121 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12122 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12123 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12124
12125 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12126 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12127 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12128
1570b33e
L
121292010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12130
12131 * Makefile.in (clean): Updated.
12132 (i386-avx.o): New.
12133 (i386-avx.c): Likewise.
12134 (i386-avx-linux.o): Likewise.
12135 (i386-avx-linux.c): Likewise.
12136 (amd64-avx.o): Likewise.
12137 (amd64-avx.c): Likewise.
12138 (amd64-avx-linux.o): Likewise.
12139 (amd64-avx-linux.c): Likewise.
12140
12141 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12142 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12143 (srv_amd64_regobj): Add amd64-avx.o.
12144 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12145 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12146 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12147 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12148 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12149 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12150 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12151
12152 * i387-fp.c: Include "i386-xstate.h".
12153 (i387_xsave): New.
12154 (i387_cache_to_xsave): Likewise.
12155 (i387_xsave_to_cache): Likewise.
12156 (x86_xcr0): Likewise.
12157
12158 * i387-fp.h (i387_cache_to_xsave): Likewise.
12159 (i387_xsave_to_cache): Likewise.
12160 (x86_xcr0): Likewise.
12161
12162 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12163 * linux-crisv32-low.c (target_regsets): Likewise.
12164 * linux-m68k-low.c (target_regsets): Likewise.
12165 * linux-mips-low.c (target_regsets): Likewise.
12166 * linux-ppc-low.c (target_regsets): Likewise.
12167 * linux-s390-low.c (target_regsets): Likewise.
12168 * linux-sh-low.c (target_regsets): Likewise.
12169 * linux-sparc-low.c (target_regsets): Likewise.
12170 * linux-xtensa-low.c (target_regsets): Likewise.
12171
12172 * linux-low.c: Include <sys/uio.h>.
12173 (regsets_fetch_inferior_registers): Support nt_type.
12174 (regsets_store_inferior_registers): Likewise.
12175 (linux_process_qsupported): New.
12176 (linux_target_ops): Add linux_process_qsupported.
12177
12178 * linux-low.h (regset_info): Add nt_type.
12179 (linux_target_ops): Add process_qsupported.
12180
12181 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12182 and <sys/uio.h>.
12183 (init_registers_i386_avx_linux): New.
12184 (init_registers_amd64_avx_linux): Likewise.
12185 (xmltarget_i386_linux_no_xml): Likewise.
12186 (xmltarget_amd64_linux_no_xml): Likewise.
12187 (PTRACE_GETREGSET): Likewise.
12188 (PTRACE_SETREGSET): Likewise.
12189 (x86_fill_xstateregset): Likewise.
12190 (x86_store_xstateregset): Likewise.
12191 (use_xml): Likewise.
12192 (x86_linux_update_xmltarget): Likewise.
12193 (x86_linux_process_qsupported): Likewise.
12194 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12195 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12196 init_registers_i386_linux here. Call
12197 x86_linux_update_xmltarget.
12198 (the_low_target): Add x86_linux_process_qsupported.
12199
12200 * server.c (handle_query): Call target_process_qsupported.
12201
12202 * target.h (target_ops): Add process_qsupported.
12203 (target_process_qsupported): New.
12204
fc7238bb
PA
122052010-04-03 Pedro Alves <pedro@codesourcery.com>
12206
12207 * inferiors.c (add_thread): Set last_status kind to
12208 TARGET_WAITKIND_IGNORE.
12209 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12210 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12211 (linux_wait_1): Move `thread' local definition to block that uses
12212 it. Don't NULL initialize `event_child'.
12213 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12214 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12215 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12216
bdabb078
PA
122172010-04-01 Pedro Alves <pedro@codesourcery.com>
12218
12219 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12220 an extended waitstatus, or by a watchpoint.
12221 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12222 thread was stepping or has been stopped by a watchpoint.
12223
d3bbe7a0
PA
122242010-04-01 Pedro Alves <pedro@codesourcery.com>
12225
12226 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12227 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12228 of another, then delete the previous, and validate all
12229 breakpoints.
12230 (validate_inserted_breakpoint): New.
12231 (delete_disabled_breakpoints): New.
12232 (validate_breakpoints): New.
12233 (check_mem_read): Validate breakpoints before trusting their
12234 shadow. Delete disabled breakpoints.
12235 (check_mem_write): Validate breakpoints before trusting they
12236 should be inserted. Delete disabled breakpoints.
12237 * mem-break.h (validate_breakpoints):
12238 * server.c (handle_query): Validate breakpoints when we see a
12239 qSymbol query.
12240
8b07ae33
PA
122412010-04-01 Pedro Alves <pedro@codesourcery.com>
12242
12243 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12244 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12245 if we could tell there's a GDB breakpoint at stop_pc.
12246 (need_step_over_p): Don't do a step over if we find a GDB
12247 breakpoint at the resume PC.
12248
12249 * mem-break.c (struct raw_breakpoint): New.
12250 (enum bkpt_type): New type `gdb_breakpoint'.
12251 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12252 fields. New field `raw'.
12253 (find_raw_breakpoint_at): New.
12254 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12255 breakpoint instead.
12256 (set_breakpoint_at): Adjust.
12257 (delete_raw_breakpoint): New.
12258 (release_breakpoint): New.
12259 (delete_breakpoint): Rename to...
12260 (delete_breakpoint_1): ... this. Add proc parameter. Use
12261 release_breakpoint. Return ENOENT.
12262 (delete_breakpoint): Reimplement.
12263 (find_breakpoint_at): Delete.
12264 (find_gdb_breakpoint_at): New.
12265 (delete_breakpoint_at): Delete.
12266 (set_gdb_breakpoint_at): New.
12267 (delete_gdb_breakpoint_at): New.
12268 (gdb_breakpoint_here): New.
12269 (set_reinsert_breakpoint): Use release_breakpoint.
12270 (uninsert_breakpoint): Rename to ...
12271 (uninsert_raw_breakpoint): ... this.
12272 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12273 (reinsert_raw_breakpoint): Change parameter type to
12274 raw_breakpoint.
12275 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12276 instead.
12277 (check_breakpoints): Adjust. Use release_breakpoint.
12278 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12279 (breakpoint_inserted_here): Ditto.
12280 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12281 Don't trust the breakpoint's shadow if it is not inserted.
12282 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12283 (delete_all_breakpoints): Adjust.
12284 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12285 use delete_breakpoint_1.
12286
12287 * mem-break.h (breakpoints_supported): Delete declaration.
12288 (set_gdb_breakpoint_at): Declare.
12289 (gdb_breakpoint_here): Declare.
12290 (delete_breakpoint_at): Delete.
12291 (delete_gdb_breakpoint_at): Declare.
12292
12293 * server.h (struct raw_breakpoint): Forward declare.
12294 (struct process_info): New field `raw_breakpoints'.
12295
12296 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12297 breakpoints.
12298
6bf5e0ba
PA
122992010-03-24 Pedro Alves <pedro@codesourcery.com>
12300
12301 * linux-low.c (status_pending_p_callback): Fix comment.
12302 (linux_wait_for_event_1): Move most of the internal breakpoint
12303 handling from here...
12304 (linux_wait_1): ... to here.
12305 (count_events_callback): New.
12306 (select_singlestep_lwp_callback): New.
12307 (select_event_lwp_callback): New.
12308 (cancel_breakpoints_callback): New.
12309 (select_event_lwp): New.
12310 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12311 priority to all LWPs that have had events that should be reported
12312 to the client. Cancel breakpoints when about to reporting the
12313 event to the client, not while stopping lwps. No longer cancel
12314 finished single-steps here.
12315 (cancel_finished_single_step): Delete.
12316 (cancel_finished_single_steps): Delete.
12317
414a389f
PA
123182010-03-24 Pedro Alves <pedro@codesourcery.com>
12319
12320 * mem-break.c (enum bkpt_type): New.
12321 (struct breakpoint): New field `type'.
12322 (set_breakpoint_at): Change return type to struct breakpoint
12323 pointer. Set type to `other_breakpoint' by default.
12324 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12325 in the breakpoint list.
12326 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12327 (reinsert_breakpoint): Rename to ...
12328 (reinsert_raw_breakpoint): ... this.
12329 (reinsert_breakpoints_at): Adjust.
12330 * mem-break.h (struct breakpoint): Declare.
12331 (set_breakpoint_at): Change return type to struct breakpoint
12332 pointer.
12333
2280c721
PA
123342010-03-24 Pedro Alves <pedro@codesourcery.com>
12335
12336 * server.c (handle_query): Assign, not compare.
12337
d50171e4
PA
123382010-03-24 Pedro Alves <pedro@codesourcery.com>
12339
12340 Teach linux gdbserver to step-over-breakpoints.
12341
12342 * linux-low.c (can_hardware_single_step): New.
12343 (supports_breakpoints): New.
12344 (handle_extended_wait): If stopping threads, read the stop pc of
12345 the new cloned LWP.
12346 (get_pc): New.
12347 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12348 low target doesn't support retrieving the PC.
12349 (add_lwp): Set last_resume_kind to resume_continue.
12350 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12351 (linux_attach): Don't clear stop_expected. Set the lwp's
12352 last_resume_kind to resume_stop.
12353 (linux_detach_one_lwp): Don't check for removed breakpoints.
12354 (check_removed_breakpoint): Delete.
12355 (status_pending_p): Rename to ...
12356 (status_pending_p_callback): ... this. Don't check for removed
12357 breakpoints. Don't consider threads that are stopped from GDB's
12358 perspective.
12359 (linux_wait_for_lwp): Always read the stop_pc here.
12360 (cancel_breakpoint): New.
12361 (step_over_bkpt): New global.
12362 (linux_wait_for_event_1): Implement stepping over breakpoints.
12363 (gdb_wants_lwp_stopped): New.
12364 (gdb_wants_all_stopped): New.
12365 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12366 single-step traps here. Store the thread's last reported target
12367 wait status.
12368 (send_sigstop): Don't clear stop_expected. Always set it,
12369 instead.
12370 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12371 (cancel_finished_single_step): New.
12372 (cancel_finished_single_steps): New.
12373 (wait_for_sigstop): Don't cancel finished single-step traps here.
12374 (linux_resume_one_lwp): Don't check for removed breakpoints.
12375 Don't set `step' on non-hardware step archs.
12376 (linux_set_resume_request): Ignore resume_stop requests if already
12377 stopping or stopped. Set the lwp's last_resume_kind.
12378 (resume_status_pending_p): Don't check for removed breakpoints.
12379 (need_step_over_p): New.
12380 (start_step_over): New.
12381 (finish_step_over): New.
12382 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12383 requests. Clear the thread's last reported target waitstatus.
12384 Don't use the `suspended' flag. Don't consider pending breakpoints.
12385 (linux_resume): Start a step-over if necessary.
12386 (proceed_one_lwp): New.
12387 (proceed_all_lwps): New.
12388 (unstop_all_lwps): New.
12389 * linux-low.h (struct lwp_info): Rewrite comment for the
12390 `suspended' flag. Add the `stop_pc' field. Delete the
12391 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12392 Add `'last_resume_kind' and `need_step_over' fields.
12393 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12394 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12395 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12396 (set_raw_breakpoint_at): New.
12397 (set_breakpoint_at): Rewrite to use it.
12398 (reinsert_breakpoint_handler): Delete.
12399 (set_reinsert_breakpoint): New.
12400 (reinsert_breakpoint_by_bp): Delete.
12401 (delete_reinsert_breakpoints): New.
12402 (uninsert_breakpoint): Rewrite.
12403 (uninsert_breakpoints_at): New.
12404 (reinsert_breakpoint): Rewrite.
12405 (reinsert_breakpoints_at): New.
12406 (check_breakpoints): Rewrite.
12407 (breakpoint_here): New.
12408 (breakpoint_inserted_here): New.
12409 (check_mem_read): Adjust.
12410 * mem-break.h (breakpoints_supported, breakpoint_here)
12411 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12412 (reinsert_breakpoint_by_bp): Delete declaration.
12413 (delete_reinsert_breakpoints): Declare.
12414 (reinsert_breakpoint): Delete declaration.
12415 (reinsert_breakpoints_at): Declare.
12416 (uninsert_breakpoint): Delete declaration.
12417 (uninsert_breakpoints_at): Declare.
12418 (check_breakpoints): Adjust prototype.
12419 * server.h: Adjust include order.
12420 (struct thread_info): Declare here. Add a `last_status' field.
12421
30ba68cb
MS
124222010-03-23 Michael Snyder <msnyder@vmware.com>
12423
12424 * server.c (crc32): New function.
12425 (handle_query): Add handling for 'qCRC:' request.
12426
b9a881c2
PA
124272010-03-23 Pedro Alves <pedro@codesourcery.com>
12428
12429 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12430 lwp had been stopped by a watchpoint.
12431
e92d13d5
PA
124322010-03-16 Pedro Alves <pedro@codesourcery.com>
12433
12434 * server.h (internal_error): Declare.
12435 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12436 * utils.c (internal_error): New function.
12437
64daa791
AS
124382010-03-15 Andreas Schwab <schwab@redhat.com>
12439
12440 * configure.srv: Fix typo setting srv_regobj.
12441
f52cd8cd
PA
124422010-03-15 Pedro Alves <pedro@codesourcery.com>
12443
12444 * linux-low.c (fetch_register): Avoid passing a non string literal
12445 format to `error'.
12446 (usr_store_inferior_registers): Ditto.
12447
93ae6fdc
PA
124482010-03-14 Pedro Alves <pedro@codesourcery.com>
12449
12450 * linux-low.c (linux_write_memory): Bail out early if peeking
12451 memory failed.
12452
c3adc08c
PA
124532010-03-14 Pedro Alves <pedro@codesourcery.com>
12454
12455 * linux-low.h (struct lwp_info): New fields
12456 `stopped_by_watchpoint' and `stopped_data_address'.
12457 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12458 here, and cache them in the lwp object.
12459 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12460 directly.
12461 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12462 field.
12463 (linux_stopped_by_watchpoint): Rewrite.
12464 (linux_stopped_data_address): Rewrite.
12465
bce522a2
PA
124662010-03-06 Simo Melenius <simo.melenius@iki.fi>
12467
12468 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12469 switching the current inferior, not before.
12470
90884b2b
L
124712010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12472
12473 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12474 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12475 i386-linux.c and amd64-linux.c.
12476 (reg-i386.o): Removed.
12477 (reg-i386.c): Likewise.
12478 (reg-i386-linux.o): Likewise.
12479 (reg-i386-linux.c): Likewise.
12480 (reg-x86-64.o): Likewise.
12481 (reg-x86-64.c): Likewise.
12482 (reg-x86-64-linux.o): Likewise.
12483 (reg-x86-64-linux.c): Likewise.
12484 (i386.o): New.
12485 (i386.c): Likewise.
12486 (i386-linux.o): Likewise.
12487 (i386-linux.c): Likewise.
12488 (amd64.o): Likewise.
12489 (amd64.c): Likewise.
12490 (amd64-linux.o): Likewise.
12491 (amd64-linux.c): Likewise.
12492
12493 * configure.srv (srv_i386_regobj): New.
12494 (srv_i386_linux_regobj): Likewise.
12495 (srv_amd64_regobj): Likewise.
12496 (srv_amd64_linux_regobj): Likewise.
12497 (srv_i386_32bit_xmlfiles): Likewise.
12498 (srv_i386_64bit_xmlfiles): Likewise.
12499 (srv_i386_xmlfiles): Likewise.
12500 (srv_amd64_xmlfiles): Likewise.
12501 (srv_i386_linux_xmlfiles): Likewise.
12502 (srv_amd64_linux_xmlfiles): Likewise.
12503 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12504 srv_xmlfiles to $srv_i386_xmlfiles.
12505 (i[34567]86-*-mingw32ce*): Likewise.
12506 (i[34567]86-*-mingw*): Likewise.
12507 (i[34567]86-*-nto*): Likewise.
12508 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12509 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12510 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12511 (x86_64-*-linux*): Likewise.
12512
12513 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12514 (init_registers_amd64_linux): New.
12515 (x86_arch_setup): Replace init_registers_x86_64_linux with
12516 init_registers_amd64_linux.
12517
193f13e6
MK
125182010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12519
12520 * configure.ac: Check for libdl. If it is not available link against
12521 static libthread_db.
12522 * configure: Regenerate.
12523
85d721b8
PA
125242010-02-22 Pedro Alves <pedro@codesourcery.com>
12525
12526 PR9605
12527
12528 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12529 handing a read watchpoint.
12530 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12531
6076632b
DE
125322010-02-12 Doug Evans <dje@google.com>
12533
12534 * linux-low.c (linux_supports_tracefork_flag): Document.
12535 (linux_look_up_symbols): Add comment.
12536
3327ccf7
L
125372010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12538
12539 * regcache.c (supply_register): Clear regcache if buf is NULL.
12540
0718675c 125412010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12542 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12543
12544 * inferiors.c (find_inferior): Add function documentation.
12545 (unloaded_dll): Handle the case where the unloaded dll has not
12546 been previously registered in the dll list.
12547
177321bd
DJ
125482010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12549
12550 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12551 (thumb2_breakpoint): New.
12552 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12553
2b009048
DJ
125542010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12555
12556 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12557 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12558 breakpoints.
12559
3be029c7
PA
125602010-01-21 Pedro Alves <pedro@codesourcery.com>
12561
12562 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12563
18f5de3b
JK
125642010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12565
12566 * linux-s390-low.c (s390_collect_ptrace_register)
12567 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12568
3743bb4f
DE
125692010-01-21 Doug Evans <dje@google.com>
12570
14ce3065
DE
12571 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12572 (PTRACE_ARG4_TYPE): New macro.
12573 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12574 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12575 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12576 (usr_store_inferior_registers): Ditto.
12577 (linux_read_memory, linux_write_memory): Ditto.
12578 (linux_test_for_tracefork): Ditto.
12579
3743bb4f
DE
12580 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12581 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12582
8b315be5
PA
125832010-01-21 Pedro Alves <pedro@codesourcery.com>
12584
12585 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12586 target.
12587
85492558
PA
125882010-01-21 Pedro Alves <pedro@codesourcery.com>
12589
12590 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12591 prototype to take a regcache. Adjust.
12592
442ea881
PA
125932010-01-20 Pedro Alves <pedro@codesourcery.com>
12594
12595 * regcache.h (struct thread_info): Forward declare.
12596 (struct regcache): New.
12597 (new_register_cache): Adjust prototype.
12598 (get_thread_regcache): Declare.
12599 (free_register_cache): Adjust prototype.
12600 (registers_to_string, registers_from_string): Ditto.
12601 (supply_register, supply_register_by_name, collect_register)
12602 (collect_register_as_string, collect_register_by_name): Ditto.
12603 * regcache.c (struct inferior_regcache_data): Delete.
12604 (get_regcache): Rename to ...
12605 (get_thread_regcache): ... this. Adjust. Switch inferior before
12606 fetching registers.
12607 (regcache_invalidate_one): Adjust.
12608 (regcache_invalidate): Fix prototype.
12609 (new_register_cache): Return the new register cache.
12610 (free_register_cache): Change prototype.
12611 (realloc_register_cache): Adjust.
12612 (registers_to_string): Change prototype to take a regcache. Adjust.
12613 (registers_from_string): Ditto.
12614 (register_data): Ditto.
12615 (supply_register): Ditto.
12616 (supply_register_by_name): Ditto.
12617 (collect_register): Ditto.
12618 (collect_register_as_string): Ditto.
12619 (collect_register_by_name): Ditto.
12620 * server.c (process_serial_event): Adjust.
12621 * linux-low.h (regset_fill_func, regset_store_func): Change
12622 prototype.
12623 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12624 Change prototype.
12625 * linux-low.c (get_stop_pc): Adjust.
12626 (check_removed_breakpoint): Adjust.
12627 (linux_wait_for_event): Adjust.
12628 (linux_resume_one_lwp): Adjust.
12629 (fetch_register): Add regcache parameter. Adjust.
12630 (usr_store_inferior_registers): Ditto.
12631 (regsets_fetch_inferior_registers): Ditto.
12632 (regsets_store_inferior_registers): Ditto.
12633 (linux_fetch_registers, linux_store_registers): Ditto.
12634 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12635 regcache. Adjust.
43aaf8b6
PA
12636 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12637 Ditto.
442ea881
PA
12638 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12639 prototype to take a regcache.
12640 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12641 * remote-utils.c (convert_ascii_to_int, outreg)
12642 (prepare_resume_reply): Change prototype to take a regcache.
12643 Adjust.
12644 * target.h (struct target_ops) <fetch_registers, store_registers>:
12645 Change prototype to take a regcache.
12646 (fetch_inferior_registers, store_inferior_registers): Change
12647 prototype to take a regcache. Adjust.
12648 * proc-service.c (ps_lgetregs): Adjust.
12649 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12650 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12651 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12652 take a regcache. Adjust.
12653 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12654 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12655 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12656 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12657 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12658 (cris_cannot_fetch_register):
12659 (cris_breakpoint_at): Change prototype to take a regcache.
12660 Adjust.
12661 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12662 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12663 to take a regcache. Adjust.
12664 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12665 Adjust.
12666 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12667 take a regcache. Adjust.
12668 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12669 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12670 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12671 * linux-mips-low.c (mips_get_pc):
12672 (mips_set_pc): Change prototype to take a regcache. Adjust.
12673 (mips_reinsert_addr): Adjust.
12674 (mips_collect_register): Change prototype to take a regcache.
12675 Adjust.
12676 (mips_supply_register):
12677 (mips_collect_register_32bit, mips_supply_register_32bit)
12678 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12679 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12680 * linux-ppc-low.c (ppc_supply_ptrace_register)
12681 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12682 (parse_spufs_run): Adjust.
12683 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12684 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12685 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12686 take a regcache. Adjust.
12687 * linux-s390-low.c (s390_collect_ptrace_register)
12688 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12689 (s390_set_pc): Change prototype to take a regcache. Adjust.
12690 (s390_arch_setup): Adjust.
12691 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12692 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12693 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12694 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12695 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12696 regcache. Adjust.
12697 (sparc_breakpoint_at): Adjust.
12698 * linux-xtensa-low.c (xtensa_fill_gregset):
12699 (xtensa_store_gregset):
12700 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12701 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12702 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12703 prototype to take a regcache. Adjust.
12704 * win32-arm-low.c (arm_fetch_inferior_register)
12705 (arm_store_inferior_register): Change prototype to take a
12706 regcache. Adjust.
12707 * win32-i386-low.c (i386_fetch_inferior_register)
12708 (i386_store_inferior_register): Change prototype to take a
12709 regcache. Adjust.
12710 * win32-low.c (child_fetch_inferior_registers)
12711 (child_store_inferior_registers): Change prototype to take a
12712 regcache. Adjust.
12713 (win32_wait): Adjust.
12714 (win32_fetch_inferior_registers): Change prototype to take a
12715 regcache. Adjust.
12716 (win32_store_inferior_registers): Adjust.
12717 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12718 store_inferior_register>: Change prototype to take a regcache.
12719
60c3d7b0
DE
127202010-01-20 Doug Evans <dje@google.com>
12721
12722 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12723 #ifdef.
12724 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12725 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12726
dc146f7c
VP
127272010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12728
12729 * linux-low.c (linux_core_of_thread): New.
12730 (compare_ints, show_process, list_threads): New.
12731 (linux_qxfer_osdata): Report threads and cores.
12732 (linux_target_op): Register linux_core_of_thread.
12733 * remote-utils.c (prepare_resume_reply): Report the core.
12734 (buffer_xml_printf): Support %d specifier.
12735 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12736 New.
12737 (handle_query): Handle qXfer:threads. Announce availability
12738 thereof.
12739 * target.h (struct target_ops): New field core_of_thread.
12740
7803799a
UW
127412010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12742
12743 * Makefile.in (clean): Remove new generated files.
12744 (reg-s390.o, reg-s390.c): Remove rules.
12745 (reg-s390x.o, reg-s390x.c): Likewise.
12746 (s390-linux32.o, s390-linux32.c): Add rules.
12747 (s390-linux64.o, s390-linux64.c): Likewise.
12748 (s390x-linux64.o, s390x-linux64.c): Likewise.
12749 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12750 * linux-s390-low.c: Include <elf.h>.
12751 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12752 (init_registers_s390): Remove prototype.
12753 (init_registers_s390x): Likewise.
12754 (init_registers_s390_linux32): Add prototype.
12755 (init_registers_s390_linux64): Likewise.
12756 (init_registers_s390x_linux64): Likewise.
12757 (s390_num_regs_3264): New define.
12758 (s390_regmap_3264): New global variable.
12759 (s390_cannot_fetch_register): Remove obsolete check.
12760 (s390_cannot_store_register): Likewise.
12761 (s390_collect_ptrace_register): Handle upper/lower register halves.
12762 (s390_supply_ptrace_register): Likewise.
12763 (s390_fill_gregset): Update to register number changes.
12764 (s390_get_hwcap): New routine.
12765 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12766 Install appropriate regmap and register set.
12767
6e7ffa39
JB
127682010-01-01 Joel Brobecker <brobecker@adacore.com>
12769
12770 * server.c (gdbserver_version): Update copyright year to 2010.
12771 * gdbreplay.c (gdbreplay_version): Likewise.
12772
957f3f49
DE
127732009-12-28 Doug Evans <dje@google.com>
12774
12775 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12776 elf/external.h. Include <elf.h> instead but only if necessary.
12777
ca5c370d
PA
127782009-12-28 Pedro Alves <pedro@codesourcery.com>
12779
12780 * linux-low.c (linux_remove_process): Remove `detaching'
12781 parameter. Don't release/detach from thread_db here.
12782 (linux_kill): Release/detach from thread_db here, ...
12783 (linux_detach): ... and here, before actually detaching.
12784 (linux_wait_1): ... and here, when a process exits.
12785 * thread-db.c (any_thread_of): New.
12786 (thread_db_free): Switch the current inferior to a thread of the
12787 passed in process.
12788
4ee62156
DE
127892009-12-21 Doug Evans <dje@google.com>
12790
d90e6a88
DE
12791 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12792
c5f62d5f
DE
12793 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12794 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12795 warning ifndef __NR_tkill. Move setting of errno there too.
12796 Delete unnecessary resetting of errno after syscall.
12797 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12798
10e86dd7
DE
12799 * configure.ac: Check for dladdr.
12800 * config.in: Regenerate.
12801 * configure: Regenerate.
12802 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12803 (try_thread_db_load): Update.
12804
4ee62156
DE
12805 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12806
00f515da
DE
128072009-12-18 Doug Evans <dje@google.com>
12808
e9464885
DE
12809 * event-loop.c: Include unistd.h if it exists.
12810
07d4f67e
DE
12811 * linux-low.c (my_waitpid): Move definition away from being in
12812 between linux_tracefork_child/linux_test_for_tracefork.
12813
00f515da
DE
12814 * gdb_proc_service.h (psaddr_t): Fix type.
12815 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12816 signature to match glibc.
12817
1de1badb
DE
128182009-12-16 Doug Evans <dje@google.com>
12819
12820 * linux-low.c (linux_read_memory): Fix argument to read.
12821
aeeb81d1
PA
128222009-11-26 Pedro Alves <pedro@codesourcery.com>
12823
12824 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12825 events, don't leave current_inferior pointing at null.
12826
10357975
PA
128272009-11-26 Pedro Alves <pedro@codesourcery.com>
12828
12829 * win32-low.c (LOG): Delete.
12830 (OUTMSG): Output to stderr.
12831 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12832 on compile time LOG macro.
12833 (win32_wait): Fix debug output.
12834
cf6e3471
PA
128352009-11-26 Pedro Alves <pedro@codesourcery.com>
12836
12837 * win32-low.c (win32_add_one_solib): If the dll name is
12838 "ntdll.dll", prepend the system directory to the dll path.
12839
0c85e18e
MK
128402009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12841
12842 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12843
9ac544ce 128442009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12845 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12846
12847 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12848 * configure.ac: Check for __mcoldfire__ and set
12849 gdb_cv_m68k_is_coldfire.
12850 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12851 reg-cf.o and reg-m68k.o.
12852 * configure: Regenerated.
12853
fd7dd3e6
PA
128542009-11-16 Pedro Alves <pedro@codesourcery.com>
12855
12856 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12857 Pass it to thread_db_free.
12858 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12859 proper `detaching' argument to linux_remove_process.
12860 * linux-low.h (thread_db_free): Add `detaching' parameter.
12861 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12862 to thread_db_free.
12863 (thread_db_free): Add `detaching' parameter. Only
12864 call td_ta_clear_event if detaching from process.
12865
75aa492e
MK
128662009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12867
12868 * thread-db.c (thread_db_free): Fix typo.
12869
21e1bee4
PP
128702009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12871
12872 PR gdb/10838
12873 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12874
8838b45e
NS
128752009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12876
12877 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12878 with an i686 compiler.
12879 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12880 needed.
12881 * configure: Rebuilt.
12882
8a35fb51
SL
128832009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12884
12885 PR gdb/10783
12886
12887 * server.c (handle_search_memory_1): Correct read_addr initialization
12888 in loop for searching subsequent chunks.
12889
96f15937
PP
128902009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12891
12892 * configure.ac: New --with-libthread-db option.
12893 * thread-db.c: Allow direct dependence on libthread_db.
12894 (thread_db_free): Adjust.
12895 * config.in: Regenerate.
12896 * configure: Likewise.
889bf7c5 12897
5f7d1694
PP
128982009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12899
12900 PR gdb/10757
12901 * thread-db.c (attach_thread): New function.
12902 (maybe_attach_thread): Return success/failure.
12903 (find_new_threads_callback): Adjust.
889bf7c5
PA
12904 (thread_db_find_new_threads): Loop until no new threads.
12905
88e3b899
PA
129062009-10-13 Pedro Alves <pedro@codesourcery.com>
12907
12908 * proc-service.c (ps_lgetregs): Formatting.
12909
cdbfd419
PP
129102009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12911
12912 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12913 * configure.ac: Adjust.
12914 * linux-low.h (struct process_info_private): Move members to struct
12915 thread_db.
12916 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12917 * linux-low.c (linux_remove_process): Adjust.
12918 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12919 * server.c (handle_query): Move code ...
12920 (handle_monitor_command): ... here. New function.
12921 * target.h (struct target_ops): New member.
12922 * thread-db.c (struct thread_db): New.
12923 (libthread_db_search_path): New variable.
12924 (thread_db_create_event, thread_db_enable_reporting)
12925 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12926 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12927 (try_thread_db_load_1, dladdr_to_soname): New functions.
12928 (try_thread_db_load, thread_db_load_search): New functions.
12929 (thread_db_init): Search for libthread_db.
12930 (thread_db_free): New function.
12931 (thread_db_handle_monitor_command): Likewise.
12932 * config.in: Regenerate.
12933 * configure: Regenerate.
889bf7c5 12934
4168d2d6
UW
129352009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12936
12937 * spu-low.c (spu_kill): Wait for inferior to terminate.
12938 Call clear_inferiors.
12939 (spu_detach): Call clear_inferiors.
12940
81ecdfbb
RW
129412009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12942
12943 * aclocal.m4: Regenerate.
12944 * config.in: Likewise.
12945 * configure: Likewise.
12946
0b9ff2c0
UW
129472009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12948
12949 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12950 (parse_spufs_run): New function.
12951 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12952 (ppc_breakpoint_at): Handle SPU breakpoints.
12953
efcbbd14
UW
129542009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12955
12956 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12957 (SPUFS_MAGIC): Define.
12958 (spu_enumerate_spu_ids): New function.
12959 (linux_qxfer_spu): New function.
12960 (linux_target_ops): Install linux_qxfer_spu.
12961
f4d9bade
UW
129622009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12963
12964 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12965 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12966 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12967 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12968 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12969 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12970 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12971 (init_registers_powerpc_cell32l): Add prototype.
12972 (init_registers_powerpc_cell64l): Likewise.
12973 (ppc_arch_setup): Detect Cell/B.E. architecture.
12974
96e946ca
RW
129752009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12976
12977 * Makefile.in (datarootdir): New variable.
12978
58d6951d
DJ
129792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12980
12981 * linux-low.c (linux_write_memory): Update debugging output.
12982 * Makefile.in (clean): Add new descriptions.
12983 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12984 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12985 * configure.srv: Add new files for arm*-*-linux*.
12986 * linux-arm-low.c: Add new declarations.
12987 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12988 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12989 (HWCAP_VFPv3D16): New.
12990 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12991 instead of __IWMMXT__.
12992 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12993 (arm_arch_setup): New.
12994 (target_regsets): Remove #ifdef. Add VFP regset.
12995 (the_low_target): Use arm_arch_setup.
12996
12b42a12
DJ
129972009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12998
12999 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13000 the main thread again.
13001
ac8c974e
AR
130022009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13003
13004 Adding Neutrino gdbserver.
13005 * configure: Regenerated.
13006 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13007 * configure.srv (i[34567]86-*-nto*): New target.
13008 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13009 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13010 (nto_comctrl) [__QNX__]: New function.
13011 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13012
4424e0c3 130132009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
13014
13015 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13016 srv_tgtobj.
13017
912cf4ba
PA
130182009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13019 Pedro Alves <pedro@codesourcery.com>
13020
13021 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13022 don't support CONTEXT_EXTENDED_REGISTERS.
13023 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13024 (the_low_target): Install them.
13025 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13026 failing with ERROR_PIPE_NOT_CONNECTED.
13027
aa5ca48f
DE
130282009-06-30 Doug Evans <dje@google.com>
13029 Pierre Muller <muller@ics.u-strasbg.fr>
13030
13031 Add h/w watchpoint support to x86-linux, win32-i386.
13032 * Makefile.in (SFILES): Add i386-low.c
13033 (i386_low_h): Define.
13034 (i386-low.o): Add dependencies.
13035 (linux-x86-low.o): Add i386-low.h dependency.
13036 (win32-i386-low.o): Ditto.
13037 * i386-low.c: New file.
13038 * i386-low.h: New file.
13039 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13040 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13041 * linux-low.c (linux_add_process): Initialize arch_private.
13042 (linux_remove_process): Free arch_private.
13043 (add_lwp): Initialize arch_private.
13044 (delete_lwp): Free arch_private.
13045 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13046 provided.
13047 * linux-low.h (process_info_private): New member arch_private.
13048 (lwp_info): New member arch_private.
13049 (linux_target_ops): New members new_process, new_thread,
13050 prepare_to_resume.
13051 (ptid_of): New macro.
13052 * linux-x86-low.c: Include stddef.h, i386-low.h.
13053 (arch_process_info): New struct.
13054 (arch_lwp_info): New struct.
13055 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13056 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13057 (i386_dr_low_get_status): New function.
13058 (x86_insert_point, x86_remove_point): New functions.
13059 (x86_stopped_by_watchpoint): New function.
13060 (x86_stopped_data_address): New function.
13061 (x86_linux_new_process, x86_linux_new_thread): New functions.
13062 (x86_linux_prepare_to_resume): New function.
13063 (the_low_target): Add entries for insert_point, remove_point,
13064 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13065 prepare_to_resume.
13066 * server.c (debug_hw_points): New global.
13067 (monitor_show_help): Document set debug-hw-points.
13068 (handle_query): Process "set debug-hw-points".
13069 * server.h (debug_hw_points): Declare.
13070 (paddress): Declare.
13071 * utils.c (NUMCELLS, CELLSIZE): New macros.
13072 (get_sell, xsnprintf, paddress): New functions.
13073 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13074 remove_point, stopped_by_watchpoint, stopped_data_address.
13075 * win32-i386-low.c: Include i386-low.h.
13076 (debug_reg_state): Replaces dr.
13077 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13078 (i386_dr_low_get_status): New function.
13079 (i386_insert_point, i386_remove_point): New functions.
13080 (i386_stopped_by_watchpoint): New function.
13081 (i386_stopped_data_address): New function.
13082 (i386_initial_stuff): Update.
13083 (get_thread_context,set_thread_context,i386_thread_added): Update.
13084 (the_low_target): Add entries for insert_point,
13085 remove_point, stopped_by_watchpoint, stopped_data_address.
13086 * win32-low.c (win32_insert_watchpoint): New function.
13087 (win32_remove_watchpoint): New function.
13088 (win32_stopped_by_watchpoint): New function.
13089 (win32_stopped_data_address): New function.
13090 (win32_target_ops): Add entries for insert_watchpoint,
13091 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13092 * win32-low.h (win32_target_ops): New members insert_point,
13093 remove_point, stopped_by_watchpoint, stopped_data_address.
13094
d993e290
PA
130952009-06-25 Pedro Alves <pedro@codesourcery.com>
13096
13097 * server.c (process_serial_event): Re-return unsupported, not
13098 error, if the type isn't recognized. Re-allow supporting only
13099 insert or remove packets. Also call require_running for
13100 breakpoints. Add missing break statement to default case. Tidy.
13101 * target.h (struct target_ops): Rename insert_watchpoint to
13102 insert_point, and remove_watchpoint to remove_point.
13103
13104 * linux-low.h (struct linux_target_ops): Likewise.
13105 * linux-low.c (linux_insert_watchpoint): Rename to ...
13106 (linux_insert_point): ... this. Adjust.
13107 (linux_remove_watchpoint): Rename to ...
13108 (linux_remove_point): ... this. Adjust.
13109 (linux_target_ops): Adjust.
13110 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13111 (cris_insert_point): ... this.
13112 (cris_remove_watchpoint): Rename to ...
13113 (cris_remove_point): ... this.
13114 (the_low_target): Adjust.
13115
0f54c268
PM
131162009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13117
13118 * server.c (handle_v_kill): Pass signal_pid to
13119 kill_inferior if multi_process is zero.
13120
c6314022
AR
131212009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13122
13123 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13124 * target.h (target_ops): Comment for *_watchpoint to make it clear
13125 the functions can get types '0' and '1'.
13126
4463ce24
AR
131272009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13128
13129 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13130 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13131 * regcache.c (get_regcache): Likewise.
13132 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13133 * win32-low.c (child_fetch_inferior_registers): Remove check for
13134 regno 0.
13135
cf8fd78b
PA
131362009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13137 Pedro Alves <pedro@codesourcery.com>
13138
13139 * target.h (struct target_ops) <supports_multi_process>: New
13140 callback.
13141 (target_supports_multi_process): New.
13142 * server.c (handle_query): Even if GDB reports support, only
13143 enable multi-process if the target also supports it. Report
13144 multi-process support only if the target backend supports it.
13145 * linux-low.c (linux_supports_multi_process): New function.
13146 (linux_target_ops): Install it as target_supports_multi_process
13147 callback.
13148
47c0c975
DE
131492009-05-24 Doug Evans <dje@google.com>
13150
e09875d4
DE
13151 Global renaming of find_thread_pid to find_thread_ptid.
13152 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13153 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13154 All callers updated.
13155
e27d73f6
DE
13156 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13157 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13158 directly.
13159
47c0c975
DE
13160 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13161 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13162 (linux_resume_one_lwp): Ditto.
13163
2acc282a
DE
131642009-05-23 Doug Evans <dje@google.com>
13165
13166 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13167 from struct inferior_list_entry * to struct lwp_info *.
13168 All callers updated.
13169
9f1036c1
DE
131702009-05-13 Doug Evans <dje@google.com>
13171
13172 * linux-x86-low.c: Don't include assert.h.
13173 (x86_siginfo_fixup): Use fatal, not assert.
13174 (x86_arch_setup): Fix comment.
13175
d0722149
DE
131762009-05-12 Doug Evans <dje@google.com>
13177
13178 Biarch support for i386/amd64 gdbserver.
13179 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13180 Add linux-x86-low.c.
13181 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13182 (linux-x86-low.o): Add.
13183 * linux-x86-64-low.c: Delete.
13184 * linux-i386-low.c: Delete.
13185 * linux-x86-low.c: New file.
13186 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13187 linux-x86-low.o.
13188 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13189 linux-x86-low.o.
13190 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13191 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13192 (linux_child_pid_to_exec_file): New function.
13193 (elf_64_header_p, elf_64_file_p): New functions.
13194 (siginfo_fixup): New function.
13195 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13196 give target a chance to convert layout.
13197 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13198 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13199
fdeb2a12
DE
132002009-05-07 Doug Evans <dje@google.com>
13201
13202 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13203 (regsets_store_inferior_registers): Ditto.
13204
a6dbe5df
PA
132052009-05-06 Pedro Alves <pedro@codesourcery.com>
13206
13207 PR server/10048
13208
13209 * linux-low.c (must_set_ptrace_flags): Delete.
13210 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13211 of the global.
13212 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13213 `lwp->must_set_ptrace_flags' instead.
ba42693b 13214 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
13215 (linux_wait_1): ... not here.
13216
5091eb23
DE
132172009-04-30 Doug Evans <dje@google.com>
13218
9f767825
DE
13219 * inferiors.c (started_inferior_callback): New function.
13220 (attached_inferior_callback): New function.
13221 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13222 * server.c (print_started_pid, print_attached_pid): New functions.
13223 (detach_or_kill_for_exit): New function.
13224 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13225 * server.h (have_started_inferiors_p): Declare.
13226 (have_attached_inferiors_p): Declare.
13227
5091eb23
DE
13228 * inferiors.c (remove_process): Fix memory leak, free process.
13229 * linux-low.c (linux_remove_process): New function.
13230 (linux_kill): Call it instead of remove_process.
13231 (linux_detach, linux_wait_1): Ditto.
13232
155c8968
PA
132332009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13234
13235 * configure.srv: Add x86 Windows CE target.
13236
7fe519cb
UW
132372009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13238
13239 * inferiors.c (get_thread_process): Make global.
13240 * server.h (get_thread_process): Add prototype.
13241 * thread-db.c (find_one_thread): Use get_thread_process
13242 instead of current_process.
13243 (thread_db_get_tls_address): Do not crash if called when
13244 thread layer is not yet initialized.
13245
5472f405
UW
132462009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13247
13248 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13249 * spu-low.c (current_tid): Rename to ...
13250 (current_ptid): ... this.
13251 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13252 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13253 ptid_get_lwp (current_ptid) instead of current_tid.
13254 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13255 instead of current_tid. Use find_process_pid to verify pid
13256 argument is valid. Pass proper argument to remove_process.
13257 (spu_thread_alive): Compare current_ptid instead of current_tid.
13258 (spu_resume): Likewise.
13259
55ac2b99
PA
132602009-04-02 Pedro Alves <pedro@codesourcery.com>
13261
13262 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13263 variable.
13264
95954743
PA
132652009-04-01 Pedro Alves <pedro@codesourcery.com>
13266
13267 Implement the multiprocess extensions, and add linux multiprocess
13268 support.
13269
13270 * server.h (ULONGEST): Declare.
13271 (struct ptid, ptid_t): New.
13272 (minus_one_ptid, null_ptid): Declare.
13273 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13274 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13275 (struct inferior_list_entry): Change `id' type from unsigned from
13276 to ptid_t.
13277 (struct sym_cache, struct breakpoint, struct
13278 process_info_private): Forward declare.
13279 (struct process_info): Declare.
13280 (current_process): Declare.
13281 (all_processes): Declare.
13282 (initialize_inferiors): Declare.
13283 (add_thread): Adjust to use ptid_t.
13284 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13285 (add_process, remove_process, find_thread_pid): Declare.
13286 (find_inferior_id): Adjust to use ptid_t.
13287 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13288 (multi_process): Declare.
13289 (push_event): Adjust to use ptid_t.
13290 (read_ptid, write_ptid): Declare.
13291 (prepare_resume_reply): Adjust to use ptid_t.
13292 (clear_symbol_cache): Declare.
13293 * inferiors.c (all_processes): New.
13294 (null_ptid, minus_one_ptid): New.
13295 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13296 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13297 (add_thread): Change unsigned long to ptid. Remove gdb_id
13298 parameter. Adjust.
13299 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13300 (gdb_id_to_thread): Rename to ...
13301 (find_thread_pid): ... this. Change unsigned long to ptid.
13302 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13303 (loaded_dll, pull_pid_from_list): Adjust.
13304 (add_process, remove_process, find_process_pid)
13305 (get_thread_process, current_process, initialize_inferiors): New.
13306 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13307 (struct target_waitstatus) <related_pid>: Ditto.
13308 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13309 return type to int.
13310 (struct target_ops) <join>: Add `pid' argument.
13311 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13312 (struct target_ops) <wait>: Add `ptid' field. Change return type
13313 to ptid.
13314 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13315 (mywait): Add `ptid' argument. Change return type to ptid_t.
13316 (target_pid_to_str): Declare.
13317 * target.c (set_desired_inferior): Adjust to use ptids.
13318 (mywait): Add new `ptid' argument. Adjust.
13319 (target_pid_to_str): New.
13320 * mem-break.h (free_all_breakpoints): Declare.
13321 * mem-break.c (breakpoints): Delelete.
13322 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13323 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13324 to use per-process breakpoint list.
13325 (free_all_breakpoints): New.
13326 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13327 (symbol_cache, all_symbols_looked_up): Delete.
13328 (hexchars): New.
13329 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13330 read_ptid): New.
13331 (prepare_resume_reply): Change ptid argument's type from unsigned
13332 long to ptid_t. Adjust. Implement W;process and X;process.
13333 (free_sym_cache, clear_symbol_cache): New.
13334 (look_up_one_symbol): Adjust to per-process symbol cache. *
13335 * server.c (cont_thread, general_thread, step_thread): Change type
13336 to ptid_t.
13337 (attached): Delete.
13338 (multi_process): New.
13339 (last_ptid): Change type to ptid_t.
13340 (struct vstop_notif) <ptid>: Change type to ptid_t.
13341 (queue_stop_reply, push_event): Change `ptid' argument's type to
13342 ptid_t.
13343 (discard_queued_stop_replies): Add `pid' argument.
13344 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13345 changes. Don't reference the `attached' global.
13346 (attach_inferior): Adjust to mywait interface changes.
13347 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13348 features. Handle and report "multiprocess+". Handle
13349 "qAttached:PID".
13350 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13351 changes.
13352 (handle_v_kill): New.
13353 (handle_v_stopped): Adjust to use target_pid_to_str.
13354 (handle_v_requests): Allow multiple attaches and runs when
13355 multiprocess extensions are in effect. Handle "vKill".
13356 (myresume): Adjust to use ptids.
13357 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13358 (handle_status): Adjust to discard_queued_stop_replies interface
13359 change.
13360 (first_thread_of, kill_inferior_callback)
13361 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13362 (main): Call initialize_inferiors. Adjust to use ptids, killing
13363 and detaching from all inferiors. Handle multiprocess packet
13364 variants.
13365 * linux-low.h: Include gdb_proc_service.h.
13366 (struct process_info_private): New.
13367 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13368 <lwpid_of>: Use ptid_get_lwp.
13369 (get_lwp_thread): Adjust.
13370 (struct lwp_info): Add `dead' member.
13371 (find_lwp_pid): Declare.
13372 * linux-low.c (thread_db_active): Delete.
13373 (new_inferior): Adjust comment.
13374 (inferior_pid): Delete.
13375 (linux_add_process): New.
13376 (handle_extended_wait): Adjust.
13377 (add_lwp): Change unsigned long to ptid.
13378 (linux_create_inferior): Add process to processes table. Adjust
13379 to use ptids. Don't set new_inferior here.
13380 (linux_attach_lwp): Rename to ...
13381 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13382 it. Adjust to use ptids.
13383 (linux_attach_lwp): New.
13384 (linux_attach): Add process to processes table. Don't set
13385 new_inferior here.
13386 (struct counter): New.
13387 (second_thread_of_pid_p, last_thread_of_process_p): New.
13388 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13389 multiple processes.
13390 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13391 processes. Remove process from process table.
13392 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13393 to multiple processes.
13394 (any_thread_of): New.
13395 (linux_detach): Add `pid' argument, and handle it. Remove process
13396 from processes table.
13397 (linux_join): Add `pid' argument. Handle it.
13398 (linux_thread_alive): Change unsighed long argument to ptid_t.
13399 Consider dead lwps as not being alive.
13400 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13401 threads we're not interested in.
13402 (same_lwp, find_lwp_pid): New.
13403 (linux_wait_for_lwp): Change `pid' argument's type from int to
13404 ptid_t. Adjust.
13405 (linux_wait_for_event): Rename to ...
13406 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13407 from int to ptid_t. Adjust.
13408 (linux_wait_for_event): New.
13409 (linux_wait_1): Add `ptid' argument. Change return type to
13410 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13411 that exit from the process table.
13412 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13413 Adjust.
13414 (mark_lwp_dead): New.
13415 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13416 stopping all threads, mark its main lwp as dead.
13417 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13418 ptids.
13419 (fetch_register, usr_store_inferior_registers)
13420 (regsets_fetch_inferior_registers)
13421 (regsets_store_inferior_registers, linux_read_memory)
13422 (linux_write_memory): Inline `inferior_pid'.
13423 (linux_look_up_symbols): Adjust to use per-process
13424 `thread_db_active'.
13425 (linux_request_interrupt): Adjust to use ptids.
13426 (linux_read_auxv): Inline `inferior_pid'.
13427 (initialize_low): Don't reference thread_db_active.
13428 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13429 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13430 (ps_getpid): Return the pid of the current inferior.
13431 * thread-db.c (proc_handle, thread_agent): Delete.
13432 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13433 per-process data.
13434 (find_one_thread): Change argument type to ptid_t. Adjust to
13435 per-process data.
13436 (maybe_attach_thread): Adjust to per-process data and ptids.
13437 (thread_db_find_new_threads): Ditto.
13438 (thread_db_init): Ditto.
13439 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13440 processes table. Adjust to use ptids.
13441 (spu_kill, spu_detach): Adjust interface. Remove process from
13442 processes table.
13443 (spu_join, spu_thread_alive): Adjust interface.
13444 (spu_wait): Adjust interface. Remove process from processes
13445 table. Adjust to use ptids.
13446 * win32-low.c (current_inferior_tid): Delete.
13447 (current_inferior_ptid): New.
13448 (debug_event_ptid): New.
13449 (thread_rec): Take a ptid. Adjust.
13450 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13451 (child_delete_thread): Ditto.
13452 (do_initial_child_stuff): Add `attached' argument. Add process to
13453 processes table.
13454 (child_fetch_inferior_registers, child_store_inferior_registers):
13455 Adjust.
13456 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13457 (win32_attach): Pass 1 to do_initial_child_stuff.
13458 (win32_kill): Adjust interface. Remove process from processes
13459 table.
13460 (win32_detach): Ditto.
13461 (win32_join): Adjust interface.
13462 (win32_thread_alive): Take a ptid.
13463 (win32_resume): Adjust to use ptids.
13464 (get_child_debug_event): Ditto.
13465 (win32_wait): Adjust interface. Remove exiting process from
13466 processes table.
13467
bd99dc85
PA
134682009-04-01 Pedro Alves <pedro@codesourcery.com>
13469
13470 Non-stop mode support.
13471
13472 * server.h (non_stop): Declare.
13473 (gdb_client_data, handler_func): Declare.
13474 (delete_file_handler, add_file_handler, start_event_loop):
13475 Declare.
13476 (handle_serial_event, handle_target_event, push_event)
13477 (putpkt_notif): Declare.
13478 * target.h (enum resume_kind): New.
13479 (struct thread_resume): Replace `step' field by `kind' field.
13480 (TARGET_WNOHANG): Define.
13481 (struct target_ops) <wait>: Add `options' argument.
13482 <supports_non_stop, async, start_non_stop>: New fields.
13483 (target_supports_non_stop, target_async): New.
13484 (start_non_stop): Declare.
13485 (mywait): Add `options' argument.
13486 * target.c (mywait): Add `options' argument. Print child exit
13487 notifications here.
13488 (start_non_stop): New.
13489 * server.c (non_stop, own_buf, mem_buf): New globals.
13490 (struct vstop_notif): New.
13491 (notif_queue): New global.
13492 (queue_stop_reply, push_event, discard_queued_stop_replies)
13493 (send_next_stop_reply): New.
13494 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13495 interface changes.
13496 (attach_inferior): In non-stop mode, don't wait for the target
13497 here.
13498 (handle_general_set): Handle QNonStop.
13499 (handle_query): When handling qC, return the current general
13500 thread, instead of the first thread of the list.
13501 (handle_query): If the backend supports non-stop mode, include
13502 QNonStop+ in the qSupported query response.
13503 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13504 and non-stop mode.
13505 (handle_v_attach, handle_v_run): Handle non-stop mode.
13506 (handle_v_stopped): New.
13507 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13508 (myresume): Adjust to use resume_kind. Handle non-stop.
13509 (queue_stop_reply_callback): New.
13510 (handle_status): Handle non-stop mode.
13511 (main): Clear non_stop flag on reconnection. Use the event-loop.
13512 Refactor serial protocol handling from here ...
13513 (process_serial_event): ... to this new function. When GDB
13514 selects any thread, select one here. In non-stop mode, wait until
13515 GDB acks all pending events before exiting.
13516 (handle_serial_event, handle_target_event): New.
13517 * remote-utils.c (remote_open): Install remote_desc in the event
13518 loop.
13519 (remote_close): Remove remote_desc from the event loop.
13520 (putpkt_binary): Rename to...
13521 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13522 (putpkt_binary): New as wrapper around putpkt_binary_1.
13523 (putpkt_notif): New.
13524 (prepare_resume_reply): In non-stop mode, don't change the
13525 general_thread.
13526 * event-loop.c: New.
13527 * Makefile.in (OBJ): Add event-loop.o.
13528 (event-loop.o): New rule.
13529
13530 * linux-low.h (pid_of): Moved here.
13531 (lwpid_of): New.
13532 (get_lwp_thread): Use lwpid_of.
13533 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13534 * linux-low.c (pid_of): Delete.
13535 (inferior_pid): Use lwpid_of.
13536 (linux_event_pipe): New.
13537 (target_is_async_p): New.
13538 (delete_lwp): New.
13539 (handle_extended_wait): Use lwpid_of.
13540 (add_lwp): Don't set lwpid field.
13541 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13542 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13543 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13544 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13545 first. Adjust to linux_wait_for_event interface changes. Use
13546 lwpid_of.
13547 (linux_detach): Don't delete the main lwp here.
13548 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13549 (status_pending_p): Don't consider explicitly suspended lwps.
13550 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13551 pointer. Add OPTIONS argument. Change return type to int. Use
13552 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13553 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13554 pointer. Add status pointer argument. Return a pid instead of a
13555 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13556 changes. In non-stop mode, don't switch to a random thread.
13557 (linux_wait): Rename to...
13558 (linux_wait_1): ... this. Add target_options argument, and handle
13559 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13560 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13561 clean exit and signal exit code. Don't stop all threads in
13562 non-stop mode. In all-stop mode, only stop all threads when
13563 reporting a stop to GDB. Handle explicit thread stop requests.
13564 (async_file_flush, async_file_mark): New.
13565 (linux_wait): New.
13566 (send_sigstop): Use lwpid_of.
13567 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13568 interface changes. In non-stop mode, don't switch to a random
13569 thread.
13570 (linux_resume_one_lwp): Use lwpid_of.
13571 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13572 (linux_resume_one_thread): ... this. Handle resume_stop. In
13573 non-stop mode, don't look for pending flag in all threads.
13574 (resume_status_pending_p): Don't consider explicitly suspended
13575 threads.
13576 (my_waitpid): Reimplement. Emulate __WALL.
13577 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13578 Use lwpid_of.
13579 (sigchld_handler, linux_supports_non_stop, linux_async)
13580 (linux_start_non_stop): New.
13581 (linux_target_ops): Register linux_supports_non_stop, linux_async
13582 and linux_start_non_stop.
13583 (initialize_low): Install SIGCHLD handler.
13584 * thread-db.c (thread_db_create_event, find_one_thread)
13585 (thread_db_get_tls_address): Use lwpid_of.
13586 * win32-low.c (win32_detach): Adjust to use resume_kind.
13587 (win32_wait): Add `options' argument.
13588 * spu-low.c (spu_resume): Adjust to use resume_kind.
13589 (spu_wait): Add `options' argument.
13590
5b1c542e
PA
135912009-04-01 Pedro Alves <pedro@codesourcery.com>
13592
13593 Decouple target code from remote protocol.
13594
13595 * target.h (enum target_waitkind): New.
13596 (struct target_waitstatus): New.
13597 (struct target_ops) <wait>: Return an unsigned long. Take a
13598 target_waitstatus pointer instead of a char pointer.
13599 (mywait): Likewise.
13600 * target.c (mywait): Change prototype to return an unsigned long.
13601 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13602 * server.h (thread_from_wait, old_thread_from_wait): Delete
13603 declarations.
13604 (prepare_resume_reply): Change prototype to take a
13605 target_waitstatus.
13606 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13607 (last_status, last_ptid): New.
13608 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13609 pid instead of a signal.
13610 (attach_inferior): Remove "status" and "signal" parameters.
13611 Adjust.
13612 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13613 not as an address.
13614 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13615 (handle_v_requests, myresume): Remove "status" and "signal"
13616 parameters. Adjust.
13617 (handle_status): New.
13618 (main): Delete local `status'. Adjust.
13619 * remote-utils.c: Include target.h.
13620 (prepare_resume_reply): Change prototype to take a
13621 target_waitstatus. Adjust.
13622
13623 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13624 interface.
13625 * spu-low.c (spu_wait): Adjust.
13626 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13627 Delete.
13628 (win32_wait): Adjust.
13629
2bd7c093
PA
136302009-04-01 Pedro Alves <pedro@codesourcery.com>
13631
13632 * target.h (struct thread_resume): Delete leave_stopped member.
13633 (struct target_ops): Add a `n' argument to the `resume' callback.
13634 * server.c (start_inferior): Adjust.
13635 (handle_v_cont, myresume): Adjust.
13636 * linux-low.c (check_removed_breakpoint): Adjust to resume
13637 interface change, and to removed leave_stopped field.
13638 (resume_ptr): Delete.
13639 (struct thread_resume_array): New.
13640 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13641 resume interface change.
13642 (linux_continue_one_thread, linux_queue_one_thread)
13643 (resume_status_pending_p): Check if the resume field is NULL
13644 instead of checking the leave_stopped member.
13645 (linux_resume): Adjust to the target resume interface change.
13646 * spu-low.c (spu_resume): Adjust to the target resume interface
13647 change.
13648 * win32-low.c (win32_detach, win32_resume): Ditto.
13649
c35fafde
PA
136502009-04-01 Pedro Alves <pedro@codesourcery.com>
13651
13652 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13653 flag.
13654 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13655 pending.
13656 (linux_continue_one_thread): Only preserve the stepping flag if
13657 there's a pending breakpoint.
13658
0a59d50b
PA
136592009-03-31 Pedro Alves <pedro@codesourcery.com>
13660
13661 * server.c (main): After the inferior having exited, call
13662 remote_close before exiting gdbserver.
13663
f04c6d38
TJB
136642009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13665
13666 Fix size of FPSCR in Power 7 processors.
13667 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13668 (PPC_FEATURE_HAS_DFP): New #define.
13669 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13670 size of the FPSCR.
13671
78e5cee6
PA
136722009-03-23 Pedro Alves <pedro@codesourcery.com>
13673
13674 * server.c (handle_query) Whitespace and formatting.
13675
1b3f6016
PA
136762009-03-22 Pedro Alves <pedro@codesourcery.com>
13677
13678 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13679 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13680 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13681 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13682 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13683 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13684 Makefile.in, configure.ac: Fix whitespace throughout.
13685 * configure: Regenerate.
13686
a07b2135
PA
136872009-03-22 Pedro Alves <pedro@codesourcery.com>
13688
13689 * inferiors.c (find_inferior): Make it safe for the callback
13690 function to delete the currently iterated inferior.
13691
67cc2626
PA
136922009-03-22 Pedro Alves <pedro@codesourcery.com>
13693
13694 * Makefile.in (linuw_low_h): Move higher.
13695 (thread-db.o): Depend on $(linux_low_h).
13696
54a0b537
PA
136972009-03-17 Pedro Alves <pedro@codesourcery.com>
13698
13699 Rename "process" to "lwp" throughout.
13700
13701 * linux-low.c (all_processes): Rename to...
13702 (all_lwps): ... this.
13703 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13704 (add_process): Rename to ...
13705 (add_lwp): ... this. Adjust.
13706 (linux_create_inferior): Adjust.
13707 (linux_attach_lwp): Adjust.
13708 (linux_attach): Adjust.
13709 (linux_kill_one_process): Rename to ...
13710 (linux_kill_one_lwp): ... this. Adjust.
13711 (linux_kill): Adjust.
13712 (linux_detach_one_process): Rename to ...
13713 (linux_detach_one_lwp): ... this. Adjust.
13714 (linux_detach): Adjust.
13715 (check_removed_breakpoint): Adjust.
13716 (status_pending_p): Adjust.
13717 (linux_wait_for_process): Rename to ...
13718 (linux_wait_for_lwp): ... this. Adjust.
13719 (linux_wait_for_event): Adjust.
13720 (send_sigstop): Adjust.
13721 (wait_for_sigstop): Adjust.
13722 (stop_all_processes): Rename to ...
13723 (stop_all_lwps): ... this.
13724 (linux_resume_one_process): Rename to ...
13725 (linux_resume_one_lwp): ... this. Adjust.
13726 (linux_set_resume_request, linux_continue_one_thread)
13727 (linux_queue_one_thread, resume_status_pending_p)
13728 (usr_store_inferior_registers, regsets_store_inferior_registers)
13729 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13730 Adjust.
13731 * linux-low.h (get_process): Rename to ...
13732 (get_lwp): ... this. Adjust.
13733 (get_thread_process): Rename to ...
13734 (get_thread_lwp): ... this. Adjust.
13735 (get_process_thread): Rename to ...
13736 (get_lwp_thread): ... this. Adjust.
13737 (struct process_info): Rename to ...
13738 (struct lwp_info): ... this.
13739 (all_processes): Rename to ...
13740 (all_lwps): ... this.
13741 * proc-service.c (ps_lgetregs): Adjust.
13742 * thread-db.c (thread_db_create_event, find_one_thread)
13743 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13744
0b16c5cf
PA
137452009-03-14 Pedro Alves <pedro@codesourcery.com>
13746
13747 * server.c (handle_query): Handle "qAttached".
13748
32de4b9d
NS
137492009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13750
13751 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13752 GPLv3, update license URL.
13753
2aecd87f
DE
137542009-03-01 Doug Evans <dje@google.com>
13755
93efd302 13756 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13757 (server_h): Add gdb_signals.h.
13758 (signals.o): Update.
13759 * server.h (target_signal_from_host,target_signal_to_host_p)
13760 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13761
86b1f9c5
PM
137622009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13763
13764 * remote-utils.c (getpkt): Also generate remote-debug
13765 information if noack_mode is set.
13766
4aa995e1
PA
137672009-02-06 Pedro Alves <pedro@codesourcery.com>
13768
13769 * server.c (handle_query): Report qXfer:siginfo:read and
13770 qXfer:siginfo:write as supported and handle them.
13771 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13772 * linux-low.c (linux_xfer_siginfo): New.
13773 (linux_target_ops): Set it.
13774
62709adf
PA
137752009-01-26 Pedro Alves <pedro@codesourcery.com>
13776
13777 * server.c (gdbserver_usage): Mention --remote-debug.
13778 (main): Accept '--remote-debug' switch.
13779
aef93bd7
DE
137802009-01-18 Doug Evans <dje@google.com>
13781
13782 * regcache.c (new_register_cache): No need to check result of xcalloc.
13783 * server.c (handle_search_memory): Back out calls to xmalloc,
13784 result is checked and error is returned to user upon failure.
13785 (handle_query): Ditto. Add more checks for result of malloc.
13786 (handle_v_cont): Check result of malloc, report error back to
13787 user upon failure.
13788 (handle_v_run): Ditto. Call freeargv.
13789 * server.h (freeargv): Declare.
13790 * utils.c (freeargv): New fn.
13791
54363045
DE
137922009-01-15 Doug Evans <dje@google.com>
13793
f626972c
DE
13794 * gdbreplay.c (perror_with_name): Make arg const char *.
13795 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13796 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13797 * utils.c (perror_with_name): Make arg const char *.
54363045 13798
18aae699
PA
137992009-01-14 Pedro Alves <pedro@codesourcery.com>
13800
13801 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13802 when handling a EXIT_PROCESS_DEBUG_EVENT.
13803
ff703abe
JB
138042009-01-06 Joel Brobecker <brobecker@adacore.com>
13805
13806 * gdbreplay.c (gdbreplay_version): Update copyright year.
13807 * server.c (gdbserver_version): Likewise.
13808
f21cc1a2 138092009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13810
13811 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13812 (handle_extended_wait): Improve comment.
0e21c1ec 13813
bca929d3
DE
138142008-12-13 Doug Evans <dje@google.com>
13815
13816 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13817 * server.h (ATTR_MALLOC): New macro.
13818 (xmalloc,xcalloc,xstrdup): Declare.
13819 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13820 * inferiors.c: Ditto.
13821 * linux-low.c: Ditto.
13822 * mem-break.c: Ditto.
13823 * regcache.c: Ditto.
13824 * remote-utils.c: Ditto.
13825 * server.c: Ditto.
13826 * target.c: Ditto.
13827 * win32-low.c: Ditto.
13828
97438e3f
DE
138292008-12-12 Doug Evans <dje@google.com>
13830
896c7fbb
DE
13831 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13832 in debugging printf.
13833
97438e3f
DE
13834 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13835
e3b886f8
DE
138362008-12-09 Doug Evans <dje@google.com>
13837
13838 * linux-low.h (struct process_info): Delete member tid, unused.
13839 * thread-db.c (find_one_thread): Update.
13840 (maybe_attach_thread): Update.
13841
07e059b5
VP
138422008-12-02 Pedro Alves <pedro@codesourcery.com>
13843
889bf7c5
PA
13844 * target.h (struct target_ops): Add qxfer_osdata member.
13845 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13846 and dirent.h.
13847 (linux_qxfer_osdata): New functions.
13848 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13849 callback.
13850 * server.c (handle_query): Handle "qXfer:osdata:read:".
13851 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13852 (buffer_xml_printf): New functions.
13853 * server.h (struct buffer): New.
13854 (buffer_grow_str, buffer_grow_str0): New macros.
13855 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13856 (buffer_xml_printf): Declare.
07e059b5 13857
4cab47ab
DE
138582008-11-24 Doug Evans <dje@google.com>
13859
13860 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13861
f142445f
DJ
138622008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13863
13864 * server.c (handle_v_run): Always use the supplied argument list.
13865
d0107bb6 138662008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13867
d0107bb6
BW
13868 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13869 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13870
2c4ad781
TJB
138712008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13872
13873 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13874 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13875 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13876 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13877 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13878 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13879 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13880 XML target descriptions.
13881 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13882 when inferior is running on an ISA 2.05 or later processor. Add
13883 special case to return offset for full 64-bit slot of FPSCR when
13884 in 32-bits.
13885
dfb64f85
DJ
138862008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13887
13888 * Makefile.in (SFILES, clean): Added sparc64 files.
13889 (reg-sparc64.o, reg-sparc64.c): New.
13890 * configure.srv (sparc*-*-linux*): New configuration.
13891 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13892 syscall arguments for SPARC.
13893 (regsets_store_inferior_registers): Likewise.
13894 * linux-sparc-low.c: New file.
13895
66b6e1dd
DE
138962008-10-21 Doug Evans <dje@google.com>
13897
13898 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13899 (READLINE_DIR,READLINE_DEP): Delete.
13900 (INTERNAL_CFLAGS): Update.
13901 (LINTFLAGS): Update.
13902
9b710a42
PA
139032008-10-10 Pedro Alves <pedro@codesourcery.com>
13904
13905 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13906 whole argv from the last run, not just argv[0].
13907
5822d809
PA
139082008-09-08 Pedro Alves <pedro@codesourcery.com>
13909
13910 * regcache.c (new_register_cache): Return NULL if the register
13911 cache size isn't known yet.
13912 (free_register_cache): Avoid dereferencing a NULL regcache.
13913
74aac56f
DJ
139142008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13915
13916 * configure.srv: Merge MIPS and MIPS64.
13917
400b20f5
MR
139182008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13919
13920 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13921
677c5bb1
LM
139222008-08-18 Luis Machado <luisgpm@br.ibm.com>
13923
13924 * Makefile.in: Add required vsx dependencies.
13925
13926 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13927 Declare init_registers_powerpc_vsx32l.
13928 Declare init_registers_powerpc_vsx64l.
13929 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13930 (ppc_arch_setup): Check for VSX in hwcap.
13931 (ppc_fill_vsxregset): New function.
13932 (ppc_store_vsxregset): New function.
13933 Add new VSX entry in regset_info target_regsets.
13934
13935 * configure.srv: Add new VSX dependencies.
13936
a6f3e723
SL
139372008-08-12 Pedro Alves <pedro@codesourcery.com>
13938
13939 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13940 (remote_open): Set or clear transport_is_reliable.
13941 (putpkt_binary): Don't expect acks in noack mode.
13942 (getpkt): Don't send ack/nac in noack mode.
13943 * server.c (handle_general_set): Handle QStartNoAckMode.
13944 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13945 qSupported.
13946 (main): Reset noack_mode on every connection.
13947 * server.h (noack_mode): Declare.
13948
a417dc56
RW
139492008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13950
13951 * Makefile.in (GDBREPLAY_OBS): New variable.
13952 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13953
3221518c
UW
139542008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13955 Daniel Jacobowitz <dan@codesourcery.com>
13956
13957 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13958 (usr_store_inferior_registers): Likewise.
13959 (regsets_store_inferior_registers): Likewise.
13960
ec56be1b
PA
139612008-07-31 Rolf Jansen <rj@surtec.com>
13962 Pedro Alves <pedro@codesourcery.com>
13963
13964 * configure.ac: Check for memmem declaration.
13965 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13966 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13967 (disable_packet_qfThreadInfo): Unconditionally compile.
13968 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13969 * configure, config.in: Regenerate.
13970
2fe5e3ff
DE
139712008-07-28 Doug Kwan <dougkwan@google.com>
13972
13973 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13974 (linux_write_memory): Remove declaration of errno.
13975
836acd6d
UW
139762008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13977
13978 * linux-low.c (handle_extended_wait): Do not use "status"
13979 variable uninitialized.
13980
aeba519e
PA
139812008-07-07 Pedro Alves <pedro@codesourcery.com>
13982
13983 * server.c (handle_v_attach): Inhibit reporting dll changes.
13984
db42f210
PA
139852008-06-27 Pedro Alves <pedro@codesourcery.com>
13986
13987 * remote-utils.c (prepare_resume_reply): If requested, don't
13988 output "thread:TID" in the T stop reply.
13989
13990 * server.c (disable_packet_vCont, disable_packet_Tthread)
13991 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13992 (handle_query): If requested, disable support for qC, qfThreadInfo
13993 and qsThreadInfo.
13994 (handle_v_requests): If requested, disable support for vCont.
13995 (gdbserver_show_disableable): New.
13996 (main): Handle --disable-packet and --disable-packet=LIST.
13997
13998 * server.h (disable_packet_vCont, disable_packet_Tthread)
13999 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14000
8e4c5421
CD
140012008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14002
14003 * server.c (gdbserver_usage): Mention --version.
14004
6e23a804
DJ
140052008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14006
14007 * Makefile.in (gdbreplay.o): New rule.
14008
90aa6a40
JM
140092008-06-06 Joseph Myers <joseph@codesourcery.com>
14010
14011 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14012 message, not gdbserver.
14013
c16158bc 140142008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
14015 Nathan Sidwell <nathan@codesourcery.com>
14016 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
14017
14018 * acinclude.m4: Include ../../config/acx.m4.
14019 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14020 * configure, config.in: Regenerate.
14021 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14022 * server.c (gdbserver_version): Print PKGVERSION.
14023 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14024 (main): Adjust gdbserver_usage calls.
14025 * gdbreplay.c (version, host_name): Add declarations.
14026 (gdbreplay_version, gdbreplay_usage): New.
14027 (main): Accept --version and --help options.
14028
aeb75bf5
DJ
140292008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14030
14031 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14032 (arm_breakpoint_at): Handle Thumb.
14033 (the_low_target): Add comment.
14034
76b233dd
UW
140352008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14036
14037 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14038
08388c79
DE
140392008-05-09 Doug Evans <dje@google.com>
14040
a3c83fae
DE
14041 * server.h (decode_search_memory_packet): Declare.
14042 * remote-utils.c (decode_search_memory_packet): New fn.
14043 * server.c (handle_search_memory_1): New fn.
08388c79
DE
14044 (handle_search_memory): New fn.
14045 (handle_query): Process qSearch:memory packets.
14046
bb9c3d36
UW
140472008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14048
14049 * regcache.c (registers_length): Remove.
14050 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14051 full register packet.
14052 * regcache.h (registers_length): Remove prototype.
14053 * server.h (PBUFSIZ): Define to 16384.
14054
7284e1be
UW
140552008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14056
14057 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14058 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14059 powerpc-64l.o, and powerpc-altivec64l.o.
14060 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14061 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14062 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14063 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14064 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14065 to srv_xmlfiles.
14066
14067 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14068 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14069 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14070 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14071 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14072 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14073 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14074 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14075 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14076 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14077 (clean): Update.
14078
14079 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14080 (init_registers_powerpc_32l): ... this new prototype.
14081 (init_registers_powerpc_32): Remove, replace by ...
14082 (init_registers_powerpc_altivec32l): ... this new prototype.
14083 (init_registers_powerpc_e500): Remove, replace by ...
14084 (init_registers_powerpc_e500l): ... this new prototype.
14085 (init_registers_ppc64): Remove, replace by ...
14086 (init_registers_powerpc_64l): ... this new prototype.
14087 (init_registers_powerpc_64): Remove, replace by ...
14088 (init_registers_powerpc_altivec64l): ... this new prototype.
14089 (ppc_num_regs): Set to 73.
14090 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14091 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14092 (ppc_cannot_store_register): Handle orig_r3 and trap.
14093 (ppc_arch_setup): Update init_registers_... calls.
14094 (ppc_fill_gregset): Handle orig_r3 and trap.
14095
14096 * inferiors.c (clear_inferiors): Reset current_inferior.
14097
fdc59709
PB
140982008-04-23 Paolo Bonzini <bonzini@gnu.org>
14099
889bf7c5
PA
14100 * acinclude.m4: Add override.m4.
14101 * configure: Regenerate.
fdc59709 14102
c9b2f845
UW
141032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14104
14105 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14106 initial call to init_register_ppc64.
14107
550512b8
UW
141082008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14109
43aaf8b6
PA
14110 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14111 single powerpc*-*-linux* case.
550512b8
UW
14112 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14113
b6430ec3
UW
141142008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14115
14116 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 14117 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
14118 from reg_xmlfiles.
14119 * linux-ppc-low.c: Include <elf.h>.
14120 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14121 (ppc_hwcap): New global variable.
14122 (ppc_regmap): Remove __SPE__ #ifdef sections.
14123 (ppc_regmap_e500): New global variable.
14124 (ppc_cannot_store_register): Update __SPE__ special case.
14125 (ppc_get_hwcap): New function.
14126 (ppc_arch_setup): Use it to determine whether inferior supports
14127 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14128 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14129 Do not access registers if target does not support AltiVec.
14130 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14131 Do not access registers if target does not support SPE.
14132 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14133
52fa2412
UW
141342008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14135
14136 * linux-low.c (disabled_regsets, num_regsets): New.
14137 (use_regsets_p): Delete.
14138 (linux_wait_for_process): Clear disabled_regsets.
14139 (regsets_fetch_inferior_registers): Check and set it.
14140 (regsets_store_inferior_registers): Likewise.
14141 (linux_fetch_registers, linux_store_registers): Do not use
14142 use_regsets_p.
14143 (initialize_low): Allocate disabled_regsets.
14144
e28b3332
DJ
141452008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14146
14147 * Makefile.in (LIBOBJS): New.
14148 (OBS): Use LIBOBJS.
14149 (memmem.o): New rule.
14150 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14151 * configure: Regenerated.
14152
4536995d
UW
141532008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14154
14155 * server.c (handle_query): Never return "unsupported" for
14156 qXfer:features:read queries.
14157
221c031f
UW
141582008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14159
14160 * server.c (get_features_xml): Fix inverted condition.
14161 (handle_query): Always support qXfer:feature:read.
14162
ccd213ac
DJ
141632008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14164
14165 * server.c (wrapper_argv): New.
14166 (start_inferior): Handle wrapper_argv. If set, expect an extra
14167 trap.
14168 (gdbserver_usage): Document --wrapper.
14169 (main): Parse --wrapper.
14170
6fe305f7
UW
141712008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14172
14173 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14174 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14175 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14176 (ppc_set_pc): Likewise.
14177 (ppc_arch_setup): New function.
14178 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14179 of collect_register.
889bf7c5 14180 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 14181
5b0a002e
UW
141822008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14183
14184 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14185 instead of linux-ppc64-low.o.
14186 * linux-ppc64-low.c: Remove file.
14187 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14188 (linux-ppc64-low.o): Remove rule.
14189
14190 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14191 (init_registers_powerpc_64): Likewise.
14192 (ppc_regmap): Conditionally define depending on __powerpc64__.
14193 (ppc_cannot_store_register): Do not special-case "fpscr" when
14194 compiled on __powerpc64__.
14195 (ppc_collect_ptrace_register): New function.
14196 (ppc_supply_ptrace_register): New function.
14197 (ppc_breakpoint): Change type to "unsigned int".
14198 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14199 (the_low_target): Conditionally provide initializers for the
889bf7c5 14200 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
14201 collect_ptrace_register and supply_ptrace_register members.
14202
9b4b61c8
UW
142032008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14204
14205 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14206 * server.c (gdbserver_xmltarget): Define.
14207 (get_features_xml): Use it to replace "target.xml" and arch_string.
14208
14209 * configure.srv: Remove srv_xmltarget. Add XML files that were
14210 mentioned there to srv_xmlfiles instead. Remove conditional tests
14211 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14212 srv_xmlfiles and srv_regobj to include all possible choices.
14213 * configure.ac (srv_xmltarget): Remove.
14214 (srv_xmlfiles): Do not add "target.xml".
14215 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14216 checks for supplementary target information.
14217 * configure: Regenerate.
14218 * Makefile.in (XML_TARGET): Remove.
14219 (target.xml): Remove rule.
14220 (clean): Do not clean up target.xml.
14221 (.PRECIOUS): Do not mention target.xml.
14222
14223 * target.h (struct target_ops): Remove arch_string member.
14224 * linux-low.c (linux_arch_string): Remove.
14225 (linux_target_ops): Remove arch_string initializer.
14226 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14227 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14228 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14229 * spu-low.c (spu_arch_string): Remove.
14230 (spu_target_ops): Remove arch_string initializer.
14231 * win32-low.c (win32_arch_string): Remove.
14232 (win32_target_ops): Remove arch_string initializer.
14233 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14234 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14235 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14236
ee1a7ae4
UW
142372008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14238
14239 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14240 by collect_ptrace_register and supply_ptrace_register hooks.
14241 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14242 instead of checking for the_low_target.left_pad_xfer.
14243 (usr_store_inferior_registers): Use collect_ptrace_register callback
14244 instead of checking for the_low_target.left_pad_xfer.
14245
14246 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14247 (s390_supply_ptrace_register): Likewise.
14248 (s390_fill_gregset): Call s390_collect_ptrace_register.
14249 (the_low_target): Update.
14250
14251 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14252 (ppc_supply_ptrace_register): Likewise.
14253 (the_low_target): Update.
14254
14255 * linux-i386-low.c (the_low_target): Update.
14256 * linux-x86-64-low.c (the_low_target): Update.
14257
d61ddec4
UW
142582008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14259
14260 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14261 reg-s390.o and reg-s390x.o.
14262
14263 * linux-low.c (new_inferior): New global variable.
14264 (linux_create_inferior, linux_attach): Set it.
14265 (linux_wait_for_process): Call the_low_target.arch_setup after the
14266 target has stopped for the first time.
14267 (initialize_low): Do not call the_low_target.arch_setup.
14268
14269 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14270 (s390_set_pc): Likewise.
14271 (s390_arch_setup): New function.
14272 (the_low_target): Use s390_arch_setup as arch_setup routine.
14273
14274 * regcache.c (realloc_register_cache): New function.
14275 (set_register_cache): Call it for each existing regcache.
14276
d05b4ac3
UW
142772008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14278
14279 * server.h (init_registers): Remove prototype.
14280
14281 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14282 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14283 instead of init_registers ().
14284 * linux-arm-low.c (init_registers_arm): Add prototype.
14285 (init_registers_arm_with_iwmmxt): Likewise.
14286 (the_low_target): Add initializer for arch_setup field.
14287 * linux-cris-low.c (init_registers_cris): Add prototype.
14288 (the_low_target): Add initializer for arch_setup field.
14289 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14290 (the_low_target): Add initializer for arch_setup field.
14291 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14292 (the_low_target): Add initializer for arch_setup field.
14293 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14294 (the_low_target): Add initializer for arch_setup field.
14295 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14296 (the_low_target): Add initializer for arch_setup field.
14297 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14298 (the_low_target): Add initializer for arch_setup field.
14299 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14300 (init_registers_mips64_linux): Likewise.
14301 (the_low_target): Add initializer for arch_setup field.
14302 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14303 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14304 (the_low_target): Add initializer for arch_setup field.
14305 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14306 (init_registers_powerpc_64): Likewise.
14307 (the_low_target): Add initializer for arch_setup field.
14308 * linux-s390-low.c (init_registers_s390): Add prototype.
14309 (init_registers_s390x): Likewise.
14310 (the_low_target): Add initializer for arch_setup field.
14311 * linux-sh-low.c (init_registers_sh): Add prototype.
14312 (the_low_target): Add initializer for arch_setup field.
14313 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14314 (the_low_target): Add initializer for arch_setup field.
14315 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14316 (the_low_target): Add initializer for arch_setup field.
14317
14318 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14319 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14320 instead of init_registers ().
14321 * win32-arm-low.c (init_registers_arm): Add prototype.
14322 (the_low_target): Add initializer for arch_setup field.
14323 * win32-i386-low.c (init_registers_i386): Add prototype.
14324 (the_low_target): Add initializer for arch_setup field.
14325
14326 * spu-low.c (init_registers_spu): Add prototype.
14327 (initialize_low): Call initialie_registers_spu () instead of
14328 initialize_registers ().
14329
fd96d250
PA
143302008-02-19 Pedro Alves <pedro@codesourcery.com>
14331
14332 * server.c (handle_v_requests): When handling the vRun and vAttach
14333 packets, if already debugging a process, don't kill it. Return an
14334 error instead.
14335
d41b6bb4
DJ
143362008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14337
14338 * server.c (handle_query): Correct length check.
14339
5ac588cf
PA
143402008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14341
14342 * win32-low.c (do_initial_child_stuff): Add process handle
14343 parameter. Set current_process_handle and current_process_id from the
14344 parameters. Clear globals.
14345 (win32_create_inferior): Don't set current_process_handle and
14346 current_process_id here. Instead pass them on the call to
14347 do_initial_child_stuff.
14348 (win32_attach): Likewise.
14349 (win32_clear_inferiors): New.
14350 (win32_kill): Don't close the current process handle or the
14351 current thread handle here. Instead call win32_clear_inferiors.
14352 (win32_detach): Don't open a new handle to the process. Call
14353 win32_clear_inferiors.
14354 (win32_join): Don't rely on current_process_handle; open a new
14355 handle using the process id.
14356 (win32_wait): Call win32_clear_inferiors when the inferior process
14357 has exited.
14358
ecd7ecbc
DJ
143592008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14360
14361 * server.c (monitor_show_help): Add "exit".
14362
1525d545
MG
143632008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14364
ecd7ecbc 14365 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14366 (clean): Add reg-xtensa.c.
14367 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14368 * configure.srv (xtensa*-*-linux*) New target.
14369 * linux-xtensa-low.c: New.
14370 * xtensa-xtregs.c: New.
1525d545 14371
59a016f0
PA
143722008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14373
14374 * hostio.c: Don't include errno.h.
14375 (errno_to_fileio_errno): Move to hostio-errno.
14376 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14377 error number outputting to the target->hostio_last_error callback.
14378 (hostio_packet_error): Use FILEIO_EINVAL directly.
14379 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14380 calls to hostio_error.
14381 * hostio-errno.c: New.
14382 * server.h (hostio_last_error_from_errno): Declare.
14383 * target.h (target_ops): Add hostio_last_error member.
14384 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14385 as hostio_last_error handler.
889bf7c5 14386 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14387 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14388 (wince_hostio_last_error): New functions.
14389 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14390 as hostio_last_error handler.
14391 (win32_target_ops) [!_WIN32_WCE]: Register
14392 hostio_last_error_from_errno as hostio_last_error handler.
14393 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14394 (hostio-errno.o): New rule.
14395 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14396 * configure.srv (srv_hostio_err_objs): New variable. Default to
14397 hostio-errno.o.
14398 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14399 * configure: Regenerate.
14400
2d717e4f
DJ
144012008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14402
14403 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14404 (linux_kill, linux_detach): Clean up the process list.
14405 * remote-utils.c (remote_open): Improve port number parsing.
14406 (putpkt_binary, input_interrupt): Only send interrupts if the target
14407 is running.
14408 * server.c (extended_protocol): Make static.
14409 (attached): Define earlier.
14410 (exit_requested, response_needed, program_argv): New variables.
14411 (target_running): New.
14412 (start_inferior): Clear attached here.
14413 (attach_inferior): Set attached here.
14414 (require_running): Define.
14415 (handle_query): Use require_running and target_running. Implement
14416 "monitor exit".
14417 (handle_v_attach, handle_v_run): New.
14418 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14419 (gdbserver_usage): Update.
14420 (main): Redo argument parsing. Handle --debug and --multi. Handle
14421 --attach along with other options or after the port. Save
14422 program_argv. Support no initial program. Resynchronize
14423 communication with GDB after an error. Handle "monitor exit".
14424 Use require_running and target_running. Always allow the extended
14425 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14426 restart in extended mode.
14427 * README: Refer to the GDB manual. Update --attach usage.
14428
7407e2de
AS
144292007-12-20 Andreas Schwab <schwab@suse.de>
14430
14431 * linux-low.c (STACK_SIZE): Define.
14432 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14433 (linux_test_for_tracefork): Likewise.
14434
b65d95c5
DJ
144352007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14436
14437 * linux-low.c (linux_wait_for_event): Update messages. Do not
14438 reinsert auto-delete breakpoints.
14439 * mem-break.c (struct breakpoint): Change return type of handler to
14440 int.
14441 (set_breakpoint_at): Update handler type.
14442 (reinsert_breakpoint_handler): Return 1 instead of calling
14443 delete_breakpoint.
14444 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14445 setting a new one.
14446 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14447 * mem-break.h (set_breakpoint_at): Update handler type.
14448 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14449 * win32-low.c (auto_delete_breakpoint): New.
14450 (get_child_debug_event): Use it.
14451
4e799345
DJ
144522007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14453
14454 * configure.ac: Check for pread and pwrite.
14455 * hostio.c (handle_pread): Fall back to lseek and read.
14456 (handle_pwrite): Fall back to lseek and write.
14457 * config.in, configure: Regenerated.
14458
27524b67
DJ
144592007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14460
14461 * server.c (myresume): Add own_buf argument.
14462 (main): Update calls.
14463
a20d5e98
DJ
144642007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14465
14466 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14467 * remote-utils.c (remote_open): Do not call disable_async_io.
14468 (block_async_io): Delete.
14469 (unblock_async_io): Make static.
14470 (initialize_async_io): New.
14471 * server.c (handle_v_cont): Handle async I/O here.
14472 (myresume): Likewise. Move other common resume tasks here...
14473 (main): ... from here. Call initialize_async_io. Disable async
14474 I/O before the main loop.
14475 * server.h (initialize_async_io): Declare.
14476 (block_async_io, unblock_async_io): Delete prototypes.
14477 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14478
b79d787e
DJ
144792007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14480
14481 * remote-utils.c (readchar): Allow binary data in received messages.
14482
d97903b2
PA
144832007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14484
14485 * win32-low.c (attaching): New global.
14486 (win32_create_inferior): Clear the `attaching' global.
14487 (win32_attach): Set the `attaching' global.
14488 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14489 attaching. Only set a breakpoint at the entry point if not
14490 attaching.
14491
311de423
PA
144922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14493
14494 * server.c (main): Don't report dll events on the initial
14495 connection on attaches.
14496
6c2d16d2
PA
144972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14498
14499 * server.c (main): Relax numerical bases supported for the pid of
14500 the --attach command line argument.
14501
5ca906e6
PA
145022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14503
14504 * win32-low.c (win32_attach): Call OpenProcess before
14505 DebugActiveProcess, not after. Add last error output to error
14506 call.
14507
9c6c8194
PA
145082007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14509
14510 * win32-low.c (win32_get_thread_context)
14511 (win32_set_thread_context): New functions.
14512 (thread_rec): Use win32_get_thread_context.
14513 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14514 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14515 field.
14516
4d5d1aaa
PA
145172007-12-03 Leo Zayas
14518 Pedro Alves <pedro_alves@portugalmail.pt>
14519
14520 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14521 global variables.
14522 (child_add_thread): Minor cleanup.
14523 (child_continue): Resume artificially suspended threads before
14524 calling ContinueDebugEvent.
14525 (suspend_one_thread): New.
14526 (fake_breakpoint_event): New.
14527 (get_child_debug_event): Change return type to int. Check here if
14528 gdb sent an interrupt request. If a soft interrupt was requested,
14529 fake a breakpoint event. Return 0 if there is no event to handle,
14530 and 1 otherwise.
14531 (win32_wait): Don't check here if gdb sent an interrupt request.
14532 Ensure there is a valid event to handle.
14533 (win32_request_interrupt): Add soft interruption method as last
14534 resort.
14535
c436e841
PA
145362007-12-03 Leo Zayas
14537 Pedro Alves <pedro_alves@portugalmail.pt>
14538
14539 * win32-low.h (win32_thread_info): Add descriptions to the
14540 structure members. Replace `suspend_count' counter by a
14541 `suspended' flag.
14542 * win32-low.c (thread_rec): Update condition of when to get the
14543 context from the inferior. Rely on ContextFlags being set if it
14544 has already been retrieved. Only suspend the inferior thread if
14545 we haven't already. Warn if that fails.
14546 (continue_one_thread): s/suspend_count/suspended/. Only call
14547 ResumeThread once. Warn if that fails.
14548
e7b5fa67
PA
145492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14550
14551 * win32-low.c (win32_wait): Don't read from the inferior when it
14552 has already exited.
14553
a385171d
PA
145542007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14555
14556 * Makefile.in (win32_low_h): New variable.
14557 (win32-low.o): Add dependency on $(win32_low_h).
14558 (win32-arm-low.o, win32-i386-low.o): New rules.
14559
f80c84b3
DJ
145602007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14561
14562 * hostio.c: Correct copyright year.
14563
a6b151f1
DJ
145642007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14565
14566 * Makefile.in (OBS): Add hostio.o.
14567 (hostio.o): New rule.
14568 * server.h (handle_vFile): Declare.
14569 * hostio.c: New file.
14570 * server.c (handle_v_requests): Take packet_len and new_packet_len
14571 for binary packets. Call handle_vFile.
14572 (main): Update call to handle_v_requests.
14573
f9387fc3
DJ
145742007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14575
14576 * linux-low.c: Include <sched.h>.
14577
51c2684e
DJ
145782007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14579
14580 * linux-low.c (linux_tracefork_grandchild): New.
14581 (linux_tracefork_child): Use clone.
14582 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14583
75f83163
JB
145842007-10-31 Joel Brobecker <brobecker@adacore.com>
14585
14586 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14587
da5898ce
DJ
145882007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14589
14590 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14591
24a09b5f
DJ
145922007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14593
14594 * inferiors.c (change_inferior_id): Delete.
14595 (add_pid_to_list, pull_pid_from_list): New.
14596 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14597 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14598 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14599 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14600 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14601 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14602 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14603 (using_threads): Always set to 1.
14604 (handle_extended_wait): New.
14605 (add_process): Do not set TID.
14606 (linux_create_inferior): Set must_set_ptrace_flags.
14607 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14608 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14609 (linux_thread_alive): Rename TID argument to LWPID.
14610 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14611 (linux_wait_for_event): Do not use TID or check using_threads. Update
14612 call to dead_thread_notify. Call handle_extended_wait.
14613 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14614 (send_sigstop): Delete sigstop_sent.
14615 (wait_for_sigstop): Avoid TID.
14616 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14617 (linux_test_for_tracefork): New.
14618 (linux_lookup_signals): Use thread_db_active and
14619 linux_supports_tracefork_flag.
14620 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14621 * linux-low.h (get_process_thread): Avoid TID.
14622 (struct process_ifo): Move thread_known and tid to the end. Remove
14623 sigstop_sent.
14624 (linux_attach_lwp, thread_db_init): Update prototypes.
14625 * server.h (change_inferior_id): Delete prototype.
14626 (add_pid_to_list, pull_pid_from_list): New prototypes.
14627 * thread-db.c (thread_db_use_events): New.
14628 (find_first_thread): Rename to...
14629 (find_one_thread): ...this. Update callers and messages. Do not
14630 call fatal. Check thread_db_use_events. Do not call
14631 change_inferior_id or new_thread_notify.
14632 (maybe_attach_thread): Update. Do not call new_thread_notify.
14633 (thread_db_init): Set thread_db_use_events. Check use_events.
14634 * utils.c (fatal, warning): Correct message prefix.
14635
30ed0a8f
DJ
146362007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14637
14638 * Makefile.in (clean): Remove new files.
14639 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14640 (powerpc-64.o, powerpc-64.c): New rules.
14641 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14642 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14643 with SPE.
14644 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14645 SPE targets.
14646 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14647 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14648 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14649 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14650 (target_regsets): Add AltiVec and SPE register sets.
14651 * configure.ac: Check for AltiVec and SPE.
14652 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14653 (ppc_fill_vrregset, ppc_store_vrregset): New.
14654 (target_regsets): Add AltiVec register set.
14655 * configure: Regenerated.
14656
fd462a61
DJ
146572007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14658
14659 * linux-low.c (O_LARGEFILE): Define.
14660 (linux_read_memory): Use /proc/PID/mem.
14661 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14662 * configure, config.in: Regenerated.
14663
69f223ed
DJ
146642007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14665
14666 * linux-low.c (linux_wait_for_event): Do not pass signals while
14667 single-stepping.
14668
aec18585
PA
146692007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14670
14671 * win32-low.c (create_process): New.
14672 (win32_create_inferior): Use create_process instead of
14673 CreateProcess. If create_process failed retry appending an ".exe"
14674 suffix. Store the GetLastError result immediatelly after
14675 create_process calls and use it on the call to error.
14676
34d86ddd
PA
146772007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14678
14679 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14680
5a0e3bd0
JB
146812007-08-23 Joel Brobecker <brobecker@adacore.com>
14682
14683 * configure.ac: Switch license to GPLv3.
14684
f88c79e6
MS
146852007-08-01 Michael Snyder <msnyder@access-company.com>
14686
14687 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14688
6b3d9b83
PA
146892007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14690
14691 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14692 typedef.
14693 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14694 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14695 CloseToolhelp32Snapshot.
14696 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14697 CloseToolhelp32Snapshot.
14698
c588c53c
MS
146992007-07-27 Michael Snyder <michael.snyder@access-company.com>
14700
14701 * server.c (main): Check for inferior exit before main loop.
14702
aa0403d9
PA
147032007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14704
14705 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14706 instead of on tmp_desc.
14707
255e7678
DJ
147082007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14709 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14712 (add_thread): Minor cleanups.
14713 (clear_inferiors): Move lower in the file. Clear the DLL
14714 list.
14715 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14716 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14717 (xml_escape_text): New.
14718 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14719 for qSupported.
14720 (handle_v_cont): Report errors.
14721 (gdbserver_version): Update.
14722 (main): Correct size of own_buf. Do not report initial DLL events.
14723 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14724 (unloaded_dll, xml_escape_text): New.
14725 * win32-low.c (enum target_waitkind): Update comments.
14726 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14727 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14728 (win32_EnumProcessModules, win32_GetModuleInformation)
14729 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14730 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14731 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14732 (win32_Module32First, win32_Module32Next, load_toolhelp)
14733 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14734 (get_child_debug_event): Handle DLL events.
14735 (win32_wait): Likewise.
14736
0d37add9
DJ
147372007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14738
14739 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14740 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14741
45e2715e
PA
147422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14743
14744 * win32-low.c (handle_output_debug_string): Ignore event if not
14745 waiting.
14746
c5674cf1
PA
147472007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14748
14749 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14750
2bbe3cc1
DJ
147512007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14752
14753 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14754
ae13219e
DJ
147552007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14756
14757 * inferiors.c (change_inferior_id): Add comment.
14758 * linux-low.c (check_removed_breakpoint): Add an early
14759 prototype. Improve debug output.
14760 (linux_attach): Doc update.
14761 (linux_detach_one_process, linux_detach): Clean up before releasing
14762 each process.
14763 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14764 * linux-low.h (struct process_info): Doc improvement.
14765 * mem-break.c (delete_all_breakpoints): New.
14766 * mem-break.h (delete_all_breakpoints): New prototype.
14767 * thread-db.c (find_first_thread): New.
14768 (thread_db_create_event): Call it instead of
14769 thread_db_find_new_threads. Clean up unused variables.
14770 (maybe_attach_thread): Remove first thread handling.
14771 (thread_db_find_new_threads): Use find_first_thread.
14772 (thread_db_get_tls_address): Likewise.
14773
4105de34
DJ
147742007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14775
14776 * thread-db.c (thread_db_find_new_threads): Add prototype.
14777 (thread_db_create_event): Check for the main thread before adding
14778 a new thread.
14779 (maybe_attach_thread): Only enable event reporting if TID == 0.
14780 (thread_db_get_tls_address): Check for new threads.
14781
2b876972
DJ
147822007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14783
14784 * linux-low.c (linux_create_inferior): Try execv before execvp.
14785 * spu-low.c (spu_create_inferior): Likewise.
14786
7a245884
DJ
147872007-06-13 Mike Frysinger <vapier@gentoo.org>
14788
14789 * linux-low.c (linux_create_inferior): Change execv to execvp.
14790 * spu-low.c (spu_create_inferior): Likewies.
14791
117ce543
DJ
147922007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * Makefile.in (clean): Clean new files instead of deleted ones.
14795 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14796 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14797 rules.
14798 * configure.srv: Specify XML files and new regformats for MIPS and
14799 MIPS64 GNU/Linux.
14800 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14801 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14802 an entry for the restart register.
14803 (mips_cannot_fetch_register, mips_cannot_store_register)
14804 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14805 register names to match the XML descriptions.
14806 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14807 restart register instead of $0.
14808
0e7f50da
UW
148092007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14810 Markus Deuling <deuling@de.ibm.com>
14811
14812 * remote-utils.c (decode_xfer_write): New function.
14813 * server.h (decode_xfer_write): Add prototype.
14814 * server.c (handle_query): Add PACKET_LEN argument. Support
14815 qXfer:spu:read and qXfer:spu:write packets.
14816 (main): Pass packet_len to handle_query.
14817 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14818 * target.h (target_ops): Add qxfer_spu.
14819
374c1d38
UW
148202007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14821
14822 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14823 accessing non-seekable spufs files.
14824
bb63802a
UW
148252007-05-16 Markus Deuling <deuling@de.ibm.com>
14826
889bf7c5 14827 * server.c (handle_query): Add reply for qC packet.
bb63802a 14828
7390519e
PA
148292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14830 Leo Zayas <lerele@champenstudios@com>
14831
14832 * server.h (check_remote_input_interrupt_request): New function.
14833 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14834 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14835 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14836 (check_remote_input_interrupt_request): New function.
14837 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14838 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14839 winapi_GenerateConsoleCtrlEvent): New typedefs.
14840 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14841 to 250 ms.
14842 (win32_wait): Check for remote interrupt request
14843 with check_remote_input_interrupt_request.
14844 (win32_request_interrupt): New function.
14845 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14846
34b34921
PA
148472007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14848
14849 * win32-low.c (debug_registers_changed,
14850 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14851 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14852 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14853 (thread_rec): Get context using the low target.
14854 (child_add_thread): Call thread_added on the low target,
14855 which does the same thing.
14856 (regptr): Delete.
14857 (do_initial_child_stuff): Remove debug registers references.
14858 Set context using the low target. Resume threads after
14859 setting the contexts.
14860 (child_continue): Remove dead variable. Remove debug
14861 registers references.
14862 (child_fetch_inferior_registers): Go through the low target.
14863 (do_child_store_inferior_registers): Remove.
14864 (child_store_inferior_registers): Go through the low target.
14865 (win32_resume): Remove debug registers references.
14866 Set context using the low target.
14867 (handle_exception): Change return type to void. Don't record
14868 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14869 first chance exception.
889bf7c5 14870 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14871 goto loop. Always return after waiting for debug event.
14872 (win32_wait): Convert to switch statement. Handle spurious
14873 events.
14874
14875 * win32-i386-low.c (debug_registers_changed,
14876 debug_registers_used): New.
14877 (initial_stuff): Rename to ...
14878 (i386_initial_stuff): ... this. Clear debug registers
14879 state variables.
14880 (store_debug_registers): Delete.
14881 (i386_get_thread_context): New.
14882 (load_debug_registers): Delete.
14883 (i386_set_thread_context): New.
14884 (i386_thread_added): New.
14885 (single_step): Rename to ...
14886 (i386_single_step): ... this.
14887 (do_fetch_inferior_registers): Rename to ...
14888 (i386_fetch_inferior_register): ... this.
14889 (i386_store_inferior_register): New.
14890 (the_low_target): Adapt to new interface.
14891
14892 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14893 (arm_get_thread_context): New.
14894 (arm_set_thread_context): New.
14895 (regptr): New.
14896 (do_fetch_inferior_registers): Rename to ...
14897 (arm_fetch_inferior_register): ... this.
14898 (arm_store_inferior_register): New.
14899 (arm_wince_breakpoint): Reimplement as unsigned long.
14900 (arm_wince_breakpoint_len): Define.
14901 (the_low_target): Adapt to new interface.
14902
14903 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14904 load_debug_registers. Add get_thread_context, set_thread_context,
14905 thread_added and store_inferior_register. Rename
14906 fetch_inferior_registers to fetch_inferior_register.
14907 (regptr): Remove declaration.
14908
dd6953e1
PA
149092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14910
14911 * linux-low.c (linux_detach): Change return type to int. Return 0.
14912 * spu-low.c (spu_detach): Likewise.
14913
444d6139
PA
149142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14915
14916 * target.h (target_ops): Change return type of detach to int.
14917 Add join.
14918 (join_inferior): New.
14919 * server.c (main): Don't skip detach support on mingw32.
14920 If the inferior doesn't support detaching return error.
14921 Call join_inferior instead of using waitpid.
14922 * linux-low.c (linux_join): New.
14923 (linux_target_op): Add linux_join.
14924 * spu-low.c (spu_join): New.
14925 (spu_target_ops): Add spu_join.
14926 * win32-low.c (win32_detach): Adapt to new interface.
14927 Reopen current_process_handle before detaching. Issue a child
14928 resume before detaching.
14929 (win32_join): New.
14930 (win32_target_op): Add win32_join.
14931
1d5315fe
PA
149322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14933
14934 * win32-low.c (win32-attach): Fix return value.
14935 * target.h (target_ops): Describe ATTACH return values.
14936
bf914831
PA
149372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14938
14939 * win32-low.c (GETPROCADDRESS): Define.
14940 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14941 (winapi_DebugSetProcessKillOnExit): Likewise.
14942 (win32_create_inferior): Force usage of ansi CreateProcessA.
14943 (win32_attach): Use GETPROCADDRESS.
14944 (win32_detach): Likewise.
14945
f72f3e60
PA
149462007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14947
14948 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14949
ed50f18f
PA
149502007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14951
14952 * win32-low.c: Commit leftover changes from 2007-03-29.
14953
0c2ead7e
DJ
149542007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14957 fields short instead of int. Add explicit padding.
14958 (i387_cache_to_fsave): Remove unnecessary casts.
14959 (i387_fsave_to_cache): Doc fix.
14960 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14961
73725ff3
DJ
149622007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14963
14964 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14965 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14966
d99f33d8
PA
149672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14968
14969 * configure.srv (arm*-*-mingw32ce*): Move near the other
14970 arm targets.
14971
68070c10
PA
149722007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14973
2482afc6 14974 * configure.ac: Add errno checking.
68070c10
PA
14975 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14976 sys/file.h and malloc.h.
14977 (AC_CHECK_DECLS): Add perror.
14978 (srv_mingwce): Handle.
2482afc6 14979 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14980 win32-i386-low.o to srv_tgtobj.
14981 (i[34567]86-*-mingw*): Likewise.
14982 (arm*-*-mingw32ce*): Add case.
14983 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14984 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14985 [__MINGW32CE__] (strerror): New function.
14986 [__MINGW32CE__] (errno): Define to GetLastError.
14987 [__MINGW32CE__] (COUNTOF): New macro.
14988 (remote_open): Remove extra close call.
14989 * mem-break.c (delete_breakpoint_at): New function.
14990 * mem-break.h (delete_breakpoint_at): Declare.
14991 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14992 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14993 [USE_WIN32API] (read, write): Add char* casts.
14994 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14995 * server.h: Include wincecompat.h on Windows CE.
14996 [HAVE_ERRNO_H]: Check.
14997 (perror): Declare if not declared.
14998 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14999 (perror_with_name): Remove errno declaration.
15000 * wincecompat.h: New.
15001 * wincecompat.c: New.
15002 * win32-low.h: New.
15003 * win32-arm-low.c: New.
15004 * win32-i386-low.c: New.
15005 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15006 (OUTMSG2): Make it safe.
15007 (_T): New macro.
15008 (COUNTOF): New macro.
15009 (NUM_REGS): Get it from the low target.
15010 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15011 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15012 (thread_rec): Let low target handle debug registers.
15013 (child_add_thread): Likewise.
15014 (child_init_thread_list): Likewise.
15015 (continue_one_thread): Likewise.
15016 (regptr): New.
15017 (do_child_fetch_inferior_registers): Move to ...
15018 * win32-i386-low.c: ... here, and rename to ...
15019 (do_fetch_inferior_registers): ... this.
889bf7c5 15020 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
15021 Go through the low target.
15022 (do_child_store_inferior_registers): Use regptr.
15023 (strwinerror): New function.
15024 (win32_create_inferior): Handle Windows CE.
15025 Use strwinerror instead of strerror on Windows error
15026 codes. Add program to the error output.
15027 Don't close the main thread handle on Windows CE.
15028 (win32_attach): Use coredll.dll on Windows CE.
15029 (win32_kill): Close current process and current
15030 thread handles.
15031 (win32_detach): Use coredll.dll on Windows CE.
15032 (win32_resume): Let low target handle debug registers, and
15033 step request.
15034 (handle_exception): Add/Remove initial breakpoint. Avoid
15035 non-existant WSTOPSIG on Windows CE.
15036 (win32_read_inferior_memory): Cast to remove warning.
15037 (win32_arch_string): Go through the low target.
15038 (initialize_low): Call set_breakpoint_data with the low
15039 target's breakpoint.
15040 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15041 FOP_REGNUM, mappings): Move to ...
15042 * win32-i386-low.c: ... here.
15043 * win32-low.c (win32_thread_info): Move to ...
15044 * win32-low.h: ... here.
15045 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15046 win32-arm-low.c and wincecompat.c.
15047 (all:): Add $EXEEXT.
15048 (install-only:): Likewise.
15049 (gdbserver:): Likewise.
15050 (gdbreplay:): Likewise.
15051 * config.in: Regenerate.
15052 * configure: Regenerate.
15053
41093d81
PA
150542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15055
15056 * win32-low.c: Rename typedef thread_info to
15057 win32_thread_info throughout.
15058
544afa54
PA
150592007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15060
15061 * win32-i386-low.c: Rename to ...
15062 * win32-low.c: ... this.
15063 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15064 * Makefile.in: Likewise.
15065
bce7165d
PA
150662007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15067
15068 * remote-utils.c (monitor_output): Constify msg parameter.
15069 * server.h (monitor_output): Likewise.
15070 * win32-i386-low.c (handle_output_debug_string): New.
15071 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15072 handle_output_debug_string.
15073 (get_child_debug_event): Likewise.
15074
506c7aa0
DJ
150752007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15076
15077 * server.c (main): Correct strtoul check.
15078
42c81e2a
DJ
150792007-03-27 Jon Ringle <jon@ringle.org>
15080
15081 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15082
9453113a
DJ
150832007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15084
15085 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15086
64a69107
DJ
150872007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * terminal.h: Check HAVE_SGTTY_H.
15090
150912007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
15092
15093 * remote-utils.c (remote_open): Print out the assigned port number.
15094
c74d0ad8
DJ
150952007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15096
15097 * remote-utils.c (monitor_output): New function.
15098 * server.c (debug_threads): Define here.
15099 (monitor_show_help): New function.
15100 (handle_query): Handle qRcmd.
15101 (main): Do not handle 'd' packet.
15102 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15103 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15104 of debug_threads.
15105
de7c3b4a
PA
151062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15107
15108 * Makefile.in (EXEEXT): New.
15109 (clean): Use $(EXEEXT).
15110
ef57601b
PA
151112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15112
15113 * target.h (target_ops): Rename send_signal to request_interrupt,
15114 and remove enum target_signal parameter.
15115 * linux-low.c (linux_request_interrupt): Rename from
15116 linux_send_signal, and always send SIGINT.
15117 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15118 and always send SIGINT.
15119 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15120 of send_signal.
15121 (input_interrupt): Likewise.
15122
820f2bda
PA
151232007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15124
15125 * server.c (get_features_xml): Check if target implemented
15126 arch_string.
15127 * win32-i386-low.c (win32_arch_string): New.
15128 (win32_target_ops): Add win32_arch_string as arch_string member.
15129
ab39bf24
UW
151302007-02-22 Markus Deuling <deuling@de.ibm.com>
15131
15132 * spu-low.c (spu_arch_string): New.
15133 (spu_target_ops): Add spu_arch_string.
15134
61ff6e04
DJ
151352007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15136
15137 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15138 * configure.ac: Do not check for terminal.h.
15139 * configure, config.in: Regenerated.
15140
fb1e4ffc
DJ
151412007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15142
15143 * Makefile.in (OBS): Add $(XML_BUILTIN).
15144 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15145 (clean): Update.
15146 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15147 (arm-with-iwmmxt.c): New.
15148 * config.in, configure: Regenerate.
15149 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15150 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15151 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15152 (arm*-*-linux*): Add iWMMXt and regset support.
15153 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15154 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15155 (arm_store_wmmxregset, target_regsets): New.
15156 * server.c (get_features_xml): Take annex argument. Check builtin
15157 XML documents.
15158 (handle_query): Handle multiple annexes.
15159
0f48aa01
DJ
151602007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15161
15162 * remote-utils.c [USE_WIN32API] (read, write): Define.
15163 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15164 write.
15165
23181151
DJ
151662007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15167
15168 * linux-i386-low.c (the_low_target): Set arch_string.
15169 * linux-x86-64-low.c (the_low_target): Likewise.
15170 * linux-low.c (linux_arch_string): New.
15171 (linux_target_ops): Add it.
15172 * linux-low.h (struct linux_target_ops): Add arch_string.
15173 * server.c (write_qxfer_response): Use const void * for DATA.
15174 (get_features_xml): New.
15175 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15176 * target.h (struct target_ops): Add arch_string method.
15177
9d606399
DJ
151782007-01-03 Denis Pilat <denis.pilat@st.com>
15179 Daniel Jacobowitz <dan@codesourcery.com>
15180
15181 * linux-low.c (linux_kill): Handle being called with no threads.
15182 * win32-i386-low.c (win32_kill): Likewise.
15183 (get_child_debug_event): Clear current_process_handle.
15184
151852006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
15186 Daniel Jacobowitz <dan@codesourcery.com>
15187
15188 * remote-utils.c (remote_open): Check the type of specified
15189 serial port devices before opening them.
15190 * server.c (main): Kill the inferior if an error occurs during
15191 the first remote_open.
15192
a5e13d24
DJ
151932006-12-05 Markus Deuling <deuling@de.ibm.com>
15194
15195 * README: Update supported targets.
15196
186947f7
DJ
151972006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15198
15199 * Makefile.in (clean): Remove reg-mips64.c.
15200 (reg-mips64.c, reg-mips64.o): New rules.
15201 * configure.srv: Handle mips64. Include regset support for mips.
15202 * linux-mips-low.c (union mips_register): New.
15203 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15204 (mips_breakpoint, mips_breakpoint_at): Use int.
15205 (mips_collect_register, mips_supply_register)
15206 (mips_collect_register_32bit, mips_supply_register_32bit)
15207 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15208 (mips_store_fpregset, target_regsets): New.
15209 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15210
a13e2c95
UW
152112006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15212
15213 * configure.srv: Add target "spu*-*-*".
15214 * Makefile.in (clean): Remove reg-spu.c.
15215 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15216 * spu-low.c: New file.
15217
cb7283db
DJ
152182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15219
15220 * configure.ac: Correct td_thr_tls_get_addr test.
15221 * configure: Regenerated.
15222
89be2091
DJ
152232006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15224
15225 * linux-low.c (linux_wait_for_event): Reformat. Use the
15226 pass_signals array.
15227 * remote-utils.c (decode_address_to_semicolon): New.
15228 * server.c (pass_signals, handle_general_set): New.
15229 (handle_query): Mention QPassSignals for qSupported.
15230 (main): Call handle_general_set.
15231 * server.h (pass_signals, decode_address_to_semicolon): New.
15232
000ef4f0
DJ
152332006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15234
15235 * server.c (handle_query): Correct error handling for read_auxv.
15236
b7149293
UW
152372005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15238
15239 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15240 and srv_linux_thread_db to yes.
15241 * linux-s390-low.c (s390_fill_gregset): New function.
15242 (target_regsets): Define data structure.
15243
dae5f5cf
DJ
152442006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15245
15246 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15247 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15248 * config.in, configure: Regenerated.
15249 * inferiors.c (gdb_id_to_thread): New function.
15250 (gdb_id_to_thread_id): Use it.
15251 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15252 * linux-low.h (struct process_info): Add th member.
15253 (thread_db_get_tls_address): New prototype.
15254 * remote-utils.c (decode_address): Make non-static.
15255 * server.c (handle_query): Handle qGetTLSAddr.
15256 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15257 * target.h (struct target_ops): Add get_tls_address.
15258 * thread-db.c (maybe_attach_thread): Save the thread handle.
15259 (thread_db_get_tls_address): New.
15260
32ca6d61
DJ
152612006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15262
15263 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15264 (linux_resume_one_process): Take a siginfo_t *. Update all
15265 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15266 (struct pending_signals): Add a siginfo_t.
15267 (linux_wait_for_process): Always set last_status.
15268 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15269 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15270 * linux-low.h (struct process_info): Add last_status.
15271
5ffff7c1
DJ
152722006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * remote-utils.c (try_rle): New function.
15275 (putpkt_binary): Use it.
15276
8695c747
DJ
152772006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15278
15279 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15280 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15281 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15282 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15283 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15284 point registers.
15285
290fadea
RS
152862006-08-08 Richard Sandiford <richard@codesourcery.com>
15287
15288 * server.c (terminal_fd): New variable.
15289 (old_foreground_pgrp): Likewise.
15290 (restore_old_foreground_pgrp): New function.
15291 (start_inferior): Record the terminal file descriptor in terminal_fd
15292 and its original foreground group in old_foreground_pgrp. Register
15293 restore_old_foreground_pgrp with atexit().
15294
9f2e1e63
DJ
152952006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15296
15297 * server.c (handle_query): Correct qPart to qXfer.
15298
b80864fb
DJ
152992006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15300
15301 * configure.ac: Check for more headers which are missing on
15302 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15303 * configure.srv: Add Cygwin and mingw32.
15304 * remote-utils.c: Don't include headers unconditionally which
15305 are missing on mingw32. Include <winsock.h> for mingw32.
15306 (remote_open): Adjust for mingw32 support. Flush
15307 standard error after writing to it.
15308 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15309 (unblock_async_io, enable_async_io, disable_async_io)
15310 (readchar, getpkt): Update for Winsock support.
15311 (prepare_resume_reply): Expect a protocol signal number.
15312 * server.c: Disable <sys/wait.h> on mingw32.
15313 (start_inferior): Adjust for mingw32 support. Flush
15314 standard error after writing to it.
15315 (attach_inferior): Likewise. Use protocol signal
15316 numbers.
15317 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15318 and names.
15319 * win32-i386-low.c: New file.
15320 * Makefile.in (XM_CLIBS): Set.
15321 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15322 (win32-i386-low.o): New dependency rule.
15323 * linux-low.c (linux_wait): Use target signal numbers.
15324 * target.h (struct target_ops): Doc fix.
15325 * server.h (target_signal_to_name): New prototype.
15326 * gdbreplay.c: Don't include headers unconditionally which
15327 are missing on mingw32. Include <winsock.h> for mingw32.
15328 (remote_close, remote_open): Adjust for Winsock support.
15329 * configure, config.in: Regenerated.
15330
0876f84a
DJ
153312006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15332
15333 * server.c (decode_xfer_read, write_qxfer_response): New.
15334 (handle_query): Take a packet length argument. Handle
15335 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15336 the qSupported response.
15337 (main): Update call to handle_query.
15338
01f9e8fa
DJ
153392006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15340
15341 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15342 (putpkt_binary): Renamed from putpkt and adjusted for binary
15343 data.
15344 (putpkt): New wrapper for putpkt_binary.
15345 (readchar): Don't mask off the high bit.
15346 (decode_X_packet): New function.
15347 * server.c (main): Call putpkt_binary if a handler sets the packet
15348 length. Save the length of the incoming packet. Handle 'X'.
15349 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15350
be2a5f71
DJ
153512006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15352
15353 * server.c (handle_query): Handle qSupported.
15354
ea025f5f
DJ
153552006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15356
15357 * remote-utils.c (all_symbols_looked_up): New variable.
15358 (look_up_one_symbol): Check it.
15359 * server.h (look_up_one_symbol): New declaration.
15360 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15361
9308fc88
DJ
153622006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15363
15364 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 15365 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15366 (PTRACE_GET_THREAD_AREA): Define.
15367 (ps_get_thread_area): New function.
15368
52fb6437
NS
153692006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15370
15371 * configure.srv (m68k*-*-uclinux*): New target.
15372 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15373 (linux_resume_one_process): Remove extraneous cast.
15374 (linux_read_offsets): New.
15375 (linux_target_op): Add linux_read_offsets on mmuless systems.
15376 * server.c (handle_query): Add qOffsets logic.
15377 * target.h (struct target_ops): Add read_offsets.
15378
21b0f40c
DJ
153792006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15380
15381 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15382 (PTRACE_GET_THREAD_AREA): Define.
15383 (ps_get_thread_area): New function.
15384 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15385 (linux-x86-64-low.o): Update.
15386
0050a760
DJ
153872006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15388
15389 * configure.ac: Remove checks for prfpregset_t.
15390 * gdb_proc_service.h: New file.
15391 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15392 new "gdb_proc_service.h".
15393 * proc-service.c: Likewise.
15394 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15395 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15396 * Makefile.in (gdb_proc_service_h): Updated.
15397 * configure, config.in: Regenerated.
15398
b92a518e
DJ
153992006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15400
15401 * remote-utils.c (prepare_resume_reply): Move declaration
15402 of gdb_id_from_wait to the top of the block.
15403
545587ee
DJ
154042006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15405
15406 * linux-low.c (regsets_store_inferior_registers): Read the regset
15407 from the target before filling it.
15408
9db87ebd
DJ
154092006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15410
15411 * server.c (attach_inferior): Return SIGTRAP for a successful
15412 attach.
15413
dd24457d
DJ
154142006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15415
15416 * Makefile.in (OBS): Add version.o.
15417 (STAGESTUFF): Delete.
15418 (version.o): Add dependencies.
15419 (version.c): Replace rule.
15420 (clean): Remove version.c.
15421 * server.c (gdbserver_version): New.
15422 (gdbserver_usage): Use printf.
15423 (main): Handle --version and --help.
15424 * server.h (version, host_name): Add declarations.
15425
6f0f660e
EZ
154262005-12-23 Eli Zaretskii <eliz@gnu.org>
15427
889bf7c5
PA
15428 * linux-arm-low.c:
15429 * linux-arm-low.c:
15430 * inferiors.c:
15431 * i387-fp.h:
15432 * i387-fp.c:
15433 * gdbreplay.c:
15434 * regcache.c:
15435 * proc-service.c:
15436 * mem-break.h:
15437 * mem-break.c:
15438 * linux-x86-64-low.c:
15439 * linux-sh-low.c:
15440 * linux-s390-low.c:
15441 * linux-ppc64-low.c:
15442 * linux-ppc-low.c:
15443 * linux-mips-low.c:
15444 * linux-m68k-low.c:
15445 * linux-m32r-low.c:
15446 * linux-low.h:
15447 * linux-low.c:
15448 * linux-ia64-low.c:
15449 * linux-i386-low.c:
15450 * linux-crisv32-low.c:
15451 * thread-db.c:
15452 * terminal.h:
15453 * target.h:
15454 * target.c:
15455 * server.h:
15456 * server.c:
15457 * remote-utils.c:
15458 * regcache.h:
15459 * utils.c:
15460 * Makefile.in:
15461 * configure.ac:
6f0f660e
EZ
15462 * gdbserver.1: Add (C) after Copyright. Update the FSF
15463 address.
15464
9d1fb177
DJ
154652005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15466
15467 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15468 (arm_breakpoint_at): Recognize both breakpoints.
15469 (the_low_target): Use the correct breakpoint instruction.
15470
011a70c2
DJ
154712005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15472
15473 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15474 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15475 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15476 (the_low_target): Update.
15477
7fb85e41
AS
154782005-10-25 Andreas Schwab <schwab@suse.de>
15479
15480 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15481
15482 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15483 (ia64_num_regs): Reduce to 462.
15484
3db0444b
DJ
154852005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15486
15487 * acinclude.m4: Correct quoting.
15488 * aclocal.m4: Regenerated.
15489
15490 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15491 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15492 (thread_db_init): Call thread_db_err_str.
15493 * configure.ac: Check for TD_VERSION.
15494 * config.in, configure: Regenerated.
15495
bee0189a
DJ
154962005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15497
15498 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15499
e9d25b98
DJ
155002005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15501
15502 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15503 is not available. Define HAVE_PTRACE_GETREGS if it is.
15504 * config.in, configure: Regenerated.
15505 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15506 * linux-i386-low.c, linux-m68k-low.c: Update to use
15507 HAVE_PTRACE_GETREGS.
15508 * linux-low.c (regsets_fetch_inferior_registers)
15509 (regsets_store_inferior_registers): Only return 0 if we processed
15510 GENERAL_REGS.
15511 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15512 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15513
a06660f7
DJ
155142005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15515
15516 * inferiors.c (struct thread_info): Add gdb_id.
15517 (add_thread): Add gdb_id argument.
15518 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15519 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15520 calls to add_thread.
15521 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15522 * server.c (handle_query): Use thread_to_gdb_id.
15523 (handle_v_cont, main): Use gdb_id_to_thread_id.
15524 * server.h (add_thread): Update prototype.
15525 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15526 prototypes.
15527
5a1f5858
DJ
155282005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15529
15530 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15531 left-padded registers.
15532 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15533 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15534
e122f1f5
SE
155352005-07-01 Steve Ellcey <sje@cup.hp.com>
15536
15537 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15538 * configure: Regenerate.
15539 * config.in: Regenerate.
15540 * server.h (NEED_DECLARATION_STRERROR):
15541 Replace with !HAVE_DECL_STRERROR.
15542
d592fa2f
DJ
155432005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15544
15545 * linux-low.c (linux_wait, linux_send_signal): Don't test
15546 an unsigned long variable for > 0 if it could be MAX_ULONG.
15547 * server.c (myresume): Likewise.
15548 * target.c (set_desired_inferior): Likewise.
15549
ccbd4912
MK
155502005-06-13 Mark Kettenis <kettenis@gnu.org>
15551
15552 * configure.ac: Simplify and improve check for socklen_t.
15553 * configure, config.in: Regenerate.
15554
f450004a
DJ
155552005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15556
15557 * acconfig.h: Remove.
15558 * configure.ac: Add a test for socklen_t. Use three-argument
15559 AC_DEFINE throughout.
15560 * config.in: Regenerated using autoheader 2.59.
15561 * configure: Regenerated.
15562
15563 * gdbreplay.c (socklen_t): Provide a default.
15564 (remote_open): Use socklen_t.
15565 * remote-utils.c (socklen_t): Provide a default.
15566 (remote_open): Use socklen_t.
15567 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15568 unsigned char.
15569
15570 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15571 char for buffers.
15572 * linux-low.c (linux_read_memory, linux_write_memory)
15573 (linux_read_auxv): Likewise.
15574 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15575 (check_mem_write): Likewise.
15576 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15577 Likewise.
15578 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15579 (registers_from_string, register_data): Likewise.
15580 * server.c (handle_query, main): Likewise.
15581 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15582 (decode_M_packet): Likewise.
15583 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15584 * target.h (struct target_ops): Update read_memory, write_memory,
15585 and read_auxv.
15586 (read_inferior_memory, write_inferior_memory): Update.
15587 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15588 to unsigned char *.
15589 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15590 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15591 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15592 linux-s390-low.c, linux-sh-low.c: Update for changes in
15593 read_inferior_memory and the_low_target->breakpoint.
15594
eee84df1
DJ
155952005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15596
15597 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15598 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15599 * configure.srv: Add powerpc64-*-linux*.
15600 * linux-ppc64-low.c: New file.
15601
45b134e5
OF
156022005-05-23 Orjan Friberg <orjanf@axis.com>
15603
15604 * linux-cris-low.c: New file with support for CRIS.
15605 * linux-crisv32-low.c: Ditto for CRISv32.
15606 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15607 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15608 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15609 reg-crisv32.o, and reg-crisv32.c to make rules.
15610 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15611 recognized targets.
15612
48d93c75
UW
156132005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15614
15615 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15616 of sizeof (PTRACE_XFER_TYPE).
15617 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15618
e013ee27
OF
156192005-05-12 Orjan Friberg <orjanf@axis.com>
15620
889bf7c5 15621 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15622 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15623 pointers for hardware watchpoint support.
15624 * linux-low.h (struct linux_target_ops): Ditto.
15625 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15626 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15627 to linux_target_ops.
15628 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15629 reply packet.
15630 * server.c (main): Recognize 'Z' and 'z' packets.
15631
b0ded00b
UW
156322005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15633
15634 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15635 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15636 (the_low_target): Add new members.
15637
8643e2ad
DJ
156382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15639
15640 * proc-service.c (ps_lgetregs): Search all_processes instead of
15641 all_threads.
15642
fc620387
DJ
156432005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15644
15645 * server.c (start_inferior): Change return type to int.
15646 (attach_inferior): Change sigptr to int *.
15647 (handle_v_cont, handle_v_requests): Change signal to int *.
15648 (main): Change signal to int.
15649
156502005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15651
15652 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15653 * configure.srv: Add m32r*-*-linux*.
15654 * linux-m32r-low.c: New file.
15655
e0e76420
DJ
156562005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15657
15658 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15659
a1928bad
DJ
156602005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15661
15662 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15663 Take unsigned long arguments for PIDs.
15664 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15665 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15666 (wait_for_sigstop, linux_resume_one_process)
15667 (regsets_fetch_inferior_registers, linux_send_signal)
15668 (linux_read_auxv): Likewise. Update the types of variables holding
15669 PIDs. Update format string specifiers.
15670 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15671 * remote-utils.c (prepare_resume_reply): Likewise.
15672 * server.c (cont_thread, general_thread, step_thread)
15673 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15674 unsigned long.
15675 (handle_query): Update format specifiers.
15676 (handle_v_cont, main): Use strtoul for thread IDs.
15677 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15678 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15679 (general_thread, step_thread, thread_from_wait)
15680 (old_thread_from_wait): Update.
15681 * target.h (struct thread_resume): Use unsigned long for THREAD.
15682 (struct target_ops): Use unsigned long for arguments to attach and
15683 thread_alive.
15684
dcdb98d2
DJ
156852005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15686
15687 * acinclude.m4: Include bfd/bfd.m4 directly.
15688 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15689 <agriffis@toolchain.org>.
15690 * aclocal.m4, configure: Regenerated.
15691
bec39cab
AC
156922005-01-07 Andrew Cagney <cagney@gnu.org>
15693
15694 * configure.ac: Rename configure.in, require autoconf 2.59.
15695 * configure: Re-generate.
15696
434c4c77
DJ
156972004-12-08 Daniel Jacobowitz <dan@debian.org>
15698
15699 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15700 LIBS when finished.
15701 * aclocal.m4: Regenerated.
15702 * configure: Regenerated.
15703
db1d3e1b
AS
157042004-11-21 Andreas Schwab <schwab@suse.de>
15705
15706 * linux-m68k-low.c (m68k_num_gregs): Define.
15707 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15708 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15709 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15710 (m68k_breakpoint_at): New. Add to the_low_target.
15711
15712 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15713 srv_linux_thread_db to yes.
15714
43360365
JB
157152004-10-20 Joel Brobecker <brobecker@gnat.com>
15716
15717 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15718 (ARCH_SET_FS): Likewise.
15719 (ARCH_GET_FS): Likewise.
15720 (ARCH_GET_GS): Likewise.
15721
fd500816
DJ
157222004-10-16 Daniel Jacobowitz <dan@debian.org>
15723
15724 * linux-i386-low.c (ps_get_thread_area): New.
15725 * linux-x86-64-low.c (ps_get_thread_area): New.
15726 * linux-low.c: Include <sys/syscall.h>.
15727 (linux_kill_one_process): Don't kill the first thread here.
15728 (linux_kill): Kill the first thread here.
15729 (kill_lwp): New function.
15730 (send_sigstop, linux_send_signal): Use it.
15731 * proc-service.c: Clean up #ifdefs.
15732 (fpregset_info): Delete.
15733 (ps_lgetregs): Update and enable implementation.
15734 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15735 implementations.
15736 * remote-utils.c (struct sym_cache, symbol_cache): New.
15737 (input_interrupt): Print a clearer message.
15738 (async_io_enabled): New variable.
15739 (enable_async_io, disable_async_io): Use it. Update comments.
15740 (look_up_one_symbol): Use the symbol cache.
15741 * thread-db.c (thread_db_look_up_symbols): New function.
15742 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15743
f6de3c42
DJ
157442004-10-16 Daniel Jacobowitz <dan@debian.org>
15745
15746 * configure.in: Test for -rdynamic.
15747 * configure: Regenerated.
15748 * Makefile (INTERNAL_LDFLAGS): New.
15749 (gdbserver, gdbreplay): Use it.
15750
2c0fc042
AC
157512004-09-02 Andrew Cagney <cagney@gnu.org>
15752
15753 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15754
075b3282
DJ
157552004-03-23 Daniel Jacobowitz <drow@mvista.com>
15756
15757 * linux-low.c (linux_wait): Clear all_processes list also.
15758
fa6a77dc
DJ
157592004-03-12 Daniel Jacobowitz <drow@mvista.com>
15760
15761 * linux-low.c: Include <errno.h>. Remove extern declaration of
15762 errno.
15763
6d782a97
DJ
157642004-03-12 Daniel Jacobowitz <drow@mvista.com>
15765
15766 * gdbreplay.c, server.h, utils.c: Update copyright years.
15767
3a7fb99b
DJ
157682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15769
15770 * server.c (main): Print child status or termination signal from
15771 variable 'signal', not 'sig'.
15772
c3e735a6
DJ
157732004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15774
15775 * linux-low.c (linux_read_memory): Change return type to
15776 int. Check for and return error from ptrace().
15777 * target.c (read_inferior_memory): Change return type to int. Pass
15778 back return status from the_target->read_memory().
15779 * target.h (struct target_ops): Adapt *read_memory() prototype.
15780 Update comment.
15781 (read_inferior_memory): Adapt prototype.
15782 * server.c (main): Return an error packet if
15783 read_inferior_memory() returns an error.
15784
a59d1c82
DJ
157852004-03-04 Daniel Jacobowitz <drow@mvista.com>
15786
15787 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15788 Unify with other clean targets.
15789
dc3f8883
DJ
157902004-02-29 Daniel Jacobowitz <drow@mvista.com>
15791
15792 * server.c (handle_v_cont): Call set_desired_inferior.
15793
89a208da
DJ
157942004-02-29 Daniel Jacobowitz <drow@mvista.com>
15795
15796 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15797
62ea82f5
DJ
157982004-02-29 Daniel Jacobowitz <drow@mvista.com>
15799
15800 * linux-low.c (linux_wait): Unblock async I/O.
15801 (linux_resume): Block and enable async I/O.
15802 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15803 * server.h (block_async_io, unblock_async_io): Add prototypes.
15804
6910d122
DJ
158052004-02-29 Daniel Jacobowitz <drow@mvista.com>
15806
15807 * remote-utils.c (remote_open): Print a status notice after
15808 opening a TCP port.
15809 * server.c (attach_inferior): Print a status notice after
15810 attaching.
15811
158122004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15813
15814 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15815
c89dc5d4
DJ
158162004-02-26 Daniel Jacobowitz <drow@mvista.com>
15817
15818 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15819 error packet.
15820 * server.c, target.h: Update copyright years.
15821
4b8dad4a
RM
158222004-02-25 Roland McGrath <roland@redhat.com>
15823
15824 * target.h (struct target_ops): New member `read_auxv'.
15825 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15826 * linux-low.c (linux_read_auxv): New function.
15827 (linux_target_ops): Initialize `read_auxv' member to that.
15828
d7446758
JB
158292004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15830
15831 Committed by Jim Blandy <jimb@redhat.com>.
15832
15833 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15834 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15835 instead of GPR_SIZE to distiguish s390 and s390x targets.
15836
5544ad89
DJ
158372004-01-31 Daniel Jacobowitz <drow@mvista.com>
15838
15839 * linux-low.c: Update copyright year.
15840 (check_removed_breakpoint): Clear pending_is_breakpoint.
15841 (linux_set_resume_request, linux_queue_one_thread)
15842 (resume_status_pending_p): New functions.
15843 (linux_continue_one_thread): Use process->resume.
15844 (linux_resume): Only resume threads if there are no pending events.
15845 * linux-low.h (struct process_info): Add resume request
15846 pointer.
15847
2a68b70e
DJ
158482004-01-30 Daniel Jacobowitz <drow@mvista.com>
15849
15850 * regcache.c (new_register_cache): Clear the allocated register
15851 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15852
64386c31
DJ
158532003-10-13 Daniel Jacobowitz <drow@mvista.com>
15854
15855 * linux-low.c (linux_resume): Take a struct thread_resume *
15856 argument.
15857 (linux_wait): Update call.
15858 (resume_ptr): New static variable.
15859 (linux_continue_one_thread): Renamed from
15860 linux_continue_one_process. Use resume_ptr.
15861 (linux_resume): Use linux_continue_one_thread.
15862 * server.c (handle_v_cont, handle_v_requests): New functions.
15863 (myresume): New function.
15864 (main): Handle 'v' case.
15865 * target.h (struct thread_resume): New type.
15866 (struct target_ops): Change argument of "resume" to struct
15867 thread_resume *.
15868 (myresume): Delete macro.
15869
c938e9b0
L
158702003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15871
15872 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15873 (uninstall): Support DESTDIR.
15874
7f313d07
BC
15875Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15876
15877 * configure.srv: Add xscale*linux copy of arm*linux entry.
15878
3b2fc2ea
DJ
158792003-07-24 Daniel Jacobowitz <drow@mvista.com>
15880
15881 * linux-arm-low.c (arm_reinsert_addr): New function.
15882 (the_low_target): Add arm_reinsert_addr.
15883
1c0a559e
MK
158842003-07-08 Mark Kettenis <kettenis@gnu.org>
15885
15886 * mem-break.c: Remove whitespace at end of file.
15887
43d5792c
DJ
158882003-06-28 Daniel Jacobowitz <drow@mvista.com>
15889
15890 * configure.in: Check whether we need to prototype strerror.
15891 * server.h: Optionally prototype strerror.
15892 * gdbreplay.c (perror_with_name): Use strerror.
15893 * linux-low.c (linux_attach_lwp): Use strerror.
15894 * utils.c (perror_with_name): Use strerror.
15895 * config.in, configure: Regenerated.
15896
c8a86edf
DJ
158972003-06-28 Daniel Jacobowitz <drow@mvista.com>
15898
15899 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15900 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15901
73d37363
DJ
159022003-06-20 Daniel Jacobowitz <drow@mvista.com>
15903
15904 * Makefile.in (SFILES): Update.
15905 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15906 low-sun3.c: Remove files.
15907
6ad8ae5c
DJ
159082003-06-17 Daniel Jacobowitz <drow@mvista.com>
15909
15910 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15911 (linux_detach_one_process, linux_detach): New functions.
15912 (linux_target_ops): Add linux_detach.
15913 * server.c (main): Handle 'D' packet.
15914 * target.h (struct target_ops): Add "detach" member.
15915 (detach_inferior): Define.
15916
1581182a
MK
159172003-06-13 Mark Kettenis <kettenis@gnu.org>
15918
15919 From Kelley Cook <kelleycook@wideopenwest.com>:
15920 * configure.srv: Accept i[34567]86 variants.
15921
e5379b03
DJ
159222003-06-05 Daniel Jacobowitz <drow@mvista.com>
15923
15924 * linux-low.c (linux_wait_for_event): Correct comment typos.
15925 (linux_resume_one_process): Call check_removed_breakpoint.
15926 (linux_send_signal): New function.
15927 (linux_target_ops): Add linux_send_signal.
15928 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15929 of kill.
15930 * target.h (struct target_ops): Add send_signal.
15931
2ff29de4
JB
159322003-05-29 Jim Blandy <jimb@redhat.com>
15933
15934 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15935 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15936 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15937 away part of the register's value.
15938
254787d4
DJ
159392003-03-26 Daniel Jacobowitz <drow@mvista.com>
15940
15941 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15942 (linux_wait_for_event, linux_init_signals): Likewise.
15943
94e10508
DJ
159442003-03-17 Daniel Jacobowitz <drow@mvista.com>
15945
15946 * configure.in: Check for stdlib.h.
15947 * configure: Regenerated.
15948 * config.in: Regenerated.
15949
4c0711e0
DJ
159502003-01-04 Andreas Schwab <schwab@suse.de>
15951
15952 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15953
ef66e766
AC
159542003-01-02 Andrew Cagney <ac131313@redhat.com>
15955
15956 * Makefile.in: Remove obsolete code.
15957
a1358604
DJ
159582002-11-20 Daniel Jacobowitz <drow@mvista.com>
15959
15960 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15961 defined(PT_FPR0_HI).
15962
23ce3b1c
DJ
159632002-11-17 Stuart Hughes <seh@zee2.com>
15964
15965 * linux-arm-low.c (arm_num_regs): Increase.
15966 (arm_regmap): Include status register.
15967
159682002-11-17 Daniel Jacobowitz <drow@mvista.com>
15969
15970 * linux-low.c (register_addr): Remove incorrect -1 check.
15971
a9fa9f7d
DJ
159722002-08-29 Daniel Jacobowitz <drow@mvista.com>
15973
15974 * linux-low.c (linux_create_inferior): Call setpgid. Return
15975 the new PID.
15976 (unstopped_p, linux_signal_pid): Remove.
15977 (linux_target_ops): Remove linux_signal_pid.
15978 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15979 global instead of target method.
15980 * target.h (struct target_ops): Remove signal_pid. Update comment
15981 for create_inferior.
15982 * server.c (signal_pid): New variable.
15983 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15984 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15985 (attach_inferior): Set signal_pid.
15986
17574093
DJ
159872002-08-23 Daniel Jacobowitz <drow@mvista.com>
15988
15989 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15990
159912002-08-20 Jim Blandy <jimb@redhat.com>
15992
15993 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15994 default for this.
15995
159962002-08-01 Andrew Cagney <cagney@redhat.com>
15997
15998 * Makefile.in: Make chill references obsolete.
15999
160002002-07-24 Kevin Buettner <kevinb@redhat.com>
16001
16002 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16003 * configure: Regenerate.
16004 * config.in: Regenerate.
16005
160062002-07-09 David O'Brien <obrien@FreeBSD.org>
16007
16008 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16009 (perror_with_name, remote_close, remote_open, expect, play): Static.
16010
160112002-07-04 Michal Ludvig <mludvig@suse.cz>
16012
4b8dad4a 16013 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
16014 byte offsets instead of an array of indexes.
16015 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16016
160172002-06-13 Daniel Jacobowitz <drow@mvista.com>
16018
16019 * regcache.c: Add comment.
16020
160212002-06-11 Daniel Jacobowitz <drow@mvista.com>
16022
16023 * thread-db.c: New file.
16024 * proc-service.c: New file.
16025 * acinclude.m4: New file.
16026 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16027 proc-service.o, and thread-db.o.
16028 (linux-low.o): Add USE_THREAD_DB.
16029 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16030 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16031 * aclocal.m4: Regenerated.
16032 * config.in: Regenerated.
16033 * configure: Regenerated.
16034 * configure.in: Check for proc_service.h, sys/procfs.h,
16035 thread_db.h, and linux/elf.h headrs.
16036 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16037 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16038 Check for -lthread_db and thread support.
16039 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16040 PowerPC, and SuperH.
16041 * i387-fp.c: Constify arguments.
16042 * i387-fp.h: Likewise.
16043 * inferiors.c: (struct thread_info): Renamed from
16044 `struct inferior_info'. Remove PID member. Use generic inferior
16045 list header. All uses updated.
16046 (inferiors, signal_pid): Removed.
16047 (all_threads): New variable.
16048 (get_thread): Define.
16049 (add_inferior_to_list): New function.
16050 (for_each_inferior): New function.
16051 (change_inferior_id): New function.
16052 (add_inferior): Removed.
16053 (remove_inferior): New function.
16054 (add_thread): New function.
16055 (free_one_thread): New function.
16056 (remove_thread): New function.
16057 (clear_inferiors): Use for_each_inferior and free_one_thread.
16058 (find_inferior): New function.
16059 (find_inferior_id): New function.
16060 (inferior_target_data): Update argument type.
16061 (set_inferior_target_data): Likewise.
16062 (inferior_regcache_data): Likewise.
16063 (set_inferior_regcache_data): Likewise.
16064 * linux-low.c (linux_bp_reinsert): Remove.
16065 (all_processes, stopping_threads, using_thrads)
16066 (struct pending_signals, debug_threads, pid_of): New.
16067 (inferior_pid): Replace with macro.
16068 (struct inferior_linux_data): Remove.
16069 (get_stop_pc, add_process): New functions.
16070 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16071 Use add_process and add_thread.
16072 (linux_attach_lwp): New function, based on old linux_attach. Use
16073 add_process and add_thread. Set stop_expected for new threads.
16074 (linux_attach): New function.
16075 (linux_kill_one_process): New function.
16076 (linux_kill): Kill all LWPs.
16077 (linux_thread_alive): Use find_inferior_id.
16078 (check_removed_breakpoints, status_pending_p): New functions.
16079 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16080 Update. Use WNOHANG. Wait for cloned processes also. Update process
16081 struct for the found process.
16082 (linux_wait_for_event): New function.
16083 (linux_wait): Use it. Support LWPs.
16084 (send_sigstop, wait_for_sigstop, stop_all_processes)
16085 (linux_resume_one_process, linux_continue_one_process): New functions.
16086 (linux_resume): Support LWPs.
16087 (REGISTER_RAW_SIZE): Remove.
16088 (fetch_register): Use register_size instead. Call supply_register.
16089 (usr_store_inferior_registers): Likewise. Call collect_register.
16090 Fix recursive case.
16091 (regsets_fetch_inferior_registers): Improve error message.
16092 (regsets_store_inferior_registers): Add debugging.
16093 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16094 (unstopped_p, linux_signal_pid): New functions.
16095 (linux_target_ops): Add linux_signal_pid.
16096 (linux_init_signals): New function.
16097 (initialize_low): Call it. Initialize using_threads.
16098 * regcache.c (inferior_regcache_data): Add valid
16099 flag.
16100 (get_regcache): Fetch registers lazily. Add fetch argument
16101 and update all callers.
16102 (regcache_invalidate_one, regcache_invalidate): New
16103 functions.
16104 (new_register_cache): Renamed from create_register_cache.
16105 Return the new regcache.
16106 (free_register_cache): Change argument to a void *.
16107 (registers_to_string, registers_from_string): Call get_regcache
16108 with fetch flag set.
16109 (register_data): Make static. Pass fetch flag to get_regcache.
16110 (supply_register): Call get_regcache with fetch flag clear.
16111 (collect_register): Call get_regcache with fetch flag set.
16112 (collect_register_as_string): New function.
16113 * regcache.h: Update.
16114 * remote-utils.c (putpkt): Flush after debug output and use
16115 stderr.
16116 Handle input interrupts while waiting for an ACK.
16117 (input_interrupt): Use signal_pid method.
16118 (getpkt): Flush after debug output and use stderr.
16119 (outreg): Use collect_register_as_string.
16120 (new_thread_notify, dead_thread_notify): New functions.
16121 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16122 and general_thread.
16123 (look_up_one_symbol): Flush after debug output.
16124 * server.c (step_thread, server_waiting): New variables.
16125 (start_inferior): Don't use signal_pid. Update call to mywait.
16126 (attach_inferior): Update call to mywait.
16127 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16128 (main): Don't fetch/store registers explicitly. Use
16129 set_desired_inferior. Support proposed ``Hs'' packet. Update
16130 calls to mywait.
16131 * server.h: Update.
16132 (struct inferior_list, struct_inferior_list_entry): New.
16133 * target.c (set_desired_inferior): New.
16134 (write_inferior_memory): Constify.
16135 (mywait): New function.
16136 * target.h: Update.
16137 (struct target_ops): New signal_pid method.
16138 (mywait): Removed macro, added prototype.
16139
16140 * linux-low.h (regset_func): Removed.
16141 (regset_fill_func, regset_store_func): New.
16142 (enum regset_type): New.
16143 (struct regset_info): Add type field. Use new operation types.
16144 (struct linux_target_ops): stop_pc renamed to get_pc.
16145 Add decr_pc_after_break and breakpoint_at.
16146 (get_process, get_thread_proess, get_process_thread)
16147 (strut process_info, all_processes, linux_attach_lwp)
16148 (thread_db_init): New.
16149
16150 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16151 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16152 (the_low_target): Add new members.
16153 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16154 (i386_store_fpxregset): Constify.
16155 (target_regsets): Add new kind identifier.
16156 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16157 (i386_set_pc): Add debugging.
16158 (i386_breakpoint_at): New function.
16159 (the_low_target): Add new members.
16160 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16161 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16162 (mips_breakpoint_at): New.
16163 (the_low_target): Add new members.
16164 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16165 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16166 (the_low_target): Add new members.
16167 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16168 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16169 (the_low_target): Add new members.
16170 * linux-x86-64-low.c (target_regsets): Add new kind
16171 identifier.
16172
161732002-05-15 Daniel Jacobowitz <drow@mvista.com>
16174
16175 From Martin Pool <mbp@samba.org>:
16176 * server.c (gdbserver_usage): New function.
16177 (main): Call it.
16178
161792002-05-14 Daniel Jacobowitz <drow@mvista.com>
16180
16181 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16182 stop_at -> stop_pc.
16183
161842002-05-04 Andrew Cagney <ac131313@redhat.com>
16185
16186 * Makefile.in: Remove obsolete code.
16187
161882002-04-24 Michal Ludvig <mludvig@suse.cz>
16189
16190 * linux-low.c (regsets_fetch_inferior_registers),
16191 (regsets_store_inferior_registers): Removed cast to int from
16192 ptrace() calls.
16193 * regcache.h: Added declaration of struct inferior_info.
16194
161952002-04-20 Daniel Jacobowitz <drow@mvista.com>
16196
16197 * inferiors.c (struct inferior_info): Add regcache_data.
16198 (add_inferior): Call create_register_cache.
16199 (clear_inferiors): Call free_register_cache.
16200 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16201 * regcache.c (struct inferior_regcache_data): New.
16202 (registers): Remove.
16203 (get_regcache): New function.
16204 (create_register_cache, free_register_cache): New functions.
16205 (set_register_cache): Don't initialize the register cache here.
16206 (registers_to_string, registers_from_string, register_data): Call
16207 get_regcache.
16208 * regcache.h: Add prototypes.
16209 * server.h: Likewise.
16210
162112002-04-20 Daniel Jacobowitz <drow@mvista.com>
16212
16213 * mem-break.c: New file.
16214 * mem-break.h: New file.
16215 * Makefile.in: Add mem-break.o rule; update server.h
16216 dependencies.
16217 * inferiors.c (struct inferior_info): Add target_data
16218 member.
16219 (clear_inferiors): Free target_data member if set.
16220 (inferior_target_data, set_inferior_target_data): New functions.
16221 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16222 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16223 * linux-low.c (linux_bp_reinsert): New variable.
16224 (struct inferior_linux_data): New.
16225 (linux_create_inferior): Use set_inferior_target_data.
16226 (linux_attach): Likewise. Call add_inferior.
16227 (linux_wait_for_one_inferior): New function.
16228 (linux_wait): Call it.
16229 (linux_write_memory): Add const.
16230 (initialize_low): Call set_breakpoint_data.
16231 * linux-low.h (struct linux_target_ops): Add breakpoint
16232 handling members.
16233 * server.c (attach_inferior): Remove extra add_inferior
16234 call.
16235 * server.h: Include mem-break.h. Update inferior.c
16236 prototypes.
16237 * target.c (read_inferior_memory)
16238 (write_inferior_memory): New functions.
16239 * target.h (read_inferior_memory)
16240 (write_inferior_memory): Change macros to prototypes.
16241 (struct target_ops): Update comments. Add const to write_memory
16242 definition.
16243
162442002-04-11 Daniel Jacobowitz <drow@mvista.com>
16245
16246 * linux-low.c (usr_store_inferior_registers): Support
16247 registers which are allowed to fail to store.
16248 * linux-low.h (linux_target_ops): Likewise.
16249 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16250 (ppc_cannot_store_register): FPSCR may not be storable.
16251
162522002-04-09 Daniel Jacobowitz <drow@mvista.com>
16253
16254 * server.h: Include <string.h> if HAVE_STRING_H.
16255 * ChangeLog: Correct paths in last ChangeLog entry.
16256
162572002-04-09 Daniel Jacobowitz <drow@mvista.com>
16258
16259 * linux-low.h: Remove obsolete prototypes.
16260 (struct linux_target_ops): New.
16261 (extern the_low_target): New.
16262 * linux-low.c (num_regs, regmap): Remove declarations.
16263 (register_addr): Use the_low_target explicitly.
16264 (fetch_register): Likewise.
16265 (usr_fetch_inferior_registers): Likewise.
16266 (usr_store_inferior_registers): Likewise.
16267 * linux-arm-low.c (num_regs): Remove.
16268 (arm_num_regs): Define.
16269 (arm_regmap): Renamed from regmap, made static.
16270 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16271 made static.
16272 (arm_cannot_store_register): Renamed from cannot_store_register,
16273 made static.
16274 (the_low_target): New.
16275 * linux-i386-low.c (num_regs): Remove.
16276 (i386_num_regs): Define.
16277 (i386_regmap): Renamed from regmap, made static.
16278 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16279 made static.
16280 (i386_cannot_store_register): Renamed from cannot_store_register,
16281 made static.
16282 (the_low_target): New.
16283 * linux-ia64-low.c (num_regs): Remove.
16284 (ia64_num_regs): Define.
16285 (ia64_regmap): Renamed from regmap, made static.
16286 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16287 made static.
16288 (ia64_cannot_store_register): Renamed from cannot_store_register,
16289 made static.
16290 (the_low_target): New.
16291 * linux-m68k-low.c (num_regs): Remove.
16292 (m68k_num_regs): Define.
16293 (m68k_regmap): Renamed from regmap, made static.
16294 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16295 made static.
16296 (m68k_cannot_store_register): Renamed from cannot_store_register,
16297 made static.
16298 (the_low_target): New.
16299 * linux-mips-low.c (num_regs): Remove.
16300 (mips_num_regs): Define.
16301 (mips_regmap): Renamed from regmap, made static.
16302 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16303 made static.
16304 (mips_cannot_store_register): Renamed from cannot_store_register,
16305 made static.
16306 (the_low_target): New.
16307 * linux-ppc-low.c (num_regs): Remove.
16308 (ppc_num_regs): Define.
16309 (ppc_regmap): Renamed from regmap, made static.
16310 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16311 made static.
16312 (ppc_cannot_store_register): Renamed from cannot_store_register,
16313 made static.
16314 (the_low_target): New.
16315 * linux-s390-low.c (num_regs): Remove.
16316 (s390_num_regs): Define.
16317 (s390_regmap): Renamed from regmap, made static.
16318 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16319 made static.
16320 (s390_cannot_store_register): Renamed from cannot_store_register,
16321 made static.
16322 (the_low_target): New.
16323 * linux-sh-low.c (num_regs): Remove.
16324 (sh_num_regs): Define.
16325 (sh_regmap): Renamed from regmap, made static.
16326 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16327 made static.
16328 (sh_cannot_store_register): Renamed from cannot_store_register,
16329 made static.
16330 (the_low_target): New.
16331 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16332 (the_low_target): New.
16333
163342002-04-09 Daniel Jacobowitz <drow@mvista.com>
16335
16336 * Makefile.in: Add stamp-h target.
16337 * configure.in: Create stamp-h.
16338 * configure: Regenerated.
16339
163402002-04-09 Daniel Jacobowitz <drow@mvista.com>
16341
16342 * inferiors.c: New file.
16343 * target.c: New file.
16344 * target.h: New file.
16345 * Makefile.in: Add target.o and inferiors.o. Update
16346 dependencies.
16347 * linux-low.c (inferior_pid): New static variable,
16348 moved from server.c.
16349 (linux_create_inferior): Renamed from create_inferior.
16350 Call add_inferior. Return 0 on success instead of a PID.
16351 (linux_attach): Renamed from myattach.
16352 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16353 (linux_thread_alive): Renamed from mythread_alive.
16354 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16355 child dies.
16356 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16357 (regsets_store_inferior_registers): Correct error message.
16358 Add missing ``return 0''.
16359 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16360 (linux_store_registers): Renamed from store_inferior_registers.
16361 (linux_read_memory): Renamed from read_inferior_memory.
16362 (linux_write_memory): Renamed from write_inferior_memory.
16363 (linux_target_ops): New structure.
16364 (initialize_low): Call set_target_ops ().
16365 * remote-utils.c (unhexify): New function.
16366 (hexify): New function.
16367 (input_interrupt): Send signals to ``signal_pid''.
16368 * server.c (inferior_pid): Remove.
16369 (start_inferior): Update create_inferior call.
16370 (attach_inferior): Call add_inferior.
16371 (handle_query): New function.
16372 (main): Call handle_query for `q' packets.
16373 * server.h: Include "target.h". Remove obsolete prototypes.
16374 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16375
163762002-04-09 Daniel Jacobowitz <drow@mvista.com>
16377
16378 * Makefile.in: Add WARN_CFLAGS. Update configury
16379 dependencies.
16380 * configure.in: Check for <string.h>
16381 * configure: Regenerate.
16382 * config.in: Regenerate.
16383 * gdbreplay.c: Include needed system headers.
16384 (remote_open): Remove strchr prototype.
16385 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16386 * regcache.c (supply_register): Change buf argument to const void *.
16387 (supply_register_by_name): Likewise.
16388 (collect_register): Change buf argument to void *.
16389 (collect_register_by_name): Likewise.
16390 * regcache.h: Add missing prototypes.
16391 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16392 * server.c (handle_query): New function.
16393 (attached): New static variable, moved out of main.
16394 (main): Quiet longjmp clobber warnings.
16395 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16396 * utils.c (error): Remove NORETURN.
16397 (fatal): Likewise.
This page took 2.343988 seconds and 4 git commands to generate.